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
|
@@ -1,284 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by
|
|
4
|
-
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
-
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
-
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
-
*
|
|
8
|
-
* Twilio - Preview
|
|
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.DevicePage = exports.DeviceListInstance = exports.DeviceInstance = exports.DeviceContextImpl = 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 DeviceContextImpl {
|
|
26
|
-
constructor(_version, fleetSid, sid) {
|
|
27
|
-
this._version = _version;
|
|
28
|
-
if (!(0, utility_1.isValidPathParam)(fleetSid)) {
|
|
29
|
-
throw new Error("Parameter 'fleetSid' is not valid.");
|
|
30
|
-
}
|
|
31
|
-
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
32
|
-
throw new Error("Parameter 'sid' is not valid.");
|
|
33
|
-
}
|
|
34
|
-
this._solution = { fleetSid, sid };
|
|
35
|
-
this._uri = `/Fleets/${fleetSid}/Devices/${sid}`;
|
|
36
|
-
}
|
|
37
|
-
remove(callback) {
|
|
38
|
-
const instance = this;
|
|
39
|
-
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
40
|
-
uri: instance._uri,
|
|
41
|
-
method: "delete",
|
|
42
|
-
});
|
|
43
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
44
|
-
return operationPromise;
|
|
45
|
-
}
|
|
46
|
-
fetch(callback) {
|
|
47
|
-
const instance = this;
|
|
48
|
-
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
49
|
-
uri: instance._uri,
|
|
50
|
-
method: "get",
|
|
51
|
-
});
|
|
52
|
-
operationPromise = operationPromise.then((payload) => new DeviceInstance(operationVersion, payload, instance._solution.fleetSid, instance._solution.sid));
|
|
53
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
54
|
-
return operationPromise;
|
|
55
|
-
}
|
|
56
|
-
update(params, callback) {
|
|
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["identity"] !== undefined)
|
|
68
|
-
data["Identity"] = params["identity"];
|
|
69
|
-
if (params["deploymentSid"] !== undefined)
|
|
70
|
-
data["DeploymentSid"] = params["deploymentSid"];
|
|
71
|
-
if (params["enabled"] !== undefined)
|
|
72
|
-
data["Enabled"] = serialize.bool(params["enabled"]);
|
|
73
|
-
const headers = {};
|
|
74
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
75
|
-
const instance = this;
|
|
76
|
-
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
77
|
-
uri: instance._uri,
|
|
78
|
-
method: "post",
|
|
79
|
-
data,
|
|
80
|
-
headers,
|
|
81
|
-
});
|
|
82
|
-
operationPromise = operationPromise.then((payload) => new DeviceInstance(operationVersion, payload, instance._solution.fleetSid, instance._solution.sid));
|
|
83
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
84
|
-
return operationPromise;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Provide a user-friendly representation
|
|
88
|
-
*
|
|
89
|
-
* @returns Object
|
|
90
|
-
*/
|
|
91
|
-
toJSON() {
|
|
92
|
-
return this._solution;
|
|
93
|
-
}
|
|
94
|
-
[util_1.inspect.custom](_depth, options) {
|
|
95
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
exports.DeviceContextImpl = DeviceContextImpl;
|
|
99
|
-
class DeviceInstance {
|
|
100
|
-
constructor(_version, payload, fleetSid, sid) {
|
|
101
|
-
this._version = _version;
|
|
102
|
-
this.sid = payload.sid;
|
|
103
|
-
this.url = payload.url;
|
|
104
|
-
this.uniqueName = payload.unique_name;
|
|
105
|
-
this.friendlyName = payload.friendly_name;
|
|
106
|
-
this.fleetSid = payload.fleet_sid;
|
|
107
|
-
this.enabled = payload.enabled;
|
|
108
|
-
this.accountSid = payload.account_sid;
|
|
109
|
-
this.identity = payload.identity;
|
|
110
|
-
this.deploymentSid = payload.deployment_sid;
|
|
111
|
-
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
112
|
-
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
113
|
-
this.dateAuthenticated = deserialize.iso8601DateTime(payload.date_authenticated);
|
|
114
|
-
this._solution = { fleetSid, sid: sid || this.sid };
|
|
115
|
-
}
|
|
116
|
-
get _proxy() {
|
|
117
|
-
this._context =
|
|
118
|
-
this._context ||
|
|
119
|
-
new DeviceContextImpl(this._version, this._solution.fleetSid, this._solution.sid);
|
|
120
|
-
return this._context;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Remove a DeviceInstance
|
|
124
|
-
*
|
|
125
|
-
* @param callback - Callback to handle processed record
|
|
126
|
-
*
|
|
127
|
-
* @returns Resolves to processed boolean
|
|
128
|
-
*/
|
|
129
|
-
remove(callback) {
|
|
130
|
-
return this._proxy.remove(callback);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Fetch a DeviceInstance
|
|
134
|
-
*
|
|
135
|
-
* @param callback - Callback to handle processed record
|
|
136
|
-
*
|
|
137
|
-
* @returns Resolves to processed DeviceInstance
|
|
138
|
-
*/
|
|
139
|
-
fetch(callback) {
|
|
140
|
-
return this._proxy.fetch(callback);
|
|
141
|
-
}
|
|
142
|
-
update(params, callback) {
|
|
143
|
-
return this._proxy.update(params, callback);
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Provide a user-friendly representation
|
|
147
|
-
*
|
|
148
|
-
* @returns Object
|
|
149
|
-
*/
|
|
150
|
-
toJSON() {
|
|
151
|
-
return {
|
|
152
|
-
sid: this.sid,
|
|
153
|
-
url: this.url,
|
|
154
|
-
uniqueName: this.uniqueName,
|
|
155
|
-
friendlyName: this.friendlyName,
|
|
156
|
-
fleetSid: this.fleetSid,
|
|
157
|
-
enabled: this.enabled,
|
|
158
|
-
accountSid: this.accountSid,
|
|
159
|
-
identity: this.identity,
|
|
160
|
-
deploymentSid: this.deploymentSid,
|
|
161
|
-
dateCreated: this.dateCreated,
|
|
162
|
-
dateUpdated: this.dateUpdated,
|
|
163
|
-
dateAuthenticated: this.dateAuthenticated,
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
[util_1.inspect.custom](_depth, options) {
|
|
167
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
exports.DeviceInstance = DeviceInstance;
|
|
171
|
-
function DeviceListInstance(version, fleetSid) {
|
|
172
|
-
if (!(0, utility_1.isValidPathParam)(fleetSid)) {
|
|
173
|
-
throw new Error("Parameter 'fleetSid' is not valid.");
|
|
174
|
-
}
|
|
175
|
-
const instance = ((sid) => instance.get(sid));
|
|
176
|
-
instance.get = function get(sid) {
|
|
177
|
-
return new DeviceContextImpl(version, fleetSid, sid);
|
|
178
|
-
};
|
|
179
|
-
instance._version = version;
|
|
180
|
-
instance._solution = { fleetSid };
|
|
181
|
-
instance._uri = `/Fleets/${fleetSid}/Devices`;
|
|
182
|
-
instance.create = function create(params, callback) {
|
|
183
|
-
if (params instanceof Function) {
|
|
184
|
-
callback = params;
|
|
185
|
-
params = {};
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
params = params || {};
|
|
189
|
-
}
|
|
190
|
-
let data = {};
|
|
191
|
-
if (params["uniqueName"] !== undefined)
|
|
192
|
-
data["UniqueName"] = params["uniqueName"];
|
|
193
|
-
if (params["friendlyName"] !== undefined)
|
|
194
|
-
data["FriendlyName"] = params["friendlyName"];
|
|
195
|
-
if (params["identity"] !== undefined)
|
|
196
|
-
data["Identity"] = params["identity"];
|
|
197
|
-
if (params["deploymentSid"] !== undefined)
|
|
198
|
-
data["DeploymentSid"] = params["deploymentSid"];
|
|
199
|
-
if (params["enabled"] !== undefined)
|
|
200
|
-
data["Enabled"] = serialize.bool(params["enabled"]);
|
|
201
|
-
const headers = {};
|
|
202
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
203
|
-
let operationVersion = version, operationPromise = operationVersion.create({
|
|
204
|
-
uri: instance._uri,
|
|
205
|
-
method: "post",
|
|
206
|
-
data,
|
|
207
|
-
headers,
|
|
208
|
-
});
|
|
209
|
-
operationPromise = operationPromise.then((payload) => new DeviceInstance(operationVersion, payload, instance._solution.fleetSid));
|
|
210
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
211
|
-
return operationPromise;
|
|
212
|
-
};
|
|
213
|
-
instance.page = function page(params, callback) {
|
|
214
|
-
if (params instanceof Function) {
|
|
215
|
-
callback = params;
|
|
216
|
-
params = {};
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
params = params || {};
|
|
220
|
-
}
|
|
221
|
-
let data = {};
|
|
222
|
-
if (params["deploymentSid"] !== undefined)
|
|
223
|
-
data["DeploymentSid"] = params["deploymentSid"];
|
|
224
|
-
if (params["pageSize"] !== undefined)
|
|
225
|
-
data["PageSize"] = params["pageSize"];
|
|
226
|
-
if (params.pageNumber !== undefined)
|
|
227
|
-
data["Page"] = params.pageNumber;
|
|
228
|
-
if (params.pageToken !== undefined)
|
|
229
|
-
data["PageToken"] = params.pageToken;
|
|
230
|
-
const headers = {};
|
|
231
|
-
let operationVersion = version, operationPromise = operationVersion.page({
|
|
232
|
-
uri: instance._uri,
|
|
233
|
-
method: "get",
|
|
234
|
-
params: data,
|
|
235
|
-
headers,
|
|
236
|
-
});
|
|
237
|
-
operationPromise = operationPromise.then((payload) => new DevicePage(operationVersion, payload, instance._solution));
|
|
238
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
239
|
-
return operationPromise;
|
|
240
|
-
};
|
|
241
|
-
instance.each = instance._version.each;
|
|
242
|
-
instance.list = instance._version.list;
|
|
243
|
-
instance.getPage = function getPage(targetUrl, callback) {
|
|
244
|
-
const operationPromise = instance._version._domain.twilio.request({
|
|
245
|
-
method: "get",
|
|
246
|
-
uri: targetUrl,
|
|
247
|
-
});
|
|
248
|
-
let pagePromise = operationPromise.then((payload) => new DevicePage(instance._version, payload, instance._solution));
|
|
249
|
-
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
250
|
-
return pagePromise;
|
|
251
|
-
};
|
|
252
|
-
instance.toJSON = function toJSON() {
|
|
253
|
-
return instance._solution;
|
|
254
|
-
};
|
|
255
|
-
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
256
|
-
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
257
|
-
};
|
|
258
|
-
return instance;
|
|
259
|
-
}
|
|
260
|
-
exports.DeviceListInstance = DeviceListInstance;
|
|
261
|
-
class DevicePage extends Page_1.default {
|
|
262
|
-
/**
|
|
263
|
-
* Initialize the DevicePage
|
|
264
|
-
*
|
|
265
|
-
* @param version - Version of the resource
|
|
266
|
-
* @param response - Response from the API
|
|
267
|
-
* @param solution - Path solution
|
|
268
|
-
*/
|
|
269
|
-
constructor(version, response, solution) {
|
|
270
|
-
super(version, response, solution);
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Build an instance of DeviceInstance
|
|
274
|
-
*
|
|
275
|
-
* @param payload - Payload response from the API
|
|
276
|
-
*/
|
|
277
|
-
getInstance(payload) {
|
|
278
|
-
return new DeviceInstance(this._version, payload, this._solution.fleetSid);
|
|
279
|
-
}
|
|
280
|
-
[util_1.inspect.custom](depth, options) {
|
|
281
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
exports.DevicePage = DevicePage;
|
|
@@ -1,330 +0,0 @@
|
|
|
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 DeployedDevices from "../../DeployedDevices";
|
|
6
|
-
/**
|
|
7
|
-
* Options to pass to update a KeyInstance
|
|
8
|
-
*/
|
|
9
|
-
export interface KeyContextUpdateOptions {
|
|
10
|
-
/** Provides a human readable descriptive text for this Key credential, up to 256 characters long. */
|
|
11
|
-
friendlyName?: string;
|
|
12
|
-
/** Provides the unique string identifier of an existing Device to become authenticated with this Key credential. */
|
|
13
|
-
deviceSid?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Options to pass to create a KeyInstance
|
|
17
|
-
*/
|
|
18
|
-
export interface KeyListInstanceCreateOptions {
|
|
19
|
-
/** Provides a human readable descriptive text for this Key credential, up to 256 characters long. */
|
|
20
|
-
friendlyName?: string;
|
|
21
|
-
/** Provides the unique string identifier of an existing Device to become authenticated with this Key credential. */
|
|
22
|
-
deviceSid?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Options to pass to each
|
|
26
|
-
*/
|
|
27
|
-
export interface KeyListInstanceEachOptions {
|
|
28
|
-
/** Filters the resulting list of Keys by a unique string identifier of an authenticated Device. */
|
|
29
|
-
deviceSid?: string;
|
|
30
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
31
|
-
pageSize?: number;
|
|
32
|
-
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
33
|
-
callback?: (item: KeyInstance, done: (err?: Error) => void) => void;
|
|
34
|
-
/** Function to be called upon completion of streaming */
|
|
35
|
-
done?: Function;
|
|
36
|
-
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
37
|
-
limit?: number;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Options to pass to list
|
|
41
|
-
*/
|
|
42
|
-
export interface KeyListInstanceOptions {
|
|
43
|
-
/** Filters the resulting list of Keys by a unique string identifier of an authenticated Device. */
|
|
44
|
-
deviceSid?: string;
|
|
45
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
46
|
-
pageSize?: number;
|
|
47
|
-
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
48
|
-
limit?: number;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Options to pass to page
|
|
52
|
-
*/
|
|
53
|
-
export interface KeyListInstancePageOptions {
|
|
54
|
-
/** Filters the resulting list of Keys by a unique string identifier of an authenticated Device. */
|
|
55
|
-
deviceSid?: string;
|
|
56
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
57
|
-
pageSize?: number;
|
|
58
|
-
/** Page Number, this value is simply for client state */
|
|
59
|
-
pageNumber?: number;
|
|
60
|
-
/** PageToken provided by the API */
|
|
61
|
-
pageToken?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface KeyContext {
|
|
64
|
-
/**
|
|
65
|
-
* Remove a KeyInstance
|
|
66
|
-
*
|
|
67
|
-
* @param callback - Callback to handle processed record
|
|
68
|
-
*
|
|
69
|
-
* @returns Resolves to processed boolean
|
|
70
|
-
*/
|
|
71
|
-
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
72
|
-
/**
|
|
73
|
-
* Fetch a KeyInstance
|
|
74
|
-
*
|
|
75
|
-
* @param callback - Callback to handle processed record
|
|
76
|
-
*
|
|
77
|
-
* @returns Resolves to processed KeyInstance
|
|
78
|
-
*/
|
|
79
|
-
fetch(callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
80
|
-
/**
|
|
81
|
-
* Update a KeyInstance
|
|
82
|
-
*
|
|
83
|
-
* @param callback - Callback to handle processed record
|
|
84
|
-
*
|
|
85
|
-
* @returns Resolves to processed KeyInstance
|
|
86
|
-
*/
|
|
87
|
-
update(callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
88
|
-
/**
|
|
89
|
-
* Update a KeyInstance
|
|
90
|
-
*
|
|
91
|
-
* @param params - Parameter for request
|
|
92
|
-
* @param callback - Callback to handle processed record
|
|
93
|
-
*
|
|
94
|
-
* @returns Resolves to processed KeyInstance
|
|
95
|
-
*/
|
|
96
|
-
update(params: KeyContextUpdateOptions, callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
97
|
-
/**
|
|
98
|
-
* Provide a user-friendly representation
|
|
99
|
-
*/
|
|
100
|
-
toJSON(): any;
|
|
101
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
102
|
-
}
|
|
103
|
-
export interface KeyContextSolution {
|
|
104
|
-
fleetSid: string;
|
|
105
|
-
sid: string;
|
|
106
|
-
}
|
|
107
|
-
export declare class KeyContextImpl implements KeyContext {
|
|
108
|
-
protected _version: DeployedDevices;
|
|
109
|
-
protected _solution: KeyContextSolution;
|
|
110
|
-
protected _uri: string;
|
|
111
|
-
constructor(_version: DeployedDevices, fleetSid: string, sid: string);
|
|
112
|
-
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
113
|
-
fetch(callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
114
|
-
update(params?: KeyContextUpdateOptions | ((error: Error | null, item?: KeyInstance) => any), callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
115
|
-
/**
|
|
116
|
-
* Provide a user-friendly representation
|
|
117
|
-
*
|
|
118
|
-
* @returns Object
|
|
119
|
-
*/
|
|
120
|
-
toJSON(): KeyContextSolution;
|
|
121
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
122
|
-
}
|
|
123
|
-
interface KeyPayload extends TwilioResponsePayload {
|
|
124
|
-
keys: KeyResource[];
|
|
125
|
-
}
|
|
126
|
-
interface KeyResource {
|
|
127
|
-
sid: string;
|
|
128
|
-
url: string;
|
|
129
|
-
friendly_name: string;
|
|
130
|
-
fleet_sid: string;
|
|
131
|
-
account_sid: string;
|
|
132
|
-
device_sid: string;
|
|
133
|
-
secret: string;
|
|
134
|
-
date_created: Date;
|
|
135
|
-
date_updated: Date;
|
|
136
|
-
}
|
|
137
|
-
export declare class KeyInstance {
|
|
138
|
-
protected _version: DeployedDevices;
|
|
139
|
-
protected _solution: KeyContextSolution;
|
|
140
|
-
protected _context?: KeyContext;
|
|
141
|
-
constructor(_version: DeployedDevices, payload: KeyResource, fleetSid: string, sid?: string);
|
|
142
|
-
/**
|
|
143
|
-
* Contains a 34 character string that uniquely identifies this Key credential resource.
|
|
144
|
-
*/
|
|
145
|
-
sid: string;
|
|
146
|
-
/**
|
|
147
|
-
* Contains an absolute URL for this Key credential resource.
|
|
148
|
-
*/
|
|
149
|
-
url: string;
|
|
150
|
-
/**
|
|
151
|
-
* Contains a human readable descriptive text for this Key credential, up to 256 characters long.
|
|
152
|
-
*/
|
|
153
|
-
friendlyName: string;
|
|
154
|
-
/**
|
|
155
|
-
* Specifies the unique string identifier of the Fleet that the given Key credential belongs to.
|
|
156
|
-
*/
|
|
157
|
-
fleetSid: string;
|
|
158
|
-
/**
|
|
159
|
-
* Specifies the unique string identifier of the Account responsible for this Key credential.
|
|
160
|
-
*/
|
|
161
|
-
accountSid: string;
|
|
162
|
-
/**
|
|
163
|
-
* Specifies the unique string identifier of a Device authenticated with this Key credential.
|
|
164
|
-
*/
|
|
165
|
-
deviceSid: string;
|
|
166
|
-
/**
|
|
167
|
-
* Contains the automatically generated secret belonging to this Key credential, used to authenticate the Device.
|
|
168
|
-
*/
|
|
169
|
-
secret: string;
|
|
170
|
-
/**
|
|
171
|
-
* Specifies the date this Key credential was created, given in UTC ISO 8601 format.
|
|
172
|
-
*/
|
|
173
|
-
dateCreated: Date;
|
|
174
|
-
/**
|
|
175
|
-
* Specifies the date this Key credential was last updated, given in UTC ISO 8601 format.
|
|
176
|
-
*/
|
|
177
|
-
dateUpdated: Date;
|
|
178
|
-
private get _proxy();
|
|
179
|
-
/**
|
|
180
|
-
* Remove a KeyInstance
|
|
181
|
-
*
|
|
182
|
-
* @param callback - Callback to handle processed record
|
|
183
|
-
*
|
|
184
|
-
* @returns Resolves to processed boolean
|
|
185
|
-
*/
|
|
186
|
-
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
187
|
-
/**
|
|
188
|
-
* Fetch a KeyInstance
|
|
189
|
-
*
|
|
190
|
-
* @param callback - Callback to handle processed record
|
|
191
|
-
*
|
|
192
|
-
* @returns Resolves to processed KeyInstance
|
|
193
|
-
*/
|
|
194
|
-
fetch(callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
195
|
-
/**
|
|
196
|
-
* Update a KeyInstance
|
|
197
|
-
*
|
|
198
|
-
* @param callback - Callback to handle processed record
|
|
199
|
-
*
|
|
200
|
-
* @returns Resolves to processed KeyInstance
|
|
201
|
-
*/
|
|
202
|
-
update(callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
203
|
-
/**
|
|
204
|
-
* Update a KeyInstance
|
|
205
|
-
*
|
|
206
|
-
* @param params - Parameter for request
|
|
207
|
-
* @param callback - Callback to handle processed record
|
|
208
|
-
*
|
|
209
|
-
* @returns Resolves to processed KeyInstance
|
|
210
|
-
*/
|
|
211
|
-
update(params: KeyContextUpdateOptions, callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
212
|
-
/**
|
|
213
|
-
* Provide a user-friendly representation
|
|
214
|
-
*
|
|
215
|
-
* @returns Object
|
|
216
|
-
*/
|
|
217
|
-
toJSON(): {
|
|
218
|
-
sid: string;
|
|
219
|
-
url: string;
|
|
220
|
-
friendlyName: string;
|
|
221
|
-
fleetSid: string;
|
|
222
|
-
accountSid: string;
|
|
223
|
-
deviceSid: string;
|
|
224
|
-
secret: string;
|
|
225
|
-
dateCreated: Date;
|
|
226
|
-
dateUpdated: Date;
|
|
227
|
-
};
|
|
228
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
229
|
-
}
|
|
230
|
-
export interface KeySolution {
|
|
231
|
-
fleetSid: string;
|
|
232
|
-
}
|
|
233
|
-
export interface KeyListInstance {
|
|
234
|
-
_version: DeployedDevices;
|
|
235
|
-
_solution: KeySolution;
|
|
236
|
-
_uri: string;
|
|
237
|
-
(sid: string): KeyContext;
|
|
238
|
-
get(sid: string): KeyContext;
|
|
239
|
-
/**
|
|
240
|
-
* Create a KeyInstance
|
|
241
|
-
*
|
|
242
|
-
* @param callback - Callback to handle processed record
|
|
243
|
-
*
|
|
244
|
-
* @returns Resolves to processed KeyInstance
|
|
245
|
-
*/
|
|
246
|
-
create(callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
247
|
-
/**
|
|
248
|
-
* Create a KeyInstance
|
|
249
|
-
*
|
|
250
|
-
* @param params - Parameter for request
|
|
251
|
-
* @param callback - Callback to handle processed record
|
|
252
|
-
*
|
|
253
|
-
* @returns Resolves to processed KeyInstance
|
|
254
|
-
*/
|
|
255
|
-
create(params: KeyListInstanceCreateOptions, callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
256
|
-
/**
|
|
257
|
-
* Streams KeyInstance records from the API.
|
|
258
|
-
*
|
|
259
|
-
* This operation lazily loads records as efficiently as possible until the limit
|
|
260
|
-
* is reached.
|
|
261
|
-
*
|
|
262
|
-
* The results are passed into the callback function, so this operation is memory
|
|
263
|
-
* efficient.
|
|
264
|
-
*
|
|
265
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
266
|
-
* function.
|
|
267
|
-
*
|
|
268
|
-
* @param { KeyListInstanceEachOptions } [params] - Options for request
|
|
269
|
-
* @param { function } [callback] - Function to process each record
|
|
270
|
-
*/
|
|
271
|
-
each(callback?: (item: KeyInstance, done: (err?: Error) => void) => void): void;
|
|
272
|
-
each(params: KeyListInstanceEachOptions, callback?: (item: KeyInstance, done: (err?: Error) => void) => void): void;
|
|
273
|
-
/**
|
|
274
|
-
* Retrieve a single target page of KeyInstance records from the API.
|
|
275
|
-
*
|
|
276
|
-
* The request is executed immediately.
|
|
277
|
-
*
|
|
278
|
-
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
279
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
280
|
-
*/
|
|
281
|
-
getPage(targetUrl: string, callback?: (error: Error | null, items: KeyPage) => any): Promise<KeyPage>;
|
|
282
|
-
/**
|
|
283
|
-
* Lists KeyInstance records from the API as a list.
|
|
284
|
-
*
|
|
285
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
286
|
-
* function.
|
|
287
|
-
*
|
|
288
|
-
* @param { KeyListInstanceOptions } [params] - Options for request
|
|
289
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
290
|
-
*/
|
|
291
|
-
list(callback?: (error: Error | null, items: KeyInstance[]) => any): Promise<KeyInstance[]>;
|
|
292
|
-
list(params: KeyListInstanceOptions, callback?: (error: Error | null, items: KeyInstance[]) => any): Promise<KeyInstance[]>;
|
|
293
|
-
/**
|
|
294
|
-
* Retrieve a single page of KeyInstance records from the API.
|
|
295
|
-
*
|
|
296
|
-
* The request is executed immediately.
|
|
297
|
-
*
|
|
298
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
299
|
-
* function.
|
|
300
|
-
*
|
|
301
|
-
* @param { KeyListInstancePageOptions } [params] - Options for request
|
|
302
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
303
|
-
*/
|
|
304
|
-
page(callback?: (error: Error | null, items: KeyPage) => any): Promise<KeyPage>;
|
|
305
|
-
page(params: KeyListInstancePageOptions, callback?: (error: Error | null, items: KeyPage) => any): Promise<KeyPage>;
|
|
306
|
-
/**
|
|
307
|
-
* Provide a user-friendly representation
|
|
308
|
-
*/
|
|
309
|
-
toJSON(): any;
|
|
310
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
311
|
-
}
|
|
312
|
-
export declare function KeyListInstance(version: DeployedDevices, fleetSid: string): KeyListInstance;
|
|
313
|
-
export declare class KeyPage extends Page<DeployedDevices, KeyPayload, KeyResource, KeyInstance> {
|
|
314
|
-
/**
|
|
315
|
-
* Initialize the KeyPage
|
|
316
|
-
*
|
|
317
|
-
* @param version - Version of the resource
|
|
318
|
-
* @param response - Response from the API
|
|
319
|
-
* @param solution - Path solution
|
|
320
|
-
*/
|
|
321
|
-
constructor(version: DeployedDevices, response: Response<string>, solution: KeySolution);
|
|
322
|
-
/**
|
|
323
|
-
* Build an instance of KeyInstance
|
|
324
|
-
*
|
|
325
|
-
* @param payload - Payload response from the API
|
|
326
|
-
*/
|
|
327
|
-
getInstance(payload: KeyResource): KeyInstance;
|
|
328
|
-
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
329
|
-
}
|
|
330
|
-
export {};
|