twilio 5.4.3 → 5.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,7 +22,8 @@ This library supports the following Node.js implementations:
22
22
  - Node.js 14
23
23
  - Node.js 16
24
24
  - Node.js 18
25
- - Node.js LTS (20)
25
+ - Node.js 20
26
+ - Node.js lts(22)
26
27
 
27
28
  TypeScript is supported for TypeScript version 2.9 and above.
28
29
 
@@ -8,7 +8,7 @@ import { DependentPhoneNumberListInstance } from "./address/dependentPhoneNumber
8
8
  * Options to pass to update a AddressInstance
9
9
  */
10
10
  export interface AddressContextUpdateOptions {
11
- /** A descriptive string that you create to describe the address. It can be up to 64 characters long. */
11
+ /** A descriptive string that you create to describe the new address. It can be up to 64 characters long for Regulatory Compliance addresses and 32 characters long for Emergency addresses. */
12
12
  friendlyName?: string;
13
13
  /** The name to associate with the address. */
14
14
  customerName?: string;
@@ -3,7 +3,7 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V2 from "../../V2";
6
- export type OperatorResultOperatorType = "conversation_classify" | "utterance_classify" | "extract" | "extract_normalize" | "pii_extract";
6
+ export type OperatorResultOperatorType = "conversation_classify" | "utterance_classify" | "extract" | "extract_normalize" | "pii_extract" | "text_generation" | "json";
7
7
  /**
8
8
  * Options to pass to fetch a OperatorResultInstance
9
9
  */
@@ -109,6 +109,7 @@ interface OperatorResultResource {
109
109
  label_probabilities: any;
110
110
  extract_results: any;
111
111
  text_generation_results: any;
112
+ json_results: any;
112
113
  transcript_sid: string;
113
114
  url: string;
114
115
  }
@@ -166,6 +167,7 @@ export declare class OperatorResultInstance {
166
167
  * Output of a text generation operator for example Conversation Sumamary.
167
168
  */
168
169
  textGenerationResults: any;
170
+ jsonResults: any;
169
171
  /**
170
172
  * A 34 character string that uniquely identifies this Transcript.
171
173
  */
@@ -211,6 +213,7 @@ export declare class OperatorResultInstance {
211
213
  labelProbabilities: any;
212
214
  extractResults: any;
213
215
  textGenerationResults: any;
216
+ jsonResults: any;
214
217
  transcriptSid: string;
215
218
  url: string;
216
219
  };
@@ -87,6 +87,7 @@ class OperatorResultInstance {
87
87
  this.labelProbabilities = payload.label_probabilities;
88
88
  this.extractResults = payload.extract_results;
89
89
  this.textGenerationResults = payload.text_generation_results;
90
+ this.jsonResults = payload.json_results;
90
91
  this.transcriptSid = payload.transcript_sid;
91
92
  this.url = payload.url;
92
93
  this._solution = {
@@ -123,6 +124,7 @@ class OperatorResultInstance {
123
124
  labelProbabilities: this.labelProbabilities,
124
125
  extractResults: this.extractResults,
125
126
  textGenerationResults: this.textGenerationResults,
127
+ jsonResults: this.jsonResults,
126
128
  transcriptSid: this.transcriptSid,
127
129
  url: this.url,
128
130
  };
@@ -0,0 +1,272 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
+ import Response from "../../../../http/response";
5
+ import V1 from "../../V1";
6
+ /**
7
+ * Options to pass to create a DestinationAlphaSenderInstance
8
+ */
9
+ export interface DestinationAlphaSenderListInstanceCreateOptions {
10
+ /** The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, hyphen `-`, plus `+`, underscore `_` and ampersand `&`. This value cannot contain only numbers. */
11
+ alphaSender: string;
12
+ /** The Optional Two Character ISO Country Code the Alphanumeric Sender ID will be used for. If the IsoCountryCode is not provided, a default Alpha Sender will be created that can be used across all countries. */
13
+ isoCountryCode?: string;
14
+ }
15
+ /**
16
+ * Options to pass to each
17
+ */
18
+ export interface DestinationAlphaSenderListInstanceEachOptions {
19
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
20
+ pageSize?: number;
21
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
22
+ callback?: (item: DestinationAlphaSenderInstance, done: (err?: Error) => void) => void;
23
+ /** Function to be called upon completion of streaming */
24
+ done?: Function;
25
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
26
+ limit?: number;
27
+ }
28
+ /**
29
+ * Options to pass to list
30
+ */
31
+ export interface DestinationAlphaSenderListInstanceOptions {
32
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
33
+ pageSize?: number;
34
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
35
+ limit?: number;
36
+ }
37
+ /**
38
+ * Options to pass to page
39
+ */
40
+ export interface DestinationAlphaSenderListInstancePageOptions {
41
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
42
+ pageSize?: number;
43
+ /** Page Number, this value is simply for client state */
44
+ pageNumber?: number;
45
+ /** PageToken provided by the API */
46
+ pageToken?: string;
47
+ }
48
+ export interface DestinationAlphaSenderContext {
49
+ /**
50
+ * Remove a DestinationAlphaSenderInstance
51
+ *
52
+ * @param callback - Callback to handle processed record
53
+ *
54
+ * @returns Resolves to processed boolean
55
+ */
56
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
57
+ /**
58
+ * Fetch a DestinationAlphaSenderInstance
59
+ *
60
+ * @param callback - Callback to handle processed record
61
+ *
62
+ * @returns Resolves to processed DestinationAlphaSenderInstance
63
+ */
64
+ fetch(callback?: (error: Error | null, item?: DestinationAlphaSenderInstance) => any): Promise<DestinationAlphaSenderInstance>;
65
+ /**
66
+ * Provide a user-friendly representation
67
+ */
68
+ toJSON(): any;
69
+ [inspect.custom](_depth: any, options: InspectOptions): any;
70
+ }
71
+ export interface DestinationAlphaSenderContextSolution {
72
+ serviceSid: string;
73
+ sid: string;
74
+ }
75
+ export declare class DestinationAlphaSenderContextImpl implements DestinationAlphaSenderContext {
76
+ protected _version: V1;
77
+ protected _solution: DestinationAlphaSenderContextSolution;
78
+ protected _uri: string;
79
+ constructor(_version: V1, serviceSid: string, sid: string);
80
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
81
+ fetch(callback?: (error: Error | null, item?: DestinationAlphaSenderInstance) => any): Promise<DestinationAlphaSenderInstance>;
82
+ /**
83
+ * Provide a user-friendly representation
84
+ *
85
+ * @returns Object
86
+ */
87
+ toJSON(): DestinationAlphaSenderContextSolution;
88
+ [inspect.custom](_depth: any, options: InspectOptions): string;
89
+ }
90
+ interface DestinationAlphaSenderPayload extends TwilioResponsePayload {
91
+ alpha_senders: DestinationAlphaSenderResource[];
92
+ }
93
+ interface DestinationAlphaSenderResource {
94
+ sid: string;
95
+ account_sid: string;
96
+ service_sid: string;
97
+ date_created: Date;
98
+ date_updated: Date;
99
+ alpha_sender: string;
100
+ capabilities: Array<string>;
101
+ url: string;
102
+ iso_country_code: string;
103
+ }
104
+ export declare class DestinationAlphaSenderInstance {
105
+ protected _version: V1;
106
+ protected _solution: DestinationAlphaSenderContextSolution;
107
+ protected _context?: DestinationAlphaSenderContext;
108
+ constructor(_version: V1, payload: DestinationAlphaSenderResource, serviceSid: string, sid?: string);
109
+ /**
110
+ * The unique string that we created to identify the AlphaSender resource.
111
+ */
112
+ sid: string;
113
+ /**
114
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AlphaSender resource.
115
+ */
116
+ accountSid: string;
117
+ /**
118
+ * The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) the resource is associated with.
119
+ */
120
+ serviceSid: string;
121
+ /**
122
+ * The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
123
+ */
124
+ dateCreated: Date;
125
+ /**
126
+ * The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
127
+ */
128
+ dateUpdated: Date;
129
+ /**
130
+ * The Alphanumeric Sender ID string.
131
+ */
132
+ alphaSender: string;
133
+ /**
134
+ * An array of values that describe whether the number can receive calls or messages. Can be: `SMS`.
135
+ */
136
+ capabilities: Array<string>;
137
+ /**
138
+ * The absolute URL of the AlphaSender resource.
139
+ */
140
+ url: string;
141
+ /**
142
+ * The Two Character ISO Country Code the Alphanumeric Sender ID will be used for. For Default Alpha Senders that work across countries, this value will be an empty string
143
+ */
144
+ isoCountryCode: string;
145
+ private get _proxy();
146
+ /**
147
+ * Remove a DestinationAlphaSenderInstance
148
+ *
149
+ * @param callback - Callback to handle processed record
150
+ *
151
+ * @returns Resolves to processed boolean
152
+ */
153
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
154
+ /**
155
+ * Fetch a DestinationAlphaSenderInstance
156
+ *
157
+ * @param callback - Callback to handle processed record
158
+ *
159
+ * @returns Resolves to processed DestinationAlphaSenderInstance
160
+ */
161
+ fetch(callback?: (error: Error | null, item?: DestinationAlphaSenderInstance) => any): Promise<DestinationAlphaSenderInstance>;
162
+ /**
163
+ * Provide a user-friendly representation
164
+ *
165
+ * @returns Object
166
+ */
167
+ toJSON(): {
168
+ sid: string;
169
+ accountSid: string;
170
+ serviceSid: string;
171
+ dateCreated: Date;
172
+ dateUpdated: Date;
173
+ alphaSender: string;
174
+ capabilities: string[];
175
+ url: string;
176
+ isoCountryCode: string;
177
+ };
178
+ [inspect.custom](_depth: any, options: InspectOptions): string;
179
+ }
180
+ export interface DestinationAlphaSenderSolution {
181
+ serviceSid: string;
182
+ }
183
+ export interface DestinationAlphaSenderListInstance {
184
+ _version: V1;
185
+ _solution: DestinationAlphaSenderSolution;
186
+ _uri: string;
187
+ (sid: string): DestinationAlphaSenderContext;
188
+ get(sid: string): DestinationAlphaSenderContext;
189
+ /**
190
+ * Create a DestinationAlphaSenderInstance
191
+ *
192
+ * @param params - Parameter for request
193
+ * @param callback - Callback to handle processed record
194
+ *
195
+ * @returns Resolves to processed DestinationAlphaSenderInstance
196
+ */
197
+ create(params: DestinationAlphaSenderListInstanceCreateOptions, callback?: (error: Error | null, item?: DestinationAlphaSenderInstance) => any): Promise<DestinationAlphaSenderInstance>;
198
+ /**
199
+ * Streams DestinationAlphaSenderInstance records from the API.
200
+ *
201
+ * This operation lazily loads records as efficiently as possible until the limit
202
+ * is reached.
203
+ *
204
+ * The results are passed into the callback function, so this operation is memory
205
+ * efficient.
206
+ *
207
+ * If a function is passed as the first argument, it will be used as the callback
208
+ * function.
209
+ *
210
+ * @param { DestinationAlphaSenderListInstanceEachOptions } [params] - Options for request
211
+ * @param { function } [callback] - Function to process each record
212
+ */
213
+ each(callback?: (item: DestinationAlphaSenderInstance, done: (err?: Error) => void) => void): void;
214
+ each(params: DestinationAlphaSenderListInstanceEachOptions, callback?: (item: DestinationAlphaSenderInstance, done: (err?: Error) => void) => void): void;
215
+ /**
216
+ * Retrieve a single target page of DestinationAlphaSenderInstance records from the API.
217
+ *
218
+ * The request is executed immediately.
219
+ *
220
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
221
+ * @param { function } [callback] - Callback to handle list of records
222
+ */
223
+ getPage(targetUrl: string, callback?: (error: Error | null, items: DestinationAlphaSenderPage) => any): Promise<DestinationAlphaSenderPage>;
224
+ /**
225
+ * Lists DestinationAlphaSenderInstance records from the API as a list.
226
+ *
227
+ * If a function is passed as the first argument, it will be used as the callback
228
+ * function.
229
+ *
230
+ * @param { DestinationAlphaSenderListInstanceOptions } [params] - Options for request
231
+ * @param { function } [callback] - Callback to handle list of records
232
+ */
233
+ list(callback?: (error: Error | null, items: DestinationAlphaSenderInstance[]) => any): Promise<DestinationAlphaSenderInstance[]>;
234
+ list(params: DestinationAlphaSenderListInstanceOptions, callback?: (error: Error | null, items: DestinationAlphaSenderInstance[]) => any): Promise<DestinationAlphaSenderInstance[]>;
235
+ /**
236
+ * Retrieve a single page of DestinationAlphaSenderInstance records from the API.
237
+ *
238
+ * The request is executed immediately.
239
+ *
240
+ * If a function is passed as the first argument, it will be used as the callback
241
+ * function.
242
+ *
243
+ * @param { DestinationAlphaSenderListInstancePageOptions } [params] - Options for request
244
+ * @param { function } [callback] - Callback to handle list of records
245
+ */
246
+ page(callback?: (error: Error | null, items: DestinationAlphaSenderPage) => any): Promise<DestinationAlphaSenderPage>;
247
+ page(params: DestinationAlphaSenderListInstancePageOptions, callback?: (error: Error | null, items: DestinationAlphaSenderPage) => any): Promise<DestinationAlphaSenderPage>;
248
+ /**
249
+ * Provide a user-friendly representation
250
+ */
251
+ toJSON(): any;
252
+ [inspect.custom](_depth: any, options: InspectOptions): any;
253
+ }
254
+ export declare function DestinationAlphaSenderListInstance(version: V1, serviceSid: string): DestinationAlphaSenderListInstance;
255
+ export declare class DestinationAlphaSenderPage extends Page<V1, DestinationAlphaSenderPayload, DestinationAlphaSenderResource, DestinationAlphaSenderInstance> {
256
+ /**
257
+ * Initialize the DestinationAlphaSenderPage
258
+ *
259
+ * @param version - Version of the resource
260
+ * @param response - Response from the API
261
+ * @param solution - Path solution
262
+ */
263
+ constructor(version: V1, response: Response<string>, solution: DestinationAlphaSenderSolution);
264
+ /**
265
+ * Build an instance of DestinationAlphaSenderInstance
266
+ *
267
+ * @param payload - Payload response from the API
268
+ */
269
+ getInstance(payload: DestinationAlphaSenderResource): DestinationAlphaSenderInstance;
270
+ [inspect.custom](depth: any, options: InspectOptions): string;
271
+ }
272
+ export {};
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Messaging
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.DestinationAlphaSenderPage = exports.DestinationAlphaSenderListInstance = exports.DestinationAlphaSenderInstance = exports.DestinationAlphaSenderContextImpl = void 0;
20
+ const util_1 = require("util");
21
+ const Page_1 = __importDefault(require("../../../../base/Page"));
22
+ const deserialize = require("../../../../base/deserialize");
23
+ const serialize = require("../../../../base/serialize");
24
+ const utility_1 = require("../../../../base/utility");
25
+ class DestinationAlphaSenderContextImpl {
26
+ constructor(_version, serviceSid, sid) {
27
+ this._version = _version;
28
+ if (!(0, utility_1.isValidPathParam)(serviceSid)) {
29
+ throw new Error("Parameter 'serviceSid' is not valid.");
30
+ }
31
+ if (!(0, utility_1.isValidPathParam)(sid)) {
32
+ throw new Error("Parameter 'sid' is not valid.");
33
+ }
34
+ this._solution = { serviceSid, sid };
35
+ this._uri = `/Services/${serviceSid}/DestinationAlphaSenders/${sid}`;
36
+ }
37
+ remove(callback) {
38
+ const headers = {};
39
+ const instance = this;
40
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
41
+ uri: instance._uri,
42
+ method: "delete",
43
+ headers,
44
+ });
45
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
46
+ return operationPromise;
47
+ }
48
+ fetch(callback) {
49
+ const headers = {};
50
+ headers["Accept"] = "application/json";
51
+ const instance = this;
52
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
53
+ uri: instance._uri,
54
+ method: "get",
55
+ headers,
56
+ });
57
+ operationPromise = operationPromise.then((payload) => new DestinationAlphaSenderInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.sid));
58
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
59
+ return operationPromise;
60
+ }
61
+ /**
62
+ * Provide a user-friendly representation
63
+ *
64
+ * @returns Object
65
+ */
66
+ toJSON() {
67
+ return this._solution;
68
+ }
69
+ [util_1.inspect.custom](_depth, options) {
70
+ return (0, util_1.inspect)(this.toJSON(), options);
71
+ }
72
+ }
73
+ exports.DestinationAlphaSenderContextImpl = DestinationAlphaSenderContextImpl;
74
+ class DestinationAlphaSenderInstance {
75
+ constructor(_version, payload, serviceSid, sid) {
76
+ this._version = _version;
77
+ this.sid = payload.sid;
78
+ this.accountSid = payload.account_sid;
79
+ this.serviceSid = payload.service_sid;
80
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
81
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
82
+ this.alphaSender = payload.alpha_sender;
83
+ this.capabilities = payload.capabilities;
84
+ this.url = payload.url;
85
+ this.isoCountryCode = payload.iso_country_code;
86
+ this._solution = { serviceSid, sid: sid || this.sid };
87
+ }
88
+ get _proxy() {
89
+ this._context =
90
+ this._context ||
91
+ new DestinationAlphaSenderContextImpl(this._version, this._solution.serviceSid, this._solution.sid);
92
+ return this._context;
93
+ }
94
+ /**
95
+ * Remove a DestinationAlphaSenderInstance
96
+ *
97
+ * @param callback - Callback to handle processed record
98
+ *
99
+ * @returns Resolves to processed boolean
100
+ */
101
+ remove(callback) {
102
+ return this._proxy.remove(callback);
103
+ }
104
+ /**
105
+ * Fetch a DestinationAlphaSenderInstance
106
+ *
107
+ * @param callback - Callback to handle processed record
108
+ *
109
+ * @returns Resolves to processed DestinationAlphaSenderInstance
110
+ */
111
+ fetch(callback) {
112
+ return this._proxy.fetch(callback);
113
+ }
114
+ /**
115
+ * Provide a user-friendly representation
116
+ *
117
+ * @returns Object
118
+ */
119
+ toJSON() {
120
+ return {
121
+ sid: this.sid,
122
+ accountSid: this.accountSid,
123
+ serviceSid: this.serviceSid,
124
+ dateCreated: this.dateCreated,
125
+ dateUpdated: this.dateUpdated,
126
+ alphaSender: this.alphaSender,
127
+ capabilities: this.capabilities,
128
+ url: this.url,
129
+ isoCountryCode: this.isoCountryCode,
130
+ };
131
+ }
132
+ [util_1.inspect.custom](_depth, options) {
133
+ return (0, util_1.inspect)(this.toJSON(), options);
134
+ }
135
+ }
136
+ exports.DestinationAlphaSenderInstance = DestinationAlphaSenderInstance;
137
+ function DestinationAlphaSenderListInstance(version, serviceSid) {
138
+ if (!(0, utility_1.isValidPathParam)(serviceSid)) {
139
+ throw new Error("Parameter 'serviceSid' is not valid.");
140
+ }
141
+ const instance = ((sid) => instance.get(sid));
142
+ instance.get = function get(sid) {
143
+ return new DestinationAlphaSenderContextImpl(version, serviceSid, sid);
144
+ };
145
+ instance._version = version;
146
+ instance._solution = { serviceSid };
147
+ instance._uri = `/Services/${serviceSid}/DestinationAlphaSenders`;
148
+ instance.create = function create(params, callback) {
149
+ if (params === null || params === undefined) {
150
+ throw new Error('Required parameter "params" missing.');
151
+ }
152
+ if (params["alphaSender"] === null || params["alphaSender"] === undefined) {
153
+ throw new Error("Required parameter \"params['alphaSender']\" missing.");
154
+ }
155
+ let data = {};
156
+ data["AlphaSender"] = params["alphaSender"];
157
+ if (params["isoCountryCode"] !== undefined)
158
+ data["IsoCountryCode"] = params["isoCountryCode"];
159
+ const headers = {};
160
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
161
+ headers["Accept"] = "application/json";
162
+ let operationVersion = version, operationPromise = operationVersion.create({
163
+ uri: instance._uri,
164
+ method: "post",
165
+ data,
166
+ headers,
167
+ });
168
+ operationPromise = operationPromise.then((payload) => new DestinationAlphaSenderInstance(operationVersion, payload, instance._solution.serviceSid));
169
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
170
+ return operationPromise;
171
+ };
172
+ instance.page = function page(params, callback) {
173
+ if (params instanceof Function) {
174
+ callback = params;
175
+ params = {};
176
+ }
177
+ else {
178
+ params = params || {};
179
+ }
180
+ let data = {};
181
+ if (params["pageSize"] !== undefined)
182
+ data["PageSize"] = params["pageSize"];
183
+ if (params.pageNumber !== undefined)
184
+ data["Page"] = params.pageNumber;
185
+ if (params.pageToken !== undefined)
186
+ data["PageToken"] = params.pageToken;
187
+ const headers = {};
188
+ headers["Accept"] = "application/json";
189
+ let operationVersion = version, operationPromise = operationVersion.page({
190
+ uri: instance._uri,
191
+ method: "get",
192
+ params: data,
193
+ headers,
194
+ });
195
+ operationPromise = operationPromise.then((payload) => new DestinationAlphaSenderPage(operationVersion, payload, instance._solution));
196
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
197
+ return operationPromise;
198
+ };
199
+ instance.each = instance._version.each;
200
+ instance.list = instance._version.list;
201
+ instance.getPage = function getPage(targetUrl, callback) {
202
+ const operationPromise = instance._version._domain.twilio.request({
203
+ method: "get",
204
+ uri: targetUrl,
205
+ });
206
+ let pagePromise = operationPromise.then((payload) => new DestinationAlphaSenderPage(instance._version, payload, instance._solution));
207
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
208
+ return pagePromise;
209
+ };
210
+ instance.toJSON = function toJSON() {
211
+ return instance._solution;
212
+ };
213
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
214
+ return (0, util_1.inspect)(instance.toJSON(), options);
215
+ };
216
+ return instance;
217
+ }
218
+ exports.DestinationAlphaSenderListInstance = DestinationAlphaSenderListInstance;
219
+ class DestinationAlphaSenderPage extends Page_1.default {
220
+ /**
221
+ * Initialize the DestinationAlphaSenderPage
222
+ *
223
+ * @param version - Version of the resource
224
+ * @param response - Response from the API
225
+ * @param solution - Path solution
226
+ */
227
+ constructor(version, response, solution) {
228
+ super(version, response, solution);
229
+ }
230
+ /**
231
+ * Build an instance of DestinationAlphaSenderInstance
232
+ *
233
+ * @param payload - Payload response from the API
234
+ */
235
+ getInstance(payload) {
236
+ return new DestinationAlphaSenderInstance(this._version, payload, this._solution.serviceSid);
237
+ }
238
+ [util_1.inspect.custom](depth, options) {
239
+ return (0, util_1.inspect)(this.toJSON(), options);
240
+ }
241
+ }
242
+ exports.DestinationAlphaSenderPage = DestinationAlphaSenderPage;
@@ -5,6 +5,7 @@ import Response from "../../../http/response";
5
5
  import V1 from "../V1";
