twilio 4.19.0 → 4.19.3

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 (52) hide show
  1. package/LICENSE +1 -1
  2. package/lib/rest/Twilio.d.ts +0 -5
  3. package/lib/rest/Twilio.js +0 -5
  4. package/lib/rest/api/v2010/account/message.d.ts +4 -4
  5. package/lib/rest/content/v1/content.d.ts +1 -1
  6. package/lib/rest/content/v1/contentAndApprovals.d.ts +1 -1
  7. package/lib/rest/content/v1/legacyContent.d.ts +1 -1
  8. package/lib/rest/conversations/v1/conversation/message.d.ts +2 -2
  9. package/lib/rest/conversations/v1/service/conversation/message.d.ts +2 -2
  10. package/lib/rest/flexApi/V1.d.ts +5 -0
  11. package/lib/rest/flexApi/V1.js +7 -0
  12. package/lib/rest/flexApi/v1/provisioningStatus.d.ts +85 -0
  13. package/lib/rest/{oauth/v1/oauth.js → flexApi/v1/provisioningStatus.js} +17 -16
  14. package/lib/rest/insights/v1/call/annotation.d.ts +0 -3
  15. package/lib/rest/intelligence/v2/service.d.ts +3 -3
  16. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +6 -0
  17. package/lib/rest/intelligence/v2/transcript/operatorResult.js +2 -0
  18. package/lib/rest/intelligence/v2/transcript.d.ts +1 -1
  19. package/lib/rest/messaging/v1/service/channelSender.d.ts +3 -0
  20. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +25 -0
  21. package/lib/rest/messaging/v1/tollfreeVerification.js +23 -0
  22. package/lib/rest/notify/v1/service/notification.d.ts +1 -1
  23. package/lib/rest/notify/v1/service.d.ts +3 -3
  24. package/lib/rest/proxy/v1/service/session/interaction.d.ts +1 -1
  25. package/lib/rest/proxy/v1/service/shortCode.d.ts +1 -1
  26. package/lib/rest/serverless/v1/service/build.d.ts +1 -1
  27. package/lib/rest/supersim/v1/esimProfile.d.ts +4 -4
  28. package/lib/rest/taskrouter/v1/workspace/task.d.ts +4 -4
  29. package/lib/rest/trusthub/V1.d.ts +5 -0
  30. package/lib/rest/trusthub/V1.js +8 -0
  31. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +73 -0
  32. package/lib/rest/{oauth/v1/deviceCode.js → trusthub/v1/complianceTollfreeInquiries.js} +24 -28
  33. package/lib/rest/verify/v2/service/verification.d.ts +2 -0
  34. package/lib/rest/verify/v2/service/verification.js +2 -0
  35. package/lib/rest/verify/v2/service.d.ts +10 -0
  36. package/lib/rest/verify/v2/service.js +7 -0
  37. package/lib/rest/verify/v2/verificationAttempt.d.ts +1 -1
  38. package/package.json +2 -2
  39. package/lib/rest/Oauth.d.ts +0 -29
  40. package/lib/rest/Oauth.js +0 -43
  41. package/lib/rest/OauthBase.d.ts +0 -13
  42. package/lib/rest/OauthBase.js +0 -31
  43. package/lib/rest/oauth/V1.d.ts +0 -35
  44. package/lib/rest/oauth/V1.js +0 -61
  45. package/lib/rest/oauth/v1/deviceCode.d.ts +0 -87
  46. package/lib/rest/oauth/v1/oauth.d.ts +0 -84
  47. package/lib/rest/oauth/v1/openidDiscovery.d.ts +0 -150
  48. package/lib/rest/oauth/v1/openidDiscovery.js +0 -126
  49. package/lib/rest/oauth/v1/token.d.ts +0 -88
  50. package/lib/rest/oauth/v1/token.js +0 -98
  51. package/lib/rest/oauth/v1/userInfo.d.ts +0 -108
  52. package/lib/rest/oauth/v1/userInfo.js +0 -110
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (C) 2023, Twilio, Inc. <help@twilio.com>
3
+ Copyright (C) 2023, Twilio, Inc. <https://www.twilio.com/help/contact>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
@@ -19,7 +19,6 @@ import Microvisor from "./Microvisor";
19
19
  import Monitor from "./Monitor";
