twilio 4.18.0 → 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.
Files changed (29) hide show
  1. package/lib/base/BaseTwilio.d.ts +2 -1
  2. package/lib/base/BaseTwilio.js +3 -2
  3. package/lib/rest/accounts/V1.d.ts +5 -0
  4. package/lib/rest/accounts/V1.js +6 -0
  5. package/lib/rest/{api/v2010 → accounts/v1}/safelist.d.ts +5 -5
  6. package/lib/rest/{api/v2010 → accounts/v1}/safelist.js +2 -2
  7. package/lib/rest/api/V2010.d.ts +0 -5
  8. package/lib/rest/api/V2010.js +0 -6
  9. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
  10. package/lib/rest/api/v2010/account/conference/participant.js +2 -0
  11. package/lib/rest/api/v2010/account/message.d.ts +0 -8
  12. package/lib/rest/api/v2010/account/message.js +0 -4
  13. package/lib/rest/flexApi/v1/configuration.d.ts +6 -0
  14. package/lib/rest/flexApi/v1/configuration.js +2 -0
  15. package/lib/rest/intelligence/v2/transcript/media.d.ts +1 -1
  16. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +4 -4
  17. package/lib/rest/intelligence/v2/transcript/sentence.d.ts +3 -3
  18. package/lib/rest/intelligence/v2/transcript.d.ts +1 -26
  19. package/lib/rest/intelligence/v2/transcript.js +10 -16
  20. package/lib/rest/lookups/v2/phoneNumber.d.ts +4 -4
  21. package/lib/rest/lookups/v2/phoneNumber.js +2 -2
  22. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +2 -2
  23. package/lib/rest/taskrouter/v1/workspace/task.d.ts +13 -3
  24. package/lib/rest/taskrouter/v1/workspace/task.js +6 -0
  25. package/lib/rest/trusthub/V1.d.ts +5 -0
  26. package/lib/rest/trusthub/V1.js +7 -0
  27. package/lib/rest/trusthub/v1/complianceInquiries.d.ts +125 -0
  28. package/lib/rest/trusthub/v1/complianceInquiries.js +140 -0
  29. package/package.json +5 -5
