twilio 5.1.0 → 5.2.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 (45) hide show
  1. package/lib/base/BaseTwilio.js +2 -1
  2. package/lib/rest/Marketplace.d.ts +4 -0
  3. package/lib/rest/Marketplace.js +8 -0
  4. package/lib/rest/MarketplaceBase.d.ts +13 -0
  5. package/lib/rest/MarketplaceBase.js +31 -0
  6. package/lib/rest/Twilio.d.ts +5 -0
  7. package/lib/rest/Twilio.js +6 -0
  8. package/lib/rest/api/v2010/account/call.d.ts +1 -1
  9. package/lib/rest/api/v2010/account/message.d.ts +2 -2
  10. package/lib/rest/api/v2010/account/recording.d.ts +1 -1
  11. package/lib/rest/content/v2/content.d.ts +54 -0
  12. package/lib/rest/content/v2/content.js +18 -0
  13. package/lib/rest/content/v2/contentAndApprovals.d.ts +54 -0
  14. package/lib/rest/content/v2/contentAndApprovals.js +18 -0
  15. package/lib/rest/events/v1/eventType.d.ts +12 -0
  16. package/lib/rest/events/v1/eventType.js +4 -0
  17. package/lib/rest/marketplace/V1.d.ts +25 -0
  18. package/lib/rest/marketplace/V1.js +51 -0
  19. package/lib/rest/marketplace/v1/availableAddOn/availableAddOnExtension.d.ts +219 -0
  20. package/lib/rest/marketplace/v1/availableAddOn/availableAddOnExtension.js +187 -0
  21. package/lib/rest/marketplace/v1/availableAddOn.d.ts +231 -0
  22. package/lib/rest/marketplace/v1/availableAddOn.js +196 -0
  23. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnExtension.d.ts +251 -0
  24. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnExtension.js +214 -0
  25. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +84 -0
  26. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +86 -0
  27. package/lib/rest/marketplace/v1/installedAddOn.d.ts +340 -0
  28. package/lib/rest/marketplace/v1/installedAddOn.js +294 -0
  29. package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +147 -0
  30. package/lib/rest/marketplace/v1/moduleDataManagement.js +153 -0
  31. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +13 -1
  32. package/lib/rest/messaging/v1/tollfreeVerification.js +4 -0
  33. package/lib/rest/numbers/V1.d.ts +5 -0
  34. package/lib/rest/numbers/V1.js +8 -0
  35. package/lib/rest/numbers/v1/portingPortIn.d.ts +3 -0
  36. package/lib/rest/numbers/v1/portingPortIn.js +2 -0
  37. package/lib/rest/numbers/v1/portingPortInPhoneNumber.d.ts +24 -6
  38. package/lib/rest/numbers/v1/portingPortInPhoneNumber.js +9 -3
  39. package/lib/rest/numbers/v1/portingPortability.d.ts +0 -12
  40. package/lib/rest/numbers/v1/portingPortability.js +0 -4
  41. package/lib/rest/numbers/v1/signingRequestConfiguration.d.ts +100 -0
  42. package/lib/rest/numbers/v1/signingRequestConfiguration.js +89 -0
  43. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +2 -0
  44. package/lib/rest/trusthub/v1/complianceTollfreeInquiries.js +2 -0
  45. package/package.json +1 -1
