twilio 5.3.0 → 5.3.1

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 (34) hide show
  1. package/lib/rest/Assistants.d.ts +4 -0
  2. package/lib/rest/Assistants.js +8 -0
  3. package/lib/rest/AssistantsBase.d.ts +13 -0
  4. package/lib/rest/AssistantsBase.js +31 -0
  5. package/lib/rest/Twilio.d.ts +5 -0
  6. package/lib/rest/Twilio.js +6 -0
  7. package/lib/rest/assistants/V1.d.ts +35 -0
  8. package/lib/rest/assistants/V1.js +60 -0
  9. package/lib/rest/assistants/v1/assistant/feedback.d.ts +231 -0
  10. package/lib/rest/assistants/v1/assistant/feedback.js +161 -0
  11. package/lib/rest/assistants/v1/assistant.d.ts +466 -0
  12. package/lib/rest/assistants/v1/assistant.js +284 -0
  13. package/lib/rest/assistants/v1/knowledge/chunk.d.ts +167 -0
  14. package/lib/rest/assistants/v1/knowledge/chunk.js +130 -0
  15. package/lib/rest/assistants/v1/knowledge.d.ts +385 -0
  16. package/lib/rest/assistants/v1/knowledge.js +273 -0
  17. package/lib/rest/assistants/v1/policy.d.ts +202 -0
  18. package/lib/rest/assistants/v1/policy.js +138 -0
  19. package/lib/rest/assistants/v1/session/message.d.ts +197 -0
  20. package/lib/rest/assistants/v1/session/message.js +140 -0
  21. package/lib/rest/assistants/v1/session.d.ts +231 -0
  22. package/lib/rest/assistants/v1/session.js +194 -0
  23. package/lib/rest/assistants/v1/tool.d.ts +378 -0
  24. package/lib/rest/assistants/v1/tool.js +242 -0
  25. package/lib/rest/content/v1/content/approvalFetch.d.ts +5 -5
  26. package/lib/rest/content/v1/content/approvalFetch.js +14 -14
  27. package/lib/rest/intelligence/v2/operatorType.d.ts +1 -1
  28. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +12 -18
  29. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +3 -6
  30. package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +14 -6
  31. package/lib/rest/marketplace/v1/moduleDataManagement.js +4 -0
  32. package/lib/rest/numbers/v2/bundleClone.d.ts +1 -1
  33. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
  34. package/package.json +1 -1
