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,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 { SyncListItemListInstance } from "./syncList/syncListItem";
|
|
7
|
-
import { SyncListPermissionListInstance } from "./syncList/syncListPermission";
|
|
8
|
-
/**
|
|
9
|
-
* Options to pass to create a SyncListInstance
|
|
10
|
-
*/
|
|
11
|
-
export interface SyncListListInstanceCreateOptions {
|
|
12
|
-
/** */
|
|
13
|
-
uniqueName?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Options to pass to each
|
|
17
|
-
*/
|
|
18
|
-
export interface SyncListListInstanceEachOptions {
|
|
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: SyncListInstance, 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 SyncListListInstanceOptions {
|
|
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 SyncListListInstancePageOptions {
|
|
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 SyncListContext {
|
|
49
|
-
syncListItems: SyncListItemListInstance;
|
|
50
|
-
syncListPermissions: SyncListPermissionListInstance;
|
|
51
|
-
/**
|
|
52
|
-
* Remove a SyncListInstance
|
|
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 SyncListInstance
|
|
61
|
-
*
|
|
62
|
-
* @param callback - Callback to handle processed record
|
|
63
|
-
*
|
|
64
|
-
* @returns Resolves to processed SyncListInstance
|
|
65
|
-
*/
|
|
66
|
-
fetch(callback?: (error: Error | null, item?: SyncListInstance) => any): Promise<SyncListInstance>;
|
|
67
|
-
/**
|
|
68
|
-
* Provide a user-friendly representation
|
|
69
|
-
*/
|
|
70
|
-
toJSON(): any;
|
|
71
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
72
|
-
}
|
|
73
|
-
export interface SyncListContextSolution {
|
|
74
|
-
serviceSid: string;
|
|
75
|
-
sid: string;
|
|
76
|
-
}
|
|
77
|
-
export declare class SyncListContextImpl implements SyncListContext {
|
|
78
|
-
protected _version: Sync;
|
|
79
|
-
protected _solution: SyncListContextSolution;
|
|
80
|
-
protected _uri: string;
|
|
81
|
-
protected _syncListItems?: SyncListItemListInstance;
|
|
82
|
-
protected _syncListPermissions?: SyncListPermissionListInstance;
|
|
83
|
-
constructor(_version: Sync, serviceSid: string, sid: string);
|
|
84
|
-
get syncListItems(): SyncListItemListInstance;
|
|
85
|
-
get syncListPermissions(): SyncListPermissionListInstance;
|
|
86
|
-
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
87
|
-
fetch(callback?: (error: Error | null, item?: SyncListInstance) => any): Promise<SyncListInstance>;
|
|
88
|
-
/**
|
|
89
|
-
* Provide a user-friendly representation
|
|
90
|
-
*
|
|
91
|
-
* @returns Object
|
|
92
|
-
*/
|
|
93
|
-
toJSON(): SyncListContextSolution;
|
|
94
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
95
|
-
}
|
|
96
|
-
interface SyncListPayload extends TwilioResponsePayload {
|
|
97
|
-
lists: SyncListResource[];
|
|
98
|
-
}
|
|
99
|
-
interface SyncListResource {
|
|
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 SyncListInstance {
|
|
112
|
-
protected _version: Sync;
|
|
113
|
-
protected _solution: SyncListContextSolution;
|
|
114
|
-
protected _context?: SyncListContext;
|
|
115
|
-
constructor(_version: Sync, payload: SyncListResource, 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 SyncListInstance
|
|
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 SyncListInstance
|
|
137
|
-
*
|
|
138
|
-
* @param callback - Callback to handle processed record
|
|
139
|
-
*
|
|
140
|
-
* @returns Resolves to processed SyncListInstance
|
|
141
|
-
*/
|
|
142
|
-
fetch(callback?: (error: Error | null, item?: SyncListInstance) => any): Promise<SyncListInstance>;
|
|
143
|
-
/**
|
|
144
|
-
* Access the syncListItems.
|
|
145
|
-
*/
|
|
146
|
-
syncListItems(): SyncListItemListInstance;
|
|
147
|
-
/**
|
|
148
|
-
* Access the syncListPermissions.
|
|
149
|
-
*/
|
|
150
|
-
syncListPermissions(): SyncListPermissionListInstance;
|
|
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 SyncListSolution {
|
|
171
|
-
serviceSid: string;
|
|
172
|
-
}
|
|
173
|
-
export interface SyncListListInstance {
|
|
174
|
-
_version: Sync;
|
|
175
|
-
_solution: SyncListSolution;
|
|
176
|
-
_uri: string;
|
|
177
|
-
(sid: string): SyncListContext;
|
|
178
|
-
get(sid: string): SyncListContext;
|
|
179
|
-
/**
|
|
180
|
-
* Create a SyncListInstance
|
|
181
|
-
*
|
|
182
|
-
* @param callback - Callback to handle processed record
|
|
183
|
-
*
|
|
184
|
-
* @returns Resolves to processed SyncListInstance
|
|
185
|
-
*/
|
|
186
|
-
create(callback?: (error: Error | null, item?: SyncListInstance) => any): Promise<SyncListInstance>;
|
|
187
|
-
/**
|
|
188
|
-
* Create a SyncListInstance
|
|
189
|
-
*
|
|
190
|
-
* @param params - Parameter for request
|
|
191
|
-
* @param callback - Callback to handle processed record
|
|
192
|
-
*
|
|
193
|
-
* @returns Resolves to processed SyncListInstance
|
|
194
|
-
*/
|
|
195
|
-
create(params: SyncListListInstanceCreateOptions, callback?: (error: Error | null, item?: SyncListInstance) => any): Promise<SyncListInstance>;
|
|
196
|
-
/**
|
|
197
|
-
* Streams SyncListInstance 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 { SyncListListInstanceEachOptions } [params] - Options for request
|
|
209
|
-
* @param { function } [callback] - Function to process each record
|
|
210
|
-
*/
|
|
211
|
-
each(callback?: (item: SyncListInstance, done: (err?: Error) => void) => void): void;
|
|
212
|
-
each(params: SyncListListInstanceEachOptions, callback?: (item: SyncListInstance, done: (err?: Error) => void) => void): void;
|
|
213
|
-
/**
|
|
214
|
-
* Retrieve a single target page of SyncListInstance 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: SyncListPage) => any): Promise<SyncListPage>;
|
|
222
|
-
/**
|
|
223
|
-
* Lists SyncListInstance 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 { SyncListListInstanceOptions } [params] - Options for request
|
|
229
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
230
|
-
*/
|
|
231
|
-
list(callback?: (error: Error | null, items: SyncListInstance[]) => any): Promise<SyncListInstance[]>;
|
|
232
|
-
list(params: SyncListListInstanceOptions, callback?: (error: Error | null, items: SyncListInstance[]) => any): Promise<SyncListInstance[]>;
|
|
233
|
-
/**
|
|
234
|
-
* Retrieve a single page of SyncListInstance 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 { SyncListListInstancePageOptions } [params] - Options for request
|
|
242
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
243
|
-
*/
|
|
244
|
-
page(callback?: (error: Error | null, items: SyncListPage) => any): Promise<SyncListPage>;
|
|
245
|
-
page(params: SyncListListInstancePageOptions, callback?: (error: Error | null, items: SyncListPage) => any): Promise<SyncListPage>;
|
|
246
|
-
/**
|
|
247
|
-
* Provide a user-friendly representation
|
|
248
|
-
*/
|
|
249
|
-
toJSON(): any;
|
|
250
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
251
|
-
}
|
|
252
|
-
export declare function SyncListListInstance(version: Sync, serviceSid: string): SyncListListInstance;
|
|
253
|
-
export declare class SyncListPage extends Page<Sync, SyncListPayload, SyncListResource, SyncListInstance> {
|
|
254
|
-
/**
|
|
255
|
-
* Initialize the SyncListPage
|
|
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: SyncListSolution);
|
|
262
|
-
/**
|
|
263
|
-
* Build an instance of SyncListInstance
|
|
264
|
-
*
|
|
265
|
-
* @param payload - Payload response from the API
|
|
266
|
-
*/
|
|
267
|
-
getInstance(payload: SyncListResource): SyncListInstance;
|
|
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.SyncListPage = exports.SyncListListInstance = exports.SyncListInstance = exports.SyncListContextImpl = 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 syncListItem_1 = require("./syncList/syncListItem");
|
|
26
|
-
const syncListPermission_1 = require("./syncList/syncListPermission");
|
|
27
|
-
class SyncListContextImpl {
|
|
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}/Lists/${sid}`;
|
|
38
|
-
}
|
|
39
|
-
get syncListItems() {
|
|
40
|
-
this._syncListItems =
|
|
41
|
-
this._syncListItems ||
|
|
42
|
-
(0, syncListItem_1.SyncListItemListInstance)(this._version, this._solution.serviceSid, this._solution.sid);
|
|
43
|
-
return this._syncListItems;
|
|
44
|
-
}
|
|
45
|
-
get syncListPermissions() {
|
|
46
|
-
this._syncListPermissions =
|
|
47
|
-
this._syncListPermissions ||
|
|
48
|
-
(0, syncListPermission_1.SyncListPermissionListInstance)(this._version, this._solution.serviceSid, this._solution.sid);
|
|
49
|
-
return this._syncListPermissions;
|
|
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 SyncListInstance(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.SyncListContextImpl = SyncListContextImpl;
|
|
88
|
-
class SyncListInstance {
|
|
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 SyncListContextImpl(this._version, this._solution.serviceSid, this._solution.sid);
|
|
107
|
-
return this._context;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Remove a SyncListInstance
|
|
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 SyncListInstance
|
|
121
|
-
*
|
|
122
|
-
* @param callback - Callback to handle processed record
|
|
123
|
-
*
|
|
124
|
-
* @returns Resolves to processed SyncListInstance
|
|
125
|
-
*/
|
|
126
|
-
fetch(callback) {
|
|
127
|
-
return this._proxy.fetch(callback);
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Access the syncListItems.
|
|
131
|
-
*/
|
|
132
|
-
syncListItems() {
|
|
133
|
-
return this._proxy.syncListItems;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Access the syncListPermissions.
|
|
137
|
-
*/
|
|
138
|
-
syncListPermissions() {
|
|
139
|
-
return this._proxy.syncListPermissions;
|
|
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.SyncListInstance = SyncListInstance;
|
|
165
|
-
function SyncListListInstance(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 SyncListContextImpl(version, serviceSid, sid);
|
|
172
|
-
};
|
|
173
|
-
instance._version = version;
|
|
174
|
-
instance._solution = { serviceSid };
|
|
175
|
-
instance._uri = `/Services/${serviceSid}/Lists`;
|
|
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 SyncListInstance(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 SyncListPage(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 SyncListPage(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.SyncListListInstance = SyncListListInstance;
|
|
247
|
-
class SyncListPage extends Page_1.default {
|
|
248
|
-
/**
|
|
249
|
-
* Initialize the SyncListPage
|
|
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 SyncListInstance
|
|
260
|
-
*
|
|
261
|
-
* @param payload - Payload response from the API
|
|
262
|
-
*/
|
|
263
|
-
getInstance(payload) {
|
|
264
|
-
return new SyncListInstance(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.SyncListPage = SyncListPage;
|