twilio 5.5.0 → 5.5.2

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 (183) hide show
  1. package/lib/rest/Knowledge.d.ts +4 -0
  2. package/lib/rest/Knowledge.js +8 -0
  3. package/lib/rest/KnowledgeBase.d.ts +13 -0
  4. package/lib/rest/KnowledgeBase.js +31 -0
  5. package/lib/rest/PreviewBase.d.ts +0 -3
  6. package/lib/rest/PreviewBase.js +0 -5
  7. package/lib/rest/Twilio.d.ts +5 -0
  8. package/lib/rest/Twilio.js +5 -0
  9. package/lib/rest/accounts/v1/safelist.d.ts +4 -4
  10. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +3 -0
  11. package/lib/rest/api/v2010/account/call/recording.d.ts +6 -0
  12. package/lib/rest/api/v2010/account/call/siprec.d.ts +3 -0
  13. package/lib/rest/api/v2010/account/call/stream.d.ts +3 -0
  14. package/lib/rest/api/v2010/account/call/transcription.d.ts +3 -0
  15. package/lib/rest/api/v2010/account/call.d.ts +3 -0
  16. package/lib/rest/api/v2010/account/conference/participant.d.ts +4 -1
  17. package/lib/rest/api/v2010/account/conference/recording.d.ts +6 -0
  18. package/lib/rest/api/v2010/account/conference.d.ts +7 -1
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -0
  20. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -0
  21. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -0
  22. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +6 -0
  23. package/lib/rest/api/v2010/account/message/feedback.d.ts +3 -0
  24. package/lib/rest/api/v2010/account/message.d.ts +9 -0
  25. package/lib/rest/api/v2010/account/message.js +2 -0
  26. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +3 -0
  27. package/lib/rest/api/v2010/account/recording/transcription.d.ts +3 -0
  28. package/lib/rest/api/v2010/account/recording.d.ts +6 -0
  29. package/lib/rest/api/v2010/account/transcription.d.ts +3 -0
  30. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +3 -0
  31. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +3 -0
  32. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +3 -0
  33. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +3 -0
  34. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +3 -0
  35. package/lib/rest/api/v2010/account/usage/record/today.d.ts +3 -0
  36. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +3 -0
  37. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +3 -0
  38. package/lib/rest/api/v2010/account/usage/record.d.ts +3 -0
  39. package/lib/rest/api/v2010/account/usage/trigger.d.ts +6 -0
  40. package/lib/rest/api/v2010/account/usage.d.ts +3 -0
  41. package/lib/rest/api/v2010/account.d.ts +6 -0
  42. package/lib/rest/chat/v2/service/binding.d.ts +3 -0
  43. package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -0
  44. package/lib/rest/chat/v2/service/user/userBinding.d.ts +3 -0
  45. package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -0
  46. package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -0
  47. package/lib/rest/conversations/v1/configuration/webhook.d.ts +6 -0
  48. package/lib/rest/conversations/v1/conversation/webhook.d.ts +3 -0
  49. package/lib/rest/conversations/v1/conversation.d.ts +3 -0
  50. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +3 -0
  51. package/lib/rest/conversations/v1/service/binding.d.ts +3 -0
  52. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +3 -0
  53. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +3 -0
  54. package/lib/rest/conversations/v1/service/conversation.d.ts +3 -0
  55. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +3 -0
  56. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +3 -0
  57. package/lib/rest/conversations/v1/user/userConversation.d.ts +3 -0
  58. package/lib/rest/events/v1/sink.d.ts +6 -0
  59. package/lib/rest/flexApi/v1/configuration.d.ts +3 -0
  60. package/lib/rest/flexApi/v1/flexFlow.d.ts +6 -0
  61. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +3 -0
  62. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +3 -0
  63. package/lib/rest/flexApi/v1/provisioningStatus.d.ts +3 -0
  64. package/lib/rest/flexApi/v2/flexUser.d.ts +0 -24
  65. package/lib/rest/flexApi/v2/flexUser.js +0 -12
  66. package/lib/rest/iam/V1.d.ts +5 -0
  67. package/lib/rest/iam/V1.js +6 -0
  68. package/lib/rest/iam/v1/token.d.ts +88 -0
  69. package/lib/rest/iam/v1/token.js +99 -0
  70. package/lib/rest/insights/v1/room/participant.d.ts +2 -2
  71. package/lib/rest/insights/v1/room.d.ts +2 -2
  72. package/lib/rest/intelligence/v2/customOperator.d.ts +3 -0
  73. package/lib/rest/intelligence/v2/operator.d.ts +3 -0
  74. package/lib/rest/intelligence/v2/operatorType.d.ts +9 -0
  75. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -0
  76. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +3 -0
  77. package/lib/rest/intelligence/v2/transcript.d.ts +3 -0
  78. package/lib/rest/knowledge/V1.d.ts +15 -0
  79. package/lib/rest/{preview/Sync.js → knowledge/V1.js} +11 -11
  80. package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +167 -0
  81. package/lib/rest/knowledge/v1/knowledge/chunk.js +131 -0
  82. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +101 -0
  83. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +118 -0
  84. package/lib/rest/knowledge/v1/knowledge.d.ts +406 -0
  85. package/lib/rest/{preview/sync/service/document.js → knowledge/v1/knowledge.js} +102 -91
  86. package/lib/rest/lookups/v1/phoneNumber.d.ts +1 -1
  87. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +3 -0
  88. package/lib/rest/messaging/v1/brandRegistration.d.ts +9 -0
  89. package/lib/rest/messaging/v1/service.d.ts +3 -0
  90. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +6 -0
  91. package/lib/rest/monitor/v1/event.d.ts +1 -1
  92. package/lib/rest/notify/v1/service/binding.d.ts +3 -0
  93. package/lib/rest/notify/v1/service/notification.d.ts +3 -0
  94. package/lib/rest/numbers/v1/portingPortability.d.ts +3 -0
  95. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.d.ts +3 -0
  96. package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +3 -0
  97. package/lib/rest/numbers/v2/authorizationDocument.d.ts +3 -0
  98. package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -0
  99. package/lib/rest/numbers/v2/bundleClone.d.ts +3 -0
  100. package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +6 -0
  101. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +3 -0
  102. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -0
  103. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +3 -0
  104. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +3 -0
  105. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +3 -0
  106. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -0
  107. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +3 -0
  108. package/lib/rest/numbers/v2/regulatoryCompliance.d.ts +3 -0
  109. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +6 -0
  110. package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +3 -0
  111. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +6 -0
  112. package/lib/rest/proxy/v1/service/session/interaction.d.ts +3 -0
  113. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +3 -0
  114. package/lib/rest/proxy/v1/service/session.d.ts +6 -0
  115. package/lib/rest/proxy/v1/service.d.ts +6 -0
  116. package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +3 -0
  117. package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +3 -0
  118. package/lib/rest/serverless/v1/service/build.d.ts +6 -0
  119. package/lib/rest/serverless/v1/service/environment/log.d.ts +3 -0
  120. package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +3 -0
  121. package/lib/rest/studio/v1/flow/engagement/step.d.ts +6 -0
  122. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  123. package/lib/rest/studio/v1/flow/engagement.d.ts +3 -0
  124. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +6 -0
  125. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  126. package/lib/rest/studio/v1/flow/execution.d.ts +3 -0
  127. package/lib/rest/studio/v1/flow.d.ts +3 -0
  128. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +6 -0
  129. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  130. package/lib/rest/studio/v2/flow/execution.d.ts +3 -0
  131. package/lib/rest/studio/v2/flow/flowRevision.d.ts +3 -0
  132. package/lib/rest/studio/v2/flow.d.ts +3 -0
  133. package/lib/rest/supersim/v1/esimProfile.d.ts +3 -0
  134. package/lib/rest/supersim/v1/fleet.d.ts +3 -0
  135. package/lib/rest/supersim/v1/ipCommand.d.ts +9 -0
  136. package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -0
  137. package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +3 -0
  138. package/lib/rest/supersim/v1/sim.d.ts +3 -0
  139. package/lib/rest/supersim/v1/smsCommand.d.ts +6 -0
  140. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +1 -1
  141. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +3 -0
  142. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +1 -1
  143. package/lib/rest/trunking/v1/trunk.d.ts +3 -0
  144. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -0
  145. package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -0
  146. package/lib/rest/trusthub/v1/supportingDocument.d.ts +3 -0
  147. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -0
  148. package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -0
  149. package/lib/rest/verify/v2/service/verification.d.ts +6 -0
  150. package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -0
  151. package/lib/rest/verify/v2/service/webhook.d.ts +6 -0
  152. package/lib/rest/verify/v2/verificationAttempt.d.ts +3 -0
  153. package/lib/rest/video/v1/composition.d.ts +6 -0
  154. package/lib/rest/video/v1/compositionHook.d.ts +3 -0
  155. package/lib/rest/video/v1/recording.d.ts +9 -0
  156. package/lib/rest/video/v1/room/participant/anonymize.d.ts +3 -0
  157. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +3 -0
  158. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +3 -0
  159. package/lib/rest/video/v1/room/participant.d.ts +4 -1
  160. package/lib/rest/video/v1/room/roomRecording.d.ts +9 -0
  161. package/lib/rest/wireless/v1/command.d.ts +12 -0
  162. package/lib/rest/wireless/v1/ratePlan.d.ts +6 -0
  163. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  164. package/lib/rest/wireless/v1/sim.d.ts +6 -0
  165. package/package.json +1 -1
  166. package/lib/rest/preview/Sync.d.ts +0 -15
  167. package/lib/rest/preview/sync/service/document/documentPermission.d.ts +0 -280
  168. package/lib/rest/preview/sync/service/document/documentPermission.js +0 -260
  169. package/lib/rest/preview/sync/service/document.d.ts +0 -295
  170. package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +0 -321
  171. package/lib/rest/preview/sync/service/syncList/syncListItem.js +0 -286
  172. package/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +0 -280
  173. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +0 -260
  174. package/lib/rest/preview/sync/service/syncList.d.ts +0 -270
  175. package/lib/rest/preview/sync/service/syncList.js +0 -270
  176. package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +0 -323
  177. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +0 -290
  178. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +0 -280
  179. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +0 -260
  180. package/lib/rest/preview/sync/service/syncMap.d.ts +0 -270
  181. package/lib/rest/preview/sync/service/syncMap.js +0 -270
  182. package/lib/rest/preview/sync/service.d.ts +0 -330
  183. package/lib/rest/preview/sync/service.js +0 -316
