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.
Files changed (213) hide show
  1. package/lib/rest/Twilio.d.ts +0 -10
  2. package/lib/rest/Twilio.js +0 -11
  3. package/lib/rest/accounts/v1/bulkConsents.d.ts +4 -4
  4. package/lib/rest/accounts/v1/bulkConsents.js +1 -1
  5. package/lib/rest/accounts/v1/bulkContacts.d.ts +4 -4
  6. package/lib/rest/accounts/v1/bulkContacts.js +1 -1
  7. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +3 -3
  8. package/lib/rest/api/v2010/account/call/event.d.ts +6 -6
  9. package/lib/rest/api/v2010/account/call/payment.d.ts +1 -1
  10. package/lib/rest/api/v2010/account/call/recording.d.ts +3 -3
  11. package/lib/rest/api/v2010/account/conference/recording.d.ts +3 -3
  12. package/lib/rest/api/v2010/account/incomingPhoneNumber/assignedAddOn.d.ts +3 -3
  13. package/lib/rest/api/v2010/account/recording.d.ts +3 -3
  14. package/lib/rest/bulkexports/v1/export/day.d.ts +3 -3
  15. package/lib/rest/bulkexports/v1/export/exportCustomJob.d.ts +3 -3
  16. package/lib/rest/bulkexports/v1/export/job.d.ts +3 -3
  17. package/lib/rest/chat/v1/service.d.ts +9 -9
  18. package/lib/rest/chat/v2/service/channel/message.d.ts +3 -3
  19. package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -3
  20. package/lib/rest/chat/v2/service.d.ts +9 -9
  21. package/lib/rest/conversations/v1/addressConfiguration.d.ts +4 -4
  22. package/lib/rest/conversations/v1/conversation/message.d.ts +6 -6
  23. package/lib/rest/conversations/v1/conversation/participant.d.ts +3 -3
  24. package/lib/rest/conversations/v1/conversation/webhook.d.ts +4 -4
  25. package/lib/rest/conversations/v1/conversation.d.ts +6 -6
  26. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +6 -6
  27. package/lib/rest/conversations/v1/participantConversation.d.ts +6 -6
  28. package/lib/rest/conversations/v1/service/configuration/notification.d.ts +9 -9
  29. package/lib/rest/conversations/v1/service/conversation/message.d.ts +6 -6
  30. package/lib/rest/conversations/v1/service/conversation/participant.d.ts +3 -3
  31. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +4 -4
  32. package/lib/rest/conversations/v1/service/conversation.d.ts +6 -6
  33. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +6 -6
  34. package/lib/rest/conversations/v1/service/participantConversation.d.ts +6 -6
  35. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +3 -3
  36. package/lib/rest/conversations/v1/user/userConversation.d.ts +3 -3
  37. package/lib/rest/events/v1/sink.d.ts +4 -4
  38. package/lib/rest/events/v1/subscription.d.ts +1 -1
  39. package/lib/rest/events/v1/subscription.js +1 -1
  40. package/lib/rest/flexApi/v1/assessments.d.ts +3 -3
  41. package/lib/rest/flexApi/v1/configuration.d.ts +66 -66
  42. package/lib/rest/flexApi/v1/flexFlow.d.ts +3 -3
  43. package/lib/rest/flexApi/v1/insightsAssessmentsComment.d.ts +3 -3
  44. package/lib/rest/flexApi/v1/insightsConversations.d.ts +3 -3
  45. package/lib/rest/flexApi/v1/insightsQuestionnaires.d.ts +3 -3
  46. package/lib/rest/flexApi/v1/insightsQuestionnairesQuestion.d.ts +6 -6
  47. package/lib/rest/flexApi/v1/insightsSegments.d.ts +9 -9
  48. package/lib/rest/flexApi/v1/insightsSettingsAnswerSets.d.ts +9 -9
  49. package/lib/rest/flexApi/v1/insightsSettingsComment.d.ts +3 -3
  50. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelInvite.d.ts +4 -4
  51. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +5 -5
  52. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +1 -1
  53. package/lib/rest/flexApi/v1/interaction.d.ts +8 -8
  54. package/lib/rest/flexApi/v1/pluginConfiguration.d.ts +1 -1
  55. package/lib/rest/flexApi/v1/pluginConfiguration.js +1 -1
  56. package/lib/rest/intelligence/v2/customOperator.d.ts +5 -5
  57. package/lib/rest/intelligence/v2/operator.d.ts +3 -3
  58. package/lib/rest/intelligence/v2/operatorType.d.ts +3 -3
  59. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -3
  60. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +15 -15
  61. package/lib/rest/intelligence/v2/transcript/sentence.d.ts +3 -3
  62. package/lib/rest/intelligence/v2/transcript.d.ts +4 -4
  63. package/lib/rest/ipMessaging/v1/service.d.ts +9 -9
  64. package/lib/rest/ipMessaging/v2/service/channel/message.d.ts +3 -3
  65. package/lib/rest/ipMessaging/v2/service/channel/webhook.d.ts +3 -3
  66. package/lib/rest/ipMessaging/v2/service.d.ts +9 -9
  67. package/lib/rest/lookups/V2.d.ts +20 -0
  68. package/lib/rest/lookups/V2.js +25 -0
  69. package/lib/rest/lookups/v2/bucket.d.ts +205 -0
  70. package/lib/rest/lookups/v2/bucket.js +187 -0
  71. package/lib/rest/lookups/v2/lookupOverride.d.ts +279 -0
  72. package/lib/rest/lookups/v2/lookupOverride.js +225 -0
  73. package/lib/rest/lookups/v2/query.d.ts +175 -0
  74. package/lib/rest/lookups/v2/query.js +123 -0
  75. package/lib/rest/lookups/v2/rateLimit.d.ts +83 -0
  76. package/lib/rest/lookups/v2/rateLimit.js +82 -0
  77. package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +3 -3
  78. package/lib/rest/messaging/v1/service/usAppToPersonUsecase.d.ts +3 -3
  79. package/lib/rest/messaging/v1/service.d.ts +3 -3
  80. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +3 -3
  81. package/lib/rest/messaging/v1/usecase.d.ts +3 -3
  82. package/lib/rest/messaging/v2/channelsSender.d.ts +49 -4
  83. package/lib/rest/messaging/v2/channelsSender.js +14 -2
  84. package/lib/rest/monitor/v1/event.d.ts +3 -3
  85. package/lib/rest/notify/v1/service/notification.d.ts +28 -28
  86. package/lib/rest/numbers/v1/bulkEligibility.d.ts +3 -3
  87. package/lib/rest/numbers/v1/eligibility.d.ts +3 -3
  88. package/lib/rest/numbers/v1/portingPortIn.d.ts +6 -6
  89. package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -3
  90. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -3
  91. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +5 -5
  92. package/lib/rest/numbers/v2/regulatoryCompliance/endUserType.d.ts +3 -3
  93. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -3
  94. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +8 -8
  95. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocumentType.d.ts +3 -3
  96. package/lib/rest/preview/marketplace/availableAddOn.d.ts +3 -3
  97. package/lib/rest/preview/marketplace/installedAddOn.d.ts +5 -5
  98. package/lib/rest/preview/wireless/sim/usage.d.ts +15 -15
  99. package/lib/rest/proxy/v1/service/session.d.ts +1 -1
  100. package/lib/rest/proxy/v1/service/session.js +1 -1
  101. package/lib/rest/proxy/v1/service.d.ts +0 -8
  102. package/lib/rest/proxy/v1/service.js +0 -13
  103. package/lib/rest/serverless/v1/service/build.d.ts +9 -9
  104. package/lib/rest/serverless/v1/service/environment/log.d.ts +6 -7
  105. package/lib/rest/studio/v1/flow/engagement/engagementContext.d.ts +3 -3
  106. package/lib/rest/studio/v1/flow/engagement/step/stepContext.d.ts +3 -3
  107. package/lib/rest/studio/v1/flow/engagement/step.d.ts +3 -3
  108. package/lib/rest/studio/v1/flow/engagement.d.ts +4 -4
  109. package/lib/rest/studio/v1/flow/execution/executionContext.d.ts +3 -3
  110. package/lib/rest/studio/v1/flow/execution/executionStep/executionStepContext.d.ts +3 -3
  111. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +3 -3
  112. package/lib/rest/studio/v1/flow/execution.d.ts +4 -4
  113. package/lib/rest/studio/v2/flow/execution/executionContext.d.ts +3 -3
  114. package/lib/rest/studio/v2/flow/execution/executionStep/executionStepContext.d.ts +3 -3
  115. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +3 -3
  116. package/lib/rest/studio/v2/flow/execution.d.ts +4 -4
  117. package/lib/rest/studio/v2/flow/flowRevision.d.ts +6 -6
  118. package/lib/rest/studio/v2/flow.d.ts +11 -11
  119. package/lib/rest/studio/v2/flowValidate.d.ts +1 -1
  120. package/lib/rest/supersim/v1/network.d.ts +3 -3
  121. package/lib/rest/supersim/v1/networkAccessProfile/networkAccessProfileNetwork.d.ts +3 -3
  122. package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -3
  123. package/lib/rest/supersim/v1/usageRecord.d.ts +3 -3
  124. package/lib/rest/sync/v1/service/document.d.ts +2 -2
  125. package/lib/rest/sync/v1/service/syncList/syncListItem.d.ts +2 -2
  126. package/lib/rest/sync/v1/service/syncMap/syncMapItem.d.ts +2 -2
  127. package/lib/rest/sync/v1/service/syncStream/streamMessage.d.ts +1 -1
  128. package/lib/rest/taskrouter/v1/workspace/event.d.ts +3 -3
  129. package/lib/rest/taskrouter/v1/workspace/task.d.ts +1 -1
  130. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueBulkRealTimeStatistics.d.ts +3 -3
  131. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueCumulativeStatistics.d.ts +12 -12
  132. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueRealTimeStatistics.d.ts +9 -9
  133. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueueStatistics.d.ts +6 -6
  134. package/lib/rest/taskrouter/v1/workspace/taskQueue/taskQueuesStatistics.d.ts +6 -6
  135. package/lib/rest/taskrouter/v1/workspace/worker/workerStatistics.d.ts +3 -3
  136. package/lib/rest/taskrouter/v1/workspace/worker/workersCumulativeStatistics.d.ts +3 -3
  137. package/lib/rest/taskrouter/v1/workspace/worker/workersRealTimeStatistics.d.ts +3 -3
  138. package/lib/rest/taskrouter/v1/workspace/worker/workersStatistics.d.ts +6 -6
  139. package/lib/rest/taskrouter/v1/workspace/workflow/workflowCumulativeStatistics.d.ts +9 -9
  140. package/lib/rest/taskrouter/v1/workspace/workflow/workflowRealTimeStatistics.d.ts +6 -6
  141. package/lib/rest/taskrouter/v1/workspace/workflow/workflowStatistics.d.ts +6 -6
  142. package/lib/rest/taskrouter/v1/workspace/workspaceCumulativeStatistics.d.ts +9 -9
  143. package/lib/rest/taskrouter/v1/workspace/workspaceRealTimeStatistics.d.ts +9 -9
  144. package/lib/rest/taskrouter/v1/workspace/workspaceStatistics.d.ts +6 -6
  145. package/lib/rest/trunking/v1/trunk.d.ts +9 -3
  146. package/lib/rest/trunking/v1/trunk.js +2 -0
  147. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -3
  148. package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -3
  149. package/lib/rest/trusthub/v1/endUser.d.ts +5 -5
  150. package/lib/rest/trusthub/v1/endUserType.d.ts +3 -3
  151. package/lib/rest/trusthub/v1/policies.d.ts +3 -3
  152. package/lib/rest/trusthub/v1/supportingDocument.d.ts +5 -5
  153. package/lib/rest/trusthub/v1/supportingDocumentType.d.ts +3 -3
  154. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -3
  155. package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -3
  156. package/lib/rest/verify/v2/form.d.ts +6 -6
  157. package/lib/rest/verify/v2/service/entity/challenge.d.ts +12 -12
  158. package/lib/rest/verify/v2/service/entity/challenge.js +1 -1
  159. package/lib/rest/verify/v2/service/entity/factor.d.ts +6 -6
  160. package/lib/rest/verify/v2/service/entity/newFactor.d.ts +10 -10
  161. package/lib/rest/verify/v2/service/verification.d.ts +11 -11
  162. package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -3
  163. package/lib/rest/verify/v2/service.d.ts +9 -9
  164. package/lib/rest/verify/v2/template.d.ts +3 -3
  165. package/lib/rest/verify/v2/verificationAttempt.d.ts +11 -11
  166. package/lib/rest/verify/v2/verificationAttemptsSummary.d.ts +2 -2
  167. package/lib/rest/video/v1/composition.d.ts +1 -1
  168. package/lib/rest/video/v1/compositionHook.d.ts +2 -2
  169. package/lib/rest/video/v1/room/participant/subscribeRules.d.ts +1 -1
  170. package/lib/rest/video/v1/room/recordingRules.d.ts +1 -1
  171. package/lib/rest/video/v1/room/transcriptions.d.ts +316 -0
  172. package/lib/rest/{proxy/v1/service/shortCode.js → video/v1/room/transcriptions.js} +61 -78
  173. package/lib/rest/video/v1/room.d.ts +9 -1
  174. package/lib/rest/video/v1/room.js +13 -0
  175. package/lib/rest/wireless/v1/sim/dataSession.d.ts +3 -3
  176. package/lib/rest/wireless/v1/sim/usageRecord.d.ts +9 -9
  177. package/lib/rest/wireless/v1/usageRecord.d.ts +9 -9
  178. package/lib/twiml/VoiceResponse.d.ts +31 -0
  179. package/lib/twiml/VoiceResponse.js +18 -0
  180. package/package.json +1 -1
  181. package/lib/rest/Knowledge.d.ts +0 -4
  182. package/lib/rest/Knowledge.js +0 -8
  183. package/lib/rest/KnowledgeBase.d.ts +0 -13
  184. package/lib/rest/KnowledgeBase.js +0 -31
  185. package/lib/rest/Microvisor.d.ts +0 -14
  186. package/lib/rest/Microvisor.js +0 -22
  187. package/lib/rest/MicrovisorBase.d.ts +0 -13
  188. package/lib/rest/MicrovisorBase.js +0 -31
  189. package/lib/rest/knowledge/V1.d.ts +0 -15
  190. package/lib/rest/knowledge/V1.js +0 -36
  191. package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +0 -167
  192. package/lib/rest/knowledge/v1/knowledge/chunk.js +0 -131
  193. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +0 -101
  194. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +0 -118
  195. package/lib/rest/knowledge/v1/knowledge.d.ts +0 -412
  196. package/lib/rest/knowledge/v1/knowledge.js +0 -302
  197. package/lib/rest/microvisor/V1.d.ts +0 -30
  198. package/lib/rest/microvisor/V1.js +0 -56
  199. package/lib/rest/microvisor/v1/accountConfig.d.ts +0 -263
  200. package/lib/rest/microvisor/v1/accountConfig.js +0 -254
  201. package/lib/rest/microvisor/v1/accountSecret.d.ts +0 -257
  202. package/lib/rest/microvisor/v1/accountSecret.js +0 -252
  203. package/lib/rest/microvisor/v1/app/appManifest.d.ts +0 -101
  204. package/lib/rest/microvisor/v1/app/appManifest.js +0 -118
  205. package/lib/rest/microvisor/v1/app.d.ts +0 -251
  206. package/lib/rest/microvisor/v1/app.js +0 -222
  207. package/lib/rest/microvisor/v1/device/deviceConfig.d.ts +0 -271
  208. package/lib/rest/microvisor/v1/device/deviceConfig.js +0 -262
  209. package/lib/rest/microvisor/v1/device/deviceSecret.d.ts +0 -265
  210. package/lib/rest/microvisor/v1/device/deviceSecret.js +0 -260
  211. package/lib/rest/microvisor/v1/device.d.ts +0 -299
  212. package/lib/rest/microvisor/v1/device.js +0 -250
  213. package/lib/rest/proxy/v1/service/shortCode.d.ts +0 -316
