"use strict";
/** @typedef {'Ascend'|'Descend'} */
export var SortOrders;
(function (SortOrders) {
SortOrders["Ascend"] = "Ascend"
SortOrders["Descend"] = "Descend"
})(SortOrders || (SortOrders = {}));
/** @typedef T {any} */
export class ListRequest {
/** @param {{page?:number,all?:boolean,countPerPage?:number,specificIds?:string[],sortField?:string,sortOrder?:SortOrders,simplifiedPaging?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The page of data to retrieve */
page;
/**
* @type {boolean}
* @description If you want all objects to be returned. This should be used with care */
all;
/**
* @type {number}
* @description The number per page to retrieve */
countPerPage;
/**
* @type {string[]}
* @description Specific IDs */
specificIds;
/**
* @type {string}
* @description Specify a sort field */
sortField;
/**
* @type {SortOrders}
* @description Specify a sort order */
sortOrder;
/**
* @type {boolean}
* @description Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array */
simplifiedPaging;
}
export class EntityInfo {
/** @param {{id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The ID of the object */
id;
/**
* @type {string}
* @description The date the object was created */
dateCreated;
/**
* @type {string}
* @description The date the object was last modified */
dateLastModified;
/**
* @type {string}
* @description The user that created this object */
createdBy;
/**
* @type {string}
* @description The user that last modified this object */
lastModifiedBy;
}
export class CustomerBreadcrumb {
/** @param {{id?:string,name?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
name;
}
export class LogEntryInfo extends EntityInfo {
/** @param {{accountId?:string,accountName?:string,customerId?:string,customerName?:string,customerBreadcrumb?:CustomerBreadcrumb[],userName?:string,description?:string,id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description The account ID this endpoint is associated with */
accountId;
/**
* @type {string}
* @description The name of the account this endpoint is associated with */
accountName;
/**
* @type {string}
* @description The ID of the customer this endpoint is associated with */
customerId;
/**
* @type {string}
* @description The name of the customer this endpoint is associated with */
customerName;
/**
* @type {CustomerBreadcrumb[]}
* @description The breadcrumb to the customer for this endpoint */
customerBreadcrumb;
/** @type {string} */
userName;
/** @type {string} */
description;
}
export class ListLogEntries extends ListRequest {
/** @param {{accountIds?:string[],customerIds?:string[],startDate?:string,endDate?:string,description?:string,page?:number,all?:boolean,countPerPage?:number,specificIds?:string[],sortField?:string,sortOrder?:SortOrders,simplifiedPaging?:boolean}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string[]}
* @description The IDs of the account whose log entries you want to retrieve */
accountIds;
/**
* @type {string[]}
* @description The IDs of the customers whose log entries you want to retrieve */
customerIds;
/**
* @type {string}
* @description The start date to retrieve usage records for (YYYY-MM-DD) */
startDate;
/**
* @type {string}
* @description The end date to retrieve logs for (YYYY-MM-DD) */
endDate;
/**
* @type {string}
* @description Search by description */
description;
}
export class BillingItem {
/** @param {{baseCost?:number,rawUnitMultiplier?:number,unitCost?:number,allowance?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
baseCost;
/** @type {number} */
rawUnitMultiplier;
/** @type {number} */
unitCost;
/** @type {number} */
allowance;
}
export class BillingSettings {
/** @param {{base?:BillingItem,localNumbers?:BillingItem,tollFreeNumbers?:BillingItem,inboundVoiceCalls?:BillingItem,outboundVoiceCalls?:BillingItem,inboundFaxes?:BillingItem,outboundFaxes?:BillingItem,inboundSmsMessages?:BillingItem,outboundSmsMessages?:BillingItem,aiInsights?:BillingItem,aiLiveMinutes?:BillingItem}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BillingItem} */
base;
/** @type {BillingItem} */
localNumbers;
/** @type {BillingItem} */
tollFreeNumbers;
/** @type {BillingItem} */
inboundVoiceCalls;
/** @type {BillingItem} */
outboundVoiceCalls;
/** @type {BillingItem} */
inboundFaxes;
/** @type {BillingItem} */
outboundFaxes;
/** @type {BillingItem} */
inboundSmsMessages;
/** @type {BillingItem} */
outboundSmsMessages;
/** @type {BillingItem} */
aiInsights;
/** @type {BillingItem} */
aiLiveMinutes;
}
export class AccountInfo extends EntityInfo {
/** @param {{name?:string,parentAccountId?:string,twilioAccountSid?:string,ancestorIds?:string[],maxPhoneNumbers?:number,isBYOA?:boolean,trustHubProfileSid?:string,logoId?:string,logoUri?:string,billingSettings?:BillingSettings,id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {string}
* @description The name of this account */
name;
/**
* @type {string}
* @description The ID of this account's parent */
parentAccountId;
/**
* @type {string}
* @description The twilio account SID */
twilioAccountSid;
/**
* @type {string[]}
* @description The ancestors of this account. Useful for breadcrumbs */
ancestorIds;
/**
* @type {number}
* @description The max number of phone numbers this account can have */
maxPhoneNumbers;
/**
* @type {boolean}
* @description This account is BYOA */
isBYOA;
/**
* @type {string}
* @description TrustHub Profile Sid */
trustHubProfileSid;
/**
* @type {string}
* @description The ID of the logo file */
logoId;
/**
* @type {string}
* @description The URI of the logo file */
logoUri;
/**
* @type {BillingSettings}
* @description The billing settings for this account */
billingSettings;
}
/** @typedef T {any} */
export class ListResponse {
/** @param {{items?:AccountInfo[],totalCount?:number,totalPages?:number,hasMorePages?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {AccountInfo[]}
* @description The items */
items;
/**
* @type {number}
* @description The total number of items */
totalCount;
/**
* @type {number}
* @description The total number of pages */
totalPages;
/**
* @type {boolean}
* @description Are there more pages of items? Used with simplified paging */
hasMorePages;
}
JavaScript ListLogEntries DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/ListLogEntries HTTP/1.1
Host: team.evovoice.io
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"accountIds":["String"],"customerIds":["String"],"startDate":"String","endDate":"String","description":"String","page":0,"all":false,"countPerPage":0,"specificIds":["String"],"sortField":"String","sortOrder":"Ascend","simplifiedPaging":false}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"items":[{"accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"userName":"String","description":"String","id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}],"totalCount":0,"totalPages":0,"hasMorePages":false}