@@ -0,0 +1,219 @@
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 each
8
+ */
9
+ export interface AvailableAddOnExtensionListInstanceEachOptions {
10
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
11
+ pageSize?: number;
12
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
13
+ callback?: (item: AvailableAddOnExtensionInstance, done: (err?: Error) => void) => void;
14
+ /** Function to be called upon completion of streaming */
15
+ done?: Function;
16
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
17
+ limit?: number;
18
+ }
19
+ /**
20
+ * Options to pass to list
21
+ */
22
+ export interface AvailableAddOnExtensionListInstanceOptions {
23
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
24
+ pageSize?: number;
25
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
26
+ limit?: number;
27
+ }
28
+ /**
29
+ * Options to pass to page
30
+ */
31
+ export interface AvailableAddOnExtensionListInstancePageOptions {
32
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
33
+ pageSize?: number;
34
+ /** Page Number, this value is simply for client state */
35
+ pageNumber?: number;
36
+ /** PageToken provided by the API */
37
+ pageToken?: string;
38
+ }
39
+ export interface AvailableAddOnExtensionContext {
40
+ /**
41
+ * Fetch a AvailableAddOnExtensionInstance
42
+ *
43
+ * @param callback - Callback to handle processed record
44
+ *
45
+ * @returns Resolves to processed AvailableAddOnExtensionInstance
46
+ */
47
+ fetch(callback?: (error: Error | null, item?: AvailableAddOnExtensionInstance) => any): Promise<AvailableAddOnExtensionInstance>;
48
+ /**
49
+ * Provide a user-friendly representation
50
+ */
51
+ toJSON(): any;
52
+ [inspect.custom](_depth: any, options: InspectOptions): any;
53
+ }
54
+ export interface AvailableAddOnExtensionContextSolution {
55
+ availableAddOnSid: string;
56
+ sid: string;
57
+ }
58
+ export declare class AvailableAddOnExtensionContextImpl implements AvailableAddOnExtensionContext {
59
+ protected _version: V1;
60
+ protected _solution: AvailableAddOnExtensionContextSolution;
61
+ protected _uri: string;
62
+ constructor(_version: V1, availableAddOnSid: string, sid: string);
63
+ fetch(callback?: (error: Error | null, item?: AvailableAddOnExtensionInstance) => any): Promise<AvailableAddOnExtensionInstance>;
64
+ /**
65
+ * Provide a user-friendly representation
66
+ *
67
+ * @returns Object
68
+ */
69
+ toJSON(): AvailableAddOnExtensionContextSolution;
70
+ [inspect.custom](_depth: any, options: InspectOptions): string;
71
+ }
72
+ interface AvailableAddOnExtensionPayload extends TwilioResponsePayload {
73
+ extensions: AvailableAddOnExtensionResource[];
74
+ }
75
+ interface AvailableAddOnExtensionResource {
76
+ sid: string;
77
+ available_add_on_sid: string;
78
+ friendly_name: string;
79
+ product_name: string;
80
+ unique_name: string;
81
+ url: string;
82
+ }
83
+ export declare class AvailableAddOnExtensionInstance {
84
+ protected _version: V1;
85
+ protected _solution: AvailableAddOnExtensionContextSolution;
86
+ protected _context?: AvailableAddOnExtensionContext;
87
+ constructor(_version: V1, payload: AvailableAddOnExtensionResource, availableAddOnSid: string, sid?: string);
88
+ /**
89
+ * The unique string that we created to identify the AvailableAddOnExtension resource.
90
+ */
91
+ sid: string;
92
+ /**
93
+ * The SID of the AvailableAddOn resource to which this extension applies.
94
+ */
95
+ availableAddOnSid: string;
96
+ /**
97
+ * The string that you assigned to describe the resource.
98
+ */
99
+ friendlyName: string;
100
+ /**
101
+ * The name of the Product this Extension is used within.
102
+ */
103
+ productName: string;
104
+ /**
105
+ * An application-defined string that uniquely identifies the resource.
106
+ */
107
+ uniqueName: string;
108
+ /**
109
+ * The absolute URL of the resource.
110
+ */
111
+ url: string;
112
+ private get _proxy();
113
+ /**
114
+ * Fetch a AvailableAddOnExtensionInstance
115
+ *
116
+ * @param callback - Callback to handle processed record
117
+ *
118
+ * @returns Resolves to processed AvailableAddOnExtensionInstance
119
+ */
120
+ fetch(callback?: (error: Error | null, item?: AvailableAddOnExtensionInstance) => any): Promise<AvailableAddOnExtensionInstance>;
121
+ /**
122
+ * Provide a user-friendly representation
123
+ *
124
+ * @returns Object
125
+ */
126
+ toJSON(): {
127
+ sid: string;
128
+ availableAddOnSid: string;
129
+ friendlyName: string;
130
+ productName: string;
131
+ uniqueName: string;
132
+ url: string;
133
+ };
134
+ [inspect.custom](_depth: any, options: InspectOptions): string;
135
+ }
136
+ export interface AvailableAddOnExtensionSolution {
137
+ availableAddOnSid: string;
138
+ }
139
+ export interface AvailableAddOnExtensionListInstance {
140
+ _version: V1;
141
+ _solution: AvailableAddOnExtensionSolution;
142
+ _uri: string;
143
+ (sid: string): AvailableAddOnExtensionContext;
144
+ get(sid: string): AvailableAddOnExtensionContext;
145
+ /**
146
+ * Streams AvailableAddOnExtensionInstance records from the API.
147
+ *
148
+ * This operation lazily loads records as efficiently as possible until the limit
149
+ * is reached.
150
+ *
151
+ * The results are passed into the callback function, so this operation is memory
152
+ * efficient.
153
+ *
154
+ * If a function is passed as the first argument, it will be used as the callback
155
+ * function.
156
+ *
157
+ * @param { AvailableAddOnExtensionListInstanceEachOptions } [params] - Options for request
158
+ * @param { function } [callback] - Function to process each record
159
+ */
160
+ each(callback?: (item: AvailableAddOnExtensionInstance, done: (err?: Error) => void) => void): void;
161
+ each(params: AvailableAddOnExtensionListInstanceEachOptions, callback?: (item: AvailableAddOnExtensionInstance, done: (err?: Error) => void) => void): void;
162
+ /**
163
+ * Retrieve a single target page of AvailableAddOnExtensionInstance records from the API.
164
+ *
165
+ * The request is executed immediately.
166
+ *
167
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
168
+ * @param { function } [callback] - Callback to handle list of records
169
+ */
170
+ getPage(targetUrl: string, callback?: (error: Error | null, items: AvailableAddOnExtensionPage) => any): Promise<AvailableAddOnExtensionPage>;
171
+ /**
172
+ * Lists AvailableAddOnExtensionInstance records from the API as a list.
173
+ *
174
+ * If a function is passed as the first argument, it will be used as the callback
175
+ * function.
176
+ *
177
+ * @param { AvailableAddOnExtensionListInstanceOptions } [params] - Options for request
178
+ * @param { function } [callback] - Callback to handle list of records
179
+ */
180
+ list(callback?: (error: Error | null, items: AvailableAddOnExtensionInstance[]) => any): Promise<AvailableAddOnExtensionInstance[]>;
181
+ list(params: AvailableAddOnExtensionListInstanceOptions, callback?: (error: Error | null, items: AvailableAddOnExtensionInstance[]) => any): Promise<AvailableAddOnExtensionInstance[]>;
182
+ /**
183
+ * Retrieve a single page of AvailableAddOnExtensionInstance records from the API.
184
+ *
185
+ * The request is executed immediately.
186
+ *
187
+ * If a function is passed as the first argument, it will be used as the callback
188
+ * function.
189
+ *
190
+ * @param { AvailableAddOnExtensionListInstancePageOptions } [params] - Options for request
191
+ * @param { function } [callback] - Callback to handle list of records
192
+ */
193
+ page(callback?: (error: Error | null, items: AvailableAddOnExtensionPage) => any): Promise<AvailableAddOnExtensionPage>;
194
+ page(params: AvailableAddOnExtensionListInstancePageOptions, callback?: (error: Error | null, items: AvailableAddOnExtensionPage) => any): Promise<AvailableAddOnExtensionPage>;
195
+ /**
196
+ * Provide a user-friendly representation
197
+ */
198
+ toJSON(): any;
199
+ [inspect.custom](_depth: any, options: InspectOptions): any;
200
+ }
201
+ export declare function AvailableAddOnExtensionListInstance(version: V1, availableAddOnSid: string): AvailableAddOnExtensionListInstance;
202
+ export declare class AvailableAddOnExtensionPage extends Page<V1, AvailableAddOnExtensionPayload, AvailableAddOnExtensionResource, AvailableAddOnExtensionInstance> {
203
+ /**
204
+ * Initialize the AvailableAddOnExtensionPage
205
+ *
206
+ * @param version - Version of the resource
207
+ * @param response - Response from the API
208
+ * @param solution - Path solution
209
+ */
210
+ constructor(version: V1, response: Response<string>, solution: AvailableAddOnExtensionSolution);
211
+ /**
212
+ * Build an instance of AvailableAddOnExtensionInstance
213
+ *
214
+ * @param payload - Payload response from the API
215
+ */
216
+ getInstance(payload: AvailableAddOnExtensionResource): AvailableAddOnExtensionInstance;
217
+ [inspect.custom](depth: any, options: InspectOptions): string;
218
+ }
219
+ export {};
@@ -0,0 +1,187 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Marketplace
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.AvailableAddOnExtensionPage = exports.AvailableAddOnExtensionListInstance = exports.AvailableAddOnExtensionInstance = exports.AvailableAddOnExtensionContextImpl = 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 AvailableAddOnExtensionContextImpl {
26
+ constructor(_version, availableAddOnSid, sid) {
27
+ this._version = _version;
28
+ if (!(0, utility_1.isValidPathParam)(availableAddOnSid)) {
29
+ throw new Error("Parameter 'availableAddOnSid' is not valid.");
30
+ }
31
+ if (!(0, utility_1.isValidPathParam)(sid)) {
32
+ throw new Error("Parameter 'sid' is not valid.");
33
+ }
34
+ this._solution = { availableAddOnSid, sid };
35
+ this._uri = `/AvailableAddOns/${availableAddOnSid}/Extensions/${sid}`;
36
+ }
37
+ fetch(callback) {
38
+ const instance = this;
39
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
40
+ uri: instance._uri,
41
+ method: "get",
42
+ });
43
+ operationPromise = operationPromise.then((payload) => new AvailableAddOnExtensionInstance(operationVersion, payload, instance._solution.availableAddOnSid, instance._solution.sid));
44
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
45
+ return operationPromise;
46
+ }
47
+ /**
48
+ * Provide a user-friendly representation
49
+ *
50
+ * @returns Object
51
+ */
52
+ toJSON() {
53
+ return this._solution;
54
+ }
55
+ [util_1.inspect.custom](_depth, options) {
56
+ return (0, util_1.inspect)(this.toJSON(), options);
57
+ }
58
+ }
59
+ exports.AvailableAddOnExtensionContextImpl = AvailableAddOnExtensionContextImpl;
60
+ class AvailableAddOnExtensionInstance {
61
+ constructor(_version, payload, availableAddOnSid, sid) {
62
+ this._version = _version;
63
+ this.sid = payload.sid;
64
+ this.availableAddOnSid = payload.available_add_on_sid;
65
+ this.friendlyName = payload.friendly_name;
66
+ this.productName = payload.product_name;
67
+ this.uniqueName = payload.unique_name;
68
+ this.url = payload.url;
69
+ this._solution = { availableAddOnSid, sid: sid || this.sid };
70
+ }
71
+ get _proxy() {
72
+ this._context =
73
+ this._context ||
74
+ new AvailableAddOnExtensionContextImpl(this._version, this._solution.availableAddOnSid, this._solution.sid);
75
+ return this._context;
76
+ }
77
+ /**
78
+ * Fetch a AvailableAddOnExtensionInstance
79
+ *
80
+ * @param callback - Callback to handle processed record
81
+ *
82
+ * @returns Resolves to processed AvailableAddOnExtensionInstance
83
+ */
84
+ fetch(callback) {
85
+ return this._proxy.fetch(callback);
86
+ }
87
+ /**
88
+ * Provide a user-friendly representation
89
+ *
90
+ * @returns Object
91
+ */
92
+ toJSON() {
93
+ return {
94
+ sid: this.sid,
95
+ availableAddOnSid: this.availableAddOnSid,
96
+ friendlyName: this.friendlyName,
97
+ productName: this.productName,
98
+ uniqueName: this.uniqueName,
99
+ url: this.url,
100
+ };
101
+ }
102
+ [util_1.inspect.custom](_depth, options) {
103
+ return (0, util_1.inspect)(this.toJSON(), options);
104
+ }
105
+ }
106
+ exports.AvailableAddOnExtensionInstance = AvailableAddOnExtensionInstance;
107
+ function AvailableAddOnExtensionListInstance(version, availableAddOnSid) {
108
+ if (!(0, utility_1.isValidPathParam)(availableAddOnSid)) {
109
+ throw new Error("Parameter 'availableAddOnSid' is not valid.");
110
+ }
111
+ const instance = ((sid) => instance.get(sid));
112
+ instance.get = function get(sid) {
113
+ return new AvailableAddOnExtensionContextImpl(version, availableAddOnSid, sid);
114
+ };
115
+ instance._version = version;
116
+ instance._solution = { availableAddOnSid };
117
+ instance._uri = `/AvailableAddOns/${availableAddOnSid}/Extensions`;
118
+ instance.page = function page(params, callback) {
119
+ if (params instanceof Function) {
120
+ callback = params;
121
+ params = {};
122
+ }
123
+ else {
124
+ params = params || {};
125
+ }
126
+ let data = {};
127
+ if (params["pageSize"] !== undefined)
128
+ data["PageSize"] = params["pageSize"];
129
+ if (params.pageNumber !== undefined)
130
+ data["Page"] = params.pageNumber;
131
+ if (params.pageToken !== undefined)
132
+ data["PageToken"] = params.pageToken;
133
+ const headers = {};
134
+ let operationVersion = version, operationPromise = operationVersion.page({
135
+ uri: instance._uri,
136
+ method: "get",
137
+ params: data,
138
+ headers,
139
+ });
140
+ operationPromise = operationPromise.then((payload) => new AvailableAddOnExtensionPage(operationVersion, payload, instance._solution));
141
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
142
+ return operationPromise;
143
+ };
144
+ instance.each = instance._version.each;
145
+ instance.list = instance._version.list;
146
+ instance.getPage = function getPage(targetUrl, callback) {
147
+ const operationPromise = instance._version._domain.twilio.request({
148
+ method: "get",
149
+ uri: targetUrl,
150
+ });
151
+ let pagePromise = operationPromise.then((payload) => new AvailableAddOnExtensionPage(instance._version, payload, instance._solution));
152
+ pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
153
+ return pagePromise;
154
+ };
155
+ instance.toJSON = function toJSON() {
156
+ return instance._solution;
157
+ };
158
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
159
+ return (0, util_1.inspect)(instance.toJSON(), options);
160
+ };
161
+ return instance;
162
+ }
163
+ exports.AvailableAddOnExtensionListInstance = AvailableAddOnExtensionListInstance;
164
+ class AvailableAddOnExtensionPage extends Page_1.default {
165
+ /**
166
+ * Initialize the AvailableAddOnExtensionPage
167
+ *
168
+ * @param version - Version of the resource
169
+ * @param response - Response from the API
170
+ * @param solution - Path solution
171
+ */
172
+ constructor(version, response, solution) {
173
+ super(version, response, solution);
174
+ }
175
+ /**
176
+ * Build an instance of AvailableAddOnExtensionInstance
177
+ *
178
+ * @param payload - Payload response from the API
179
+ */
180
+ getInstance(payload) {
181
+ return new AvailableAddOnExtensionInstance(this._version, payload, this._solution.availableAddOnSid);
182
+ }
183
+ [util_1.inspect.custom](depth, options) {
184
+ return (0, util_1.inspect)(this.toJSON(), options);
185
+ }
186
+ }
187
+ exports.AvailableAddOnExtensionPage = AvailableAddOnExtensionPage;
@@ -0,0 +1,231 @@
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
+ import { AvailableAddOnExtensionListInstance } from "./availableAddOn/availableAddOnExtension";
7
+ /**
8
+ * Options to pass to each
9
+ */
10
+ export interface AvailableAddOnListInstanceEachOptions {
11
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
12
+ pageSize?: number;
13
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
14
+ callback?: (item: AvailableAddOnInstance, done: (err?: Error) => void) => void;
15
+ /** Function to be called upon completion of streaming */
16
+ done?: Function;
17
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
18
+ limit?: number;
19
+ }
20
+ /**
21
+ * Options to pass to list
22
+ */
23
+ export interface AvailableAddOnListInstanceOptions {
24
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
25
+ pageSize?: number;
26
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
27
+ limit?: number;
28
+ }
29
+ /**
30
+ * Options to pass to page
31
+ */
32
+ export interface AvailableAddOnListInstancePageOptions {
33
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
34
+ pageSize?: number;
35
+ /** Page Number, this value is simply for client state */
36
+ pageNumber?: number;
37
+ /** PageToken provided by the API */
38
+ pageToken?: string;
39
+ }
40
+ export interface AvailableAddOnContext {
41
+ extensions: AvailableAddOnExtensionListInstance;
42
+ /**
43
+ * Fetch a AvailableAddOnInstance
44
+ *
45
+ * @param callback - Callback to handle processed record
46
+ *
47
+ * @returns Resolves to processed AvailableAddOnInstance
48
+ */
49
+ fetch(callback?: (error: Error | null, item?: AvailableAddOnInstance) => any): Promise<AvailableAddOnInstance>;
50
+ /**
51
+ * Provide a user-friendly representation
52
+ */
53
+ toJSON(): any;
54
+ [inspect.custom](_depth: any, options: InspectOptions): any;
55
+ }
56
+ export interface AvailableAddOnContextSolution {
57
+ sid: string;
58
+ }
59
+ export declare class AvailableAddOnContextImpl implements AvailableAddOnContext {
60
+ protected _version: V1;
61
+ protected _solution: AvailableAddOnContextSolution;
62
+ protected _uri: string;
63
+ protected _extensions?: AvailableAddOnExtensionListInstance;
64
+ constructor(_version: V1, sid: string);
65
+ get extensions(): AvailableAddOnExtensionListInstance;
66
+ fetch(callback?: (error: Error | null, item?: AvailableAddOnInstance) => any): Promise<AvailableAddOnInstance>;
67
+ /**
68
+ * Provide a user-friendly representation
69
+ *
70
+ * @returns Object
71
+ */
72
+ toJSON(): AvailableAddOnContextSolution;
73
+ [inspect.custom](_depth: any, options: InspectOptions): string;
74
+ }
75
+ interface AvailableAddOnPayload extends TwilioResponsePayload {
76
+ available_add_ons: AvailableAddOnResource[];
77
+ }
78
+ interface AvailableAddOnResource {
79
+ sid: string;
80
+ friendly_name: string;
81
+ description: string;
82
+ pricing_type: string;
83
+ configuration_schema: any;
84
+ url: string;
85
+ links: Record<string, string>;
86
+ }
87
+ export declare class AvailableAddOnInstance {
88
+ protected _version: V1;
89
+ protected _solution: AvailableAddOnContextSolution;
90
+ protected _context?: AvailableAddOnContext;
91
+ constructor(_version: V1, payload: AvailableAddOnResource, sid?: string);
92
+ /**
93
+ * The unique string that we created to identify the AvailableAddOn resource.
94
+ */
95
+ sid: string;
96
+ /**
97
+ * The string that you assigned to describe the resource.
98
+ */
99
+ friendlyName: string;
100
+ /**
101
+ * A short description of the Add-on\'s functionality.
102
+ */
103
+ description: string;
104
+ /**
105
+ * How customers are charged for using this Add-on.
106
+ */
107
+ pricingType: string;
108
+ /**
109
+ * The JSON object with the configuration that must be provided when installing a given Add-on.
110
+ */
111
+ configurationSchema: any;
112
+ /**
113
+ * The absolute URL of the resource.
114
+ */
115
+ url: string;
116
+ /**
117
+ * The URLs of related resources.
118
+ */
119
+ links: Record<string, string>;
120
+ private get _proxy();
121
+ /**
122
+ * Fetch a AvailableAddOnInstance
123
+ *
124
+ * @param callback - Callback to handle processed record
125
+ *
126
+ * @returns Resolves to processed AvailableAddOnInstance
127
+ */
128
+ fetch(callback?: (error: Error | null, item?: AvailableAddOnInstance) => any): Promise<AvailableAddOnInstance>;
129
+ /**
130
+ * Access the extensions.
131
+ */
132
+ extensions(): AvailableAddOnExtensionListInstance;
133
+ /**
134
+ * Provide a user-friendly representation
135
+ *
136
+ * @returns Object
137
+ */
138
+ toJSON(): {
139
+ sid: string;
140
+ friendlyName: string;
141
+ description: string;
142
+ pricingType: string;
143
+ configurationSchema: any;
144
+ url: string;
145
+ links: Record<string, string>;
146
+ };
147
+ [inspect.custom](_depth: any, options: InspectOptions): string;
148
+ }
149
+ export interface AvailableAddOnSolution {
150
+ }
151
+ export interface AvailableAddOnListInstance {
152
+ _version: V1;
153
+ _solution: AvailableAddOnSolution;
154
+ _uri: string;
155
+ (sid: string): AvailableAddOnContext;
156
+ get(sid: string): AvailableAddOnContext;
157
+ /**
158
+ * Streams AvailableAddOnInstance records from the API.
159
+ *
160
+ * This operation lazily loads records as efficiently as possible until the limit
161
+ * is reached.
162
+ *
163
+ * The results are passed into the callback function, so this operation is memory
164
+ * efficient.
165
+ *
166
+ * If a function is passed as the first argument, it will be used as the callback
167
+ * function.
168
+ *
169
+ * @param { AvailableAddOnListInstanceEachOptions } [params] - Options for request
170
+ * @param { function } [callback] - Function to process each record
171
+ */
172
+ each(callback?: (item: AvailableAddOnInstance, done: (err?: Error) => void) => void): void;
173
+ each(params: AvailableAddOnListInstanceEachOptions, callback?: (item: AvailableAddOnInstance, done: (err?: Error) => void) => void): void;
174
+ /**
175
+ * Retrieve a single target page of AvailableAddOnInstance records from the API.
176
+ *
177
+ * The request is executed immediately.
178
+ *
179
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
180
+ * @param { function } [callback] - Callback to handle list of records
181
+ */
182
+ getPage(targetUrl: string, callback?: (error: Error | null, items: AvailableAddOnPage) => any): Promise<AvailableAddOnPage>;
183
+ /**
184
+ * Lists AvailableAddOnInstance records from the API as a list.
185
+ *
186
+ * If a function is passed as the first argument, it will be used as the callback
187
+ * function.
188
+ *
189
+ * @param { AvailableAddOnListInstanceOptions } [params] - Options for request
190
+ * @param { function } [callback] - Callback to handle list of records
191
+ */
192
+ list(callback?: (error: Error | null, items: AvailableAddOnInstance[]) => any): Promise<AvailableAddOnInstance[]>;
193
+ list(params: AvailableAddOnListInstanceOptions, callback?: (error: Error | null, items: AvailableAddOnInstance[]) => any): Promise<AvailableAddOnInstance[]>;
194
+ /**
195
+ * Retrieve a single page of AvailableAddOnInstance records from the API.
196
+ *
197
+ * The request is executed immediately.
198
+ *
199
+ * If a function is passed as the first argument, it will be used as the callback
200
+ * function.
201
+ *
202
+ * @param { AvailableAddOnListInstancePageOptions } [params] - Options for request
203
+ * @param { function } [callback] - Callback to handle list of records
204
+ */
205
+ page(callback?: (error: Error | null, items: AvailableAddOnPage) => any): Promise<AvailableAddOnPage>;
206
+ page(params: AvailableAddOnListInstancePageOptions, callback?: (error: Error | null, items: AvailableAddOnPage) => any): Promise<AvailableAddOnPage>;
207
+ /**
208
+ * Provide a user-friendly representation
209
+ */
210
+ toJSON(): any;
211
+ [inspect.custom](_depth: any, options: InspectOptions): any;
212
+ }
213
+ export declare function AvailableAddOnListInstance(version: V1): AvailableAddOnListInstance;
214
+ export declare class AvailableAddOnPage extends Page<V1, AvailableAddOnPayload, AvailableAddOnResource, AvailableAddOnInstance> {
215
+ /**
216
+ * Initialize the AvailableAddOnPage
217
+ *
218
+ * @param version - Version of the resource
219
+ * @param response - Response from the API
220
+ * @param solution - Path solution
221
+ */
222
+ constructor(version: V1, response: Response<string>, solution: AvailableAddOnSolution);
223
+ /**
224
+ * Build an instance of AvailableAddOnInstance
225
+ *
226
+ * @param payload - Payload response from the API
227
+ */
228
+ getInstance(payload: AvailableAddOnResource): AvailableAddOnInstance;
229
+ [inspect.custom](depth: any, options: InspectOptions): string;
230
+ }
231
+ export {};