@@ -0,0 +1,378 @@
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
+ export declare class AssistantsV1ServiceCreatePolicyRequest {
7
+ /**
8
+ * The description of the policy.
9
+ */
10
+ "description"?: string;
11
+ /**
12
+ * The Policy ID.
13
+ */
14
+ "id"?: string;
15
+ /**
16
+ * The name of the policy.
17
+ */
18
+ "name"?: string;
19
+ "policyDetails": any | null;
20
+ /**
21
+ * The description of the policy.
22
+ */
23
+ "type"?: string;
24
+ }
25
+ export declare class AssistantsV1ServiceCreateToolRequest {
26
+ /**
27
+ * The Assistant ID.
28
+ */
29
+ "assistantId"?: string;
30
+ /**
31
+ * The description of the tool.
32
+ */
33
+ "description"?: string;
34
+ /**
35
+ * True if the tool is enabled.
36
+ */
37
+ "enabled": boolean;
38
+ /**
39
+ * The metadata related to method, url, input_schema to used with the Tool.
40
+ */
41
+ "meta"?: Record<string, object>;
42
+ /**
43
+ * The name of the tool.
44
+ */
45
+ "name": string;
46
+ "policy"?: AssistantsV1ServiceCreatePolicyRequest;
47
+ /**
48
+ * The description of the tool.
49
+ */
50
+ "type": string;
51
+ }
52
+ export declare class AssistantsV1ServiceUpdateToolRequest {
53
+ /**
54
+ * The Assistant ID.
55
+ */
56
+ "assistantId"?: string;
57
+ /**
58
+ * The description of the tool.
59
+ */
60
+ "description"?: string;
61
+ /**
62
+ * True if the tool is enabled.
63
+ */
64
+ "enabled"?: boolean;
65
+ /**
66
+ * The metadata related to method, url, input_schema to used with the Tool.
67
+ */
68
+ "meta"?: Record<string, object>;
69
+ /**
70
+ * The name of the tool.
71
+ */
72
+ "name"?: string;
73
+ "policy"?: AssistantsV1ServiceCreatePolicyRequest;
74
+ /**
75
+ * The type of the tool.
76
+ */
77
+ "type"?: string;
78
+ }
79
+ /**
80
+ * Options to pass to update a ToolInstance
81
+ */
82
+ export interface ToolContextUpdateOptions {
83
+ /** */
84
+ assistantsV1ServiceUpdateToolRequest?: AssistantsV1ServiceUpdateToolRequest;
85
+ }
86
+ /**
87
+ * Options to pass to create a ToolInstance
88
+ */
89
+ export interface ToolListInstanceCreateOptions {
90
+ /** */
91
+ assistantsV1ServiceCreateToolRequest: AssistantsV1ServiceCreateToolRequest;
92
+ }
93
+ /**
94
+ * Options to pass to each
95
+ */
96
+ export interface ToolListInstanceEachOptions {
97
+ /** */
98
+ assistantId?: string;
99
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
100
+ pageSize?: number;
101
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
102
+ callback?: (item: ToolInstance, done: (err?: Error) => void) => void;
103
+ /** Function to be called upon completion of streaming */
104
+ done?: Function;
105
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
106
+ limit?: number;
107
+ }
108
+ /**
109
+ * Options to pass to list
110
+ */
111
+ export interface ToolListInstanceOptions {
112
+ /** */
113
+ assistantId?: string;
114
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
115
+ pageSize?: number;
116
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
117
+ limit?: number;
118
+ }
119
+ /**
120
+ * Options to pass to page
121
+ */
122
+ export interface ToolListInstancePageOptions {
123
+ /** */
124
+ assistantId?: string;
125
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
126
+ pageSize?: number;
127
+ /** Page Number, this value is simply for client state */
128
+ pageNumber?: number;
129
+ /** PageToken provided by the API */
130
+ pageToken?: string;
131
+ }
132
+ export interface ToolContext {
133
+ /**
134
+ * Remove a ToolInstance
135
+ *
136
+ * @param callback - Callback to handle processed record
137
+ *
138
+ * @returns Resolves to processed boolean
139
+ */
140
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
141
+ /**
142
+ * Update a ToolInstance
143
+ *
144
+ * @param callback - Callback to handle processed record
145
+ *
146
+ * @returns Resolves to processed ToolInstance
147
+ */
148
+ update(callback?: (error: Error | null, item?: ToolInstance) => any): Promise<ToolInstance>;
149
+ /**
150
+ * Update a ToolInstance
151
+ *
152
+ * @param params - Body for request
153
+ * @param callback - Callback to handle processed record
154
+ *
155
+ * @returns Resolves to processed ToolInstance
156
+ */
157
+ update(params: AssistantsV1ServiceUpdateToolRequest, callback?: (error: Error | null, item?: ToolInstance) => any): Promise<ToolInstance>;
158
+ /**
159
+ * Provide a user-friendly representation
160
+ */
161
+ toJSON(): any;
162
+ [inspect.custom](_depth: any, options: InspectOptions): any;
163
+ }
164
+ export interface ToolContextSolution {
165
+ id: string;
166
+ }
167
+ export declare class ToolContextImpl implements ToolContext {
168
+ protected _version: V1;
169
+ protected _solution: ToolContextSolution;
170
+ protected _uri: string;
171
+ constructor(_version: V1, id: string);
172
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
173
+ update(params?: AssistantsV1ServiceUpdateToolRequest | ((error: Error | null, item?: ToolInstance) => any), callback?: (error: Error | null, item?: ToolInstance) => any): Promise<ToolInstance>;
174
+ /**
175
+ * Provide a user-friendly representation
176
+ *
177
+ * @returns Object
178
+ */
179
+ toJSON(): ToolContextSolution;
180
+ [inspect.custom](_depth: any, options: InspectOptions): string;
181
+ }
182
+ interface ToolPayload extends TwilioResponsePayload {
183
+ tools: ToolResource[];
184
+ }
185
+ interface ToolResource {
186
+ account_sid: string;
187
+ description: string;
188
+ enabled: boolean;
189
+ id: string;
190
+ meta: Record<string, object>;
191
+ name: string;
192
+ requires_auth: boolean;
193
+ type: string;
194
+ date_created: Date;
195
+ date_updated: Date;
196
+ }
197
+ export declare class ToolInstance {
198
+ protected _version: V1;
199
+ protected _solution: ToolContextSolution;
200
+ protected _context?: ToolContext;
201
+ constructor(_version: V1, payload: ToolResource, id?: string);
202
+ /**
203
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource.
204
+ */
205
+ accountSid: string;
206
+ /**
207
+ * The description of the tool.
208
+ */
209
+ description: string;
210
+ /**
211
+ * True if the tool is enabled.
212
+ */
213
+ enabled: boolean;
214
+ /**
215
+ * The tool ID.
216
+ */
217
+ id: string;
218
+ /**
219
+ * The metadata related to method, url, input_schema to used with the Tool.
220
+ */
221
+ meta: Record<string, object>;
222
+ /**
223
+ * The name of the tool.
224
+ */
225
+ name: string;
226
+ /**
227
+ * The authentication requirement for the tool.
228
+ */
229
+ requiresAuth: boolean;
230
+ /**
231
+ * The type of the tool. (\'WEBHOOK\')
232
+ */
233
+ type: string;
234
+ /**
235
+ * The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
236
+ */
237
+ dateCreated: Date;
238
+ /**
239
+ * The date and time in GMT when the Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
240
+ */
241
+ dateUpdated: Date;
242
+ private get _proxy();
243
+ /**
244
+ * Remove a ToolInstance
245
+ *
246
+ * @param callback - Callback to handle processed record
247
+ *
248
+ * @returns Resolves to processed boolean
249
+ */
250
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
251
+ /**
252
+ * Update a ToolInstance
253
+ *
254
+ * @param callback - Callback to handle processed record
255
+ *
256
+ * @returns Resolves to processed ToolInstance
257
+ */
258
+ update(callback?: (error: Error | null, item?: ToolInstance) => any): Promise<ToolInstance>;
259
+ /**
260
+ * Update a ToolInstance
261
+ *
262
+ * @param params - Body for request
263
+ * @param callback - Callback to handle processed record
264
+ *
265
+ * @returns Resolves to processed ToolInstance
266
+ */
267
+ update(params: AssistantsV1ServiceUpdateToolRequest, callback?: (error: Error | null, item?: ToolInstance) => any): Promise<ToolInstance>;
268
+ /**
269
+ * Provide a user-friendly representation
270
+ *
271
+ * @returns Object
272
+ */
273
+ toJSON(): {
274
+ accountSid: string;
275
+ description: string;
276
+ enabled: boolean;
277
+ id: string;
278
+ meta: Record<string, object>;
279
+ name: string;
280
+ requiresAuth: boolean;
281
+ type: string;
282
+ dateCreated: Date;
283
+ dateUpdated: Date;
284
+ };
285
+ [inspect.custom](_depth: any, options: InspectOptions): string;
286
+ }
287
+ export interface ToolSolution {
288
+ }
289
+ export interface ToolListInstance {
290
+ _version: V1;
291
+ _solution: ToolSolution;
292
+ _uri: string;
293
+ (id: string): ToolContext;
294
+ get(id: string): ToolContext;
295
+ /**
296
+ * Create a ToolInstance
297
+ *
298
+ * @param params - Body for request
299
+ * @param callback - Callback to handle processed record
300
+ *
301
+ * @returns Resolves to processed ToolInstance
302
+ */
303
+ create(params: AssistantsV1ServiceCreateToolRequest, callback?: (error: Error | null, item?: ToolInstance) => any): Promise<ToolInstance>;
304
+ /**
305
+ * Streams ToolInstance records from the API.
306
+ *
307
+ * This operation lazily loads records as efficiently as possible until the limit
308
+ * is reached.
309
+ *
310
+ * The results are passed into the callback function, so this operation is memory
311
+ * efficient.
312
+ *
313
+ * If a function is passed as the first argument, it will be used as the callback
314
+ * function.
315
+ *
316
+ * @param { ToolListInstanceEachOptions } [params] - Options for request
317
+ * @param { function } [callback] - Function to process each record
318
+ */
319
+ each(callback?: (item: ToolInstance, done: (err?: Error) => void) => void): void;
320
+ each(params: ToolListInstanceEachOptions, callback?: (item: ToolInstance, done: (err?: Error) => void) => void): void;
321
+ /**
322
+ * Retrieve a single target page of ToolInstance records from the API.
323
+ *
324
+ * The request is executed immediately.
325
+ *
326
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
327
+ * @param { function } [callback] - Callback to handle list of records
328
+ */
329
+ getPage(targetUrl: string, callback?: (error: Error | null, items: ToolPage) => any): Promise<ToolPage>;
330
+ /**
331
+ * Lists ToolInstance records from the API as a list.
332
+ *
333
+ * If a function is passed as the first argument, it will be used as the callback
334
+ * function.
335
+ *
336
+ * @param { ToolListInstanceOptions } [params] - Options for request
337
+ * @param { function } [callback] - Callback to handle list of records
338
+ */
339
+ list(callback?: (error: Error | null, items: ToolInstance[]) => any): Promise<ToolInstance[]>;
340
+ list(params: ToolListInstanceOptions, callback?: (error: Error | null, items: ToolInstance[]) => any): Promise<ToolInstance[]>;
341
+ /**
342
+ * Retrieve a single page of ToolInstance records from the API.
343
+ *
344
+ * The request is executed immediately.
345
+ *
346
+ * If a function is passed as the first argument, it will be used as the callback
347
+ * function.
348
+ *
349
+ * @param { ToolListInstancePageOptions } [params] - Options for request
350
+ * @param { function } [callback] - Callback to handle list of records
351
+ */
352
+ page(callback?: (error: Error | null, items: ToolPage) => any): Promise<ToolPage>;
353
+ page(params: ToolListInstancePageOptions, callback?: (error: Error | null, items: ToolPage) => any): Promise<ToolPage>;
354
+ /**
355
+ * Provide a user-friendly representation
356
+ */
357
+ toJSON(): any;
358
+ [inspect.custom](_depth: any, options: InspectOptions): any;
359
+ }
360
+ export declare function ToolListInstance(version: V1): ToolListInstance;
361
+ export declare class ToolPage extends Page<V1, ToolPayload, ToolResource, ToolInstance> {
362
+ /**
363
+ * Initialize the ToolPage
364
+ *
365
+ * @param version - Version of the resource
366
+ * @param response - Response from the API
367
+ * @param solution - Path solution
368
+ */
369
+ constructor(version: V1, response: Response<string>, solution: ToolSolution);
370
+ /**
371
+ * Build an instance of ToolInstance
372
+ *
373
+ * @param payload - Payload response from the API
374
+ */
375
+ getInstance(payload: ToolResource): ToolInstance;
376
+ [inspect.custom](depth: any, options: InspectOptions): string;
377
+ }
378
+ export {};
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Assistants
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.ToolPage = exports.ToolListInstance = exports.ToolInstance = exports.ToolContextImpl = exports.AssistantsV1ServiceUpdateToolRequest = exports.AssistantsV1ServiceCreateToolRequest = exports.AssistantsV1ServiceCreatePolicyRequest = 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 AssistantsV1ServiceCreatePolicyRequest {
26
+ }
27
+ exports.AssistantsV1ServiceCreatePolicyRequest = AssistantsV1ServiceCreatePolicyRequest;
28
+ class AssistantsV1ServiceCreateToolRequest {
29
+ }
30
+ exports.AssistantsV1ServiceCreateToolRequest = AssistantsV1ServiceCreateToolRequest;
31
+ class AssistantsV1ServiceUpdateToolRequest {
32
+ }
33
+ exports.AssistantsV1ServiceUpdateToolRequest = AssistantsV1ServiceUpdateToolRequest;
34
+ class ToolContextImpl {
35
+ constructor(_version, id) {
36
+ this._version = _version;
37
+ if (!(0, utility_1.isValidPathParam)(id)) {
38
+ throw new Error("Parameter 'id' is not valid.");
39
+ }
40
+ this._solution = { id };
41
+ this._uri = `/Tools/${id}`;
42
+ }
43
+ remove(callback) {
44
+ const instance = this;
45
+ let operationVersion = instance._version, operationPromise = operationVersion.remove({
46
+ uri: instance._uri,
47
+ method: "delete",
48
+ });
49
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
50
+ return operationPromise;
51
+ }
52
+ update(params, callback) {
53
+ if (params instanceof Function) {
54
+ callback = params;
55
+ params = {};
56
+ }
57
+ else {
58
+ params = params || {};
59
+ }
60
+ let data = {};
61
+ data = params;
62
+ const headers = {};
63
+ headers["Content-Type"] = "application/json";
64
+ const instance = this;
65
+ let operationVersion = instance._version, operationPromise = operationVersion.update({
66
+ uri: instance._uri,
67
+ method: "put",
68
+ data,
69
+ headers,
70
+ });
71
+ operationPromise = operationPromise.then((payload) => new ToolInstance(operationVersion, payload, instance._solution.id));
72
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
73
+ return operationPromise;
74
+ }
75
+ /**
76
+ * Provide a user-friendly representation
77
+ *
78
+ * @returns Object
79
+ */
80
+ toJSON() {
81
+ return this._solution;
82
+ }
83
+ [util_1.inspect.custom](_depth, options) {
84
+ return (0, util_1.inspect)(this.toJSON(), options);
85
+ }
86
+ }
87
+ exports.ToolContextImpl = ToolContextImpl;
88
+ class ToolInstance {
89
+ constructor(_version, payload, id) {
90
+ this._version = _version;
91
+ this.accountSid = payload.account_sid;
92
+ this.description = payload.description;
93
+ this.enabled = payload.enabled;
94
+ this.id = payload.id;
95
+ this.meta = payload.meta;
96
+ this.name = payload.name;
97
+ this.requiresAuth = payload.requires_auth;
98
+ this.type = payload.type;
99
+ this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
100
+ this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
101
+ this._solution = { id: id || this.id };
102
+ }
103
+ get _proxy() {
104
+ this._context =
105
+ this._context || new ToolContextImpl(this._version, this._solution.id);
106
+ return this._context;
107
+ }
108
+ /**
109
+ * Remove a ToolInstance
110
+ *
111
+ * @param callback - Callback to handle processed record
112
+ *
113
+ * @returns Resolves to processed boolean
114
+ */
115
+ remove(callback) {
116
+ return this._proxy.remove(callback);
117
+ }
118
+ update(params, callback) {
119
+ return this._proxy.update(params, callback);
120
+ }
121
+ /**
122
+ * Provide a user-friendly representation
123
+ *
124
+ * @returns Object
125
+ */
126
+ toJSON() {
127
+ return {
128
+ accountSid: this.accountSid,
129
+ description: this.description,
130
+ enabled: this.enabled,
131
+ id: this.id,
132
+ meta: this.meta,
133
+ name: this.name,
134
+ requiresAuth: this.requiresAuth,
135
+ type: this.type,
136
+ dateCreated: this.dateCreated,
137
+ dateUpdated: this.dateUpdated,
138
+ };
139
+ }
140
+ [util_1.inspect.custom](_depth, options) {
141
+ return (0, util_1.inspect)(this.toJSON(), options);
142
+ }
143
+ }
144
+ exports.ToolInstance = ToolInstance;
145
+ function ToolListInstance(version) {
146
+ const instance = ((id) => instance.get(id));
147
+ instance.get = function get(id) {
148
+ return new ToolContextImpl(version, id);
149
+ };
150
+ instance._version = version;
151
+ instance._solution = {};
152
+ instance._uri = `/Tools`;
153
+ instance.create = function create(params, callback) {
154
+ if (params === null || params === undefined) {
155
+ throw new Error('Required parameter "params" missing.');
156
+ }
157
+ let data = {};
158
+ data = params;
159
+ const headers = {};
160
+ headers["Content-Type"] = "application/json";
161
+ let operationVersion = version, operationPromise = operationVersion.create({
162
+ uri: instance._uri,
163
+ method: "post",
164
+ data,
165
+ headers,
166
+ });
167
+ operationPromise = operationPromise.then((payload) => new ToolInstance(operationVersion, payload));
168
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
169
+ return operationPromise;
170
+ };
171
+ instance.page = function page(params, callback) {
172
+ if (params instanceof Function) {
173
+ callback = params;
174
+ params = {};
175
+ }
176
+ else {
177
+ params = params || {};
178
+ }
179
+ let data = {};
180
+ if (params["assistantId"] !== undefined)
181
+ data["AssistantId"] = params["assistantId"];
182
+ if (params["pageSize"] !== undefined)
183
+ data["PageSize"] = params["pageSize"];
184
+ if (params.pageNumber !== undefined)
185
+ data["Page"] = params.pageNumber;
186
+ if (params.pageToken !== undefined)
187
+ data["PageToken"] = params.pageToken;
188
+ const headers = {};
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 ToolPage(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 ToolPage(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.ToolListInstance = ToolListInstance;
219
+ class ToolPage extends Page_1.default {
220
+ /**
221
+ * Initialize the ToolPage
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 ToolInstance
232
+ *
233
+ * @param payload - Payload response from the API
234
+ */
235
+ getInstance(payload) {
236
+ return new ToolInstance(this._version, payload);
237
+ }
238
+ [util_1.inspect.custom](depth, options) {
239
+ return (0, util_1.inspect)(this.toJSON(), options);
240
+ }
241
+ }
242
+ exports.ToolPage = ToolPage;
@@ -17,13 +17,13 @@ export interface ApprovalFetchContext {
17
17
  [inspect.custom](_depth: any, options: InspectOptions): any;
18
18
  }
19
19
  export interface ApprovalFetchContextSolution {
20
- contentSid: string;
20
+ sid: string;
21
21
  }
22
22
  export declare class ApprovalFetchContextImpl implements ApprovalFetchContext {
23
23
  protected _version: V1;
24
24
  protected _solution: ApprovalFetchContextSolution;
25
25
  protected _uri: string;
26
- constructor(_version: V1, contentSid: string);
26
+ constructor(_version: V1, sid: string);
27
27
  fetch(callback?: (error: Error | null, item?: ApprovalFetchInstance) => any): Promise<ApprovalFetchInstance>;
28
28
  /**
29
29
  * Provide a user-friendly representation
@@ -43,7 +43,7 @@ export declare class ApprovalFetchInstance {
43
43
  protected _version: V1;
44
44
  protected _solution: ApprovalFetchContextSolution;
45
45
  protected _context?: ApprovalFetchContext;
46
- constructor(_version: V1, payload: ApprovalFetchResource, contentSid: string);
46
+ constructor(_version: V1, payload: ApprovalFetchResource, sid: string);
47
47
  /**
48
48
  * The unique string that that we created to identify the Content resource.
49
49
  */
@@ -83,7 +83,7 @@ export declare class ApprovalFetchInstance {
83
83
  [inspect.custom](_depth: any, options: InspectOptions): string;
84
84
  }
85
85
  export interface ApprovalFetchSolution {
86
- contentSid: string;
86
+ sid: string;
87
87
  }
88
88
  export interface ApprovalFetchListInstance {
89
89
  _version: V1;
@@ -97,5 +97,5 @@ export interface ApprovalFetchListInstance {
97
97
  toJSON(): any;
98
98
  [inspect.custom](_depth: any, options: InspectOptions): any;
99
99
  }
100
- export declare function ApprovalFetchListInstance(version: V1, contentSid: string): ApprovalFetchListInstance;
100
+ export declare function ApprovalFetchListInstance(version: V1, sid: string): ApprovalFetchListInstance;
101
101
  export {};