twilio 5.2.2 → 5.3.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 (69) hide show
  1. package/lib/rest/Iam.d.ts +4 -0
  2. package/lib/rest/{PreviewIam.js → Iam.js} +3 -3
  3. package/lib/rest/IamBase.d.ts +13 -0
  4. package/lib/rest/{PreviewIamBase.js → IamBase.js} +9 -4
  5. package/lib/rest/Twilio.d.ts +5 -5
  6. package/lib/rest/Twilio.js +4 -5
  7. package/lib/rest/api/v2010/account/call/transcription.d.ts +4 -400
  8. package/lib/rest/api/v2010/account/call/transcription.js +0 -396
  9. package/lib/rest/api/v2010/account/message.d.ts +2 -2
  10. package/lib/rest/api/v2010/account/recording/addOnResult/payload/data.d.ts +89 -0
  11. package/lib/rest/api/v2010/account/recording/addOnResult/payload/data.js +127 -0
  12. package/lib/rest/api/v2010/account/recording/addOnResult/payload.d.ts +8 -0
  13. package/lib/rest/api/v2010/account/recording/addOnResult/payload.js +13 -0
  14. package/lib/rest/content/v1/content.d.ts +55 -3
  15. package/lib/rest/content/v1/content.js +28 -1
  16. package/lib/rest/flexApi/v2/flexUser.d.ts +64 -0
  17. package/lib/rest/flexApi/v2/flexUser.js +41 -0
  18. package/lib/rest/iam/V1.d.ts +25 -0
  19. package/lib/rest/iam/V1.js +48 -0
  20. package/lib/rest/iam/v1/apiKey.d.ts +167 -0
  21. package/lib/rest/iam/v1/apiKey.js +161 -0
  22. package/lib/rest/iam/v1/getApiKeys.d.ts +163 -0
  23. package/lib/rest/iam/v1/getApiKeys.js +124 -0
  24. package/lib/rest/iam/v1/newApiKey.d.ts +90 -0
  25. package/lib/rest/iam/v1/newApiKey.js +90 -0
  26. package/lib/rest/insights/v1/callSummaries.d.ts +57 -9
  27. package/lib/rest/insights/v1/callSummaries.js +18 -2
  28. package/lib/rest/intelligence/v2/transcript/sentence.d.ts +12 -0
  29. package/lib/rest/intelligence/v2/transcript/sentence.js +4 -0
  30. package/lib/rest/marketplace/V1.d.ts +5 -0
  31. package/lib/rest/marketplace/V1.js +7 -0
  32. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +15 -15
  33. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +7 -7
  34. package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +29 -0
  35. package/lib/rest/marketplace/v1/moduleDataManagement.js +4 -0
  36. package/lib/rest/marketplace/v1/referralConversion.d.ts +90 -0
  37. package/lib/rest/marketplace/v1/referralConversion.js +106 -0
  38. package/lib/rest/messaging/v1/externalCampaign.d.ts +2 -0
  39. package/lib/rest/messaging/v1/externalCampaign.js +2 -0
  40. package/lib/rest/messaging/v1/service/channelSender.d.ts +33 -0
  41. package/lib/rest/messaging/v1/service/channelSender.js +40 -0
  42. package/lib/rest/numbers/V1.d.ts +5 -5
  43. package/lib/rest/numbers/V1.js +8 -6
  44. package/lib/rest/numbers/V2.d.ts +5 -0
  45. package/lib/rest/numbers/V2.js +6 -0
  46. package/lib/rest/numbers/v1/portingPortIn.d.ts +7 -10
  47. package/lib/rest/numbers/v1/portingPortIn.js +1 -1
  48. package/lib/rest/numbers/v1/portingPortInPhoneNumber.d.ts +25 -16
  49. package/lib/rest/numbers/v1/portingPortInPhoneNumber.js +2 -0
  50. package/lib/rest/numbers/v1/portingPortability.d.ts +5 -5
  51. package/lib/rest/numbers/v1/portingWebhookConfiguration.d.ts +3 -3
  52. package/lib/rest/numbers/v1/{webhook.d.ts → portingWebhookConfigurationFetch.d.ts} +13 -13
  53. package/lib/rest/numbers/v1/{webhook.js → portingWebhookConfigurationFetch.js} +6 -6
  54. package/lib/rest/numbers/v1/signingRequestConfiguration.d.ts +117 -0
  55. package/lib/rest/numbers/v1/signingRequestConfiguration.js +70 -1
  56. package/lib/rest/numbers/v2/bundleClone.d.ts +153 -0
  57. package/lib/rest/numbers/v2/bundleClone.js +136 -0
  58. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +2 -0
  59. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.js +2 -0
  60. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +6 -0
  61. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.js +2 -0
  62. package/lib/rest/taskrouter/v1/workspace/task.d.ts +2 -2
  63. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +1 -1
  64. package/lib/rest/trusthub/v1/complianceInquiries.d.ts +4 -0
  65. package/lib/rest/trusthub/v1/complianceInquiries.js +4 -0
  66. package/lib/rest/verify/v2/service.d.ts +3 -3
  67. package/package.json +2 -2
  68. package/lib/rest/PreviewIam.d.ts +0 -4
  69. package/lib/rest/PreviewIamBase.d.ts +0 -10
