twilio 5.8.2 → 5.10.0
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/README.md +103 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +2 -0
- package/lib/rest/NumbersBase.d.ts +3 -0
- package/lib/rest/NumbersBase.js +5 -0
- package/lib/rest/OauthBase.d.ts +3 -0
- package/lib/rest/OauthBase.js +5 -0
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/local.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/machineToMachine.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/mobile.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/national.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/sharedCost.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/tollFree.d.ts +3 -3
- package/lib/rest/api/v2010/account/availablePhoneNumberCountry/voip.d.ts +3 -3
- package/lib/rest/api/v2010/account/recording.d.ts +1 -1
- package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/daily.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/today.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/record.d.ts +9 -10
- package/lib/rest/api/v2010/account/usage/trigger.d.ts +11 -12
- package/lib/rest/api/v2010/account/usage.d.ts +0 -4
- package/lib/rest/assistants/v1/assistant/feedback.d.ts +2 -2
- package/lib/rest/assistants/v1/assistant/message.d.ts +1 -1
- package/lib/rest/assistants/v1/assistant.d.ts +20 -20
- package/lib/rest/assistants/v1/knowledge.d.ts +6 -6
- package/lib/rest/assistants/v1/tool.d.ts +8 -8
- package/lib/rest/content/v1/content.d.ts +41 -25
- package/lib/rest/content/v1/content.js +7 -1
- package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +1 -1
- package/lib/rest/insights/v1/room/participant.d.ts +1 -1
- package/lib/rest/insights/v1/room.d.ts +1 -1
- package/lib/rest/intelligence/v2/service.d.ts +10 -0
- package/lib/rest/intelligence/v2/service.js +6 -0
- package/lib/rest/intelligence/v2/transcript/encryptedOperatorResults.d.ts +113 -0
- package/lib/rest/intelligence/v2/transcript/encryptedOperatorResults.js +120 -0
- package/lib/rest/intelligence/v2/transcript/encryptedSentences.d.ts +113 -0
- package/lib/rest/intelligence/v2/transcript/encryptedSentences.js +120 -0
- package/lib/rest/intelligence/v2/transcript.d.ts +22 -0
- package/lib/rest/intelligence/v2/transcript.js +28 -0
- package/lib/rest/lookups/v2/lookupOverride.d.ts +1 -1
- package/lib/rest/lookups/v2/query.d.ts +71 -71
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +2 -2
- package/lib/rest/marketplace/v1/referralConversion.d.ts +1 -1
- package/lib/rest/messaging/v2/channelsSender.d.ts +71 -71
- package/lib/rest/messaging/v2/channelsSender.js +6 -6
- package/lib/rest/numbers/V3.d.ts +15 -0
- package/lib/rest/numbers/V3.js +37 -0
- package/lib/rest/numbers/v1/portingPortIn.d.ts +3 -3
- package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +210 -0
- package/lib/rest/numbers/v3/hostedNumberOrder.js +154 -0
- package/lib/rest/oauth/V2.d.ts +15 -0
- package/lib/rest/oauth/V2.js +36 -0
- package/lib/rest/oauth/v2/token.d.ts +87 -0
- package/lib/rest/oauth/v2/token.js +99 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +1 -1
- package/lib/rest/pricing/v1/messaging/country.d.ts +6 -6
- package/lib/rest/pricing/v1/phoneNumber/country.d.ts +3 -3
- package/lib/rest/pricing/v1/voice/country.d.ts +6 -6
- package/lib/rest/pricing/v1/voice/number.d.ts +5 -5
- package/lib/rest/pricing/v2/country.d.ts +8 -8
- package/lib/rest/pricing/v2/number.d.ts +8 -8
- package/lib/rest/pricing/v2/voice/country.d.ts +8 -8
- package/lib/rest/pricing/v2/voice/number.d.ts +6 -6
- package/lib/rest/verify/V2.d.ts +5 -0
- package/lib/rest/verify/V2.js +6 -0
- package/lib/rest/verify/v2/newChallenge.d.ts +204 -0
- package/lib/rest/verify/v2/newChallenge.js +150 -0
- package/lib/rest/verify/v2/service/newFactor.d.ts +154 -0
- package/lib/rest/verify/v2/service/newFactor.js +118 -0
- package/lib/rest/verify/v2/service.d.ts +8 -0
- package/lib/rest/verify/v2/service.js +13 -0
- package/lib/twiml/VoiceResponse.d.ts +22 -0
- package/lib/twiml/VoiceResponse.js +19 -0
- package/lib-esm/index.js +49 -0
- package/lib-esm/package.json +3 -0
- package/package.json +15 -4
|
@@ -6,7 +6,7 @@ import { ApprovalCreateListInstance } from "./content/approvalCreate";
|
|
|
6
6
|
import { ApprovalFetchListInstance } from "./content/approvalFetch";
|
|
7
7
|
export declare class AuthenticationAction {
|
|
8
8
|
"type": AuthenticationActionType;
|
|
9
|
-
"
|
|
9
|
+
"copyCodeText": string;
|
|
10
10
|
}
|
|
11
11
|
export type AuthenticationActionType = "COPY_CODE";
|
|
12
12
|
export declare class CallToActionAction {
|
|
@@ -25,6 +25,7 @@ export declare class CardAction {
|
|
|
25
25
|
"phone"?: string;
|
|
26
26
|
"id"?: string;
|
|
27
27
|
"code"?: string;
|
|
28
|
+
"webviewSize"?: WebviewSizeType;
|
|
28
29
|
}
|
|
29
30
|
export type CardActionType = "URL" | "PHONE_NUMBER" | "QUICK_REPLY" | "COPY_CODE" | "VOICE_CALL";
|
|
30
31
|
export declare class CarouselAction {
|
|
@@ -43,9 +44,9 @@ export declare class CarouselCard {
|
|
|
43
44
|
}
|
|
44
45
|
export declare class CatalogItem {
|
|
45
46
|
"id"?: string;
|
|
46
|
-
"
|
|
47
|
+
"sectionTitle"?: string;
|
|
47
48
|
"name"?: string;
|
|
48
|
-
"
|
|
49
|
+
"mediaUrl"?: string;
|
|
49
50
|
"price"?: number;
|
|
50
51
|
"description"?: string;
|
|
51
52
|
}
|
|
@@ -56,7 +57,7 @@ export declare class ContentCreateRequest {
|
|
|
56
57
|
/**
|
|
57
58
|
* User defined name of the content
|
|
58
59
|
*/
|
|
59
|
-
"
|
|
60
|
+
"friendlyName"?: string;
|
|
60
61
|
/**
|
|
61
62
|
* Key value pairs of variable name to value
|
|
62
63
|
*/
|
|
@@ -71,7 +72,7 @@ export declare class ContentCreateRequest {
|
|
|
71
72
|
}
|
|
72
73
|
export declare class FlowsPage {
|
|
73
74
|
"id": string;
|
|
74
|
-
"
|
|
75
|
+
"nextPageId"?: string;
|
|
75
76
|
"title"?: string;
|
|
76
77
|
"subtitle"?: string;
|
|
77
78
|
"layout": Array<FlowsPageComponent>;
|
|
@@ -123,16 +124,16 @@ export declare class TwilioCatalog {
|
|
|
123
124
|
"subtitle"?: string;
|
|
124
125
|
"id"?: string;
|
|
125
126
|
"items"?: Array<CatalogItem>;
|
|
126
|
-
"
|
|
127
|
+
"dynamicItems"?: string;
|
|
127
128
|
}
|
|
128
129
|
/**
|
|
129
130
|
* twilio/flows templates allow you to send multiple messages in a set order with text or select options
|
|
130
131
|
*/
|
|
131
132
|
export declare class TwilioFlows {
|
|
132
133
|
"body": string;
|
|
133
|
-
"
|
|
134
|
+
"buttonText": string;
|
|
134
135
|
"subtitle": string;
|
|
135
|
-
"
|
|
136
|
+
"mediaUrl": string;
|
|
136
137
|
"pages": Array<FlowsPage>;
|
|
137
138
|
"type": string;
|
|
138
139
|
}
|
|
@@ -186,26 +187,28 @@ export declare class TwilioText {
|
|
|
186
187
|
* Content types
|
|
187
188
|
*/
|
|
188
189
|
export declare class Types {
|
|
189
|
-
"
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
|
|
190
|
+
"twilioText"?: TwilioText | null;
|
|
191
|
+
"twilioMedia"?: TwilioMedia | null;
|
|
192
|
+
"twilioLocation"?: TwilioLocation | null;
|
|
193
|
+
"twilioListPicker"?: TwilioListPicker | null;
|
|
194
|
+
"twilioCallToAction"?: TwilioCallToAction | null;
|
|
195
|
+
"twilioQuickReply"?: TwilioQuickReply | null;
|
|
196
|
+
"twilioCard"?: TwilioCard | null;
|
|
197
|
+
"twilioCatalog"?: TwilioCatalog | null;
|
|
198
|
+
"twilioCarousel"?: TwilioCarousel | null;
|
|
199
|
+
"twilioFlows"?: TwilioFlows | null;
|
|
200
|
+
"twilioSchedule"?: TwilioSchedule | null;
|
|
201
|
+
"whatsappCard"?: WhatsappCard | null;
|
|
202
|
+
"whatsappAuthentication"?: WhatsappAuthentication | null;
|
|
203
|
+
"whatsappFlows"?: WhatsappFlows | null;
|
|
204
|
+
}
|
|
205
|
+
export type WebviewSizeType = "TALL" | "FULL" | "HALF" | "NONE";
|
|
203
206
|
/**
|
|
204
207
|
* whatsApp/authentication templates let companies deliver WA approved one-time-password button.
|
|
205
208
|
*/
|
|
206
209
|
export declare class WhatsappAuthentication {
|
|
207
|
-
"
|
|
208
|
-
"
|
|
210
|
+
"addSecurityRecommendation"?: boolean;
|
|
211
|
+
"codeExpirationMinutes"?: number;
|
|
209
212
|
"actions": Array<AuthenticationAction>;
|
|
210
213
|
}
|
|
211
214
|
/**
|
|
@@ -215,9 +218,22 @@ export declare class WhatsappCard {
|
|
|
215
218
|
"body": string;
|
|
216
219
|
"footer"?: string;
|
|
217
220
|
"media"?: Array<string>;
|
|
218
|
-
"
|
|
221
|
+
"headerText"?: string;
|
|
219
222
|
"actions"?: Array<CardAction>;
|
|
220
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* whatsapp/flows templates allow you to send multiple messages in a set order with text or select options
|
|
226
|
+
*/
|
|
227
|
+
export declare class WhatsappFlows {
|
|
228
|
+
"body": string;
|
|
229
|
+
"buttonText": string;
|
|
230
|
+
"subtitle"?: string;
|
|
231
|
+
"mediaUrl"?: string;
|
|
232
|
+
"flowId": string;
|
|
233
|
+
"flowToken"?: string;
|
|
234
|
+
"flowFirstPageId"?: string;
|
|
235
|
+
"isFlowFirstPageEndpoint"?: boolean;
|
|
236
|
+
}
|
|
221
237
|
/**
|
|
222
238
|
* Options to pass to create a ContentInstance
|
|
223
239
|
*/
|
|
@@ -16,7 +16,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.ContentPage = exports.ContentInstance = exports.ContentContextImpl = exports.WhatsappCard = exports.WhatsappAuthentication = exports.Types = exports.TwilioText = exports.TwilioSchedule = exports.TwilioQuickReply = exports.TwilioMedia = exports.TwilioLocation = exports.TwilioListPicker = exports.TwilioFlows = exports.TwilioCatalog = exports.TwilioCarousel = exports.TwilioCard = exports.TwilioCallToAction = exports.QuickReplyAction = exports.ListItem = exports.FlowsPageComponent = exports.FlowsPage = exports.ContentCreateRequest = exports.CatalogItem = exports.CarouselCard = exports.CarouselAction = exports.CardAction = exports.CallToActionAction = exports.AuthenticationAction = void 0;
|
|
19
|
+
exports.ContentPage = exports.ContentInstance = exports.ContentContextImpl = exports.WhatsappFlows = exports.WhatsappCard = exports.WhatsappAuthentication = exports.Types = exports.TwilioText = exports.TwilioSchedule = exports.TwilioQuickReply = exports.TwilioMedia = exports.TwilioLocation = exports.TwilioListPicker = exports.TwilioFlows = exports.TwilioCatalog = exports.TwilioCarousel = exports.TwilioCard = exports.TwilioCallToAction = exports.QuickReplyAction = exports.ListItem = exports.FlowsPageComponent = exports.FlowsPage = exports.ContentCreateRequest = exports.CatalogItem = exports.CarouselCard = exports.CarouselAction = exports.CardAction = exports.CallToActionAction = exports.AuthenticationAction = void 0;
|
|
20
20
|
exports.ContentListInstance = ContentListInstance;
|
|
21
21
|
const util_1 = require("util");
|
|
22
22
|
const Page_1 = __importDefault(require("../../../base/Page"));
|
|
@@ -145,6 +145,12 @@ exports.WhatsappAuthentication = WhatsappAuthentication;
|
|
|
145
145
|
class WhatsappCard {
|
|
146
146
|
}
|
|
147
147
|
exports.WhatsappCard = WhatsappCard;
|
|
148
|
+
/**
|
|
149
|
+
* whatsapp/flows templates allow you to send multiple messages in a set order with text or select options
|
|
150
|
+
*/
|
|
151
|
+
class WhatsappFlows {
|
|
152
|
+
}
|
|
153
|
+
exports.WhatsappFlows = WhatsappFlows;
|
|
148
154
|
class ContentContextImpl {
|
|
149
155
|
constructor(_version, sid) {
|
|
150
156
|
this._version = _version;
|
|
@@ -8,7 +8,7 @@ import { InteractionTransferListInstance } from "./interactionChannel/interactio
|
|
|
8
8
|
/**
|
|
9
9
|
* The status of this channel.
|
|
10
10
|
*/
|
|
11
|
-
export type InteractionChannelChannelStatus = "setup" | "active" | "failed" | "closed" | "inactive";
|
|
11
|
+
export type InteractionChannelChannelStatus = "setup" | "active" | "failed" | "closed" | "inactive" | "pause";
|
|
12
12
|
/**
|
|
13
13
|
* The Interaction Channel\'s type. Can be: `sms`, `email`, `chat`, `whatsapp`, `web`, `messenger`, or `gbm`. **Note:** These can be different from the task channel type specified in the Routing attributes. Task channel type corresponds to channel capacity while this channel type is the actual media type
|
|
14
14
|
*/
|
|
@@ -5,7 +5,7 @@ import V1 from "../../V1";
|
|
|
5
5
|
export type ParticipantCodec = "VP8" | "H264" | "VP9" | "opus";
|
|
6
6
|
export type ParticipantEdgeLocation = "ashburn" | "dublin" | "frankfurt" | "singapore" | "sydney" | "sao_paulo" | "roaming" | "umatilla" | "tokyo";
|
|
7
7
|
export type ParticipantRoomStatus = "in_progress" | "connected" | "completed" | "disconnected";
|
|
8
|
-
export type ParticipantTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll"
|
|
8
|
+
export type ParticipantTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll";
|
|
9
9
|
/**
|
|
10
10
|
* Options to pass to each
|
|
11
11
|
*/
|
|
@@ -10,7 +10,7 @@ export type RoomEndReason = "room_ended_via_api" | "timeout";
|
|
|
10
10
|
export type RoomProcessingState = "complete" | "in_progress" | "timeout" | "not_started";
|
|
11
11
|
export type RoomRoomStatus = "in_progress" | "completed";
|
|
12
12
|
export type RoomRoomType = "go" | "peer_to_peer" | "group" | "group_small";
|
|
13
|
-
export type RoomTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll"
|
|
13
|
+
export type RoomTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll";
|
|
14
14
|
/**
|
|
15
15
|
* Options to pass to each
|
|
16
16
|
*/
|
|
@@ -28,6 +28,8 @@ export interface ServiceContextUpdateOptions {
|
|
|
28
28
|
webhookUrl?: string;
|
|
29
29
|
/** */
|
|
30
30
|
webhookHttpMethod?: ServiceHttpMethod;
|
|
31
|
+
/** The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results. */
|
|
32
|
+
encryptionCredentialSid?: string;
|
|
31
33
|
}
|
|
32
34
|
/**
|
|
33
35
|
* Options to pass to create a ServiceInstance
|
|
@@ -51,6 +53,8 @@ export interface ServiceListInstanceCreateOptions {
|
|
|
51
53
|
webhookUrl?: string;
|
|
52
54
|
/** */
|
|
53
55
|
webhookHttpMethod?: ServiceHttpMethod;
|
|
56
|
+
/** The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results. */
|
|
57
|
+
encryptionCredentialSid?: string;
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* Options to pass to each
|
|
@@ -164,6 +168,7 @@ interface ServiceResource {
|
|
|
164
168
|
webhook_http_method: ServiceHttpMethod;
|
|
165
169
|
read_only_attached_operator_sids: Array<string>;
|
|
166
170
|
version: number;
|
|
171
|
+
encryption_credential_sid: string;
|
|
167
172
|
}
|
|
168
173
|
export declare class ServiceInstance {
|
|
169
174
|
protected _version: V2;
|
|
@@ -231,6 +236,10 @@ export declare class ServiceInstance {
|
|
|
231
236
|
* The version number of this Service.
|
|
232
237
|
*/
|
|
233
238
|
version: number;
|
|
239
|
+
/**
|
|
240
|
+
* The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
|
|
241
|
+
*/
|
|
242
|
+
encryptionCredentialSid: string;
|
|
234
243
|
private get _proxy();
|
|
235
244
|
/**
|
|
236
245
|
* Remove a ServiceInstance
|
|
@@ -287,6 +296,7 @@ export declare class ServiceInstance {
|
|
|
287
296
|
webhookHttpMethod: ServiceHttpMethod;
|
|
288
297
|
readOnlyAttachedOperatorSids: string[];
|
|
289
298
|
version: number;
|
|
299
|
+
encryptionCredentialSid: string;
|
|
290
300
|
};
|
|
291
301
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
292
302
|
}
|
|
@@ -81,6 +81,8 @@ class ServiceContextImpl {
|
|
|
81
81
|
data["WebhookUrl"] = params["webhookUrl"];
|
|
82
82
|
if (params["webhookHttpMethod"] !== undefined)
|
|
83
83
|
data["WebhookHttpMethod"] = params["webhookHttpMethod"];
|
|
84
|
+
if (params["encryptionCredentialSid"] !== undefined)
|
|
85
|
+
data["EncryptionCredentialSid"] = params["encryptionCredentialSid"];
|
|
84
86
|
const headers = {};
|
|
85
87
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
86
88
|
headers["Accept"] = "application/json";
|
|
@@ -130,6 +132,7 @@ class ServiceInstance {
|
|
|
130
132
|
this.readOnlyAttachedOperatorSids =
|
|
131
133
|
payload.read_only_attached_operator_sids;
|
|
132
134
|
this.version = deserialize.integer(payload.version);
|
|
135
|
+
this.encryptionCredentialSid = payload.encryption_credential_sid;
|
|
133
136
|
this._solution = { sid: sid || this.sid };
|
|
134
137
|
}
|
|
135
138
|
get _proxy() {
|
|
@@ -184,6 +187,7 @@ class ServiceInstance {
|
|
|
184
187
|
webhookHttpMethod: this.webhookHttpMethod,
|
|
185
188
|
readOnlyAttachedOperatorSids: this.readOnlyAttachedOperatorSids,
|
|
186
189
|
version: this.version,
|
|
190
|
+
encryptionCredentialSid: this.encryptionCredentialSid,
|
|
187
191
|
};
|
|
188
192
|
}
|
|
189
193
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -224,6 +228,8 @@ function ServiceListInstance(version) {
|
|
|
224
228
|
data["WebhookUrl"] = params["webhookUrl"];
|
|
225
229
|
if (params["webhookHttpMethod"] !== undefined)
|
|
226
230
|
data["WebhookHttpMethod"] = params["webhookHttpMethod"];
|
|
231
|
+
if (params["encryptionCredentialSid"] !== undefined)
|
|
232
|
+
data["EncryptionCredentialSid"] = params["encryptionCredentialSid"];
|
|
227
233
|
const headers = {};
|
|
228
234
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
229
235
|
headers["Accept"] = "application/json";
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { inspect, InspectOptions } from "util";
|
|
2
|
+
import V2 from "../../V2";
|
|
3
|
+
/**
|
|
4
|
+
* Options to pass to fetch a EncryptedOperatorResultsInstance
|
|
5
|
+
*/
|
|
6
|
+
export interface EncryptedOperatorResultsContextFetchOptions {
|
|
7
|
+
/** Grant access to PII Redacted/Unredacted Operator Results. If redaction is enabled, the default is `true` to access redacted operator results. */
|
|
8
|
+
redacted?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface EncryptedOperatorResultsContext {
|
|
11
|
+
/**
|
|
12
|
+
* Fetch a EncryptedOperatorResultsInstance
|
|
13
|
+
*
|
|
14
|
+
* @param callback - Callback to handle processed record
|
|
15
|
+
*
|
|
16
|
+
* @returns Resolves to processed EncryptedOperatorResultsInstance
|
|
17
|
+
*/
|
|
18
|
+
fetch(callback?: (error: Error | null, item?: EncryptedOperatorResultsInstance) => any): Promise<EncryptedOperatorResultsInstance>;
|
|
19
|
+
/**
|
|
20
|
+
* Fetch a EncryptedOperatorResultsInstance
|
|
21
|
+
*
|
|
22
|
+
* @param params - Parameter for request
|
|
23
|
+
* @param callback - Callback to handle processed record
|
|
24
|
+
*
|
|
25
|
+
* @returns Resolves to processed EncryptedOperatorResultsInstance
|
|
26
|
+
*/
|
|
27
|
+
fetch(params: EncryptedOperatorResultsContextFetchOptions, callback?: (error: Error | null, item?: EncryptedOperatorResultsInstance) => any): Promise<EncryptedOperatorResultsInstance>;
|
|
28
|
+
/**
|
|
29
|
+
* Provide a user-friendly representation
|
|
30
|
+
*/
|
|
31
|
+
toJSON(): any;
|
|
32
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
33
|
+
}
|
|
34
|
+
export interface EncryptedOperatorResultsContextSolution {
|
|
35
|
+
transcriptSid: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class EncryptedOperatorResultsContextImpl implements EncryptedOperatorResultsContext {
|
|
38
|
+
protected _version: V2;
|
|
39
|
+
protected _solution: EncryptedOperatorResultsContextSolution;
|
|
40
|
+
protected _uri: string;
|
|
41
|
+
constructor(_version: V2, transcriptSid: string);
|
|
42
|
+
fetch(params?: EncryptedOperatorResultsContextFetchOptions | ((error: Error | null, item?: EncryptedOperatorResultsInstance) => any), callback?: (error: Error | null, item?: EncryptedOperatorResultsInstance) => any): Promise<EncryptedOperatorResultsInstance>;
|
|
43
|
+
/**
|
|
44
|
+
* Provide a user-friendly representation
|
|
45
|
+
*
|
|
46
|
+
* @returns Object
|
|
47
|
+
*/
|
|
48
|
+
toJSON(): EncryptedOperatorResultsContextSolution;
|
|
49
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
50
|
+
}
|
|
51
|
+
interface EncryptedOperatorResultsResource {
|
|
52
|
+
locations: Array<string>;
|
|
53
|
+
transcript_sid: string;
|
|
54
|
+
url: string;
|
|
55
|
+
}
|
|
56
|
+
export declare class EncryptedOperatorResultsInstance {
|
|
57
|
+
protected _version: V2;
|
|
58
|
+
protected _solution: EncryptedOperatorResultsContextSolution;
|
|
59
|
+
protected _context?: EncryptedOperatorResultsContext;
|
|
60
|
+
constructor(_version: V2, payload: EncryptedOperatorResultsResource, transcriptSid: string);
|
|
61
|
+
/**
|
|
62
|
+
* The locations of the encrypted operator results.
|
|
63
|
+
*/
|
|
64
|
+
locations: Array<string>;
|
|
65
|
+
transcriptSid: string;
|
|
66
|
+
url: string;
|
|
67
|
+
private get _proxy();
|
|
68
|
+
/**
|
|
69
|
+
* Fetch a EncryptedOperatorResultsInstance
|
|
70
|
+
*
|
|
71
|
+
* @param callback - Callback to handle processed record
|
|
72
|
+
*
|
|
73
|
+
* @returns Resolves to processed EncryptedOperatorResultsInstance
|
|
74
|
+
*/
|
|
75
|
+
fetch(callback?: (error: Error | null, item?: EncryptedOperatorResultsInstance) => any): Promise<EncryptedOperatorResultsInstance>;
|
|
76
|
+
/**
|
|
77
|
+
* Fetch a EncryptedOperatorResultsInstance
|
|
78
|
+
*
|
|
79
|
+
* @param params - Parameter for request
|
|
80
|
+
* @param callback - Callback to handle processed record
|
|
81
|
+
*
|
|
82
|
+
* @returns Resolves to processed EncryptedOperatorResultsInstance
|
|
83
|
+
*/
|
|
84
|
+
fetch(params: EncryptedOperatorResultsContextFetchOptions, callback?: (error: Error | null, item?: EncryptedOperatorResultsInstance) => any): Promise<EncryptedOperatorResultsInstance>;
|
|
85
|
+
/**
|
|
86
|
+
* Provide a user-friendly representation
|
|
87
|
+
*
|
|
88
|
+
* @returns Object
|
|
89
|
+
*/
|
|
90
|
+
toJSON(): {
|
|
91
|
+
locations: string[];
|
|
92
|
+
transcriptSid: string;
|
|
93
|
+
url: string;
|
|
94
|
+
};
|
|
95
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
96
|
+
}
|
|
97
|
+
export interface EncryptedOperatorResultsSolution {
|
|
98
|
+
transcriptSid: string;
|
|
99
|
+
}
|
|
100
|
+
export interface EncryptedOperatorResultsListInstance {
|
|
101
|
+
_version: V2;
|
|
102
|
+
_solution: EncryptedOperatorResultsSolution;
|
|
103
|
+
_uri: string;
|
|
104
|
+
(): EncryptedOperatorResultsContext;
|
|
105
|
+
get(): EncryptedOperatorResultsContext;
|
|
106
|
+
/**
|
|
107
|
+
* Provide a user-friendly representation
|
|
108
|
+
*/
|
|
109
|
+
toJSON(): any;
|
|
110
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
111
|
+
}
|
|
112
|
+
export declare function EncryptedOperatorResultsListInstance(version: V2, transcriptSid: string): EncryptedOperatorResultsListInstance;
|
|
113
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Intelligence
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.EncryptedOperatorResultsInstance = exports.EncryptedOperatorResultsContextImpl = void 0;
|
|
17
|
+
exports.EncryptedOperatorResultsListInstance = EncryptedOperatorResultsListInstance;
|
|
18
|
+
const util_1 = require("util");
|
|
19
|
+
const deserialize = require("../../../../base/deserialize");
|
|
20
|
+
const serialize = require("../../../../base/serialize");
|
|
21
|
+
const utility_1 = require("../../../../base/utility");
|
|
22
|
+
class EncryptedOperatorResultsContextImpl {
|
|
23
|
+
constructor(_version, transcriptSid) {
|
|
24
|
+
this._version = _version;
|
|
25
|
+
if (!(0, utility_1.isValidPathParam)(transcriptSid)) {
|
|
26
|
+
throw new Error("Parameter 'transcriptSid' is not valid.");
|
|
27
|
+
}
|
|
28
|
+
this._solution = { transcriptSid };
|
|
29
|
+
this._uri = `/Transcripts/${transcriptSid}/OperatorResults/Encrypted`;
|
|
30
|
+
}
|
|
31
|
+
fetch(params, callback) {
|
|
32
|
+
if (params instanceof Function) {
|
|
33
|
+
callback = params;
|
|
34
|
+
params = {};
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
params = params || {};
|
|
38
|
+
}
|
|
39
|
+
let data = {};
|
|
40
|
+
if (params["redacted"] !== undefined)
|
|
41
|
+
data["Redacted"] = serialize.bool(params["redacted"]);
|
|
42
|
+
const headers = {};
|
|
43
|
+
headers["Accept"] = "application/json";
|
|
44
|
+
const instance = this;
|
|
45
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
46
|
+
uri: instance._uri,
|
|
47
|
+
method: "get",
|
|
48
|
+
params: data,
|
|
49
|
+
headers,
|
|
50
|
+
});
|
|
51
|
+
operationPromise = operationPromise.then((payload) => new EncryptedOperatorResultsInstance(operationVersion, payload, instance._solution.transcriptSid));
|
|
52
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
53
|
+
return operationPromise;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Provide a user-friendly representation
|
|
57
|
+
*
|
|
58
|
+
* @returns Object
|
|
59
|
+
*/
|
|
60
|
+
toJSON() {
|
|
61
|
+
return this._solution;
|
|
62
|
+
}
|
|
63
|
+
[util_1.inspect.custom](_depth, options) {
|
|
64
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.EncryptedOperatorResultsContextImpl = EncryptedOperatorResultsContextImpl;
|
|
68
|
+
class EncryptedOperatorResultsInstance {
|
|
69
|
+
constructor(_version, payload, transcriptSid) {
|
|
70
|
+
this._version = _version;
|
|
71
|
+
this.locations = payload.locations;
|
|
72
|
+
this.transcriptSid = payload.transcript_sid;
|
|
73
|
+
this.url = payload.url;
|
|
74
|
+
this._solution = { transcriptSid };
|
|
75
|
+
}
|
|
76
|
+
get _proxy() {
|
|
77
|
+
this._context =
|
|
78
|
+
this._context ||
|
|
79
|
+
new EncryptedOperatorResultsContextImpl(this._version, this._solution.transcriptSid);
|
|
80
|
+
return this._context;
|
|
81
|
+
}
|
|
82
|
+
fetch(params, callback) {
|
|
83
|
+
return this._proxy.fetch(params, callback);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Provide a user-friendly representation
|
|
87
|
+
*
|
|
88
|
+
* @returns Object
|
|
89
|
+
*/
|
|
90
|
+
toJSON() {
|
|
91
|
+
return {
|
|
92
|
+
locations: this.locations,
|
|
93
|
+
transcriptSid: this.transcriptSid,
|
|
94
|
+
url: this.url,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
[util_1.inspect.custom](_depth, options) {
|
|
98
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.EncryptedOperatorResultsInstance = EncryptedOperatorResultsInstance;
|
|
102
|
+
function EncryptedOperatorResultsListInstance(version, transcriptSid) {
|
|
103
|
+
if (!(0, utility_1.isValidPathParam)(transcriptSid)) {
|
|
104
|
+
throw new Error("Parameter 'transcriptSid' is not valid.");
|
|
105
|
+
}
|
|
106
|
+
const instance = (() => instance.get());
|
|
107
|
+
instance.get = function get() {
|
|
108
|
+
return new EncryptedOperatorResultsContextImpl(version, transcriptSid);
|
|
109
|
+
};
|
|
110
|
+
instance._version = version;
|
|
111
|
+
instance._solution = { transcriptSid };
|
|
112
|
+
instance._uri = ``;
|
|
113
|
+
instance.toJSON = function toJSON() {
|
|
114
|
+
return instance._solution;
|
|
115
|
+
};
|
|
116
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
117
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
118
|
+
};
|
|
119
|
+
return instance;
|
|
120
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { inspect, InspectOptions } from "util";
|
|
2
|
+
import V2 from "../../V2";
|
|
3
|
+
/**
|
|
4
|
+
* Options to pass to fetch a EncryptedSentencesInstance
|
|
5
|
+
*/
|
|
6
|
+
export interface EncryptedSentencesContextFetchOptions {
|
|
7
|
+
/** Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences. */
|
|
8
|
+
redacted?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface EncryptedSentencesContext {
|
|
11
|
+
/**
|
|
12
|
+
* Fetch a EncryptedSentencesInstance
|
|
13
|
+
*
|
|
14
|
+
* @param callback - Callback to handle processed record
|
|
15
|
+
*
|
|
16
|
+
* @returns Resolves to processed EncryptedSentencesInstance
|
|
17
|
+
*/
|
|
18
|
+
fetch(callback?: (error: Error | null, item?: EncryptedSentencesInstance) => any): Promise<EncryptedSentencesInstance>;
|
|
19
|
+
/**
|
|
20
|
+
* Fetch a EncryptedSentencesInstance
|
|
21
|
+
*
|
|
22
|
+
* @param params - Parameter for request
|
|
23
|
+
* @param callback - Callback to handle processed record
|
|
24
|
+
*
|
|
25
|
+
* @returns Resolves to processed EncryptedSentencesInstance
|
|
26
|
+
*/
|
|
27
|
+
fetch(params: EncryptedSentencesContextFetchOptions, callback?: (error: Error | null, item?: EncryptedSentencesInstance) => any): Promise<EncryptedSentencesInstance>;
|
|
28
|
+
/**
|
|
29
|
+
* Provide a user-friendly representation
|
|
30
|
+
*/
|
|
31
|
+
toJSON(): any;
|
|
32
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
33
|
+
}
|
|
34
|
+
export interface EncryptedSentencesContextSolution {
|
|
35
|
+
transcriptSid: string;
|
|
36
|
+
}
|
|
37
|
+
export declare class EncryptedSentencesContextImpl implements EncryptedSentencesContext {
|
|
38
|
+
protected _version: V2;
|
|
39
|
+
protected _solution: EncryptedSentencesContextSolution;
|
|
40
|
+
protected _uri: string;
|
|
41
|
+
constructor(_version: V2, transcriptSid: string);
|
|
42
|
+
fetch(params?: EncryptedSentencesContextFetchOptions | ((error: Error | null, item?: EncryptedSentencesInstance) => any), callback?: (error: Error | null, item?: EncryptedSentencesInstance) => any): Promise<EncryptedSentencesInstance>;
|
|
43
|
+
/**
|
|
44
|
+
* Provide a user-friendly representation
|
|
45
|
+
*
|
|
46
|
+
* @returns Object
|
|
47
|
+
*/
|
|
48
|
+
toJSON(): EncryptedSentencesContextSolution;
|
|
49
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
50
|
+
}
|
|
51
|
+
interface EncryptedSentencesResource {
|
|
52
|
+
location: string;
|
|
53
|
+
transcript_sid: string;
|
|
54
|
+
url: string;
|
|
55
|
+
}
|
|
56
|
+
export declare class EncryptedSentencesInstance {
|
|
57
|
+
protected _version: V2;
|
|
58
|
+
protected _solution: EncryptedSentencesContextSolution;
|
|
59
|
+
protected _context?: EncryptedSentencesContext;
|
|
60
|
+
constructor(_version: V2, payload: EncryptedSentencesResource, transcriptSid: string);
|
|
61
|
+
/**
|
|
62
|
+
* The location of the encrypted sentences.
|
|
63
|
+
*/
|
|
64
|
+
location: string;
|
|
65
|
+
transcriptSid: string;
|
|
66
|
+
url: string;
|
|
67
|
+
private get _proxy();
|
|
68
|
+
/**
|
|
69
|
+
* Fetch a EncryptedSentencesInstance
|
|
70
|
+
*
|
|
71
|
+
* @param callback - Callback to handle processed record
|
|
72
|
+
*
|
|
73
|
+
* @returns Resolves to processed EncryptedSentencesInstance
|
|
74
|
+
*/
|
|
75
|
+
fetch(callback?: (error: Error | null, item?: EncryptedSentencesInstance) => any): Promise<EncryptedSentencesInstance>;
|
|
76
|
+
/**
|
|
77
|
+
* Fetch a EncryptedSentencesInstance
|
|
78
|
+
*
|
|
79
|
+
* @param params - Parameter for request
|
|
80
|
+
* @param callback - Callback to handle processed record
|
|
81
|
+
*
|
|
82
|
+
* @returns Resolves to processed EncryptedSentencesInstance
|
|
83
|
+
*/
|
|
84
|
+
fetch(params: EncryptedSentencesContextFetchOptions, callback?: (error: Error | null, item?: EncryptedSentencesInstance) => any): Promise<EncryptedSentencesInstance>;
|
|
85
|
+
/**
|
|
86
|
+
* Provide a user-friendly representation
|
|
87
|
+
*
|
|
88
|
+
* @returns Object
|
|
89
|
+
*/
|
|
90
|
+
toJSON(): {
|
|
91
|
+
location: string;
|
|
92
|
+
transcriptSid: string;
|
|
93
|
+
url: string;
|
|
94
|
+
};
|
|
95
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
96
|
+
}
|
|
97
|
+
export interface EncryptedSentencesSolution {
|
|
98
|
+
transcriptSid: string;
|
|
99
|
+
}
|
|
100
|
+
export interface EncryptedSentencesListInstance {
|
|
101
|
+
_version: V2;
|
|
102
|
+
_solution: EncryptedSentencesSolution;
|
|
103
|
+
_uri: string;
|
|
104
|
+
(): EncryptedSentencesContext;
|
|
105
|
+
get(): EncryptedSentencesContext;
|
|
106
|
+
/**
|
|
107
|
+
* Provide a user-friendly representation
|
|
108
|
+
*/
|
|
109
|
+
toJSON(): any;
|
|
110
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
111
|
+
}
|
|
112
|
+
export declare function EncryptedSentencesListInstance(version: V2, transcriptSid: string): EncryptedSentencesListInstance;
|
|
113
|
+
export {};
|