@@ -1,270 +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 Sync from "../../Sync";
6
- import { SyncMapItemListInstance } from "./syncMap/syncMapItem";
7
- import { SyncMapPermissionListInstance } from "./syncMap/syncMapPermission";
8
- /**
9
- * Options to pass to create a SyncMapInstance
10
- */
11
- export interface SyncMapListInstanceCreateOptions {
12
- /** */
13
- uniqueName?: string;
14
- }
15
- /**
16
- * Options to pass to each
17
- */
18
- export interface SyncMapListInstanceEachOptions {
19
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
20
- pageSize?: number;
21
- /** Function to process each record. If this and a positional callback are passed, this one will be used */
22
- callback?: (item: SyncMapInstance, done: (err?: Error) => void) => void;
23
- /** Function to be called upon completion of streaming */
24
- done?: Function;
25
- /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
26
- limit?: number;
27
- }
28
- /**
29
- * Options to pass to list
30
- */
31
- export interface SyncMapListInstanceOptions {
32
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
33
- pageSize?: number;
34
- /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
35
- limit?: number;
36
- }
37
- /**
38
- * Options to pass to page
39
- */
40
- export interface SyncMapListInstancePageOptions {
41
- /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
42
- pageSize?: number;
43
- /** Page Number, this value is simply for client state */
44
- pageNumber?: number;
45
- /** PageToken provided by the API */
46
- pageToken?: string;
47
- }
48
- export interface SyncMapContext {
49
- syncMapItems: SyncMapItemListInstance;
50
- syncMapPermissions: SyncMapPermissionListInstance;
51
- /**
52
- * Remove a SyncMapInstance
53
- *
54
- * @param callback - Callback to handle processed record
55
- *
56
- * @returns Resolves to processed boolean
57
- */
58
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
59
- /**
60
- * Fetch a SyncMapInstance
61
- *
62
- * @param callback - Callback to handle processed record
63
- *
64
- * @returns Resolves to processed SyncMapInstance
65
- */
66
- fetch(callback?: (error: Error | null, item?: SyncMapInstance) => any): Promise<SyncMapInstance>;
67
- /**
68
- * Provide a user-friendly representation
69
- */
70
- toJSON(): any;
71
- [inspect.custom](_depth: any, options: InspectOptions): any;
72
- }
73
- export interface SyncMapContextSolution {
74
- serviceSid: string;
75
- sid: string;
76
- }
77
- export declare class SyncMapContextImpl implements SyncMapContext {
78
- protected _version: Sync;
79
- protected _solution: SyncMapContextSolution;
80
- protected _uri: string;
81
- protected _syncMapItems?: SyncMapItemListInstance;
82
- protected _syncMapPermissions?: SyncMapPermissionListInstance;
83
- constructor(_version: Sync, serviceSid: string, sid: string);
84
- get syncMapItems(): SyncMapItemListInstance;
85
- get syncMapPermissions(): SyncMapPermissionListInstance;
86
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
87
- fetch(callback?: (error: Error | null, item?: SyncMapInstance) => any): Promise<SyncMapInstance>;
88
- /**
89
- * Provide a user-friendly representation
90
- *
91
- * @returns Object
92
- */
93
- toJSON(): SyncMapContextSolution;
94
- [inspect.custom](_depth: any, options: InspectOptions): string;
95
- }
96
- interface SyncMapPayload extends TwilioResponsePayload {
97
- maps: SyncMapResource[];
98
- }
99
- interface SyncMapResource {
100
- sid: string;
101
- unique_name: string;
102
- account_sid: string;
103
- service_sid: string;
104
- url: string;
105
- links: Record<string, string>;
106
- revision: string;
107
- date_created: Date;
108
- date_updated: Date;
109
- created_by: string;
110
- }
111
- export declare class SyncMapInstance {
112
- protected _version: Sync;
113
- protected _solution: SyncMapContextSolution;
114
- protected _context?: SyncMapContext;
115
- constructor(_version: Sync, payload: SyncMapResource, serviceSid: string, sid?: string);
116
- sid: string;
117
- uniqueName: string;
118
- accountSid: string;
119
- serviceSid: string;
120
- url: string;
121
- links: Record<string, string>;
122
- revision: string;
123
- dateCreated: Date;
124
- dateUpdated: Date;
125
- createdBy: string;
126
- private get _proxy();
127
- /**
128
- * Remove a SyncMapInstance
129
- *
130
- * @param callback - Callback to handle processed record
131
- *
132
- * @returns Resolves to processed boolean
133
- */
134
- remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
135
- /**
136
- * Fetch a SyncMapInstance
137
- *
138
- * @param callback - Callback to handle processed record
139
- *
140
- * @returns Resolves to processed SyncMapInstance
141
- */
142
- fetch(callback?: (error: Error | null, item?: SyncMapInstance) => any): Promise<SyncMapInstance>;
143
- /**
144
- * Access the syncMapItems.
145
- */
146
- syncMapItems(): SyncMapItemListInstance;
147
- /**
148
- * Access the syncMapPermissions.
149
- */
150
- syncMapPermissions(): SyncMapPermissionListInstance;
151
- /**
152
- * Provide a user-friendly representation
153
- *
154
- * @returns Object
155
- */
156
- toJSON(): {
157
- sid: string;
158
- uniqueName: string;
159
- accountSid: string;
160
- serviceSid: string;
161
- url: string;
162
- links: Record<string, string>;
163
- revision: string;
164
- dateCreated: Date;
165
- dateUpdated: Date;
166
- createdBy: string;
167
- };
168
- [inspect.custom](_depth: any, options: InspectOptions): string;
169
- }
170
- export interface SyncMapSolution {
171
- serviceSid: string;
172
- }
173
- export interface SyncMapListInstance {
174
- _version: Sync;
175
- _solution: SyncMapSolution;
176
- _uri: string;
177
- (sid: string): SyncMapContext;
178
- get(sid: string): SyncMapContext;
179
- /**
180
- * Create a SyncMapInstance
181
- *
182
- * @param callback - Callback to handle processed record
183
- *
184
- * @returns Resolves to processed SyncMapInstance
185
- */
186
- create(callback?: (error: Error | null, item?: SyncMapInstance) => any): Promise<SyncMapInstance>;
187
- /**
188
- * Create a SyncMapInstance
189
- *
190
- * @param params - Parameter for request
191
- * @param callback - Callback to handle processed record
192
- *
193
- * @returns Resolves to processed SyncMapInstance
194
- */
195
- create(params: SyncMapListInstanceCreateOptions, callback?: (error: Error | null, item?: SyncMapInstance) => any): Promise<SyncMapInstance>;
196
- /**
197
- * Streams SyncMapInstance records from the API.
198
- *
199
- * This operation lazily loads records as efficiently as possible until the limit
200
- * is reached.
201
- *
202
- * The results are passed into the callback function, so this operation is memory
203
- * efficient.
204
- *
205
- * If a function is passed as the first argument, it will be used as the callback
206
- * function.
207
- *
208
- * @param { SyncMapListInstanceEachOptions } [params] - Options for request
209
- * @param { function } [callback] - Function to process each record
210
- */
211
- each(callback?: (item: SyncMapInstance, done: (err?: Error) => void) => void): void;
212
- each(params: SyncMapListInstanceEachOptions, callback?: (item: SyncMapInstance, done: (err?: Error) => void) => void): void;
213
- /**
214
- * Retrieve a single target page of SyncMapInstance records from the API.
215
- *
216
- * The request is executed immediately.
217
- *
218
- * @param { string } [targetUrl] - API-generated URL for the requested results page
219
- * @param { function } [callback] - Callback to handle list of records
220
- */
221
- getPage(targetUrl: string, callback?: (error: Error | null, items: SyncMapPage) => any): Promise<SyncMapPage>;
222
- /**
223
- * Lists SyncMapInstance records from the API as a list.
224
- *
225
- * If a function is passed as the first argument, it will be used as the callback
226
- * function.
227
- *
228
- * @param { SyncMapListInstanceOptions } [params] - Options for request
229
- * @param { function } [callback] - Callback to handle list of records
230
- */
231
- list(callback?: (error: Error | null, items: SyncMapInstance[]) => any): Promise<SyncMapInstance[]>;
232
- list(params: SyncMapListInstanceOptions, callback?: (error: Error | null, items: SyncMapInstance[]) => any): Promise<SyncMapInstance[]>;
233
- /**
234
- * Retrieve a single page of SyncMapInstance records from the API.
235
- *
236
- * The request is executed immediately.
237
- *
238
- * If a function is passed as the first argument, it will be used as the callback
239
- * function.
240
- *
241
- * @param { SyncMapListInstancePageOptions } [params] - Options for request
242
- * @param { function } [callback] - Callback to handle list of records
243
- */
244
- page(callback?: (error: Error | null, items: SyncMapPage) => any): Promise<SyncMapPage>;
245
- page(params: SyncMapListInstancePageOptions, callback?: (error: Error | null, items: SyncMapPage) => any): Promise<SyncMapPage>;
246
- /**
247
- * Provide a user-friendly representation
248
- */
249
- toJSON(): any;
250
- [inspect.custom](_depth: any, options: InspectOptions): any;
251
- }
252
- export declare function SyncMapListInstance(version: Sync, serviceSid: string): SyncMapListInstance;
253
- export declare class SyncMapPage extends Page<Sync, SyncMapPayload, SyncMapResource, SyncMapInstance> {
254
- /**
255
- * Initialize the SyncMapPage
256
- *
257
- * @param version - Version of the resource
258
- * @param response - Response from the API
259
- * @param solution - Path solution
260
- */
261
- constructor(version: Sync, response: Response<string>, solution: SyncMapSolution);
262
- /**
263
- * Build an instance of SyncMapInstance
264
- *
265
- * @param payload - Payload response from the API
266
- */
267
- getInstance(payload: SyncMapResource): SyncMapInstance;
268
- [inspect.custom](depth: any, options: InspectOptions): string;
269
- }
270
- export {};
@@ -1,270 +0,0 @@
1
- "use strict";
2
- /*
3
- * This code was generated by
4
- * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
- * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
- * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
- *
8
- * Twilio - Preview
9
- * This is the public Twilio REST API.
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator.
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.SyncMapPage = exports.SyncMapListInstance = exports.SyncMapInstance = exports.SyncMapContextImpl = 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 syncMapItem_1 = require("./syncMap/syncMapItem");
26
- const syncMapPermission_1 = require("./syncMap/syncMapPermission");
27
- class SyncMapContextImpl {
28
- constructor(_version, serviceSid, sid) {
29
- this._version = _version;
30
- if (!(0, utility_1.isValidPathParam)(serviceSid)) {
31
- throw new Error("Parameter 'serviceSid' is not valid.");
32
- }
33
- if (!(0, utility_1.isValidPathParam)(sid)) {
34
- throw new Error("Parameter 'sid' is not valid.");
35
- }
36
- this._solution = { serviceSid, sid };
37
- this._uri = `/Services/${serviceSid}/Maps/${sid}`;
38
- }
39
- get syncMapItems() {
40
- this._syncMapItems =
41
- this._syncMapItems ||
42
- (0, syncMapItem_1.SyncMapItemListInstance)(this._version, this._solution.serviceSid, this._solution.sid);
43
- return this._syncMapItems;
44
- }
45
- get syncMapPermissions() {
46
- this._syncMapPermissions =
47
- this._syncMapPermissions ||
48
- (0, syncMapPermission_1.SyncMapPermissionListInstance)(this._version, this._solution.serviceSid, this._solution.sid);
49
- return this._syncMapPermissions;
50
- }
51
- remove(callback) {
52
- const headers = {};
53
- const instance = this;
54
- let operationVersion = instance._version, operationPromise = operationVersion.remove({
55
- uri: instance._uri,
56
- method: "delete",
57
- headers,
58
- });
59
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
60
- return operationPromise;
61
- }
62
- fetch(callback) {
63
- const headers = {};
64
- headers["Accept"] = "application/json";
65
- const instance = this;
66
- let operationVersion = instance._version, operationPromise = operationVersion.fetch({
67
- uri: instance._uri,
68
- method: "get",
69
- headers,
70
- });
71
- operationPromise = operationPromise.then((payload) => new SyncMapInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.sid));
72
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
73
- return operationPromise;
74
- }
75
- /**
76
- * Provide a user-friendly representation
77
- *
78
- * @returns Object
79
- */
80
- toJSON() {
81
- return this._solution;
82
- }
83
- [util_1.inspect.custom](_depth, options) {
84
- return (0, util_1.inspect)(this.toJSON(), options);
85
- }
86
- }
87
- exports.SyncMapContextImpl = SyncMapContextImpl;
88
- class SyncMapInstance {
89
- constructor(_version, payload, serviceSid, sid) {
90
- this._version = _version;
91
- this.sid = payload.sid;
92
- this.uniqueName = payload.unique_name;
93
- this.accountSid = payload.account_sid;
94
- this.serviceSid = payload.service_sid;
95
- this.url = payload.url;
96
- this.links = payload.links;
97
- this.revision = payload.revision;
98
- this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
99
- this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
100
- this.createdBy = payload.created_by;
101
- this._solution = { serviceSid, sid: sid || this.sid };
102
- }
103
- get _proxy() {
104
- this._context =
105
- this._context ||
106
- new SyncMapContextImpl(this._version, this._solution.serviceSid, this._solution.sid);
107
- return this._context;
108
- }
109
- /**
110
- * Remove a SyncMapInstance
111
- *
112
- * @param callback - Callback to handle processed record
113
- *
114
- * @returns Resolves to processed boolean
115
- */
116
- remove(callback) {
117
- return this._proxy.remove(callback);
118
- }
119
- /**
120
- * Fetch a SyncMapInstance
121
- *
122
- * @param callback - Callback to handle processed record
123
- *
124
- * @returns Resolves to processed SyncMapInstance
125
- */
126
- fetch(callback) {
127
- return this._proxy.fetch(callback);
128
- }
129
- /**
130
- * Access the syncMapItems.
131
- */
132
- syncMapItems() {
133
- return this._proxy.syncMapItems;
134
- }
135
- /**
136
- * Access the syncMapPermissions.
137
- */
138
- syncMapPermissions() {
139
- return this._proxy.syncMapPermissions;
140
- }
141
- /**
142
- * Provide a user-friendly representation
143
- *
144
- * @returns Object
145
- */
146
- toJSON() {
147
- return {
148
- sid: this.sid,
149
- uniqueName: this.uniqueName,
150
- accountSid: this.accountSid,
151
- serviceSid: this.serviceSid,
152
- url: this.url,
153
- links: this.links,
154
- revision: this.revision,
155
- dateCreated: this.dateCreated,
156
- dateUpdated: this.dateUpdated,
157
- createdBy: this.createdBy,
158
- };
159
- }
160
- [util_1.inspect.custom](_depth, options) {
161
- return (0, util_1.inspect)(this.toJSON(), options);
162
- }
163
- }
164
- exports.SyncMapInstance = SyncMapInstance;
165
- function SyncMapListInstance(version, serviceSid) {
166
- if (!(0, utility_1.isValidPathParam)(serviceSid)) {
167
- throw new Error("Parameter 'serviceSid' is not valid.");
168
- }
169
- const instance = ((sid) => instance.get(sid));
170
- instance.get = function get(sid) {
171
- return new SyncMapContextImpl(version, serviceSid, sid);
172
- };
173
- instance._version = version;
174
- instance._solution = { serviceSid };
175
- instance._uri = `/Services/${serviceSid}/Maps`;
176
- instance.create = function create(params, callback) {
177
- if (params instanceof Function) {
178
- callback = params;
179
- params = {};
180
- }
181
- else {
182
- params = params || {};
183
- }
184
- let data = {};
185
- if (params["uniqueName"] !== undefined)
186
- data["UniqueName"] = params["uniqueName"];
187
- const headers = {};
188
- headers["Content-Type"] = "application/x-www-form-urlencoded";
189
- headers["Accept"] = "application/json";
190
- let operationVersion = version, operationPromise = operationVersion.create({
191
- uri: instance._uri,
192
- method: "post",
193
- data,
194
- headers,
195
- });
196
- operationPromise = operationPromise.then((payload) => new SyncMapInstance(operationVersion, payload, instance._solution.serviceSid));
197
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
198
- return operationPromise;
199
- };
200
- instance.page = function page(params, callback) {
201
- if (params instanceof Function) {
202
- callback = params;
203
- params = {};
204
- }
205
- else {
206
- params = params || {};
207
- }
208
- let data = {};
209
- if (params["pageSize"] !== undefined)
210
- data["PageSize"] = params["pageSize"];
211
- if (params.pageNumber !== undefined)
212
- data["Page"] = params.pageNumber;
213
- if (params.pageToken !== undefined)
214
- data["PageToken"] = params.pageToken;
215
- const headers = {};
216
- headers["Accept"] = "application/json";
217
- let operationVersion = version, operationPromise = operationVersion.page({
218
- uri: instance._uri,
219
- method: "get",
220
- params: data,
221
- headers,
222
- });
223
- operationPromise = operationPromise.then((payload) => new SyncMapPage(operationVersion, payload, instance._solution));
224
- operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
225
- return operationPromise;
226
- };
227
- instance.each = instance._version.each;
228
- instance.list = instance._version.list;
229
- instance.getPage = function getPage(targetUrl, callback) {
230
- const operationPromise = instance._version._domain.twilio.request({
231
- method: "get",
232
- uri: targetUrl,
233
- });
234
- let pagePromise = operationPromise.then((payload) => new SyncMapPage(instance._version, payload, instance._solution));
235
- pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
236
- return pagePromise;
237
- };
238
- instance.toJSON = function toJSON() {
239
- return instance._solution;
240
- };
241
- instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
242
- return (0, util_1.inspect)(instance.toJSON(), options);
243
- };
244
- return instance;
245
- }
246
- exports.SyncMapListInstance = SyncMapListInstance;
247
- class SyncMapPage extends Page_1.default {
248
- /**
249
- * Initialize the SyncMapPage
250
- *
251
- * @param version - Version of the resource
252
- * @param response - Response from the API
253
- * @param solution - Path solution
254
- */
255
- constructor(version, response, solution) {
256
- super(version, response, solution);
257
- }
258
- /**
259
- * Build an instance of SyncMapInstance
260
- *
261
- * @param payload - Payload response from the API
262
- */
263
- getInstance(payload) {
264
- return new SyncMapInstance(this._version, payload, this._solution.serviceSid);
265
- }
266
- [util_1.inspect.custom](depth, options) {
267
- return (0, util_1.inspect)(this.toJSON(), options);
268
- }
269
- }
270
- exports.SyncMapPage = SyncMapPage;