UNPKG

purecloud-platform-client-v2

Version:

A JavaScript library to interface with the PureCloud Platform API

1,521 lines (1,388 loc) 134 kB
import ApiClient from '../ApiClient.js'; class ArchitectApi { /** * Architect service. * @module purecloud-platform-client-v2/api/ArchitectApi * @version 223.0.0 */ /** * Constructs a new ArchitectApi. * @alias module:purecloud-platform-client-v2/api/ArchitectApi * @class * @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use, * default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified. */ constructor(apiClient) { this.apiClient = apiClient || ApiClient.instance; } /** * Deletes a emergency group by ID * * @param {String} emergencyGroupId Emergency group ID */ deleteArchitectEmergencygroup(emergencyGroupId) { // verify the required parameter 'emergencyGroupId' is set if (emergencyGroupId === undefined || emergencyGroupId === null) { throw 'Missing the required parameter "emergencyGroupId" when calling deleteArchitectEmergencygroup'; } return this.apiClient.callApi( '/api/v2/architect/emergencygroups/{emergencyGroupId}', 'DELETE', { 'emergencyGroupId': emergencyGroupId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a grammar. * * @param {String} grammarId grammar ID */ deleteArchitectGrammar(grammarId) { // verify the required parameter 'grammarId' is set if (grammarId === undefined || grammarId === null) { throw 'Missing the required parameter "grammarId" when calling deleteArchitectGrammar'; } return this.apiClient.callApi( '/api/v2/architect/grammars/{grammarId}', 'DELETE', { 'grammarId': grammarId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete specified grammar language * * @param {String} grammarId Grammar ID * @param {String} languageCode Language */ deleteArchitectGrammarLanguage(grammarId, languageCode) { // verify the required parameter 'grammarId' is set if (grammarId === undefined || grammarId === null) { throw 'Missing the required parameter "grammarId" when calling deleteArchitectGrammarLanguage'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling deleteArchitectGrammarLanguage'; } return this.apiClient.callApi( '/api/v2/architect/grammars/{grammarId}/languages/{languageCode}', 'DELETE', { 'grammarId': grammarId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Clear the DTMF mode file for the grammar language if there is one * * @param {String} grammarId Grammar ID * @param {String} languageCode Language */ deleteArchitectGrammarLanguageFilesDtmf(grammarId, languageCode) { // verify the required parameter 'grammarId' is set if (grammarId === undefined || grammarId === null) { throw 'Missing the required parameter "grammarId" when calling deleteArchitectGrammarLanguageFilesDtmf'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling deleteArchitectGrammarLanguageFilesDtmf'; } return this.apiClient.callApi( '/api/v2/architect/grammars/{grammarId}/languages/{languageCode}/files/dtmf', 'DELETE', { 'grammarId': grammarId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Clear the voice mode file for the grammar language if there is one * * @param {String} grammarId Grammar ID * @param {String} languageCode Language */ deleteArchitectGrammarLanguageFilesVoice(grammarId, languageCode) { // verify the required parameter 'grammarId' is set if (grammarId === undefined || grammarId === null) { throw 'Missing the required parameter "grammarId" when calling deleteArchitectGrammarLanguageFilesVoice'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling deleteArchitectGrammarLanguageFilesVoice'; } return this.apiClient.callApi( '/api/v2/architect/grammars/{grammarId}/languages/{languageCode}/files/voice', 'DELETE', { 'grammarId': grammarId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete an IVR Config. * * @param {String} ivrId IVR id */ deleteArchitectIvr(ivrId) { // verify the required parameter 'ivrId' is set if (ivrId === undefined || ivrId === null) { throw 'Missing the required parameter "ivrId" when calling deleteArchitectIvr'; } return this.apiClient.callApi( '/api/v2/architect/ivrs/{ivrId}', 'DELETE', { 'ivrId': ivrId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete specified user prompt * * @param {String} promptId Prompt ID * @param {Object} opts Optional parameters * @param {Boolean} opts.allResources Whether or not to delete all the prompt resources */ deleteArchitectPrompt(promptId, opts) { opts = opts || {}; // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling deleteArchitectPrompt'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}', 'DELETE', { 'promptId': promptId }, { 'allResources': opts['allResources'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete specified user prompt resource * * @param {String} promptId Prompt ID * @param {String} languageCode Language */ deleteArchitectPromptResource(promptId, languageCode) { // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling deleteArchitectPromptResource'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling deleteArchitectPromptResource'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}/resources/{languageCode}', 'DELETE', { 'promptId': promptId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete specified user prompt resource audio * * @param {String} promptId Prompt ID * @param {String} languageCode Language */ deleteArchitectPromptResourceAudio(promptId, languageCode) { // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling deleteArchitectPromptResourceAudio'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling deleteArchitectPromptResourceAudio'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}/resources/{languageCode}/audio', 'DELETE', { 'promptId': promptId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Batch-delete a list of prompts * Multiple IDs can be specified, in which case all specified prompts will be deleted. Asynchronous. Notification topic: v2.architect.prompts.{promptId} * @param {Array.<String>} id List of Prompt IDs */ deleteArchitectPrompts(id) { // verify the required parameter 'id' is set if (id === undefined || id === null) { throw 'Missing the required parameter "id" when calling deleteArchitectPrompts'; } return this.apiClient.callApi( '/api/v2/architect/prompts', 'DELETE', { }, { 'id': this.apiClient.buildCollectionParam(id, 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a schedule by id * * @param {String} scheduleId Schedule ID */ deleteArchitectSchedule(scheduleId) { // verify the required parameter 'scheduleId' is set if (scheduleId === undefined || scheduleId === null) { throw 'Missing the required parameter "scheduleId" when calling deleteArchitectSchedule'; } return this.apiClient.callApi( '/api/v2/architect/schedules/{scheduleId}', 'DELETE', { 'scheduleId': scheduleId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Deletes a schedule group by ID * * @param {String} scheduleGroupId Schedule group ID */ deleteArchitectSchedulegroup(scheduleGroupId) { // verify the required parameter 'scheduleGroupId' is set if (scheduleGroupId === undefined || scheduleGroupId === null) { throw 'Missing the required parameter "scheduleGroupId" when calling deleteArchitectSchedulegroup'; } return this.apiClient.callApi( '/api/v2/architect/schedulegroups/{scheduleGroupId}', 'DELETE', { 'scheduleGroupId': scheduleGroupId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a system prompt resource override. * * @param {String} promptId Prompt ID * @param {String} languageCode Language */ deleteArchitectSystempromptResource(promptId, languageCode) { // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling deleteArchitectSystempromptResource'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling deleteArchitectSystempromptResource'; } return this.apiClient.callApi( '/api/v2/architect/systemprompts/{promptId}/resources/{languageCode}', 'DELETE', { 'promptId': promptId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete flow * * @param {String} flowId Flow ID */ deleteFlow(flowId) { // verify the required parameter 'flowId' is set if (flowId === undefined || flowId === null) { throw 'Missing the required parameter "flowId" when calling deleteFlow'; } return this.apiClient.callApi( '/api/v2/flows/{flowId}', 'DELETE', { 'flowId': flowId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Deletes a log level for a flow by flow id. * Deletes the associated log level for a flow by flow id * @param {String} flowId The flow id to delete the loglevel for */ deleteFlowInstancesSettingsLoglevels(flowId) { // verify the required parameter 'flowId' is set if (flowId === undefined || flowId === null) { throw 'Missing the required parameter "flowId" when calling deleteFlowInstancesSettingsLoglevels'; } return this.apiClient.callApi( '/api/v2/flows/{flowId}/instances/settings/loglevels', 'DELETE', { 'flowId': flowId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Batch-delete a list of flows * Multiple IDs can be specified, in which case all specified flows will be deleted. Asynchronous. Notification topic: v2.flows.{flowId} * @param {Array.<String>} id List of Flow IDs */ deleteFlows(id) { // verify the required parameter 'id' is set if (id === undefined || id === null) { throw 'Missing the required parameter "id" when calling deleteFlows'; } return this.apiClient.callApi( '/api/v2/flows', 'DELETE', { }, { 'id': this.apiClient.buildCollectionParam(id, 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * deletes a specific datatable by id * Deletes an entire datatable (including the schema and data) with a given datatableId * @param {String} datatableId id of datatable * @param {Object} opts Optional parameters * @param {Boolean} opts.force force delete, even if in use (default to false) */ deleteFlowsDatatable(datatableId, opts) { opts = opts || {}; // verify the required parameter 'datatableId' is set if (datatableId === undefined || datatableId === null) { throw 'Missing the required parameter "datatableId" when calling deleteFlowsDatatable'; } return this.apiClient.callApi( '/api/v2/flows/datatables/{datatableId}', 'DELETE', { 'datatableId': datatableId }, { 'force': opts['force'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a row entry * Deletes a row with a given rowId (the value of the key field). * @param {String} datatableId id of datatable * @param {String} rowId the key for the row */ deleteFlowsDatatableRow(datatableId, rowId) { // verify the required parameter 'datatableId' is set if (datatableId === undefined || datatableId === null) { throw 'Missing the required parameter "datatableId" when calling deleteFlowsDatatableRow'; } // verify the required parameter 'rowId' is set if (rowId === undefined || rowId === null) { throw 'Missing the required parameter "rowId" when calling deleteFlowsDatatableRow'; } return this.apiClient.callApi( '/api/v2/flows/datatables/{datatableId}/rows/{rowId}', 'DELETE', { 'datatableId': datatableId,'rowId': rowId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Resets the org log level to default, base * Resets the org log level to default, base */ deleteFlowsInstancesSettingsLoglevelsDefault() { return this.apiClient.callApi( '/api/v2/flows/instances/settings/loglevels/default', 'DELETE', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a flow milestone. * * @param {String} milestoneId flow milestone ID */ deleteFlowsMilestone(milestoneId) { // verify the required parameter 'milestoneId' is set if (milestoneId === undefined || milestoneId === null) { throw 'Missing the required parameter "milestoneId" when calling deleteFlowsMilestone'; } return this.apiClient.callApi( '/api/v2/flows/milestones/{milestoneId}', 'DELETE', { 'milestoneId': milestoneId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Dependency Tracking objects that have a given display name * * @param {String} name Object name to search for * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {Array.<String>} opts.objectType Object type(s) to search for * @param {Boolean} opts.consumedResources Include resources each result item consumes * @param {Boolean} opts.consumingResources Include resources that consume each result item * @param {Array.<String>} opts.consumedResourceType Types of consumed resources to return, if consumed resources are requested * @param {Array.<String>} opts.consumingResourceType Types of consuming resources to return, if consuming resources are requested */ getArchitectDependencytracking(name, opts) { opts = opts || {}; // verify the required parameter 'name' is set if (name === undefined || name === null) { throw 'Missing the required parameter "name" when calling getArchitectDependencytracking'; } return this.apiClient.callApi( '/api/v2/architect/dependencytracking', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': name,'objectType': this.apiClient.buildCollectionParam(opts['objectType'], 'multi'),'consumedResources': opts['consumedResources'],'consumingResources': opts['consumingResources'],'consumedResourceType': this.apiClient.buildCollectionParam(opts['consumedResourceType'], 'multi'),'consumingResourceType': this.apiClient.buildCollectionParam(opts['consumingResourceType'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Dependency Tracking build status for an organization * */ getArchitectDependencytrackingBuild() { return this.apiClient.callApi( '/api/v2/architect/dependencytracking/build', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get resources that are consumed by a given Dependency Tracking object * * @param {String} id Consuming object ID * @param {String} version Consuming object version * @param {Object} objectType Consuming object type. Only versioned types are allowed here. * @param {Object} opts Optional parameters * @param {Array.<String>} opts.resourceType Types of consumed resources to show * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) */ getArchitectDependencytrackingConsumedresources(id, version, objectType, opts) { opts = opts || {}; // verify the required parameter 'id' is set if (id === undefined || id === null) { throw 'Missing the required parameter "id" when calling getArchitectDependencytrackingConsumedresources'; } // verify the required parameter 'version' is set if (version === undefined || version === null) { throw 'Missing the required parameter "version" when calling getArchitectDependencytrackingConsumedresources'; } // verify the required parameter 'objectType' is set if (objectType === undefined || objectType === null) { throw 'Missing the required parameter "objectType" when calling getArchitectDependencytrackingConsumedresources'; } return this.apiClient.callApi( '/api/v2/architect/dependencytracking/consumedresources', 'GET', { }, { 'id': id,'version': version,'objectType': objectType,'resourceType': this.apiClient.buildCollectionParam(opts['resourceType'], 'multi'),'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get resources that consume a given Dependency Tracking object * * @param {String} id Consumed object ID * @param {Object} objectType Consumed object type * @param {Object} opts Optional parameters * @param {Array.<String>} opts.resourceType Types of consuming resources to show. Only versioned types are allowed here. * @param {String} opts.version Object version * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {Object} opts.flowFilter Show only checkedIn or published flows */ getArchitectDependencytrackingConsumingresources(id, objectType, opts) { opts = opts || {}; // verify the required parameter 'id' is set if (id === undefined || id === null) { throw 'Missing the required parameter "id" when calling getArchitectDependencytrackingConsumingresources'; } // verify the required parameter 'objectType' is set if (objectType === undefined || objectType === null) { throw 'Missing the required parameter "objectType" when calling getArchitectDependencytrackingConsumingresources'; } return this.apiClient.callApi( '/api/v2/architect/dependencytracking/consumingresources', 'GET', { }, { 'id': id,'objectType': objectType,'resourceType': this.apiClient.buildCollectionParam(opts['resourceType'], 'multi'),'version': opts['version'],'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'flowFilter': opts['flowFilter'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Dependency Tracking objects that consume deleted resources * * @param {Object} opts Optional parameters * @param {String} opts.name Name to search for * @param {Array.<String>} opts.objectType Object type(s) to search for * @param {Object} opts.flowFilter Show only checkedIn or published flows * @param {Boolean} opts.consumedResources Return consumed resources? (default to false) * @param {Array.<String>} opts.consumedResourceType Resource type(s) to return * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) */ getArchitectDependencytrackingDeletedresourceconsumers(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/dependencytracking/deletedresourceconsumers', 'GET', { }, { 'name': opts['name'],'objectType': this.apiClient.buildCollectionParam(opts['objectType'], 'multi'),'flowFilter': opts['flowFilter'],'consumedResources': opts['consumedResources'],'consumedResourceType': this.apiClient.buildCollectionParam(opts['consumedResourceType'], 'multi'),'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a Dependency Tracking object * * @param {String} id Object ID * @param {Object} opts Optional parameters * @param {String} opts.version Object version * @param {Object} opts.objectType Object type * @param {Boolean} opts.consumedResources Include resources this item consumes * @param {Boolean} opts.consumingResources Include resources that consume this item * @param {Array.<String>} opts.consumedResourceType Types of consumed resources to return, if consumed resources are requested * @param {Array.<String>} opts.consumingResourceType Types of consuming resources to return, if consuming resources are requested * @param {Boolean} opts.consumedResourceRequest Indicate that this is going to look up a consumed resource object */ getArchitectDependencytrackingObject(id, opts) { opts = opts || {}; // verify the required parameter 'id' is set if (id === undefined || id === null) { throw 'Missing the required parameter "id" when calling getArchitectDependencytrackingObject'; } return this.apiClient.callApi( '/api/v2/architect/dependencytracking/object', 'GET', { }, { 'id': id,'version': opts['version'],'objectType': opts['objectType'],'consumedResources': opts['consumedResources'],'consumingResources': opts['consumingResources'],'consumedResourceType': this.apiClient.buildCollectionParam(opts['consumedResourceType'], 'multi'),'consumingResourceType': this.apiClient.buildCollectionParam(opts['consumingResourceType'], 'multi'),'consumedResourceRequest': opts['consumedResourceRequest'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a Dependency Tracking type. * * @param {String} typeId Type ID */ getArchitectDependencytrackingType(typeId) { // verify the required parameter 'typeId' is set if (typeId === undefined || typeId === null) { throw 'Missing the required parameter "typeId" when calling getArchitectDependencytrackingType'; } return this.apiClient.callApi( '/api/v2/architect/dependencytracking/types/{typeId}', 'GET', { 'typeId': typeId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Dependency Tracking types. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) */ getArchitectDependencytrackingTypes(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/dependencytracking/types', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Dependency Tracking objects that depend on updated resources * * @param {Object} opts Optional parameters * @param {String} opts.name Name to search for * @param {Array.<String>} opts.objectType Object type(s) to search for * @param {Boolean} opts.consumedResources Return consumed resources? (default to false) * @param {Array.<String>} opts.consumedResourceType Resource type(s) to return * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) */ getArchitectDependencytrackingUpdatedresourceconsumers(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/dependencytracking/updatedresourceconsumers', 'GET', { }, { 'name': opts['name'],'objectType': this.apiClient.buildCollectionParam(opts['objectType'], 'multi'),'consumedResources': opts['consumedResources'],'consumedResourceType': this.apiClient.buildCollectionParam(opts['consumedResourceType'], 'multi'),'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Gets a emergency group by ID * * @param {String} emergencyGroupId Emergency group ID */ getArchitectEmergencygroup(emergencyGroupId) { // verify the required parameter 'emergencyGroupId' is set if (emergencyGroupId === undefined || emergencyGroupId === null) { throw 'Missing the required parameter "emergencyGroupId" when calling getArchitectEmergencygroup'; } return this.apiClient.callApi( '/api/v2/architect/emergencygroups/{emergencyGroupId}', 'GET', { 'emergencyGroupId': emergencyGroupId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a list of emergency groups. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {String} opts.name Name of the Emergency Group to filter by. */ getArchitectEmergencygroups(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/emergencygroups', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'name': opts['name'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of basic emergency group objects filterable by query parameters. * This returns emergency groups consisting of name and division. If one or more IDs are specified, the search will fetch flow outcomes that match the given ID(s) and not use any additional supplied query parameters in the search. * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {Array.<String>} opts.id ID of the Emergency Groups to filter by. * @param {String} opts.name Name of the Emergency Group to filter by. * @param {Array.<String>} opts.divisionId List of divisionIds on which to filter. */ getArchitectEmergencygroupsDivisionviews(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/emergencygroups/divisionviews', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'name': opts['name'],'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a grammar * Returns a specified grammar * @param {String} grammarId grammar ID * @param {Object} opts Optional parameters * @param {Boolean} opts.includeFileUrls Include grammar language file URLs */ getArchitectGrammar(grammarId, opts) { opts = opts || {}; // verify the required parameter 'grammarId' is set if (grammarId === undefined || grammarId === null) { throw 'Missing the required parameter "grammarId" when calling getArchitectGrammar'; } return this.apiClient.callApi( '/api/v2/architect/grammars/{grammarId}', 'GET', { 'grammarId': grammarId }, { 'includeFileUrls': opts['includeFileUrls'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a grammar language. * * @param {String} grammarId Grammar ID * @param {String} languageCode Language */ getArchitectGrammarLanguage(grammarId, languageCode) { // verify the required parameter 'grammarId' is set if (grammarId === undefined || grammarId === null) { throw 'Missing the required parameter "grammarId" when calling getArchitectGrammarLanguage'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling getArchitectGrammarLanguage'; } return this.apiClient.callApi( '/api/v2/architect/grammars/{grammarId}/languages/{languageCode}', 'GET', { 'grammarId': grammarId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of grammars, filtered by query parameters * Multiple IDs can be specified, in which case all matching grammars will be returned, and no other parameters will be evaluated. * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {Object} opts.sortBy Sort by (default to id) * @param {Object} opts.sortOrder Sort order (default to asc) * @param {Array.<String>} opts.id ID * @param {String} opts.name Name * @param {String} opts.description Description * @param {String} opts.nameOrDescription Name or description * @param {Boolean} opts.includeFileUrls Include grammar language file URLs */ getArchitectGrammars(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/grammars', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'name': opts['name'],'description': opts['description'],'nameOrDescription': opts['nameOrDescription'],'includeFileUrls': opts['includeFileUrls'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get an IVR config. * * @param {String} ivrId IVR id */ getArchitectIvr(ivrId) { // verify the required parameter 'ivrId' is set if (ivrId === undefined || ivrId === null) { throw 'Missing the required parameter "ivrId" when calling getArchitectIvr'; } return this.apiClient.callApi( '/api/v2/architect/ivrs/{ivrId}', 'GET', { 'ivrId': ivrId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get an IVR IdentityResolutionConfig. * * @param {String} ivrId IVR id */ getArchitectIvrIdentityresolution(ivrId) { // verify the required parameter 'ivrId' is set if (ivrId === undefined || ivrId === null) { throw 'Missing the required parameter "ivrId" when calling getArchitectIvrIdentityresolution'; } return this.apiClient.callApi( '/api/v2/architect/ivrs/{ivrId}/identityresolution', 'GET', { 'ivrId': ivrId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get IVR configs. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {String} opts.name Name of the IVR to filter by. * @param {String} opts.dnis The phone number of the IVR to filter by. * @param {String} opts.scheduleGroup The Schedule Group of the IVR to filter by. * @param {Array.<String>} opts.expand Which fields, if any, to expand */ getArchitectIvrs(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/ivrs', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'name': opts['name'],'dnis': opts['dnis'],'scheduleGroup': opts['scheduleGroup'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of basic ivr configuration information objects filterable by query parameters. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {Array.<String>} opts.id ID of the IVR to filter by. * @param {String} opts.name Name of the IVR to filter by. * @param {Array.<String>} opts.divisionId List of divisionIds on which to filter. */ getArchitectIvrsDivisionviews(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/ivrs/divisionviews', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'name': opts['name'],'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get specified user prompt * * @param {String} promptId Prompt ID * @param {Object} opts Optional parameters * @param {Boolean} opts.includeMediaUris Include the media URIs for each resource (default to true) * @param {Boolean} opts.includeResources Include the resources for each system prompt (default to true) * @param {Array.<String>} opts.language Filter the resources down to the provided languages */ getArchitectPrompt(promptId, opts) { opts = opts || {}; // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling getArchitectPrompt'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}', 'GET', { 'promptId': promptId }, { 'includeMediaUris': opts['includeMediaUris'],'includeResources': opts['includeResources'],'language': this.apiClient.buildCollectionParam(opts['language'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get generated prompt history * * @param {String} promptId Prompt ID * @param {String} historyId History request ID * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortOrder Sort order (default to desc) * @param {Object} opts.sortBy Sort by (default to timestamp) * @param {Array.<String>} opts.action Flow actions to include (omit to include all) */ getArchitectPromptHistoryHistoryId(promptId, historyId, opts) { opts = opts || {}; // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling getArchitectPromptHistoryHistoryId'; } // verify the required parameter 'historyId' is set if (historyId === undefined || historyId === null) { throw 'Missing the required parameter "historyId" when calling getArchitectPromptHistoryHistoryId'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}/history/{historyId}', 'GET', { 'promptId': promptId,'historyId': historyId }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'sortBy': opts['sortBy'],'action': this.apiClient.buildCollectionParam(opts['action'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get specified user prompt resource * * @param {String} promptId Prompt ID * @param {String} languageCode Language */ getArchitectPromptResource(promptId, languageCode) { // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling getArchitectPromptResource'; } // verify the required parameter 'languageCode' is set if (languageCode === undefined || languageCode === null) { throw 'Missing the required parameter "languageCode" when calling getArchitectPromptResource'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}/resources/{languageCode}', 'GET', { 'promptId': promptId,'languageCode': languageCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of user prompt resources * The returned list is pageable, and query parameters can be used for filtering. * @param {String} promptId Prompt ID * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) */ getArchitectPromptResources(promptId, opts) { opts = opts || {}; // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling getArchitectPromptResources'; } return this.apiClient.callApi( '/api/v2/architect/prompts/{promptId}/resources', 'GET', { 'promptId': promptId }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of user prompts * The returned list is pageable, and query parameters can be used for filtering. Multiple names can be specified, in which case all matching prompts will be returned, and no other filters will be evaluated. * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {Array.<String>} opts.name Name * @param {String} opts.description Description * @param {String} opts.nameOrDescription Name or description * @param {String} opts.sortBy Sort by (default to id) * @param {String} opts.sortOrder Sort order (default to asc) * @param {Boolean} opts.includeMediaUris Include the media URIs for each resource (default to true) * @param {Boolean} opts.includeResources Include the resources for each system prompt (default to true) * @param {Array.<String>} opts.language Filter the resources down to the provided languages */ getArchitectPrompts(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/prompts', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': this.apiClient.buildCollectionParam(opts['name'], 'multi'),'description': opts['description'],'nameOrDescription': opts['nameOrDescription'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'includeMediaUris': opts['includeMediaUris'],'includeResources': opts['includeResources'],'language': this.apiClient.buildCollectionParam(opts['language'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a schedule by ID * * @param {String} scheduleId Schedule ID */ getArchitectSchedule(scheduleId) { // verify the required parameter 'scheduleId' is set if (scheduleId === undefined || scheduleId === null) { throw 'Missing the required parameter "scheduleId" when calling getArchitectSchedule'; } return this.apiClient.callApi( '/api/v2/architect/schedules/{scheduleId}', 'GET', { 'scheduleId': scheduleId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Gets a schedule group by ID * * @param {String} scheduleGroupId Schedule group ID */ getArchitectSchedulegroup(scheduleGroupId) { // verify the required parameter 'scheduleGroupId' is set if (scheduleGroupId === undefined || scheduleGroupId === null) { throw 'Missing the required parameter "scheduleGroupId" when calling getArchitectSchedulegroup'; } return this.apiClient.callApi( '/api/v2/architect/schedulegroups/{scheduleGroupId}', 'GET', { 'scheduleGroupId': scheduleGroupId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a list of schedule groups. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {String} opts.name Name of the Schedule Group to filter by. * @param {String} opts.scheduleIds A comma-delimited list of Schedule IDs to filter by. * @param {Array.<String>} opts.divisionId List of divisionIds on which to filter. */ getArchitectSchedulegroups(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/schedulegroups', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'name': opts['name'],'scheduleIds': opts['scheduleIds'],'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of basic schedule group configuration information objects filterable by query parameters. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {Array.<String>} opts.id ID of the schedule group to filter by. * @param {String} opts.name Name of the schedule group to filter by. * @param {Array.<String>} opts.divisionId List of divisionIds on which to filter. */ getArchitectSchedulegroupsDivisionviews(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/schedulegroups/divisionviews', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'name': opts['name'],'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a list of schedules. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to asc) * @param {String} opts.name Name of the Schedule to filter by. * @param {Array.<String>} opts.divisionId List of divisionIds on which to filter. */ getArchitectSchedules(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/schedules', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'name': opts['name'],'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a pageable list of basic schedule configuration information objects filterable by query parameters. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortBy Sort by (default to name) * @param {String} opts.sortOrder Sort order (default to ASC) * @param {Array.<String>} opts.id ID of the schedule group to filter by. * @param {String} opts.name Name of the schedule group to filter by. * @param {Array.<String>} opts.divisionId List of divisionIds on which to filter. */ getArchitectSchedulesDivisionviews(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/architect/schedules/divisionviews', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'name': opts['name'],'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a system prompt * * @param {String} promptId promptId * @param {Object} opts Optional parameters * @param {Boolean} opts.includeMediaUris Include the media URIs for each resource (default to true) * @param {Boolean} opts.includeResources Include the resources for each system prompt (default to true) * @param {Array.<String>} opts.language Filter the resources down to the provided languages */ getArchitectSystemprompt(promptId, opts) { opts = opts || {}; // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling getArchitectSystemprompt'; } return this.apiClient.callApi( '/api/v2/architect/systemprompts/{promptId}', 'GET', { 'promptId': promptId }, { 'includeMediaUris': opts['includeMediaUris'],'includeResources': opts['includeResources'],'language': this.apiClient.buildCollectionParam(opts['language'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get generated prompt history * * @param {String} promptId promptId * @param {String} historyId History request ID * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {String} opts.sortOrder Sort order (default to desc) * @param {Object} opts.sortBy Sort by (default to timestamp) * @param {Array.<String>} opts.action Flow actions to include (omit to include all) */ getArchitectSystempromptHistoryHistoryId(promptId, historyId, opts) { opts = opts || {}; // verify the required parameter 'promptId' is set if (promptId === undefined || promptId === null) { throw 'Missing the required parameter "promptId" when calling getArchitectSystempromptHistoryHistoryId'; } // verify the required parameter 'historyId' is set if (historyId === undefined || historyId === null) { throw 'Missing the required parameter "historyId" when calling getArchitectSystempromptHistoryHistoryId'; } return this.apiClient.callApi( '/api/v2/architect/systemprompts/{promptId}/history/{historyId}', 'GET', { 'promptId': promptId,'historyId': historyId }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'sortBy': opts['sortBy'],'action': this.apiClient.buildCollectionParam(opts['action'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] )