diff --git a/CHANGES.md b/CHANGES.md index 28536e615b..d4ba258544 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,29 @@ twilio-node changelog ===================== +[2021-05-19] Version 3.63.0 +--------------------------- +**Library - Chore** +- [PR #673](https://github.com/twilio/twilio-node/pull/673): resolves jsdoc / underscore security vulnerability. Thanks to [@thinkingserious](https://github.com/thinkingserious)! + +**Events** +- add query param to return types filtered by Schema Id +- Add query param to return sinks filtered by status +- Add query param to return sinks used/not used by a subscription + +**Messaging** +- Add fetch and delete instance endpoints to us_app_to_person api **(breaking change)** +- Remove delete list endpoint from us_app_to_person api **(breaking change)** +- Update read list endpoint to return a list of us_app_to_person compliance objects **(breaking change)** +- Add `sid` field to Preregistered US App To Person response + +**Supersim** +- Mark `unique_name` in Sim, Fleet, NAP resources as not PII + +**Video** +- [Composer] GA maturity level + + [2021-05-05] Version 3.62.0 --------------------------- **Library - Chore** diff --git a/lib/rest/events/v1/eventType.d.ts b/lib/rest/events/v1/eventType.d.ts index d2f9763648..a670cc5112 100644 --- a/lib/rest/events/v1/eventType.d.ts +++ b/lib/rest/events/v1/eventType.d.ts @@ -150,12 +150,14 @@ interface EventTypeListInstance { * If no pageSize is defined but a limit is defined, * each() will attempt to read the limit with the most efficient * page size, i.e. min(limit, 1000) + * @property schemaId - A string to filter Event Types by schema. */ interface EventTypeListInstanceEachOptions { callback?: (item: EventTypeInstance, done: (err?: Error) => void) => void; done?: Function; limit?: number; pageSize?: number; + schemaId?: string; } /** @@ -171,10 +173,12 @@ interface EventTypeListInstanceEachOptions { * If no page_size is defined but a limit is defined, * list() will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) + * @property schemaId - A string to filter Event Types by schema. */ interface EventTypeListInstanceOptions { limit?: number; pageSize?: number; + schemaId?: string; } /** @@ -183,11 +187,13 @@ interface EventTypeListInstanceOptions { * @property pageNumber - Page Number, this value is simply for client state * @property pageSize - Number of records to return, defaults to 50 * @property pageToken - PageToken provided by the API + * @property schemaId - A string to filter Event Types by schema. */ interface EventTypeListInstancePageOptions { pageNumber?: number; pageSize?: number; pageToken?: string; + schemaId?: string; } interface EventTypePayload extends EventTypeResource, Page.TwilioResponsePayload { diff --git a/lib/rest/events/v1/eventType.js b/lib/rest/events/v1/eventType.js index a6a4aab41f..c41374b07b 100644 --- a/lib/rest/events/v1/eventType.js +++ b/lib/rest/events/v1/eventType.js @@ -70,6 +70,7 @@ EventTypeList = function EventTypeList(version) { * @memberof Twilio.Events.V1.EventTypeList# * * @param {object} [opts] - Options for request + * @param {string} [opts.schemaId] - A string to filter Event Types by schema. * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -157,6 +158,7 @@ EventTypeList = function EventTypeList(version) { * @memberof Twilio.Events.V1.EventTypeList# * * @param {object} [opts] - Options for request + * @param {string} [opts.schemaId] - A string to filter Event Types by schema. * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -217,6 +219,7 @@ EventTypeList = function EventTypeList(version) { * @memberof Twilio.Events.V1.EventTypeList# * * @param {object} [opts] - Options for request + * @param {string} [opts.schemaId] - A string to filter Event Types by schema. * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -235,6 +238,7 @@ EventTypeList = function EventTypeList(version) { var deferred = Q.defer(); var data = values.of({ + 'SchemaId': _.get(opts, 'schemaId'), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize diff --git a/lib/rest/events/v1/sink.d.ts b/lib/rest/events/v1/sink.d.ts index 8678d43ddc..30a706a093 100644 --- a/lib/rest/events/v1/sink.d.ts +++ b/lib/rest/events/v1/sink.d.ts @@ -160,7 +160,7 @@ interface SinkListInstance { /** * Options to pass to create * - * @property description - Sink Description + * @property description - Sink Description. * @property sinkConfiguration - JSON Sink configuration. * @property sinkType - Sink type. */ @@ -177,6 +177,7 @@ interface SinkListInstanceCreateOptions { * Function to process each record. If this and a positional * callback are passed, this one will be used * @property done - Function to be called upon completion of streaming + * @property inUse - A boolean to return sinks used/not used by a subscription. * @property limit - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -187,17 +188,21 @@ interface SinkListInstanceCreateOptions { * If no pageSize is defined but a limit is defined, * each() will attempt to read the limit with the most efficient * page size, i.e. min(limit, 1000) + * @property status - A string to filter sinks by status. */ interface SinkListInstanceEachOptions { callback?: (item: SinkInstance, done: (err?: Error) => void) => void; done?: Function; + inUse?: boolean; limit?: number; pageSize?: number; + status?: string; } /** * Options to pass to list * + * @property inUse - A boolean to return sinks used/not used by a subscription. * @property limit - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -208,23 +213,30 @@ interface SinkListInstanceEachOptions { * If no page_size is defined but a limit is defined, * list() will attempt to read the limit with the most * efficient page size, i.e. min(limit, 1000) + * @property status - A string to filter sinks by status. */ interface SinkListInstanceOptions { + inUse?: boolean; limit?: number; pageSize?: number; + status?: string; } /** * Options to pass to page * + * @property inUse - A boolean to return sinks used/not used by a subscription. * @property pageNumber - Page Number, this value is simply for client state * @property pageSize - Number of records to return, defaults to 50 * @property pageToken - PageToken provided by the API + * @property status - A string to filter sinks by status. */ interface SinkListInstancePageOptions { + inUse?: boolean; pageNumber?: number; pageSize?: number; pageToken?: string; + status?: string; } interface SinkPayload extends SinkResource, Page.TwilioResponsePayload { diff --git a/lib/rest/events/v1/sink.js b/lib/rest/events/v1/sink.js index dbb2424ad9..ed705e6391 100644 --- a/lib/rest/events/v1/sink.js +++ b/lib/rest/events/v1/sink.js @@ -64,7 +64,7 @@ SinkList = function SinkList(version) { * @memberof Twilio.Events.V1.SinkList# * * @param {object} opts - Options for request - * @param {string} opts.description - Sink Description + * @param {string} opts.description - Sink Description. * @param {object} opts.sinkConfiguration - JSON Sink configuration. * @param {sink.sink_type} opts.sinkType - Sink type. * @param {function} [callback] - Callback to handle processed record @@ -127,6 +127,9 @@ SinkList = function SinkList(version) { * @memberof Twilio.Events.V1.SinkList# * * @param {object} [opts] - Options for request + * @param {boolean} [opts.inUse] - + * A boolean to return sinks used/not used by a subscription. + * @param {string} [opts.status] - A string to filter sinks by status. * @param {number} [opts.limit] - * Upper limit for the number of records to return. * each() guarantees never to return more than limit. @@ -214,6 +217,9 @@ SinkList = function SinkList(version) { * @memberof Twilio.Events.V1.SinkList# * * @param {object} [opts] - Options for request + * @param {boolean} [opts.inUse] - + * A boolean to return sinks used/not used by a subscription. + * @param {string} [opts.status] - A string to filter sinks by status. * @param {number} [opts.limit] - * Upper limit for the number of records to return. * list() guarantees never to return more than limit. @@ -274,6 +280,9 @@ SinkList = function SinkList(version) { * @memberof Twilio.Events.V1.SinkList# * * @param {object} [opts] - Options for request + * @param {boolean} [opts.inUse] - + * A boolean to return sinks used/not used by a subscription. + * @param {string} [opts.status] - A string to filter sinks by status. * @param {string} [opts.pageToken] - PageToken provided by the API * @param {number} [opts.pageNumber] - * Page Number, this value is simply for client state @@ -292,6 +301,8 @@ SinkList = function SinkList(version) { var deferred = Q.defer(); var data = values.of({ + 'InUse': serialize.bool(_.get(opts, 'inUse')), + 'Status': _.get(opts, 'status'), 'PageToken': opts.pageToken, 'Page': opts.pageNumber, 'PageSize': opts.pageSize diff --git a/lib/rest/flexApi/v1/flexFlow.d.ts b/lib/rest/flexApi/v1/flexFlow.d.ts index 00ea19c897..94a0ec9094 100644 --- a/lib/rest/flexApi/v1/flexFlow.d.ts +++ b/lib/rest/flexApi/v1/flexFlow.d.ts @@ -38,7 +38,7 @@ declare function FlexFlowList(version: V1): FlexFlowListInstance; * @property integration.url - The External Webhook URL * @property integration.workflowSid - The Workflow SID for a new Task * @property integration.workspaceSid - The Workspace SID for a new Task - * @property integrationType - The integration type + * @property integrationType - The software that will handle inbound messages. * @property janitorEnabled - Remove active Proxy sessions if the corresponding Task is deleted * @property longLived - Reuse this chat channel for future interactions with a contact */ @@ -201,7 +201,7 @@ interface FlexFlowListInstance { * @property integration.url - The External Webhook URL * @property integration.workflowSid - The Workflow SID for a new Task * @property integration.workspaceSid - The Workspace SID for a new Task - * @property integrationType - The integration type + * @property integrationType - The software that will handle inbound messages. * @property janitorEnabled - Remove active Proxy sessions if the corresponding Task is deleted * @property longLived - Reuse this chat channel for future interactions with a contact */ diff --git a/lib/rest/flexApi/v1/flexFlow.js b/lib/rest/flexApi/v1/flexFlow.js index c7f0560dc6..4fcd1aeb97 100644 --- a/lib/rest/flexApi/v1/flexFlow.js +++ b/lib/rest/flexApi/v1/flexFlow.js @@ -314,7 +314,7 @@ FlexFlowList = function FlexFlowList(version) { * @param {string} [opts.contactIdentity] - The channel contact's Identity * @param {boolean} [opts.enabled] - Whether the new Flex Flow is enabled * @param {flex_flow.integration_type} [opts.integrationType] - - * The integration type + * The software that will handle inbound messages. * @param {string} [opts.integration.flowSid] - The SID of the Studio Flow * @param {string} [opts.integration.url] - The External Webhook URL * @param {string} [opts.integration.workspaceSid] - @@ -509,7 +509,8 @@ FlexFlowPage.prototype[util.inspect.custom] = function inspect(depth, options) { * @property {flex_flow.channel_type} channelType - The channel type * @property {string} contactIdentity - The channel contact's Identity * @property {boolean} enabled - Whether the Flex Flow is enabled - * @property {flex_flow.integration_type} integrationType - The integration type + * @property {flex_flow.integration_type} integrationType - + * The software that will handle inbound messages. * @property {object} integration - * An object that contains specific parameters for the integration * @property {boolean} longLived - @@ -588,7 +589,7 @@ FlexFlowInstance.prototype.fetch = function fetch(callback) { * @param {string} [opts.contactIdentity] - The channel contact's Identity * @param {boolean} [opts.enabled] - Whether the new Flex Flow is enabled * @param {flex_flow.integration_type} [opts.integrationType] - - * The integration type + * The software that will handle inbound messages. * @param {string} [opts.integration.flowSid] - The SID of the Studio Flow * @param {string} [opts.integration.url] - The External Webhook URL * @param {string} [opts.integration.workspaceSid] - @@ -720,7 +721,7 @@ FlexFlowContext.prototype.fetch = function fetch(callback) { * @param {string} [opts.contactIdentity] - The channel contact's Identity * @param {boolean} [opts.enabled] - Whether the new Flex Flow is enabled * @param {flex_flow.integration_type} [opts.integrationType] - - * The integration type + * The software that will handle inbound messages. * @param {string} [opts.integration.flowSid] - The SID of the Studio Flow * @param {string} [opts.integration.url] - The External Webhook URL * @param {string} [opts.integration.workspaceSid] - diff --git a/lib/rest/messaging/v1/externalCampaign.d.ts b/lib/rest/messaging/v1/externalCampaign.d.ts index 7dbb440e39..0680e73f25 100644 --- a/lib/rest/messaging/v1/externalCampaign.d.ts +++ b/lib/rest/messaging/v1/externalCampaign.d.ts @@ -53,6 +53,7 @@ interface ExternalCampaignResource { campaign_id: string; date_created: Date; messaging_service_sid: string; + sid: string; } interface ExternalCampaignSolution { @@ -75,6 +76,7 @@ declare class ExternalCampaignInstance extends SerializableClass { campaignId: string; dateCreated: Date; messagingServiceSid: string; + sid: string; /** * Provide a user-friendly representation */ diff --git a/lib/rest/messaging/v1/externalCampaign.js b/lib/rest/messaging/v1/externalCampaign.js index 3780e00b1d..0ce585abec 100644 --- a/lib/rest/messaging/v1/externalCampaign.js +++ b/lib/rest/messaging/v1/externalCampaign.js @@ -203,6 +203,8 @@ ExternalCampaignPage.prototype[util.inspect.custom] = function inspect(depth, * * @constructor Twilio.Messaging.V1.ExternalCampaignInstance * + * @property {string} sid - + * The unique string that identifies a US A2P Compliance resource * @property {string} accountSid - The SID of the Account that created the resource * @property {string} campaignId - ID of the preregistered campaign. * @property {string} messagingServiceSid - @@ -218,6 +220,7 @@ ExternalCampaignInstance = function ExternalCampaignInstance(version, payload) { this._version = version; // Marshaled Properties + this.sid = payload.sid; // jshint ignore:line this.accountSid = payload.account_sid; // jshint ignore:line this.campaignId = payload.campaign_id; // jshint ignore:line this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line diff --git a/lib/rest/messaging/v1/service/usAppToPerson.d.ts b/lib/rest/messaging/v1/service/usAppToPerson.d.ts index 740e9e6d7a..99c9fc9157 100644 --- a/lib/rest/messaging/v1/service/usAppToPerson.d.ts +++ b/lib/rest/messaging/v1/service/usAppToPerson.d.ts @@ -22,6 +22,10 @@ import { SerializableClass } from '../../../../interfaces'; declare function UsAppToPersonList(version: V1, messagingServiceSid: string): UsAppToPersonListInstance; interface UsAppToPersonListInstance { + /** + * @param sid - sid of instance + */ + (sid: string): UsAppToPersonContext; /** * create a UsAppToPersonInstance * @@ -30,17 +34,107 @@ interface UsAppToPersonListInstance { */ create(opts: UsAppToPersonListInstanceCreateOptions, callback?: (error: Error | null, item: UsAppToPersonInstance) => any): Promise; /** - * fetch a UsAppToPersonInstance + * Streams UsAppToPersonInstance records from the API. * - * @param callback - Callback to handle processed record + * This operation lazily loads records as efficiently as possible until the limit + * is reached. + * + * The results are passed into the callback function, so this operation is memory + * efficient. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param callback - Function to process each record */ - fetch(callback?: (error: Error | null, items: UsAppToPersonListInstance) => any): Promise; + each(callback?: (item: UsAppToPersonInstance, done: (err?: Error) => void) => void): void; /** - * remove a UsAppToPersonInstance + * Streams UsAppToPersonInstance records from the API. * - * @param callback - Callback to handle processed record + * This operation lazily loads records as efficiently as possible until the limit + * is reached. + * + * The results are passed into the callback function, so this operation is memory + * efficient. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param opts - Options for request + * @param callback - Function to process each record */ - remove(callback?: (error: Error | null, items: UsAppToPersonListInstance) => any): Promise; + each(opts?: UsAppToPersonListInstanceEachOptions, callback?: (item: UsAppToPersonInstance, done: (err?: Error) => void) => void): void; + /** + * Constructs a us_app_to_person + * + * @param sid - The SID that identifies the US A2P Compliance resource to fetch + */ + get(sid: string): UsAppToPersonContext; + /** + * Retrieve a single target page of UsAppToPersonInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param callback - Callback to handle list of records + */ + getPage(callback?: (error: Error | null, items: UsAppToPersonPage) => any): Promise; + /** + * Retrieve a single target page of UsAppToPersonInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param targetUrl - API-generated URL for the requested results page + * @param callback - Callback to handle list of records + */ + getPage(targetUrl?: string, callback?: (error: Error | null, items: UsAppToPersonPage) => any): Promise; + /** + * Lists UsAppToPersonInstance records from the API as a list. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param callback - Callback to handle list of records + */ + list(callback?: (error: Error | null, items: UsAppToPersonInstance[]) => any): Promise; + /** + * Lists UsAppToPersonInstance records from the API as a list. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param opts - Options for request + * @param callback - Callback to handle list of records + */ + list(opts?: UsAppToPersonListInstanceOptions, callback?: (error: Error | null, items: UsAppToPersonInstance[]) => any): Promise; + /** + * Retrieve a single page of UsAppToPersonInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param callback - Callback to handle list of records + */ + page(callback?: (error: Error | null, items: UsAppToPersonPage) => any): Promise; + /** + * Retrieve a single page of UsAppToPersonInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @param opts - Options for request + * @param callback - Callback to handle list of records + */ + page(opts?: UsAppToPersonListInstancePageOptions, callback?: (error: Error | null, items: UsAppToPersonPage) => any): Promise; /** * Provide a user-friendly representation */ @@ -66,6 +160,63 @@ interface UsAppToPersonListInstanceCreateOptions { usAppToPersonUsecase: string; } +/** + * Options to pass to each + * + * @property callback - + * Function to process each record. If this and a positional + * callback are passed, this one will be used + * @property done - Function to be called upon completion of streaming + * @property limit - + * Upper limit for the number of records to return. + * each() guarantees never to return more than limit. + * Default is no limit + * @property pageSize - + * Number of records to fetch per request, + * when not set will use the default value of 50 records. + * If no pageSize is defined but a limit is defined, + * each() will attempt to read the limit with the most efficient + * page size, i.e. min(limit, 1000) + */ +interface UsAppToPersonListInstanceEachOptions { + callback?: (item: UsAppToPersonInstance, done: (err?: Error) => void) => void; + done?: Function; + limit?: number; + pageSize?: number; +} + +/** + * Options to pass to list + * + * @property limit - + * Upper limit for the number of records to return. + * list() guarantees never to return more than limit. + * Default is no limit + * @property pageSize - + * Number of records to fetch per request, + * when not set will use the default value of 50 records. + * If no page_size is defined but a limit is defined, + * list() will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + */ +interface UsAppToPersonListInstanceOptions { + limit?: number; + pageSize?: number; +} + +/** + * Options to pass to page + * + * @property pageNumber - Page Number, this value is simply for client state + * @property pageSize - Number of records to return, defaults to 50 + * @property pageToken - PageToken provided by the API + */ +interface UsAppToPersonListInstancePageOptions { + pageNumber?: number; + pageSize?: number; + pageToken?: string; +} + interface UsAppToPersonPayload extends UsAppToPersonResource, Page.TwilioResponsePayload { } @@ -83,6 +234,7 @@ interface UsAppToPersonResource { message_samples: string[]; messaging_service_sid: string; rate_limits: object; + sid: string; url: string; us_app_to_person_usecase: string; } @@ -92,6 +244,38 @@ interface UsAppToPersonSolution { } +declare class UsAppToPersonContext { + /** + * Initialize the UsAppToPersonContext + * + * PLEASE NOTE that this class contains beta products that are subject to change. + * Use them with caution. + * + * @param version - Version of the resource + * @param messagingServiceSid - The SID of the Messaging Service to fetch the resource from + * @param sid - The SID that identifies the US A2P Compliance resource to fetch + */ + constructor(version: V1, messagingServiceSid: string, sid: string); + + /** + * fetch a UsAppToPersonInstance + * + * @param callback - Callback to handle processed record + */ + fetch(callback?: (error: Error | null, items: UsAppToPersonInstance) => any): Promise; + /** + * remove a UsAppToPersonInstance + * + * @param callback - Callback to handle processed record + */ + remove(callback?: (error: Error | null, items: UsAppToPersonInstance) => any): Promise; + /** + * Provide a user-friendly representation + */ + toJSON(): any; +} + + declare class UsAppToPersonInstance extends SerializableClass { /** * Initialize the UsAppToPersonContext @@ -102,9 +286,11 @@ declare class UsAppToPersonInstance extends SerializableClass { * @param version - Version of the resource * @param payload - The instance payload * @param messagingServiceSid - The SID of the Messaging Service the resource is associated with + * @param sid - The SID that identifies the US A2P Compliance resource to fetch */ - constructor(version: V1, payload: UsAppToPersonPayload, messagingServiceSid: string); + constructor(version: V1, payload: UsAppToPersonPayload, messagingServiceSid: string, sid: string); + private _proxy: UsAppToPersonContext; accountSid: string; brandRegistrationSid: string; campaignId: string; @@ -112,12 +298,25 @@ declare class UsAppToPersonInstance extends SerializableClass { dateCreated: Date; dateUpdated: Date; description: string; + /** + * fetch a UsAppToPersonInstance + * + * @param callback - Callback to handle processed record + */ + fetch(callback?: (error: Error | null, items: UsAppToPersonInstance) => any): Promise; hasEmbeddedLinks: boolean; hasEmbeddedPhone: boolean; isExternallyRegistered: boolean; messageSamples: string[]; messagingServiceSid: string; rateLimits: any; + /** + * remove a UsAppToPersonInstance + * + * @param callback - Callback to handle processed record + */ + remove(callback?: (error: Error | null, items: UsAppToPersonInstance) => any): Promise; + sid: string; /** * Provide a user-friendly representation */ @@ -152,4 +351,4 @@ declare class UsAppToPersonPage extends Page= opts.limit)) { + done = true; + return false; + } + + currentResource++; + callback(instance, onComplete); + }); + + if (!done) { + currentPage++; + fetchNextPage(_.bind(page.nextPage, page)); + } + }); + + promise.catch(onComplete); + } + + fetchNextPage(_.bind(this.page, this, _.merge(opts, limits))); + }; + + /* jshint ignore:start */ + /** + * Lists UsAppToPersonInstance records from the API as a list. * - * @returns {Promise} Resolves to processed UsAppToPersonInstance + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @function list + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList# + * + * @param {object} [opts] - Options for request + * @param {number} [opts.limit] - + * Upper limit for the number of records to return. + * list() guarantees never to return more than limit. + * Default is no limit + * @param {number} [opts.pageSize] - + * Number of records to fetch per request, + * when not set will use the default value of 50 records. + * If no page_size is defined but a limit is defined, + * list() will attempt to read the limit with the most + * efficient page size, i.e. min(limit, 1000) + * @param {function} [callback] - Callback to handle list of records + * + * @returns {Promise} Resolves to a list of records */ /* jshint ignore:end */ - UsAppToPersonListInstance.remove = function remove(callback) { + UsAppToPersonListInstance.list = function list(opts, callback) { + if (_.isFunction(opts)) { + callback = opts; + opts = {}; + } + opts = opts || {}; var deferred = Q.defer(); - var promise = this._version.remove({uri: this._uri, method: 'DELETE'}); + var allResources = []; + opts.callback = function(resource, done) { + allResources.push(resource); + + if (!_.isUndefined(opts.limit) && allResources.length === opts.limit) { + done(); + } + }; + + opts.done = function(error) { + if (_.isUndefined(error)) { + deferred.resolve(allResources); + } else { + deferred.reject(error); + } + }; + + if (_.isFunction(callback)) { + deferred.promise.nodeify(callback); + } + + this.each(opts); + return deferred.promise; + }; + + /* jshint ignore:start */ + /** + * Retrieve a single page of UsAppToPersonInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. + * + * @function page + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList# + * + * @param {object} [opts] - Options for request + * @param {string} [opts.pageToken] - PageToken provided by the API + * @param {number} [opts.pageNumber] - + * Page Number, this value is simply for client state + * @param {number} [opts.pageSize] - Number of records to return, defaults to 50 + * @param {function} [callback] - Callback to handle list of records + * + * @returns {Promise} Resolves to a list of records + */ + /* jshint ignore:end */ + UsAppToPersonListInstance.page = function page(opts, callback) { + if (_.isFunction(opts)) { + callback = opts; + opts = {}; + } + opts = opts || {}; + + var deferred = Q.defer(); + var data = values.of({ + 'PageToken': opts.pageToken, + 'Page': opts.pageNumber, + 'PageSize': opts.pageSize + }); + + var promise = this._version.page({uri: this._uri, method: 'GET', params: data}); promise = promise.then(function(payload) { - deferred.resolve(payload); + deferred.resolve(new UsAppToPersonPage(this._version, payload, this._solution)); }.bind(this)); promise.catch(function(error) { @@ -164,26 +339,29 @@ UsAppToPersonList = function UsAppToPersonList(version, messagingServiceSid) { /* jshint ignore:start */ /** - * fetch a UsAppToPersonInstance + * Retrieve a single target page of UsAppToPersonInstance records from the API. + * + * The request is executed immediately. + * + * If a function is passed as the first argument, it will be used as the callback + * function. * - * @function fetch + * @function getPage * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList# * - * @param {function} [callback] - Callback to handle processed record + * @param {string} [targetUrl] - API-generated URL for the requested results page + * @param {function} [callback] - Callback to handle list of records * - * @returns {Promise} Resolves to processed UsAppToPersonInstance + * @returns {Promise} Resolves to a list of records */ /* jshint ignore:end */ - UsAppToPersonListInstance.fetch = function fetch(callback) { + UsAppToPersonListInstance.getPage = function getPage(targetUrl, callback) { var deferred = Q.defer(); - var promise = this._version.fetch({uri: this._uri, method: 'GET'}); + + var promise = this._version._domain.twilio.request({method: 'GET', uri: targetUrl}); promise = promise.then(function(payload) { - deferred.resolve(new UsAppToPersonInstance( - this._version, - payload, - this._solution.messagingServiceSid - )); + deferred.resolve(new UsAppToPersonPage(this._version, payload, this._solution)); }.bind(this)); promise.catch(function(error) { @@ -197,6 +375,23 @@ UsAppToPersonList = function UsAppToPersonList(version, messagingServiceSid) { return deferred.promise; }; + /* jshint ignore:start */ + /** + * Constructs a us_app_to_person + * + * @function get + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonList# + * + * @param {string} sid - + * The SID that identifies the US A2P Compliance resource to fetch + * + * @returns {Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext} + */ + /* jshint ignore:end */ + UsAppToPersonListInstance.get = function get(sid) { + return new UsAppToPersonContext(this._version, this._solution.messagingServiceSid, sid); + }; + /* jshint ignore:start */ /** * Provide a user-friendly representation @@ -297,6 +492,8 @@ UsAppToPersonPage.prototype[util.inspect.custom] = function inspect(depth, * * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance * + * @property {string} sid - + * The unique string that identifies a US A2P Compliance resource * @property {string} accountSid - The SID of the Account that created the resource * @property {string} brandRegistrationSid - A2P Brand Registration SID * @property {string} messagingServiceSid - @@ -325,13 +522,17 @@ UsAppToPersonPage.prototype[util.inspect.custom] = function inspect(depth, * @param {UsAppToPersonPayload} payload - The instance payload * @param {sid} messagingServiceSid - * The SID of the Messaging Service the resource is associated with + * @param {sid} sid - + * The SID that identifies the US A2P Compliance resource to fetch */ /* jshint ignore:end */ UsAppToPersonInstance = function UsAppToPersonInstance(version, payload, - messagingServiceSid) { + messagingServiceSid, + sid) { this._version = version; // Marshaled Properties + this.sid = payload.sid; // jshint ignore:line this.accountSid = payload.account_sid; // jshint ignore:line this.brandRegistrationSid = payload.brand_registration_sid; // jshint ignore:line this.messagingServiceSid = payload.messaging_service_sid; // jshint ignore:line @@ -350,7 +551,54 @@ UsAppToPersonInstance = function UsAppToPersonInstance(version, payload, // Context this._context = undefined; - this._solution = {messagingServiceSid: messagingServiceSid, }; + this._solution = {messagingServiceSid: messagingServiceSid, sid: sid || this.sid, }; +}; + +Object.defineProperty(UsAppToPersonInstance.prototype, + '_proxy', { + get: function() { + if (!this._context) { + this._context = new UsAppToPersonContext( + this._version, + this._solution.messagingServiceSid, + this._solution.sid + ); + } + + return this._context; + } +}); + +/* jshint ignore:start */ +/** + * remove a UsAppToPersonInstance + * + * @function remove + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance# + * + * @param {function} [callback] - Callback to handle processed record + * + * @returns {Promise} Resolves to processed UsAppToPersonInstance + */ +/* jshint ignore:end */ +UsAppToPersonInstance.prototype.remove = function remove(callback) { + return this._proxy.remove(callback); +}; + +/* jshint ignore:start */ +/** + * fetch a UsAppToPersonInstance + * + * @function fetch + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonInstance# + * + * @param {function} [callback] - Callback to handle processed record + * + * @returns {Promise} Resolves to processed UsAppToPersonInstance + */ +/* jshint ignore:end */ +UsAppToPersonInstance.prototype.fetch = function fetch(callback) { + return this._proxy.fetch(callback); }; /* jshint ignore:start */ @@ -378,8 +626,122 @@ UsAppToPersonInstance.prototype[util.inspect.custom] = function inspect(depth, return util.inspect(this.toJSON(), options); }; + +/* jshint ignore:start */ +/** + * Initialize the UsAppToPersonContext + * + * PLEASE NOTE that this class contains beta products that are subject to change. + * Use them with caution. + * + * @constructor Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext + * + * @param {V1} version - Version of the resource + * @param {sid} messagingServiceSid - + * The SID of the Messaging Service to fetch the resource from + * @param {sid} sid - + * The SID that identifies the US A2P Compliance resource to fetch + */ +/* jshint ignore:end */ +UsAppToPersonContext = function UsAppToPersonContext(version, + messagingServiceSid, sid) + { + this._version = version; + + // Path Solution + this._solution = {messagingServiceSid: messagingServiceSid, sid: sid, }; + this._uri = `/Services/${messagingServiceSid}/Compliance/Usa2p/${sid}`; +}; + +/* jshint ignore:start */ +/** + * remove a UsAppToPersonInstance + * + * @function remove + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext# + * + * @param {function} [callback] - Callback to handle processed record + * + * @returns {Promise} Resolves to processed UsAppToPersonInstance + */ +/* jshint ignore:end */ +UsAppToPersonContext.prototype.remove = function remove(callback) { + var deferred = Q.defer(); + var promise = this._version.remove({uri: this._uri, method: 'DELETE'}); + + promise = promise.then(function(payload) { + deferred.resolve(payload); + }.bind(this)); + + promise.catch(function(error) { + deferred.reject(error); + }); + + if (_.isFunction(callback)) { + deferred.promise.nodeify(callback); + } + + return deferred.promise; +}; + +/* jshint ignore:start */ +/** + * fetch a UsAppToPersonInstance + * + * @function fetch + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext# + * + * @param {function} [callback] - Callback to handle processed record + * + * @returns {Promise} Resolves to processed UsAppToPersonInstance + */ +/* jshint ignore:end */ +UsAppToPersonContext.prototype.fetch = function fetch(callback) { + var deferred = Q.defer(); + var promise = this._version.fetch({uri: this._uri, method: 'GET'}); + + promise = promise.then(function(payload) { + deferred.resolve(new UsAppToPersonInstance( + this._version, + payload, + this._solution.messagingServiceSid, + this._solution.sid + )); + }.bind(this)); + + promise.catch(function(error) { + deferred.reject(error); + }); + + if (_.isFunction(callback)) { + deferred.promise.nodeify(callback); + } + + return deferred.promise; +}; + +/* jshint ignore:start */ +/** + * Provide a user-friendly representation + * + * @function toJSON + * @memberof Twilio.Messaging.V1.ServiceContext.UsAppToPersonContext# + * + * @returns Object + */ +/* jshint ignore:end */ +UsAppToPersonContext.prototype.toJSON = function toJSON() { + return this._solution; +}; + +UsAppToPersonContext.prototype[util.inspect.custom] = function inspect(depth, + options) { + return util.inspect(this.toJSON(), options); +}; + module.exports = { UsAppToPersonList: UsAppToPersonList, UsAppToPersonPage: UsAppToPersonPage, - UsAppToPersonInstance: UsAppToPersonInstance + UsAppToPersonInstance: UsAppToPersonInstance, + UsAppToPersonContext: UsAppToPersonContext }; diff --git a/lib/rest/supersim/v1/sim.d.ts b/lib/rest/supersim/v1/sim.d.ts index 764517498c..3b244fe34c 100644 --- a/lib/rest/supersim/v1/sim.d.ts +++ b/lib/rest/supersim/v1/sim.d.ts @@ -167,7 +167,7 @@ interface SimListInstance { * Options to pass to create * * @property iccid - The {@link https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID|ICCID} of the Super SIM to be added to your Account - * @property registrationCode - The 10 digit code required to claim the Super SIM for your Account + * @property registrationCode - The 10-digit code required to claim the Super SIM for your Account */ interface SimListInstanceCreateOptions { iccid: string; diff --git a/lib/rest/supersim/v1/sim.js b/lib/rest/supersim/v1/sim.js index 3d48308e62..ee7131270c 100644 --- a/lib/rest/supersim/v1/sim.js +++ b/lib/rest/supersim/v1/sim.js @@ -64,7 +64,7 @@ SimList = function SimList(version) { * @param {string} opts.iccid - * The {@link https://en.wikipedia.org/wiki/Subscriber_identity_module#ICCID|ICCID} of the Super SIM to be added to your Account * @param {string} opts.registrationCode - - * The 10 digit code required to claim the Super SIM for your Account + * The 10-digit code required to claim the Super SIM for your Account * @param {function} [callback] - Callback to handle processed record * * @returns {Promise} Resolves to processed SimInstance diff --git a/lib/rest/video/v1/composition.d.ts b/lib/rest/video/v1/composition.d.ts index a4ab6f377d..01ab207566 100644 --- a/lib/rest/video/v1/composition.d.ts +++ b/lib/rest/video/v1/composition.d.ts @@ -17,10 +17,6 @@ type CompositionStatus = 'enqueued'|'processing'|'completed'|'deleted'|'failed'; /** * Initialize the CompositionList * - * PLEASE NOTE that this class contains preview products that are subject to - * change. Use them with caution. If you currently do not have developer preview - * access, please contact help@twilio.com. - * * @param version - Version of the resource */ declare function CompositionList(version: V1): CompositionListInstance; @@ -283,10 +279,6 @@ declare class CompositionContext { /** * Initialize the CompositionContext * - * PLEASE NOTE that this class contains preview products that are subject to - * change. Use them with caution. If you currently do not have developer preview - * access, please contact help@twilio.com. - * * @param version - Version of the resource * @param sid - The SID that identifies the resource to fetch */ @@ -315,10 +307,6 @@ declare class CompositionInstance extends SerializableClass { /** * Initialize the CompositionContext * - * PLEASE NOTE that this class contains preview products that are subject to - * change. Use them with caution. If you currently do not have developer preview - * access, please contact help@twilio.com. - * * @param version - Version of the resource * @param payload - The instance payload * @param sid - The SID that identifies the resource to fetch @@ -367,10 +355,6 @@ declare class CompositionPage extends Page done()); + } + ); + it('should treat the second arg as a callback', + function(done) { + var body = { + 'compliance': [ + { + 'sid': 'QE2c6890da8086d771620e9b13fadeba0b', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'brand_registration_sid': 'BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'messaging_service_sid': 'MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'description': 'Send marketing messages about sales to opted in customers.', + 'message_samples': [ + 'EXPRESS: Denim Days Event is ON', + 'LAST CHANCE: Book your next flight for just 1 (ONE) EUR' + ], + 'us_app_to_person_usecase': 'MARKETING', + 'has_embedded_links': true, + 'has_embedded_phone': false, + 'campaign_status': 'PENDING', + 'campaign_id': 'CXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'is_externally_registered': false, + 'rate_limits': { + 'att': { + 'mps': 600, + 'msg_class': 'A' + }, + 'tmobile': { + 'brand_tier': 'TOP' + } + }, + 'date_created': '2021-02-18T14:48:52Z', + 'date_updated': '2021-02-18T14:48:52Z', + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b' + } + ], + 'meta': { + 'page': 0, + 'page_size': 50, + 'first_page_url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=50&Page=0', + 'previous_page_url': null, + 'next_page_url': null, + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=50&Page=0', + 'key': 'compliance' + } + }; + holodeck.mock(new Response(200, body)); + client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .usAppToPerson.each({pageSize: 20}, () => done()); + holodeck.assertHasRequest(new Request({ + method: 'GET', + url: 'https://messaging.twilio.com/v1/Services/${messagingServiceSid}/Compliance/Usa2p', + params: {PageSize: 20}, + })); + } + ); + it('should find the callback in the opts object', + function(done) { + var body = { + 'compliance': [ + { + 'sid': 'QE2c6890da8086d771620e9b13fadeba0b', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'brand_registration_sid': 'BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'messaging_service_sid': 'MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'description': 'Send marketing messages about sales to opted in customers.', + 'message_samples': [ + 'EXPRESS: Denim Days Event is ON', + 'LAST CHANCE: Book your next flight for just 1 (ONE) EUR' + ], + 'us_app_to_person_usecase': 'MARKETING', + 'has_embedded_links': true, + 'has_embedded_phone': false, + 'campaign_status': 'PENDING', + 'campaign_id': 'CXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'is_externally_registered': false, + 'rate_limits': { + 'att': { + 'mps': 600, + 'msg_class': 'A' + }, + 'tmobile': { + 'brand_tier': 'TOP' + } + }, + 'date_created': '2021-02-18T14:48:52Z', + 'date_updated': '2021-02-18T14:48:52Z', + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b' + } + ], + 'meta': { + 'page': 0, + 'page_size': 50, + 'first_page_url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=50&Page=0', + 'previous_page_url': null, + 'next_page_url': null, + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=50&Page=0', + 'key': 'compliance' + } + }; + holodeck.mock(new Response(200, body)); + client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .usAppToPerson.each({callback: () => done()}, () => fail('wrong callback!')); + } + ); + it('should generate valid list request', function(done) { holodeck.mock(new Response(500, {})); var promise = client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') - .usAppToPerson.fetch(); + .usAppToPerson.list(); promise.then(function() { throw new Error('failed'); }, function(error) { @@ -181,13 +335,94 @@ describe('UsAppToPerson', function() { })); } ); + it('should generate valid read_full response', + function(done) { + var body = { + 'compliance': [ + { + 'sid': 'QE2c6890da8086d771620e9b13fadeba0b', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'brand_registration_sid': 'BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'messaging_service_sid': 'MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'description': 'Send marketing messages about sales to opted in customers.', + 'message_samples': [ + 'EXPRESS: Denim Days Event is ON', + 'LAST CHANCE: Book your next flight for just 1 (ONE) EUR' + ], + 'us_app_to_person_usecase': 'MARKETING', + 'has_embedded_links': true, + 'has_embedded_phone': false, + 'campaign_status': 'PENDING', + 'campaign_id': 'CXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'is_externally_registered': false, + 'rate_limits': { + 'att': { + 'mps': 600, + 'msg_class': 'A' + }, + 'tmobile': { + 'brand_tier': 'TOP' + } + }, + 'date_created': '2021-02-18T14:48:52Z', + 'date_updated': '2021-02-18T14:48:52Z', + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b' + } + ], + 'meta': { + 'page': 0, + 'page_size': 50, + 'first_page_url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=50&Page=0', + 'previous_page_url': null, + 'next_page_url': null, + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p?PageSize=50&Page=0', + 'key': 'compliance' + } + }; + + holodeck.mock(new Response(200, body)); + + var promise = client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .usAppToPerson.list(); + promise.then(function(response) { + expect(response).toBeDefined(); + done(); + }, function() { + throw new Error('failed'); + }).done(); + } + ); + it('should generate valid fetch request', + function(done) { + holodeck.mock(new Response(500, {})); + + var promise = client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .usAppToPerson('QEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch(); + promise.then(function() { + throw new Error('failed'); + }, function(error) { + expect(error.constructor).toBe(RestException.prototype.constructor); + done(); + }).done(); + + var messagingServiceSid = 'MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; + var sid = 'QEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; + var url = `https://messaging.twilio.com/v1/Services/${messagingServiceSid}/Compliance/Usa2p/${sid}`; + + holodeck.assertHasRequest(new Request({ + method: 'GET', + url: url + })); + } + ); it('should generate valid fetch response', function(done) { var body = { + 'sid': 'QE2c6890da8086d771620e9b13fadeba0b', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'brand_registration_sid': 'BNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'messaging_service_sid': 'MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'description': 'Send marketing messages about sales and offers to opted in customers.', + 'description': 'Send marketing messages about sales to opted in customers.', 'message_samples': [ 'EXPRESS: Denim Days Event is ON', 'LAST CHANCE: Book your next flight for just 1 (ONE) EUR' @@ -209,13 +444,13 @@ describe('UsAppToPerson', function() { }, 'date_created': '2021-02-18T14:48:52Z', 'date_updated': '2021-02-18T14:48:52Z', - 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p' + 'url': 'https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b' }; holodeck.mock(new Response(200, body)); var promise = client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') - .usAppToPerson.fetch(); + .usAppToPerson('QEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch(); promise.then(function(response) { expect(response).toBeDefined(); done(); diff --git a/spec/integration/rest/monitor/v1/alert.spec.js b/spec/integration/rest/monitor/v1/alert.spec.js index 877e33e9f2..ca5742f95b 100644 --- a/spec/integration/rest/monitor/v1/alert.spec.js +++ b/spec/integration/rest/monitor/v1/alert.spec.js @@ -65,7 +65,7 @@ describe('Alert', function() { 'request_method': 'GET', 'request_url': 'http://www.example.com', 'request_variables': 'request_variables', - 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'response_body': 'response_body', 'response_headers': 'response_headers', 'request_headers': 'request_headers', @@ -101,7 +101,7 @@ describe('Alert', function() { 'more_info': 'more_info', 'request_method': 'GET', 'request_url': 'http://www.example.com', - 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'sid': 'NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://monitor.twilio.com/v1/Alerts/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'PNe2cd757cd5257b0217a447933a0290d2' @@ -137,7 +137,7 @@ describe('Alert', function() { 'more_info': 'more_info', 'request_method': 'GET', 'request_url': 'http://www.example.com', - 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'sid': 'NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://monitor.twilio.com/v1/Alerts/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'PNe2cd757cd5257b0217a447933a0290d2' @@ -178,7 +178,7 @@ describe('Alert', function() { 'more_info': 'more_info', 'request_method': 'GET', 'request_url': 'http://www.example.com', - 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'sid': 'NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://monitor.twilio.com/v1/Alerts/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'PNe2cd757cd5257b0217a447933a0290d2' @@ -260,7 +260,7 @@ describe('Alert', function() { 'more_info': 'more_info', 'request_method': 'GET', 'request_url': 'http://www.example.com', - 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'resource_sid': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'sid': 'NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'url': 'https://monitor.twilio.com/v1/Alerts/NOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'PNe2cd757cd5257b0217a447933a0290d2' diff --git a/spec/integration/rest/monitor/v1/event.spec.js b/spec/integration/rest/monitor/v1/event.spec.js index ac26f6d10e..8ae87dcff7 100644 --- a/spec/integration/rest/monitor/v1/event.spec.js +++ b/spec/integration/rest/monitor/v1/event.spec.js @@ -54,7 +54,7 @@ describe('Event', function() { function(done) { var body = { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'actor_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor_sid': 'USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'actor_type': 'account', 'description': null, 'event_data': { @@ -66,7 +66,7 @@ describe('Event', function() { 'event_date': '2014-10-03T16:48:25Z', 'event_type': 'account.updated', 'links': { - 'actor': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor': 'https://api.twilio.com/2010-04-01/Accounts/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'resource': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }, 'resource_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -94,7 +94,7 @@ describe('Event', function() { 'events': [ { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'actor_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor_sid': 'USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'actor_type': 'account', 'description': null, 'event_data': { @@ -106,7 +106,7 @@ describe('Event', function() { 'event_date': '2014-10-03T16:48:25Z', 'event_type': 'account.updated', 'links': { - 'actor': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor': 'https://api.twilio.com/2010-04-01/Accounts/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'resource': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }, 'resource_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -137,7 +137,7 @@ describe('Event', function() { 'events': [ { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'actor_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor_sid': 'USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'actor_type': 'account', 'description': null, 'event_data': { @@ -149,7 +149,7 @@ describe('Event', function() { 'event_date': '2014-10-03T16:48:25Z', 'event_type': 'account.updated', 'links': { - 'actor': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor': 'https://api.twilio.com/2010-04-01/Accounts/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'resource': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }, 'resource_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -185,7 +185,7 @@ describe('Event', function() { 'events': [ { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'actor_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor_sid': 'USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'actor_type': 'account', 'description': null, 'event_data': { @@ -197,7 +197,7 @@ describe('Event', function() { 'event_date': '2014-10-03T16:48:25Z', 'event_type': 'account.updated', 'links': { - 'actor': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor': 'https://api.twilio.com/2010-04-01/Accounts/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'resource': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }, 'resource_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -248,7 +248,7 @@ describe('Event', function() { 'events': [ { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'actor_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor_sid': 'USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'actor_type': 'account', 'description': null, 'event_data': { @@ -260,7 +260,7 @@ describe('Event', function() { 'event_date': '2014-10-03T16:48:25Z', 'event_type': 'account.updated', 'links': { - 'actor': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'actor': 'https://api.twilio.com/2010-04-01/Accounts/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'resource': 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }, 'resource_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', diff --git a/spec/integration/rest/proxy/v1/service.spec.js b/spec/integration/rest/proxy/v1/service.spec.js index 779bf7aa4e..1e3e6d6742 100644 --- a/spec/integration/rest/proxy/v1/service.spec.js +++ b/spec/integration/rest/proxy/v1/service.spec.js @@ -60,7 +60,7 @@ describe('Service', function() { 'default_ttl': 3600, 'callback_url': 'http://www.example.com', 'geo_match_level': 'country', - 'number_selection_behavior': 'prefer_sticky', + 'number_selection_behavior': 'prefer-sticky', 'intercept_callback_url': 'http://www.example.com', 'out_of_session_callback_url': 'http://www.example.com', 'date_created': '2015-07-30T20:00:00Z', @@ -163,7 +163,7 @@ describe('Service', function() { 'default_ttl': 3600, 'callback_url': 'http://www.example.com', 'geo_match_level': 'country', - 'number_selection_behavior': 'prefer_sticky', + 'number_selection_behavior': 'prefer-sticky', 'intercept_callback_url': 'http://www.example.com', 'out_of_session_callback_url': 'http://www.example.com', 'date_created': '2015-07-30T20:00:00Z', @@ -255,7 +255,7 @@ describe('Service', function() { 'default_ttl': 3600, 'callback_url': 'http://www.example.com', 'geo_match_level': 'country', - 'number_selection_behavior': 'prefer_sticky', + 'number_selection_behavior': 'prefer-sticky', 'intercept_callback_url': 'http://www.example.com', 'out_of_session_callback_url': 'http://www.example.com', 'date_created': '2015-07-30T20:00:00Z', diff --git a/spec/integration/rest/proxy/v1/service/session/participant.spec.js b/spec/integration/rest/proxy/v1/service/session/participant.spec.js index 6d06abea6c..13b4d15f28 100644 --- a/spec/integration/rest/proxy/v1/service/session/participant.spec.js +++ b/spec/integration/rest/proxy/v1/service/session/participant.spec.js @@ -96,7 +96,7 @@ describe('Participant', function() { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identifier': 'messenger:14155551212', 'proxy_identifier': 'messenger:14155559999', - 'proxy_identifier_sid': 'XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'proxy_identifier_sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'friendly_name': 'a facebook user', 'date_deleted': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', @@ -242,7 +242,7 @@ describe('Participant', function() { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identifier': 'messenger:123456', 'proxy_identifier': 'messenger:987654532', - 'proxy_identifier_sid': 'XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'proxy_identifier_sid': 'PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'friendly_name': 'a facebook user', 'date_deleted': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', diff --git a/spec/integration/rest/serverless/v1/service/build.spec.js b/spec/integration/rest/serverless/v1/service/build.spec.js index 2c38358c5c..6979b14cbf 100644 --- a/spec/integration/rest/serverless/v1/service/build.spec.js +++ b/spec/integration/rest/serverless/v1/service/build.spec.js @@ -140,7 +140,7 @@ describe('Build', function() { } ], 'runtime': 'node10', - 'status': 'deploying', + 'status': 'building', 'date_created': '2018-11-10T20:00:00Z', 'date_updated': '2018-11-10T20:00:00Z', 'url': 'https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000', diff --git a/spec/integration/rest/taskrouter/v1/workspace/task.spec.js b/spec/integration/rest/taskrouter/v1/workspace/task.spec.js index d6626cba5b..68f9593c54 100644 --- a/spec/integration/rest/taskrouter/v1/workspace/task.spec.js +++ b/spec/integration/rest/taskrouter/v1/workspace/task.spec.js @@ -70,14 +70,14 @@ describe('Task', function() { 'task_channel_unique_name': 'task-channel', 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Test Workflow', 'task_queue_friendly_name': 'Test Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } @@ -139,14 +139,14 @@ describe('Task', function() { 'task_channel_unique_name': 'task-channel', 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Test Workflow', 'task_queue_friendly_name': 'Test Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } @@ -210,13 +210,13 @@ describe('Task', function() { function(done) { var body = { 'meta': { - 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', + 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', 'key': 'tasks', 'next_page_url': null, 'page': 0, 'page_size': 50, 'previous_page_url': null, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' }, 'tasks': [ { @@ -235,14 +235,14 @@ describe('Task', function() { 'task_channel_unique_name': 'task-channel', 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Test Workflow', 'task_queue_friendly_name': 'Test Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } @@ -258,13 +258,13 @@ describe('Task', function() { function(done) { var body = { 'meta': { - 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', + 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', 'key': 'tasks', 'next_page_url': null, 'page': 0, 'page_size': 50, 'previous_page_url': null, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' }, 'tasks': [ { @@ -283,14 +283,14 @@ describe('Task', function() { 'task_channel_unique_name': 'task-channel', 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Test Workflow', 'task_queue_friendly_name': 'Test Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } @@ -311,13 +311,13 @@ describe('Task', function() { function(done) { var body = { 'meta': { - 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', + 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', 'key': 'tasks', 'next_page_url': null, 'page': 0, 'page_size': 50, 'previous_page_url': null, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' }, 'tasks': [ { @@ -336,14 +336,14 @@ describe('Task', function() { 'task_channel_unique_name': 'task-channel', 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Test Workflow', 'task_queue_friendly_name': 'Test Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } @@ -381,13 +381,13 @@ describe('Task', function() { function(done) { var body = { 'meta': { - 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', + 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0', 'key': 'tasks', 'next_page_url': null, 'page': 0, 'page_size': 50, 'previous_page_url': null, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending%2Creserved&PageSize=50&Page=0' }, 'tasks': [ { @@ -406,14 +406,14 @@ describe('Task', function() { 'task_channel_unique_name': 'task-channel', 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Test Workflow', 'task_queue_friendly_name': 'Test Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } @@ -437,13 +437,13 @@ describe('Task', function() { function(done) { var body = { 'meta': { - 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0', + 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0', 'key': 'tasks', 'next_page_url': null, 'page': 0, 'page_size': 50, 'previous_page_url': null, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0' + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0' }, 'tasks': [] }; @@ -464,13 +464,13 @@ describe('Task', function() { function(done) { var body = { 'meta': { - 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0', + 'first_page_url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0', 'key': 'tasks', 'next_page_url': null, 'page': 0, 'page_size': 50, 'previous_page_url': null, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0' + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks?TaskQueueSid=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Priority=1&TaskQueueName=task_queue_name&WorkflowName=workflow_name&WorkflowSid=WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AssignmentStatus=pending&PageSize=50&Page=0' }, 'tasks': [] }; @@ -528,13 +528,13 @@ describe('Task', function() { 'timeout': 60, 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow_sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow_sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workflow_friendly_name': 'Example Workflow', 'task_queue_friendly_name': 'Example Task Queue', 'addons': '{}', 'links': { 'task_queue': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'workflow': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'reservations': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations' } diff --git a/spec/integration/rest/taskrouter/v1/workspace/workflow.spec.js b/spec/integration/rest/taskrouter/v1/workspace/workflow.spec.js index 3a88680b38..9ea4b3efcc 100644 --- a/spec/integration/rest/taskrouter/v1/workspace/workflow.spec.js +++ b/spec/integration/rest/taskrouter/v1/workspace/workflow.spec.js @@ -63,14 +63,14 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' } }; @@ -120,13 +120,13 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' }, 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' }; @@ -204,13 +204,13 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' }, 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } @@ -243,13 +243,13 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' }, 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } @@ -287,13 +287,13 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' }, 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } @@ -348,13 +348,13 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' }, 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' } @@ -436,14 +436,14 @@ describe('Workflow', function() { 'document_content_type': 'application/json', 'fallback_assignment_callback_url': null, 'friendly_name': 'Default Fifo Workflow', - 'sid': 'WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'task_reservation_timeout': 120, - 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'workspace_sid': 'WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', - 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', - 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' + 'statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics', + 'real_time_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics', + 'cumulative_statistics': 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics' } }; diff --git a/spec/integration/rest/trunking/v1/trunk/phoneNumber.spec.js b/spec/integration/rest/trunking/v1/trunk/phoneNumber.spec.js index 6b2be6ea5f..b8f4e15ab9 100644 --- a/spec/integration/rest/trunking/v1/trunk/phoneNumber.spec.js +++ b/spec/integration/rest/trunking/v1/trunk/phoneNumber.spec.js @@ -63,19 +63,19 @@ describe('PhoneNumber', function() { 'phone_number': '+14158675309', 'api_version': '2010-04-01', 'voice_caller_id_lookup': null, - 'voice_url': '', + 'voice_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call', 'voice_method': 'POST', 'voice_fallback_url': null, 'voice_fallback_method': null, 'status_callback': '', 'status_callback_method': 'POST', - 'voice_application_sid': null, + 'voice_application_sid': '', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'sms_url': '', + 'sms_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message', 'sms_method': 'POST', 'sms_fallback_url': '', 'sms_fallback_method': 'POST', - 'sms_application_sid': '', + 'sms_application_sid': 'APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'address_requirements': 'none', 'beta': false, 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -176,19 +176,19 @@ describe('PhoneNumber', function() { 'phone_number': '+14158675309', 'api_version': '2010-04-01', 'voice_caller_id_lookup': null, - 'voice_url': '', + 'voice_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call', 'voice_method': 'POST', 'voice_fallback_url': null, 'voice_fallback_method': null, 'status_callback': '', 'status_callback_method': 'POST', - 'voice_application_sid': null, + 'voice_application_sid': '', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'sms_url': '', + 'sms_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message', 'sms_method': 'POST', 'sms_fallback_url': '', 'sms_fallback_method': 'POST', - 'sms_application_sid': '', + 'sms_application_sid': 'APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'address_requirements': 'none', 'beta': false, 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -237,19 +237,19 @@ describe('PhoneNumber', function() { 'phone_number': '+14158675309', 'api_version': '2010-04-01', 'voice_caller_id_lookup': null, - 'voice_url': '', + 'voice_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call', 'voice_method': 'POST', 'voice_fallback_url': null, 'voice_fallback_method': null, 'status_callback': '', 'status_callback_method': 'POST', - 'voice_application_sid': null, + 'voice_application_sid': '', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'sms_url': '', + 'sms_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message', 'sms_method': 'POST', 'sms_fallback_url': '', 'sms_fallback_method': 'POST', - 'sms_application_sid': '', + 'sms_application_sid': 'APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'address_requirements': 'none', 'beta': false, 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -291,19 +291,19 @@ describe('PhoneNumber', function() { 'phone_number': '+14158675309', 'api_version': '2010-04-01', 'voice_caller_id_lookup': null, - 'voice_url': '', + 'voice_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call', 'voice_method': 'POST', 'voice_fallback_url': null, 'voice_fallback_method': null, 'status_callback': '', 'status_callback_method': 'POST', - 'voice_application_sid': null, + 'voice_application_sid': '', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'sms_url': '', + 'sms_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message', 'sms_method': 'POST', 'sms_fallback_url': '', 'sms_fallback_method': 'POST', - 'sms_application_sid': '', + 'sms_application_sid': 'APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'address_requirements': 'none', 'beta': false, 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -350,19 +350,19 @@ describe('PhoneNumber', function() { 'phone_number': '+14158675309', 'api_version': '2010-04-01', 'voice_caller_id_lookup': null, - 'voice_url': '', + 'voice_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call', 'voice_method': 'POST', 'voice_fallback_url': null, 'voice_fallback_method': null, 'status_callback': '', 'status_callback_method': 'POST', - 'voice_application_sid': null, + 'voice_application_sid': '', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'sms_url': '', + 'sms_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message', 'sms_method': 'POST', 'sms_fallback_url': '', 'sms_fallback_method': 'POST', - 'sms_application_sid': '', + 'sms_application_sid': 'APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'address_requirements': 'none', 'beta': false, 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -426,19 +426,19 @@ describe('PhoneNumber', function() { 'phone_number': '+14158675309', 'api_version': '2010-04-01', 'voice_caller_id_lookup': null, - 'voice_url': '', + 'voice_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Call', 'voice_method': 'POST', 'voice_fallback_url': null, 'voice_fallback_method': null, 'status_callback': '', 'status_callback_method': 'POST', - 'voice_application_sid': null, + 'voice_application_sid': '', 'trunk_sid': 'TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - 'sms_url': '', + 'sms_url': 'https://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Proxy/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks/Message', 'sms_method': 'POST', 'sms_fallback_url': '', 'sms_fallback_method': 'POST', - 'sms_application_sid': '', + 'sms_application_sid': 'APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'address_requirements': 'none', 'beta': false, 'url': 'https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', diff --git a/spec/integration/rest/trusthub/v1/supportingDocument.spec.js b/spec/integration/rest/trusthub/v1/supportingDocument.spec.js index b29a643ceb..293ead51a3 100644 --- a/spec/integration/rest/trusthub/v1/supportingDocument.spec.js +++ b/spec/integration/rest/trusthub/v1/supportingDocument.spec.js @@ -55,7 +55,7 @@ describe('SupportingDocument', function() { it('should generate valid create response', function(done) { var body = { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'Business-profile-physical-address', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -86,7 +86,7 @@ describe('SupportingDocument', function() { var body = { 'results': [ { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'Business-profile-physical-address', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -119,7 +119,7 @@ describe('SupportingDocument', function() { var body = { 'results': [ { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'Business-profile-physical-address', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -157,7 +157,7 @@ describe('SupportingDocument', function() { var body = { 'results': [ { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'Business-profile-physical-address', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -236,7 +236,7 @@ describe('SupportingDocument', function() { var body = { 'results': [ { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'Business-profile-physical-address', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -296,7 +296,7 @@ describe('SupportingDocument', function() { it('should generate valid fetch response', function(done) { var body = { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'Business-profile-physical-address', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', @@ -345,7 +345,7 @@ describe('SupportingDocument', function() { it('should generate valid update response', function(done) { var body = { - 'status': 'DRAFT', + 'status': 'draft', 'date_updated': '2021-02-11T17:23:00Z', 'friendly_name': 'friendly_name', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', diff --git a/spec/integration/rest/verify/v2/service/entity/challenge.spec.js b/spec/integration/rest/verify/v2/service/entity/challenge.spec.js index 9a9a9459eb..6b3ce9898c 100644 --- a/spec/integration/rest/verify/v2/service/entity/challenge.spec.js +++ b/spec/integration/rest/verify/v2/service/entity/challenge.spec.js @@ -281,12 +281,12 @@ describe('Challenge', function() { var body = { 'challenges': [ { - 'sid': 'YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'factor_sid': 'YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'factor_sid': 'YF03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', 'date_responded': '2015-07-30T20:00:00Z', @@ -307,9 +307,41 @@ describe('Challenge', function() { 'ip': '172.168.1.234' }, 'factor_type': 'push', - 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + } + }, + { + 'sid': 'YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'identity': 'ff483d1ff591898a9942916050d2ca3f', + 'factor_sid': 'YF02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'date_created': '2015-07-30T20:00:00Z', + 'date_updated': '2015-07-30T20:00:00Z', + 'date_responded': '2015-07-30T20:00:00Z', + 'expiration_date': '2015-07-30T20:00:00Z', + 'status': 'pending', + 'responded_reason': 'none', + 'details': { + 'message': 'Hi! Mr. John Doe, would you like to sign up?', + 'date': '2020-07-01T12:13:14Z', + 'fields': [ + { + 'label': 'Action', + 'value': 'Sign up in portal' + } + ] + }, + 'hidden_details': { + 'ip': '172.168.1.234' + }, + 'factor_type': 'totp', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'links': { + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' } } ], @@ -334,12 +366,12 @@ describe('Challenge', function() { var body = { 'challenges': [ { - 'sid': 'YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'factor_sid': 'YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'factor_sid': 'YF03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', 'date_responded': '2015-07-30T20:00:00Z', @@ -360,9 +392,41 @@ describe('Challenge', function() { 'ip': '172.168.1.234' }, 'factor_type': 'push', - 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'links': { + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + } + }, + { + 'sid': 'YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'identity': 'ff483d1ff591898a9942916050d2ca3f', + 'factor_sid': 'YF02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'date_created': '2015-07-30T20:00:00Z', + 'date_updated': '2015-07-30T20:00:00Z', + 'date_responded': '2015-07-30T20:00:00Z', + 'expiration_date': '2015-07-30T20:00:00Z', + 'status': 'pending', + 'responded_reason': 'none', + 'details': { + 'message': 'Hi! Mr. John Doe, would you like to sign up?', + 'date': '2020-07-01T12:13:14Z', + 'fields': [ + { + 'label': 'Action', + 'value': 'Sign up in portal' + } + ] + }, + 'hidden_details': { + 'ip': '172.168.1.234' + }, + 'factor_type': 'totp', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' } } ], @@ -392,12 +456,12 @@ describe('Challenge', function() { var body = { 'challenges': [ { - 'sid': 'YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'factor_sid': 'YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'factor_sid': 'YF03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', 'date_responded': '2015-07-30T20:00:00Z', @@ -418,9 +482,41 @@ describe('Challenge', function() { 'ip': '172.168.1.234' }, 'factor_type': 'push', - 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'links': { + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + } + }, + { + 'sid': 'YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'identity': 'ff483d1ff591898a9942916050d2ca3f', + 'factor_sid': 'YF02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'date_created': '2015-07-30T20:00:00Z', + 'date_updated': '2015-07-30T20:00:00Z', + 'date_responded': '2015-07-30T20:00:00Z', + 'expiration_date': '2015-07-30T20:00:00Z', + 'status': 'pending', + 'responded_reason': 'none', + 'details': { + 'message': 'Hi! Mr. John Doe, would you like to sign up?', + 'date': '2020-07-01T12:13:14Z', + 'fields': [ + { + 'label': 'Action', + 'value': 'Sign up in portal' + } + ] + }, + 'hidden_details': { + 'ip': '172.168.1.234' + }, + 'factor_type': 'totp', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' } } ], @@ -497,12 +593,12 @@ describe('Challenge', function() { var body = { 'challenges': [ { - 'sid': 'YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'factor_sid': 'YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'factor_sid': 'YF03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', 'date_responded': '2015-07-30T20:00:00Z', @@ -523,9 +619,41 @@ describe('Challenge', function() { 'ip': '172.168.1.234' }, 'factor_type': 'push', - 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + } + }, + { + 'sid': 'YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'identity': 'ff483d1ff591898a9942916050d2ca3f', + 'factor_sid': 'YF02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'date_created': '2015-07-30T20:00:00Z', + 'date_updated': '2015-07-30T20:00:00Z', + 'date_responded': '2015-07-30T20:00:00Z', + 'expiration_date': '2015-07-30T20:00:00Z', + 'status': 'pending', + 'responded_reason': 'none', + 'details': { + 'message': 'Hi! Mr. John Doe, would you like to sign up?', + 'date': '2020-07-01T12:13:14Z', + 'fields': [ + { + 'label': 'Action', + 'value': 'Sign up in portal' + } + ] + }, + 'hidden_details': { + 'ip': '172.168.1.234' + }, + 'factor_type': 'totp', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'links': { + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' } } ], @@ -578,15 +706,15 @@ describe('Challenge', function() { })); } ); - it('should generate valid verify_sid response', + it('should generate valid verify_push response', function(done) { var body = { - 'sid': 'YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'factor_sid': 'YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'factor_sid': 'YF03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', 'date_responded': '2015-07-30T20:00:00Z', @@ -607,9 +735,57 @@ describe('Challenge', function() { 'ip': '172.168.1.234' }, 'factor_type': 'push', - 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'links': { - 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' + } + }; + + holodeck.mock(new Response(200, body)); + + var promise = client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') + .entities('identity') + .challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(); + promise.then(function(response) { + expect(response).toBeDefined(); + done(); + }, function() { + throw new Error('failed'); + }).done(); + } + ); + it('should generate valid verify_totp response', + function(done) { + var body = { + 'sid': 'YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'identity': 'ff483d1ff591898a9942916050d2ca3f', + 'factor_sid': 'YF02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'date_created': '2015-07-30T20:00:00Z', + 'date_updated': '2015-07-30T20:00:00Z', + 'date_responded': '2015-07-30T20:00:00Z', + 'expiration_date': '2015-07-30T20:00:00Z', + 'status': 'approved', + 'responded_reason': 'none', + 'details': { + 'message': 'Hi! Mr. John Doe, would you like to sign up?', + 'date': '2020-07-01T12:13:14Z', + 'fields': [ + { + 'label': 'Action', + 'value': 'Sign up in portal' + } + ] + }, + 'hidden_details': { + 'ip': '172.168.1.234' + }, + 'factor_type': 'totp', + 'url': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'links': { + 'notifications': 'https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YC02aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications' } }; diff --git a/spec/integration/rest/verify/v2/service/entity/challenge/notification.spec.js b/spec/integration/rest/verify/v2/service/entity/challenge/notification.spec.js index a063af4a75..623fb86e80 100644 --- a/spec/integration/rest/verify/v2/service/entity/challenge/notification.spec.js +++ b/spec/integration/rest/verify/v2/service/entity/challenge/notification.spec.js @@ -63,7 +63,7 @@ describe('Notification', function() { 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'challenge_sid': 'YC03XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', + 'challenge_sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'priority': 'high', 'ttl': 150 @@ -91,7 +91,7 @@ describe('Notification', function() { 'service_sid': 'VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'entity_sid': 'YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'identity': 'ff483d1ff591898a9942916050d2ca3f', - 'challenge_sid': 'YC03XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', + 'challenge_sid': 'YC03aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'date_created': '2015-07-30T20:00:00Z', 'priority': 'high', 'ttl': 300 diff --git a/spec/integration/rest/wireless/v1/command.spec.js b/spec/integration/rest/wireless/v1/command.spec.js index 30b384b369..e73d2b1ed9 100644 --- a/spec/integration/rest/wireless/v1/command.spec.js +++ b/spec/integration/rest/wireless/v1/command.spec.js @@ -304,7 +304,7 @@ describe('Command', function() { { 'account_sid': 'ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'command': 'command', - 'command_mode': 'not_confirmable', + 'command_mode': 'binary', 'date_created': '2015-07-30T20:00:00Z', 'date_updated': '2015-07-30T20:00:00Z', 'delivery_receipt_requested': true,