twilio 5.13.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +2 -4
  2. package/lib/rest/InsightsBase.d.ts +3 -0
  3. package/lib/rest/InsightsBase.js +5 -0
  4. package/lib/rest/MessagingBase.d.ts +3 -0
  5. package/lib/rest/MessagingBase.js +5 -0
  6. package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
  7. package/lib/rest/api/v2010/account/call/transcription.js +4 -0
  8. package/lib/rest/api/v2010/account/message.d.ts +2 -0
  9. package/lib/rest/api/v2010/account/message.js +4 -0
  10. package/lib/rest/flexApi/V1.d.ts +0 -5
  11. package/lib/rest/flexApi/V1.js +0 -7
  12. package/lib/rest/iam/V1.d.ts +3 -0
  13. package/lib/rest/iam/V1.js +5 -0
  14. package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
  15. package/lib/rest/iam/v1/rolePermission.js +181 -0
  16. package/lib/rest/insights/V2.d.ts +21 -0
  17. package/lib/rest/insights/V2.js +46 -0
  18. package/lib/rest/insights/v2/inbound.d.ts +436 -0
  19. package/lib/rest/insights/v2/inbound.js +342 -0
  20. package/lib/rest/insights/v2/outbound.d.ts +529 -0
  21. package/lib/rest/insights/v2/outbound.js +392 -0
  22. package/lib/rest/insights/v2/report.d.ts +783 -0
  23. package/lib/rest/insights/v2/report.js +550 -0
  24. package/lib/rest/messaging/V3.d.ts +15 -0
  25. package/lib/rest/messaging/V3.js +37 -0
  26. package/lib/rest/messaging/v2/channelsSender.d.ts +4 -0
  27. package/lib/rest/messaging/v2/channelsSender.js +1 -0
  28. package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
  29. package/lib/rest/messaging/v3/typingIndicator.js +114 -0
  30. package/lib/rest/numbers/V1.d.ts +8 -0
  31. package/lib/rest/numbers/V1.js +12 -0
  32. package/lib/rest/numbers/v1/embeddedSession.d.ts +84 -0
  33. package/lib/rest/numbers/v1/embeddedSession.js +115 -0
  34. package/lib/rest/numbers/v1/senderIdRegistration.d.ts +181 -0
  35. package/lib/rest/numbers/v1/senderIdRegistration.js +146 -0
  36. package/lib/rest/numbers/v2/application.d.ts +191 -4
  37. package/lib/rest/numbers/v2/application.js +176 -3
  38. package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
  39. package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
  40. package/lib/rest/previewIam/versionless/organization/user.d.ts +65 -0
  41. package/lib/rest/previewIam/versionless/organization/user.js +72 -1
  42. package/lib/rest/studio/v2/flow/execution.d.ts +24 -0
  43. package/lib/rest/studio/v2/flow/execution.js +10 -0
  44. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -0
  45. package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
  46. package/lib/rest/studio/v2/flow.d.ts +6 -0
  47. package/lib/rest/studio/v2/flow.js +2 -0
  48. package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
  49. package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
  50. package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
  51. package/lib/rest/verify/v2/service/newChallenge.js +2 -2
  52. package/lib/rest/verify/v2/service/verification.d.ts +2 -2
  53. package/lib/rest/video/v1/room.d.ts +4 -1
  54. package/lib/twiml/VoiceResponse.d.ts +10 -0
  55. package/package.json +2 -2
  56. package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
  57. package/lib/rest/flexApi/v1/createFlexInstance.js +0 -165
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Numbers
9
+ * This is the public Twilio REST API.
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator.
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.SenderIdRegistrationInstance = exports.NumbersV1EmbeddedSession = exports.NumbersV1CreateEmbeddedRegistrationRequest = void 0;
17
+ exports.SenderIdRegistrationListInstance = SenderIdRegistrationListInstance;
18
+ const util_1 = require("util");
19
+ const deserialize = require("../../../base/deserialize");
20
+ const serialize = require("../../../base/serialize");
21
+ class NumbersV1CreateEmbeddedRegistrationRequest {
22
+ constructor(payload) {
23
+ this.regulationId = payload["regulationId"];
24
+ this.regulationVersion = payload["regulationVersion"];
25
+ this.friendlyName = payload["friendlyName"];
26
+ this.statusNotificationEmail = payload["statusNotificationEmail"];
27
+ this.statusCallbackUrl = payload["statusCallbackUrl"];
28
+ this.comments = payload["comments"];
29
+ this.themeSetId = payload["themeSetId"];
30
+ this.data = payload["data"];
31
+ }
32
+ }
33
+ exports.NumbersV1CreateEmbeddedRegistrationRequest = NumbersV1CreateEmbeddedRegistrationRequest;
34
+ class NumbersV1EmbeddedSession {
35
+ constructor(payload) {
36
+ this.sessionId = payload["sessionId"];
37
+ this.sessionToken = payload["sessionToken"];
38
+ }
39
+ }
40
+ exports.NumbersV1EmbeddedSession = NumbersV1EmbeddedSession;
41
+ function SenderIdRegistrationListInstance(version) {
42
+ const instance = {};
43
+ instance._version = version;
44
+ instance._solution = {};
45
+ instance._uri = `/SenderIdRegistrations`;
46
+ instance.create = function create(params, headers, callback) {
47
+ if (params === null || params === undefined) {
48
+ throw new Error('Required parameter "params" missing.');
49
+ }
50
+ let data = {};
51
+ data = params;
52
+ if (headers === null || headers === undefined) {
53
+ headers = {};
54
+ }
55
+ headers["Content-Type"] = "application/json";
56
+ headers["Accept"] = "application/json";
57
+ let operationVersion = version, operationPromise = operationVersion.create({
58
+ uri: instance._uri,
59
+ method: "post",
60
+ data,
61
+ headers,
62
+ });
63
+ operationPromise = operationPromise.then((payload) => new SenderIdRegistrationInstance(operationVersion, payload));
64
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
65
+ return operationPromise;
66
+ };
67
+ instance.createWithHttpInfo = function createWithHttpInfo(params, headers, callback) {
68
+ if (params === null || params === undefined) {
69
+ throw new Error('Required parameter "params" missing.');
70
+ }
71
+ let data = {};
72
+ data = params;
73
+ if (headers === null || headers === undefined) {
74
+ headers = {};
75
+ }
76
+ headers["Content-Type"] = "application/json";
77
+ headers["Accept"] = "application/json";
78
+ let operationVersion = version;
79
+ // CREATE, FETCH, UPDATE operations
80
+ let operationPromise = operationVersion
81
+ .createWithResponseInfo({
82
+ uri: instance._uri,
83
+ method: "post",
84
+ data,
85
+ headers,
86
+ })
87
+ .then((response) => ({
88
+ ...response,
89
+ body: new SenderIdRegistrationInstance(operationVersion, response.body),
90
+ }));
91
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
92
+ return operationPromise;
93
+ };
94
+ instance.toJSON = function toJSON() {
95
+ return instance._solution;
96
+ };
97
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
98
+ return (0, util_1.inspect)(instance.toJSON(), options);
99
+ };
100
+ return instance;
101
+ }
102
+ class SenderIdRegistrationInstance {
103
+ constructor(_version, payload) {
104
+ this._version = _version;
105
+ this.id = payload.id;
106
+ this.regulationId = payload.regulationId;
107
+ this.regulationVersion = deserialize.integer(payload.regulationVersion);
108
+ this.friendlyName = payload.friendlyName;
109
+ this.status = payload.status;
110
+ this.statusNotificationEmail = payload.statusNotificationEmail;
111
+ this.statusCallbackUrl = payload.statusCallbackUrl;
112
+ this.comments = payload.comments;
113
+ this.embeddedSession =
114
+ payload.embeddedSession !== null && payload.embeddedSession !== undefined
115
+ ? new NumbersV1EmbeddedSession(payload.embeddedSession)
116
+ : null;
117
+ this.data = payload.data;
118
+ this.dateCreated = deserialize.iso8601DateTime(payload.dateCreated);
119
+ this.dateUpdated = deserialize.iso8601DateTime(payload.dateUpdated);
120
+ }
121
+ /**
122
+ * Provide a user-friendly representation
123
+ *
124
+ * @returns Object
125
+ */
126
+ toJSON() {
127
+ return {
128
+ id: this.id,
129
+ regulationId: this.regulationId,
130
+ regulationVersion: this.regulationVersion,
131
+ friendlyName: this.friendlyName,
132
+ status: this.status,
133
+ statusNotificationEmail: this.statusNotificationEmail,
134
+ statusCallbackUrl: this.statusCallbackUrl,
135
+ comments: this.comments,
136
+ embeddedSession: this.embeddedSession,
137
+ data: this.data,
138
+ dateCreated: this.dateCreated,
139
+ dateUpdated: this.dateUpdated,
140
+ };
141
+ }
142
+ [util_1.inspect.custom](_depth, options) {
143
+ return (0, util_1.inspect)(this.toJSON(), options);
144
+ }
145
+ }
146
+ exports.SenderIdRegistrationInstance = SenderIdRegistrationInstance;
@@ -30,6 +30,91 @@ export declare class CreateShortCodeApplicationRequestSetup {
30
30
  "chargesApply": boolean;
31
31
  constructor(payload: any);
32
32
  }
