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.
Files changed (54) hide show
  1. package/lib/base/RequestClient.d.ts +1 -0
  2. package/lib/rest/Preview.d.ts +0 -5
  3. package/lib/rest/Preview.js +0 -7
  4. package/lib/rest/PreviewBase.d.ts +0 -3
  5. package/lib/rest/PreviewBase.js +0 -6
  6. package/lib/rest/accounts/V1.d.ts +10 -0
  7. package/lib/rest/accounts/V1.js +12 -0
  8. package/lib/rest/accounts/v1/bulkConsents.d.ts +53 -0
  9. package/lib/rest/accounts/v1/bulkConsents.js +74 -0
  10. package/lib/rest/accounts/v1/bulkContacts.d.ts +53 -0
  11. package/lib/rest/accounts/v1/bulkContacts.js +74 -0
  12. package/lib/rest/assistants/v1/assistant/assistantsKnowledge.d.ts +260 -0
  13. package/lib/rest/{preview/deployed_devices/fleet/key.js → assistants/v1/assistant/assistantsKnowledge.js} +62 -116
  14. package/lib/rest/assistants/v1/assistant/assistantsTool.d.ts +266 -0
  15. package/lib/rest/{preview/deployed_devices/fleet/deployment.js → assistants/v1/assistant/assistantsTool.js} +64 -112
  16. package/lib/rest/assistants/v1/assistant/message.d.ts +112 -0
  17. package/lib/rest/assistants/v1/assistant/message.js +90 -0
  18. package/lib/rest/assistants/v1/assistant.d.ts +38 -0
  19. package/lib/rest/assistants/v1/assistant.js +40 -0
  20. package/lib/rest/assistants/v1/knowledge/knowledgeStatus.d.ts +101 -0
  21. package/lib/rest/assistants/v1/knowledge/knowledgeStatus.js +115 -0
  22. package/lib/rest/assistants/v1/knowledge.d.ts +14 -0
  23. package/lib/rest/assistants/v1/knowledge.js +15 -0
  24. package/lib/rest/assistants/v1/tool.d.ts +67 -0
  25. package/lib/rest/assistants/v1/tool.js +28 -1
  26. package/lib/rest/iam/V1.d.ts +5 -5
  27. package/lib/rest/iam/V1.js +5 -5
  28. package/lib/rest/iam/v1/{newApiKey.d.ts → key.d.ts} +14 -14
  29. package/lib/rest/iam/v1/{newApiKey.js → key.js} +6 -6
  30. package/lib/rest/numbers/V1.d.ts +5 -5
  31. package/lib/rest/numbers/V1.js +6 -8
  32. package/lib/rest/numbers/v1/portingPortability.d.ts +2 -0
  33. package/lib/rest/numbers/v1/portingPortability.js +2 -0
  34. package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.d.ts → webhook.d.ts} +10 -10
  35. package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.js → webhook.js} +6 -6
  36. package/lib/rest/serverless/v1/service/environment/deployment.d.ts +2 -0
  37. package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
  38. package/lib/rest/taskrouter/v1/workspace/task.d.ts +2 -2
  39. package/lib/rest/verify/v2/service/verification.d.ts +2 -0
  40. package/lib/rest/verify/v2/service/verification.js +2 -0
  41. package/lib/rest/verify/v2/service/verificationCheck.d.ts +2 -0
  42. package/lib/rest/verify/v2/service/verificationCheck.js +2 -0
  43. package/lib/webhooks/webhooks.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/lib/rest/preview/DeployedDevices.d.ts +0 -15
  46. package/lib/rest/preview/DeployedDevices.js +0 -36
  47. package/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +0 -324
  48. package/lib/rest/preview/deployed_devices/fleet/certificate.js +0 -269
  49. package/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +0 -318
  50. package/lib/rest/preview/deployed_devices/fleet/device.d.ts +0 -358
  51. package/lib/rest/preview/deployed_devices/fleet/device.js +0 -284
  52. package/lib/rest/preview/deployed_devices/fleet/key.d.ts +0 -330
  53. package/lib/rest/preview/deployed_devices/fleet.d.ts +0 -352
  54. package/lib/rest/preview/deployed_devices/fleet.js +0 -307