20
20
  import Notify from "./Notify";
21
21
  import Numbers from "./Numbers";
22
- import Oauth from "./Oauth";
23
22
  import Preview from "./Preview";
24
23
  import Pricing from "./Pricing";
25
24
  import Proxy from "./Proxy";
@@ -103,8 +102,6 @@ declare class Twilio extends Client {
103
102
  _notify?: Notify;
104
103
  /** (Twilio.Numbers) - numbers domain */
105
104
  _numbers?: Numbers;
106
- /** (Twilio.Oauth) - oauth domain */
107
- _oauth?: Oauth;
108
105
  /** (Twilio.Preview) - preview domain */
109
106
  _preview?: Preview;
110
107
  /** (Twilio.Pricing) - pricing domain */
@@ -187,8 +184,6 @@ declare class Twilio extends Client {
187
184
  get notify(): Notify;
188
185
  /** Getter for (Twilio.Numbers) domain */
189
186
  get numbers(): Numbers;
190
- /** Getter for (Twilio.Oauth) domain */
191
- get oauth(): Oauth;
192
187
  /** Getter for (Twilio.Preview) domain */
193
188
  get preview(): Preview;
194
189
  /** Getter for (Twilio.Pricing) domain */
@@ -52,7 +52,6 @@ class Twilio extends BaseTwilio_1.Client {
52
52
  this.monitor;
53
53
  this.notify;
54
54
  this.numbers;
55
- this.oauth;
56
55
  this.preview;
57
56
  this.pricing;
58
57
  this.proxy;
@@ -157,10 +156,6 @@ class Twilio extends BaseTwilio_1.Client {
157
156
  get numbers() {
158
157
  return this._numbers ?? (this._numbers = new (require("./Numbers"))(this));
159
158
  }
160
- /** Getter for (Twilio.Oauth) domain */
161
- get oauth() {
162
- return this._oauth ?? (this._oauth = new (require("./Oauth"))(this));
163
- }
164
159
  /** Getter for (Twilio.Preview) domain */
165
160
  get preview() {
166
161
  return this._preview ?? (this._preview = new (require("./Preview"))(this));
@@ -49,7 +49,7 @@ export interface MessageListInstanceCreateOptions {
49
49
  smartEncoded?: boolean;
50
50
  /** Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp). */
51
51
  persistentAction?: Array<string>;
52
- /** For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/how-to-configure-link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. */
52
+ /** For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided. */
53
53
  shortenUrls?: boolean;
54
54
  /** */
55
55
  scheduleType?: MessageScheduleType;
@@ -61,13 +61,13 @@ export interface MessageListInstanceCreateOptions {
61
61
  contentVariables?: string;
62
62
  /** */
63
63
  riskCheck?: MessageRiskCheck;
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. */
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/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), 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. */
65
65
  from?: string;
66
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. */
67
67
  messagingServiceSid?: string;
68
68
  /** The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages). */
69
69
  body?: string;
70
- /** The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. */
70
+ /** The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply. */
71
71
  mediaUrl?: Array<string>;
72
72
  /** For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio\\\'s response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources). */
73
73
  contentSid?: string;
@@ -241,7 +241,7 @@ export declare class MessageInstance {
241
241
  numSegments: string;
242
242
  direction: MessageDirection;
243
243
  /**
244
- * The sender\'s 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`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
244
+ * The sender\'s phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). For incoming messages, this is the number or channel address of the sender. For outgoing messages, this value is a Twilio phone number, alphanumeric sender ID, short code, or channel address from which the message is sent.
245
245
  */
246
246
  from: string;
247
247
  /**
@@ -130,7 +130,7 @@ export declare class ContentInstance {
130
130
  */
131
131
  variables: any;
132
132
  /**
133
- * The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
133
+ * The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
134
134
  */
135
135
  types: any;
136
136
  /**
@@ -145,7 +145,7 @@ export declare class ContentAndApprovalsInstance {
145
145
  */
146
146
  variables: any;
147
147
  /**
148
- * The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
148
+ * The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
149
149
  */
150
150
  types: any;
151
151
  /**
@@ -147,7 +147,7 @@ export declare class LegacyContentInstance {
147
147
  */
148
148
  variables: any;
149
149
  /**
150
- * The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
150
+ * The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
151
151
  */
152
152
  types: any;
153
153
  /**
@@ -50,7 +50,7 @@ export interface MessageListInstanceCreateOptions {
50
50
  attributes?: string;
51
51
  /** The Media SID to be attached to the new Message. */
52
52
  mediaSid?: string;
53
- /** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
53
+ /** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
54
54
  contentSid?: string;
55
55
  /** A structurally valid JSON string that contains values to resolve Rich Content template variables. */
56
56
  contentVariables?: string;
@@ -250,7 +250,7 @@ export declare class MessageInstance {
250
250
  */
251
251
  links: Record<string, string>;
252
252
  /**
253
- * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
253
+ * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
254
254
  */
255
255
  contentSid: string;
256
256
  private get _proxy();
@@ -50,7 +50,7 @@ export interface MessageListInstanceCreateOptions {
50
50
  attributes?: string;
51
51
  /** The Media SID to be attached to the new Message. */
52
52
  mediaSid?: string;
53
- /** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
53
+ /** The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored. */
54
54
  contentSid?: string;
55
55
  /** A structurally valid JSON string that contains values to resolve Rich Content template variables. */
56
56
  contentVariables?: string;
@@ -256,7 +256,7 @@ export declare class MessageInstance {
256
256
  */
257
257
  links: Record<string, string>;
258
258
  /**
259
- * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
259
+ * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
260
260
  */
261
261
  contentSid: string;
262
262
  private get _proxy();
@@ -15,6 +15,7 @@ import { InsightsSettingsAnswerSetsListInstance } from "./v1/insightsSettingsAns
15
15
  import { InsightsSettingsCommentListInstance } from "./v1/insightsSettingsComment";
16
16
  import { InsightsUserRolesListInstance } from "./v1/insightsUserRoles";
17
17
  import { InteractionListInstance } from "./v1/interaction";
18
+ import { ProvisioningStatusListInstance } from "./v1/provisioningStatus";
18
19
  import { WebChannelListInstance } from "./v1/webChannel";
19
20
  export default class V1 extends Version {
20
21
  /**
@@ -53,6 +54,8 @@ export default class V1 extends Version {
53
54
  protected _insightsUserRoles?: InsightsUserRolesListInstance;
54
55
  /** interaction - { Twilio.FlexApi.V1.InteractionListInstance } resource */
55
56
  protected _interaction?: InteractionListInstance;
57
+ /** provisioningStatus - { Twilio.FlexApi.V1.ProvisioningStatusListInstance } resource */
58
+ protected _provisioningStatus?: ProvisioningStatusListInstance;
56
59
  /** webChannel - { Twilio.FlexApi.V1.WebChannelListInstance } resource */
57
60
  protected _webChannel?: WebChannelListInstance;
58
61
  /** Getter for assessments resource */
@@ -85,6 +88,8 @@ export default class V1 extends Version {
85
88
  get insightsUserRoles(): InsightsUserRolesListInstance;
86
89
  /** Getter for interaction resource */
87
90
  get interaction(): InteractionListInstance;
91
+ /** Getter for provisioningStatus resource */
92
+ get provisioningStatus(): ProvisioningStatusListInstance;
88
93
  /** Getter for webChannel resource */
89
94
  get webChannel(): WebChannelListInstance;
90
95
  }
@@ -32,6 +32,7 @@ const insightsSettingsAnswerSets_1 = require("./v1/insightsSettingsAnswerSets");
32
32
  const insightsSettingsComment_1 = require("./v1/insightsSettingsComment");
33
33
  const insightsUserRoles_1 = require("./v1/insightsUserRoles");
34
34
  const interaction_1 = require("./v1/interaction");
35
+ const provisioningStatus_1 = require("./v1/provisioningStatus");
35
36
  const webChannel_1 = require("./v1/webChannel");
36
37
  class V1 extends Version_1.default {
37
38
  /**
@@ -133,6 +134,12 @@ class V1 extends Version_1.default {
133
134
  this._interaction = this._interaction || (0, interaction_1.InteractionListInstance)(this);
134
135
  return this._interaction;
135
136
  }
137
+ /** Getter for provisioningStatus resource */
138
+ get provisioningStatus() {
139
+ this._provisioningStatus =
140
+ this._provisioningStatus || (0, provisioningStatus_1.ProvisioningStatusListInstance)(this);
141
+ return this._provisioningStatus;
142
+ }
136
143
  /** Getter for webChannel resource */
137
144
  get webChannel() {
138
145
  this._webChannel = this._webChannel || (0, webChannel_1.WebChannelListInstance)(this);
@@ -0,0 +1,85 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ export type ProvisioningStatusStatus = "active" | "in-progress" | "not-configured" | "failed";
5
+ export interface ProvisioningStatusContext {
6
+ /**
7
+ * Fetch a ProvisioningStatusInstance
8
+ *
9
+ * @param callback - Callback to handle processed record
10
+ *
11
+ * @returns Resolves to processed ProvisioningStatusInstance
12
+ */
13
+ fetch(callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any): Promise<ProvisioningStatusInstance>;
14
+ /**
15
+ * Provide a user-friendly representation
16
+ */
17
+ toJSON(): any;
18
+ [inspect.custom](_depth: any, options: InspectOptions): any;
19
+ }
20
+ export interface ProvisioningStatusContextSolution {
21
+ }
22
+ export declare class ProvisioningStatusContextImpl implements ProvisioningStatusContext {
23
+ protected _version: V1;
24
+ protected _solution: ProvisioningStatusContextSolution;
25
+ protected _uri: string;
26
+ constructor(_version: V1);
27
+ fetch(callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any): Promise<ProvisioningStatusInstance>;
28
+ /**
29
+ * Provide a user-friendly representation
30
+ *
31
+ * @returns Object
32
+ */
33
+ toJSON(): ProvisioningStatusContextSolution;
34
+ [inspect.custom](_depth: any, options: InspectOptions): string;
35
+ }
36
+ interface ProvisioningStatusResource {
37
+ status: ProvisioningStatusStatus;
38
+ url: string;
39
+ }
40
+ export declare class ProvisioningStatusInstance {
41
+ protected _version: V1;
42
+ protected _solution: ProvisioningStatusContextSolution;
43
+ protected _context?: ProvisioningStatusContext;
44
+ constructor(_version: V1, payload: ProvisioningStatusResource);
45
+ status: ProvisioningStatusStatus;
46
+ /**
47
+ * The absolute URL of the resource.
48
+ */
49
+ url: string;
50
+ private get _proxy();
51
+ /**
52
+ * Fetch a ProvisioningStatusInstance
53
+ *
54
+ * @param callback - Callback to handle processed record
55
+ *
56
+ * @returns Resolves to processed ProvisioningStatusInstance
57
+ */
58
+ fetch(callback?: (error: Error | null, item?: ProvisioningStatusInstance) => any): Promise<ProvisioningStatusInstance>;
59
+ /**
60
+ * Provide a user-friendly representation
61
+ *
62
+ * @returns Object
63
+ */
64
+ toJSON(): {
65
+ status: ProvisioningStatusStatus;
66
+ url: string;
67
+ };
68
+ [inspect.custom](_depth: any, options: InspectOptions): string;
69
+ }
70
+ export interface ProvisioningStatusSolution {
71
+ }
72
+ export interface ProvisioningStatusListInstance {
73
+ _version: V1;
74
+ _solution: ProvisioningStatusSolution;
75
+ _uri: string;
76
+ (): ProvisioningStatusContext;
77
+ get(): ProvisioningStatusContext;
78
+ /**
79
+ * Provide a user-friendly representation
80
+ */
81
+ toJSON(): any;
82
+ [inspect.custom](_depth: any, options: InspectOptions): any;
83
+ }
84
+ export declare function ProvisioningStatusListInstance(version: V1): ProvisioningStatusListInstance;
85
+ export {};
@@ -5,7 +5,7 @@
5
5
  * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
6
  * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
7
  *
8
- * Twilio - Oauth
8
+ * Twilio - Flex
9
9
  * This is the public Twilio REST API.
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator.
@@ -13,15 +13,15 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.OauthListInstance = exports.OauthInstance = exports.OauthContextImpl = void 0;
16
+ exports.ProvisioningStatusListInstance = exports.ProvisioningStatusInstance = exports.ProvisioningStatusContextImpl = void 0;
17
17
  const util_1 = require("util");
18
18
  const deserialize = require("../../../base/deserialize");
19
19
  const serialize = require("../../../base/serialize");
20
- class OauthContextImpl {
20
+ class ProvisioningStatusContextImpl {
21
21
  constructor(_version) {
22
22
  this._version = _version;
23
23
  this._solution = {};
24
- this._uri = `/certs`;
24
+ this._uri = `/account/provision/status`;
25
25
  }
26
26
  fetch(callback) {
27
27
  const instance = this;
@@ -29,7 +29,7 @@ class OauthContextImpl {
29
29
  uri: instance._uri,
30
30
  method: "get",
31
31
  });
32
- operationPromise = operationPromise.then((payload) => new OauthInstance(operationVersion, payload));
32
+ operationPromise = operationPromise.then((payload) => new ProvisioningStatusInstance(operationVersion, payload));
33
33
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
34
34
  return operationPromise;
35
35
  }
@@ -45,24 +45,25 @@ class OauthContextImpl {
45
45
  return (0, util_1.inspect)(this.toJSON(), options);
46
46
  }
47
47
  }
48
- exports.OauthContextImpl = OauthContextImpl;
49
- class OauthInstance {
48
+ exports.ProvisioningStatusContextImpl = ProvisioningStatusContextImpl;
49
+ class ProvisioningStatusInstance {
50
50
  constructor(_version, payload) {
51
51
  this._version = _version;
52
- this.keys = payload.keys;
52
+ this.status = payload.status;
53
53
  this.url = payload.url;
54
54
  this._solution = {};
55
55
  }
56
56
  get _proxy() {
57
- this._context = this._context || new OauthContextImpl(this._version);
57
+ this._context =
58
+ this._context || new ProvisioningStatusContextImpl(this._version);
58
59
  return this._context;
59
60
  }
60
61
  /**
61
- * Fetch a OauthInstance
62
+ * Fetch a ProvisioningStatusInstance
62
63
  *
63
64
  * @param callback - Callback to handle processed record
64
65
  *
65
- * @returns Resolves to processed OauthInstance
66
+ * @returns Resolves to processed ProvisioningStatusInstance
66
67
  */
67
68
  fetch(callback) {
68
69
  return this._proxy.fetch(callback);
@@ -74,7 +75,7 @@ class OauthInstance {
74
75
  */
75
76
  toJSON() {
76
77
  return {
77
- keys: this.keys,
78
+ status: this.status,
78
79
  url: this.url,
79
80
  };
80
81
  }
@@ -82,11 +83,11 @@ class OauthInstance {
82
83
  return (0, util_1.inspect)(this.toJSON(), options);
83
84
  }
84
85
  }
85
- exports.OauthInstance = OauthInstance;
86
- function OauthListInstance(version) {
86
+ exports.ProvisioningStatusInstance = ProvisioningStatusInstance;
87
+ function ProvisioningStatusListInstance(version) {
87
88
  const instance = (() => instance.get());
88
89
  instance.get = function get() {
89
- return new OauthContextImpl(version);
90
+ return new ProvisioningStatusContextImpl(version);
90
91
  };
91
92
  instance._version = version;
92
93
  instance._solution = {};
@@ -99,4 +100,4 @@ function OauthListInstance(version) {
99
100
  };
100
101
  return instance;
101
102
  }
102
- exports.OauthListInstance = OauthListInstance;
103
+ exports.ProvisioningStatusListInstance = ProvisioningStatusListInstance;
@@ -119,9 +119,6 @@ export declare class AnnotationInstance {
119
119
  * Incident or support ticket associated with this call. The `incident` property is of type string with a maximum character limit of 100. Twilio does not treat this field as PII, so no PII should be included in `incident`.
120
120
  */
121
121
  incident: string;
122
- /**
123
- * The URL of this resource.
124
- */
125
122
  url: string;
126
123
  private get _proxy();
127
124
  /**
@@ -12,7 +12,7 @@ export interface ServiceContextUpdateOptions {
12
12
  ifMatch?: string;
13
13
  /** Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. */
14
14
  autoTranscribe?: boolean;
15
- /** Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. */
15
+ /** Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. */
16
16
  dataLogging?: boolean;
17
17
  /** A human readable description of this resource, up to 64 characters. */
18
18
  friendlyName?: string;
@@ -37,7 +37,7 @@ export interface ServiceListInstanceCreateOptions {
37
37
  uniqueName: string;
38
38
  /** Instructs the Speech Recognition service to automatically transcribe all recordings made on the account. */
39
39
  autoTranscribe?: boolean;
40
- /** Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models. */
40
+ /** Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent. */
41
41
  dataLogging?: boolean;
42
42
  /** A human readable description of this resource, up to 64 characters. */
43
43
  friendlyName?: string;
@@ -186,7 +186,7 @@ export declare class ServiceInstance {
186
186
  */
187
187
  autoTranscribe: boolean;
188
188
  /**
189
- * Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
189
+ * Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
190
190
  */
191
191
  dataLogging: boolean;
192
192
  /**
@@ -108,6 +108,7 @@ interface OperatorResultResource {
108
108
  predicted_probability: number;
109
109
  label_probabilities: any;
110
110
  extract_results: any;
111
+ text_generation_results: any;
111
112
  transcript_sid: string;
112
113
  url: string;
113
114
  }
@@ -161,6 +162,10 @@ export declare class OperatorResultInstance {
161
162
  * List of text extraction results. This might be available on classify-extract model outputs.
162
163
  */
163
164
  extractResults: any;
165
+ /**
166
+ * Output of a text generation operator for example Conversation Sumamary.
167
+ */
168
+ textGenerationResults: any;
164
169
  /**
165
170
  * A 34 character string that uniquely identifies this Transcript.
166
171
  */
@@ -205,6 +210,7 @@ export declare class OperatorResultInstance {
205
210
  predictedProbability: number;
206
211
  labelProbabilities: any;
207
212
  extractResults: any;
213
+ textGenerationResults: any;
208
214
  transcriptSid: string;
209
215
  url: string;
210
216
  };
@@ -85,6 +85,7 @@ class OperatorResultInstance {
85
85
  this.predictedProbability = payload.predicted_probability;
86
86
  this.labelProbabilities = payload.label_probabilities;
87
87
  this.extractResults = payload.extract_results;
88
+ this.textGenerationResults = payload.text_generation_results;
88
89
  this.transcriptSid = payload.transcript_sid;
89
90
  this.url = payload.url;
90
91
  this._solution = {
@@ -120,6 +121,7 @@ class OperatorResultInstance {
120
121
  predictedProbability: this.predictedProbability,
121
122
  labelProbabilities: this.labelProbabilities,
122
123
  extractResults: this.extractResults,
124
+ textGenerationResults: this.textGenerationResults,
123
125
  transcriptSid: this.transcriptSid,
124
126
  url: this.url,
125
127
  };
@@ -202,7 +202,7 @@ export declare class TranscriptInstance {
202
202
  */
203
203
  channel: any;
204
204
  /**
205
- * Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
205
+ * Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
206
206
  */
207
207
  dataLogging: boolean;
208
208
  /**
@@ -120,6 +120,9 @@ export declare class ChannelSenderInstance {
120
120
  * The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
121
121
  */
122
122
  dateUpdated: Date;
123
+ /**
124
+ * The absolute URL of the ChannelSender resource.
125
+ */
123
126
  url: string;
124
127
  private get _proxy();
125
128
  /**
@@ -49,6 +49,8 @@ export interface TollfreeVerificationContextUpdateOptions {
49
49
  businessContactEmail?: string;
50
50
  /** The phone number of the contact for the business or organization using the Tollfree number. */
51
51
  businessContactPhone?: string;
52
+ /** Describe why the verification is being edited. If the verification was rejected because of a technical issue, such as the website being down, and the issue has been resolved this parameter should be set to something similar to \\\'Website fixed\\\'. */
53
+ editReason?: string;
52
54
  }
53
55
  /**
54
56
  * Options to pass to create a TollfreeVerificationInstance
@@ -147,6 +149,14 @@ export interface TollfreeVerificationListInstancePageOptions {
147
149
  pageToken?: string;
148
150
  }
149
151
  export interface TollfreeVerificationContext {
152
+ /**
153
+ * Remove a TollfreeVerificationInstance
154
+ *
155
+ * @param callback - Callback to handle processed record
156
+ *
157
+ * @returns Resolves to processed boolean
158
+ */
159
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
150
160
  /**
151
161
  * Fetch a TollfreeVerificationInstance
152
162
  *
@@ -186,6 +196,7 @@ export declare class TollfreeVerificationContextImpl implements TollfreeVerifica
186
196
  protected _solution: TollfreeVerificationContextSolution;
187
197
  protected _uri: string;
188
198
  constructor(_version: V1, sid: string);
199
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
189
200
  fetch(callback?: (error: Error | null, item?: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
190
201
  update(params?: TollfreeVerificationContextUpdateOptions | ((error: Error | null, item?: TollfreeVerificationInstance) => any), callback?: (error: Error | null, item?: TollfreeVerificationInstance) => any): Promise<TollfreeVerificationInstance>;
191
202
  /**
@@ -233,6 +244,7 @@ interface TollfreeVerificationResource {
233
244
  rejection_reason: string;
234
245
  error_code: number;
235
246
  edit_expiration: Date;
247
+ edit_allowed: boolean;
236
248
  resource_links: any;
237
249
  external_reference_id: string;
238
250
  }
@@ -367,6 +379,10 @@ export declare class TollfreeVerificationInstance {
367
379
  * The date and time when the ability to edit a rejected verification expires.
368
380
  */
369
381
  editExpiration: Date;
382
+ /**
383
+ * If a rejected verification is allowed to be edited/resubmitted. Some rejection reasons allow editing and some do not.
384
+ */
385
+ editAllowed: boolean;
370
386
  /**
371
387
  * The URLs of the documents associated with the Tollfree Verification resource.
372
388
  */
@@ -376,6 +392,14 @@ export declare class TollfreeVerificationInstance {
376
392
  */
377
393
  externalReferenceId: string;
378
394
  private get _proxy();
395
+ /**
396
+ * Remove a TollfreeVerificationInstance
397
+ *
398
+ * @param callback - Callback to handle processed record
399
+ *
400
+ * @returns Resolves to processed boolean
401
+ */
402
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
379
403
  /**
380
404
  * Fetch a TollfreeVerificationInstance
381
405
  *
@@ -440,6 +464,7 @@ export declare class TollfreeVerificationInstance {
440
464
  rejectionReason: string;
441
465
  errorCode: number;
442
466
  editExpiration: Date;
467
+ editAllowed: boolean;
443
468
  resourceLinks: any;
444
469
  externalReferenceId: string;
445
470
  };
@@ -31,6 +31,15 @@ class TollfreeVerificationContextImpl {
31
31
  this._solution = { sid };
32
32
  this._uri = `/Tollfree/Verifications/${sid}`;
33
33
  }
34
+ remove(callback) {
35
+ const instance = this;
36
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
37
+ uri: instance._uri,
38
+ method: "delete",
39
+ });
40
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
41
+ return operationPromise;
42
+ }
34
43
  fetch(callback) {
35
44
  const instance = this;
36
45
  let operationVersion = instance._version, operationPromise = operationVersion.fetch({
@@ -91,6 +100,8 @@ class TollfreeVerificationContextImpl {
91
100
  data["BusinessContactEmail"] = params["businessContactEmail"];
92
101
  if (params["businessContactPhone"] !== undefined)
93
102
  data["BusinessContactPhone"] = params["businessContactPhone"];
103
+ if (params["editReason"] !== undefined)
104
+ data["EditReason"] = params["editReason"];
94
105
  const headers = {};
95
106
  headers["Content-Type"] = "application/x-www-form-urlencoded";
96
107
  const instance = this;
@@ -153,6 +164,7 @@ class TollfreeVerificationInstance {
153
164
  this.rejectionReason = payload.rejection_reason;
154
165
  this.errorCode = deserialize.integer(payload.error_code);
155
166
  this.editExpiration = deserialize.iso8601DateTime(payload.edit_expiration);
167
+ this.editAllowed = payload.edit_allowed;
156
168
  this.resourceLinks = payload.resource_links;
157
169
  this.externalReferenceId = payload.external_reference_id;
158
170
  this._solution = { sid: sid || this.sid };
@@ -163,6 +175,16 @@ class TollfreeVerificationInstance {
163
175
  new TollfreeVerificationContextImpl(this._version, this._solution.sid);
164
176
  return this._context;
165
177
  }
178
+ /**
179
+ * Remove a TollfreeVerificationInstance
180
+ *
181
+ * @param callback - Callback to handle processed record
182
+ *
183
+ * @returns Resolves to processed boolean
184
+ */
185
+ remove(callback) {
186
+ return this._proxy.remove(callback);
187
+ }
166
188
  /**
167
189
  * Fetch a TollfreeVerificationInstance
168
190
  *
@@ -216,6 +238,7 @@ class TollfreeVerificationInstance {
216
238
  rejectionReason: this.rejectionReason,
217
239
  errorCode: this.errorCode,
218
240
  editExpiration: this.editExpiration,
241
+ editAllowed: this.editAllowed,
219
242
  resourceLinks: this.resourceLinks,
220
243
  externalReferenceId: this.externalReferenceId,
221
244
  };
@@ -24,7 +24,7 @@ export interface NotificationListInstanceCreateOptions {
24
24
  apn?: any;
25
25
  /** The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref). */
26
26
  gcm?: any;
27
- /** The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. */
27
+ /** The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array. */
28
28
  sms?: any;
29
29
  /** Deprecated. */
30
30
  facebookMessenger?: any;