twilio 5.12.2 → 5.13.1
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.
- package/README.md +1 -0
- package/lib/rest/InsightsBase.d.ts +3 -0
- package/lib/rest/InsightsBase.js +5 -0
- package/lib/rest/api/v2010/account/call/payment.d.ts +6 -2
- package/lib/rest/api/v2010/account/call/payment.js +8 -0
- package/lib/rest/api/v2010/account/call/transcription.d.ts +4 -0
- package/lib/rest/api/v2010/account/call/transcription.js +8 -0
- package/lib/rest/api/v2010/account/token.d.ts +1 -0
- package/lib/rest/api/v2010/account/token.js +10 -1
- package/lib/rest/assistants/v1/assistant/feedback.d.ts +1 -0
- package/lib/rest/assistants/v1/assistant/feedback.js +6 -0
- package/lib/rest/assistants/v1/assistant/message.d.ts +1 -0
- package/lib/rest/assistants/v1/assistant/message.js +7 -0
- package/lib/rest/assistants/v1/assistant.d.ts +6 -0
- package/lib/rest/assistants/v1/assistant.js +58 -2
- package/lib/rest/assistants/v1/knowledge.d.ts +3 -0
- package/lib/rest/assistants/v1/knowledge.js +24 -0
- package/lib/rest/assistants/v1/tool.d.ts +4 -0
- package/lib/rest/assistants/v1/tool.js +40 -1
- package/lib/rest/content/v1/content/approvalCreate.d.ts +1 -0
- package/lib/rest/content/v1/content/approvalCreate.js +4 -0
- package/lib/rest/content/v1/content.d.ts +27 -0
- package/lib/rest/content/v1/content.js +171 -0
- package/lib/rest/flexApi/v1/createFlexInstance.d.ts +2 -0
- package/lib/rest/flexApi/v1/createFlexInstance.js +6 -0
- package/lib/rest/iam/v1/oAuthApp.d.ts +4 -0
- package/lib/rest/iam/v1/oAuthApp.js +28 -1
- package/lib/rest/insights/V2.d.ts +21 -0
- package/lib/rest/insights/V2.js +46 -0
- package/lib/rest/insights/v2/inbound.d.ts +436 -0
- package/lib/rest/insights/v2/inbound.js +342 -0
- package/lib/rest/insights/v2/outbound.d.ts +529 -0
- package/lib/rest/insights/v2/outbound.js +392 -0
- package/lib/rest/insights/v2/report.d.ts +783 -0
- package/lib/rest/insights/v2/report.js +550 -0
- package/lib/rest/intelligence/v2/operatorType.d.ts +6 -0
- package/lib/rest/intelligence/v2/operatorType.js +4 -0
- package/lib/rest/knowledge/v1/knowledge.d.ts +3 -0
- package/lib/rest/knowledge/v1/knowledge.js +23 -0
- package/lib/rest/lookups/v2/bucket.d.ts +1 -0
- package/lib/rest/lookups/v2/bucket.js +4 -0
- package/lib/rest/lookups/v2/lookupOverride.d.ts +1 -0
- package/lib/rest/lookups/v2/lookupOverride.js +4 -0
- package/lib/rest/lookups/v2/phoneNumber.d.ts +9 -0
- package/lib/rest/lookups/v2/phoneNumber.js +94 -8
- package/lib/rest/lookups/v2/query.d.ts +15 -0
- package/lib/rest/lookups/v2/query.js +113 -1
- package/lib/rest/lookups/v2/rateLimit.d.ts +1 -0
- package/lib/rest/lookups/v2/rateLimit.js +11 -1
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +2 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +13 -1
- package/lib/rest/marketplace/v1/referralConversion.d.ts +1 -0
- package/lib/rest/marketplace/v1/referralConversion.js +3 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +78 -5
- package/lib/rest/messaging/v1/service/usAppToPerson.js +60 -20
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +26 -24
- package/lib/rest/messaging/v2/channelsSender.d.ts +18 -0
- package/lib/rest/messaging/v2/channelsSender.js +115 -6
- package/lib/rest/numbers/V1.d.ts +8 -0
- package/lib/rest/numbers/V1.js +12 -0
- package/lib/rest/numbers/v1/embeddedSession.d.ts +84 -0
- package/lib/rest/numbers/v1/embeddedSession.js +115 -0
- package/lib/rest/numbers/v1/portingPortIn.d.ts +5 -0
- package/lib/rest/numbers/v1/portingPortIn.js +67 -2
- package/lib/rest/numbers/v1/senderIdRegistration.d.ts +181 -0
- package/lib/rest/numbers/v1/senderIdRegistration.js +146 -0
- package/lib/rest/numbers/v2/application.d.ts +194 -4
- package/lib/rest/numbers/v2/application.js +188 -3
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +1 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.js +5 -0
- package/lib/rest/previewIam/versionless/organization/user.d.ts +69 -0
- package/lib/rest/previewIam/versionless/organization/user.js +117 -4
- package/lib/rest/pricing/v1/messaging/country.d.ts +3 -0
- package/lib/rest/pricing/v1/messaging/country.js +26 -2
- package/lib/rest/pricing/v1/phoneNumber/country.d.ts +1 -0
- package/lib/rest/pricing/v1/phoneNumber/country.js +10 -1
- package/lib/rest/pricing/v1/voice/country.d.ts +2 -0
- package/lib/rest/pricing/v1/voice/country.js +21 -2
- package/lib/rest/pricing/v1/voice/number.d.ts +2 -0
- package/lib/rest/pricing/v1/voice/number.js +19 -2
- package/lib/rest/pricing/v2/country.d.ts +2 -0
- package/lib/rest/pricing/v2/country.js +22 -2
- package/lib/rest/pricing/v2/number.d.ts +2 -0
- package/lib/rest/pricing/v2/number.js +22 -2
- package/lib/rest/pricing/v2/voice/country.d.ts +2 -0
- package/lib/rest/pricing/v2/voice/country.js +22 -2
- package/lib/rest/pricing/v2/voice/number.d.ts +2 -0
- package/lib/rest/pricing/v2/voice/number.js +20 -2
- package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
- package/lib/rest/studio/v2/flow/execution.js +4 -0
- package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -0
- package/lib/rest/studio/v2/flow/flowRevision.js +2 -0
- package/lib/rest/studio/v2/flow.d.ts +6 -0
- package/lib/rest/studio/v2/flow.js +2 -0
- package/lib/rest/verify/v2/service/approveChallenge.d.ts +2 -0
- package/lib/rest/verify/v2/service/approveChallenge.js +13 -0
- package/lib/rest/verify/v2/service/newChallenge.d.ts +1 -0
- package/lib/rest/verify/v2/service/newChallenge.js +4 -0
- package/lib/rest/verify/v2/service/newFactor.d.ts +3 -0
- package/lib/rest/verify/v2/service/newFactor.js +16 -0
- package/lib/rest/verify/v2/service/newVerifyFactor.d.ts +2 -0
- package/lib/rest/verify/v2/service/newVerifyFactor.js +12 -0
- package/lib/rest/verify/v2/service/verification.d.ts +1 -1
- package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +1 -0
- package/lib/rest/video/v1/room/participant/subscribeRules.js +12 -1
- package/lib/rest/video/v1/room/recordingRules.d.ts +1 -0
- package/lib/rest/video/v1/room/recordingRules.js +11 -1
- package/package.json +4 -4
|
@@ -3,6 +3,13 @@ import Page, { TwilioResponsePayload } from "../../../../base/Page";
|
|
|
3
3
|
import Response from "../../../../http/response";
|
|
4
4
|
import V1 from "../../V1";
|
|
5
5
|
import { ApiResponse } from "../../../../base/ApiResponse";
|
|
6
|
+
/**
|
|
7
|
+
* Options to pass to fetch a UsAppToPersonInstance
|
|
8
|
+
*/
|
|
9
|
+
export interface UsAppToPersonContextFetchOptions {
|
|
10
|
+
/** The version of the Messaging API to use for this request */
|
|
11
|
+
xTwilioApiVersion?: string;
|
|
12
|
+
}
|
|
6
13
|
/**
|
|
7
14
|
* Options to pass to update a UsAppToPersonInstance
|
|
8
15
|
*/
|
|
@@ -21,6 +28,12 @@ export interface UsAppToPersonContextUpdateOptions {
|
|
|
21
28
|
ageGated: boolean;
|
|
22
29
|
/** A boolean that specifies whether campaign allows direct lending or not. */
|
|
23
30
|
directLending: boolean;
|
|
31
|
+
/** The version of the Messaging API to use for this request */
|
|
32
|
+
xTwilioApiVersion?: string;
|
|
33
|
+
/** The URL of the privacy policy for the campaign. */
|
|
34
|
+
privacyPolicyUrl?: string;
|
|
35
|
+
/** The URL of the terms and conditions for the campaign. */
|
|
36
|
+
termsAndConditionsUrl?: string;
|
|
24
37
|
}
|
|
25
38
|
/**
|
|
26
39
|
* Options to pass to create a UsAppToPersonInstance
|
|
@@ -40,6 +53,8 @@ export interface UsAppToPersonListInstanceCreateOptions {
|
|
|
40
53
|
hasEmbeddedLinks: boolean;
|
|
41
54
|
/** Indicates that this SMS campaign will send messages that contain phone numbers. */
|
|
42
55
|
hasEmbeddedPhone: boolean;
|
|
56
|
+
/** The version of the Messaging API to use for this request */
|
|
57
|
+
xTwilioApiVersion?: string;
|
|
43
58
|
/** If end users can text in a keyword to start receiving messages from this campaign, the auto-reply messages sent to the end users must be provided. The opt-in response should include the Brand name, confirmation of opt-in enrollment to a recurring message campaign, how to get help, and clear description of how to opt-out. This field is required if end users can text in a keyword to start receiving messages from this campaign. 20 character minimum. 320 character maximum. */
|
|
44
59
|
optInMessage?: string;
|
|
45
60
|
/** Upon receiving the opt-out keywords from the end users, Twilio customers are expected to send back an auto-generated response, which must provide acknowledgment of the opt-out request and confirmation that no further messages will be sent. It is also recommended that these opt-out messages include the brand name. This field is required if managing opt out keywords yourself (i.e. not using Twilio\\\'s Default or Advanced Opt Out features). 20 character minimum. 320 character maximum. */
|
|
@@ -58,6 +73,10 @@ export interface UsAppToPersonListInstanceCreateOptions {
|
|
|
58
73
|
ageGated?: boolean;
|
|
59
74
|
/** A boolean that specifies whether campaign allows direct lending or not. */
|
|
60
75
|
directLending?: boolean;
|
|
76
|
+
/** The URL of the privacy policy for the campaign. */
|
|
77
|
+
privacyPolicyUrl?: string;
|
|
78
|
+
/** The URL of the terms and conditions for the campaign. */
|
|
79
|
+
termsAndConditionsUrl?: string;
|
|
61
80
|
}
|
|
62
81
|
/**
|
|
63
82
|
* Options to pass to each
|
|
@@ -65,6 +84,8 @@ export interface UsAppToPersonListInstanceCreateOptions {
|
|
|
65
84
|
export interface UsAppToPersonListInstanceEachOptions {
|
|
66
85
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
67
86
|
pageSize?: number;
|
|
87
|
+
/** The version of the Messaging API to use for this request */
|
|
88
|
+
xTwilioApiVersion?: string;
|
|
68
89
|
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
69
90
|
callback?: (item: UsAppToPersonInstance, done: (err?: Error) => void) => void;
|
|
70
91
|
/** Function to be called upon completion of streaming */
|
|
@@ -78,6 +99,8 @@ export interface UsAppToPersonListInstanceEachOptions {
|
|
|
78
99
|
export interface UsAppToPersonListInstanceOptions {
|
|
79
100
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
80
101
|
pageSize?: number;
|
|
102
|
+
/** The version of the Messaging API to use for this request */
|
|
103
|
+
xTwilioApiVersion?: string;
|
|
81
104
|
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
82
105
|
limit?: number;
|
|
83
106
|
}
|
|
@@ -87,6 +110,8 @@ export interface UsAppToPersonListInstanceOptions {
|
|
|
87
110
|
export interface UsAppToPersonListInstancePageOptions {
|
|
88
111
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
89
112
|
pageSize?: number;
|
|
113
|
+
/** The version of the Messaging API to use for this request */
|
|
114
|
+
xTwilioApiVersion?: string;
|
|
90
115
|
/** Page Number, this value is simply for client state */
|
|
91
116
|
pageNumber?: number;
|
|
92
117
|
/** PageToken provided by the API */
|
|
@@ -117,6 +142,15 @@ export interface UsAppToPersonContext {
|
|
|
117
142
|
* @returns Resolves to processed UsAppToPersonInstance
|
|
118
143
|
*/
|
|
119
144
|
fetch(callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
145
|
+
/**
|
|
146
|
+
* Fetch a UsAppToPersonInstance
|
|
147
|
+
*
|
|
148
|
+
* @param params - Parameter for request
|
|
149
|
+
* @param callback - Callback to handle processed record
|
|
150
|
+
*
|
|
151
|
+
* @returns Resolves to processed UsAppToPersonInstance
|
|
152
|
+
*/
|
|
153
|
+
fetch(params: UsAppToPersonContextFetchOptions, callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
120
154
|
/**
|
|
121
155
|
* Fetch a UsAppToPersonInstance and return HTTP info
|
|
122
156
|
*
|
|
@@ -125,6 +159,15 @@ export interface UsAppToPersonContext {
|
|
|
125
159
|
* @returns Resolves to processed UsAppToPersonInstance with HTTP metadata
|
|
126
160
|
*/
|
|
127
161
|
fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
162
|
+
/**
|
|
163
|
+
* Fetch a UsAppToPersonInstance and return HTTP info
|
|
164
|
+
*
|
|
165
|
+
* @param params - Parameter for request
|
|
166
|
+
* @param callback - Callback to handle processed record
|
|
167
|
+
*
|
|
168
|
+
* @returns Resolves to processed UsAppToPersonInstance with HTTP metadata
|
|
169
|
+
*/
|
|
170
|
+
fetchWithHttpInfo(params: UsAppToPersonContextFetchOptions, callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
128
171
|
/**
|
|
129
172
|
* Update a UsAppToPersonInstance
|
|
130
173
|
*
|
|
@@ -160,8 +203,8 @@ export declare class UsAppToPersonContextImpl implements UsAppToPersonContext {
|
|
|
160
203
|
constructor(_version: V1, messagingServiceSid: string, sid: string);
|
|
161
204
|
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
162
205
|
removeWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<boolean>) => any): Promise<ApiResponse<boolean>>;
|
|
163
|
-
fetch(callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
164
|
-
fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
206
|
+
fetch(params?: UsAppToPersonContextFetchOptions | ((error: Error | null, item?: UsAppToPersonInstance) => any), callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
207
|
+
fetchWithHttpInfo(params?: UsAppToPersonContextFetchOptions | ((error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any), callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
165
208
|
update(params: UsAppToPersonContextUpdateOptions, callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
166
209
|
updateWithHttpInfo(params: UsAppToPersonContextUpdateOptions, callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
167
210
|
/**
|
|
@@ -203,7 +246,9 @@ interface UsAppToPersonResource {
|
|
|
203
246
|
date_updated: Date;
|
|
204
247
|
url: string;
|
|
205
248
|
mock: boolean;
|
|
206
|
-
errors: Array<
|
|
249
|
+
errors: Array<Record<string, object>>;
|
|
250
|
+
privacy_policy_url: string;
|
|
251
|
+
terms_and_conditions_url: string;
|
|
207
252
|
}
|
|
208
253
|
export declare class UsAppToPersonInstance {
|
|
209
254
|
protected _version: V1;
|
|
@@ -321,7 +366,15 @@ export declare class UsAppToPersonInstance {
|
|
|
321
366
|
/**
|
|
322
367
|
* Details indicating why a campaign registration failed. These errors can indicate one or more fields that were incorrect or did not meet review requirements.
|
|
323
368
|
*/
|
|
324
|
-
errors: Array<
|
|
369
|
+
errors: Array<Record<string, object>>;
|
|
370
|
+
/**
|
|
371
|
+
* The URL of the privacy policy for the campaign.
|
|
372
|
+
*/
|
|
373
|
+
privacyPolicyUrl: string;
|
|
374
|
+
/**
|
|
375
|
+
* The URL of the terms and conditions for the campaign.
|
|
376
|
+
*/
|
|
377
|
+
termsAndConditionsUrl: string;
|
|
325
378
|
private get _proxy();
|
|
326
379
|
/**
|
|
327
380
|
* Remove a UsAppToPersonInstance
|
|
@@ -347,6 +400,15 @@ export declare class UsAppToPersonInstance {
|
|
|
347
400
|
* @returns Resolves to processed UsAppToPersonInstance
|
|
348
401
|
*/
|
|
349
402
|
fetch(callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
403
|
+
/**
|
|
404
|
+
* Fetch a UsAppToPersonInstance
|
|
405
|
+
*
|
|
406
|
+
* @param params - Parameter for request
|
|
407
|
+
* @param callback - Callback to handle processed record
|
|
408
|
+
*
|
|
409
|
+
* @returns Resolves to processed UsAppToPersonInstance
|
|
410
|
+
*/
|
|
411
|
+
fetch(params: UsAppToPersonContextFetchOptions, callback?: (error: Error | null, item?: UsAppToPersonInstance) => any): Promise<UsAppToPersonInstance>;
|
|
350
412
|
/**
|
|
351
413
|
* Fetch a UsAppToPersonInstance and return HTTP info
|
|
352
414
|
*
|
|
@@ -355,6 +417,15 @@ export declare class UsAppToPersonInstance {
|
|
|
355
417
|
* @returns Resolves to processed UsAppToPersonInstance with HTTP metadata
|
|
356
418
|
*/
|
|
357
419
|
fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
420
|
+
/**
|
|
421
|
+
* Fetch a UsAppToPersonInstance and return HTTP info
|
|
422
|
+
*
|
|
423
|
+
* @param params - Parameter for request
|
|
424
|
+
* @param callback - Callback to handle processed record
|
|
425
|
+
*
|
|
426
|
+
* @returns Resolves to processed UsAppToPersonInstance with HTTP metadata
|
|
427
|
+
*/
|
|
428
|
+
fetchWithHttpInfo(params: UsAppToPersonContextFetchOptions, callback?: (error: Error | null, item?: ApiResponse<UsAppToPersonInstance>) => any): Promise<ApiResponse<UsAppToPersonInstance>>;
|
|
358
429
|
/**
|
|
359
430
|
* Update a UsAppToPersonInstance
|
|
360
431
|
*
|
|
@@ -406,7 +477,9 @@ export declare class UsAppToPersonInstance {
|
|
|
406
477
|
dateUpdated: Date;
|
|
407
478
|
url: string;
|
|
408
479
|
mock: boolean;
|
|
409
|
-
errors:
|
|
480
|
+
errors: Record<string, object>[];
|
|
481
|
+
privacyPolicyUrl: string;
|
|
482
|
+
termsAndConditionsUrl: string;
|
|
410
483
|
};
|
|
411
484
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
412
485
|
}
|
|
@@ -60,22 +60,43 @@ class UsAppToPersonContextImpl {
|
|
|
60
60
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
61
61
|
return operationPromise;
|
|
62
62
|
}
|
|
63
|
-
fetch(callback) {
|
|
63
|
+
fetch(params, callback) {
|
|
64
|
+
if (params instanceof Function) {
|
|
65
|
+
callback = params;
|
|
66
|
+
params = {};
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
params = params || {};
|
|
70
|
+
}
|
|
71
|
+
let data = {};
|
|
64
72
|
const headers = {};
|
|
65
73
|
headers["Accept"] = "application/json";
|
|
74
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
75
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
66
76
|
const instance = this;
|
|
67
77
|
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
68
78
|
uri: instance._uri,
|
|
69
79
|
method: "get",
|
|
80
|
+
params: data,
|
|
70
81
|
headers,
|
|
71
82
|
});
|
|
72
83
|
operationPromise = operationPromise.then((payload) => new UsAppToPersonInstance(operationVersion, payload, instance._solution.messagingServiceSid, instance._solution.sid));
|
|
73
84
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
74
85
|
return operationPromise;
|
|
75
86
|
}
|
|
76
|
-
fetchWithHttpInfo(callback) {
|
|
87
|
+
fetchWithHttpInfo(params, callback) {
|
|
88
|
+
if (params instanceof Function) {
|
|
89
|
+
callback = params;
|
|
90
|
+
params = {};
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
params = params || {};
|
|
94
|
+
}
|
|
95
|
+
let data = {};
|
|
77
96
|
const headers = {};
|
|
78
97
|
headers["Accept"] = "application/json";
|
|
98
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
99
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
79
100
|
const instance = this;
|
|
80
101
|
let operationVersion = instance._version;
|
|
81
102
|
// CREATE, FETCH, UPDATE operations
|
|
@@ -83,6 +104,7 @@ class UsAppToPersonContextImpl {
|
|
|
83
104
|
.fetchWithResponseInfo({
|
|
84
105
|
uri: instance._uri,
|
|
85
106
|
method: "get",
|
|
107
|
+
params: data,
|
|
86
108
|
headers,
|
|
87
109
|
})
|
|
88
110
|
.then((response) => ({
|
|
@@ -129,9 +151,15 @@ class UsAppToPersonContextImpl {
|
|
|
129
151
|
data["Description"] = params["description"];
|
|
130
152
|
data["AgeGated"] = serialize.bool(params["ageGated"]);
|
|
131
153
|
data["DirectLending"] = serialize.bool(params["directLending"]);
|
|
154
|
+
if (params["privacyPolicyUrl"] !== undefined)
|
|
155
|
+
data["PrivacyPolicyUrl"] = params["privacyPolicyUrl"];
|
|
156
|
+
if (params["termsAndConditionsUrl"] !== undefined)
|
|
157
|
+
data["TermsAndConditionsUrl"] = params["termsAndConditionsUrl"];
|
|
132
158
|
const headers = {};
|
|
133
159
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
134
160
|
headers["Accept"] = "application/json";
|
|
161
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
162
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
135
163
|
const instance = this;
|
|
136
164
|
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
137
165
|
uri: instance._uri,
|
|
@@ -180,9 +208,15 @@ class UsAppToPersonContextImpl {
|
|
|
180
208
|
data["Description"] = params["description"];
|
|
181
209
|
data["AgeGated"] = serialize.bool(params["ageGated"]);
|
|
182
210
|
data["DirectLending"] = serialize.bool(params["directLending"]);
|
|
211
|
+
if (params["privacyPolicyUrl"] !== undefined)
|
|
212
|
+
data["PrivacyPolicyUrl"] = params["privacyPolicyUrl"];
|
|
213
|
+
if (params["termsAndConditionsUrl"] !== undefined)
|
|
214
|
+
data["TermsAndConditionsUrl"] = params["termsAndConditionsUrl"];
|
|
183
215
|
const headers = {};
|
|
184
216
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
185
217
|
headers["Accept"] = "application/json";
|
|
218
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
219
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
186
220
|
const instance = this;
|
|
187
221
|
let operationVersion = instance._version;
|
|
188
222
|
// CREATE, FETCH, UPDATE operations
|
|
@@ -244,6 +278,8 @@ class UsAppToPersonInstance {
|
|
|
244
278
|
this.url = payload.url;
|
|
245
279
|
this.mock = payload.mock;
|
|
246
280
|
this.errors = payload.errors;
|
|
281
|
+
this.privacyPolicyUrl = payload.privacy_policy_url;
|
|
282
|
+
this.termsAndConditionsUrl = payload.terms_and_conditions_url;
|
|
247
283
|
this._solution = { messagingServiceSid, sid: sid || this.sid };
|
|
248
284
|
}
|
|
249
285
|
get _proxy() {
|
|
@@ -272,25 +308,11 @@ class UsAppToPersonInstance {
|
|
|
272
308
|
removeWithHttpInfo(callback) {
|
|
273
309
|
return this._proxy.removeWithHttpInfo(callback);
|
|
274
310
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
*
|
|
278
|
-
* @param callback - Callback to handle processed record
|
|
279
|
-
*
|
|
280
|
-
* @returns Resolves to processed UsAppToPersonInstance
|
|
281
|
-
*/
|
|
282
|
-
fetch(callback) {
|
|
283
|
-
return this._proxy.fetch(callback);
|
|
311
|
+
fetch(params, callback) {
|
|
312
|
+
return this._proxy.fetch(params, callback);
|
|
284
313
|
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
*
|
|
288
|
-
* @param callback - Callback to handle processed record
|
|
289
|
-
*
|
|
290
|
-
* @returns Resolves to processed UsAppToPersonInstance with HTTP metadata
|
|
291
|
-
*/
|
|
292
|
-
fetchWithHttpInfo(callback) {
|
|
293
|
-
return this._proxy.fetchWithHttpInfo(callback);
|
|
314
|
+
fetchWithHttpInfo(params, callback) {
|
|
315
|
+
return this._proxy.fetchWithHttpInfo(params, callback);
|
|
294
316
|
}
|
|
295
317
|
update(params, callback) {
|
|
296
318
|
return this._proxy.update(params, callback);
|
|
@@ -333,6 +355,8 @@ class UsAppToPersonInstance {
|
|
|
333
355
|
url: this.url,
|
|
334
356
|
mock: this.mock,
|
|
335
357
|
errors: this.errors,
|
|
358
|
+
privacyPolicyUrl: this.privacyPolicyUrl,
|
|
359
|
+
termsAndConditionsUrl: this.termsAndConditionsUrl,
|
|
336
360
|
};
|
|
337
361
|
}
|
|
338
362
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -407,9 +431,15 @@ function UsAppToPersonListInstance(version, messagingServiceSid) {
|
|
|
407
431
|
data["AgeGated"] = serialize.bool(params["ageGated"]);
|
|
408
432
|
if (params["directLending"] !== undefined)
|
|
409
433
|
data["DirectLending"] = serialize.bool(params["directLending"]);
|
|
434
|
+
if (params["privacyPolicyUrl"] !== undefined)
|
|
435
|
+
data["PrivacyPolicyUrl"] = params["privacyPolicyUrl"];
|
|
436
|
+
if (params["termsAndConditionsUrl"] !== undefined)
|
|
437
|
+
data["TermsAndConditionsUrl"] = params["termsAndConditionsUrl"];
|
|
410
438
|
const headers = {};
|
|
411
439
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
412
440
|
headers["Accept"] = "application/json";
|
|
441
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
442
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
413
443
|
let operationVersion = version, operationPromise = operationVersion.create({
|
|
414
444
|
uri: instance._uri,
|
|
415
445
|
method: "post",
|
|
@@ -476,9 +506,15 @@ function UsAppToPersonListInstance(version, messagingServiceSid) {
|
|
|
476
506
|
data["AgeGated"] = serialize.bool(params["ageGated"]);
|
|
477
507
|
if (params["directLending"] !== undefined)
|
|
478
508
|
data["DirectLending"] = serialize.bool(params["directLending"]);
|
|
509
|
+
if (params["privacyPolicyUrl"] !== undefined)
|
|
510
|
+
data["PrivacyPolicyUrl"] = params["privacyPolicyUrl"];
|
|
511
|
+
if (params["termsAndConditionsUrl"] !== undefined)
|
|
512
|
+
data["TermsAndConditionsUrl"] = params["termsAndConditionsUrl"];
|
|
479
513
|
const headers = {};
|
|
480
514
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
481
515
|
headers["Accept"] = "application/json";
|
|
516
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
517
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
482
518
|
let operationVersion = version;
|
|
483
519
|
// CREATE, FETCH, UPDATE operations
|
|
484
520
|
let operationPromise = operationVersion
|
|
@@ -512,6 +548,8 @@ function UsAppToPersonListInstance(version, messagingServiceSid) {
|
|
|
512
548
|
data["PageToken"] = params.pageToken;
|
|
513
549
|
const headers = {};
|
|
514
550
|
headers["Accept"] = "application/json";
|
|
551
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
552
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
515
553
|
let operationVersion = version, operationPromise = operationVersion.page({
|
|
516
554
|
uri: instance._uri,
|
|
517
555
|
method: "get",
|
|
@@ -550,6 +588,8 @@ function UsAppToPersonListInstance(version, messagingServiceSid) {
|
|
|
550
588
|
data["PageToken"] = params.pageToken;
|
|
551
589
|
const headers = {};
|
|
552
590
|
headers["Accept"] = "application/json";
|
|
591
|
+
if (params["xTwilioApiVersion"] !== undefined)
|
|
592
|
+
headers["X-Twilio-Api-Version"] = params["xTwilioApiVersion"];
|
|
553
593
|
let operationVersion = version;
|
|
554
594
|
// For page operations, use page() directly as it already returns { statusCode, body, headers }
|
|
555
595
|
// IMPORTANT: Pass full response to Page constructor, not response.body
|
|
@@ -3,6 +3,14 @@ import Page, { TwilioResponsePayload } from "../../../base/Page";
|
|
|
3
3
|
import Response from "../../../http/response";
|
|
4
4
|
import V1 from "../V1";
|
|
5
5
|
import { ApiResponse } from "../../../base/ApiResponse";
|
|
6
|
+
/**
|
|
7
|
+
* The organizational authority for business registrations. Required for all business types except SOLE_PROPRIETOR.
|
|
8
|
+
*/
|
|
9
|
+
export type TollfreeVerificationBusinessRegistrationAuthority = "EIN" | "CBN" | "CRN" | "PROVINCIAL_NUMBER" | "VAT" | "ACN" | "ABN" | "BRN" | "SIREN" | "SIRET" | "NZBN" | "USt-IdNr" | "CIF" | "NIF" | "CNPJ" | "UID" | "NEQ" | "OTHER";
|
|
10
|
+
/**
|
|
11
|
+
* The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT. Required field.
|
|
12
|
+
*/
|
|
13
|
+
export type TollfreeVerificationBusinessType = "PRIVATE_PROFIT" | "PUBLIC_PROFIT" | "SOLE_PROPRIETOR" | "NON_PROFIT" | "GOVERNMENT";
|
|
6
14
|
/**
|
|
7
15
|
* Describe how a user opts-in to text messages.
|
|
8
16
|
*/
|
|
@@ -25,7 +33,7 @@ export interface TollfreeVerificationContextUpdateOptions {
|
|
|
25
33
|
businessWebsite?: string;
|
|
26
34
|
/** The email address to receive the notification about the verification result. . */
|
|
27
35
|
notificationEmail?: string;
|
|
28
|
-
/** The category of the use case for the Tollfree Number. List as many are applicable
|
|
36
|
+
/** The category of the use case for the Tollfree Number. List as many as are applicable. */
|
|
29
37
|
useCaseCategories?: Array<string>;
|
|
30
38
|
/** Use this to further explain how messaging is used by the business or organization. */
|
|
31
39
|
useCaseSummary?: string;
|
|
@@ -61,14 +69,14 @@ export interface TollfreeVerificationContextUpdateOptions {
|
|
|
61
69
|
businessContactPhone?: string;
|
|
62
70
|
/** Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to \\\'Website fixed\\\'. */
|
|
63
71
|
editReason?: string;
|
|
64
|
-
/** A
|
|
72
|
+
/** A legally recognized business registration number */
|
|
65
73
|
businessRegistrationNumber?: string;
|
|
66
|
-
/**
|
|
67
|
-
businessRegistrationAuthority?:
|
|
74
|
+
/** */
|
|
75
|
+
businessRegistrationAuthority?: TollfreeVerificationBusinessRegistrationAuthority;
|
|
68
76
|
/** Country business is registered in */
|
|
69
77
|
businessRegistrationCountry?: string;
|
|
70
|
-
/**
|
|
71
|
-
businessType?:
|
|
78
|
+
/** */
|
|
79
|
+
businessType?: TollfreeVerificationBusinessType;
|
|
72
80
|
/** The E.164 formatted number associated with the business. */
|
|
73
81
|
businessRegistrationPhoneNumber?: string;
|
|
74
82
|
/** Trade name, sub entity, or downstream business name of business being submitted for verification */
|
|
@@ -100,7 +108,7 @@ export interface TollfreeVerificationListInstanceCreateOptions {
|
|
|
100
108
|
businessWebsite: string;
|
|
101
109
|
/** The email address to receive the notification about the verification result. . */
|
|
102
110
|
notificationEmail: string;
|
|
103
|
-
/** The category of the use case for the Tollfree Number. List as many are applicable
|
|
111
|
+
/** The category of the use case for the Tollfree Number. List as many as are applicable. */
|
|
104
112
|
useCaseCategories: Array<string>;
|
|
105
113
|
/** Use this to further explain how messaging is used by the business or organization. */
|
|
106
114
|
useCaseSummary: string;
|
|
@@ -142,12 +150,12 @@ export interface TollfreeVerificationListInstanceCreateOptions {
|
|
|
142
150
|
externalReferenceId?: string;
|
|
143
151
|
/** A legally recognized business registration number. Required for all business types except SOLE_PROPRIETOR. */
|
|
144
152
|
businessRegistrationNumber?: string;
|
|
145
|
-
/**
|
|
146
|
-
businessRegistrationAuthority?:
|
|
153
|
+
/** */
|
|
154
|
+
businessRegistrationAuthority?: TollfreeVerificationBusinessRegistrationAuthority;
|
|
147
155
|
/** The country where the business is registered. Required for all business types except SOLE_PROPRIETOR. */
|
|
148
156
|
businessRegistrationCountry?: string;
|
|
149
|
-
/**
|
|
150
|
-
businessType?:
|
|
157
|
+
/** */
|
|
158
|
+
businessType?: TollfreeVerificationBusinessType;
|
|
151
159
|
/** The E.164 formatted number associated with the business. */
|
|
152
160
|
businessRegistrationPhoneNumber?: string;
|
|
153
161
|
/** Trade name, sub entity, or downstream business name of business being submitted for verification */
|
|
@@ -367,9 +375,9 @@ interface TollfreeVerificationResource {
|
|
|
367
375
|
edit_expiration: Date;
|
|
368
376
|
edit_allowed: boolean;
|
|
369
377
|
business_registration_number: string;
|
|
370
|
-
business_registration_authority:
|
|
378
|
+
business_registration_authority: TollfreeVerificationBusinessRegistrationAuthority;
|
|
371
379
|
business_registration_country: string;
|
|
372
|
-
business_type:
|
|
380
|
+
business_type: TollfreeVerificationBusinessType;
|
|
373
381
|
business_registration_phone_number: string;
|
|
374
382
|
doing_business_as: string;
|
|
375
383
|
opt_in_confirmation_message: string;
|
|
@@ -471,7 +479,7 @@ export declare class TollfreeVerificationInstance {
|
|
|
471
479
|
*/
|
|
472
480
|
notificationEmail: string;
|
|
473
481
|
/**
|
|
474
|
-
* The category of the use case for the Tollfree Number. List as many are applicable
|
|
482
|
+
* The category of the use case for the Tollfree Number. List as many as are applicable.
|
|
475
483
|
*/
|
|
476
484
|
useCaseCategories: Array<string>;
|
|
477
485
|
/**
|
|
@@ -528,18 +536,12 @@ export declare class TollfreeVerificationInstance {
|
|
|
528
536
|
* A legally recognized business registration number
|
|
529
537
|
*/
|
|
530
538
|
businessRegistrationNumber: string;
|
|
531
|
-
|
|
532
|
-
* The organizational authority for business registrations
|
|
533
|
-
*/
|
|
534
|
-
businessRegistrationAuthority: string;
|
|
539
|
+
businessRegistrationAuthority: TollfreeVerificationBusinessRegistrationAuthority;
|
|
535
540
|
/**
|
|
536
541
|
* Country business is registered in
|
|
537
542
|
*/
|
|
538
543
|
businessRegistrationCountry: string;
|
|
539
|
-
|
|
540
|
-
* The type of business, valid values are PRIVATE_PROFIT, PUBLIC_PROFIT, NON_PROFIT, SOLE_PROPRIETOR, GOVERNMENT
|
|
541
|
-
*/
|
|
542
|
-
businessType: string;
|
|
544
|
+
businessType: TollfreeVerificationBusinessType;
|
|
543
545
|
/**
|
|
544
546
|
* The E.164 formatted number associated with the business.
|
|
545
547
|
*/
|
|
@@ -696,9 +698,9 @@ export declare class TollfreeVerificationInstance {
|
|
|
696
698
|
editExpiration: Date;
|
|
697
699
|
editAllowed: boolean;
|
|
698
700
|
businessRegistrationNumber: string;
|
|
699
|
-
businessRegistrationAuthority:
|
|
701
|
+
businessRegistrationAuthority: TollfreeVerificationBusinessRegistrationAuthority;
|
|
700
702
|
businessRegistrationCountry: string;
|
|
701
|
-
businessType:
|
|
703
|
+
businessType: TollfreeVerificationBusinessType;
|
|
702
704
|
businessRegistrationPhoneNumber: string;
|
|
703
705
|
doingBusinessAs: string;
|
|
704
706
|
optInConfirmationMessage: string;
|
|
@@ -27,6 +27,11 @@ export declare class MessagingV2ChannelsSenderConfiguration {
|
|
|
27
27
|
* The SID of the Twilio Voice application.
|
|
28
28
|
*/
|
|
29
29
|
"voiceApplicationSid"?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The account type for ISV Account Type Migration. Set to \'ISV\' or \'ISVSubAccount\' to configure, null or empty string to clear, or omit to preserve the existing value.
|
|
32
|
+
*/
|
|
33
|
+
"accountType"?: string | null;
|
|
34
|
+
constructor(payload: any);
|
|
30
35
|
}
|
|
31
36
|
export declare class MessagingV2ChannelsSenderOfflineReasonsItems {
|
|
32
37
|
/**
|
|
@@ -41,6 +46,7 @@ export declare class MessagingV2ChannelsSenderOfflineReasonsItems {
|
|
|
41
46
|
* The URL to get more information about the error.
|
|
42
47
|
*/
|
|
43
48
|
"moreInfo"?: string | null;
|
|
49
|
+
constructor(payload: any);
|
|
44
50
|
}
|
|
45
51
|
/**
|
|
46
52
|
* The profile information for the sender.
|
|
@@ -98,6 +104,7 @@ export declare class MessagingV2ChannelsSenderProfile {
|
|
|
98
104
|
* The phone numbers of the sender.
|
|
99
105
|
*/
|
|
100
106
|
"phoneNumbers"?: any | null;
|
|
107
|
+
constructor(payload: any);
|
|
101
108
|
}
|
|
102
109
|
/**
|
|
103
110
|
* The profile information for the sender.
|
|
@@ -155,18 +162,22 @@ export declare class MessagingV2ChannelsSenderProfileGenericResponse {
|
|
|
155
162
|
* The phone numbers of the sender.
|
|
156
163
|
*/
|
|
157
164
|
"phoneNumbers"?: Array<MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers> | null;
|
|
165
|
+
constructor(payload: any);
|
|
158
166
|
}
|
|
159
167
|
export declare class MessagingV2ChannelsSenderProfileGenericResponseEmails {
|
|
160
168
|
"email"?: string;
|
|
161
169
|
"label"?: string;
|
|
170
|
+
constructor(payload: any);
|
|
162
171
|
}
|
|
163
172
|
export declare class MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers {
|
|
164
173
|
"phoneNumber"?: string;
|
|
165
174
|
"label"?: string;
|
|
175
|
+
constructor(payload: any);
|
|
166
176
|
}
|
|
167
177
|
export declare class MessagingV2ChannelsSenderProfileGenericResponseWebsites {
|
|
168
178
|
"website"?: string;
|
|
169
179
|
"label"?: string;
|
|
180
|
+
constructor(payload: any);
|
|
170
181
|
}
|
|
171
182
|
/**
|
|
172
183
|
* The additional properties for the sender.
|
|
@@ -180,6 +191,7 @@ export declare class MessagingV2ChannelsSenderProperties {
|
|
|
180
191
|
* The messaging limit of the sender.
|
|
181
192
|
*/
|
|
182
193
|
"messagingLimit"?: string | null;
|
|
194
|
+
constructor(payload: any);
|
|
183
195
|
}
|
|
184
196
|
export declare class MessagingV2ChannelsSenderRequestsCreate {
|
|
185
197
|
/**
|
|
@@ -189,11 +201,13 @@ export declare class MessagingV2ChannelsSenderRequestsCreate {
|
|
|
189
201
|
"configuration"?: MessagingV2ChannelsSenderConfiguration | null;
|
|
190
202
|
"webhook"?: MessagingV2ChannelsSenderWebhook | null;
|
|
191
203
|
"profile"?: MessagingV2ChannelsSenderProfile | null;
|
|
204
|
+
constructor(payload: any);
|
|
192
205
|
}
|
|
193
206
|
export declare class MessagingV2ChannelsSenderRequestsUpdate {
|
|
194
207
|
"configuration"?: MessagingV2ChannelsSenderConfiguration | null;
|
|
195
208
|
"webhook"?: MessagingV2ChannelsSenderWebhook | null;
|
|
196
209
|
"profile"?: MessagingV2ChannelsSenderProfile | null;
|
|
210
|
+
constructor(payload: any);
|
|
197
211
|
}
|
|
198
212
|
/**
|
|
199
213
|
* The configuration settings for webhooks.
|
|
@@ -223,6 +237,7 @@ export declare class MessagingV2ChannelsSenderWebhook {
|
|
|
223
237
|
* The HTTP method for the status callback.
|
|
224
238
|
*/
|
|
225
239
|
"statusCallbackMethod"?: string | null;
|
|
240
|
+
constructor(payload: any);
|
|
226
241
|
}
|
|
227
242
|
export declare class MessagingV2RcsCarrier {
|
|
228
243
|
/**
|
|
@@ -230,6 +245,7 @@ export declare class MessagingV2RcsCarrier {
|
|
|
230
245
|
*/
|
|
231
246
|
"name"?: string;
|
|
232
247
|
"status"?: MessagingV2RcsCarrierStatus;
|
|
248
|
+
constructor(payload: any);
|
|
233
249
|
}
|
|
234
250
|
/**
|
|
235
251
|
* The carrier-level status.
|
|
@@ -246,6 +262,7 @@ export declare class MessagingV2RcsComplianceCountryResponse {
|
|
|
246
262
|
"registrationSid"?: string;
|
|
247
263
|
"status"?: MessagingV2RcsCountryStatus;
|
|
248
264
|
"carriers"?: Array<MessagingV2RcsCarrier>;
|
|
265
|
+
constructor(payload: any);
|
|
249
266
|
}
|
|
250
267
|
/**
|
|
251
268
|
* The KYC compliance information. This section consists of response to the request launch.
|
|
@@ -259,6 +276,7 @@ export declare class MessagingV2RcsComplianceResponse {
|
|
|
259
276
|
* A list of country-specific compliance details.
|
|
260
277
|
*/
|
|
261
278
|
"countries"?: Array<MessagingV2RcsComplianceCountryResponse>;
|
|
279
|
+
constructor(payload: any);
|
|
262
280
|
}
|
|
263
281
|
/**
|
|
264
282
|
* The country-level status. Based on the aggregation of the carrier-level status.
|