@@ -36,6 +36,8 @@ function ExternalCampaignListInstance(version) {
36
36
  let data = {};
37
37
  data["CampaignId"] = params["campaignId"];
38
38
  data["MessagingServiceSid"] = params["messagingServiceSid"];
39
+ if (params["cnpMigration"] !== undefined)
40
+ data["CnpMigration"] = serialize.bool(params["cnpMigration"]);
39
41
  const headers = {};
40
42
  headers["Content-Type"] = "application/x-www-form-urlencoded";
41
43
  let operationVersion = version, operationPromise = operationVersion.create({
@@ -3,6 +3,13 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V1 from "../../V1";
6
+ /**
7
+ * Options to pass to create a ChannelSenderInstance
8
+ */
9
+ export interface ChannelSenderListInstanceCreateOptions {
10
+ /** The SID of the Channel Sender being added to the Service. */
11
+ sid: string;
12
+ }
6
13
  /**
7
14
  * Options to pass to each
8
15
  */
@@ -37,6 +44,14 @@ export interface ChannelSenderListInstancePageOptions {
37
44
  pageToken?: string;
38
45
  }
39
46
  export interface ChannelSenderContext {
47
+ /**
48
+ * Remove a ChannelSenderInstance
49
+ *
50
+ * @param callback - Callback to handle processed record
51
+ *
52
+ * @returns Resolves to processed boolean
53
+ */
54
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
40
55
  /**
41
56
  * Fetch a ChannelSenderInstance
42
57
  *
@@ -60,6 +75,7 @@ export declare class ChannelSenderContextImpl implements ChannelSenderContext {
60
75
  protected _solution: ChannelSenderContextSolution;
61
76
  protected _uri: string;
62
77
  constructor(_version: V1, messagingServiceSid: string, sid: string);
78
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
63
79
  fetch(callback?: (error: Error | null, item?: ChannelSenderInstance) => any): Promise<ChannelSenderInstance>;
64
80
  /**
65
81
  * Provide a user-friendly representation
@@ -125,6 +141,14 @@ export declare class ChannelSenderInstance {
125
141
  */
126
142
  url: string;
127
143
  private get _proxy();
144
+ /**
145
+ * Remove a ChannelSenderInstance
146
+ *
147
+ * @param callback - Callback to handle processed record
148
+ *
149
+ * @returns Resolves to processed boolean
150
+ */
151
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
128
152
  /**
129
153
  * Fetch a ChannelSenderInstance
130
154
  *
@@ -160,6 +184,15 @@ export interface ChannelSenderListInstance {
160
184
  _uri: string;
161
185
  (sid: string): ChannelSenderContext;
162
186
  get(sid: string): ChannelSenderContext;
187
+ /**
188
+ * Create a ChannelSenderInstance
189
+ *
190
+ * @param params - Parameter for request
191
+ * @param callback - Callback to handle processed record
192
+ *
193
+ * @returns Resolves to processed ChannelSenderInstance
194
+ */
195
+ create(params: ChannelSenderListInstanceCreateOptions, callback?: (error: Error | null, item?: ChannelSenderInstance) => any): Promise<ChannelSenderInstance>;
163
196
  /**
164
197
  * Streams ChannelSenderInstance records from the API.
165
198
  *
@@ -34,6 +34,15 @@ class ChannelSenderContextImpl {
34
34
  this._solution = { messagingServiceSid, sid };
35
35
  this._uri = `/Services/${messagingServiceSid}/ChannelSenders/${sid}`;
36
36
  }
37
+ remove(callback) {
38
+ const instance = this;
39
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
40
+ uri: instance._uri,
41
+ method: "delete",
42
+ });
43
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
44
+ return operationPromise;
45
+ }
37
46
  fetch(callback) {
38
47
  const instance = this;
39
48
  let operationVersion = instance._version, operationPromise = operationVersion.fetch({
@@ -77,6 +86,16 @@ class ChannelSenderInstance {
77
86
  new ChannelSenderContextImpl(this._version, this._solution.messagingServiceSid, this._solution.sid);
78
87
  return this._context;
79
88
  }
89
+ /**
90
+ * Remove a ChannelSenderInstance
91
+ *
92
+ * @param callback - Callback to handle processed record
93
+ *
94
+ * @returns Resolves to processed boolean
95
+ */
96
+ remove(callback) {
97
+ return this._proxy.remove(callback);
98
+ }
80
99
  /**
81
100
  * Fetch a ChannelSenderInstance
82
101
  *
@@ -121,6 +140,27 @@ function ChannelSenderListInstance(version, messagingServiceSid) {
121
140
  instance._version = version;
122
141
  instance._solution = { messagingServiceSid };
123
142
  instance._uri = `/Services/${messagingServiceSid}/ChannelSenders`;
143
+ instance.create = function create(params, callback) {
144
+ if (params === null || params === undefined) {
145
+ throw new Error('Required parameter "params" missing.');
146
+ }
147
+ if (params["sid"] === null || params["sid"] === undefined) {
148
+ throw new Error("Required parameter \"params['sid']\" missing.");
149
+ }
150
+ let data = {};
151
+ data["Sid"] = params["sid"];
152
+ const headers = {};
153
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
154
+ let operationVersion = version, operationPromise = operationVersion.create({
155
+ uri: instance._uri,
156
+ method: "post",
157
+ data,
158
+ headers,
159
+ });
160
+ operationPromise = operationPromise.then((payload) => new ChannelSenderInstance(operationVersion, payload, instance._solution.messagingServiceSid));
161
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
162
+ return operationPromise;
163
+ };
124
164
  instance.page = function page(params, callback) {
125
165
  if (params instanceof Function) {
126
166
  callback = params;
@@ -7,8 +7,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
7
7
  import { PortingPortabilityListInstance } from "./v1/portingPortability";
8
8
  import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
9
9
  import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
10
+ import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
10
11
  import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
11
- import { WebhookListInstance } from "./v1/webhook";
12
12
  export default class V1 extends Version {
13
13
  /**
14
14
  * Initialize the V1 version of Numbers
@@ -30,10 +30,10 @@ export default class V1 extends Version {
30
30
  protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
31
31
  /** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
32
32
  protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
33
+ /** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
34
+ protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
33
35
  /** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
34
36
  protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
35
- /** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
36
- protected _webhook?: WebhookListInstance;
37
37
  /** Getter for bulkEligibilities resource */
38
38
  get bulkEligibilities(): BulkEligibilityListInstance;
39
39
  /** Getter for eligibilities resource */
@@ -48,8 +48,8 @@ export default class V1 extends Version {
48
48
  get portingWebhookConfigurations(): PortingWebhookConfigurationListInstance;
49
49
  /** Getter for portingWebhookConfigurationsDelete resource */
50
50
  get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
51
+ /** Getter for portingWebhookConfigurationFetch resource */
52
+ get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
51
53
  /** Getter for signingRequestConfigurations resource */
52
54
  get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
53
- /** Getter for webhook resource */
54
- get webhook(): WebhookListInstance;
55
55
  }
@@ -24,8 +24,8 @@ const portingPortInPhoneNumber_1 = require("./v1/portingPortInPhoneNumber");
24
24
  const portingPortability_1 = require("./v1/portingPortability");
25
25
  const portingWebhookConfiguration_1 = require("./v1/portingWebhookConfiguration");
26
26
  const portingWebhookConfigurationDelete_1 = require("./v1/portingWebhookConfigurationDelete");
27
+ const portingWebhookConfigurationFetch_1 = require("./v1/portingWebhookConfigurationFetch");
27
28
  const signingRequestConfiguration_1 = require("./v1/signingRequestConfiguration");
28
- const webhook_1 = require("./v1/webhook");
29
29
  class V1 extends Version_1.default {
30
30
  /**
31
31
  * Initialize the V1 version of Numbers
@@ -79,6 +79,13 @@ class V1 extends Version_1.default {
79
79
  (0, portingWebhookConfigurationDelete_1.PortingWebhookConfigurationDeleteListInstance)(this);
80
80
  return this._portingWebhookConfigurationsDelete;
81
81
  }
82
+ /** Getter for portingWebhookConfigurationFetch resource */
83
+ get portingWebhookConfigurationFetch() {
84
+ this._portingWebhookConfigurationFetch =
85
+ this._portingWebhookConfigurationFetch ||
86
+ (0, portingWebhookConfigurationFetch_1.PortingWebhookConfigurationFetchListInstance)(this);
87
+ return this._portingWebhookConfigurationFetch;
88
+ }
82
89
  /** Getter for signingRequestConfigurations resource */
83
90
  get signingRequestConfigurations() {
84
91
  this._signingRequestConfigurations =
@@ -86,10 +93,5 @@ class V1 extends Version_1.default {
86
93
  (0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
87
94
  return this._signingRequestConfigurations;
88
95
  }
89
- /** Getter for webhook resource */
90
- get webhook() {
91
- this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
92
- return this._webhook;
93
- }
94
96
  }
95
97
  exports.default = V1;
@@ -2,6 +2,7 @@ import NumbersBase from "../NumbersBase";
2
2
  import Version from "../../base/Version";
3
3
  import { AuthorizationDocumentListInstance } from "./v2/authorizationDocument";
4
4
  import { BulkHostedNumberOrderListInstance } from "./v2/bulkHostedNumberOrder";
5
+ import { BundleCloneListInstance } from "./v2/bundleClone";
5
6
  import { HostedNumberOrderListInstance } from "./v2/hostedNumberOrder";
6
7
  import { RegulatoryComplianceListInstance } from "./v2/regulatoryCompliance";
7
8
  export default class V2 extends Version {
@@ -15,6 +16,8 @@ export default class V2 extends Version {
15
16
  protected _authorizationDocuments?: AuthorizationDocumentListInstance;
16
17
  /** bulkHostedNumberOrders - { Twilio.Numbers.V2.BulkHostedNumberOrderListInstance } resource */
17
18
  protected _bulkHostedNumberOrders?: BulkHostedNumberOrderListInstance;
19
+ /** bundleClone - { Twilio.Numbers.V2.BundleCloneListInstance } resource */
20
+ protected _bundleClone?: BundleCloneListInstance;
18
21
  /** hostedNumberOrders - { Twilio.Numbers.V2.HostedNumberOrderListInstance } resource */
19
22
  protected _hostedNumberOrders?: HostedNumberOrderListInstance;
20
23
  /** regulatoryCompliance - { Twilio.Numbers.V2.RegulatoryComplianceListInstance } resource */
@@ -23,6 +26,8 @@ export default class V2 extends Version {
23
26
  get authorizationDocuments(): AuthorizationDocumentListInstance;
24
27
  /** Getter for bulkHostedNumberOrders resource */
25
28
  get bulkHostedNumberOrders(): BulkHostedNumberOrderListInstance;
29
+ /** Getter for bundleClone resource */
30
+ get bundleClone(): BundleCloneListInstance;
26
31
  /** Getter for hostedNumberOrders resource */
27
32
  get hostedNumberOrders(): HostedNumberOrderListInstance;
28
33
  /** Getter for regulatoryCompliance resource */
@@ -19,6 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
20
  const authorizationDocument_1 = require("./v2/authorizationDocument");
21
21
  const bulkHostedNumberOrder_1 = require("./v2/bulkHostedNumberOrder");
22
+ const bundleClone_1 = require("./v2/bundleClone");
22
23
  const hostedNumberOrder_1 = require("./v2/hostedNumberOrder");
23
24
  const regulatoryCompliance_1 = require("./v2/regulatoryCompliance");
24
25
  class V2 extends Version_1.default {
@@ -42,6 +43,11 @@ class V2 extends Version_1.default {
42
43
  this._bulkHostedNumberOrders || (0, bulkHostedNumberOrder_1.BulkHostedNumberOrderListInstance)(this);
43
44
  return this._bulkHostedNumberOrders;
44
45
  }
46
+ /** Getter for bundleClone resource */
47
+ get bundleClone() {
48
+ this._bundleClone = this._bundleClone || (0, bundleClone_1.BundleCloneListInstance)(this);
49
+ return this._bundleClone;
50
+ }
45
51
  /** Getter for hostedNumberOrders resource */
46
52
  get hostedNumberOrders() {
47
53
  this._hostedNumberOrders =
@@ -77,23 +77,23 @@ export declare class PortingPortInInstance {
77
77
  */
78
78
  url: string;
79
79
  /**
80
- * The Account SID that the numbers will be added to after they are ported into Twilio.
80
+ * Account Sid or subaccount where the phone number(s) will be Ported
81
81
  */
82
82
  accountSid: string;
83
83
  /**
84
- * List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails.
84
+ * Additional emails to send a copy of the signed LOA to.
85
85
  */
86
86
  notificationEmails: Array<string>;
87
87
  /**
88
- * Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation.
88
+ * Target date to port the number. We cannot guarantee that this date will be honored by the other carriers, please work with Ops to get a confirmation of the firm order commitment (FOC) date. Expected format is ISO Local Date, example: ‘2011-12-03`. This date must be at least 7 days in the future for US ports and 10 days in the future for Japanese ports. (This value is only available for custom porting customers.)
89
89
  */
90
90
  targetPortInDate: Date;
91
91
  /**
92
- * Minimum hour in the future needs to be established with the Ops team for validation.
92
+ * The earliest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00\'. (This value is only available for custom porting customers.)
93
93
  */
94
94
  targetPortInTimeRangeStart: string;
95
95
  /**
96
- * Maximum hour in the future needs to be established with the Ops team for validation.
96
+ * The latest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00\'. (This value is only available for custom porting customers.)
97
97
  */
98
98
  targetPortInTimeRangeEnd: string;
99
99
  /**
@@ -101,15 +101,12 @@ export declare class PortingPortInInstance {
101
101
  */
102
102
  portInRequestStatus: string;
103
103
  /**
104
- * The information for the losing carrier.
104
+ * Details regarding the customer’s information with the losing carrier. These values will be used to generate the letter of authorization and should match the losing carrier’s data as closely as possible to ensure the port is accepted.
105
105
  */
106
106
  losingCarrierInformation: any;
107
- /**
108
- * The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212).
109
- */
110
107
  phoneNumbers: Array<any>;
111
108
  /**
112
- * The list of documents SID referencing a utility bills
109
+ * List of document SIDs for all phone numbers included in the port in request. At least one document SID referring to a document of the type Utility Bill is required.
113
110
  */
114
111
  documents: Array<string>;
115
112
  dateCreated: Date;
@@ -73,7 +73,7 @@ class PortingPortInInstance {
73
73
  this.losingCarrierInformation = payload.losing_carrier_information;
74
74
  this.phoneNumbers = payload.phone_numbers;
75
75
  this.documents = payload.documents;
76
- this.dateCreated = deserialize.iso8601Date(payload.date_created);
76
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
77
77
  this._solution = {
78
78
  portInRequestSid: portInRequestSid || this.portInRequestSid,
79
79
  };
@@ -61,6 +61,7 @@ interface PortingPortInPhoneNumberResource {
61
61
  port_out_pin: number;
62
62
  rejection_reason: string;
63
63
  rejection_reason_code: number;
64
+ port_date: Date;
64
65
  }
65
66
  export declare class PortingPortInPhoneNumberInstance {
66
67
  protected _version: V1;
@@ -68,70 +69,77 @@ export declare class PortingPortInPhoneNumberInstance {
68
69
  protected _context?: PortingPortInPhoneNumberContext;
69
70
  constructor(_version: V1, payload: PortingPortInPhoneNumberResource, portInRequestSid?: string, phoneNumberSid?: string);
70
71
  /**
71
- * The SID of the Port In request. This is a unique identifier of the port in request.
72
+ * The unique identifier for the port in request that this phone number is associated with.
72
73
  */
73
74
  portInRequestSid: string;
74
75
  /**
75
- * The SID of the Port In request phone number. This is a unique identifier of the phone number.
76
+ * The unique identifier for this phone number associated with this port in request.
76
77
  */
77
78
  phoneNumberSid: string;
79
+ /**
80
+ * URL reference for this resource.
81
+ */
78
82
  url: string;
79
83
  /**
80
- * The SID of the account that the phone number belongs to.
84
+ * Account Sid or subaccount where the phone number(s) will be Ported.
81
85
  */
82
86
  accountSid: string;
83
87
  /**
84
- * The type of the phone number.
88
+ * The number type of the phone number. This can be: toll-free, local, mobile or unknown. This field may be null if the number is not portable or if the portability for a number has not yet been evaluated.
85
89
  */
86
90
  phoneNumberType: string;
87
91
  /**
88
- * The date when the phone number was created.
92
+ * The timestamp for when this port in phone number was created.
89
93
  */
90
94
  dateCreated: Date;
91
95
  /**
92
- * The country of the phone number.
96
+ * The ISO country code that this number is associated with. This field may be null if the number is not portable or if the portability for a number has not yet been evaluated.
93
97
  */
94
98
  country: string;
95
99
  /**
96
- * The phone number is missing required fields.
100
+ * Indicates if the phone number is missing required fields such as a PIN or account number. This field may be null if the number is not portable or if the portability for a number has not yet been evaluated.
97
101
  */
98
102
  missingRequiredFields: boolean;
99
103
  /**
100
- * The timestamp when the status was last updated.
104
+ * Timestamp indicating when the Port In Phone Number resource was last modified.
101
105
  */
102
106
  lastUpdated: Date;
103
107
  /**
104
- * The phone number.
108
+ * Phone number to be ported. This will be in the E164 Format.
105
109
  */
106
110
  phoneNumber: string;
107
111
  /**
108
- * The phone number is portable.
112
+ * If the number is portable by Twilio or not. This field may be null if the number portability has not yet been evaluated. If a number is not portable reference the `not_portability_reason_code` and `not_portability_reason` fields for more details
109
113
  */
110
114
  portable: boolean;
111
115
  /**
112
- * The reason why the phone number is not portable.
116
+ * The not portability reason code description. This field may be null if the number is portable or if the portability for a number has not yet been evaluated.
113
117
  */
114
118
  notPortabilityReason: string;
115
119
  /**
116
- * The code of the reason why the phone number is not portable.
120
+ * The not portability reason code. This field may be null if the number is portable or if the portability for a number has not yet been evaluated.
117
121
  */
118
122
  notPortabilityReasonCode: number;
119
123
  /**
120
- * The status of the phone number in the port in request.
124
+ * The status of the port in phone number.
121
125
  */
122
126
  portInPhoneNumberStatus: string;
123
127
  /**
124
- * The pin required for the losing carrier to port out the phone number.
128
+ * The pin required by the losing carrier to do the port out.
125
129
  */
126
130
  portOutPin: number;
127
131
  /**
128
- * The rejection reason returned by the vendor.
132
+ * The description of the rejection reason provided by the losing carrier. This field may be null if the number has not been rejected by the losing carrier.
129
133
  */
130
134
  rejectionReason: string;
131
135
  /**
132
- * The rejection reason code returned by the vendor.
136
+ * The code for the rejection reason provided by the losing carrier. This field may be null if the number has not been rejected by the losing carrier.
133
137
  */
134
138
  rejectionReasonCode: number;
139
+ /**
140
+ * The timestamp the phone number will be ported. This will only be set once a port date has been confirmed. Not all carriers can guarantee a specific time on the port date. Twilio will try its best to get the port completed by this time on the port date. Please subscribe to webhooks for confirmation on when a port has actually been completed.
141
+ */
142
+ portDate: Date;
135
143
  private get _proxy();
136
144
  /**
137
145
  * Remove a PortingPortInPhoneNumberInstance
@@ -172,6 +180,7 @@ export declare class PortingPortInPhoneNumberInstance {
172
180
  portOutPin: number;
173
181
  rejectionReason: string;
174
182
  rejectionReasonCode: number;
183
+ portDate: Date;
175
184
  };
176
185
  [inspect.custom](_depth: any, options: InspectOptions): string;
177
186
  }
@@ -82,6 +82,7 @@ class PortingPortInPhoneNumberInstance {
82
82
  this.portOutPin = deserialize.integer(payload.port_out_pin);
83
83
  this.rejectionReason = payload.rejection_reason;
84
84
  this.rejectionReasonCode = deserialize.integer(payload.rejection_reason_code);
85
+ this.portDate = deserialize.iso8601DateTime(payload.port_date);
85
86
  this._solution = {
86
87
  portInRequestSid: portInRequestSid || this.portInRequestSid,
87
88
  phoneNumberSid: phoneNumberSid || this.phoneNumberSid,
@@ -137,6 +138,7 @@ class PortingPortInPhoneNumberInstance {
137
138
  portOutPin: this.portOutPin,
138
139
  rejectionReason: this.rejectionReason,
139
140
  rejectionReasonCode: this.rejectionReasonCode,
141
+ portDate: this.portDate,
140
142
  };
141
143
  }
142
144
  [util_1.inspect.custom](_depth, options) {
@@ -6,7 +6,7 @@ export type PortingPortabilityNumberType = "LOCAL" | "UNKNOWN" | "MOBILE" | "TOL
6
6
  * Options to pass to fetch a PortingPortabilityInstance
7
7
  */
8
8
  export interface PortingPortabilityContextFetchOptions {
9
- /** The SID of the account where the phone number(s) will be ported. */
9
+ /** Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account. */
10
10
  targetAccountSid?: string;
11
11
  }
12
12
  export interface PortingPortabilityContext {
@@ -71,15 +71,15 @@ export declare class PortingPortabilityInstance {
71
71
  */
72
72
  phoneNumber: string;
73
73
  /**
74
- * The target account sid to which the number will be ported
74
+ * Account Sid that the phone number belongs to in Twilio. This is only returned for phone numbers that already exist in Twilio’s inventory and belong to your account or sub account.
75
75
  */
76
76
  accountSid: string;
77
77
  /**
78
- * Boolean flag specifying if phone number is portable or not.
78
+ * Boolean flag indicates if the phone number can be ported into Twilio through the Porting API or not.
79
79
  */
80
80
  portable: boolean;
81
81
  /**
82
- * Boolean flag specifying if PIN and account number is required for the phone number.
82
+ * Indicates if the port in process will require a personal identification number (PIN) and an account number for this phone number. If this is true you will be required to submit both a PIN and account number from the losing carrier for this number when opening a port in request. These fields will be required in order to complete the port in process to Twilio.
83
83
  */
84
84
  pinAndAccountNumberRequired: boolean;
85
85
  /**
@@ -87,7 +87,7 @@ export declare class PortingPortabilityInstance {
87
87
  */
88
88
  notPortableReason: string;
89
89
  /**
90
- * The Portability Reason Code for the phone number if it cannot be ported into Twilio, `null` otherwise. One of `22131`, `22132`, `22130`, `22133`, `22102` or `22135`.
90
+ * The Portability Reason Code for the phone number if it cannot be ported into Twilio, `null` otherwise.
91
91
  */
92
92
  notPortableReasonCode: number;
93
93
  numberType: PortingPortabilityNumberType;
@@ -52,15 +52,15 @@ export declare class PortingWebhookConfigurationInstance {
52
52
  */
53
53
  url: string;
54
54
  /**
55
- * Webhook URL to send a request when a port in request or port in phone number event happens
55
+ * The complete webhook url that will be called when a notification event for port in request or port in phone number happens
56
56
  */
57
57
  portInTargetUrl: string;
58
58
  /**
59
- * Webhook URL to send a request when a port out phone number event happens
59
+ * The complete webhook url that will be called when a notification event for a port out phone number happens.
60
60
  */
61
61
  portOutTargetUrl: string;
62
62
  /**
63
- * List of notification events to send a request to the webhook URL
63
+ * A list to filter what notification events to receive for this account and its sub accounts. If it is an empty list, then it means that there are no filters for the notifications events to send in each webhook and all events will get sent.
64
64
  */
65
65
  notificationsOf: Array<string>;
66
66
  /**
@@ -1,28 +1,28 @@
1
1
  /// <reference types="node" />
2
2
  import { inspect, InspectOptions } from "util";
3
3
  import V1 from "../V1";
4
- export interface WebhookSolution {
4
+ export interface PortingWebhookConfigurationFetchSolution {
5
5
  }
6
- export interface WebhookListInstance {
6
+ export interface PortingWebhookConfigurationFetchListInstance {
7
7
  _version: V1;
8
- _solution: WebhookSolution;
8
+ _solution: PortingWebhookConfigurationFetchSolution;
9
9
  _uri: string;
10
10
  /**
11
- * Fetch a WebhookInstance
11
+ * Fetch a PortingWebhookConfigurationFetchInstance
12
12
  *
13
13
  * @param callback - Callback to handle processed record
14
14
  *
15
- * @returns Resolves to processed WebhookInstance
15
+ * @returns Resolves to processed PortingWebhookConfigurationFetchInstance
16
16
  */
17
- fetch(callback?: (error: Error | null, item?: WebhookInstance) => any): Promise<WebhookInstance>;
17
+ fetch(callback?: (error: Error | null, item?: PortingWebhookConfigurationFetchInstance) => any): Promise<PortingWebhookConfigurationFetchInstance>;
18
18
  /**
19
19
  * Provide a user-friendly representation
20
20
  */
21
21
  toJSON(): any;
22
22
  [inspect.custom](_depth: any, options: InspectOptions): any;
23
23
  }
24
- export declare function WebhookListInstance(version: V1): WebhookListInstance;
25
- interface WebhookResource {
24
+ export declare function PortingWebhookConfigurationFetchListInstance(version: V1): PortingWebhookConfigurationFetchListInstance;
25
+ interface PortingWebhookConfigurationFetchResource {
26
26
  url: string;
27
27
  port_in_target_url: string;
28
28
  port_out_target_url: string;
@@ -30,23 +30,23 @@ interface WebhookResource {
30
30
  port_in_target_date_created: Date;
31
31
  port_out_target_date_created: Date;
32
32
  }
33
- export declare class WebhookInstance {
33
+ export declare class PortingWebhookConfigurationFetchInstance {
34
34
  protected _version: V1;
35
- constructor(_version: V1, payload: WebhookResource);
35
+ constructor(_version: V1, payload: PortingWebhookConfigurationFetchResource);
36
36
  /**
37
37
  * The URL of the webhook configuration request
38
38
  */
39
39
  url: string;
40
40
  /**
41
- * Webhook URL to send a request when a port in request or port in phone number event happens
41
+ * The complete webhook url that will be called when a notification event for port in request or port in phone number happens
42
42
  */
43
43
  portInTargetUrl: string;
44
44
  /**
45
- * Webhook URL to send a request when a port out phone number event happens
45
+ * The complete webhook url that will be called when a notification event for a port out phone number happens.
46
46
  */
47
47
  portOutTargetUrl: string;
48
48
  /**
49
- * List of notification events to send a request to the webhook URL
49
+ * A list to filter what notification events to receive for this account and its sub accounts. If it is an empty list, then it means that there are no filters for the notifications events to send in each webhook and all events will get sent.
50
50
  */
51
51
  notificationsOf: Array<string>;
52
52
  /**
@@ -13,11 +13,11 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.WebhookInstance = exports.WebhookListInstance = void 0;
16
+ exports.PortingWebhookConfigurationFetchInstance = exports.PortingWebhookConfigurationFetchListInstance = void 0;
17
17
  const util_1 = require("util");
18
18
  const deserialize = require("../../../base/deserialize");
19
19
  const serialize = require("../../../base/serialize");
20
- function WebhookListInstance(version) {
20
+ function PortingWebhookConfigurationFetchListInstance(version) {
21
21
  const instance = {};
22
22
  instance._version = version;
23
23
  instance._solution = {};
@@ -27,7 +27,7 @@ function WebhookListInstance(version) {
27
27
  uri: instance._uri,
28
28
  method: "get",
29
29
  });
30
- operationPromise = operationPromise.then((payload) => new WebhookInstance(operationVersion, payload));
30
+ operationPromise = operationPromise.then((payload) => new PortingWebhookConfigurationFetchInstance(operationVersion, payload));
31
31
  operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
32
32
  return operationPromise;
33
33
  };
@@ -39,8 +39,8 @@ function WebhookListInstance(version) {
39
39
  };
40
40
  return instance;
41
41
  }
42
- exports.WebhookListInstance = WebhookListInstance;
43
- class WebhookInstance {
42
+ exports.PortingWebhookConfigurationFetchListInstance = PortingWebhookConfigurationFetchListInstance;
43
+ class PortingWebhookConfigurationFetchInstance {
44
44
  constructor(_version, payload) {
45
45
  this._version = _version;
46
46
  this.url = payload.url;
@@ -69,4 +69,4 @@ class WebhookInstance {
69
69
  return (0, util_1.inspect)(this.toJSON(), options);
70
70
  }
71
71
  }
72
- exports.WebhookInstance = WebhookInstance;
72
+ exports.PortingWebhookConfigurationFetchInstance = PortingWebhookConfigurationFetchInstance;