twilio 5.3.1 → 5.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base/RequestClient.d.ts +1 -0
- package/lib/rest/Preview.d.ts +0 -5
- package/lib/rest/Preview.js +0 -7
- package/lib/rest/PreviewBase.d.ts +0 -3
- package/lib/rest/PreviewBase.js +0 -6
- package/lib/rest/accounts/V1.d.ts +10 -0
- package/lib/rest/accounts/V1.js +12 -0
- package/lib/rest/accounts/v1/bulkConsents.d.ts +53 -0
- package/lib/rest/accounts/v1/bulkConsents.js +74 -0
- package/lib/rest/accounts/v1/bulkContacts.d.ts +53 -0
- package/lib/rest/accounts/v1/bulkContacts.js +74 -0
- package/lib/rest/assistants/v1/assistant/assistantsKnowledge.d.ts +260 -0
- package/lib/rest/{preview/deployed_devices/fleet/key.js → assistants/v1/assistant/assistantsKnowledge.js} +62 -116
- package/lib/rest/assistants/v1/assistant/assistantsTool.d.ts +266 -0
- package/lib/rest/{preview/deployed_devices/fleet/deployment.js → assistants/v1/assistant/assistantsTool.js} +64 -112
- package/lib/rest/assistants/v1/assistant/message.d.ts +112 -0
- package/lib/rest/assistants/v1/assistant/message.js +90 -0
- package/lib/rest/assistants/v1/assistant.d.ts +38 -0
- package/lib/rest/assistants/v1/assistant.js +40 -0
- package/lib/rest/assistants/v1/knowledge/knowledgeStatus.d.ts +101 -0
- package/lib/rest/assistants/v1/knowledge/knowledgeStatus.js +115 -0
- package/lib/rest/assistants/v1/knowledge.d.ts +14 -0
- package/lib/rest/assistants/v1/knowledge.js +15 -0
- package/lib/rest/assistants/v1/tool.d.ts +67 -0
- package/lib/rest/assistants/v1/tool.js +28 -1
- package/lib/rest/iam/V1.d.ts +5 -5
- package/lib/rest/iam/V1.js +5 -5
- package/lib/rest/iam/v1/{newApiKey.d.ts → key.d.ts} +14 -14
- package/lib/rest/iam/v1/{newApiKey.js → key.js} +6 -6
- package/lib/rest/numbers/V1.d.ts +5 -5
- package/lib/rest/numbers/V1.js +6 -8
- package/lib/rest/numbers/v1/portingPortability.d.ts +2 -0
- package/lib/rest/numbers/v1/portingPortability.js +2 -0
- package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.d.ts → webhook.d.ts} +10 -10
- package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.js → webhook.js} +6 -6
- package/lib/rest/serverless/v1/service/environment/deployment.d.ts +2 -0
- package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/task.d.ts +2 -2
- package/lib/rest/verify/v2/service/verification.d.ts +2 -0
- package/lib/rest/verify/v2/service/verification.js +2 -0
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +2 -0
- package/lib/rest/verify/v2/service/verificationCheck.js +2 -0
- package/lib/webhooks/webhooks.d.ts +1 -0
- package/package.json +1 -1
- package/lib/rest/preview/DeployedDevices.d.ts +0 -15
- package/lib/rest/preview/DeployedDevices.js +0 -36
- package/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +0 -324
- package/lib/rest/preview/deployed_devices/fleet/certificate.js +0 -269
- package/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +0 -318
- package/lib/rest/preview/deployed_devices/fleet/device.d.ts +0 -358
- package/lib/rest/preview/deployed_devices/fleet/device.js +0 -284
- package/lib/rest/preview/deployed_devices/fleet/key.d.ts +0 -330
- package/lib/rest/preview/deployed_devices/fleet.d.ts +0 -352
- package/lib/rest/preview/deployed_devices/fleet.js +0 -307
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
6
|
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
7
|
*
|
|
8
|
-
* Twilio -
|
|
8
|
+
* Twilio - Assistants
|
|
9
9
|
* This is the public Twilio REST API.
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
@@ -16,66 +16,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.AssistantsKnowledgePage = exports.AssistantsKnowledgeListInstance = exports.AssistantsKnowledgeInstance = exports.AssistantsKnowledgeContextImpl = void 0;
|
|
20
20
|
const util_1 = require("util");
|
|
21
21
|
const Page_1 = __importDefault(require("../../../../base/Page"));
|
|
22
22
|
const deserialize = require("../../../../base/deserialize");
|
|
23
23
|
const serialize = require("../../../../base/serialize");
|
|
24
24
|
const utility_1 = require("../../../../base/utility");
|
|
25
|
-
class
|
|
26
|
-
constructor(_version,
|
|
25
|
+
class AssistantsKnowledgeContextImpl {
|
|
26
|
+
constructor(_version, assistantId, id) {
|
|
27
27
|
this._version = _version;
|
|
28
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
29
|
-
throw new Error("Parameter '
|
|
28
|
+
if (!(0, utility_1.isValidPathParam)(assistantId)) {
|
|
29
|
+
throw new Error("Parameter 'assistantId' is not valid.");
|
|
30
30
|
}
|
|
31
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
32
|
-
throw new Error("Parameter '
|
|
31
|
+
if (!(0, utility_1.isValidPathParam)(id)) {
|
|
32
|
+
throw new Error("Parameter 'id' is not valid.");
|
|
33
33
|
}
|
|
34
|
-
this._solution = {
|
|
35
|
-
this._uri = `/
|
|
34
|
+
this._solution = { assistantId, id };
|
|
35
|
+
this._uri = `/Assistants/${assistantId}/Knowledge/${id}`;
|
|
36
36
|
}
|
|
37
|
-
|
|
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
|
-
}
|
|
46
|
-
fetch(callback) {
|
|
37
|
+
create(callback) {
|
|
47
38
|
const instance = this;
|
|
48
|
-
let operationVersion = instance._version, operationPromise = operationVersion.
|
|
39
|
+
let operationVersion = instance._version, operationPromise = operationVersion.create({
|
|
49
40
|
uri: instance._uri,
|
|
50
|
-
method: "
|
|
41
|
+
method: "post",
|
|
51
42
|
});
|
|
52
|
-
operationPromise = operationPromise.then((payload) => new
|
|
43
|
+
operationPromise = operationPromise.then((payload) => new AssistantsKnowledgeInstance(operationVersion, payload, instance._solution.assistantId, instance._solution.id));
|
|
53
44
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
54
45
|
return operationPromise;
|
|
55
46
|
}
|
|
56
|
-
|
|
57
|
-
if (params instanceof Function) {
|
|
58
|
-
callback = params;
|
|
59
|
-
params = {};
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
params = params || {};
|
|
63
|
-
}
|
|
64
|
-
let data = {};
|
|
65
|
-
if (params["friendlyName"] !== undefined)
|
|
66
|
-
data["FriendlyName"] = params["friendlyName"];
|
|
67
|
-
if (params["deviceSid"] !== undefined)
|
|
68
|
-
data["DeviceSid"] = params["deviceSid"];
|
|
69
|
-
const headers = {};
|
|
70
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
47
|
+
remove(callback) {
|
|
71
48
|
const instance = this;
|
|
72
|
-
let operationVersion = instance._version, operationPromise = operationVersion.
|
|
49
|
+
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
73
50
|
uri: instance._uri,
|
|
74
|
-
method: "
|
|
75
|
-
data,
|
|
76
|
-
headers,
|
|
51
|
+
method: "delete",
|
|
77
52
|
});
|
|
78
|
-
operationPromise = operationPromise.then((payload) => new KeyInstance(operationVersion, payload, instance._solution.fleetSid, instance._solution.sid));
|
|
79
53
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
80
54
|
return operationPromise;
|
|
81
55
|
}
|
|
@@ -91,49 +65,47 @@ class KeyContextImpl {
|
|
|
91
65
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
92
66
|
}
|
|
93
67
|
}
|
|
94
|
-
exports.
|
|
95
|
-
class
|
|
96
|
-
constructor(_version, payload,
|
|
68
|
+
exports.AssistantsKnowledgeContextImpl = AssistantsKnowledgeContextImpl;
|
|
69
|
+
class AssistantsKnowledgeInstance {
|
|
70
|
+
constructor(_version, payload, assistantId, id) {
|
|
97
71
|
this._version = _version;
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
100
|
-
this.friendlyName = payload.friendly_name;
|
|
101
|
-
this.fleetSid = payload.fleet_sid;
|
|
72
|
+
this.description = payload.description;
|
|
73
|
+
this.id = payload.id;
|
|
102
74
|
this.accountSid = payload.account_sid;
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
75
|
+
this.knowledgeSourceDetails = payload.knowledge_source_details;
|
|
76
|
+
this.name = payload.name;
|
|
77
|
+
this.status = payload.status;
|
|
78
|
+
this.type = payload.type;
|
|
79
|
+
this.url = payload.url;
|
|
105
80
|
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
106
81
|
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
107
|
-
this._solution = {
|
|
82
|
+
this._solution = { assistantId, id: id || this.id };
|
|
108
83
|
}
|
|
109
84
|
get _proxy() {
|
|
110
85
|
this._context =
|
|
111
86
|
this._context ||
|
|
112
|
-
new
|
|
87
|
+
new AssistantsKnowledgeContextImpl(this._version, this._solution.assistantId, this._solution.id);
|
|
113
88
|
return this._context;
|
|
114
89
|
}
|
|
115
90
|
/**
|
|
116
|
-
*
|
|
91
|
+
* Create a AssistantsKnowledgeInstance
|
|
117
92
|
*
|
|
118
93
|
* @param callback - Callback to handle processed record
|
|
119
94
|
*
|
|
120
|
-
* @returns Resolves to processed
|
|
95
|
+
* @returns Resolves to processed AssistantsKnowledgeInstance
|
|
121
96
|
*/
|
|
122
|
-
|
|
123
|
-
return this._proxy.
|
|
97
|
+
create(callback) {
|
|
98
|
+
return this._proxy.create(callback);
|
|
124
99
|
}
|
|
125
100
|
/**
|
|
126
|
-
*
|
|
101
|
+
* Remove a AssistantsKnowledgeInstance
|
|
127
102
|
*
|
|
128
103
|
* @param callback - Callback to handle processed record
|
|
129
104
|
*
|
|
130
|
-
* @returns Resolves to processed
|
|
105
|
+
* @returns Resolves to processed boolean
|
|
131
106
|
*/
|
|
132
|
-
|
|
133
|
-
return this._proxy.
|
|
134
|
-
}
|
|
135
|
-
update(params, callback) {
|
|
136
|
-
return this._proxy.update(params, callback);
|
|
107
|
+
remove(callback) {
|
|
108
|
+
return this._proxy.remove(callback);
|
|
137
109
|
}
|
|
138
110
|
/**
|
|
139
111
|
* Provide a user-friendly representation
|
|
@@ -142,13 +114,14 @@ class KeyInstance {
|
|
|
142
114
|
*/
|
|
143
115
|
toJSON() {
|
|
144
116
|
return {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
friendlyName: this.friendlyName,
|
|
148
|
-
fleetSid: this.fleetSid,
|
|
117
|
+
description: this.description,
|
|
118
|
+
id: this.id,
|
|
149
119
|
accountSid: this.accountSid,
|
|
150
|
-
|
|
151
|
-
|
|
120
|
+
knowledgeSourceDetails: this.knowledgeSourceDetails,
|
|
121
|
+
name: this.name,
|
|
122
|
+
status: this.status,
|
|
123
|
+
type: this.type,
|
|
124
|
+
url: this.url,
|
|
152
125
|
dateCreated: this.dateCreated,
|
|
153
126
|
dateUpdated: this.dateUpdated,
|
|
154
127
|
};
|
|
@@ -157,43 +130,18 @@ class KeyInstance {
|
|
|
157
130
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
158
131
|
}
|
|
159
132
|
}
|
|
160
|
-
exports.
|
|
161
|
-
function
|
|
162
|
-
if (!(0, utility_1.isValidPathParam)(
|
|
163
|
-
throw new Error("Parameter '
|
|
164
|
-
}
|
|
165
|
-
const instance = ((
|
|
166
|
-
instance.get = function get(
|
|
167
|
-
return new
|
|
133
|
+
exports.AssistantsKnowledgeInstance = AssistantsKnowledgeInstance;
|
|
134
|
+
function AssistantsKnowledgeListInstance(version, assistantId) {
|
|
135
|
+
if (!(0, utility_1.isValidPathParam)(assistantId)) {
|
|
136
|
+
throw new Error("Parameter 'assistantId' is not valid.");
|
|
137
|
+
}
|
|
138
|
+
const instance = ((id) => instance.get(id));
|
|
139
|
+
instance.get = function get(id) {
|
|
140
|
+
return new AssistantsKnowledgeContextImpl(version, assistantId, id);
|
|
168
141
|
};
|
|
169
142
|
instance._version = version;
|
|
170
|
-
instance._solution = {
|
|
171
|
-
instance._uri = `/
|
|
172
|
-
instance.create = function create(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["friendlyName"] !== undefined)
|
|
182
|
-
data["FriendlyName"] = params["friendlyName"];
|
|
183
|
-
if (params["deviceSid"] !== undefined)
|
|
184
|
-
data["DeviceSid"] = params["deviceSid"];
|
|
185
|
-
const headers = {};
|
|
186
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
187
|
-
let operationVersion = version, operationPromise = operationVersion.create({
|
|
188
|
-
uri: instance._uri,
|
|
189
|
-
method: "post",
|
|
190
|
-
data,
|
|
191
|
-
headers,
|
|
192
|
-
});
|
|
193
|
-
operationPromise = operationPromise.then((payload) => new KeyInstance(operationVersion, payload, instance._solution.fleetSid));
|
|
194
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
195
|
-
return operationPromise;
|
|
196
|
-
};
|
|
143
|
+
instance._solution = { assistantId };
|
|
144
|
+
instance._uri = `/Assistants/${assistantId}/Knowledge`;
|
|
197
145
|
instance.page = function page(params, callback) {
|
|
198
146
|
if (params instanceof Function) {
|
|
199
147
|
callback = params;
|
|
@@ -203,8 +151,6 @@ function KeyListInstance(version, fleetSid) {
|
|
|
203
151
|
params = params || {};
|
|
204
152
|
}
|
|
205
153
|
let data = {};
|
|
206
|
-
if (params["deviceSid"] !== undefined)
|
|
207
|
-
data["DeviceSid"] = params["deviceSid"];
|
|
208
154
|
if (params["pageSize"] !== undefined)
|
|
209
155
|
data["PageSize"] = params["pageSize"];
|
|
210
156
|
if (params.pageNumber !== undefined)
|
|
@@ -218,7 +164,7 @@ function KeyListInstance(version, fleetSid) {
|
|
|
218
164
|
params: data,
|
|
219
165
|
headers,
|
|
220
166
|
});
|
|
221
|
-
operationPromise = operationPromise.then((payload) => new
|
|
167
|
+
operationPromise = operationPromise.then((payload) => new AssistantsKnowledgePage(operationVersion, payload, instance._solution));
|
|
222
168
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
223
169
|
return operationPromise;
|
|
224
170
|
};
|
|
@@ -229,7 +175,7 @@ function KeyListInstance(version, fleetSid) {
|
|
|
229
175
|
method: "get",
|
|
230
176
|
uri: targetUrl,
|
|
231
177
|
});
|
|
232
|
-
let pagePromise = operationPromise.then((payload) => new
|
|
178
|
+
let pagePromise = operationPromise.then((payload) => new AssistantsKnowledgePage(instance._version, payload, instance._solution));
|
|
233
179
|
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
234
180
|
return pagePromise;
|
|
235
181
|
};
|
|
@@ -241,10 +187,10 @@ function KeyListInstance(version, fleetSid) {
|
|
|
241
187
|
};
|
|
242
188
|
return instance;
|
|
243
189
|
}
|
|
244
|
-
exports.
|
|
245
|
-
class
|
|
190
|
+
exports.AssistantsKnowledgeListInstance = AssistantsKnowledgeListInstance;
|
|
191
|
+
class AssistantsKnowledgePage extends Page_1.default {
|
|
246
192
|
/**
|
|
247
|
-
* Initialize the
|
|
193
|
+
* Initialize the AssistantsKnowledgePage
|
|
248
194
|
*
|
|
249
195
|
* @param version - Version of the resource
|
|
250
196
|
* @param response - Response from the API
|
|
@@ -254,15 +200,15 @@ class KeyPage extends Page_1.default {
|
|
|
254
200
|
super(version, response, solution);
|
|
255
201
|
}
|
|
256
202
|
/**
|
|
257
|
-
* Build an instance of
|
|
203
|
+
* Build an instance of AssistantsKnowledgeInstance
|
|
258
204
|
*
|
|
259
205
|
* @param payload - Payload response from the API
|
|
260
206
|
*/
|
|
261
207
|
getInstance(payload) {
|
|
262
|
-
return new
|
|
208
|
+
return new AssistantsKnowledgeInstance(this._version, payload, this._solution.assistantId);
|
|
263
209
|
}
|
|
264
210
|
[util_1.inspect.custom](depth, options) {
|
|
265
211
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
266
212
|
}
|
|
267
213
|
}
|
|
268
|
-
exports.
|
|
214
|
+
exports.AssistantsKnowledgePage = AssistantsKnowledgePage;
|
|
@@ -0,0 +1,266 @@
|
|
|
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 AssistantsToolListInstanceEachOptions {
|
|
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: AssistantsToolInstance, 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 AssistantsToolListInstanceOptions {
|
|
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 AssistantsToolListInstancePageOptions {
|
|
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 AssistantsToolContext {
|
|
40
|
+
/**
|
|
41
|
+
* Create a AssistantsToolInstance
|
|
42
|
+
*
|
|
43
|
+
* @param callback - Callback to handle processed record
|
|
44
|
+
*
|
|
45
|
+
* @returns Resolves to processed AssistantsToolInstance
|
|
46
|
+
*/
|
|
47
|
+
create(callback?: (error: Error | null, item?: AssistantsToolInstance) => any): Promise<AssistantsToolInstance>;
|
|
48
|
+
/**
|
|
49
|
+
* Remove a AssistantsToolInstance
|
|
50
|
+
*
|
|
51
|
+
* @param callback - Callback to handle processed record
|
|
52
|
+
*
|
|
53
|
+
* @returns Resolves to processed boolean
|
|
54
|
+
*/
|
|
55
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Provide a user-friendly representation
|
|
58
|
+
*/
|
|
59
|
+
toJSON(): any;
|
|
60
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
61
|
+
}
|
|
62
|
+
export interface AssistantsToolContextSolution {
|
|
63
|
+
assistantId: string;
|
|
64
|
+
id: string;
|
|
65
|
+
}
|
|
66
|
+
export declare class AssistantsToolContextImpl implements AssistantsToolContext {
|
|
67
|
+
protected _version: V1;
|
|
68
|
+
protected _solution: AssistantsToolContextSolution;
|
|
69
|
+
protected _uri: string;
|
|
70
|
+
constructor(_version: V1, assistantId: string, id: string);
|
|
71
|
+
create(callback?: (error: Error | null, item?: AssistantsToolInstance) => any): Promise<AssistantsToolInstance>;
|
|
72
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Provide a user-friendly representation
|
|
75
|
+
*
|
|
76
|
+
* @returns Object
|
|
77
|
+
*/
|
|
78
|
+
toJSON(): AssistantsToolContextSolution;
|
|
79
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
80
|
+
}
|
|
81
|
+
interface AssistantsToolPayload extends TwilioResponsePayload {
|
|
82
|
+
tools: AssistantsToolResource[];
|
|
83
|
+
}
|
|
84
|
+
interface AssistantsToolResource {
|
|
85
|
+
account_sid: string;
|
|
86
|
+
description: string;
|
|
87
|
+
enabled: boolean;
|
|
88
|
+
id: string;
|
|
89
|
+
meta: Record<string, object>;
|
|
90
|
+
name: string;
|
|
91
|
+
requires_auth: boolean;
|
|
92
|
+
type: string;
|
|
93
|
+
url: string;
|
|
94
|
+
date_created: Date;
|
|
95
|
+
date_updated: Date;
|
|
96
|
+
}
|
|
97
|
+
export declare class AssistantsToolInstance {
|
|
98
|
+
protected _version: V1;
|
|
99
|
+
protected _solution: AssistantsToolContextSolution;
|
|
100
|
+
protected _context?: AssistantsToolContext;
|
|
101
|
+
constructor(_version: V1, payload: AssistantsToolResource, assistantId: string, id?: string);
|
|
102
|
+
/**
|
|
103
|
+
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource.
|
|
104
|
+
*/
|
|
105
|
+
accountSid: string;
|
|
106
|
+
/**
|
|
107
|
+
* The description of the tool.
|
|
108
|
+
*/
|
|
109
|
+
description: string;
|
|
110
|
+
/**
|
|
111
|
+
* True if the tool is enabled.
|
|
112
|
+
*/
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* The tool ID.
|
|
116
|
+
*/
|
|
117
|
+
id: string;
|
|
118
|
+
/**
|
|
119
|
+
* The metadata related to method, url, input_schema to used with the Tool.
|
|
120
|
+
*/
|
|
121
|
+
meta: Record<string, object>;
|
|
122
|
+
/**
|
|
123
|
+
* The name of the tool.
|
|
124
|
+
*/
|
|
125
|
+
name: string;
|
|
126
|
+
/**
|
|
127
|
+
* The authentication requirement for the tool.
|
|
128
|
+
*/
|
|
129
|
+
requiresAuth: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* The type of the tool. (\'WEBHOOK\')
|
|
132
|
+
*/
|
|
133
|
+
type: string;
|
|
134
|
+
/**
|
|
135
|
+
* The url of the tool resource.
|
|
136
|
+
*/
|
|
137
|
+
url: string;
|
|
138
|
+
/**
|
|
139
|
+
* The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
140
|
+
*/
|
|
141
|
+
dateCreated: Date;
|
|
142
|
+
/**
|
|
143
|
+
* The date and time in GMT when the Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
144
|
+
*/
|
|
145
|
+
dateUpdated: Date;
|
|
146
|
+
private get _proxy();
|
|
147
|
+
/**
|
|
148
|
+
* Create a AssistantsToolInstance
|
|
149
|
+
*
|
|
150
|
+
* @param callback - Callback to handle processed record
|
|
151
|
+
*
|
|
152
|
+
* @returns Resolves to processed AssistantsToolInstance
|
|
153
|
+
*/
|
|
154
|
+
create(callback?: (error: Error | null, item?: AssistantsToolInstance) => any): Promise<AssistantsToolInstance>;
|
|
155
|
+
/**
|
|
156
|
+
* Remove a AssistantsToolInstance
|
|
157
|
+
*
|
|
158
|
+
* @param callback - Callback to handle processed record
|
|
159
|
+
*
|
|
160
|
+
* @returns Resolves to processed boolean
|
|
161
|
+
*/
|
|
162
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
163
|
+
/**
|
|
164
|
+
* Provide a user-friendly representation
|
|
165
|
+
*
|
|
166
|
+
* @returns Object
|
|
167
|
+
*/
|
|
168
|
+
toJSON(): {
|
|
169
|
+
accountSid: string;
|
|
170
|
+
description: string;
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
id: string;
|
|
173
|
+
meta: Record<string, object>;
|
|
174
|
+
name: string;
|
|
175
|
+
requiresAuth: boolean;
|
|
176
|
+
type: string;
|
|
177
|
+
url: string;
|
|
178
|
+
dateCreated: Date;
|
|
179
|
+
dateUpdated: Date;
|
|
180
|
+
};
|
|
181
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
182
|
+
}
|
|
183
|
+
export interface AssistantsToolSolution {
|
|
184
|
+
assistantId: string;
|
|
185
|
+
}
|
|
186
|
+
export interface AssistantsToolListInstance {
|
|
187
|
+
_version: V1;
|
|
188
|
+
_solution: AssistantsToolSolution;
|
|
189
|
+
_uri: string;
|
|
190
|
+
(id: string): AssistantsToolContext;
|
|
191
|
+
get(id: string): AssistantsToolContext;
|
|
192
|
+
/**
|
|
193
|
+
* Streams AssistantsToolInstance records from the API.
|
|
194
|
+
*
|
|
195
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
196
|
+
* is reached.
|
|
197
|
+
*
|
|
198
|
+
* The results are passed into the callback function, so this operation is memory
|
|
199
|
+
* efficient.
|
|
200
|
+
*
|
|
201
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
202
|
+
* function.
|
|
203
|
+
*
|
|
204
|
+
* @param { AssistantsToolListInstanceEachOptions } [params] - Options for request
|
|
205
|
+
* @param { function } [callback] - Function to process each record
|
|
206
|
+
*/
|
|
207
|
+
each(callback?: (item: AssistantsToolInstance, done: (err?: Error) => void) => void): void;
|
|
208
|
+
each(params: AssistantsToolListInstanceEachOptions, callback?: (item: AssistantsToolInstance, done: (err?: Error) => void) => void): void;
|
|
209
|
+
/**
|
|
210
|
+
* Retrieve a single target page of AssistantsToolInstance records from the API.
|
|
211
|
+
*
|
|
212
|
+
* The request is executed immediately.
|
|
213
|
+
*
|
|
214
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
215
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
216
|
+
*/
|
|
217
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: AssistantsToolPage) => any): Promise<AssistantsToolPage>;
|
|
218
|
+
/**
|
|
219
|
+
* Lists AssistantsToolInstance records from the API as a list.
|
|
220
|
+
*
|
|
221
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
222
|
+
* function.
|
|
223
|
+
*
|
|
224
|
+
* @param { AssistantsToolListInstanceOptions } [params] - Options for request
|
|
225
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
226
|
+
*/
|
|
227
|
+
list(callback?: (error: Error | null, items: AssistantsToolInstance[]) => any): Promise<AssistantsToolInstance[]>;
|
|
228
|
+
list(params: AssistantsToolListInstanceOptions, callback?: (error: Error | null, items: AssistantsToolInstance[]) => any): Promise<AssistantsToolInstance[]>;
|
|
229
|
+
/**
|
|
230
|
+
* Retrieve a single page of AssistantsToolInstance records from the API.
|
|
231
|
+
*
|
|
232
|
+
* The request is executed immediately.
|
|
233
|
+
*
|
|
234
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
235
|
+
* function.
|
|
236
|
+
*
|
|
237
|
+
* @param { AssistantsToolListInstancePageOptions } [params] - Options for request
|
|
238
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
239
|
+
*/
|
|
240
|
+
page(callback?: (error: Error | null, items: AssistantsToolPage) => any): Promise<AssistantsToolPage>;
|
|
241
|
+
page(params: AssistantsToolListInstancePageOptions, callback?: (error: Error | null, items: AssistantsToolPage) => any): Promise<AssistantsToolPage>;
|
|
242
|
+
/**
|
|
243
|
+
* Provide a user-friendly representation
|
|
244
|
+
*/
|
|
245
|
+
toJSON(): any;
|
|
246
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
247
|
+
}
|
|
248
|
+
export declare function AssistantsToolListInstance(version: V1, assistantId: string): AssistantsToolListInstance;
|
|
249
|
+
export declare class AssistantsToolPage extends Page<V1, AssistantsToolPayload, AssistantsToolResource, AssistantsToolInstance> {
|
|
250
|
+
/**
|
|
251
|
+
* Initialize the AssistantsToolPage
|
|
252
|
+
*
|
|
253
|
+
* @param version - Version of the resource
|
|
254
|
+
* @param response - Response from the API
|
|
255
|
+
* @param solution - Path solution
|
|
256
|
+
*/
|
|
257
|
+
constructor(version: V1, response: Response<string>, solution: AssistantsToolSolution);
|
|
258
|
+
/**
|
|
259
|
+
* Build an instance of AssistantsToolInstance
|
|
260
|
+
*
|
|
261
|
+
* @param payload - Payload response from the API
|
|
262
|
+
*/
|
|
263
|
+
getInstance(payload: AssistantsToolResource): AssistantsToolInstance;
|
|
264
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
265
|
+
}
|
|
266
|
+
export {};
|