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,321 +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
|
-
export type SyncListItemQueryFromBoundType = "inclusive" | "exclusive";
|
|
7
|
-
export type SyncListItemQueryResultOrder = "asc" | "desc";
|
|
8
|
-
/**
|
|
9
|
-
* Options to pass to remove a SyncListItemInstance
|
|
10
|
-
*/
|
|
11
|
-
export interface SyncListItemContextRemoveOptions {
|
|
12
|
-
/** The If-Match HTTP request header */
|
|
13
|
-
ifMatch?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Options to pass to update a SyncListItemInstance
|
|
17
|
-
*/
|
|
18
|
-
export interface SyncListItemContextUpdateOptions {
|
|
19
|
-
/** */
|
|
20
|
-
data: object;
|
|
21
|
-
/** The If-Match HTTP request header */
|
|
22
|
-
ifMatch?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Options to pass to create a SyncListItemInstance
|
|
26
|
-
*/
|
|
27
|
-
export interface SyncListItemListInstanceCreateOptions {
|
|
28
|
-
/** */
|
|
29
|
-
data: object;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Options to pass to each
|
|
33
|
-
*/
|
|
34
|
-
export interface SyncListItemListInstanceEachOptions {
|
|
35
|
-
/** */
|
|
36
|
-
order?: SyncListItemQueryResultOrder;
|
|
37
|
-
/** */
|
|
38
|
-
from?: string;
|
|
39
|
-
/** */
|
|
40
|
-
bounds?: SyncListItemQueryFromBoundType;
|
|
41
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
42
|
-
pageSize?: number;
|
|
43
|
-
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
44
|
-
callback?: (item: SyncListItemInstance, done: (err?: Error) => void) => void;
|
|
45
|
-
/** Function to be called upon completion of streaming */
|
|
46
|
-
done?: Function;
|
|
47
|
-
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
48
|
-
limit?: number;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Options to pass to list
|
|
52
|
-
*/
|
|
53
|
-
export interface SyncListItemListInstanceOptions {
|
|
54
|
-
/** */
|
|
55
|
-
order?: SyncListItemQueryResultOrder;
|
|
56
|
-
/** */
|
|
57
|
-
from?: string;
|
|
58
|
-
/** */
|
|
59
|
-
bounds?: SyncListItemQueryFromBoundType;
|
|
60
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
61
|
-
pageSize?: number;
|
|
62
|
-
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
63
|
-
limit?: number;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Options to pass to page
|
|
67
|
-
*/
|
|
68
|
-
export interface SyncListItemListInstancePageOptions {
|
|
69
|
-
/** */
|
|
70
|
-
order?: SyncListItemQueryResultOrder;
|
|
71
|
-
/** */
|
|
72
|
-
from?: string;
|
|
73
|
-
/** */
|
|
74
|
-
bounds?: SyncListItemQueryFromBoundType;
|
|
75
|
-
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
76
|
-
pageSize?: number;
|
|
77
|
-
/** Page Number, this value is simply for client state */
|
|
78
|
-
pageNumber?: number;
|
|
79
|
-
/** PageToken provided by the API */
|
|
80
|
-
pageToken?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface SyncListItemContext {
|
|
83
|
-
/**
|
|
84
|
-
* Remove a SyncListItemInstance
|
|
85
|
-
*
|
|
86
|
-
* @param callback - Callback to handle processed record
|
|
87
|
-
*
|
|
88
|
-
* @returns Resolves to processed boolean
|
|
89
|
-
*/
|
|
90
|
-
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
91
|
-
/**
|
|
92
|
-
* Remove a SyncListItemInstance
|
|
93
|
-
*
|
|
94
|
-
* @param params - Parameter for request
|
|
95
|
-
* @param callback - Callback to handle processed record
|
|
96
|
-
*
|
|
97
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
98
|
-
*/
|
|
99
|
-
remove(params: SyncListItemContextRemoveOptions, callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
100
|
-
/**
|
|
101
|
-
* Fetch a SyncListItemInstance
|
|
102
|
-
*
|
|
103
|
-
* @param callback - Callback to handle processed record
|
|
104
|
-
*
|
|
105
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
106
|
-
*/
|
|
107
|
-
fetch(callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
108
|
-
/**
|
|
109
|
-
* Update a SyncListItemInstance
|
|
110
|
-
*
|
|
111
|
-
* @param params - Parameter for request
|
|
112
|
-
* @param callback - Callback to handle processed record
|
|
113
|
-
*
|
|
114
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
115
|
-
*/
|
|
116
|
-
update(params: SyncListItemContextUpdateOptions, callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
117
|
-
/**
|
|
118
|
-
* Provide a user-friendly representation
|
|
119
|
-
*/
|
|
120
|
-
toJSON(): any;
|
|
121
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
122
|
-
}
|
|
123
|
-
export interface SyncListItemContextSolution {
|
|
124
|
-
serviceSid: string;
|
|
125
|
-
listSid: string;
|
|
126
|
-
index: number;
|
|
127
|
-
}
|
|
128
|
-
export declare class SyncListItemContextImpl implements SyncListItemContext {
|
|
129
|
-
protected _version: Sync;
|
|
130
|
-
protected _solution: SyncListItemContextSolution;
|
|
131
|
-
protected _uri: string;
|
|
132
|
-
constructor(_version: Sync, serviceSid: string, listSid: string, index: number);
|
|
133
|
-
remove(params?: SyncListItemContextRemoveOptions | ((error: Error | null, item?: boolean) => any), callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
134
|
-
fetch(callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
135
|
-
update(params: SyncListItemContextUpdateOptions, callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
136
|
-
/**
|
|
137
|
-
* Provide a user-friendly representation
|
|
138
|
-
*
|
|
139
|
-
* @returns Object
|
|
140
|
-
*/
|
|
141
|
-
toJSON(): SyncListItemContextSolution;
|
|
142
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
143
|
-
}
|
|
144
|
-
interface SyncListItemPayload extends TwilioResponsePayload {
|
|
145
|
-
items: SyncListItemResource[];
|
|
146
|
-
}
|
|
147
|
-
interface SyncListItemResource {
|
|
148
|
-
index: number;
|
|
149
|
-
account_sid: string;
|
|
150
|
-
service_sid: string;
|
|
151
|
-
list_sid: string;
|
|
152
|
-
url: string;
|
|
153
|
-
revision: string;
|
|
154
|
-
data: Record<string, object>;
|
|
155
|
-
date_created: Date;
|
|
156
|
-
date_updated: Date;
|
|
157
|
-
created_by: string;
|
|
158
|
-
}
|
|
159
|
-
export declare class SyncListItemInstance {
|
|
160
|
-
protected _version: Sync;
|
|
161
|
-
protected _solution: SyncListItemContextSolution;
|
|
162
|
-
protected _context?: SyncListItemContext;
|
|
163
|
-
constructor(_version: Sync, payload: SyncListItemResource, serviceSid: string, listSid: string, index?: number);
|
|
164
|
-
index: number;
|
|
165
|
-
accountSid: string;
|
|
166
|
-
serviceSid: string;
|
|
167
|
-
listSid: string;
|
|
168
|
-
url: string;
|
|
169
|
-
revision: string;
|
|
170
|
-
data: Record<string, object>;
|
|
171
|
-
dateCreated: Date;
|
|
172
|
-
dateUpdated: Date;
|
|
173
|
-
createdBy: string;
|
|
174
|
-
private get _proxy();
|
|
175
|
-
/**
|
|
176
|
-
* Remove a SyncListItemInstance
|
|
177
|
-
*
|
|
178
|
-
* @param callback - Callback to handle processed record
|
|
179
|
-
*
|
|
180
|
-
* @returns Resolves to processed boolean
|
|
181
|
-
*/
|
|
182
|
-
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
183
|
-
/**
|
|
184
|
-
* Remove a SyncListItemInstance
|
|
185
|
-
*
|
|
186
|
-
* @param params - Parameter for request
|
|
187
|
-
* @param callback - Callback to handle processed record
|
|
188
|
-
*
|
|
189
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
190
|
-
*/
|
|
191
|
-
remove(params: SyncListItemContextRemoveOptions, callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
192
|
-
/**
|
|
193
|
-
* Fetch a SyncListItemInstance
|
|
194
|
-
*
|
|
195
|
-
* @param callback - Callback to handle processed record
|
|
196
|
-
*
|
|
197
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
198
|
-
*/
|
|
199
|
-
fetch(callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
200
|
-
/**
|
|
201
|
-
* Update a SyncListItemInstance
|
|
202
|
-
*
|
|
203
|
-
* @param params - Parameter for request
|
|
204
|
-
* @param callback - Callback to handle processed record
|
|
205
|
-
*
|
|
206
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
207
|
-
*/
|
|
208
|
-
update(params: SyncListItemContextUpdateOptions, callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
209
|
-
/**
|
|
210
|
-
* Provide a user-friendly representation
|
|
211
|
-
*
|
|
212
|
-
* @returns Object
|
|
213
|
-
*/
|
|
214
|
-
toJSON(): {
|
|
215
|
-
index: number;
|
|
216
|
-
accountSid: string;
|
|
217
|
-
serviceSid: string;
|
|
218
|
-
listSid: string;
|
|
219
|
-
url: string;
|
|
220
|
-
revision: string;
|
|
221
|
-
data: Record<string, object>;
|
|
222
|
-
dateCreated: Date;
|
|
223
|
-
dateUpdated: Date;
|
|
224
|
-
createdBy: string;
|
|
225
|
-
};
|
|
226
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
227
|
-
}
|
|
228
|
-
export interface SyncListItemSolution {
|
|
229
|
-
serviceSid: string;
|
|
230
|
-
listSid: string;
|
|
231
|
-
}
|
|
232
|
-
export interface SyncListItemListInstance {
|
|
233
|
-
_version: Sync;
|
|
234
|
-
_solution: SyncListItemSolution;
|
|
235
|
-
_uri: string;
|
|
236
|
-
(index: number): SyncListItemContext;
|
|
237
|
-
get(index: number): SyncListItemContext;
|
|
238
|
-
/**
|
|
239
|
-
* Create a SyncListItemInstance
|
|
240
|
-
*
|
|
241
|
-
* @param params - Parameter for request
|
|
242
|
-
* @param callback - Callback to handle processed record
|
|
243
|
-
*
|
|
244
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
245
|
-
*/
|
|
246
|
-
create(params: SyncListItemListInstanceCreateOptions, callback?: (error: Error | null, item?: SyncListItemInstance) => any): Promise<SyncListItemInstance>;
|
|
247
|
-
/**
|
|
248
|
-
* Streams SyncListItemInstance records from the API.
|
|
249
|
-
*
|
|
250
|
-
* This operation lazily loads records as efficiently as possible until the limit
|
|
251
|
-
* is reached.
|
|
252
|
-
*
|
|
253
|
-
* The results are passed into the callback function, so this operation is memory
|
|
254
|
-
* efficient.
|
|
255
|
-
*
|
|
256
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
257
|
-
* function.
|
|
258
|
-
*
|
|
259
|
-
* @param { SyncListItemListInstanceEachOptions } [params] - Options for request
|
|
260
|
-
* @param { function } [callback] - Function to process each record
|
|
261
|
-
*/
|
|
262
|
-
each(callback?: (item: SyncListItemInstance, done: (err?: Error) => void) => void): void;
|
|
263
|
-
each(params: SyncListItemListInstanceEachOptions, callback?: (item: SyncListItemInstance, done: (err?: Error) => void) => void): void;
|
|
264
|
-
/**
|
|
265
|
-
* Retrieve a single target page of SyncListItemInstance records from the API.
|
|
266
|
-
*
|
|
267
|
-
* The request is executed immediately.
|
|
268
|
-
*
|
|
269
|
-
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
270
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
271
|
-
*/
|
|
272
|
-
getPage(targetUrl: string, callback?: (error: Error | null, items: SyncListItemPage) => any): Promise<SyncListItemPage>;
|
|
273
|
-
/**
|
|
274
|
-
* Lists SyncListItemInstance records from the API as a list.
|
|
275
|
-
*
|
|
276
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
277
|
-
* function.
|
|
278
|
-
*
|
|
279
|
-
* @param { SyncListItemListInstanceOptions } [params] - Options for request
|
|
280
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
281
|
-
*/
|
|
282
|
-
list(callback?: (error: Error | null, items: SyncListItemInstance[]) => any): Promise<SyncListItemInstance[]>;
|
|
283
|
-
list(params: SyncListItemListInstanceOptions, callback?: (error: Error | null, items: SyncListItemInstance[]) => any): Promise<SyncListItemInstance[]>;
|
|
284
|
-
/**
|
|
285
|
-
* Retrieve a single page of SyncListItemInstance records from the API.
|
|
286
|
-
*
|
|
287
|
-
* The request is executed immediately.
|
|
288
|
-
*
|
|
289
|
-
* If a function is passed as the first argument, it will be used as the callback
|
|
290
|
-
* function.
|
|
291
|
-
*
|
|
292
|
-
* @param { SyncListItemListInstancePageOptions } [params] - Options for request
|
|
293
|
-
* @param { function } [callback] - Callback to handle list of records
|
|
294
|
-
*/
|
|
295
|
-
page(callback?: (error: Error | null, items: SyncListItemPage) => any): Promise<SyncListItemPage>;
|
|
296
|
-
page(params: SyncListItemListInstancePageOptions, callback?: (error: Error | null, items: SyncListItemPage) => any): Promise<SyncListItemPage>;
|
|
297
|
-
/**
|
|
298
|
-
* Provide a user-friendly representation
|
|
299
|
-
*/
|
|
300
|
-
toJSON(): any;
|
|
301
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
302
|
-
}
|
|
303
|
-
export declare function SyncListItemListInstance(version: Sync, serviceSid: string, listSid: string): SyncListItemListInstance;
|
|
304
|
-
export declare class SyncListItemPage extends Page<Sync, SyncListItemPayload, SyncListItemResource, SyncListItemInstance> {
|
|
305
|
-
/**
|
|
306
|
-
* Initialize the SyncListItemPage
|
|
307
|
-
*
|
|
308
|
-
* @param version - Version of the resource
|
|
309
|
-
* @param response - Response from the API
|
|
310
|
-
* @param solution - Path solution
|
|
311
|
-
*/
|
|
312
|
-
constructor(version: Sync, response: Response<string>, solution: SyncListItemSolution);
|
|
313
|
-
/**
|
|
314
|
-
* Build an instance of SyncListItemInstance
|
|
315
|
-
*
|
|
316
|
-
* @param payload - Payload response from the API
|
|
317
|
-
*/
|
|
318
|
-
getInstance(payload: SyncListItemResource): SyncListItemInstance;
|
|
319
|
-
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
320
|
-
}
|
|
321
|
-
export {};
|
|
@@ -1,286 +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.SyncListItemPage = exports.SyncListItemListInstance = exports.SyncListItemInstance = exports.SyncListItemContextImpl = 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 SyncListItemContextImpl {
|
|
26
|
-
constructor(_version, serviceSid, listSid, index) {
|
|
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)(listSid)) {
|
|
32
|
-
throw new Error("Parameter 'listSid' is not valid.");
|
|
33
|
-
}
|
|
34
|
-
if (!(0, utility_1.isValidPathParam)(index)) {
|
|
35
|
-
throw new Error("Parameter 'index' is not valid.");
|
|
36
|
-
}
|
|
37
|
-
this._solution = { serviceSid, listSid, index };
|
|
38
|
-
this._uri = `/Services/${serviceSid}/Lists/${listSid}/Items/${index}`;
|
|
39
|
-
}
|
|
40
|
-
remove(params, callback) {
|
|
41
|
-
if (params instanceof Function) {
|
|
42
|
-
callback = params;
|
|
43
|
-
params = {};
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
params = params || {};
|
|
47
|
-
}
|
|
48
|
-
let data = {};
|
|
49
|
-
const headers = {};
|
|
50
|
-
if (params["ifMatch"] !== undefined)
|
|
51
|
-
headers["If-Match"] = params["ifMatch"];
|
|
52
|
-
const instance = this;
|
|
53
|
-
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
54
|
-
uri: instance._uri,
|
|
55
|
-
method: "delete",
|
|
56
|
-
params: data,
|
|
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 SyncListItemInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.listSid, instance._solution.index));
|
|
72
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
73
|
-
return operationPromise;
|
|
74
|
-
}
|
|
75
|
-
update(params, callback) {
|
|
76
|
-
if (params === null || params === undefined) {
|
|
77
|
-
throw new Error('Required parameter "params" missing.');
|
|
78
|
-
}
|
|
79
|
-
if (params["data"] === null || params["data"] === undefined) {
|
|
80
|
-
throw new Error("Required parameter \"params['data']\" missing.");
|
|
81
|
-
}
|
|
82
|
-
let data = {};
|
|
83
|
-
data["Data"] = serialize.object(params["data"]);
|
|
84
|
-
const headers = {};
|
|
85
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
86
|
-
headers["Accept"] = "application/json";
|
|
87
|
-
if (params["ifMatch"] !== undefined)
|
|
88
|
-
headers["If-Match"] = params["ifMatch"];
|
|
89
|
-
const instance = this;
|
|
90
|
-
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
91
|
-
uri: instance._uri,
|
|
92
|
-
method: "post",
|
|
93
|
-
data,
|
|
94
|
-
headers,
|
|
95
|
-
});
|
|
96
|
-
operationPromise = operationPromise.then((payload) => new SyncListItemInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.listSid, instance._solution.index));
|
|
97
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
98
|
-
return operationPromise;
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Provide a user-friendly representation
|
|
102
|
-
*
|
|
103
|
-
* @returns Object
|
|
104
|
-
*/
|
|
105
|
-
toJSON() {
|
|
106
|
-
return this._solution;
|
|
107
|
-
}
|
|
108
|
-
[util_1.inspect.custom](_depth, options) {
|
|
109
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.SyncListItemContextImpl = SyncListItemContextImpl;
|
|
113
|
-
class SyncListItemInstance {
|
|
114
|
-
constructor(_version, payload, serviceSid, listSid, index) {
|
|
115
|
-
this._version = _version;
|
|
116
|
-
this.index = deserialize.integer(payload.index);
|
|
117
|
-
this.accountSid = payload.account_sid;
|
|
118
|
-
this.serviceSid = payload.service_sid;
|
|
119
|
-
this.listSid = payload.list_sid;
|
|
120
|
-
this.url = payload.url;
|
|
121
|
-
this.revision = payload.revision;
|
|
122
|
-
this.data = payload.data;
|
|
123
|
-
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
124
|
-
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
125
|
-
this.createdBy = payload.created_by;
|
|
126
|
-
this._solution = { serviceSid, listSid, index: index || this.index };
|
|
127
|
-
}
|
|
128
|
-
get _proxy() {
|
|
129
|
-
this._context =
|
|
130
|
-
this._context ||
|
|
131
|
-
new SyncListItemContextImpl(this._version, this._solution.serviceSid, this._solution.listSid, this._solution.index);
|
|
132
|
-
return this._context;
|
|
133
|
-
}
|
|
134
|
-
remove(params, callback) {
|
|
135
|
-
return this._proxy.remove(params, callback);
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Fetch a SyncListItemInstance
|
|
139
|
-
*
|
|
140
|
-
* @param callback - Callback to handle processed record
|
|
141
|
-
*
|
|
142
|
-
* @returns Resolves to processed SyncListItemInstance
|
|
143
|
-
*/
|
|
144
|
-
fetch(callback) {
|
|
145
|
-
return this._proxy.fetch(callback);
|
|
146
|
-
}
|
|
147
|
-
update(params, callback) {
|
|
148
|
-
return this._proxy.update(params, callback);
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* Provide a user-friendly representation
|
|
152
|
-
*
|
|
153
|
-
* @returns Object
|
|
154
|
-
*/
|
|
155
|
-
toJSON() {
|
|
156
|
-
return {
|
|
157
|
-
index: this.index,
|
|
158
|
-
accountSid: this.accountSid,
|
|
159
|
-
serviceSid: this.serviceSid,
|
|
160
|
-
listSid: this.listSid,
|
|
161
|
-
url: this.url,
|
|
162
|
-
revision: this.revision,
|
|
163
|
-
data: this.data,
|
|
164
|
-
dateCreated: this.dateCreated,
|
|
165
|
-
dateUpdated: this.dateUpdated,
|
|
166
|
-
createdBy: this.createdBy,
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
[util_1.inspect.custom](_depth, options) {
|
|
170
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
exports.SyncListItemInstance = SyncListItemInstance;
|
|
174
|
-
function SyncListItemListInstance(version, serviceSid, listSid) {
|
|
175
|
-
if (!(0, utility_1.isValidPathParam)(serviceSid)) {
|
|
176
|
-
throw new Error("Parameter 'serviceSid' is not valid.");
|
|
177
|
-
}
|
|
178
|
-
if (!(0, utility_1.isValidPathParam)(listSid)) {
|
|
179
|
-
throw new Error("Parameter 'listSid' is not valid.");
|
|
180
|
-
}
|
|
181
|
-
const instance = ((index) => instance.get(index));
|
|
182
|
-
instance.get = function get(index) {
|
|
183
|
-
return new SyncListItemContextImpl(version, serviceSid, listSid, index);
|
|
184
|
-
};
|
|
185
|
-
instance._version = version;
|
|
186
|
-
instance._solution = { serviceSid, listSid };
|
|
187
|
-
instance._uri = `/Services/${serviceSid}/Lists/${listSid}/Items`;
|
|
188
|
-
instance.create = function create(params, callback) {
|
|
189
|
-
if (params === null || params === undefined) {
|
|
190
|
-
throw new Error('Required parameter "params" missing.');
|
|
191
|
-
}
|
|
192
|
-
if (params["data"] === null || params["data"] === undefined) {
|
|
193
|
-
throw new Error("Required parameter \"params['data']\" missing.");
|
|
194
|
-
}
|
|
195
|
-
let data = {};
|
|
196
|
-
data["Data"] = serialize.object(params["data"]);
|
|
197
|
-
const headers = {};
|
|
198
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
199
|
-
headers["Accept"] = "application/json";
|
|
200
|
-
let operationVersion = version, operationPromise = operationVersion.create({
|
|
201
|
-
uri: instance._uri,
|
|
202
|
-
method: "post",
|
|
203
|
-
data,
|
|
204
|
-
headers,
|
|
205
|
-
});
|
|
206
|
-
operationPromise = operationPromise.then((payload) => new SyncListItemInstance(operationVersion, payload, instance._solution.serviceSid, instance._solution.listSid));
|
|
207
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
208
|
-
return operationPromise;
|
|
209
|
-
};
|
|
210
|
-
instance.page = function page(params, callback) {
|
|
211
|
-
if (params instanceof Function) {
|
|
212
|
-
callback = params;
|
|
213
|
-
params = {};
|
|
214
|
-
}
|
|
215
|
-
else {
|
|
216
|
-
params = params || {};
|
|
217
|
-
}
|
|
218
|
-
let data = {};
|
|
219
|
-
if (params["order"] !== undefined)
|
|
220
|
-
data["Order"] = params["order"];
|
|
221
|
-
if (params["from"] !== undefined)
|
|
222
|
-
data["From"] = params["from"];
|
|
223
|
-
if (params["bounds"] !== undefined)
|
|
224
|
-
data["Bounds"] = params["bounds"];
|
|
225
|
-
if (params["pageSize"] !== undefined)
|
|
226
|
-
data["PageSize"] = params["pageSize"];
|
|
227
|
-
if (params.pageNumber !== undefined)
|
|
228
|
-
data["Page"] = params.pageNumber;
|
|
229
|
-
if (params.pageToken !== undefined)
|
|
230
|
-
data["PageToken"] = params.pageToken;
|
|
231
|
-
const headers = {};
|
|
232
|
-
headers["Accept"] = "application/json";
|
|
233
|
-
let operationVersion = version, operationPromise = operationVersion.page({
|
|
234
|
-
uri: instance._uri,
|
|
235
|
-
method: "get",
|
|
236
|
-
params: data,
|
|
237
|
-
headers,
|
|
238
|
-
});
|
|
239
|
-
operationPromise = operationPromise.then((payload) => new SyncListItemPage(operationVersion, payload, instance._solution));
|
|
240
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
241
|
-
return operationPromise;
|
|
242
|
-
};
|
|
243
|
-
instance.each = instance._version.each;
|
|
244
|
-
instance.list = instance._version.list;
|
|
245
|
-
instance.getPage = function getPage(targetUrl, callback) {
|
|
246
|
-
const operationPromise = instance._version._domain.twilio.request({
|
|
247
|
-
method: "get",
|
|
248
|
-
uri: targetUrl,
|
|
249
|
-
});
|
|
250
|
-
let pagePromise = operationPromise.then((payload) => new SyncListItemPage(instance._version, payload, instance._solution));
|
|
251
|
-
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
252
|
-
return pagePromise;
|
|
253
|
-
};
|
|
254
|
-
instance.toJSON = function toJSON() {
|
|
255
|
-
return instance._solution;
|
|
256
|
-
};
|
|
257
|
-
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
258
|
-
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
259
|
-
};
|
|
260
|
-
return instance;
|
|
261
|
-
}
|
|
262
|
-
exports.SyncListItemListInstance = SyncListItemListInstance;
|
|
263
|
-
class SyncListItemPage extends Page_1.default {
|
|
264
|
-
/**
|
|
265
|
-
* Initialize the SyncListItemPage
|
|
266
|
-
*
|
|
267
|
-
* @param version - Version of the resource
|
|
268
|
-
* @param response - Response from the API
|
|
269
|
-
* @param solution - Path solution
|
|
270
|
-
*/
|
|
271
|
-
constructor(version, response, solution) {
|
|
272
|
-
super(version, response, solution);
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Build an instance of SyncListItemInstance
|
|
276
|
-
*
|
|
277
|
-
* @param payload - Payload response from the API
|
|
278
|
-
*/
|
|
279
|
-
getInstance(payload) {
|
|
280
|
-
return new SyncListItemInstance(this._version, payload, this._solution.serviceSid, this._solution.listSid);
|
|
281
|
-
}
|
|
282
|
-
[util_1.inspect.custom](depth, options) {
|
|
283
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
exports.SyncListItemPage = SyncListItemPage;
|