33
+ /**
34
+ * Business information associated with the application.
35
+ */
36
+ export declare class CreateShortCodeApplicationResponseBusinessInformation {
37
+ "managingCompanyProfile"?: string;
38
+ "customerFacingProfile"?: string;
39
+ "businessWebsite"?: string;
40
+ "einManagingCompanyProfile"?: string;
41
+ "einCustomerFacingProfile"?: string;
42
+ constructor(payload: any);
43
+ }
44
+ /**
45
+ * Compliance keywords for the application.
46
+ */
47
+ export declare class CreateShortCodeApplicationResponseComplianceKeywords {
48
+ "help"?: string;
49
+ "stop"?: string;
50
+ "info"?: string;
51
+ "aide"?: string;
52
+ "arret"?: string;
53
+ "optOutFiltering"?: boolean;
54
+ constructor(payload: any);
55
+ }
56
+ /**
57
+ * Content examples for the application.
58
+ */
59
+ export declare class CreateShortCodeApplicationResponseContentExamples {
60
+ "examples"?: Array<string>;
61
+ constructor(payload: any);
62
+ }
63
+ /**
64
+ * Setup configuration for the application.
65
+ */
66
+ export declare class CreateShortCodeApplicationResponseSetup {
67
+ "requestType"?: string;
68
+ "trafficType"?: string;
69
+ "leaseType"?: string;
70
+ "paymentFrequency"?: string;
71
+ "shortCodePreference"?: string;
72
+ "mmsEnabled"?: boolean;
73
+ "freeToEndUser"?: boolean;
74
+ "chargesApply"?: boolean;
75
+ "currentProvider"?: string;
76
+ "migratedMmsEnabled"?: boolean;
77
+ "migratedLiveTraffic"?: boolean;
78
+ constructor(payload: any);
79
+ }
80
+ /**
81
+ * SMS campaign details for the application.
82
+ */
83
+ export declare class CreateShortCodeApplicationResponseSmsCampaignDetails {
84
+ "campaignName"?: string;
85
+ "campaignBrandWebsite"?: string;
86
+ "customerCareChannel"?: string;
87
+ "customerCareValue"?: string;
88
+ "campaignFrequency"?: Array<string>;
89
+ "scUseCaseCategories"?: Array<string>;
90
+ "smsTermsOfServiceUrl"?: string;
91
+ "smsPrivacyPolicyUrl"?: string;
92
+ "monthlyOutboundVolumeExpected"?: string;
93
+ "monthlyInboundVolumeExpected"?: string;
94
+ "avgMonthlyMessagesSentToEachSubscriber"?: string;
95
+ "avgMonthlyMessagesReceivedFromSubscribers"?: string;
96
+ "estimatedTotalSubscribers"?: string;
97
+ "durationOfTheCampaign"?: string;
98
+ "plannedTrafficSpikes"?: string;
99
+ "spikeDetails"?: string;
100
+ "expectedTrafficStartDate"?: string;
101
+ constructor(payload: any);
102
+ }
103
+ /**
104
+ * User sign-up configuration for the application.
105
+ */
106
+ export declare class CreateShortCodeApplicationResponseUserSignUp {
107
+ "signUpOptions"?: Array<string>;
108
+ "doubleOptInProcess"?: boolean;
109
+ "doubleOptInMessage"?: string;
110
+ "signUpConfirmationMessage"?: string;
111
+ "doubleOptInResponseMessage"?: string;
112
+ "onlineWebFormMessage"?: string;
113
+ "keywordMessage"?: string;
114
+ "ivrMessage"?: string;
115
+ "otherFormMessage"?: string;
116
+ constructor(payload: any);
117
+ }
33
118
  /**
34
119
  * Options to pass to create a ApplicationInstance
35
120
  */
