twilio 4.18.1 → 4.19.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.
- package/lib/rest/accounts/V1.d.ts +5 -0
- package/lib/rest/accounts/V1.js +6 -0
- package/lib/rest/{api/v2010 → accounts/v1}/safelist.d.ts +5 -5
- package/lib/rest/{api/v2010 → accounts/v1}/safelist.js +2 -2
- package/lib/rest/api/V2010.d.ts +0 -5
- package/lib/rest/api/V2010.js +0 -6
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
- package/lib/rest/api/v2010/account/conference/participant.js +2 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +6 -0
- package/lib/rest/flexApi/v1/configuration.js +2 -0
- package/lib/rest/intelligence/v2/transcript/media.d.ts +1 -1
- package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +4 -4
- package/lib/rest/intelligence/v2/transcript/sentence.d.ts +3 -3
- package/lib/rest/intelligence/v2/transcript.d.ts +1 -26
- package/lib/rest/intelligence/v2/transcript.js +10 -16
- package/lib/rest/lookups/v2/phoneNumber.d.ts +4 -4
- package/lib/rest/lookups/v2/phoneNumber.js +2 -2
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +2 -2
- package/lib/rest/taskrouter/v1/workspace/task.d.ts +13 -3
- package/lib/rest/taskrouter/v1/workspace/task.js +6 -0
- package/package.json +5 -5
|
@@ -2,6 +2,7 @@ import AccountsBase from "../AccountsBase";
|
|
|
2
2
|
import Version from "../../base/Version";
|
|
3
3
|
import { AuthTokenPromotionListInstance } from "./v1/authTokenPromotion";
|
|
4
4
|
import { CredentialListInstance } from "./v1/credential";
|
|
5
|
+
import { SafelistListInstance } from "./v1/safelist";
|
|
5
6
|
import { SecondaryAuthTokenListInstance } from "./v1/secondaryAuthToken";
|
|
6
7
|
export default class V1 extends Version {
|
|
7
8
|
/**
|
|
@@ -14,12 +15,16 @@ export default class V1 extends Version {
|
|
|
14
15
|
protected _authTokenPromotion?: AuthTokenPromotionListInstance;
|
|
15
16
|
/** credentials - { Twilio.Accounts.V1.CredentialListInstance } resource */
|
|
16
17
|
protected _credentials?: CredentialListInstance;
|
|
18
|
+
/** safelist - { Twilio.Accounts.V1.SafelistListInstance } resource */
|
|
19
|
+
protected _safelist?: SafelistListInstance;
|
|
17
20
|
/** secondaryAuthToken - { Twilio.Accounts.V1.SecondaryAuthTokenListInstance } resource */
|
|
18
21
|
protected _secondaryAuthToken?: SecondaryAuthTokenListInstance;
|
|
19
22
|
/** Getter for authTokenPromotion resource */
|
|
20
23
|
get authTokenPromotion(): AuthTokenPromotionListInstance;
|
|
21
24
|
/** Getter for credentials resource */
|
|
22
25
|
get credentials(): CredentialListInstance;
|
|
26
|
+
/** Getter for safelist resource */
|
|
27
|
+
get safelist(): SafelistListInstance;
|
|
23
28
|
/** Getter for secondaryAuthToken resource */
|
|
24
29
|
get secondaryAuthToken(): SecondaryAuthTokenListInstance;
|
|
25
30
|
}
|
package/lib/rest/accounts/V1.js
CHANGED
|
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
const Version_1 = __importDefault(require("../../base/Version"));
|
|
20
20
|
const authTokenPromotion_1 = require("./v1/authTokenPromotion");
|
|
21
21
|
const credential_1 = require("./v1/credential");
|
|
22
|
+
const safelist_1 = require("./v1/safelist");
|
|
22
23
|
const secondaryAuthToken_1 = require("./v1/secondaryAuthToken");
|
|
23
24
|
class V1 extends Version_1.default {
|
|
24
25
|
/**
|
|
@@ -40,6 +41,11 @@ class V1 extends Version_1.default {
|
|
|
40
41
|
this._credentials = this._credentials || (0, credential_1.CredentialListInstance)(this);
|
|
41
42
|
return this._credentials;
|
|
42
43
|
}
|
|
44
|
+
/** Getter for safelist resource */
|
|
45
|
+
get safelist() {
|
|
46
|
+
this._safelist = this._safelist || (0, safelist_1.SafelistListInstance)(this);
|
|
47
|
+
return this._safelist;
|
|
48
|
+
}
|
|
43
49
|
/** Getter for secondaryAuthToken resource */
|
|
44
50
|
get secondaryAuthToken() {
|
|
45
51
|
this._secondaryAuthToken =
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
|
-
import
|
|
3
|
+
import V1 from "../V1";
|
|
4
4
|
/**
|
|
5
5
|
* Options to pass to create a SafelistInstance
|
|
6
6
|
*/
|
|
@@ -25,7 +25,7 @@ export interface SafelistListInstanceFetchOptions {
|
|
|
25
25
|
export interface SafelistSolution {
|
|
26
26
|
}
|
|
27
27
|
export interface SafelistListInstance {
|
|
28
|
-
_version:
|
|
28
|
+
_version: V1;
|
|
29
29
|
_solution: SafelistSolution;
|
|
30
30
|
_uri: string;
|
|
31
31
|
/**
|
|
@@ -77,14 +77,14 @@ export interface SafelistListInstance {
|
|
|
77
77
|
toJSON(): any;
|
|
78
78
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
79
79
|
}
|
|
80
|
-
export declare function SafelistListInstance(version:
|
|
80
|
+
export declare function SafelistListInstance(version: V1): SafelistListInstance;
|
|
81
81
|
interface SafelistResource {
|
|
82
82
|
sid: string;
|
|
83
83
|
phone_number: string;
|
|
84
84
|
}
|
|
85
85
|
export declare class SafelistInstance {
|
|
86
|
-
protected _version:
|
|
87
|
-
constructor(_version:
|
|
86
|
+
protected _version: V1;
|
|
87
|
+
constructor(_version: V1, payload: SafelistResource);
|
|
88
88
|
/**
|
|
89
89
|
* The unique string that we created to identify the SafeList resource.
|
|
90
90
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
6
|
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
7
|
*
|
|
8
|
-
* Twilio -
|
|
8
|
+
* Twilio - Accounts
|
|
9
9
|
* This is the public Twilio REST API.
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
@@ -21,7 +21,7 @@ function SafelistListInstance(version) {
|
|
|
21
21
|
const instance = {};
|
|
22
22
|
instance._version = version;
|
|
23
23
|
instance._solution = {};
|
|
24
|
-
instance._uri = `/SafeList/Numbers
|
|
24
|
+
instance._uri = `/SafeList/Numbers`;
|
|
25
25
|
instance.create = function create(params, callback) {
|
|
26
26
|
if (params === null || params === undefined) {
|
|
27
27
|
throw new Error('Required parameter "params" missing.');
|
package/lib/rest/api/V2010.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { AccountContext } from "./v2010/account";
|
|
6
5
|
export default class V2010 extends Version {
|
|
7
6
|
/**
|
|
@@ -12,14 +11,10 @@ export default class V2010 extends Version {
|
|
|
12
11
|
constructor(domain: ApiBase);
|
|
13
12
|
/** accounts - { Twilio.Api.V2010.AccountListInstance } resource */
|
|
14
13
|
protected _accounts?: AccountListInstance;
|
|
15
|
-
/** safelist - { Twilio.Api.V2010.SafelistListInstance } resource */
|
|
16
|
-
protected _safelist?: SafelistListInstance;
|
|
17
14
|
/** account - { Twilio.Api.V2010.AccountContext } resource */
|
|
18
15
|
protected _account?: AccountContext;
|
|
19
16
|
/** Getter for accounts resource */
|
|
20
17
|
get accounts(): AccountListInstance;
|
|
21
|
-
/** Getter for safelist resource */
|
|
22
|
-
get safelist(): SafelistListInstance;
|
|
23
18
|
/** Getter for account resource */
|
|
24
19
|
get account(): AccountContext;
|
|
25
20
|
}
|
package/lib/rest/api/V2010.js
CHANGED
|
@@ -18,7 +18,6 @@ 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");
|
|
22
21
|
class V2010 extends Version_1.default {
|
|
23
22
|
/**
|
|
24
23
|
* Initialize the V2010 version of Api
|
|
@@ -33,11 +32,6 @@ class V2010 extends Version_1.default {
|
|
|
33
32
|
this._accounts = this._accounts || (0, account_1.AccountListInstance)(this);
|
|
34
33
|
return this._accounts;
|
|
35
34
|
}
|
|
36
|
-
/** Getter for safelist resource */
|
|
37
|
-
get safelist() {
|
|
38
|
-
this._safelist = this._safelist || (0, safelist_1.SafelistListInstance)(this);
|
|
39
|
-
return this._safelist;
|
|
40
|
-
}
|
|
41
35
|
/** Getter for account resource */
|
|
42
36
|
get account() {
|
|
43
37
|
this._account =
|
|
@@ -131,6 +131,8 @@ export interface ParticipantListInstanceCreateOptions {
|
|
|
131
131
|
amdStatusCallbackMethod?: string;
|
|
132
132
|
/** Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`. */
|
|
133
133
|
trim?: string;
|
|
134
|
+
/** A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call\\\'s call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call. */
|
|
135
|
+
callToken?: string;
|
|
134
136
|
}
|
|
135
137
|
/**
|
|
136
138
|
* Options to pass to each
|
|
@@ -319,6 +319,8 @@ function ParticipantListInstance(version, accountSid, conferenceSid) {
|
|
|
319
319
|
data["AmdStatusCallbackMethod"] = params["amdStatusCallbackMethod"];
|
|
320
320
|
if (params["trim"] !== undefined)
|
|
321
321
|
data["Trim"] = params["trim"];
|
|
322
|
+
if (params["callToken"] !== undefined)
|
|
323
|
+
data["CallToken"] = params["callToken"];
|
|
322
324
|
const headers = {};
|
|
323
325
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
324
326
|
let operationVersion = version, operationPromise = operationVersion.create({
|
|
@@ -97,6 +97,7 @@ interface ConfigurationResource {
|
|
|
97
97
|
flex_ui_status_report: any;
|
|
98
98
|
agent_conv_end_methods: any;
|
|
99
99
|
citrix_voice_vdi: any;
|
|
100
|
+
offline_config: any;
|
|
100
101
|
}
|
|
101
102
|
export declare class ConfigurationInstance {
|
|
102
103
|
protected _version: V1;
|
|
@@ -288,6 +289,10 @@ export declare class ConfigurationInstance {
|
|
|
288
289
|
* Citrix voice vdi configuration and settings.
|
|
289
290
|
*/
|
|
290
291
|
citrixVoiceVdi: any;
|
|
292
|
+
/**
|
|
293
|
+
* Presence and presence ttl configuration
|
|
294
|
+
*/
|
|
295
|
+
offlineConfig: any;
|
|
291
296
|
private get _proxy();
|
|
292
297
|
/**
|
|
293
298
|
* Fetch a ConfigurationInstance
|
|
@@ -359,6 +364,7 @@ export declare class ConfigurationInstance {
|
|
|
359
364
|
flexUiStatusReport: any;
|
|
360
365
|
agentConvEndMethods: any;
|
|
361
366
|
citrixVoiceVdi: any;
|
|
367
|
+
offlineConfig: any;
|
|
362
368
|
};
|
|
363
369
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
364
370
|
}
|
|
@@ -109,6 +109,7 @@ class ConfigurationInstance {
|
|
|
109
109
|
this.flexUiStatusReport = payload.flex_ui_status_report;
|
|
110
110
|
this.agentConvEndMethods = payload.agent_conv_end_methods;
|
|
111
111
|
this.citrixVoiceVdi = payload.citrix_voice_vdi;
|
|
112
|
+
this.offlineConfig = payload.offline_config;
|
|
112
113
|
this._solution = {};
|
|
113
114
|
}
|
|
114
115
|
get _proxy() {
|
|
@@ -173,6 +174,7 @@ class ConfigurationInstance {
|
|
|
173
174
|
flexUiStatusReport: this.flexUiStatusReport,
|
|
174
175
|
agentConvEndMethods: this.agentConvEndMethods,
|
|
175
176
|
citrixVoiceVdi: this.citrixVoiceVdi,
|
|
177
|
+
offlineConfig: this.offlineConfig,
|
|
176
178
|
};
|
|
177
179
|
}
|
|
178
180
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -5,7 +5,7 @@ import V2 from "../../V2";
|
|
|
5
5
|
* Options to pass to fetch a MediaInstance
|
|
6
6
|
*/
|
|
7
7
|
export interface MediaContextFetchOptions {
|
|
8
|
-
/** Grant access to PII Redacted/Unredacted Media.
|
|
8
|
+
/** Grant access to PII Redacted/Unredacted Media. If redaction is enabled, the default is `true` to access redacted media. */
|
|
9
9
|
redacted?: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface MediaContext {
|
|
@@ -8,14 +8,14 @@ export type OperatorResultOperatorType = "conversation_classify" | "utterance_cl
|
|
|
8
8
|
* Options to pass to fetch a OperatorResultInstance
|
|
9
9
|
*/
|
|
10
10
|
export interface OperatorResultContextFetchOptions {
|
|
11
|
-
/** Grant access to PII redacted/unredacted Language Understanding operator.
|
|
11
|
+
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
|
|
12
12
|
redacted?: boolean;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* Options to pass to each
|
|
16
16
|
*/
|
|
17
17
|
export interface OperatorResultListInstanceEachOptions {
|
|
18
|
-
/** Grant access to PII redacted/unredacted Language Understanding operator.
|
|
18
|
+
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
|
|
19
19
|
redacted?: boolean;
|
|
20
20
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
21
21
|
pageSize?: number;
|
|
@@ -30,7 +30,7 @@ export interface OperatorResultListInstanceEachOptions {
|
|
|
30
30
|
* Options to pass to list
|
|
31
31
|
*/
|
|
32
32
|
export interface OperatorResultListInstanceOptions {
|
|
33
|
-
/** Grant access to PII redacted/unredacted Language Understanding operator.
|
|
33
|
+
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
|
|
34
34
|
redacted?: boolean;
|
|
35
35
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
36
36
|
pageSize?: number;
|
|
@@ -41,7 +41,7 @@ export interface OperatorResultListInstanceOptions {
|
|
|
41
41
|
* Options to pass to page
|
|
42
42
|
*/
|
|
43
43
|
export interface OperatorResultListInstancePageOptions {
|
|
44
|
-
/** Grant access to PII redacted/unredacted Language Understanding operator.
|
|
44
|
+
/** Grant access to PII redacted/unredacted Language Understanding operator. If redaction is enabled, the default is True. */
|
|
45
45
|
redacted?: boolean;
|
|
46
46
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
47
47
|
pageSize?: number;
|
|
@@ -7,7 +7,7 @@ import V2 from "../../V2";
|
|
|
7
7
|
* Options to pass to each
|
|
8
8
|
*/
|
|
9
9
|
export interface SentenceListInstanceEachOptions {
|
|
10
|
-
/** Grant access to PII Redacted/Unredacted Sentences.
|
|
10
|
+
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
|
|
11
11
|
redacted?: boolean;
|
|
12
12
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
13
13
|
pageSize?: number;
|
|
@@ -22,7 +22,7 @@ export interface SentenceListInstanceEachOptions {
|
|
|
22
22
|
* Options to pass to list
|
|
23
23
|
*/
|
|
24
24
|
export interface SentenceListInstanceOptions {
|
|
25
|
-
/** Grant access to PII Redacted/Unredacted Sentences.
|
|
25
|
+
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
|
|
26
26
|
redacted?: boolean;
|
|
27
27
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
28
28
|
pageSize?: number;
|
|
@@ -33,7 +33,7 @@ export interface SentenceListInstanceOptions {
|
|
|
33
33
|
* Options to pass to page
|
|
34
34
|
*/
|
|
35
35
|
export interface SentenceListInstancePageOptions {
|
|
36
|
-
/** Grant access to PII Redacted/Unredacted Sentences.
|
|
36
|
+
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
|
|
37
37
|
redacted?: boolean;
|
|
38
38
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
39
39
|
pageSize?: number;
|
|
@@ -7,13 +7,6 @@ import { MediaListInstance } from "./transcript/media";
|
|
|
7
7
|
import { OperatorResultListInstance } from "./transcript/operatorResult";
|
|
8
8
|
import { SentenceListInstance } from "./transcript/sentence";
|
|
9
9
|
export type TranscriptStatus = "queued" | "in-progress" | "completed" | "failed" | "canceled";
|
|
10
|
-
/**
|
|
11
|
-
* Options to pass to fetch a TranscriptInstance
|
|
12
|
-
*/
|
|
13
|
-
export interface TranscriptContextFetchOptions {
|
|
14
|
-
/** Grant access to PII Redacted/Unredacted Transcript. The default is `true` to access redacted Transcript. */
|
|
15
|
-
redacted?: boolean;
|
|
16
|
-
}
|
|
17
10
|
/**
|
|
18
11
|
* Options to pass to create a TranscriptInstance
|
|
19
12
|
*/
|
|
@@ -128,15 +121,6 @@ export interface TranscriptContext {
|
|
|
128
121
|
* @returns Resolves to processed TranscriptInstance
|
|
129
122
|
*/
|
|
130
123
|
fetch(callback?: (error: Error | null, item?: TranscriptInstance) => any): Promise<TranscriptInstance>;
|
|
131
|
-
/**
|
|
132
|
-
* Fetch a TranscriptInstance
|
|
133
|
-
*
|
|
134
|
-
* @param params - Parameter for request
|
|
135
|
-
* @param callback - Callback to handle processed record
|
|
136
|
-
*
|
|
137
|
-
* @returns Resolves to processed TranscriptInstance
|
|
138
|
-
*/
|
|
139
|
-
fetch(params: TranscriptContextFetchOptions, callback?: (error: Error | null, item?: TranscriptInstance) => any): Promise<TranscriptInstance>;
|
|
140
124
|
/**
|
|
141
125
|
* Provide a user-friendly representation
|
|
142
126
|
*/
|
|
@@ -158,7 +142,7 @@ export declare class TranscriptContextImpl implements TranscriptContext {
|
|
|
158
142
|
get operatorResults(): OperatorResultListInstance;
|
|
159
143
|
get sentences(): SentenceListInstance;
|
|
160
144
|
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
161
|
-
fetch(
|
|
145
|
+
fetch(callback?: (error: Error | null, item?: TranscriptInstance) => any): Promise<TranscriptInstance>;
|
|
162
146
|
/**
|
|
163
147
|
* Provide a user-friendly representation
|
|
164
148
|
*
|
|
@@ -260,15 +244,6 @@ export declare class TranscriptInstance {
|
|
|
260
244
|
* @returns Resolves to processed TranscriptInstance
|
|
261
245
|
*/
|
|
262
246
|
fetch(callback?: (error: Error | null, item?: TranscriptInstance) => any): Promise<TranscriptInstance>;
|
|
263
|
-
/**
|
|
264
|
-
* Fetch a TranscriptInstance
|
|
265
|
-
*
|
|
266
|
-
* @param params - Parameter for request
|
|
267
|
-
* @param callback - Callback to handle processed record
|
|
268
|
-
*
|
|
269
|
-
* @returns Resolves to processed TranscriptInstance
|
|
270
|
-
*/
|
|
271
|
-
fetch(params: TranscriptContextFetchOptions, callback?: (error: Error | null, item?: TranscriptInstance) => any): Promise<TranscriptInstance>;
|
|
272
247
|
/**
|
|
273
248
|
* Access the media.
|
|
274
249
|
*/
|
|
@@ -60,24 +60,11 @@ class TranscriptContextImpl {
|
|
|
60
60
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
61
61
|
return operationPromise;
|
|
62
62
|
}
|
|
63
|
-
fetch(
|
|
64
|
-
if (params instanceof Function) {
|
|
65
|
-
callback = params;
|
|
66
|
-
params = {};
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
params = params || {};
|
|
70
|
-
}
|
|
71
|
-
let data = {};
|
|
72
|
-
if (params["redacted"] !== undefined)
|
|
73
|
-
data["Redacted"] = serialize.bool(params["redacted"]);
|
|
74
|
-
const headers = {};
|
|
63
|
+
fetch(callback) {
|
|
75
64
|
const instance = this;
|
|
76
65
|
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
77
66
|
uri: instance._uri,
|
|
78
67
|
method: "get",
|
|
79
|
-
params: data,
|
|
80
|
-
headers,
|
|
81
68
|
});
|
|
82
69
|
operationPromise = operationPromise.then((payload) => new TranscriptInstance(operationVersion, payload, instance._solution.sid));
|
|
83
70
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
@@ -132,8 +119,15 @@ class TranscriptInstance {
|
|
|
132
119
|
remove(callback) {
|
|
133
120
|
return this._proxy.remove(callback);
|
|
134
121
|
}
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Fetch a TranscriptInstance
|
|
124
|
+
*
|
|
125
|
+
* @param callback - Callback to handle processed record
|
|
126
|
+
*
|
|
127
|
+
* @returns Resolves to processed TranscriptInstance
|
|
128
|
+
*/
|
|
129
|
+
fetch(callback) {
|
|
130
|
+
return this._proxy.fetch(callback);
|
|
137
131
|
}
|
|
138
132
|
/**
|
|
139
133
|
* Access the media.
|
|
@@ -89,7 +89,7 @@ interface PhoneNumberResource {
|
|
|
89
89
|
identity_match: any;
|
|
90
90
|
reassigned_number: any;
|
|
91
91
|
sms_pumping_risk: any;
|
|
92
|
-
|
|
92
|
+
phone_number_quality_score: any;
|
|
93
93
|
url: string;
|
|
94
94
|
}
|
|
95
95
|
export declare class PhoneNumberInstance {
|
|
@@ -154,9 +154,9 @@ export declare class PhoneNumberInstance {
|
|
|
154
154
|
*/
|
|
155
155
|
smsPumpingRisk: any;
|
|
156
156
|
/**
|
|
157
|
-
* An object that contains information
|
|
157
|
+
* An object that contains information of a mobile phone number quality score. Quality score will return a risk score about the phone number.
|
|
158
158
|
*/
|
|
159
|
-
|
|
159
|
+
phoneNumberQualityScore: any;
|
|
160
160
|
/**
|
|
161
161
|
* The absolute URL of the resource.
|
|
162
162
|
*/
|
|
@@ -199,7 +199,7 @@ export declare class PhoneNumberInstance {
|
|
|
199
199
|
identityMatch: any;
|
|
200
200
|
reassignedNumber: any;
|
|
201
201
|
smsPumpingRisk: any;
|
|
202
|
-
|
|
202
|
+
phoneNumberQualityScore: any;
|
|
203
203
|
url: string;
|
|
204
204
|
};
|
|
205
205
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -104,7 +104,7 @@ class PhoneNumberInstance {
|
|
|
104
104
|
this.identityMatch = payload.identity_match;
|
|
105
105
|
this.reassignedNumber = payload.reassigned_number;
|
|
106
106
|
this.smsPumpingRisk = payload.sms_pumping_risk;
|
|
107
|
-
this.
|
|
107
|
+
this.phoneNumberQualityScore = payload.phone_number_quality_score;
|
|
108
108
|
this.url = payload.url;
|
|
109
109
|
this._solution = { phoneNumber: phoneNumber || this.phoneNumber };
|
|
110
110
|
}
|
|
@@ -138,7 +138,7 @@ class PhoneNumberInstance {
|
|
|
138
138
|
identityMatch: this.identityMatch,
|
|
139
139
|
reassignedNumber: this.reassignedNumber,
|
|
140
140
|
smsPumpingRisk: this.smsPumpingRisk,
|
|
141
|
-
|
|
141
|
+
phoneNumberQualityScore: this.phoneNumberQualityScore,
|
|
142
142
|
url: this.url,
|
|
143
143
|
};
|
|
144
144
|
}
|
|
@@ -13,7 +13,7 @@ export interface UsAppToPersonListInstanceCreateOptions {
|
|
|
13
13
|
description: string;
|
|
14
14
|
/** Required for all Campaigns. Details around how a consumer opts-in to their campaign, therefore giving consent to receive their messages. If multiple opt-in methods can be used for the same campaign, they must all be listed. 40 character minimum. 2048 character maximum. */
|
|
15
15
|
messageFlow: string;
|
|
16
|
-
/**
|
|
16
|
+
/** An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars. */
|
|
17
17
|
messageSamples: Array<string>;
|
|
18
18
|
/** A2P Campaign Use Case. Examples: [ 2FA, EMERGENCY, MARKETING..] */
|
|
19
19
|
usAppToPersonUsecase: string;
|
|
@@ -165,7 +165,7 @@ export declare class UsAppToPersonInstance {
|
|
|
165
165
|
*/
|
|
166
166
|
description: string;
|
|
167
167
|
/**
|
|
168
|
-
*
|
|
168
|
+
* An array of sample message strings, min two and max five. Min length for each sample: 20 chars. Max length for each sample: 1024 chars.
|
|
169
169
|
*/
|
|
170
170
|
messageSamples: Array<string>;
|
|
171
171
|
/**
|
|
@@ -28,6 +28,8 @@ export interface TaskContextUpdateOptions {
|
|
|
28
28
|
priority?: number;
|
|
29
29
|
/** When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel\\\'s SID or its `unique_name`, such as `voice`, `sms`, or `default`. */
|
|
30
30
|
taskChannel?: string;
|
|
31
|
+
/** The task\\\'s new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can\\\'t be in the future. */
|
|
32
|
+
virtualStartTime?: Date;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Options to pass to create a TaskInstance
|
|
@@ -43,6 +45,8 @@ export interface TaskListInstanceCreateOptions {
|
|
|
43
45
|
workflowSid?: string;
|
|
44
46
|
/** A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow\\\'s `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`. */
|
|
45
47
|
attributes?: string;
|
|
48
|
+
/** The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can\\\'t be in the future. */
|
|
49
|
+
virtualStartTime?: Date;
|
|
46
50
|
}
|
|
47
51
|
/**
|
|
48
52
|
* Options to pass to each
|
|
@@ -62,7 +66,7 @@ export interface TaskListInstanceEachOptions {
|
|
|
62
66
|
taskQueueName?: string;
|
|
63
67
|
/** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */
|
|
64
68
|
evaluateTaskAttributes?: string;
|
|
65
|
-
/** How to order the returned Task resources.
|
|
69
|
+
/** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */
|
|
66
70
|
ordering?: string;
|
|
67
71
|
/** Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. */
|
|
68
72
|
hasAddons?: boolean;
|
|
@@ -93,7 +97,7 @@ export interface TaskListInstanceOptions {
|
|
|
93
97
|
taskQueueName?: string;
|
|
94
98
|
/** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */
|
|
95
99
|
evaluateTaskAttributes?: string;
|
|
96
|
-
/** How to order the returned Task resources.
|
|
100
|
+
/** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */
|
|
97
101
|
ordering?: string;
|
|
98
102
|
/** Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. */
|
|
99
103
|
hasAddons?: boolean;
|
|
@@ -120,7 +124,7 @@ export interface TaskListInstancePageOptions {
|
|
|
120
124
|
taskQueueName?: string;
|
|
121
125
|
/** The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter. */
|
|
122
126
|
evaluateTaskAttributes?: string;
|
|
123
|
-
/** How to order the returned Task resources.
|
|
127
|
+
/** How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime. */
|
|
124
128
|
ordering?: string;
|
|
125
129
|
/** Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons. */
|
|
126
130
|
hasAddons?: boolean;
|
|
@@ -228,6 +232,7 @@ interface TaskResource {
|
|
|
228
232
|
workspace_sid: string;
|
|
229
233
|
url: string;
|
|
230
234
|
links: Record<string, string>;
|
|
235
|
+
virtual_start_time: Date;
|
|
231
236
|
}
|
|
232
237
|
export declare class TaskInstance {
|
|
233
238
|
protected _version: V1;
|
|
@@ -315,6 +320,10 @@ export declare class TaskInstance {
|
|
|
315
320
|
* The URLs of related resources.
|
|
316
321
|
*/
|
|
317
322
|
links: Record<string, string>;
|
|
323
|
+
/**
|
|
324
|
+
* The date and time in GMT indicating the ordering for routing of the Task specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
325
|
+
*/
|
|
326
|
+
virtualStartTime: Date;
|
|
318
327
|
private get _proxy();
|
|
319
328
|
/**
|
|
320
329
|
* Remove a TaskInstance
|
|
@@ -389,6 +398,7 @@ export declare class TaskInstance {
|
|
|
389
398
|
workspaceSid: string;
|
|
390
399
|
url: string;
|
|
391
400
|
links: Record<string, string>;
|
|
401
|
+
virtualStartTime: Date;
|
|
392
402
|
};
|
|
393
403
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
394
404
|
}
|
|
@@ -92,6 +92,8 @@ class TaskContextImpl {
|
|
|
92
92
|
data["Priority"] = params["priority"];
|
|
93
93
|
if (params["taskChannel"] !== undefined)
|
|
94
94
|
data["TaskChannel"] = params["taskChannel"];
|
|
95
|
+
if (params["virtualStartTime"] !== undefined)
|
|
96
|
+
data["VirtualStartTime"] = serialize.iso8601DateTime(params["virtualStartTime"]);
|
|
95
97
|
const headers = {};
|
|
96
98
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
97
99
|
if (params["ifMatch"] !== undefined)
|
|
@@ -144,6 +146,7 @@ class TaskInstance {
|
|
|
144
146
|
this.workspaceSid = payload.workspace_sid;
|
|
145
147
|
this.url = payload.url;
|
|
146
148
|
this.links = payload.links;
|
|
149
|
+
this.virtualStartTime = deserialize.iso8601DateTime(payload.virtual_start_time);
|
|
147
150
|
this._solution = { workspaceSid, sid: sid || this.sid };
|
|
148
151
|
}
|
|
149
152
|
get _proxy() {
|
|
@@ -202,6 +205,7 @@ class TaskInstance {
|
|
|
202
205
|
workspaceSid: this.workspaceSid,
|
|
203
206
|
url: this.url,
|
|
204
207
|
links: this.links,
|
|
208
|
+
virtualStartTime: this.virtualStartTime,
|
|
205
209
|
};
|
|
206
210
|
}
|
|
207
211
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -239,6 +243,8 @@ function TaskListInstance(version, workspaceSid) {
|
|
|
239
243
|
data["WorkflowSid"] = params["workflowSid"];
|
|
240
244
|
if (params["attributes"] !== undefined)
|
|
241
245
|
data["Attributes"] = params["attributes"];
|
|
246
|
+
if (params["virtualStartTime"] !== undefined)
|
|
247
|
+
data["VirtualStartTime"] = serialize.iso8601DateTime(params["virtualStartTime"]);
|
|
242
248
|
const headers = {};
|
|
243
249
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
244
250
|
let operationVersion = version, operationPromise = operationVersion.create({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio",
|
|
3
3
|
"description": "A Twilio helper library",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.19.0",
|
|
5
5
|
"author": "API Team <api@twilio.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"xmlbuilder": "^13.0.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@babel/preset-env": "^7.
|
|
33
|
+
"@babel/preset-env": "^7.23.0",
|
|
34
34
|
"@babel/preset-typescript": "^7.18.6",
|
|
35
|
-
"@types/jest": "^29.
|
|
35
|
+
"@types/jest": "^29.5.5",
|
|
36
36
|
"@types/jsonwebtoken": "^9.0.0",
|
|
37
37
|
"@types/node": "^18.11.18",
|
|
38
38
|
"@types/qs": "^6.9.7",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
|
|
41
41
|
"eslint": "^8.31.0",
|
|
42
42
|
"express": "^4.17.1",
|
|
43
|
-
"jest": "^29.
|
|
43
|
+
"jest": "^29.5.5",
|
|
44
44
|
"jshint": "^2.11.0",
|
|
45
45
|
"mock-fs": "^5.2.0",
|
|
46
46
|
"nock": "^13.2.9",
|
|
47
47
|
"node-mocks-http": "^1.8.1",
|
|
48
48
|
"prettier": "^2.7.1",
|
|
49
|
-
"ts-jest": "^29.
|
|
49
|
+
"ts-jest": "^29.1.1",
|
|
50
50
|
"typescript": "^4.7.2",
|
|
51
51
|
"typedoc": "^0.23.21"
|
|
52
52
|
},
|