Evo Voice

<back to all web services

AppGetFlows

Requires Authentication
The following routes are available for this service:
GET/portal/flows
"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;
}
/** @typedef {'UI'|'Reference'|'PhoneNumberRouting'|'UserDialOut'|'FaxNumberRouting'} */
export var FlowRoles;
(function (FlowRoles) {
    FlowRoles["UI"] = "UI"
    FlowRoles["Reference"] = "Reference"
    FlowRoles["PhoneNumberRouting"] = "PhoneNumberRouting"
    FlowRoles["UserDialOut"] = "UserDialOut"
    FlowRoles["FaxNumberRouting"] = "FaxNumberRouting"
})(FlowRoles || (FlowRoles = {}));
export class CustomerBreadcrumb {
    /** @param {{id?:string,name?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
}
/** @typedef {'General'|'Voice'|'Logic'|'DateAndTime'|'Audio'|'Messaging'|'Assistant'|'Flows'|'Fax'|'Network'|'Cookies'|'CallCenter'|'Intelligence'} */
export var FlowNodeCategories;
(function (FlowNodeCategories) {
    FlowNodeCategories["General"] = "General"
    FlowNodeCategories["Voice"] = "Voice"
    FlowNodeCategories["Logic"] = "Logic"
    FlowNodeCategories["DateAndTime"] = "DateAndTime"
    FlowNodeCategories["Audio"] = "Audio"
    FlowNodeCategories["Messaging"] = "Messaging"
    FlowNodeCategories["Assistant"] = "Assistant"
    FlowNodeCategories["Flows"] = "Flows"
    FlowNodeCategories["Fax"] = "Fax"
    FlowNodeCategories["Network"] = "Network"
    FlowNodeCategories["Cookies"] = "Cookies"
    FlowNodeCategories["CallCenter"] = "CallCenter"
    FlowNodeCategories["Intelligence"] = "Intelligence"
})(FlowNodeCategories || (FlowNodeCategories = {}));
/** @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 {'Voice'|'Chat'|'Fax'} */
export var FlowChannels;
(function (FlowChannels) {
    FlowChannels["Voice"] = "Voice"
    FlowChannels["Chat"] = "Chat"
    FlowChannels["Fax"] = "Fax"
})(FlowChannels || (FlowChannels = {}));
export class FlowNodeSpec {
    /** @param {{name?:string,description?:string,iconClass?:string,typeName?:string,category?:FlowNodeCategories,url?:string,dataType?:DataType,documentationUrl?:string,restrictToChannels?:FlowChannels[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The name of this node */
    name;
    /**
     * @type {string}
     * @description A description of this node */
    description;
    /**
     * @type {string}
     * @description Icon class for this node (FontAwesome) */
    iconClass;
    /**
     * @type {string}
     * @description The type name for this node */
    typeName;
    /**
     * @type {FlowNodeCategories}
     * @description The category this node should be grouped under */
    category;
    /**
     * @type {string}
     * @description The URL where this node is located */
    url;
    /**
     * @type {DataType}
     * @description The data type for this node */
    dataType;
    /**
     * @type {string}
     * @description URL for documentation for this node */
    documentationUrl;
    /**
     * @type {FlowChannels[]}
     * @description The channels that this node is restricted to */
    restrictToChannels;
}
export class FlowNodeUI {
    /** @param {{x?:number,y?:number,notes?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description The X position of the node */
    x;
    /**
     * @type {number}
     * @description The Y position of the node */
    y;
    /**
     * @type {string}
     * @description Notes for this node */
    notes;
}
/** @typedef {'Value'|'Flow'|'System'|'Customer'|'Session'|'Endpoint'|'Expression'|'User'} */
export var ValueSources;
(function (ValueSources) {
    ValueSources["Value"] = "Value"
    ValueSources["Flow"] = "Flow"
    ValueSources["System"] = "System"
    ValueSources["Customer"] = "Customer"
    ValueSources["Session"] = "Session"
    ValueSources["Endpoint"] = "Endpoint"
    ValueSources["Expression"] = "Expression"
    ValueSources["User"] = "User"
})(ValueSources || (ValueSources = {}));
export class NodeParameter {
    /** @param {{id?:string,type?:ValueTypes,source?:ValueSources,isAsync?:boolean,referenceId?:string,value?:Value,noEvalTemplate?:boolean,listParameters?:NodeParameterMap[],structParameters?:NodeParameterMap,isOutput?:boolean,expression?:string,listType?:DataType}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {ValueTypes} */
    type;
    /** @type {ValueSources} */
    source;
    /** @type {boolean} */
    isAsync;
    /** @type {string} */
    referenceId;
    /** @type {Value} */
    value;
    /** @type {boolean} */
    noEvalTemplate;
    /** @type {NodeParameterMap[]} */
    listParameters;
    /** @type {NodeParameterMap} */
    structParameters;
    /** @type {boolean} */
    isOutput;
    /** @type {string} */
    expression;
    /** @type {DataType} */
    listType;
}
export class NodeParameterMap extends Dictionary {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class FlowNode {
    /** @param {{id?:string,isStartNode?:boolean,name?:string,spec?:FlowNodeSpec,ui?:FlowNodeUI,parameters?:NodeParameterMap}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The ID of this node. Must be unique within the flow but can be anything */
    id;
    /**
     * @type {boolean}
     * @description Is this the starting node for the flow. Only one node can have this set */
    isStartNode;
    /**
     * @type {string}
     * @description The name of the node, descriptive to be used as a reminder in the GUI */
    name;
    /**
     * @type {FlowNodeSpec}
     * @description The specification for the node */
    spec;
    /**
     * @type {FlowNodeUI}
     * @description The UI data for the node */
    ui;
    /**
     * @type {NodeParameterMap}
     * @description The data for this node. These will be POST'd to the endpoint when it is called. */
    parameters;
}
export class FlowParameter extends DataField {
    /** @param {{isPublic?:boolean,isKnob?:boolean,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) { super(init); Object.assign(this, init) }
    /** @type {boolean} */
    isPublic;
    /** @type {boolean} */
    isKnob;
}
export class FlowExit {
    /** @param {{id?:string,name?:string,ui?:FlowNodeUI}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description The unique ID for this exit */
    id;
    /**
     * @type {string}
     * @description The name of this exit */
    name;
    /**
     * @type {FlowNodeUI}
     * @description The UI for the exit */
    ui;
}
export class FlowUI {
    /** @param {{selectedNode?:string,canvasX?:number,canvasY?:number,canvasZoom?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    selectedNode;
    /** @type {number} */
    canvasX;
    /** @type {number} */
    canvasY;
    /** @type {number} */
    canvasZoom;
}
/** @typedef {'Magenta'|'Red'|'Volcano'|'Orange'|'Gold'|'Lime'|'Green'|'Cyan'|'Blue'|'GeekBlue'|'Purple'} */
export var TagColors;
(function (TagColors) {
    TagColors["Magenta"] = "Magenta"
    TagColors["Red"] = "Red"
    TagColors["Volcano"] = "Volcano"
    TagColors["Orange"] = "Orange"
    TagColors["Gold"] = "Gold"
    TagColors["Lime"] = "Lime"
    TagColors["Green"] = "Green"
    TagColors["Cyan"] = "Cyan"
    TagColors["Blue"] = "Blue"
    TagColors["GeekBlue"] = "GeekBlue"
    TagColors["Purple"] = "Purple"
})(TagColors || (TagColors = {}));
export class Tag {
    /** @param {{id?:string,name?:string,color?:TagColors}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {TagColors} */
    color;
}
export class FlowInfo extends EntityInfo {
    /** @param {{name?:string,roles?:FlowRoles[],description?:string,notes?:string,accountId?:string,accountName?:string,customerId?:string,customerName?:string,customerBreadcrumb?:CustomerBreadcrumb[],nodes?:FlowNode[],parameters?:FlowParameter[],exits?:FlowExit[],ui?:FlowUI,tags?:Tag[],nodeCount?:number,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 flow */
    name;
    /**
     * @type {FlowRoles[]}
     * @description The roles that this flow has */
    roles;
    /**
     * @type {string}
     * @description What this flow does */
    description;
    /**
     * @type {string}
     * @description Any notes for this flow */
    notes;
    /**
     * @type {string}
     * @description The ID of the account associated with the flow */
    accountId;
    /**
     * @type {string}
     * @description The name of the account associated with the flow */
    accountName;
    /**
     * @type {string}
     * @description The ID of the customer this flow is associated with */
    customerId;
    /**
     * @type {string}
     * @description The name of the customer this flow is associated with */
    customerName;
    /**
     * @type {CustomerBreadcrumb[]}
     * @description The breadcrumb to the flow for this endpoint */
    customerBreadcrumb;
    /**
     * @type {FlowNode[]}
     * @description The nodes in this flow */
    nodes;
    /**
     * @type {FlowParameter[]}
     * @description The flow's parameters */
    parameters;
    /**
     * @type {FlowExit[]}
     * @description The flow's exits */
    exits;
    /**
     * @type {FlowUI}
     * @description The UI data for the flow */
    ui;
    /**
     * @type {Tag[]}
     * @description The list of tags for this flow */
    tags;
    /**
     * @type {number}
     * @description The number of nodes in this flow */
    nodeCount;
}
export class AppGetFlows extends ListRequest {
    /** @param {{accountId?:string,customerId?:string,nameFilter?:string,role?:FlowRoles,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} */
    accountId;
    /** @type {string} */
    customerId;
    /** @type {string} */
    nameFilter;
    /** @type {?FlowRoles} */
    role;
}
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 AppGetFlows DTOs

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

HTTP + CSV

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

GET /portal/flows HTTP/1.1 
Host: team.evovoice.io 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"items":[{"name":"String","roles":["UI"],"description":"String","notes":"String","accountId":"String","accountName":"String","customerId":"String","customerName":"String","customerBreadcrumb":[{"id":"String","name":"String"}],"nodes":[{"id":"String","isStartNode":false,"name":"String","spec":{"name":"String","description":"String","iconClass":"String","typeName":"String","category":"General","url":"String","documentationUrl":"String","restrictToChannels":["Voice"]},"ui":{"x":0,"y":0,"notes":"String"},"parameters":{}}],"parameters":[{"isPublic":false,"isKnob":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"exits":[{"id":"String","name":"String","ui":{"x":0,"y":0,"notes":"String"}}],"ui":{"selectedNode":"String","canvasX":0,"canvasY":0,"canvasZoom":0},"tags":[{"id":"String","name":"String","color":"Magenta"}],"nodeCount":0,"id":"String","dateCreated":"String","dateLastModified":"String","createdBy":"String","lastModifiedBy":"String"}],"totalCount":0,"totalPages":0,"hasMorePages":false}