@@ -74,7 +74,8 @@ declare namespace Twilio {
74
74
  */
75
75
  getHostname(hostname: string, targetEdge: string | undefined, targetRegion: string | undefined): string;
76
76
  /**
77
- * Validates that a request to the new SSL certificate is successful.
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
  *
@@ -156,7 +156,8 @@ var Twilio;
156
156
  }
157
157
  /* jshint ignore:start */
158
158
  /**
159
- * Validates that a request to the new SSL certificate is successful.
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://api.twilio.com:8443/2010-04-01/.json",
170
+ uri: "https://tls-test.twilio.com:443",
170
171
  })
171
172
  .then((response) => {
172
173
  if (response["statusCode"] < 200 || response["statusCode"] >= 300) {
@@ -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
  }
@@ -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 V2010 from "../V2010";
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: V2010;
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: V2010): SafelistListInstance;
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: V2010;
87
- constructor(_version: V2010, payload: SafelistResource);
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 - Api
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.json`;
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.');
@@ -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
  }
@@ -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({
@@ -59,8 +59,6 @@ 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
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. */
@@ -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)
@@ -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. The default is `true` to access redacted 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. The default is True. */
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. The default is True. */
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. The default is True. */
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. The default is True. */
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. The default is `true` to access redacted 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. The default is `true` to access redacted 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. The default is `true` to access redacted 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(params?: TranscriptContextFetchOptions | ((error: Error | null, item?: TranscriptInstance) => any), callback?: (error: Error | null, item?: TranscriptInstance) => any): Promise<TranscriptInstance>;
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(params, callback) {
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
- fetch(params, callback) {
136
- return this._proxy.fetch(params, callback);
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
- disposable_phone_number_risk: any;
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 on if a mobile phone number could be a disposable or burner number.
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
- disposablePhoneNumberRisk: any;
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
- disposablePhoneNumberRisk: any;
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.disposablePhoneNumberRisk = payload.disposable_phone_number_risk;
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
- disposablePhoneNumberRisk: this.disposablePhoneNumberRisk,
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
- /** Message samples, at least 1 and up to 5 sample messages (at least 2 for sole proprietor), >=20 chars, <=1024 chars each. */
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
- * Message samples, at least 1 and up to 5 sample messages (at least 2 for starter/sole proprietor), >=20 chars, <=1024 chars each.
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. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple 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. */
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. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple 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. */
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. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple 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. */
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({
@@ -1,5 +1,6 @@
1
1
  import TrusthubBase from "../TrusthubBase";
2
2
  import Version from "../../base/Version";
3
+ import { ComplianceInquiriesListInstance } from "./v1/complianceInquiries";
3
4
  import { CustomerProfilesListInstance } from "./v1/customerProfiles";
4
5
  import { EndUserListInstance } from "./v1/endUser";
5
6
  import { EndUserTypeListInstance } from "./v1/endUserType";
@@ -14,6 +15,8 @@ export default class V1 extends Version {
14
15
  * @param domain - The Twilio (Twilio.Trusthub) domain
15
16
  */
16
17
  constructor(domain: TrusthubBase);
18
+ /** complianceInquiries - { Twilio.Trusthub.V1.ComplianceInquiriesListInstance } resource */
19
+ protected _complianceInquiries?: ComplianceInquiriesListInstance;
17
20
  /** customerProfiles - { Twilio.Trusthub.V1.CustomerProfilesListInstance } resource */
18
21
  protected _customerProfiles?: CustomerProfilesListInstance;
19
22
  /** endUsers - { Twilio.Trusthub.V1.EndUserListInstance } resource */
@@ -28,6 +31,8 @@ export default class V1 extends Version {
28
31
  protected _supportingDocumentTypes?: SupportingDocumentTypeListInstance;
29
32
  /** trustProducts - { Twilio.Trusthub.V1.TrustProductsListInstance } resource */
30
33
  protected _trustProducts?: TrustProductsListInstance;
34
+ /** Getter for complianceInquiries resource */
35
+ get complianceInquiries(): ComplianceInquiriesListInstance;
31
36
  /** Getter for customerProfiles resource */
32
37
  get customerProfiles(): CustomerProfilesListInstance;
33
38
  /** Getter for endUsers resource */
@@ -17,6 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
+ const complianceInquiries_1 = require("./v1/complianceInquiries");
20
21
  const customerProfiles_1 = require("./v1/customerProfiles");
21
22
  const endUser_1 = require("./v1/endUser");
22
23
  const endUserType_1 = require("./v1/endUserType");
@@ -33,6 +34,12 @@ class V1 extends Version_1.default {
33
34
  constructor(domain) {
34
35
  super(domain, "v1");
35
36
  }
37
+ /** Getter for complianceInquiries resource */
38
+ get complianceInquiries() {
39
+ this._complianceInquiries =
40
+ this._complianceInquiries || (0, complianceInquiries_1.ComplianceInquiriesListInstance)(this);
41
+ return this._complianceInquiries;
42
+ }
36
43
  /** Getter for customerProfiles resource */
37
44
  get customerProfiles() {
38
45
  this._customerProfiles =
@@ -0,0 +1,125 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ /**
5
+ * Options to pass to update a ComplianceInquiriesInstance
6
+ */
7
+ export interface ComplianceInquiriesContextUpdateOptions {
8
+ /** The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile. */
9
+ primaryProfileSid: string;
10
+ }
11
+ /**
12
+ * Options to pass to create a ComplianceInquiriesInstance
13
+ */
14
+ export interface ComplianceInquiriesListInstanceCreateOptions {
15
+ /** The unique SID identifier of the Primary Customer Profile that should be used as a parent. Only necessary when creating a secondary Customer Profile. */
16
+ primaryProfileSid: string;
17
+ }
18
+ export interface ComplianceInquiriesContext {
19
+ /**
20
+ * Update a ComplianceInquiriesInstance
21
+ *
22
+ * @param params - Parameter for request
23
+ * @param callback - Callback to handle processed record
24
+ *
25
+ * @returns Resolves to processed ComplianceInquiriesInstance
26
+ */
27
+ update(params: ComplianceInquiriesContextUpdateOptions, callback?: (error: Error | null, item?: ComplianceInquiriesInstance) => any): Promise<ComplianceInquiriesInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ */
31
+ toJSON(): any;
32
+ [inspect.custom](_depth: any, options: InspectOptions): any;
33
+ }
34
+ export interface ComplianceInquiriesContextSolution {
35
+ customerId: string;
36
+ }
37
+ export declare class ComplianceInquiriesContextImpl implements ComplianceInquiriesContext {
38
+ protected _version: V1;
39
+ protected _solution: ComplianceInquiriesContextSolution;
40
+ protected _uri: string;
41
+ constructor(_version: V1, customerId: string);
42
+ update(params: ComplianceInquiriesContextUpdateOptions, callback?: (error: Error | null, item?: ComplianceInquiriesInstance) => any): Promise<ComplianceInquiriesInstance>;
43
+ /**
44
+ * Provide a user-friendly representation
45
+ *
46
+ * @returns Object
47
+ */
48
+ toJSON(): ComplianceInquiriesContextSolution;
49
+ [inspect.custom](_depth: any, options: InspectOptions): string;
50
+ }
51
+ interface ComplianceInquiriesResource {
52
+ inquiry_id: string;
53
+ inquiry_session_token: string;
54
+ customer_id: string;
55
+ url: string;
56
+ }
57
+ export declare class ComplianceInquiriesInstance {
58
+ protected _version: V1;
59
+ protected _solution: ComplianceInquiriesContextSolution;
60
+ protected _context?: ComplianceInquiriesContext;
61
+ constructor(_version: V1, payload: ComplianceInquiriesResource, customerId?: string);
62
+ /**
63
+ * The unique ID used to start an embedded compliance registration session.
64
+ */
65
+ inquiryId: string;
66
+ /**
67
+ * The session token used to start an embedded compliance registration session.
68
+ */
69
+ inquirySessionToken: string;
70
+ /**
71
+ * The CustomerID matching the Customer Profile that should be resumed or resubmitted for editing.
72
+ */
73
+ customerId: string;
74
+ /**
75
+ * The URL of this resource.
76
+ */
77
+ url: string;
78
+ private get _proxy();
79
+ /**
80
+ * Update a ComplianceInquiriesInstance
81
+ *
82
+ * @param params - Parameter for request
83
+ * @param callback - Callback to handle processed record
84
+ *
85
+ * @returns Resolves to processed ComplianceInquiriesInstance
86
+ */
87
+ update(params: ComplianceInquiriesContextUpdateOptions, callback?: (error: Error | null, item?: ComplianceInquiriesInstance) => any): Promise<ComplianceInquiriesInstance>;
88
+ /**
89
+ * Provide a user-friendly representation
90
+ *
91
+ * @returns Object
92
+ */
93
+ toJSON(): {
94
+ inquiryId: string;
95
+ inquirySessionToken: string;
96
+ customerId: string;
97
+ url: string;
98
+ };
99
+ [inspect.custom](_depth: any, options: InspectOptions): string;
100
+ }
101
+ export interface ComplianceInquiriesSolution {
102
+ }
103
+ export interface ComplianceInquiriesListInstance {
104
+ _version: V1;
105
+ _solution: ComplianceInquiriesSolution;
106
+ _uri: string;
107
+ (customerId: string): ComplianceInquiriesContext;
108
+ get(customerId: string): ComplianceInquiriesContext;
109
+ /**
110
+ * Create a ComplianceInquiriesInstance
111
+ *
112
+ * @param params - Parameter for request
113
+ * @param callback - Callback to handle processed record
114
+ *
115
+ * @returns Resolves to processed ComplianceInquiriesInstance
116
+ */
117
+ create(params: ComplianceInquiriesListInstanceCreateOptions, callback?: (error: Error | null, item?: ComplianceInquiriesInstance) => any): Promise<ComplianceInquiriesInstance>;
118
+ /**
119
+ * Provide a user-friendly representation
120
+ */
121
+ toJSON(): any;
122
+ [inspect.custom](_depth: any, options: InspectOptions): any;
123
+ }
124
+ export declare function ComplianceInquiriesListInstance(version: V1): ComplianceInquiriesListInstance;
125
+ export {};
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Trusthub
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.ComplianceInquiriesListInstance = exports.ComplianceInquiriesInstance = exports.ComplianceInquiriesContextImpl = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ const utility_1 = require("../../../base/utility");
21
+ class ComplianceInquiriesContextImpl {
22
+ constructor(_version, customerId) {
23
+ this._version = _version;
24
+ if (!(0, utility_1.isValidPathParam)(customerId)) {
25
+ throw new Error("Parameter 'customerId' is not valid.");
26
+ }
27
+ this._solution = { customerId };
28
+ this._uri = `/ComplianceInquiries/Customers/${customerId}/Initialize`;
29
+ }
30
+ update(params, callback) {
31
+ if (params === null || params === undefined) {
32
+ throw new Error('Required parameter "params" missing.');
33
+ }
34
+ if (params["primaryProfileSid"] === null ||
35
+ params["primaryProfileSid"] === undefined) {
36
+ throw new Error("Required parameter \"params['primaryProfileSid']\" missing.");
37
+ }
38
+ let data = {};
39
+ data["PrimaryProfileSid"] = params["primaryProfileSid"];
40
+ const headers = {};
41
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
42
+ const instance = this;
43
+ let operationVersion = instance._version, operationPromise = operationVersion.update({
44
+ uri: instance._uri,
45
+ method: "post",
46
+ data,
47
+ headers,
48
+ });
49
+ operationPromise = operationPromise.then((payload) => new ComplianceInquiriesInstance(operationVersion, payload, instance._solution.customerId));
50
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
51
+ return operationPromise;
52
+ }
53
+ /**
54
+ * Provide a user-friendly representation
55
+ *
56
+ * @returns Object
57
+ */
58
+ toJSON() {
59
+ return this._solution;
60
+ }
61
+ [util_1.inspect.custom](_depth, options) {
62
+ return (0, util_1.inspect)(this.toJSON(), options);
63
+ }
64
+ }
65
+ exports.ComplianceInquiriesContextImpl = ComplianceInquiriesContextImpl;
66
+ class ComplianceInquiriesInstance {
67
+ constructor(_version, payload, customerId) {
68
+ this._version = _version;
69
+ this.inquiryId = payload.inquiry_id;
70
+ this.inquirySessionToken = payload.inquiry_session_token;
71
+ this.customerId = payload.customer_id;
72
+ this.url = payload.url;
73
+ this._solution = { customerId: customerId || this.customerId };
74
+ }
75
+ get _proxy() {
76
+ this._context =
77
+ this._context ||
78
+ new ComplianceInquiriesContextImpl(this._version, this._solution.customerId);
79
+ return this._context;
80
+ }
81
+ update(params, callback) {
82
+ return this._proxy.update(params, callback);
83
+ }
84
+ /**
85
+ * Provide a user-friendly representation
86
+ *
87
+ * @returns Object
88
+ */
89
+ toJSON() {
90
+ return {
91
+ inquiryId: this.inquiryId,
92
+ inquirySessionToken: this.inquirySessionToken,
93
+ customerId: this.customerId,
94
+ url: this.url,
95
+ };
96
+ }
97
+ [util_1.inspect.custom](_depth, options) {
98
+ return (0, util_1.inspect)(this.toJSON(), options);
99
+ }
100
+ }
101
+ exports.ComplianceInquiriesInstance = ComplianceInquiriesInstance;
102
+ function ComplianceInquiriesListInstance(version) {
103
+ const instance = ((customerId) => instance.get(customerId));
104
+ instance.get = function get(customerId) {
105
+ return new ComplianceInquiriesContextImpl(version, customerId);
106
+ };
107
+ instance._version = version;
108
+ instance._solution = {};
109
+ instance._uri = `/ComplianceInquiries/Customers/Initialize`;
110
+ instance.create = function create(params, callback) {
111
+ if (params === null || params === undefined) {
112
+ throw new Error('Required parameter "params" missing.');
113
+ }
114
+ if (params["primaryProfileSid"] === null ||
115
+ params["primaryProfileSid"] === undefined) {
116
+ throw new Error("Required parameter \"params['primaryProfileSid']\" missing.");
117
+ }
118
+ let data = {};
119
+ data["PrimaryProfileSid"] = params["primaryProfileSid"];
120
+ const headers = {};
121
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
122
+ let operationVersion = version, operationPromise = operationVersion.create({
123
+ uri: instance._uri,
124
+ method: "post",
125
+ data,
126
+ headers,
127
+ });
128
+ operationPromise = operationPromise.then((payload) => new ComplianceInquiriesInstance(operationVersion, payload));
129
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
130
+ return operationPromise;
131
+ };
132
+ instance.toJSON = function toJSON() {
133
+ return instance._solution;
134
+ };
135
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
136
+ return (0, util_1.inspect)(instance.toJSON(), options);
137
+ };
138
+ return instance;
139
+ }
140
+ exports.ComplianceInquiriesListInstance = ComplianceInquiriesListInstance;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "4.18.0",
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.20.2",
33
+ "@babel/preset-env": "^7.23.0",
34
34
  "@babel/preset-typescript": "^7.18.6",
35
- "@types/jest": "^29.2.5",
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.3.1",
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.0.5",
49
+ "ts-jest": "^29.1.1",
50
50
  "typescript": "^4.7.2",
51
51
  "typedoc": "^0.23.21"
52
52
  },