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