twilio 4.17.0 → 4.18.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/lib/base/BaseTwilio.d.ts +2 -1
- package/lib/base/BaseTwilio.js +3 -2
- package/lib/rest/api/V2010.d.ts +5 -0
- package/lib/rest/api/V2010.js +6 -0
- package/lib/rest/api/v2010/account/message.d.ts +1 -9
- package/lib/rest/api/v2010/account/message.js +0 -4
- package/lib/rest/api/v2010/safelist.d.ts +107 -0
- package/lib/rest/api/v2010/safelist.js +119 -0
- package/lib/rest/chat/v3/channel.d.ts +2 -2
- package/lib/rest/conversations/v1/addressConfiguration.d.ts +1 -1
- package/lib/rest/conversations/v1/configuration.d.ts +2 -2
- package/lib/rest/conversations/v1/conversation/message.d.ts +4 -0
- package/lib/rest/conversations/v1/conversation/message.js +4 -0
- package/lib/rest/conversations/v1/conversation.d.ts +11 -3
- package/lib/rest/conversations/v1/conversation.js +8 -0
- package/lib/rest/conversations/v1/service/conversation/message.d.ts +4 -0
- package/lib/rest/conversations/v1/service/conversation/message.js +4 -0
- package/lib/rest/conversations/v1/service/conversation.d.ts +11 -3
- package/lib/rest/conversations/v1/service/conversation.js +8 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +6 -0
- package/lib/rest/flexApi/v1/configuration.js +2 -0
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +4 -4
- package/lib/rest/messaging/v1/externalCampaign.d.ts +2 -2
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +1 -1
- package/lib/rest/messaging/v1/service.d.ts +3 -3
- package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +3 -3
- package/lib/rest/numbers/v2/authorizationDocument.d.ts +3 -3
- package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +2 -2
- package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +3 -3
- package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +3 -3
- package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +2 -2
- package/lib/rest/proxy/v1/service.d.ts +3 -3
- package/lib/rest/trusthub/V1.d.ts +5 -0
- package/lib/rest/trusthub/V1.js +7 -0
- package/lib/rest/trusthub/v1/complianceInquiries.d.ts +125 -0
- package/lib/rest/trusthub/v1/complianceInquiries.js +140 -0
- package/lib/rest/verify/v2/service/messagingConfiguration.d.ts +3 -3
- package/package.json +1 -1
package/lib/base/BaseTwilio.d.ts
CHANGED
|
@@ -74,7 +74,8 @@ declare namespace Twilio {
|
|
|
74
74
|
*/
|
|
75
75
|
getHostname(hostname: string, targetEdge: string | undefined, targetRegion: string | undefined): string;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Test if your environment is impacted by a TLS or certificate
|
|
78
|
+
* change is by sending an HTTP request to the test endpoint
|
|
78
79
|
*
|
|
79
80
|
* @throws RestException if the request fails
|
|
80
81
|
*
|
package/lib/base/BaseTwilio.js
CHANGED
|
@@ -156,7 +156,8 @@ var Twilio;
|
|
|
156
156
|
}
|
|
157
157
|
/* jshint ignore:start */
|
|
158
158
|
/**
|
|
159
|
-
*
|
|
159
|
+
* Test if your environment is impacted by a TLS or certificate
|
|
160
|
+
* change is by sending an HTTP request to the test endpoint
|
|
160
161
|
*
|
|
161
162
|
* @throws RestException if the request fails
|
|
162
163
|
*
|
|
@@ -166,7 +167,7 @@ var Twilio;
|
|
|
166
167
|
return this.httpClient
|
|
167
168
|
?.request({
|
|
168
169
|
method: "get",
|
|
169
|
-
uri: "https://
|
|
170
|
+
uri: "https://tls-test.twilio.com:443",
|
|
170
171
|
})
|
|
171
172
|
.then((response) => {
|
|
172
173
|
if (response["statusCode"] < 200 || response["statusCode"] >= 300) {
|
package/lib/rest/api/V2010.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import ApiBase from "../ApiBase";
|
|
2
2
|
import Version from "../../base/Version";
|
|
3
3
|
import { AccountListInstance } from "./v2010/account";
|
|
4
|
+
import { SafelistListInstance } from "./v2010/safelist";
|
|
4
5
|
import { AccountContext } from "./v2010/account";
|
|
5
6
|
export default class V2010 extends Version {
|
|
6
7
|
/**
|
|
@@ -11,10 +12,14 @@ export default class V2010 extends Version {
|
|
|
11
12
|
constructor(domain: ApiBase);
|
|
12
13
|
/** accounts - { Twilio.Api.V2010.AccountListInstance } resource */
|
|
13
14
|
protected _accounts?: AccountListInstance;
|
|
15
|
+
/** safelist - { Twilio.Api.V2010.SafelistListInstance } resource */
|
|
16
|
+
protected _safelist?: SafelistListInstance;
|
|
14
17
|
/** account - { Twilio.Api.V2010.AccountContext } resource */
|
|
15
18
|
protected _account?: AccountContext;
|
|
16
19
|
/** Getter for accounts resource */
|
|
17
20
|
get accounts(): AccountListInstance;
|
|
21
|
+
/** Getter for safelist resource */
|
|
22
|
+
get safelist(): SafelistListInstance;
|
|
18
23
|
/** Getter for account resource */
|
|
19
24
|
get account(): AccountContext;
|
|
20
25
|
}
|
package/lib/rest/api/V2010.js
CHANGED
|
@@ -18,6 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
const Version_1 = __importDefault(require("../../base/Version"));
|
|
20
20
|
const account_1 = require("./v2010/account");
|
|
21
|
+
const safelist_1 = require("./v2010/safelist");
|
|
21
22
|
class V2010 extends Version_1.default {
|
|
22
23
|
/**
|
|
23
24
|
* Initialize the V2010 version of Api
|
|
@@ -32,6 +33,11 @@ class V2010 extends Version_1.default {
|
|
|
32
33
|
this._accounts = this._accounts || (0, account_1.AccountListInstance)(this);
|
|
33
34
|
return this._accounts;
|
|
34
35
|
}
|
|
36
|
+
/** Getter for safelist resource */
|
|
37
|
+
get safelist() {
|
|
38
|
+
this._safelist = this._safelist || (0, safelist_1.SafelistListInstance)(this);
|
|
39
|
+
return this._safelist;
|
|
40
|
+
}
|
|
35
41
|
/** Getter for account resource */
|
|
36
42
|
get account() {
|
|
37
43
|
this._account =
|
|
@@ -59,11 +59,9 @@ export interface MessageListInstanceCreateOptions {
|
|
|
59
59
|
sendAsMms?: boolean;
|
|
60
60
|
/** For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template\\\'s default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used. */
|
|
61
61
|
contentVariables?: string;
|
|
62
|
-
/** A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. */
|
|
63
|
-
tags?: string;
|
|
64
62
|
/** */
|
|
65
63
|
riskCheck?: MessageRiskCheck;
|
|
66
|
-
/** The sender\\\'s Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and
|
|
64
|
+
/** The sender\\\'s Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service\\\'s Sender Pool) or you can provide a specific sender from your Sender Pool. */
|
|
67
65
|
from?: string;
|
|
68
66
|
/** The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service\\\'s Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool. */
|
|
69
67
|
messagingServiceSid?: string;
|
|
@@ -227,7 +225,6 @@ interface MessageResource {
|
|
|
227
225
|
price_unit: string;
|
|
228
226
|
api_version: string;
|
|
229
227
|
subresource_uris: Record<string, string>;
|
|
230
|
-
tags: any;
|
|
231
228
|
}
|
|
232
229
|
export declare class MessageInstance {
|
|
233
230
|
protected _version: V2010;
|
|
@@ -308,10 +305,6 @@ export declare class MessageInstance {
|
|
|
308
305
|
* A list of related resources identified by their URIs relative to `https://api.twilio.com`
|
|
309
306
|
*/
|
|
310
307
|
subresourceUris: Record<string, string>;
|
|
311
|
-
/**
|
|
312
|
-
* A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message.
|
|
313
|
-
*/
|
|
314
|
-
tags: any;
|
|
315
308
|
private get _proxy();
|
|
316
309
|
/**
|
|
317
310
|
* Remove a MessageInstance
|
|
@@ -380,7 +373,6 @@ export declare class MessageInstance {
|
|
|
380
373
|
priceUnit: string;
|
|
381
374
|
apiVersion: string;
|
|
382
375
|
subresourceUris: Record<string, string>;
|
|
383
|
-
tags: any;
|
|
384
376
|
};
|
|
385
377
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
386
378
|
}
|
|
@@ -129,7 +129,6 @@ class MessageInstance {
|
|
|
129
129
|
this.priceUnit = payload.price_unit;
|
|
130
130
|
this.apiVersion = payload.api_version;
|
|
131
131
|
this.subresourceUris = payload.subresource_uris;
|
|
132
|
-
this.tags = payload.tags;
|
|
133
132
|
this._solution = { accountSid, sid: sid || this.sid };
|
|
134
133
|
}
|
|
135
134
|
get _proxy() {
|
|
@@ -200,7 +199,6 @@ class MessageInstance {
|
|
|
200
199
|
priceUnit: this.priceUnit,
|
|
201
200
|
apiVersion: this.apiVersion,
|
|
202
201
|
subresourceUris: this.subresourceUris,
|
|
203
|
-
tags: this.tags,
|
|
204
202
|
};
|
|
205
203
|
}
|
|
206
204
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -260,8 +258,6 @@ function MessageListInstance(version, accountSid) {
|
|
|
260
258
|
data["SendAsMms"] = serialize.bool(params["sendAsMms"]);
|
|
261
259
|
if (params["contentVariables"] !== undefined)
|
|
262
260
|
data["ContentVariables"] = params["contentVariables"];
|
|
263
|
-
if (params["tags"] !== undefined)
|
|
264
|
-
data["Tags"] = params["tags"];
|
|
265
261
|
if (params["riskCheck"] !== undefined)
|
|
266
262
|
data["RiskCheck"] = params["riskCheck"];
|
|
267
263
|
if (params["from"] !== undefined)
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import V2010 from "../V2010";
|
|
4
|
+
/**
|
|
5
|
+
* Options to pass to create a SafelistInstance
|
|
6
|
+
*/
|
|
7
|
+
export interface SafelistListInstanceCreateOptions {
|
|
8
|
+
/** The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). */
|
|
9
|
+
phoneNumber: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Options to pass to remove a SafelistInstance
|
|
13
|
+
*/
|
|
14
|
+
export interface SafelistListInstanceRemoveOptions {
|
|
15
|
+
/** The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). */
|
|
16
|
+
phoneNumber?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Options to pass to fetch a SafelistInstance
|
|
20
|
+
*/
|
|
21
|
+
export interface SafelistListInstanceFetchOptions {
|
|
22
|
+
/** The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164). */
|
|
23
|
+
phoneNumber?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface SafelistSolution {
|
|
26
|
+
}
|
|
27
|
+
export interface SafelistListInstance {
|
|
28
|
+
_version: V2010;
|
|
29
|
+
_solution: SafelistSolution;
|
|
30
|
+
_uri: string;
|
|
31
|
+
/**
|
|
32
|
+
* Create a SafelistInstance
|
|
33
|
+
*
|
|
34
|
+
* @param params - Parameter for request
|
|
35
|
+
* @param callback - Callback to handle processed record
|
|
36
|
+
*
|
|
37
|
+
* @returns Resolves to processed SafelistInstance
|
|
38
|
+
*/
|
|
39
|
+
create(params: SafelistListInstanceCreateOptions, callback?: (error: Error | null, item?: SafelistInstance) => any): Promise<SafelistInstance>;
|
|
40
|
+
/**
|
|
41
|
+
* Remove a SafelistInstance
|
|
42
|
+
*
|
|
43
|
+
* @param callback - Callback to handle processed record
|
|
44
|
+
*
|
|
45
|
+
* @returns Resolves to processed boolean
|
|
46
|
+
*/
|
|
47
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Remove a SafelistInstance
|
|
50
|
+
*
|
|
51
|
+
* @param params - Parameter for request
|
|
52
|
+
* @param callback - Callback to handle processed record
|
|
53
|
+
*
|
|
54
|
+
* @returns Resolves to processed SafelistInstance
|
|
55
|
+
*/
|
|
56
|
+
remove(params: SafelistListInstanceRemoveOptions, callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Fetch a SafelistInstance
|
|
59
|
+
*
|
|
60
|
+
* @param callback - Callback to handle processed record
|
|
61
|
+
*
|
|
62
|
+
* @returns Resolves to processed SafelistInstance
|
|
63
|
+
*/
|
|
64
|
+
fetch(callback?: (error: Error | null, item?: SafelistInstance) => any): Promise<SafelistInstance>;
|
|
65
|
+
/**
|
|
66
|
+
* Fetch a SafelistInstance
|
|
67
|
+
*
|
|
68
|
+
* @param params - Parameter for request
|
|
69
|
+
* @param callback - Callback to handle processed record
|
|
70
|
+
*
|
|
71
|
+
* @returns Resolves to processed SafelistInstance
|
|
72
|
+
*/
|
|
73
|
+
fetch(params: SafelistListInstanceFetchOptions, callback?: (error: Error | null, item?: SafelistInstance) => any): Promise<SafelistInstance>;
|
|
74
|
+
/**
|
|
75
|
+
* Provide a user-friendly representation
|
|
76
|
+
*/
|
|
77
|
+
toJSON(): any;
|
|
78
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
79
|
+
}
|
|
80
|
+
export declare function SafelistListInstance(version: V2010): SafelistListInstance;
|
|
81
|
+
interface SafelistResource {
|
|
82
|
+
sid: string;
|
|
83
|
+
phone_number: string;
|
|
84
|
+
}
|
|
85
|
+
export declare class SafelistInstance {
|
|
86
|
+
protected _version: V2010;
|
|
87
|
+
constructor(_version: V2010, payload: SafelistResource);
|
|
88
|
+
/**
|
|
89
|
+
* The unique string that we created to identify the SafeList resource.
|
|
90
|
+
*/
|
|
91
|
+
sid: string;
|
|
92
|
+
/**
|
|
93
|
+
* The phone number in SafeList.
|
|
94
|
+
*/
|
|
95
|
+
phoneNumber: string;
|
|
96
|
+
/**
|
|
97
|
+
* Provide a user-friendly representation
|
|
98
|
+
*
|
|
99
|
+
* @returns Object
|
|
100
|
+
*/
|
|
101
|
+
toJSON(): {
|
|
102
|
+
sid: string;
|
|
103
|
+
phoneNumber: string;
|
|
104
|
+
};
|
|
105
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
106
|
+
}
|
|
107
|
+
export {};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Api
|
|
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.SafelistInstance = exports.SafelistListInstance = void 0;
|
|
17
|
+
const util_1 = require("util");
|
|
18
|
+
const deserialize = require("../../../base/deserialize");
|
|
19
|
+
const serialize = require("../../../base/serialize");
|
|
20
|
+
function SafelistListInstance(version) {
|
|
21
|
+
const instance = {};
|
|
22
|
+
instance._version = version;
|
|
23
|
+
instance._solution = {};
|
|
24
|
+
instance._uri = `/SafeList/Numbers.json`;
|
|
25
|
+
instance.create = function create(params, callback) {
|
|
26
|
+
if (params === null || params === undefined) {
|
|
27
|
+
throw new Error('Required parameter "params" missing.');
|
|
28
|
+
}
|
|
29
|
+
if (params["phoneNumber"] === null || params["phoneNumber"] === undefined) {
|
|
30
|
+
throw new Error("Required parameter \"params['phoneNumber']\" missing.");
|
|
31
|
+
}
|
|
32
|
+
let data = {};
|
|
33
|
+
data["PhoneNumber"] = params["phoneNumber"];
|
|
34
|
+
const headers = {};
|
|
35
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
36
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
37
|
+
uri: instance._uri,
|
|
38
|
+
method: "post",
|
|
39
|
+
data,
|
|
40
|
+
headers,
|
|
41
|
+
});
|
|
42
|
+
operationPromise = operationPromise.then((payload) => new SafelistInstance(operationVersion, payload));
|
|
43
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
44
|
+
return operationPromise;
|
|
45
|
+
};
|
|
46
|
+
instance.remove = function remove(params, callback) {
|
|
47
|
+
if (params instanceof Function) {
|
|
48
|
+
callback = params;
|
|
49
|
+
params = {};
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
params = params || {};
|
|
53
|
+
}
|
|
54
|
+
let data = {};
|
|
55
|
+
if (params["phoneNumber"] !== undefined)
|
|
56
|
+
data["PhoneNumber"] = params["phoneNumber"];
|
|
57
|
+
const headers = {};
|
|
58
|
+
let operationVersion = version, operationPromise = operationVersion.remove({
|
|
59
|
+
uri: instance._uri,
|
|
60
|
+
method: "delete",
|
|
61
|
+
params: data,
|
|
62
|
+
headers,
|
|
63
|
+
});
|
|
64
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
65
|
+
return operationPromise;
|
|
66
|
+
};
|
|
67
|
+
instance.fetch = function fetch(params, callback) {
|
|
68
|
+
if (params instanceof Function) {
|
|
69
|
+
callback = params;
|
|
70
|
+
params = {};
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
params = params || {};
|
|
74
|
+
}
|
|
75
|
+
let data = {};
|
|
76
|
+
if (params["phoneNumber"] !== undefined)
|
|
77
|
+
data["PhoneNumber"] = params["phoneNumber"];
|
|
78
|
+
const headers = {};
|
|
79
|
+
let operationVersion = version, operationPromise = operationVersion.fetch({
|
|
80
|
+
uri: instance._uri,
|
|
81
|
+
method: "get",
|
|
82
|
+
params: data,
|
|
83
|
+
headers,
|
|
84
|
+
});
|
|
85
|
+
operationPromise = operationPromise.then((payload) => new SafelistInstance(operationVersion, payload));
|
|
86
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
87
|
+
return operationPromise;
|
|
88
|
+
};
|
|
89
|
+
instance.toJSON = function toJSON() {
|
|
90
|
+
return instance._solution;
|
|
91
|
+
};
|
|
92
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
93
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
94
|
+
};
|
|
95
|
+
return instance;
|
|
96
|
+
}
|
|
97
|
+
exports.SafelistListInstance = SafelistListInstance;
|
|
98
|
+
class SafelistInstance {
|
|
99
|
+
constructor(_version, payload) {
|
|
100
|
+
this._version = _version;
|
|
101
|
+
this.sid = payload.sid;
|
|
102
|
+
this.phoneNumber = payload.phone_number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Provide a user-friendly representation
|
|
106
|
+
*
|
|
107
|
+
* @returns Object
|
|
108
|
+
*/
|
|
109
|
+
toJSON() {
|
|
110
|
+
return {
|
|
111
|
+
sid: this.sid,
|
|
112
|
+
phoneNumber: this.phoneNumber,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
[util_1.inspect.custom](_depth, options) {
|
|
116
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.SafelistInstance = SafelistInstance;
|
|
@@ -11,7 +11,7 @@ export interface ChannelContextUpdateOptions {
|
|
|
11
11
|
xTwilioWebhookEnabled?: ChannelWebhookEnabledType;
|
|
12
12
|
/** */
|
|
13
13
|
type?: ChannelChannelType;
|
|
14
|
-
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
14
|
+
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to. */
|
|
15
15
|
messagingServiceSid?: string;
|
|
16
16
|
}
|
|
17
17
|
export interface ChannelContext {
|
|
@@ -123,7 +123,7 @@ export declare class ChannelInstance {
|
|
|
123
123
|
*/
|
|
124
124
|
messagesCount: number;
|
|
125
125
|
/**
|
|
126
|
-
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
126
|
+
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
|
|
127
127
|
*/
|
|
128
128
|
messagingServiceSid: string;
|
|
129
129
|
/**
|
|
@@ -5,7 +5,7 @@ import Response from "../../../http/response";
|
|
|
5
5
|
import V1 from "../V1";
|
|
6
6
|
export type AddressConfigurationAutoCreationType = "webhook" | "studio" | "default";
|
|
7
7
|
export type AddressConfigurationMethod = "GET" | "POST";
|
|
8
|
-
export type AddressConfigurationType = "sms" | "whatsapp" | "messenger" | "gbm";
|
|
8
|
+
export type AddressConfigurationType = "sms" | "whatsapp" | "messenger" | "gbm" | "email";
|
|
9
9
|
/**
|
|
10
10
|
* Options to pass to update a AddressConfigurationInstance
|
|
11
11
|
*/
|
|
@@ -8,7 +8,7 @@ import { WebhookListInstance } from "./configuration/webhook";
|
|
|
8
8
|
export interface ConfigurationContextUpdateOptions {
|
|
9
9
|
/** The SID of the default [Conversation Service](https://www.twilio.com/docs/conversations/api/service-resource) to use when creating a conversation. */
|
|
10
10
|
defaultChatServiceSid?: string;
|
|
11
|
-
/** The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
11
|
+
/** The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to use when creating a conversation. */
|
|
12
12
|
defaultMessagingServiceSid?: string;
|
|
13
13
|
/** Default ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute. */
|
|
14
14
|
defaultInactiveTimer?: string;
|
|
@@ -87,7 +87,7 @@ export declare class ConfigurationInstance {
|
|
|
87
87
|
*/
|
|
88
88
|
defaultChatServiceSid: string;
|
|
89
89
|
/**
|
|
90
|
-
* The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
90
|
+
* The SID of the default [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) used when creating a conversation.
|
|
91
91
|
*/
|
|
92
92
|
defaultMessagingServiceSid: string;
|
|
93
93
|
/**
|
|
@@ -29,6 +29,8 @@ export interface MessageContextUpdateOptions {
|
|
|
29
29
|
dateUpdated?: Date;
|
|
30
30
|
/** A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */
|
|
31
31
|
attributes?: string;
|
|
32
|
+
/** The subject of the message, can be up to 256 characters long. */
|
|
33
|
+
subject?: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Options to pass to create a MessageInstance
|
|
@@ -52,6 +54,8 @@ export interface MessageListInstanceCreateOptions {
|
|
|
52
54
|
contentSid?: string;
|
|
53
55
|
/** A structurally valid JSON string that contains values to resolve Rich Content template variables. */
|
|
54
56
|
contentVariables?: string;
|
|
57
|
+
/** The subject of the message, can be up to 256 characters long. */
|
|
58
|
+
subject?: string;
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
61
|
* Options to pass to each
|
|
@@ -92,6 +92,8 @@ class MessageContextImpl {
|
|
|
92
92
|
data["DateUpdated"] = serialize.iso8601DateTime(params["dateUpdated"]);
|
|
93
93
|
if (params["attributes"] !== undefined)
|
|
94
94
|
data["Attributes"] = params["attributes"];
|
|
95
|
+
if (params["subject"] !== undefined)
|
|
96
|
+
data["Subject"] = params["subject"];
|
|
95
97
|
const headers = {};
|
|
96
98
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
97
99
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -233,6 +235,8 @@ function MessageListInstance(version, conversationSid) {
|
|
|
233
235
|
data["ContentSid"] = params["contentSid"];
|
|
234
236
|
if (params["contentVariables"] !== undefined)
|
|
235
237
|
data["ContentVariables"] = params["contentVariables"];
|
|
238
|
+
if (params["subject"] !== undefined)
|
|
239
|
+
data["Subject"] = params["subject"];
|
|
236
240
|
const headers = {};
|
|
237
241
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
238
242
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -29,7 +29,7 @@ export interface ConversationContextUpdateOptions {
|
|
|
29
29
|
dateUpdated?: Date;
|
|
30
30
|
/** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */
|
|
31
31
|
attributes?: string;
|
|
32
|
-
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
32
|
+
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. */
|
|
33
33
|
messagingServiceSid?: string;
|
|
34
34
|
/** */
|
|
35
35
|
state?: ConversationState;
|
|
@@ -39,6 +39,10 @@ export interface ConversationContextUpdateOptions {
|
|
|
39
39
|
"timers.closed"?: string;
|
|
40
40
|
/** An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource\\\'s `sid` in the URL. */
|
|
41
41
|
uniqueName?: string;
|
|
42
|
+
/** The default email address that will be used when sending outbound emails in this conversation. */
|
|
43
|
+
"bindings.email.address"?: string;
|
|
44
|
+
/** The default name that will be used when sending outbound emails in this conversation. */
|
|
45
|
+
"bindings.email.name"?: string;
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
48
|
* Options to pass to create a ConversationInstance
|
|
@@ -54,7 +58,7 @@ export interface ConversationListInstanceCreateOptions {
|
|
|
54
58
|
dateCreated?: Date;
|
|
55
59
|
/** The date that this resource was last updated. */
|
|
56
60
|
dateUpdated?: Date;
|
|
57
|
-
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
61
|
+
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. */
|
|
58
62
|
messagingServiceSid?: string;
|
|
59
63
|
/** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */
|
|
60
64
|
attributes?: string;
|
|
@@ -64,6 +68,10 @@ export interface ConversationListInstanceCreateOptions {
|
|
|
64
68
|
"timers.inactive"?: string;
|
|
65
69
|
/** ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. */
|
|
66
70
|
"timers.closed"?: string;
|
|
71
|
+
/** The default email address that will be used when sending outbound emails in this conversation. */
|
|
72
|
+
"bindings.email.address"?: string;
|
|
73
|
+
/** The default name that will be used when sending outbound emails in this conversation. */
|
|
74
|
+
"bindings.email.name"?: string;
|
|
67
75
|
}
|
|
68
76
|
/**
|
|
69
77
|
* Options to pass to each
|
|
@@ -226,7 +234,7 @@ export declare class ConversationInstance {
|
|
|
226
234
|
*/
|
|
227
235
|
chatServiceSid: string;
|
|
228
236
|
/**
|
|
229
|
-
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
237
|
+
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
|
|
230
238
|
*/
|
|
231
239
|
messagingServiceSid: string;
|
|
232
240
|
/**
|
|
@@ -109,6 +109,10 @@ class ConversationContextImpl {
|
|
|
109
109
|
data["Timers.Closed"] = params["timers.closed"];
|
|
110
110
|
if (params["uniqueName"] !== undefined)
|
|
111
111
|
data["UniqueName"] = params["uniqueName"];
|
|
112
|
+
if (params["bindings.email.address"] !== undefined)
|
|
113
|
+
data["Bindings.Email.Address"] = params["bindings.email.address"];
|
|
114
|
+
if (params["bindings.email.name"] !== undefined)
|
|
115
|
+
data["Bindings.Email.Name"] = params["bindings.email.name"];
|
|
112
116
|
const headers = {};
|
|
113
117
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
114
118
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -259,6 +263,10 @@ function ConversationListInstance(version) {
|
|
|
259
263
|
data["Timers.Inactive"] = params["timers.inactive"];
|
|
260
264
|
if (params["timers.closed"] !== undefined)
|
|
261
265
|
data["Timers.Closed"] = params["timers.closed"];
|
|
266
|
+
if (params["bindings.email.address"] !== undefined)
|
|
267
|
+
data["Bindings.Email.Address"] = params["bindings.email.address"];
|
|
268
|
+
if (params["bindings.email.name"] !== undefined)
|
|
269
|
+
data["Bindings.Email.Name"] = params["bindings.email.name"];
|
|
262
270
|
const headers = {};
|
|
263
271
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
264
272
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -29,6 +29,8 @@ export interface MessageContextUpdateOptions {
|
|
|
29
29
|
dateUpdated?: Date;
|
|
30
30
|
/** A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */
|
|
31
31
|
attributes?: string;
|
|
32
|
+
/** The subject of the message, can be up to 256 characters long. */
|
|
33
|
+
subject?: string;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Options to pass to create a MessageInstance
|
|
@@ -52,6 +54,8 @@ export interface MessageListInstanceCreateOptions {
|
|
|
52
54
|
contentSid?: string;
|
|
53
55
|
/** A structurally valid JSON string that contains values to resolve Rich Content template variables. */
|
|
54
56
|
contentVariables?: string;
|
|
57
|
+
/** The subject of the message, can be up to 256 characters long. */
|
|
58
|
+
subject?: string;
|
|
55
59
|
}
|
|
56
60
|
/**
|
|
57
61
|
* Options to pass to each
|
|
@@ -95,6 +95,8 @@ class MessageContextImpl {
|
|
|
95
95
|
data["DateUpdated"] = serialize.iso8601DateTime(params["dateUpdated"]);
|
|
96
96
|
if (params["attributes"] !== undefined)
|
|
97
97
|
data["Attributes"] = params["attributes"];
|
|
98
|
+
if (params["subject"] !== undefined)
|
|
99
|
+
data["Subject"] = params["subject"];
|
|
98
100
|
const headers = {};
|
|
99
101
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
100
102
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -241,6 +243,8 @@ function MessageListInstance(version, chatServiceSid, conversationSid) {
|
|
|
241
243
|
data["ContentSid"] = params["contentSid"];
|
|
242
244
|
if (params["contentVariables"] !== undefined)
|
|
243
245
|
data["ContentVariables"] = params["contentVariables"];
|
|
246
|
+
if (params["subject"] !== undefined)
|
|
247
|
+
data["Subject"] = params["subject"];
|
|
244
248
|
const headers = {};
|
|
245
249
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
246
250
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -29,7 +29,7 @@ export interface ConversationContextUpdateOptions {
|
|
|
29
29
|
dateUpdated?: Date;
|
|
30
30
|
/** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */
|
|
31
31
|
attributes?: string;
|
|
32
|
-
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
32
|
+
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. */
|
|
33
33
|
messagingServiceSid?: string;
|
|
34
34
|
/** */
|
|
35
35
|
state?: ConversationState;
|
|
@@ -39,6 +39,10 @@ export interface ConversationContextUpdateOptions {
|
|
|
39
39
|
"timers.closed"?: string;
|
|
40
40
|
/** An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource\\\'s `sid` in the URL. */
|
|
41
41
|
uniqueName?: string;
|
|
42
|
+
/** The default email address that will be used when sending outbound emails in this conversation. */
|
|
43
|
+
"bindings.email.address"?: string;
|
|
44
|
+
/** The default name that will be used when sending outbound emails in this conversation. */
|
|
45
|
+
"bindings.email.name"?: string;
|
|
42
46
|
}
|
|
43
47
|
/**
|
|
44
48
|
* Options to pass to create a ConversationInstance
|
|
@@ -52,7 +56,7 @@ export interface ConversationListInstanceCreateOptions {
|
|
|
52
56
|
uniqueName?: string;
|
|
53
57
|
/** An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned. */
|
|
54
58
|
attributes?: string;
|
|
55
|
-
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
59
|
+
/** The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to. */
|
|
56
60
|
messagingServiceSid?: string;
|
|
57
61
|
/** The date that this resource was created. */
|
|
58
62
|
dateCreated?: Date;
|
|
@@ -64,6 +68,10 @@ export interface ConversationListInstanceCreateOptions {
|
|
|
64
68
|
"timers.inactive"?: string;
|
|
65
69
|
/** ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes. */
|
|
66
70
|
"timers.closed"?: string;
|
|
71
|
+
/** The default email address that will be used when sending outbound emails in this conversation. */
|
|
72
|
+
"bindings.email.address"?: string;
|
|
73
|
+
/** The default name that will be used when sending outbound emails in this conversation. */
|
|
74
|
+
"bindings.email.name"?: string;
|
|
67
75
|
}
|
|
68
76
|
/**
|
|
69
77
|
* Options to pass to each
|
|
@@ -227,7 +235,7 @@ export declare class ConversationInstance {
|
|
|
227
235
|
*/
|
|
228
236
|
chatServiceSid: string;
|
|
229
237
|
/**
|
|
230
|
-
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/
|
|
238
|
+
* The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
|
|
231
239
|
*/
|
|
232
240
|
messagingServiceSid: string;
|
|
233
241
|
/**
|
|
@@ -114,6 +114,10 @@ class ConversationContextImpl {
|
|
|
114
114
|
data["Timers.Closed"] = params["timers.closed"];
|
|
115
115
|
if (params["uniqueName"] !== undefined)
|
|
116
116
|
data["UniqueName"] = params["uniqueName"];
|
|
117
|
+
if (params["bindings.email.address"] !== undefined)
|
|
118
|
+
data["Bindings.Email.Address"] = params["bindings.email.address"];
|
|
119
|
+
if (params["bindings.email.name"] !== undefined)
|
|
120
|
+
data["Bindings.Email.Name"] = params["bindings.email.name"];
|
|
117
121
|
const headers = {};
|
|
118
122
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
119
123
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|
|
@@ -267,6 +271,10 @@ function ConversationListInstance(version, chatServiceSid) {
|
|
|
267
271
|
data["Timers.Inactive"] = params["timers.inactive"];
|
|
268
272
|
if (params["timers.closed"] !== undefined)
|
|
269
273
|
data["Timers.Closed"] = params["timers.closed"];
|
|
274
|
+
if (params["bindings.email.address"] !== undefined)
|
|
275
|
+
data["Bindings.Email.Address"] = params["bindings.email.address"];
|
|
276
|
+
if (params["bindings.email.name"] !== undefined)
|
|
277
|
+
data["Bindings.Email.Name"] = params["bindings.email.name"];
|
|
270
278
|
const headers = {};
|
|
271
279
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
272
280
|
if (params["xTwilioWebhookEnabled"] !== undefined)
|