twilio 5.7.1 → 5.7.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/rest/Twilio.d.ts +0 -10
- package/lib/rest/Twilio.js +0 -11
- package/lib/rest/accounts/v1/bulkConsents.d.ts +4 -4
- package/lib/rest/accounts/v1/bulkConsents.js +1 -1
- package/lib/rest/accounts/v1/bulkContacts.d.ts +4 -4
- package/lib/rest/accounts/v1/bulkContacts.js +1 -1
- package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +3 -3
- package/lib/rest/api/v2010/account/call/event.d.ts +6 -6
- package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/recording.d.ts +3 -3
- package/lib/rest/api/v2010/account/conference/recording.d.ts +3 -3
- package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.d.ts +3 -3
- package/lib/rest/api/v2010/account/recording.d.ts +3 -3
- package/lib/rest/bulkexports/v1/export/day.d.ts +3 -3
- package/lib/rest/bulkexports/v1/export/exportCustomJob.d.ts +3 -3
- package/lib/rest/bulkexports/v1/export/job.d.ts +3 -3
- package/lib/rest/chat/v1/service.d.ts +9 -9
- package/lib/rest/chat/v2/service/channel/message.d.ts +3 -3
- package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -3
- package/lib/rest/chat/v2/service.d.ts +9 -9
- package/lib/rest/conversations/v1/addressConfiguration.d.ts +4 -4
- package/lib/rest/conversations/v1/conversation/message.d.ts +6 -6
- package/lib/rest/conversations/v1/conversation/participant.d.ts +3 -3
- package/lib/rest/conversations/v1/conversation/webhook.d.ts +4 -4
- package/lib/rest/conversations/v1/conversation.d.ts +6 -6
- package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +6 -6
- package/lib/rest/conversations/v1/participantConversation.d.ts +6 -6
- package/lib/rest/conversations/v1/service/configuration/notification.d.ts +9 -9
- package/lib/rest/conversations/v1/service/conversation/message.d.ts +6 -6
- package/lib/rest/conversations/v1/service/conversation/participant.d.ts +3 -3
- package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +4 -4
- package/lib/rest/conversations/v1/service/conversation.d.ts +6 -6
- package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +6 -6
- package/lib/rest/conversations/v1/service/participantConversation.d.ts +6 -6
- package/lib/rest/conversations/v1/service/user/userConversation.d.ts +3 -3
- package/lib/rest/conversations/v1/user/userConversation.d.ts +3 -3
- package/lib/rest/events/v1/sink.d.ts +4 -4
- package/lib/rest/events/v1/subscription.d.ts +1 -1
- package/lib/rest/events/v1/subscription.js +1 -1
- package/lib/rest/flexApi/v1/assessments.d.ts +3 -3
- package/lib/rest/flexApi/v1/configuration.d.ts +66 -66
- package/lib/rest/flexApi/v1/flexFlow.d.ts +3 -3
- package/lib/rest/flexApi/v1/insightsAssessmentsComment.d.ts +3 -3
- package/lib/rest/flexApi/v1/insightsConversations.d.ts +3 -3
- package/lib/rest/flexApi/v1/insightsQuestionnaires.d.ts +3 -3
- package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +6 -6
- package/lib/rest/flexApi/v1/insightsSegments.d.ts +9 -9
- package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.d.ts +9 -9
- package/lib/rest/flexApi/v1/insightsSettingsComment.d.ts +3 -3
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +4 -4
- package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +5 -5
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +1 -1
- package/lib/rest/flexApi/v1/interaction.d.ts +8 -8
- package/lib/rest/flexApi/v1/pluginConfiguration.d.ts +1 -1
- package/lib/rest/flexApi/v1/pluginConfiguration.js +1 -1
- package/lib/rest/intelligence/v2/customOperator.d.ts +5 -5
- package/lib/rest/intelligence/v2/operator.d.ts +3 -3
- package/lib/rest/intelligence/v2/operatorType.d.ts +3 -3
- package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -3
- package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +15 -15
- package/lib/rest/intelligence/v2/transcript/sentence.d.ts +3 -3
- package/lib/rest/intelligence/v2/transcript.d.ts +4 -4
- package/lib/rest/ipMessaging/v1/service.d.ts +9 -9
- package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +3 -3
- package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +3 -3
- package/lib/rest/ipMessaging/v2/service.d.ts +9 -9
- package/lib/rest/lookups/V2.d.ts +20 -0
- package/lib/rest/lookups/V2.js +25 -0
- package/lib/rest/lookups/v2/bucket.d.ts +205 -0
- package/lib/rest/lookups/v2/bucket.js +187 -0
- package/lib/rest/lookups/v2/lookupOverride.d.ts +279 -0
- package/lib/rest/lookups/v2/lookupOverride.js +225 -0
- package/lib/rest/lookups/v2/query.d.ts +175 -0
- package/lib/rest/lookups/v2/query.js +123 -0
- package/lib/rest/lookups/v2/rateLimit.d.ts +83 -0
- package/lib/rest/lookups/v2/rateLimit.js +82 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +3 -3
- package/lib/rest/messaging/v1/service/usAppToPersonUsecase.d.ts +3 -3
- package/lib/rest/messaging/v1/service.d.ts +3 -3
- package/lib/rest/messaging/v1/tollfreeVerification.d.ts +3 -3
- package/lib/rest/messaging/v1/usecase.d.ts +3 -3
- package/lib/rest/messaging/v2/channelsSender.d.ts +49 -4
- package/lib/rest/messaging/v2/channelsSender.js +14 -2
- package/lib/rest/monitor/v1/event.d.ts +3 -3
- package/lib/rest/notify/v1/service/notification.d.ts +28 -28
- package/lib/rest/numbers/v1/bulkEligibility.d.ts +3 -3
- package/lib/rest/numbers/v1/eligibility.d.ts +3 -3
- package/lib/rest/numbers/v1/portingPortIn.d.ts +6 -6
- package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -3
- package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -3
- package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +5 -5
- package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.d.ts +3 -3
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -3
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +8 -8
- package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.d.ts +3 -3
- package/lib/rest/preview/marketplace/availableAddOn.d.ts +3 -3
- package/lib/rest/preview/marketplace/installedAddOn.d.ts +5 -5
- package/lib/rest/preview/wireless/sim/usage.d.ts +15 -15
- package/lib/rest/proxy/v1/service/session.d.ts +1 -1
- package/lib/rest/proxy/v1/service/session.js +1 -1
- package/lib/rest/proxy/v1/service.d.ts +0 -8
- package/lib/rest/proxy/v1/service.js +0 -13
- package/lib/rest/serverless/v1/service/build.d.ts +9 -9
- package/lib/rest/serverless/v1/service/environment/log.d.ts +6 -7
- package/lib/rest/studio/v1/flow/engagement/engagementContext.d.ts +3 -3
- package/lib/rest/studio/v1/flow/engagement/step/stepContext.d.ts +3 -3
- package/lib/rest/studio/v1/flow/engagement/step.d.ts +3 -3
- package/lib/rest/studio/v1/flow/engagement.d.ts +4 -4
- package/lib/rest/studio/v1/flow/execution/executionContext.d.ts +3 -3
- package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.d.ts +3 -3
- package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +3 -3
- package/lib/rest/studio/v1/flow/execution.d.ts +4 -4
- package/lib/rest/studio/v2/flow/execution/executionContext.d.ts +3 -3
- package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.d.ts +3 -3
- package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +3 -3
- package/lib/rest/studio/v2/flow/execution.d.ts +4 -4
- package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -6
- package/lib/rest/studio/v2/flow.d.ts +11 -11
- package/lib/rest/studio/v2/flowValidate.d.ts +1 -1
- package/lib/rest/supersim/v1/network.d.ts +3 -3
- package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.d.ts +3 -3
- package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -3
- package/lib/rest/supersim/v1/usageRecord.d.ts +3 -3
- package/lib/rest/sync/v1/service/document.d.ts +2 -2
- package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +2 -2
- package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +2 -2
- package/lib/rest/sync/v1/service/syncStream/streamMessage.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/event.d.ts +3 -3
- package/lib/rest/taskrouter/v1/workspace/task.d.ts +1 -1
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.d.ts +3 -3
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +12 -12
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +9 -9
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.d.ts +6 -6
- package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.d.ts +6 -6
- package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.d.ts +3 -3
- package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.d.ts +3 -3
- package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.d.ts +3 -3
- package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.d.ts +6 -6
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +9 -9
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.d.ts +6 -6
- package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.d.ts +6 -6
- package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +9 -9
- package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.d.ts +9 -9
- package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.d.ts +6 -6
- package/lib/rest/trunking/v1/trunk.d.ts +9 -3
- package/lib/rest/trunking/v1/trunk.js +2 -0
- package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -3
- package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -3
- package/lib/rest/trusthub/v1/endUser.d.ts +5 -5
- package/lib/rest/trusthub/v1/endUserType.d.ts +3 -3
- package/lib/rest/trusthub/v1/policies.d.ts +3 -3
- package/lib/rest/trusthub/v1/supportingDocument.d.ts +5 -5
- package/lib/rest/trusthub/v1/supportingDocumentType.d.ts +3 -3
- package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -3
- package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -3
- package/lib/rest/verify/v2/form.d.ts +6 -6
- package/lib/rest/verify/v2/service/entity/challenge.d.ts +12 -12
- package/lib/rest/verify/v2/service/entity/challenge.js +1 -1
- package/lib/rest/verify/v2/service/entity/factor.d.ts +6 -6
- package/lib/rest/verify/v2/service/entity/newFactor.d.ts +10 -10
- package/lib/rest/verify/v2/service/verification.d.ts +11 -11
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -3
- package/lib/rest/verify/v2/service.d.ts +9 -9
- package/lib/rest/verify/v2/template.d.ts +3 -3
- package/lib/rest/verify/v2/verificationAttempt.d.ts +11 -11
- package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +2 -2
- package/lib/rest/video/v1/composition.d.ts +1 -1
- package/lib/rest/video/v1/compositionHook.d.ts +2 -2
- package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +1 -1
- package/lib/rest/video/v1/room/recordingRules.d.ts +1 -1
- package/lib/rest/video/v1/room/transcriptions.d.ts +316 -0
- package/lib/rest/{proxy/v1/service/shortCode.js → video/v1/room/transcriptions.js} +61 -78
- package/lib/rest/video/v1/room.d.ts +9 -1
- package/lib/rest/video/v1/room.js +13 -0
- package/lib/rest/wireless/v1/sim/dataSession.d.ts +3 -3
- package/lib/rest/wireless/v1/sim/usageRecord.d.ts +9 -9
- package/lib/rest/wireless/v1/usageRecord.d.ts +9 -9
- package/lib/twiml/VoiceResponse.d.ts +31 -0
- package/lib/twiml/VoiceResponse.js +18 -0
- package/package.json +1 -1
- package/lib/rest/Knowledge.d.ts +0 -4
- package/lib/rest/Knowledge.js +0 -8
- package/lib/rest/KnowledgeBase.d.ts +0 -13
- package/lib/rest/KnowledgeBase.js +0 -31
- package/lib/rest/Microvisor.d.ts +0 -14
- package/lib/rest/Microvisor.js +0 -22
- package/lib/rest/MicrovisorBase.d.ts +0 -13
- package/lib/rest/MicrovisorBase.js +0 -31
- package/lib/rest/knowledge/V1.d.ts +0 -15
- package/lib/rest/knowledge/V1.js +0 -36
- package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +0 -167
- package/lib/rest/knowledge/v1/knowledge/chunk.js +0 -131
- package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +0 -101
- package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +0 -118
- package/lib/rest/knowledge/v1/knowledge.d.ts +0 -412
- package/lib/rest/knowledge/v1/knowledge.js +0 -302
- package/lib/rest/microvisor/V1.d.ts +0 -30
- package/lib/rest/microvisor/V1.js +0 -56
- package/lib/rest/microvisor/v1/accountConfig.d.ts +0 -263
- package/lib/rest/microvisor/v1/accountConfig.js +0 -254
- package/lib/rest/microvisor/v1/accountSecret.d.ts +0 -257
- package/lib/rest/microvisor/v1/accountSecret.js +0 -252
- package/lib/rest/microvisor/v1/app/appManifest.d.ts +0 -101
- package/lib/rest/microvisor/v1/app/appManifest.js +0 -118
- package/lib/rest/microvisor/v1/app.d.ts +0 -251
- package/lib/rest/microvisor/v1/app.js +0 -222
- package/lib/rest/microvisor/v1/device/deviceConfig.d.ts +0 -271
- package/lib/rest/microvisor/v1/device/deviceConfig.js +0 -262
- package/lib/rest/microvisor/v1/device/deviceSecret.d.ts +0 -265
- package/lib/rest/microvisor/v1/device/deviceSecret.js +0 -260
- package/lib/rest/microvisor/v1/device.d.ts +0 -299
- package/lib/rest/microvisor/v1/device.js +0 -250
- package/lib/rest/proxy/v1/service/shortCode.d.ts +0 -316
|
@@ -1,299 +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 V1 from "../V1";
|
|
6
|
-
import { DeviceConfigListInstance } from "./device/deviceConfig";
|
|
7
|
-
import { DeviceSecretListInstance } from "./device/deviceSecret";
|
|
8
|
-
/**
|
|
9
|
-
* Options to pass to update a DeviceInstance
|
|
10
|
-
*/
|
|
11
|
-
export interface DeviceContextUpdateOptions {
|
|
12
|
-
/** A unique and addressable name to be assigned to this Device by the developer. It may be used in place of the Device SID. */
|
|
13
|
-
uniqueName?: string;
|
|
14
|
-
/** The SID or unique name of the App to be targeted to the Device. */
|
|
15
|
-
targetApp?: string;
|
|
16
|
-
/** A Boolean flag specifying whether to enable application logging. Logs will be enabled or extended for 24 hours. */
|
|
17
|
-
loggingEnabled?: boolean;
|
|
18
|
-
/** Set to true to restart the App running on the Device. */
|
|
19
|
-
restartApp?: boolean;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Options to pass to each
|
|
23
|
-
*/
|
|
24
|
-
export interface DeviceListInstanceEachOptions {
|
|
25
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
26
|
-
pageSize?: number;
|
|
27
|
-
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
28
|
-
callback?: (item: DeviceInstance, done: (err?: Error) => void) => void;
|
|
29
|
-
/** Function to be called upon completion of streaming */
|
|
30
|
-
done?: Function;
|
|
31
|
-
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
32
|
-
limit?: number;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Options to pass to list
|
|
36
|
-
*/
|
|
37
|
-
export interface DeviceListInstanceOptions {
|
|
38
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
39
|
-
pageSize?: number;
|
|
40
|
-
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
41
|
-
limit?: number;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Options to pass to page
|
|
45
|
-
*/
|
|
46
|
-
export interface DeviceListInstancePageOptions {
|
|
47
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
48
|
-
pageSize?: number;
|
|
49
|
-
/** Page Number, this value is simply for client state */
|
|
50
|
-
pageNumber?: number;
|
|
51
|
-
/** PageToken provided by the API */
|
|
52
|
-
pageToken?: string;
|
|
53
|
-
}
|
|
54
|
-
export interface DeviceContext {
|
|
55
|
-
deviceConfigs: DeviceConfigListInstance;
|
|
56
|
-
deviceSecrets: DeviceSecretListInstance;
|
|
57
|
-
/**
|
|
58
|
-
* Fetch a DeviceInstance
|
|
59
|
-
*
|
|
60
|
-
* @param callback - Callback to handle processed record
|
|
61
|
-
*
|
|
62
|
-
* @returns Resolves to processed DeviceInstance
|
|
63
|
-
*/
|
|
64
|
-
fetch(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
65
|
-
/**
|
|
66
|
-
* Update a DeviceInstance
|
|
67
|
-
*
|
|
68
|
-
* @param callback - Callback to handle processed record
|
|
69
|
-
*
|
|
70
|
-
* @returns Resolves to processed DeviceInstance
|
|
71
|
-
*/
|
|
72
|
-
update(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
73
|
-
/**
|
|
74
|
-
* Update a DeviceInstance
|
|
75
|
-
*
|
|
76
|
-
* @param params - Parameter for request
|
|
77
|
-
* @param callback - Callback to handle processed record
|
|
78
|
-
*
|
|
79
|
-
* @returns Resolves to processed DeviceInstance
|
|
80
|
-
*/
|
|
81
|
-
update(params: DeviceContextUpdateOptions, callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
82
|
-
/**
|
|
83
|
-
* Provide a user-friendly representation
|
|
84
|
-
*/
|
|
85
|
-
toJSON(): any;
|
|
86
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
87
|
-
}
|
|
88
|
-
export interface DeviceContextSolution {
|
|
89
|
-
sid: string;
|
|
90
|
-
}
|
|
91
|
-
export declare class DeviceContextImpl implements DeviceContext {
|
|
92
|
-
protected _version: V1;
|
|
93
|
-
protected _solution: DeviceContextSolution;
|
|
94
|
-
protected _uri: string;
|
|
95
|
-
protected _deviceConfigs?: DeviceConfigListInstance;
|
|
96
|
-
protected _deviceSecrets?: DeviceSecretListInstance;
|
|
97
|
-
constructor(_version: V1, sid: string);
|
|
98
|
-
get deviceConfigs(): DeviceConfigListInstance;
|
|
99
|
-
get deviceSecrets(): DeviceSecretListInstance;
|
|
100
|
-
fetch(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
101
|
-
update(params?: DeviceContextUpdateOptions | ((error: Error | null, item?: DeviceInstance) => any), callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
102
|
-
/**
|
|
103
|
-
* Provide a user-friendly representation
|
|
104
|
-
*
|
|
105
|
-
* @returns Object
|
|
106
|
-
*/
|
|
107
|
-
toJSON(): DeviceContextSolution;
|
|
108
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
109
|
-
}
|
|
110
|
-
interface DevicePayload extends TwilioResponsePayload {
|
|
111
|
-
devices: DeviceResource[];
|
|
112
|
-
}
|
|
113
|
-
interface DeviceResource {
|
|
114
|
-
sid: string;
|
|
115
|
-
unique_name: string;
|
|
116
|
-
account_sid: string;
|
|
117
|
-
app: Record<string, object>;
|
|
118
|
-
logging: Record<string, object>;
|
|
119
|
-
date_created: Date;
|
|
120
|
-
date_updated: Date;
|
|
121
|
-
url: string;
|
|
122
|
-
links: Record<string, string>;
|
|
123
|
-
}
|
|
124
|
-
export declare class DeviceInstance {
|
|
125
|
-
protected _version: V1;
|
|
126
|
-
protected _solution: DeviceContextSolution;
|
|
127
|
-
protected _context?: DeviceContext;
|
|
128
|
-
constructor(_version: V1, payload: DeviceResource, sid?: string);
|
|
129
|
-
/**
|
|
130
|
-
* A 34-character string that uniquely identifies this Device.
|
|
131
|
-
*/
|
|
132
|
-
sid: string;
|
|
133
|
-
/**
|
|
134
|
-
* A developer-defined string that uniquely identifies the Device. This value must be unique for all Devices on this Account. The `unique_name` value may be used as an alternative to the `sid` in the URL path to address the resource.
|
|
135
|
-
*/
|
|
136
|
-
uniqueName: string;
|
|
137
|
-
/**
|
|
138
|
-
* The unique SID identifier of the Account.
|
|
139
|
-
*/
|
|
140
|
-
accountSid: string;
|
|
141
|
-
/**
|
|
142
|
-
* Information about the target App and the App reported by this Device. Contains the properties `target_sid`, `date_targeted`, `update_status` (one of `up-to-date`, `pending` and `error`), `update_error_code`, `reported_sid` and `date_reported`.
|
|
143
|
-
*/
|
|
144
|
-
app: Record<string, object>;
|
|
145
|
-
/**
|
|
146
|
-
* Object specifying whether application logging is enabled for this Device. Contains the properties `enabled` and `date_expires`.
|
|
147
|
-
*/
|
|
148
|
-
logging: Record<string, object>;
|
|
149
|
-
/**
|
|
150
|
-
* The date that this Device was created, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
151
|
-
*/
|
|
152
|
-
dateCreated: Date;
|
|
153
|
-
/**
|
|
154
|
-
* The date that this Device was last updated, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
155
|
-
*/
|
|
156
|
-
dateUpdated: Date;
|
|
157
|
-
/**
|
|
158
|
-
* The URL of this resource.
|
|
159
|
-
*/
|
|
160
|
-
url: string;
|
|
161
|
-
/**
|
|
162
|
-
* The absolute URLs of related resources.
|
|
163
|
-
*/
|
|
164
|
-
links: Record<string, string>;
|
|
165
|
-
private get _proxy();
|
|
166
|
-
/**
|
|
167
|
-
* Fetch a DeviceInstance
|
|
168
|
-
*
|
|
169
|
-
* @param callback - Callback to handle processed record
|
|
170
|
-
*
|
|
171
|
-
* @returns Resolves to processed DeviceInstance
|
|
172
|
-
*/
|
|
173
|
-
fetch(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
174
|
-
/**
|
|
175
|
-
* Update a DeviceInstance
|
|
176
|
-
*
|
|
177
|
-
* @param callback - Callback to handle processed record
|
|
178
|
-
*
|
|
179
|
-
* @returns Resolves to processed DeviceInstance
|
|
180
|
-
*/
|
|
181
|
-
update(callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
182
|
-
/**
|
|
183
|
-
* Update a DeviceInstance
|
|
184
|
-
*
|
|
185
|
-
* @param params - Parameter for request
|
|
186
|
-
* @param callback - Callback to handle processed record
|
|
187
|
-
*
|
|
188
|
-
* @returns Resolves to processed DeviceInstance
|
|
189
|
-
*/
|
|
190
|
-
update(params: DeviceContextUpdateOptions, callback?: (error: Error | null, item?: DeviceInstance) => any): Promise<DeviceInstance>;
|
|
191
|
-
/**
|
|
192
|
-
* Access the deviceConfigs.
|
|
193
|
-
*/
|
|
194
|
-
deviceConfigs(): DeviceConfigListInstance;
|
|
195
|
-
/**
|
|
196
|
-
* Access the deviceSecrets.
|
|
197
|
-
*/
|
|
198
|
-
deviceSecrets(): DeviceSecretListInstance;
|
|
199
|
-
/**
|
|
200
|
-
* Provide a user-friendly representation
|
|
201
|
-
*
|
|
202
|
-
* @returns Object
|
|
203
|
-
*/
|
|
204
|
-
toJSON(): {
|
|
205
|
-
sid: string;
|
|
206
|
-
uniqueName: string;
|
|
207
|
-
accountSid: string;
|
|
208
|
-
app: Record<string, object>;
|
|
209
|
-
logging: Record<string, object>;
|
|
210
|
-
dateCreated: Date;
|
|
211
|
-
dateUpdated: Date;
|
|
212
|
-
url: string;
|
|
213
|
-
links: Record<string, string>;
|
|
214
|
-
};
|
|
215
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
216
|
-
}
|
|
217
|
-
export interface DeviceSolution {
|
|
218
|
-
}
|
|
219
|
-
export interface DeviceListInstance {
|
|
220
|
-
_version: V1;
|
|
221
|
-
_solution: DeviceSolution;
|
|
222
|
-
_uri: string;
|
|
223
|
-
(sid: string): DeviceContext;
|
|
224
|
-
get(sid: string): DeviceContext;
|
|
225
|
-
/**
|
|
226
|
-
* Streams DeviceInstance records from the API.
|
|
227
|
-
*
|
|
228
|
-
* This operation lazily loads records as efficiently as possible until the limit
|
|
229
|
-
* is reached.
|
|
230
|
-
*
|
|
231
|
-
* The results are passed into the callback function, so this operation is memory
|
|
232
|
-
* efficient.
|
|
233
|
-
*
|
|
234
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
235
|
-
* function.
|
|
236
|
-
*
|
|
237
|
-
* @param { DeviceListInstanceEachOptions } [params] - Options for request
|
|
238
|
-
* @param { function } [callback] - Function to process each record
|
|
239
|
-
*/
|
|
240
|
-
each(callback?: (item: DeviceInstance, done: (err?: Error) => void) => void): void;
|
|
241
|
-
each(params: DeviceListInstanceEachOptions, callback?: (item: DeviceInstance, done: (err?: Error) => void) => void): void;
|
|
242
|
-
/**
|
|
243
|
-
* Retrieve a single target page of DeviceInstance records from the API.
|
|
244
|
-
*
|
|
245
|
-
* The request is executed immediately.
|
|
246
|
-
*
|
|
247
|
-
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
248
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
249
|
-
*/
|
|
250
|
-
getPage(targetUrl: string, callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
|
|
251
|
-
/**
|
|
252
|
-
* Lists DeviceInstance records from the API as a list.
|
|
253
|
-
*
|
|
254
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
255
|
-
* function.
|
|
256
|
-
*
|
|
257
|
-
* @param { DeviceListInstanceOptions } [params] - Options for request
|
|
258
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
259
|
-
*/
|
|
260
|
-
list(callback?: (error: Error | null, items: DeviceInstance[]) => any): Promise<DeviceInstance[]>;
|
|
261
|
-
list(params: DeviceListInstanceOptions, callback?: (error: Error | null, items: DeviceInstance[]) => any): Promise<DeviceInstance[]>;
|
|
262
|
-
/**
|
|
263
|
-
* Retrieve a single page of DeviceInstance records from the API.
|
|
264
|
-
*
|
|
265
|
-
* The request is executed immediately.
|
|
266
|
-
*
|
|
267
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
268
|
-
* function.
|
|
269
|
-
*
|
|
270
|
-
* @param { DeviceListInstancePageOptions } [params] - Options for request
|
|
271
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
272
|
-
*/
|
|
273
|
-
page(callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
|
|
274
|
-
page(params: DeviceListInstancePageOptions, callback?: (error: Error | null, items: DevicePage) => any): Promise<DevicePage>;
|
|
275
|
-
/**
|
|
276
|
-
* Provide a user-friendly representation
|
|
277
|
-
*/
|
|
278
|
-
toJSON(): any;
|
|
279
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
280
|
-
}
|
|
281
|
-
export declare function DeviceListInstance(version: V1): DeviceListInstance;
|
|
282
|
-
export declare class DevicePage extends Page<V1, DevicePayload, DeviceResource, DeviceInstance> {
|
|
283
|
-
/**
|
|
284
|
-
* Initialize the DevicePage
|
|
285
|
-
*
|
|
286
|
-
* @param version - Version of the resource
|
|
287
|
-
* @param response - Response from the API
|
|
288
|
-
* @param solution - Path solution
|
|
289
|
-
*/
|
|
290
|
-
constructor(version: V1, response: Response<string>, solution: DeviceSolution);
|
|
291
|
-
/**
|
|
292
|
-
* Build an instance of DeviceInstance
|
|
293
|
-
*
|
|
294
|
-
* @param payload - Payload response from the API
|
|
295
|
-
*/
|
|
296
|
-
getInstance(payload: DeviceResource): DeviceInstance;
|
|
297
|
-
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
298
|
-
}
|
|
299
|
-
export {};
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by
|
|
4
|
-
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
-
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
-
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
-
*
|
|
8
|
-
* Twilio - Microvisor
|
|
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
|
-
const deviceConfig_1 = require("./device/deviceConfig");
|
|
26
|
-
const deviceSecret_1 = require("./device/deviceSecret");
|
|
27
|
-
class DeviceContextImpl {
|
|
28
|
-
constructor(_version, sid) {
|
|
29
|
-
this._version = _version;
|
|
30
|
-
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
31
|
-
throw new Error("Parameter 'sid' is not valid.");
|
|
32
|
-
}
|
|
33
|
-
this._solution = { sid };
|
|
34
|
-
this._uri = `/Devices/${sid}`;
|
|
35
|
-
}
|
|
36
|
-
get deviceConfigs() {
|
|
37
|
-
this._deviceConfigs =
|
|
38
|
-
this._deviceConfigs ||
|
|
39
|
-
(0, deviceConfig_1.DeviceConfigListInstance)(this._version, this._solution.sid);
|
|
40
|
-
return this._deviceConfigs;
|
|
41
|
-
}
|
|
42
|
-
get deviceSecrets() {
|
|
43
|
-
this._deviceSecrets =
|
|
44
|
-
this._deviceSecrets ||
|
|
45
|
-
(0, deviceSecret_1.DeviceSecretListInstance)(this._version, this._solution.sid);
|
|
46
|
-
return this._deviceSecrets;
|
|
47
|
-
}
|
|
48
|
-
fetch(callback) {
|
|
49
|
-
const headers = {};
|
|
50
|
-
headers["Accept"] = "application/json";
|
|
51
|
-
const instance = this;
|
|
52
|
-
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
53
|
-
uri: instance._uri,
|
|
54
|
-
method: "get",
|
|
55
|
-
headers,
|
|
56
|
-
});
|
|
57
|
-
operationPromise = operationPromise.then((payload) => new DeviceInstance(operationVersion, payload, instance._solution.sid));
|
|
58
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
59
|
-
return operationPromise;
|
|
60
|
-
}
|
|
61
|
-
update(params, callback) {
|
|
62
|
-
if (params instanceof Function) {
|
|
63
|
-
callback = params;
|
|
64
|
-
params = {};
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
params = params || {};
|
|
68
|
-
}
|
|
69
|
-
let data = {};
|
|
70
|
-
if (params["uniqueName"] !== undefined)
|
|
71
|
-
data["UniqueName"] = params["uniqueName"];
|
|
72
|
-
if (params["targetApp"] !== undefined)
|
|
73
|
-
data["TargetApp"] = params["targetApp"];
|
|
74
|
-
if (params["loggingEnabled"] !== undefined)
|
|
75
|
-
data["LoggingEnabled"] = serialize.bool(params["loggingEnabled"]);
|
|
76
|
-
if (params["restartApp"] !== undefined)
|
|
77
|
-
data["RestartApp"] = serialize.bool(params["restartApp"]);
|
|
78
|
-
const headers = {};
|
|
79
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
80
|
-
headers["Accept"] = "application/json";
|
|
81
|
-
const instance = this;
|
|
82
|
-
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
83
|
-
uri: instance._uri,
|
|
84
|
-
method: "post",
|
|
85
|
-
data,
|
|
86
|
-
headers,
|
|
87
|
-
});
|
|
88
|
-
operationPromise = operationPromise.then((payload) => new DeviceInstance(operationVersion, payload, instance._solution.sid));
|
|
89
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
90
|
-
return operationPromise;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Provide a user-friendly representation
|
|
94
|
-
*
|
|
95
|
-
* @returns Object
|
|
96
|
-
*/
|
|
97
|
-
toJSON() {
|
|
98
|
-
return this._solution;
|
|
99
|
-
}
|
|
100
|
-
[util_1.inspect.custom](_depth, options) {
|
|
101
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
exports.DeviceContextImpl = DeviceContextImpl;
|
|
105
|
-
class DeviceInstance {
|
|
106
|
-
constructor(_version, payload, sid) {
|
|
107
|
-
this._version = _version;
|
|
108
|
-
this.sid = payload.sid;
|
|
109
|
-
this.uniqueName = payload.unique_name;
|
|
110
|
-
this.accountSid = payload.account_sid;
|
|
111
|
-
this.app = payload.app;
|
|
112
|
-
this.logging = payload.logging;
|
|
113
|
-
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
114
|
-
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
115
|
-
this.url = payload.url;
|
|
116
|
-
this.links = payload.links;
|
|
117
|
-
this._solution = { sid: sid || this.sid };
|
|
118
|
-
}
|
|
119
|
-
get _proxy() {
|
|
120
|
-
this._context =
|
|
121
|
-
this._context || new DeviceContextImpl(this._version, this._solution.sid);
|
|
122
|
-
return this._context;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Fetch a DeviceInstance
|
|
126
|
-
*
|
|
127
|
-
* @param callback - Callback to handle processed record
|
|
128
|
-
*
|
|
129
|
-
* @returns Resolves to processed DeviceInstance
|
|
130
|
-
*/
|
|
131
|
-
fetch(callback) {
|
|
132
|
-
return this._proxy.fetch(callback);
|
|
133
|
-
}
|
|
134
|
-
update(params, callback) {
|
|
135
|
-
return this._proxy.update(params, callback);
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Access the deviceConfigs.
|
|
139
|
-
*/
|
|
140
|
-
deviceConfigs() {
|
|
141
|
-
return this._proxy.deviceConfigs;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* Access the deviceSecrets.
|
|
145
|
-
*/
|
|
146
|
-
deviceSecrets() {
|
|
147
|
-
return this._proxy.deviceSecrets;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Provide a user-friendly representation
|
|
151
|
-
*
|
|
152
|
-
* @returns Object
|
|
153
|
-
*/
|
|
154
|
-
toJSON() {
|
|
155
|
-
return {
|
|
156
|
-
sid: this.sid,
|
|
157
|
-
uniqueName: this.uniqueName,
|
|
158
|
-
accountSid: this.accountSid,
|
|
159
|
-
app: this.app,
|
|
160
|
-
logging: this.logging,
|
|
161
|
-
dateCreated: this.dateCreated,
|
|
162
|
-
dateUpdated: this.dateUpdated,
|
|
163
|
-
url: this.url,
|
|
164
|
-
links: this.links,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
[util_1.inspect.custom](_depth, options) {
|
|
168
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
exports.DeviceInstance = DeviceInstance;
|
|
172
|
-
function DeviceListInstance(version) {
|
|
173
|
-
const instance = ((sid) => instance.get(sid));
|
|
174
|
-
instance.get = function get(sid) {
|
|
175
|
-
return new DeviceContextImpl(version, sid);
|
|
176
|
-
};
|
|
177
|
-
instance._version = version;
|
|
178
|
-
instance._solution = {};
|
|
179
|
-
instance._uri = `/Devices`;
|
|
180
|
-
instance.page = function page(params, callback) {
|
|
181
|
-
if (params instanceof Function) {
|
|
182
|
-
callback = params;
|
|
183
|
-
params = {};
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
params = params || {};
|
|
187
|
-
}
|
|
188
|
-
let data = {};
|
|
189
|
-
if (params["pageSize"] !== undefined)
|
|
190
|
-
data["PageSize"] = params["pageSize"];
|
|
191
|
-
if (params.pageNumber !== undefined)
|
|
192
|
-
data["Page"] = params.pageNumber;
|
|
193
|
-
if (params.pageToken !== undefined)
|
|
194
|
-
data["PageToken"] = params.pageToken;
|
|
195
|
-
const headers = {};
|
|
196
|
-
headers["Accept"] = "application/json";
|
|
197
|
-
let operationVersion = version, operationPromise = operationVersion.page({
|
|
198
|
-
uri: instance._uri,
|
|
199
|
-
method: "get",
|
|
200
|
-
params: data,
|
|
201
|
-
headers,
|
|
202
|
-
});
|
|
203
|
-
operationPromise = operationPromise.then((payload) => new DevicePage(operationVersion, payload, instance._solution));
|
|
204
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
205
|
-
return operationPromise;
|
|
206
|
-
};
|
|
207
|
-
instance.each = instance._version.each;
|
|
208
|
-
instance.list = instance._version.list;
|
|
209
|
-
instance.getPage = function getPage(targetUrl, callback) {
|
|
210
|
-
const operationPromise = instance._version._domain.twilio.request({
|
|
211
|
-
method: "get",
|
|
212
|
-
uri: targetUrl,
|
|
213
|
-
});
|
|
214
|
-
let pagePromise = operationPromise.then((payload) => new DevicePage(instance._version, payload, instance._solution));
|
|
215
|
-
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
216
|
-
return pagePromise;
|
|
217
|
-
};
|
|
218
|
-
instance.toJSON = function toJSON() {
|
|
219
|
-
return instance._solution;
|
|
220
|
-
};
|
|
221
|
-
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
222
|
-
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
223
|
-
};
|
|
224
|
-
return instance;
|
|
225
|
-
}
|
|
226
|
-
exports.DeviceListInstance = DeviceListInstance;
|
|
227
|
-
class DevicePage extends Page_1.default {
|
|
228
|
-
/**
|
|
229
|
-
* Initialize the DevicePage
|
|
230
|
-
*
|
|
231
|
-
* @param version - Version of the resource
|
|
232
|
-
* @param response - Response from the API
|
|
233
|
-
* @param solution - Path solution
|
|
234
|
-
*/
|
|
235
|
-
constructor(version, response, solution) {
|
|
236
|
-
super(version, response, solution);
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Build an instance of DeviceInstance
|
|
240
|
-
*
|
|
241
|
-
* @param payload - Payload response from the API
|
|
242
|
-
*/
|
|
243
|
-
getInstance(payload) {
|
|
244
|
-
return new DeviceInstance(this._version, payload);
|
|
245
|
-
}
|
|
246
|
-
[util_1.inspect.custom](depth, options) {
|
|
247
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
exports.DevicePage = DevicePage;
|