Evo Voice

<back to all web services

ListIntegrations

Retrieve integrations

The following routes are available for this service:
GET/integrations
"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;
}
/** @typedef {'HostedSuite'|'OfficeRnd'|'Zoho'} */
export var IntegrationTypes;
(function (IntegrationTypes) {
    IntegrationTypes["HostedSuite"] = "HostedSuite"
    IntegrationTypes["OfficeRnd"] = "OfficeRnd"
    IntegrationTypes["Zoho"] = "Zoho"
})(IntegrationTypes || (IntegrationTypes = {}));
/** @typedef {'NotConfigured'|'Error'|'OK'} */
export var IntegrationStatuses;
(function (IntegrationStatuses) {
    IntegrationStatuses["NotConfigured"] = "NotConfigured"
    IntegrationStatuses["Error"] = "Error"
    IntegrationStatuses["OK"] = "OK"
})(IntegrationStatuses || (IntegrationStatuses = {}));
/** @typedef {'NotSpecified'|'String'|'Boolean'|'Number'|'List'|'Struct'|'Transition'|'Custom'|'Date'|'AudioFile'|'TimeZoneId'|'PhoneNumber'|'User'|'Endpoint'|'Time'|'File'|'FaxNumber'|'EmailAccount'|'Customer'|'Flow'|'Team'|'FlowReference'|'Integration'|'Assistant'} */
export var ValueTypes;
(function (ValueTypes) {
    ValueTypes["NotSpecified"] = "NotSpecified"
    ValueTypes["String"] = "String"
    ValueTypes["Boolean"] = "Boolean"
    ValueTypes["Number"] = "Number"
    ValueTypes["List"] = "List"
    ValueTypes["Struct"] = "Struct"
    ValueTypes["Transition"] = "Transition"
    ValueTypes["Custom"] = "Custom"
    ValueTypes["Date"] = "Date"
    ValueTypes["AudioFile"] = "AudioFile"
    ValueTypes["TimeZoneId"] = "TimeZoneId"
    ValueTypes["PhoneNumber"] = "PhoneNumber"
    ValueTypes["User"] = "User"
    ValueTypes["Endpoint"] = "Endpoint"
    ValueTypes["Time"] = "Time"
    ValueTypes["File"] = "File"
    ValueTypes["FaxNumber"] = "FaxNumber"
    ValueTypes["EmailAccount"] = "EmailAccount"
    ValueTypes["Customer"] = "Customer"
    ValueTypes["Flow"] = "Flow"
    ValueTypes["Team"] = "Team"
    ValueTypes["FlowReference"] = "FlowReference"
    ValueTypes["Integration"] = "Integration"
    ValueTypes["Assistant"] = "Assistant"
})(ValueTypes || (ValueTypes = {}));
/** @typedef {'None'|'LargeText'|'InlineForm'|'Password'|'InlineStruct'} */
export var UIHints;
(function (UIHints) {
    UIHints["None"] = "None"
    UIHints["LargeText"] = "LargeText"
    UIHints["InlineForm"] = "InlineForm"
    UIHints["Password"] = "Password"
    UIHints["InlineStruct"] = "InlineStruct"
})(UIHints || (UIHints = {}));
class Dictionary {}
export class Struct extends Dictionary {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class Value {
    /** @param {{boolValue?:boolean,stringValue?:string,numberValue?:number,listValue?:Struct[],structValue?:Struct}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?boolean} */
    boolValue;
    /** @type {string} */
    stringValue;
    /** @type {?number} */
    numberValue;
    /** @type {Struct[]} */
    listValue;
    /** @type {Struct} */
    structValue;
}
/** @typedef {'NotUnique'|'Unique'|'UniqueToCustomer'} */
export var DataFieldUniqueness;
(function (DataFieldUniqueness) {
    DataFieldUniqueness["NotUnique"] = "NotUnique"
    DataFieldUniqueness["Unique"] = "Unique"
    DataFieldUniqueness["UniqueToCustomer"] = "UniqueToCustomer"
})(DataFieldUniqueness || (DataFieldUniqueness = {}));
/** @typedef {'Hidden'|'ReadOnly'|'ReadWrite'} */
export var UserDataFieldModes;
(function (UserDataFieldModes) {
    UserDataFieldModes["Hidden"] = "Hidden"
    UserDataFieldModes["ReadOnly"] = "ReadOnly"
    UserDataFieldModes["ReadWrite"] = "ReadWrite"
})(UserDataFieldModes || (UserDataFieldModes = {}));
export class DataField {
    /** @param {{id?:string,name?:string,type?:ValueTypes,uiHint?:UIHints,uiTab?:string,isAsync?:boolean,disableBinding?:boolean,structType?:DataType,listType?:DataType,description?:string,possibleValues?:string[],isOutput?:boolean,customFieldValuesUrl?:string,defaultValue?:Value,transitionNameFormat?:string,uniqueness?:DataFieldUniqueness,voiceOnly?:boolean,conditionalVisibilityField?:string,conditionalVisibilityValue?:string,noEvalTemplate?:boolean,userMode?:UserDataFieldModes,anyValueType?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {ValueTypes} */
    type;
    /** @type {UIHints} */
    uiHint;
    /** @type {string} */
    uiTab;
    /** @type {boolean} */
    isAsync;
    /** @type {boolean} */
    disableBinding;
    /** @type {DataType} */
    structType;
    /** @type {DataType} */
    listType;
    /** @type {string} */
    description;
    /** @type {string[]} */
    possibleValues;
    /** @type {boolean} */
    isOutput;
    /** @type {string} */
    customFieldValuesUrl;
    /** @type {Value} */
    defaultValue;
    /** @type {string} */
    transitionNameFormat;
    /** @type {DataFieldUniqueness} */
    uniqueness;
    /** @type {boolean} */
    voiceOnly;
    /** @type {string} */
    conditionalVisibilityField;
    /** @type {string} */
    conditionalVisibilityValue;
    /** @type {boolean} */
    noEvalTemplate;
    /** @type {UserDataFieldModes} */
    userMode;
    /** @type {boolean} */
    anyValueType;
}
export class DataType {
    /** @param {{typeName?:string,fields?:DataField[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    typeName;
    /** @type {DataField[]} */
    fields;
}
/** @typedef {'CrmSync'|'OAuth2'} */
export var IntegrationFeatures;
(function (IntegrationFeatures) {
    IntegrationFeatures["CrmSync"] = "CrmSync"
    IntegrationFeatures["OAuth2"] = "OAuth2"
})(IntegrationFeatures || (IntegrationFeatures = {}));
export class IntegrationInfo extends EntityInfo {
    /** @param {{accountId?:string,customerId?:string,customerName?:string,dateLastSync?:string,customerBreadcrumb?:CustomerBreadcrumb[],name?:string,automaticallyCreateCustomers?:boolean,type?:IntegrationTypes,status?:IntegrationStatuses,statusMessage?:string,settingsDataType?:DataType,settings?:Struct,features?:IntegrationFeatures[],isAuthorized?:boolean,id?:string,dateCreated?:string,dateLastModified?:string,createdBy?:string,lastModifiedBy?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /**
     * @type {string}
     * @description The ID of the account associated with this integration */
    accountId;
    /**
     * @type {string}
     * @description The ID of the customer this integration is associated with */
    customerId;
    /**
     * @type {string}
     * @description The name of the customer this integration is associated with */
    customerName;
    /**
     * @type {string}
     * @description The date the integration was sync'd last */
    dateLastSync;
    /**
     * @type {CustomerBreadcrumb[]}
     * @description The breadcrumb to the customer for this integration */
    customerBreadcrumb;
    /**
     * @type {string}
     * @description The name of the integration (e.g. HostedSuite Dallas) */
    name;
    /**
     * @type {boolean}
     * @description Automatically create new customers / users when sync'ing with CRM? */
    automaticallyCreateCustomers;
    /**
     * @type {IntegrationTypes}
     * @description The type of integration */
    type;
    /**
     * @type {IntegrationStatuses}
     * @description The status of the integration */
    status;
    /**
     * @type {string}
     * @description The status of the integration */
    statusMessage;
    /**
     * @type {DataType}
     * @description The settings type for this integration */
    settingsDataType;
    /**
     * @type {Struct}
     * @description The settings for this integration */
    settings;
    /**
     * @type {IntegrationFeatures[]}
     * @description The features supported by this integration */
    features;
    /**
     * @type {boolean}
     * @description Is this integration authorized (OAuth)? */
    isAuthorized;
}
export class ListIntegrations extends ListRequest {
    /** @param {{accountIds?:string[],nameFilter?:string,customerIds?:string[],shallowParent?:boolean,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 Filter by accounts */
    accountIds;
    /**
     * @type {string}
     * @description Filter by name */
    nameFilter;
    /**
     * @type {string[]}
     * @description The IDs of the parent customers you want to filter by */
    customerIds;
    /**
     * @type {boolean}
     * @description If you want a shall customer integration filter (e.g. no deep children) */
    shallowParent;
}
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 ListIntegrations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /integrations HTTP/1.1 
Host: team.evovoice.io 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	items: 
	[
		{
			accountId: String,
			customerId: String,
			customerName: String,
			dateLastSync: String,
			customerBreadcrumb: 
			[
				{
					id: String,
					name: String
				}
			],
			name: String,
			automaticallyCreateCustomers: False,
			type: HostedSuite,
			status: NotConfigured,
			statusMessage: String,
			features: 
			[
				CrmSync
			],
			isAuthorized: False,
			id: String,
			dateCreated: String,
			dateLastModified: String,
			createdBy: String,
			lastModifiedBy: String
		}
	],
	totalCount: 0,
	totalPages: 0,
	hasMorePages: False
}