@@ -1,265 +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
- /**
7
- * Options to pass to update a DeviceSecretInstance
8
- */
9
- export interface DeviceSecretContextUpdateOptions {
10
- /** The secret value; up to 4096 characters. */
11
- value: string;
12
- }
13
- /**
14
- * Options to pass to create a DeviceSecretInstance
15
- */
16
- export interface DeviceSecretListInstanceCreateOptions {
17
- /** The secret key; up to 100 characters. */
18
- key: string;
19
- /** The secret value; up to 4096 characters. */
20
- value: string;
21
- }
22
- /**
23
- * Options to pass to each
24
- */
25
- export interface DeviceSecretListInstanceEachOptions {
26
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
27
- pageSize?: number;
28
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
29
- callback?: (item: DeviceSecretInstance, done: (err?: Error) => void) => void;
30
- /** Function to be called upon completion of streaming */
31
- done?: Function;
32
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
33
- limit?: number;
34
- }
35
- /**
36
- * Options to pass to list
37
- */
38
- export interface DeviceSecretListInstanceOptions {
39
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
40
- pageSize?: number;
41
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
42
- limit?: number;
43
- }
44
- /**
45
- * Options to pass to page
46
- */
47
- export interface DeviceSecretListInstancePageOptions {
48
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
49
- pageSize?: number;
50
- /** Page Number, this value is simply for client state */
51
- pageNumber?: number;
52
- /** PageToken provided by the API */
53
- pageToken?: string;
54
- }
55
- export interface DeviceSecretContext {
56
- /**
57
- * Remove a DeviceSecretInstance
58
- *
59
- * @param callback - Callback to handle processed record
60
- *
61
- * @returns Resolves to processed boolean
62
- */
63
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
64
- /**
65
- * Fetch a DeviceSecretInstance
66
- *
67
- * @param callback - Callback to handle processed record
68
- *
69
- * @returns Resolves to processed DeviceSecretInstance
70
- */
71
- fetch(callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
72
- /**
73
- * Update a DeviceSecretInstance
74
- *
75
- * @param params - Parameter for request
76
- * @param callback - Callback to handle processed record
77
- *
78
- * @returns Resolves to processed DeviceSecretInstance
79
- */
80
- update(params: DeviceSecretContextUpdateOptions, callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
81
- /**
82
- * Provide a user-friendly representation
83
- */
84
- toJSON(): any;
85
- [inspect.custom](_depth: any, options: InspectOptions): any;
86
- }
87
- export interface DeviceSecretContextSolution {
88
- deviceSid: string;
89
- key: string;
90
- }
91
- export declare class DeviceSecretContextImpl implements DeviceSecretContext {
92
- protected _version: V1;
93
- protected _solution: DeviceSecretContextSolution;
94
- protected _uri: string;
95
- constructor(_version: V1, deviceSid: string, key: string);
96
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
97
- fetch(callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
98
- update(params: DeviceSecretContextUpdateOptions, callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
99
- /**
100
- * Provide a user-friendly representation
101
- *
102
- * @returns Object
103
- */
104
- toJSON(): DeviceSecretContextSolution;
105
- [inspect.custom](_depth: any, options: InspectOptions): string;
106
- }
107
- interface DeviceSecretPayload extends TwilioResponsePayload {
108
- secrets: DeviceSecretResource[];
109
- }
110
- interface DeviceSecretResource {
111
- device_sid: string;
112
- key: string;
113
- date_rotated: Date;
114
- url: string;
115
- }
116
- export declare class DeviceSecretInstance {
117
- protected _version: V1;
118
- protected _solution: DeviceSecretContextSolution;
119
- protected _context?: DeviceSecretContext;
120
- constructor(_version: V1, payload: DeviceSecretResource, deviceSid: string, key?: string);
121
- /**
122
- * A 34-character string that uniquely identifies the parent Device.
123
- */
124
- deviceSid: string;
125
- /**
126
- * The secret key; up to 100 characters.
127
- */
128
- key: string;
129
- dateRotated: Date;
130
- /**
131
- * The absolute URL of the Secret.
132
- */
133
- url: string;
134
- private get _proxy();
135
- /**
136
- * Remove a DeviceSecretInstance
137
- *
138
- * @param callback - Callback to handle processed record
139
- *
140
- * @returns Resolves to processed boolean
141
- */
142
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
143
- /**
144
- * Fetch a DeviceSecretInstance
145
- *
146
- * @param callback - Callback to handle processed record
147
- *
148
- * @returns Resolves to processed DeviceSecretInstance
149
- */
150
- fetch(callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
151
- /**
152
- * Update a DeviceSecretInstance
153
- *
154
- * @param params - Parameter for request
155
- * @param callback - Callback to handle processed record
156
- *
157
- * @returns Resolves to processed DeviceSecretInstance
158
- */
159
- update(params: DeviceSecretContextUpdateOptions, callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
160
- /**
161
- * Provide a user-friendly representation
162
- *
163
- * @returns Object
164
- */
165
- toJSON(): {
166
- deviceSid: string;
167
- key: string;
168
- dateRotated: Date;
169
- url: string;
170
- };
171
- [inspect.custom](_depth: any, options: InspectOptions): string;
172
- }
173
- export interface DeviceSecretSolution {
174
- deviceSid: string;
175
- }
176
- export interface DeviceSecretListInstance {
177
- _version: V1;
178
- _solution: DeviceSecretSolution;
179
- _uri: string;
180
- (key: string): DeviceSecretContext;
181
- get(key: string): DeviceSecretContext;
182
- /**
183
- * Create a DeviceSecretInstance
184
- *
185
- * @param params - Parameter for request
186
- * @param callback - Callback to handle processed record
187
- *
188
- * @returns Resolves to processed DeviceSecretInstance
189
- */
190
- create(params: DeviceSecretListInstanceCreateOptions, callback?: (error: Error | null, item?: DeviceSecretInstance) => any): Promise<DeviceSecretInstance>;
191
- /**
192
- * Streams DeviceSecretInstance records from the API.
193
- *
194
- * This operation lazily loads records as efficiently as possible until the limit
195
- * is reached.
196
- *
197
- * The results are passed into the callback function, so this operation is memory
198
- * efficient.
199
- *
200
- * If a function is passed as the first argument, it will be used as the callback
201
- * function.
202
- *
203
- * @param { DeviceSecretListInstanceEachOptions } [params] - Options for request
204
- * @param { function } [callback] - Function to process each record
205
- */
206
- each(callback?: (item: DeviceSecretInstance, done: (err?: Error) => void) => void): void;
207
- each(params: DeviceSecretListInstanceEachOptions, callback?: (item: DeviceSecretInstance, done: (err?: Error) => void) => void): void;
208
- /**
209
- * Retrieve a single target page of DeviceSecretInstance records from the API.
210
- *
211
- * The request is executed immediately.
212
- *
213
- * @param { string } [targetUrl] - API-generated URL for the requested results page
214
- * @param { function } [callback] - Callback to handle list of records
215
- */
216
- getPage(targetUrl: string, callback?: (error: Error | null, items: DeviceSecretPage) => any): Promise<DeviceSecretPage>;
217
- /**
218
- * Lists DeviceSecretInstance records from the API as a list.
219
- *
220
- * If a function is passed as the first argument, it will be used as the callback
221
- * function.
222
- *
223
- * @param { DeviceSecretListInstanceOptions } [params] - Options for request
224
- * @param { function } [callback] - Callback to handle list of records
225
- */
226
- list(callback?: (error: Error | null, items: DeviceSecretInstance[]) => any): Promise<DeviceSecretInstance[]>;
227
- list(params: DeviceSecretListInstanceOptions, callback?: (error: Error | null, items: DeviceSecretInstance[]) => any): Promise<DeviceSecretInstance[]>;
228
- /**
229
- * Retrieve a single page of DeviceSecretInstance records from the API.
230
- *
231
- * The request is executed immediately.
232
- *
233
- * If a function is passed as the first argument, it will be used as the callback
234
- * function.
235
- *
236
- * @param { DeviceSecretListInstancePageOptions } [params] - Options for request
237
- * @param { function } [callback] - Callback to handle list of records
238
- */
239
- page(callback?: (error: Error | null, items: DeviceSecretPage) => any): Promise<DeviceSecretPage>;
240
- page(params: DeviceSecretListInstancePageOptions, callback?: (error: Error | null, items: DeviceSecretPage) => any): Promise<DeviceSecretPage>;
241
- /**
242
- * Provide a user-friendly representation
243
- */
244
- toJSON(): any;
245
- [inspect.custom](_depth: any, options: InspectOptions): any;
246
- }
247
- export declare function DeviceSecretListInstance(version: V1, deviceSid: string): DeviceSecretListInstance;
248
- export declare class DeviceSecretPage extends Page<V1, DeviceSecretPayload, DeviceSecretResource, DeviceSecretInstance> {
249
- /**
250
- * Initialize the DeviceSecretPage
251
- *
252
- * @param version - Version of the resource
253
- * @param response - Response from the API
254
- * @param solution - Path solution
255
- */
256
- constructor(version: V1, response: Response<string>, solution: DeviceSecretSolution);
257
- /**
258
- * Build an instance of DeviceSecretInstance
259
- *
260
- * @param payload - Payload response from the API
261
- */
262
- getInstance(payload: DeviceSecretResource): DeviceSecretInstance;
263
- [inspect.custom](depth: any, options: InspectOptions): string;
264
- }
265
- export {};
@@ -1,260 +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.DeviceSecretPage = exports.DeviceSecretListInstance = exports.DeviceSecretInstance = exports.DeviceSecretContextImpl = 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 DeviceSecretContextImpl {
26
- constructor(_version, deviceSid, key) {
27
- this._version = _version;
28
- if (!(0, utility_1.isValidPathParam)(deviceSid)) {
29
- throw new Error("Parameter 'deviceSid' is not valid.");
30
- }
31
- if (!(0, utility_1.isValidPathParam)(key)) {
32
- throw new Error("Parameter 'key' is not valid.");
33
- }
34
- this._solution = { deviceSid, key };
35
- this._uri = `/Devices/${deviceSid}/Secrets/${key}`;
36
- }
37
- remove(callback) {
38
- const headers = {};
39
- const instance = this;
40
- let operationVersion = instance._version, operationPromise = operationVersion.remove({
41
- uri: instance._uri,
42
- method: "delete",
43
- headers,
44
- });
45
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
46
- return operationPromise;
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 DeviceSecretInstance(operationVersion, payload, instance._solution.deviceSid, instance._solution.key));
58
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
59
- return operationPromise;
60
- }
61
- update(params, callback) {
62
- if (params === null || params === undefined) {
63
- throw new Error('Required parameter "params" missing.');
64
- }
65
- if (params["value"] === null || params["value"] === undefined) {
66
- throw new Error("Required parameter \"params['value']\" missing.");
67
- }
68
- let data = {};
69
- data["Value"] = params["value"];
70
- const headers = {};
71
- headers["Content-Type"] = "application/x-www-form-urlencoded";
72
- headers["Accept"] = "application/json";
73
- const instance = this;
74
- let operationVersion = instance._version, operationPromise = operationVersion.update({
75
- uri: instance._uri,
76
- method: "post",
77
- data,
78
- headers,
79
- });
80
- operationPromise = operationPromise.then((payload) => new DeviceSecretInstance(operationVersion, payload, instance._solution.deviceSid, instance._solution.key));
81
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
82
- return operationPromise;
83
- }
84
- /**
85
- * Provide a user-friendly representation
86
- *
87
- * @returns Object
88
- */
89
- toJSON() {
90
- return this._solution;
91
- }
92
- [util_1.inspect.custom](_depth, options) {
93
- return (0, util_1.inspect)(this.toJSON(), options);
94
- }
95
- }
96
- exports.DeviceSecretContextImpl = DeviceSecretContextImpl;
97
- class DeviceSecretInstance {
98
- constructor(_version, payload, deviceSid, key) {
99
- this._version = _version;
100
- this.deviceSid = payload.device_sid;
101
- this.key = payload.key;
102
- this.dateRotated = deserialize.iso8601DateTime(payload.date_rotated);
103
- this.url = payload.url;
104
- this._solution = { deviceSid, key: key || this.key };
105
- }
106
- get _proxy() {
107
- this._context =
108
- this._context ||
109
- new DeviceSecretContextImpl(this._version, this._solution.deviceSid, this._solution.key);
110
- return this._context;
111
- }
112
- /**
113
- * Remove a DeviceSecretInstance
114
- *
115
- * @param callback - Callback to handle processed record
116
- *
117
- * @returns Resolves to processed boolean
118
- */
119
- remove(callback) {
120
- return this._proxy.remove(callback);
121
- }
122
- /**
123
- * Fetch a DeviceSecretInstance
124
- *
125
- * @param callback - Callback to handle processed record
126
- *
127
- * @returns Resolves to processed DeviceSecretInstance
128
- */
129
- fetch(callback) {
130
- return this._proxy.fetch(callback);
131
- }
132
- update(params, callback) {
133
- return this._proxy.update(params, callback);
134
- }
135
- /**
136
- * Provide a user-friendly representation
137
- *
138
- * @returns Object
139
- */
140
- toJSON() {
141
- return {
142
- deviceSid: this.deviceSid,
143
- key: this.key,
144
- dateRotated: this.dateRotated,
145
- url: this.url,
146
- };
147
- }
148
- [util_1.inspect.custom](_depth, options) {
149
- return (0, util_1.inspect)(this.toJSON(), options);
150
- }
151
- }
152
- exports.DeviceSecretInstance = DeviceSecretInstance;
153
- function DeviceSecretListInstance(version, deviceSid) {
154
- if (!(0, utility_1.isValidPathParam)(deviceSid)) {
155
- throw new Error("Parameter 'deviceSid' is not valid.");
156
- }
157
- const instance = ((key) => instance.get(key));
158
- instance.get = function get(key) {
159
- return new DeviceSecretContextImpl(version, deviceSid, key);
160
- };
161
- instance._version = version;
162
- instance._solution = { deviceSid };
163
- instance._uri = `/Devices/${deviceSid}/Secrets`;
164
- instance.create = function create(params, callback) {
165
- if (params === null || params === undefined) {
166
- throw new Error('Required parameter "params" missing.');
167
- }
168
- if (params["key"] === null || params["key"] === undefined) {
169
- throw new Error("Required parameter \"params['key']\" missing.");
170
- }
171
- if (params["value"] === null || params["value"] === undefined) {
172
- throw new Error("Required parameter \"params['value']\" missing.");
173
- }
174
- let data = {};
175
- data["Key"] = params["key"];
176
- data["Value"] = params["value"];
177
- const headers = {};
178
- headers["Content-Type"] = "application/x-www-form-urlencoded";
179
- headers["Accept"] = "application/json";
180
- let operationVersion = version, operationPromise = operationVersion.create({
181
- uri: instance._uri,
182
- method: "post",
183
- data,
184
- headers,
185
- });
186
- operationPromise = operationPromise.then((payload) => new DeviceSecretInstance(operationVersion, payload, instance._solution.deviceSid));
187
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
188
- return operationPromise;
189
- };
190
- instance.page = function page(params, callback) {
191
- if (params instanceof Function) {
192
- callback = params;
193
- params = {};
194
- }
195
- else {
196
- params = params || {};
197
- }
198
- let data = {};
199
- if (params["pageSize"] !== undefined)
200
- data["PageSize"] = params["pageSize"];
201
- if (params.pageNumber !== undefined)
202
- data["Page"] = params.pageNumber;
203
- if (params.pageToken !== undefined)
204
- data["PageToken"] = params.pageToken;
205
- const headers = {};
206
- headers["Accept"] = "application/json";
207
- let operationVersion = version, operationPromise = operationVersion.page({
208
- uri: instance._uri,
209
- method: "get",
210
- params: data,
211
- headers,
212
- });
213
- operationPromise = operationPromise.then((payload) => new DeviceSecretPage(operationVersion, payload, instance._solution));
214
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
215
- return operationPromise;
216
- };
217
- instance.each = instance._version.each;
218
- instance.list = instance._version.list;
219
- instance.getPage = function getPage(targetUrl, callback) {
220
- const operationPromise = instance._version._domain.twilio.request({
221
- method: "get",
222
- uri: targetUrl,
223
- });
224
- let pagePromise = operationPromise.then((payload) => new DeviceSecretPage(instance._version, payload, instance._solution));
225
- pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
226
- return pagePromise;
227
- };
228
- instance.toJSON = function toJSON() {
229
- return instance._solution;
230
- };
231
- instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
232
- return (0, util_1.inspect)(instance.toJSON(), options);
233
- };
234
- return instance;
235
- }
236
- exports.DeviceSecretListInstance = DeviceSecretListInstance;
237
- class DeviceSecretPage extends Page_1.default {
238
- /**
239
- * Initialize the DeviceSecretPage
240
- *
241
- * @param version - Version of the resource
242
- * @param response - Response from the API
243
- * @param solution - Path solution
244
- */
245
- constructor(version, response, solution) {
246
- super(version, response, solution);
247
- }
248
- /**
249
- * Build an instance of DeviceSecretInstance
250
- *
251
- * @param payload - Payload response from the API
252
- */
253
- getInstance(payload) {
254
- return new DeviceSecretInstance(this._version, payload, this._solution.deviceSid);
255
- }
256
- [util_1.inspect.custom](depth, options) {
257
- return (0, util_1.inspect)(this.toJSON(), options);
258
- }
259
- }
260
- exports.DeviceSecretPage = DeviceSecretPage;