6
6
  import { AlphaSenderListInstance } from "./service/alphaSender";
7
7
  import { ChannelSenderListInstance } from "./service/channelSender";
8
+ import { DestinationAlphaSenderListInstance } from "./service/destinationAlphaSender";
8
9
  import { PhoneNumberListInstance } from "./service/phoneNumber";
9
10
  import { ShortCodeListInstance } from "./service/shortCode";
10
11
  import { UsAppToPersonListInstance } from "./service/usAppToPerson";
@@ -120,6 +121,7 @@ export interface ServiceListInstancePageOptions {
120
121
  export interface ServiceContext {
121
122
  alphaSenders: AlphaSenderListInstance;
122
123
  channelSenders: ChannelSenderListInstance;
124
+ destinationAlphaSenders: DestinationAlphaSenderListInstance;
123
125
  phoneNumbers: PhoneNumberListInstance;
124
126
  shortCodes: ShortCodeListInstance;
125
127
  usAppToPerson: UsAppToPersonListInstance;
@@ -172,6 +174,7 @@ export declare class ServiceContextImpl implements ServiceContext {
172
174
  protected _uri: string;
173
175
  protected _alphaSenders?: AlphaSenderListInstance;
174
176
  protected _channelSenders?: ChannelSenderListInstance;
177
+ protected _destinationAlphaSenders?: DestinationAlphaSenderListInstance;
175
178
  protected _phoneNumbers?: PhoneNumberListInstance;
176
179
  protected _shortCodes?: ShortCodeListInstance;
177
180
  protected _usAppToPerson?: UsAppToPersonListInstance;
@@ -179,6 +182,7 @@ export declare class ServiceContextImpl implements ServiceContext {
179
182
  constructor(_version: V1, sid: string);
180
183
  get alphaSenders(): AlphaSenderListInstance;
181
184
  get channelSenders(): ChannelSenderListInstance;
185
+ get destinationAlphaSenders(): DestinationAlphaSenderListInstance;
182
186
  get phoneNumbers(): PhoneNumberListInstance;
183
187
  get shortCodes(): ShortCodeListInstance;
184
188
  get usAppToPerson(): UsAppToPersonListInstance;
@@ -358,6 +362,10 @@ export declare class ServiceInstance {
358
362
  * Access the channelSenders.
359
363
  */
360
364
  channelSenders(): ChannelSenderListInstance;
365
+ /**
366
+ * Access the destinationAlphaSenders.
367
+ */
368
+ destinationAlphaSenders(): DestinationAlphaSenderListInstance;
361
369
  /**
362
370
  * Access the phoneNumbers.
363
371
  */
@@ -24,6 +24,7 @@ const serialize = require("../../../base/serialize");
24
24
  const utility_1 = require("../../../base/utility");
25
25
  const alphaSender_1 = require("./service/alphaSender");
26
26
  const channelSender_1 = require("./service/channelSender");
27
+ const destinationAlphaSender_1 = require("./service/destinationAlphaSender");
27
28
  const phoneNumber_1 = require("./service/phoneNumber");
28
29
  const shortCode_1 = require("./service/shortCode");
29
30
  const usAppToPerson_1 = require("./service/usAppToPerson");
@@ -49,6 +50,12 @@ class ServiceContextImpl {
49
50
  (0, channelSender_1.ChannelSenderListInstance)(this._version, this._solution.sid);
50
51
  return this._channelSenders;
51
52
  }
53
+ get destinationAlphaSenders() {
54
+ this._destinationAlphaSenders =
55
+ this._destinationAlphaSenders ||
56
+ (0, destinationAlphaSender_1.DestinationAlphaSenderListInstance)(this._version, this._solution.sid);
57
+ return this._destinationAlphaSenders;
58
+ }
52
59
  get phoneNumbers() {
53
60
  this._phoneNumbers =
54
61
  this._phoneNumbers ||
@@ -234,6 +241,12 @@ class ServiceInstance {
234
241
  channelSenders() {
235
242
  return this._proxy.channelSenders;
236
243
  }
244
+ /**
245
+ * Access the destinationAlphaSenders.
246
+ */
247
+ destinationAlphaSenders() {
248
+ return this._proxy.destinationAlphaSenders;
249
+ }
237
250
  /**
238
251
  * Access the phoneNumbers.
239
252
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "twilio",
3
3
  "description": "A Twilio helper library",
4
- "version": "5.4.3",
4
+ "version": "5.4.4",
5
5
  "author": "API Team <api@twilio.com>",
6
6
  "contributors": [
7
7
  {
@@ -20,7 +20,7 @@
20
20
  "url": "https://github.com/twilio/twilio-node.git"
21
21
  },
22
22
  "dependencies": {
23
- "axios": "^1.7.4",
23
+ "axios": "^1.7.8",
24
24
  "dayjs": "^1.11.9",
25
25
  "https-proxy-agent": "^5.0.0",
26
26
  "jsonwebtoken": "^9.0.2",