@@ -41,6 +126,16 @@ export interface ApplicationListInstanceCreateOptions {
41
126
  * Options to pass to each
42
127
  */
43
128
  export interface ApplicationListInstanceEachOptions {
129
+ /** The Account SID to filter by. */
130
+ accountSid?: string;
131
+ /** The ISO country to filter by. */
132
+ isoCountry?: string;
133
+ /** The application status to filter by. */
134
+ status?: string;
135
+ /** The friendly name to filter by. */
136
+ friendlyName?: string;
137
+ /** The application SID to filter by. */
138
+ sid?: string;
44
139
  /** How many resources to return in each list page. The default is 50, and the maximum is 50. */
45
140
  pageSize?: number;
46
141
  /** Function to process each record. If this and a positional callback are passed, this one will be used */
@@ -54,6 +149,16 @@ export interface ApplicationListInstanceEachOptions {
54
149
  * Options to pass to list
55
150
  */
56
151
  export interface ApplicationListInstanceOptions {
152
+ /** The Account SID to filter by. */
153
+ accountSid?: string;
154
+ /** The ISO country to filter by. */
155
+ isoCountry?: string;
156
+ /** The application status to filter by. */
157
+ status?: string;
158
+ /** The friendly name to filter by. */
159
+ friendlyName?: string;
160
+ /** The application SID to filter by. */
161
+ sid?: string;
57
162
  /** How many resources to return in each list page. The default is 50, and the maximum is 50. */
58
163
  pageSize?: number;
59
164
  /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
@@ -63,6 +168,16 @@ export interface ApplicationListInstanceOptions {
63
168
  * Options to pass to page
64
169
  */
65
170
  export interface ApplicationListInstancePageOptions {
171
+ /** The Account SID to filter by. */
172
+ accountSid?: string;
173
+ /** The ISO country to filter by. */
174
+ isoCountry?: string;
175
+ /** The application status to filter by. */
176
+ status?: string;
177
+ /** The friendly name to filter by. */
178
+ friendlyName?: string;
179
+ /** The application SID to filter by. */
180
+ sid?: string;
66
181
  /** How many resources to return in each list page. The default is 50, and the maximum is 50. */
67
182
  pageSize?: number;
68
183
  /** Page Number, this value is simply for client state */
@@ -116,11 +231,26 @@ interface ApplicationPayload extends TwilioResponsePayload {
116
231
  }
117
232
  interface ApplicationResource {
118
233
  sid: string;
119
- bundle_sid: string;
120
234
  application_requirements_sid: string;
235
+ application_requirements_version: number;
236
+ account_sid: string;
237
+ bundle_sid: string;
238
+ reviewer: string;
239
+ zendesk_ticket_id: string;
121
240
  friendly_name: string;
241
+ notification_emails: Array<string>;
122
242
  iso_country: string;
123
243
  state: string;
244
+ setup: CreateShortCodeApplicationResponseSetup;
245
+ business_information: CreateShortCodeApplicationResponseBusinessInformation;
246
+ user_sign_up: CreateShortCodeApplicationResponseUserSignUp;
247
+ compliance_keywords: CreateShortCodeApplicationResponseComplianceKeywords;
248
+ content_examples: CreateShortCodeApplicationResponseContentExamples;
249
+ sms_campaign_details: CreateShortCodeApplicationResponseSmsCampaignDetails;
250
+ date_created: Date;
251
+ date_updated: Date;
252
+ created_by: string;
253
+ updated_by: string;
124
254
  }
125
255
  export declare class ApplicationInstance {
126
256
  protected _version: V2;
@@ -131,18 +261,38 @@ export declare class ApplicationInstance {
131
261
  * The unique identifier of the Short Code Application.
132
262
  */
133
263
  sid: string;
264
+ /**
265
+ * The Application Requirements SID.
266
+ */
267
+ applicationRequirementsSid: string;
268
+ /**
269
+ * The version of the application requirements.
270
+ */
271
+ applicationRequirementsVersion: number;
272
+ /**
273
+ * The Account SID associated with the application.
274
+ */
275
+ accountSid: string;
134
276
  /**
135
277
  * The Bundle SID for regulatory compliance.
136
278
  */
137
279
  bundleSid: string;
138
280
  /**
139
- * The Application Requirements SID.
281
+ * The reviewer of the application.
140
282
  */
141
- applicationRequirementsSid: string;
283
+ reviewer: string;
284
+ /**
285
+ * The Zendesk ticket ID associated with the application.
286
+ */
287
+ zendeskTicketId: string;
142
288
  /**
143
289
  * The friendly name of the application.
144
290
  */
145
291
  friendlyName: string;
292
+ /**
293
+ * The notification emails for the application.
294
+ */
295
+ notificationEmails: Array<string>;
146
296
  /**
147
297
  * The ISO country code.
148
298
  */
@@ -151,6 +301,28 @@ export declare class ApplicationInstance {
151
301
  * The state of the application.
152
302
  */
153
303
  state: string;
304
+ setup: CreateShortCodeApplicationResponseSetup;
305
+ businessInformation: CreateShortCodeApplicationResponseBusinessInformation;
306
+ userSignUp: CreateShortCodeApplicationResponseUserSignUp;
307
+ complianceKeywords: CreateShortCodeApplicationResponseComplianceKeywords;
308
+ contentExamples: CreateShortCodeApplicationResponseContentExamples;
309
+ smsCampaignDetails: CreateShortCodeApplicationResponseSmsCampaignDetails;
310
+ /**
311
+ * The date and time the application was created.
312
+ */
313
+ dateCreated: Date;
314
+ /**
315
+ * The date and time the application was last updated.
316
+ */
317
+ dateUpdated: Date;
318
+ /**
319
+ * The identity of the user who created the application.
320
+ */
321
+ createdBy: string;
322
+ /**
323
+ * The identity of the user who last updated the application.
324
+ */
325
+ updatedBy: string;
154
326
  private get _proxy();
155
327
  /**
156
328
  * Fetch a ApplicationInstance
@@ -175,11 +347,26 @@ export declare class ApplicationInstance {
175
347
  */
176
348
  toJSON(): {
177
349
  sid: string;
178
- bundleSid: string;
179
350
  applicationRequirementsSid: string;
351
+ applicationRequirementsVersion: number;
352
+ accountSid: string;
353
+ bundleSid: string;
354
+ reviewer: string;
355
+ zendeskTicketId: string;
180
356
  friendlyName: string;
357
+ notificationEmails: string[];
181
358
  isoCountry: string;
182
359
  state: string;
360
+ setup: CreateShortCodeApplicationResponseSetup;
361
+ businessInformation: CreateShortCodeApplicationResponseBusinessInformation;
362
+ userSignUp: CreateShortCodeApplicationResponseUserSignUp;
363
+ complianceKeywords: CreateShortCodeApplicationResponseComplianceKeywords;
364
+ contentExamples: CreateShortCodeApplicationResponseContentExamples;
365
+ smsCampaignDetails: CreateShortCodeApplicationResponseSmsCampaignDetails;
366
+ dateCreated: Date;
367
+ dateUpdated: Date;
368
+ createdBy: string;
369
+ updatedBy: string;
183
370
  };
184
371
  [inspect.custom](_depth: any, options: InspectOptions): string;
185
372
  }
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  return (mod && mod.__esModule) ? mod : { "default": mod };
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.ApplicationPage = exports.ApplicationInstance = exports.ApplicationContextImpl = exports.CreateShortCodeApplicationRequestSetup = exports.CreateShortCodeApplicationRequestBusinessInformation = exports.CreateShortCodeApplicationRequest = void 0;
19
+ exports.ApplicationPage = exports.ApplicationInstance = exports.ApplicationContextImpl = exports.CreateShortCodeApplicationResponseUserSignUp = exports.CreateShortCodeApplicationResponseSmsCampaignDetails = exports.CreateShortCodeApplicationResponseSetup = exports.CreateShortCodeApplicationResponseContentExamples = exports.CreateShortCodeApplicationResponseComplianceKeywords = exports.CreateShortCodeApplicationResponseBusinessInformation = exports.CreateShortCodeApplicationRequestSetup = exports.CreateShortCodeApplicationRequestBusinessInformation = exports.CreateShortCodeApplicationRequest = void 0;
20
20
  exports.ApplicationListInstance = ApplicationListInstance;
21
21
  const util_1 = require("util");
22
22
  const Page_1 = __importDefault(require("../../../base/Page"));
@@ -47,6 +47,107 @@ class CreateShortCodeApplicationRequestSetup {
47
47
  }
48
48
  }
49
49
  exports.CreateShortCodeApplicationRequestSetup = CreateShortCodeApplicationRequestSetup;
50
+ /**
51
+ * Business information associated with the application.
52
+ */
53
+ class CreateShortCodeApplicationResponseBusinessInformation {
54
+ constructor(payload) {
55
+ this.managingCompanyProfile = payload["managing_company_profile"];
56
+ this.customerFacingProfile = payload["customer_facing_profile"];
57
+ this.businessWebsite = payload["business_website"];
58
+ this.einManagingCompanyProfile = payload["ein_managing_company_profile"];
59
+ this.einCustomerFacingProfile = payload["ein_customer_facing_profile"];
60
+ }
61
+ }
62
+ exports.CreateShortCodeApplicationResponseBusinessInformation = CreateShortCodeApplicationResponseBusinessInformation;
63
+ /**
64
+ * Compliance keywords for the application.
65
+ */
66
+ class CreateShortCodeApplicationResponseComplianceKeywords {
67
+ constructor(payload) {
68
+ this.help = payload["help"];
69
+ this.stop = payload["stop"];
70
+ this.info = payload["info"];
71
+ this.aide = payload["aide"];
72
+ this.arret = payload["arret"];
73
+ this.optOutFiltering = payload["opt_out_filtering"];
74
+ }
75
+ }
76
+ exports.CreateShortCodeApplicationResponseComplianceKeywords = CreateShortCodeApplicationResponseComplianceKeywords;
77
+ /**
78
+ * Content examples for the application.
79
+ */
80
+ class CreateShortCodeApplicationResponseContentExamples {
81
+ constructor(payload) {
82
+ this.examples = payload["examples"];
83
+ }
84
+ }
85
+ exports.CreateShortCodeApplicationResponseContentExamples = CreateShortCodeApplicationResponseContentExamples;
86
+ /**
87
+ * Setup configuration for the application.
88
+ */
89
+ class CreateShortCodeApplicationResponseSetup {
90
+ constructor(payload) {
91
+ this.requestType = payload["request_type"];
92
+ this.trafficType = payload["traffic_type"];
93
+ this.leaseType = payload["lease_type"];
94
+ this.paymentFrequency = payload["payment_frequency"];
95
+ this.shortCodePreference = payload["short_code_preference"];
96
+ this.mmsEnabled = payload["mms_enabled"];
97
+ this.freeToEndUser = payload["free_to_end_user"];
98
+ this.chargesApply = payload["charges_apply"];
99
+ this.currentProvider = payload["current_provider"];
100
+ this.migratedMmsEnabled = payload["migrated_mms_enabled"];
101
+ this.migratedLiveTraffic = payload["migrated_live_traffic"];
102
+ }
103
+ }
104
+ exports.CreateShortCodeApplicationResponseSetup = CreateShortCodeApplicationResponseSetup;
105
+ /**
106
+ * SMS campaign details for the application.
107
+ */
108
+ class CreateShortCodeApplicationResponseSmsCampaignDetails {
109
+ constructor(payload) {
110
+ this.campaignName = payload["campaign_name"];
111
+ this.campaignBrandWebsite = payload["campaign_brand_website"];
112
+ this.customerCareChannel = payload["customer_care_channel"];
113
+ this.customerCareValue = payload["customer_care_value"];
114
+ this.campaignFrequency = payload["campaign_frequency"];
115
+ this.scUseCaseCategories = payload["sc_use_case_categories"];
116
+ this.smsTermsOfServiceUrl = payload["sms_terms_of_service_url"];
117
+ this.smsPrivacyPolicyUrl = payload["sms_privacy_policy_url"];
118
+ this.monthlyOutboundVolumeExpected =
119
+ payload["monthly_outbound_volume_expected"];
120
+ this.monthlyInboundVolumeExpected =
121
+ payload["monthly_inbound_volume_expected"];
122
+ this.avgMonthlyMessagesSentToEachSubscriber =
123
+ payload["avg_monthly_messages_sent_to_each_subscriber"];
124
+ this.avgMonthlyMessagesReceivedFromSubscribers =
125
+ payload["avg_monthly_messages_received_from_subscribers"];
126
+ this.estimatedTotalSubscribers = payload["estimated_total_subscribers"];
127
+ this.durationOfTheCampaign = payload["duration_of_the_campaign"];
128
+ this.plannedTrafficSpikes = payload["planned_traffic_spikes"];
129
+ this.spikeDetails = payload["spike_details"];
130
+ this.expectedTrafficStartDate = payload["expected_traffic_start_date"];
131
+ }
132
+ }
133
+ exports.CreateShortCodeApplicationResponseSmsCampaignDetails = CreateShortCodeApplicationResponseSmsCampaignDetails;
134
+ /**
135
+ * User sign-up configuration for the application.
136
+ */
137
+ class CreateShortCodeApplicationResponseUserSignUp {
138
+ constructor(payload) {
139
+ this.signUpOptions = payload["sign_up_options"];
140
+ this.doubleOptInProcess = payload["double_opt_in_process"];
141
+ this.doubleOptInMessage = payload["double_opt_in_message"];
142
+ this.signUpConfirmationMessage = payload["sign_up_confirmation_message"];
143
+ this.doubleOptInResponseMessage = payload["double_opt_in_response_message"];
144
+ this.onlineWebFormMessage = payload["online_web_form_message"];
145
+ this.keywordMessage = payload["keyword_message"];
146
+ this.ivrMessage = payload["ivr_message"];
147
+ this.otherFormMessage = payload["other_form_message"];
148
+ }
149
+ }
150
+ exports.CreateShortCodeApplicationResponseUserSignUp = CreateShortCodeApplicationResponseUserSignUp;
50
151
  class ApplicationContextImpl {
51
152
  constructor(_version, sid) {
52
153
  this._version = _version;
@@ -105,11 +206,48 @@ class ApplicationInstance {
105
206
  constructor(_version, payload, sid) {
106
207
  this._version = _version;
107
208
  this.sid = payload.sid;
108
- this.bundleSid = payload.bundle_sid;
109
209
  this.applicationRequirementsSid = payload.application_requirements_sid;
210
+ this.applicationRequirementsVersion = deserialize.integer(payload.application_requirements_version);
211
+ this.accountSid = payload.account_sid;
212
+ this.bundleSid = payload.bundle_sid;
213
+ this.reviewer = payload.reviewer;
214
+ this.zendeskTicketId = payload.zendesk_ticket_id;
110
215
  this.friendlyName = payload.friendly_name;
216
+ this.notificationEmails = payload.notification_emails;
111
217
  this.isoCountry = payload.iso_country;
112
218
  this.state = payload.state;
219
+ this.setup =
220
+ payload.setup !== null && payload.setup !== undefined
221
+ ? new CreateShortCodeApplicationResponseSetup(payload.setup)
222
+ : null;
223
+ this.businessInformation =
224
+ payload.business_information !== null &&
225
+ payload.business_information !== undefined
226
+ ? new CreateShortCodeApplicationResponseBusinessInformation(payload.business_information)
227
+ : null;
228
+ this.userSignUp =
229
+ payload.user_sign_up !== null && payload.user_sign_up !== undefined
230
+ ? new CreateShortCodeApplicationResponseUserSignUp(payload.user_sign_up)
231
+ : null;
232
+ this.complianceKeywords =
233
+ payload.compliance_keywords !== null &&
234
+ payload.compliance_keywords !== undefined
235
+ ? new CreateShortCodeApplicationResponseComplianceKeywords(payload.compliance_keywords)
236
+ : null;
237
+ this.contentExamples =
238
+ payload.content_examples !== null &&
239
+ payload.content_examples !== undefined
240
+ ? new CreateShortCodeApplicationResponseContentExamples(payload.content_examples)
241
+ : null;
242
+ this.smsCampaignDetails =
243
+ payload.sms_campaign_details !== null &&
244
+ payload.sms_campaign_details !== undefined
245
+ ? new CreateShortCodeApplicationResponseSmsCampaignDetails(payload.sms_campaign_details)
246
+ : null;
247
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
248
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
249
+ this.createdBy = payload.created_by;
250
+ this.updatedBy = payload.updated_by;
113
251
  this._solution = { sid: sid || this.sid };
114
252
  }
115
253
  get _proxy() {
@@ -146,11 +284,26 @@ class ApplicationInstance {
146
284
  toJSON() {
147
285
  return {
148
286
  sid: this.sid,
149
- bundleSid: this.bundleSid,
150
287
  applicationRequirementsSid: this.applicationRequirementsSid,
288
+ applicationRequirementsVersion: this.applicationRequirementsVersion,
289
+ accountSid: this.accountSid,
290
+ bundleSid: this.bundleSid,
291
+ reviewer: this.reviewer,
292
+ zendeskTicketId: this.zendeskTicketId,
151
293
  friendlyName: this.friendlyName,
294
+ notificationEmails: this.notificationEmails,
152
295
  isoCountry: this.isoCountry,
153
296
  state: this.state,
297
+ setup: this.setup,
298
+ businessInformation: this.businessInformation,
299
+ userSignUp: this.userSignUp,
300
+ complianceKeywords: this.complianceKeywords,
301
+ contentExamples: this.contentExamples,
302
+ smsCampaignDetails: this.smsCampaignDetails,
303
+ dateCreated: this.dateCreated,
304
+ dateUpdated: this.dateUpdated,
305
+ createdBy: this.createdBy,
306
+ updatedBy: this.updatedBy,
154
307
  };
155
308
  }
156
309
  [util_1.inspect.custom](_depth, options) {
@@ -223,6 +376,16 @@ function ApplicationListInstance(version) {
223
376
  params = params || {};
224
377
  }
225
378
  let data = {};
379
+ if (params["accountSid"] !== undefined)
380
+ data["AccountSid"] = params["accountSid"];
381
+ if (params["isoCountry"] !== undefined)
382
+ data["IsoCountry"] = params["isoCountry"];
383
+ if (params["status"] !== undefined)
384
+ data["Status"] = params["status"];
385
+ if (params["friendlyName"] !== undefined)
386
+ data["FriendlyName"] = params["friendlyName"];
387
+ if (params["sid"] !== undefined)
388
+ data["Sid"] = params["sid"];
226
389
  if (params["pageSize"] !== undefined)
227
390
  data["PageSize"] = params["pageSize"];
228
391
  if (params.pageNumber !== undefined)
@@ -261,6 +424,16 @@ function ApplicationListInstance(version) {
261
424
  params = params || {};
262
425
  }
263
426
  let data = {};
427
+ if (params["accountSid"] !== undefined)
428
+ data["AccountSid"] = params["accountSid"];
429
+ if (params["isoCountry"] !== undefined)
430
+ data["IsoCountry"] = params["isoCountry"];
431
+ if (params["status"] !== undefined)
432
+ data["Status"] = params["status"];
433
+ if (params["friendlyName"] !== undefined)
434
+ data["FriendlyName"] = params["friendlyName"];
435
+ if (params["sid"] !== undefined)
436
+ data["Sid"] = params["sid"];
264
437
  if (params["pageSize"] !== undefined)
265
438
  data["PageSize"] = params["pageSize"];
266
439
  if (params.pageNumber !== undefined)
@@ -101,7 +101,7 @@ interface HostedNumberOrderResource {
101
101
  }
102
102
  export declare class HostedNumberOrderInstance {
103
103
  protected _version: V3;
104
- constructor(_version: V3, payload: HostedNumberOrderResource);
104
+ constructor(_version: V3, _payload: HostedNumberOrderResource);
105
105
  /**
106
106
  * A 34 character string that uniquely identifies this HostedNumberOrder.
107
107
  */
@@ -152,8 +152,9 @@ function HostedNumberOrderListInstance(version) {
152
152
  return instance;
153
153
  }
154
154
  class HostedNumberOrderInstance {
155
- constructor(_version, payload) {
155
+ constructor(_version, _payload) {
156
156
  this._version = _version;
157
+ const payload = _payload;
157
158
  this.sid = payload.sid;
158
159
  this.accountSid = payload.accountSid;
159
160
  this.incomingPhoneNumberSid = payload.incomingPhoneNumberSid;