@@ -1,318 +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 DeploymentInstance
8
- */
9
- export interface DeploymentContextUpdateOptions {
10
- /** Provides a human readable descriptive text for this Deployment, up to 64 characters long */
11
- friendlyName?: string;
12
- /** Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. */
13
- syncServiceSid?: string;
14
- }
15
- /**
16
- * Options to pass to create a DeploymentInstance
17
- */
18
- export interface DeploymentListInstanceCreateOptions {
19
- /** Provides a human readable descriptive text for this Deployment, up to 256 characters long. */
20
- friendlyName?: string;
21
- /** Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment. */
22
- syncServiceSid?: string;
23
- }
24
- /**
25
- * Options to pass to each
26
- */
27
- export interface DeploymentListInstanceEachOptions {
28
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
29
- pageSize?: number;
30
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
31
- callback?: (item: DeploymentInstance, done: (err?: Error) => void) => void;
32
- /** Function to be called upon completion of streaming */
33
- done?: Function;
34
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
35
- limit?: number;
36
- }
37
- /**
38
- * Options to pass to list
39
- */
40
- export interface DeploymentListInstanceOptions {
41
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
42
- pageSize?: number;
43
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
44
- limit?: number;
45
- }
46
- /**
47
- * Options to pass to page
48
- */
49
- export interface DeploymentListInstancePageOptions {
50
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
51
- pageSize?: number;
52
- /** Page Number, this value is simply for client state */
53
- pageNumber?: number;
54
- /** PageToken provided by the API */
55
- pageToken?: string;
56
- }
57
- export interface DeploymentContext {
58
- /**
59
- * Remove a DeploymentInstance
60
- *
61
- * @param callback - Callback to handle processed record
62
- *
63
- * @returns Resolves to processed boolean
64
- */
65
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
66
- /**
67
- * Fetch a DeploymentInstance
68
- *
69
- * @param callback - Callback to handle processed record
70
- *
71
- * @returns Resolves to processed DeploymentInstance
72
- */
73
- fetch(callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
74
- /**
75
- * Update a DeploymentInstance
76
- *
77
- * @param callback - Callback to handle processed record
78
- *
79
- * @returns Resolves to processed DeploymentInstance
80
- */
81
- update(callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
82
- /**
83
- * Update a DeploymentInstance
84
- *
85
- * @param params - Parameter for request
86
- * @param callback - Callback to handle processed record
87
- *
88
- * @returns Resolves to processed DeploymentInstance
89
- */
90
- update(params: DeploymentContextUpdateOptions, callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
91
- /**
92
- * Provide a user-friendly representation
93
- */
94
- toJSON(): any;
95
- [inspect.custom](_depth: any, options: InspectOptions): any;
96
- }
97
- export interface DeploymentContextSolution {
98
- fleetSid: string;
99
- sid: string;
100
- }
101
- export declare class DeploymentContextImpl implements DeploymentContext {
102
- protected _version: DeployedDevices;
103
- protected _solution: DeploymentContextSolution;
104
- protected _uri: string;
105
- constructor(_version: DeployedDevices, fleetSid: string, sid: string);
106
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
107
- fetch(callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
108
- update(params?: DeploymentContextUpdateOptions | ((error: Error | null, item?: DeploymentInstance) => any), callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
109
- /**
110
- * Provide a user-friendly representation
111
- *
112
- * @returns Object
113
- */
114
- toJSON(): DeploymentContextSolution;
115
- [inspect.custom](_depth: any, options: InspectOptions): string;
116
- }
117
- interface DeploymentPayload extends TwilioResponsePayload {
118
- deployments: DeploymentResource[];
119
- }
120
- interface DeploymentResource {
121
- sid: string;
122
- url: string;
123
- friendly_name: string;
124
- fleet_sid: string;
125
- account_sid: string;
126
- sync_service_sid: string;
127
- date_created: Date;
128
- date_updated: Date;
129
- }
130
- export declare class DeploymentInstance {
131
- protected _version: DeployedDevices;
132
- protected _solution: DeploymentContextSolution;
133
- protected _context?: DeploymentContext;
134
- constructor(_version: DeployedDevices, payload: DeploymentResource, fleetSid: string, sid?: string);
135
- /**
136
- * Contains a 34 character string that uniquely identifies this Deployment resource.
137
- */
138
- sid: string;
139
- /**
140
- * Contains an absolute URL for this Deployment resource.
141
- */
142
- url: string;
143
- /**
144
- * Contains a human readable descriptive text for this Deployment, up to 64 characters long
145
- */
146
- friendlyName: string;
147
- /**
148
- * Specifies the unique string identifier of the Fleet that the given Deployment belongs to.
149
- */
150
- fleetSid: string;
151
- /**
152
- * Specifies the unique string identifier of the Account responsible for this Deployment.
153
- */
154
- accountSid: string;
155
- /**
156
- * Specifies the unique string identifier of the Twilio Sync service instance linked to and accessible by this Deployment.
157
- */
158
- syncServiceSid: string;
159
- /**
160
- * Specifies the date this Deployment was created, given in UTC ISO 8601 format.
161
- */
162
- dateCreated: Date;
163
- /**
164
- * Specifies the date this Deployment was last updated, given in UTC ISO 8601 format.
165
- */
166
- dateUpdated: Date;
167
- private get _proxy();
168
- /**
169
- * Remove a DeploymentInstance
170
- *
171
- * @param callback - Callback to handle processed record
172
- *
173
- * @returns Resolves to processed boolean
174
- */
175
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
176
- /**
177
- * Fetch a DeploymentInstance
178
- *
179
- * @param callback - Callback to handle processed record
180
- *
181
- * @returns Resolves to processed DeploymentInstance
182
- */
183
- fetch(callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
184
- /**
185
- * Update a DeploymentInstance
186
- *
187
- * @param callback - Callback to handle processed record
188
- *
189
- * @returns Resolves to processed DeploymentInstance
190
- */
191
- update(callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
192
- /**
193
- * Update a DeploymentInstance
194
- *
195
- * @param params - Parameter for request
196
- * @param callback - Callback to handle processed record
197
- *
198
- * @returns Resolves to processed DeploymentInstance
199
- */
200
- update(params: DeploymentContextUpdateOptions, callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
201
- /**
202
- * Provide a user-friendly representation
203
- *
204
- * @returns Object
205
- */
206
- toJSON(): {
207
- sid: string;
208
- url: string;
209
- friendlyName: string;
210
- fleetSid: string;
211
- accountSid: string;
212
- syncServiceSid: string;
213
- dateCreated: Date;
214
- dateUpdated: Date;
215
- };
216
- [inspect.custom](_depth: any, options: InspectOptions): string;
217
- }
218
- export interface DeploymentSolution {
219
- fleetSid: string;
220
- }
221
- export interface DeploymentListInstance {
222
- _version: DeployedDevices;
223
- _solution: DeploymentSolution;
224
- _uri: string;
225
- (sid: string): DeploymentContext;
226
- get(sid: string): DeploymentContext;
227
- /**
228
- * Create a DeploymentInstance
229
- *
230
- * @param callback - Callback to handle processed record
231
- *
232
- * @returns Resolves to processed DeploymentInstance
233
- */
234
- create(callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
235
- /**
236
- * Create a DeploymentInstance
237
- *
238
- * @param params - Parameter for request
239
- * @param callback - Callback to handle processed record
240
- *
241
- * @returns Resolves to processed DeploymentInstance
242
- */
243
- create(params: DeploymentListInstanceCreateOptions, callback?: (error: Error | null, item?: DeploymentInstance) => any): Promise<DeploymentInstance>;
244
- /**
245
- * Streams DeploymentInstance records from the API.
246
- *
247
- * This operation lazily loads records as efficiently as possible until the limit
248
- * is reached.
249
- *
250
- * The results are passed into the callback function, so this operation is memory
251
- * efficient.
252
- *
253
- * If a function is passed as the first argument, it will be used as the callback
254
- * function.
255
- *
256
- * @param { DeploymentListInstanceEachOptions } [params] - Options for request
257
- * @param { function } [callback] - Function to process each record
258
- */
259
- each(callback?: (item: DeploymentInstance, done: (err?: Error) => void) => void): void;
260
- each(params: DeploymentListInstanceEachOptions, callback?: (item: DeploymentInstance, done: (err?: Error) => void) => void): void;
261
- /**
262
- * Retrieve a single target page of DeploymentInstance records from the API.
263
- *
264
- * The request is executed immediately.
265
- *
266
- * @param { string } [targetUrl] - API-generated URL for the requested results page
267
- * @param { function } [callback] - Callback to handle list of records
268
- */
269
- getPage(targetUrl: string, callback?: (error: Error | null, items: DeploymentPage) => any): Promise<DeploymentPage>;
270
- /**
271
- * Lists DeploymentInstance records from the API as a list.
272
- *
273
- * If a function is passed as the first argument, it will be used as the callback
274
- * function.
275
- *
276
- * @param { DeploymentListInstanceOptions } [params] - Options for request
277
- * @param { function } [callback] - Callback to handle list of records
278
- */
279
- list(callback?: (error: Error | null, items: DeploymentInstance[]) => any): Promise<DeploymentInstance[]>;
280
- list(params: DeploymentListInstanceOptions, callback?: (error: Error | null, items: DeploymentInstance[]) => any): Promise<DeploymentInstance[]>;
281
- /**
282
- * Retrieve a single page of DeploymentInstance records from the API.
283
- *
284
- * The request is executed immediately.
285
- *
286
- * If a function is passed as the first argument, it will be used as the callback
287
- * function.
288
- *
289
- * @param { DeploymentListInstancePageOptions } [params] - Options for request
290
- * @param { function } [callback] - Callback to handle list of records
291
- */
292
- page(callback?: (error: Error | null, items: DeploymentPage) => any): Promise<DeploymentPage>;
293
- page(params: DeploymentListInstancePageOptions, callback?: (error: Error | null, items: DeploymentPage) => any): Promise<DeploymentPage>;
294
- /**
295
- * Provide a user-friendly representation
296
- */
297
- toJSON(): any;
298
- [inspect.custom](_depth: any, options: InspectOptions): any;
299
- }
300
- export declare function DeploymentListInstance(version: DeployedDevices, fleetSid: string): DeploymentListInstance;
301
- export declare class DeploymentPage extends Page<DeployedDevices, DeploymentPayload, DeploymentResource, DeploymentInstance> {
302
- /**
303
- * Initialize the DeploymentPage
304
- *
305
- * @param version - Version of the resource
306
- * @param response - Response from the API
307
- * @param solution - Path solution
308
- */
309
- constructor(version: DeployedDevices, response: Response<string>, solution: DeploymentSolution);
310
- /**
311
- * Build an instance of DeploymentInstance
312
- *
313
- * @param payload - Payload response from the API
314
- */
315
- getInstance(payload: DeploymentResource): DeploymentInstance;
316
- [inspect.custom](depth: any, options: InspectOptions): string;
317
- }
318
- export {};
@@ -1,358 +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 DeviceInstance
8
- */
9
- export interface DeviceContextUpdateOptions {
10
- /** Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. */
11
- friendlyName?: string;
12
- /** Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. */
13
- identity?: string;
14
- /** Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. */
15
- deploymentSid?: string;
16
- /** */
17
- enabled?: boolean;
18
- }
19
- /**
20
- * Options to pass to create a DeviceInstance
21
- */
22
- export interface DeviceListInstanceCreateOptions {
23
- /** Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long. */
24
- uniqueName?: string;
25
- /** Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long. */
26
- friendlyName?: string;
27
- /** Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long. */
28
- identity?: string;
29
- /** Specifies the unique string identifier of the Deployment group that this Device is going to be associated with. */
30
- deploymentSid?: string;
31
- /** */
32
- enabled?: boolean;
33
- }
34
- /**
35
- * Options to pass to each
36
- */
37
- export interface DeviceListInstanceEachOptions {
38
- /** Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with. */
39
- deploymentSid?: string;
40
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
41
- pageSize?: number;
42
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
43
- callback?: (item: DeviceInstance, done: (err?: Error) => void) => void;
44
- /** Function to be called upon completion of streaming */
45
- done?: Function;
46
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
47
- limit?: number;
48
- }
49
- /**
50
- * Options to pass to list
51
- */
52
- export interface DeviceListInstanceOptions {
53
- /** Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with. */
54
- deploymentSid?: string;
55
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
56
- pageSize?: number;
57
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
58
- limit?: number;
59
- }
60
- /**
61
- * Options to pass to page
62
- */
63
- export interface DeviceListInstancePageOptions {
64
- /** Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with. */
65
- deploymentSid?: string;
66
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
67
- pageSize?: number;
68
- /** Page Number, this value is simply for client state */
69
- pageNumber?: number;
70
- /** PageToken provided by the API */
71
- pageToken?: string;
72
- }
73
- export interface DeviceContext {
74
- /**
75
- * Remove a DeviceInstance
76
- *
77
- * @param callback - Callback to handle processed record
78
- *
79
- * @returns Resolves to processed boolean
80
- */
81
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
82
- /**
83
- * Fetch a DeviceInstance
84
- *
85
- * @param callback - Callback to handle processed record
86
- *
87
- * @returns Resolves to processed DeviceInstance
88
- */
89
- fetch(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
90
- /**
91
- * Update a DeviceInstance
92
- *
93
- * @param callback - Callback to handle processed record
94
- *
95
- * @returns Resolves to processed DeviceInstance
96
- */
97
- update(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
98
- /**
99
- * Update a DeviceInstance
100
- *
101
- * @param params - Parameter for request
102
- * @param callback - Callback to handle processed record
103
- *
104
- * @returns Resolves to processed DeviceInstance
105
- */
106
- update(params: DeviceContextUpdateOptions, callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
107
- /**
108
- * Provide a user-friendly representation
109
- */
110
- toJSON(): any;
111
- [inspect.custom](_depth: any, options: InspectOptions): any;
112
- }
113
- export interface DeviceContextSolution {
114
- fleetSid: string;
115
- sid: string;
116
- }
117
- export declare class DeviceContextImpl implements DeviceContext {
118
- protected _version: DeployedDevices;
119
- protected _solution: DeviceContextSolution;
120
- protected _uri: string;
121
- constructor(_version: DeployedDevices, fleetSid: string, sid: string);
122
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
123
- fetch(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
124
- update(params?: DeviceContextUpdateOptions | ((error: Error | null, item?: DeviceInstance) => any), callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
125
- /**
126
- * Provide a user-friendly representation
127
- *
128
- * @returns Object
129
- */
130
- toJSON(): DeviceContextSolution;
131
- [inspect.custom](_depth: any, options: InspectOptions): string;
132
- }
133
- interface DevicePayload extends TwilioResponsePayload {
134
- devices: DeviceResource[];
135
- }
136
- interface DeviceResource {
137
- sid: string;
138
- url: string;
139
- unique_name: string;
140
- friendly_name: string;
141
- fleet_sid: string;
142
- enabled: boolean;
143
- account_sid: string;
144
- identity: string;
145
- deployment_sid: string;
146
- date_created: Date;
147
- date_updated: Date;
148
- date_authenticated: Date;
149
- }
150
- export declare class DeviceInstance {
151
- protected _version: DeployedDevices;
152
- protected _solution: DeviceContextSolution;
153
- protected _context?: DeviceContext;
154
- constructor(_version: DeployedDevices, payload: DeviceResource, fleetSid: string, sid?: string);
155
- /**
156
- * Contains a 34 character string that uniquely identifies this Device resource.
157
- */
158
- sid: string;
159
- /**
160
- * Contains an absolute URL for this Device resource.
161
- */
162
- url: string;
163
- /**
164
- * Contains a unique and addressable name of this Device, assigned by the developer, up to 128 characters long.
165
- */
166
- uniqueName: string;
167
- /**
168
- * Contains a human readable descriptive text for this Device, up to 256 characters long
169
- */
170
- friendlyName: string;
171
- /**
172
- * Specifies the unique string identifier of the Fleet that the given Device belongs to.
173
- */
174
- fleetSid: string;
175
- /**
176
- * Contains a boolean flag indicating whether the device is enabled or not, blocks device connectivity if set to false.
177
- */
178
- enabled: boolean;
179
- /**
180
- * Specifies the unique string identifier of the Account responsible for this Device.
181
- */
182
- accountSid: string;
183
- /**
184
- * Contains an arbitrary string identifier representing a human user associated with this Device, assigned by the developer, up to 256 characters long.
185
- */
186
- identity: string;
187
- /**
188
- * Specifies the unique string identifier of the Deployment group that this Device is associated with.
189
- */
190
- deploymentSid: string;
191
- /**
192
- * Specifies the date this Device was created, given in UTC ISO 8601 format.
193
- */
194
- dateCreated: Date;
195
- /**
196
- * Specifies the date this Device was last updated, given in UTC ISO 8601 format.
197
- */
198
- dateUpdated: Date;
199
- /**
200
- * Specifies the date this Device was last authenticated, given in UTC ISO 8601 format.
201
- */
202
- dateAuthenticated: Date;
203
- private get _proxy();
204
- /**
205
- * Remove a DeviceInstance
206
- *
207
- * @param callback - Callback to handle processed record
208
- *
209
- * @returns Resolves to processed boolean
210
- */
211
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
212
- /**
213
- * Fetch a DeviceInstance
214
- *
215
- * @param callback - Callback to handle processed record
216
- *
217
- * @returns Resolves to processed DeviceInstance
218
- */
219
- fetch(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
220
- /**
221
- * Update a DeviceInstance
222
- *
223
- * @param callback - Callback to handle processed record
224
- *
225
- * @returns Resolves to processed DeviceInstance
226
- */
227
- update(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
228
- /**
229
- * Update a DeviceInstance
230
- *
231
- * @param params - Parameter for request
232
- * @param callback - Callback to handle processed record
233
- *
234
- * @returns Resolves to processed DeviceInstance
235
- */
236
- update(params: DeviceContextUpdateOptions, callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
237
- /**
238
- * Provide a user-friendly representation
239
- *
240
- * @returns Object
241
- */
242
- toJSON(): {
243
- sid: string;
244
- url: string;
245
- uniqueName: string;
246
- friendlyName: string;
247
- fleetSid: string;
248
- enabled: boolean;
249
- accountSid: string;
250
- identity: string;
251
- deploymentSid: string;
252
- dateCreated: Date;
253
- dateUpdated: Date;
254
- dateAuthenticated: Date;
255
- };
256
- [inspect.custom](_depth: any, options: InspectOptions): string;
257
- }
258
- export interface DeviceSolution {
259
- fleetSid: string;
260
- }
261
- export interface DeviceListInstance {
262
- _version: DeployedDevices;
263
- _solution: DeviceSolution;
264
- _uri: string;
265
- (sid: string): DeviceContext;
266
- get(sid: string): DeviceContext;
267
- /**
268
- * Create a DeviceInstance
269
- *
270
- * @param callback - Callback to handle processed record
271
- *
272
- * @returns Resolves to processed DeviceInstance
273
- */
274
- create(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
275
- /**
276
- * Create a DeviceInstance
277
- *
278
- * @param params - Parameter for request
279
- * @param callback - Callback to handle processed record
280
- *
281
- * @returns Resolves to processed DeviceInstance
282
- */
283
- create(params: DeviceListInstanceCreateOptions, callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
284
- /**
285
- * Streams DeviceInstance records from the API.
286
- *
287
- * This operation lazily loads records as efficiently as possible until the limit
288
- * is reached.
289
- *
290
- * The results are passed into the callback function, so this operation is memory
291
- * efficient.
292
- *
293
- * If a function is passed as the first argument, it will be used as the callback
294
- * function.
295
- *
296
- * @param { DeviceListInstanceEachOptions } [params] - Options for request
297
- * @param { function } [callback] - Function to process each record
298
- */
299
- each(callback?: (item: DeviceInstance, done: (err?: Error) => void) => void): void;
300
- each(params: DeviceListInstanceEachOptions, callback?: (item: DeviceInstance, done: (err?: Error) => void) => void): void;
301
- /**
302
- * Retrieve a single target page of DeviceInstance records from the API.
303
- *
304
- * The request is executed immediately.
305
- *
306
- * @param { string } [targetUrl] - API-generated URL for the requested results page
307
- * @param { function } [callback] - Callback to handle list of records
308
- */
309
- getPage(targetUrl: string, callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
310
- /**
311
- * Lists DeviceInstance records from the API as a list.
312
- *
313
- * If a function is passed as the first argument, it will be used as the callback
314
- * function.
315
- *
316
- * @param { DeviceListInstanceOptions } [params] - Options for request
317
- * @param { function } [callback] - Callback to handle list of records
318
- */
319
- list(callback?: (error: Error | null, items: DeviceInstance[]) => any): Promise<DeviceInstance[]>;
320
- list(params: DeviceListInstanceOptions, callback?: (error: Error | null, items: DeviceInstance[]) => any): Promise<DeviceInstance[]>;
321
- /**
322
- * Retrieve a single page of DeviceInstance records from the API.
323
- *
324
- * The request is executed immediately.
325
- *
326
- * If a function is passed as the first argument, it will be used as the callback
327
- * function.
328
- *
329
- * @param { DeviceListInstancePageOptions } [params] - Options for request
330
- * @param { function } [callback] - Callback to handle list of records
331
- */
332
- page(callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
333
- page(params: DeviceListInstancePageOptions, callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
334
- /**
335
- * Provide a user-friendly representation
336
- */
337
- toJSON(): any;
338
- [inspect.custom](_depth: any, options: InspectOptions): any;
339
- }
340
- export declare function DeviceListInstance(version: DeployedDevices, fleetSid: string): DeviceListInstance;
341
- export declare class DevicePage extends Page<DeployedDevices, DevicePayload, DeviceResource, DeviceInstance> {
342
- /**
343
- * Initialize the DevicePage
344
- *
345
- * @param version - Version of the resource
346
- * @param response - Response from the API
347
- * @param solution - Path solution
348
- */
349
- constructor(version: DeployedDevices, response: Response<string>, solution: DeviceSolution);
350
- /**
351
- * Build an instance of DeviceInstance
352
- *
353
- * @param payload - Payload response from the API
354
- */
355
- getInstance(payload: DeviceResource): DeviceInstance;
356
- [inspect.custom](depth: any, options: InspectOptions): string;
357
- }
358
- export {};