twilio 5.1.1 → 5.2.1
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/base/BaseTwilio.js +2 -1
- package/lib/rest/PreviewIam.d.ts +4 -0
- package/lib/rest/PreviewIam.js +8 -0
- package/lib/rest/PreviewIamBase.d.ts +10 -0
- package/lib/rest/PreviewIamBase.js +26 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +6 -0
- package/lib/rest/api/v2010/account/call/transcription.d.ts +572 -0
- package/lib/rest/api/v2010/account/call/transcription.js +578 -0
- package/lib/rest/api/v2010/account/call.d.ts +9 -1
- package/lib/rest/api/v2010/account/call.js +13 -0
- package/lib/rest/api/v2010/account/recording.d.ts +1 -1
- package/lib/rest/content/v1/content/approvalCreate.d.ts +18 -13
- package/lib/rest/content/v1/content/approvalCreate.js +16 -14
- package/lib/rest/content/v1/content/approvalFetch.d.ts +5 -5
- package/lib/rest/content/v1/content/approvalFetch.js +14 -14
- package/lib/rest/content/v1/content.d.ts +159 -11
- package/lib/rest/content/v1/content.js +93 -7
- package/lib/rest/content/v1/contentAndApprovals.d.ts +1 -1
- package/lib/rest/content/v1/legacyContent.d.ts +1 -1
- package/lib/rest/events/v1/eventType.d.ts +12 -0
- package/lib/rest/events/v1/eventType.js +4 -0
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +9 -9
- package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +7 -7
- package/lib/rest/numbers/v1/portingPortIn.d.ts +3 -0
- package/lib/rest/numbers/v1/portingPortIn.js +2 -0
- package/lib/rest/numbers/v1/portingPortInPhoneNumber.d.ts +24 -6
- package/lib/rest/numbers/v1/portingPortInPhoneNumber.js +9 -3
- package/lib/rest/numbers/v1/portingPortability.d.ts +0 -12
- package/lib/rest/numbers/v1/portingPortability.js +0 -4
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +32 -1
- package/lib/rest/numbers/v2/regulatoryCompliance/regulation.js +18 -10
- package/lib/rest/trusthub/v1/complianceTollfreeInquiries.d.ts +2 -0
- package/lib/rest/trusthub/v1/complianceTollfreeInquiries.js +2 -0
- package/lib/twiml/VoiceResponse.d.ts +113 -0
- package/lib/twiml/VoiceResponse.js +43 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../../V1";
|
|
4
|
-
export declare class
|
|
5
|
-
"billableItems"?: Array<
|
|
4
|
+
export declare class CreateBillingUsageRequest {
|
|
5
|
+
"billableItems"?: Array<CreateBillingUsageRequestBillableItems>;
|
|
6
6
|
}
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class CreateBillingUsageRequestBillableItems {
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
@@ -14,7 +14,7 @@ export declare class CreateMarketplaceBillingUsageRequestBillableItems {
|
|
|
14
14
|
*/
|
|
15
15
|
"sid": string;
|
|
16
16
|
}
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems {
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
@@ -33,7 +33,7 @@ export declare class MarketplaceInstalledAddOnBillingUsageResponseBillableItems
|
|
|
33
33
|
*/
|
|
34
34
|
export interface InstalledAddOnUsageListInstanceCreateOptions {
|
|
35
35
|
/** */
|
|
36
|
-
|
|
36
|
+
createBillingUsageRequest: CreateBillingUsageRequest;
|
|
37
37
|
}
|
|
38
38
|
export interface InstalledAddOnUsageSolution {
|
|
39
39
|
installedAddOnSid: string;
|
|
@@ -50,7 +50,7 @@ export interface InstalledAddOnUsageListInstance {
|
|
|
50
50
|
*
|
|
51
51
|
* @returns Resolves to processed InstalledAddOnUsageInstance
|
|
52
52
|
*/
|
|
53
|
-
create(params:
|
|
53
|
+
create(params: CreateBillingUsageRequest, callback?: (error: Error | null, item?: InstalledAddOnUsageInstance) => any): Promise<InstalledAddOnUsageInstance>;
|
|
54
54
|
/**
|
|
55
55
|
* Provide a user-friendly representation
|
|
56
56
|
*/
|
|
@@ -59,13 +59,13 @@ export interface InstalledAddOnUsageListInstance {
|
|
|
59
59
|
}
|
|
60
60
|
export declare function InstalledAddOnUsageListInstance(version: V1, installedAddOnSid: string): InstalledAddOnUsageListInstance;
|
|
61
61
|
interface InstalledAddOnUsageResource {
|
|
62
|
-
billable_items: Array<
|
|
62
|
+
billable_items: Array<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>;
|
|
63
63
|
total_submitted: number;
|
|
64
64
|
}
|
|
65
65
|
export declare class InstalledAddOnUsageInstance {
|
|
66
66
|
protected _version: V1;
|
|
67
67
|
constructor(_version: V1, payload: InstalledAddOnUsageResource, installedAddOnSid: string);
|
|
68
|
-
billableItems: Array<
|
|
68
|
+
billableItems: Array<MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems>;
|
|
69
69
|
/**
|
|
70
70
|
* Represents the total quantity submitted.
|
|
71
71
|
*/
|
|
@@ -76,7 +76,7 @@ export declare class InstalledAddOnUsageInstance {
|
|
|
76
76
|
* @returns Object
|
|
77
77
|
*/
|
|
78
78
|
toJSON(): {
|
|
79
|
-
billableItems:
|
|
79
|
+
billableItems: MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems[];
|
|
80
80
|
totalSubmitted: number;
|
|
81
81
|
};
|
|
82
82
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.InstalledAddOnUsageInstance = exports.InstalledAddOnUsageListInstance = exports.
|
|
16
|
+
exports.InstalledAddOnUsageInstance = exports.InstalledAddOnUsageListInstance = exports.MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems = exports.CreateBillingUsageRequestBillableItems = exports.CreateBillingUsageRequest = void 0;
|
|
17
17
|
const util_1 = require("util");
|
|
18
18
|
const deserialize = require("../../../../base/deserialize");
|
|
19
19
|
const serialize = require("../../../../base/serialize");
|
|
20
20
|
const utility_1 = require("../../../../base/utility");
|
|
21
|
-
class
|
|
21
|
+
class CreateBillingUsageRequest {
|
|
22
22
|
}
|
|
23
|
-
exports.
|
|
24
|
-
class
|
|
23
|
+
exports.CreateBillingUsageRequest = CreateBillingUsageRequest;
|
|
24
|
+
class CreateBillingUsageRequestBillableItems {
|
|
25
25
|
}
|
|
26
|
-
exports.
|
|
27
|
-
class
|
|
26
|
+
exports.CreateBillingUsageRequestBillableItems = CreateBillingUsageRequestBillableItems;
|
|
27
|
+
class MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems {
|
|
28
28
|
}
|
|
29
|
-
exports.
|
|
29
|
+
exports.MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems = MarketplaceV1InstalledAddOnBillingUsageResponseBillableItems;
|
|
30
30
|
function InstalledAddOnUsageListInstance(version, installedAddOnSid) {
|
|
31
31
|
if (!(0, utility_1.isValidPathParam)(installedAddOnSid)) {
|
|
32
32
|
throw new Error("Parameter 'installedAddOnSid' is not valid.");
|
|
@@ -61,6 +61,7 @@ interface PortingPortInResource {
|
|
|
61
61
|
losing_carrier_information: any;
|
|
62
62
|
phone_numbers: Array<any>;
|
|
63
63
|
documents: Array<string>;
|
|
64
|
+
date_created: Date;
|
|
64
65
|
}
|
|
65
66
|
export declare class PortingPortInInstance {
|
|
66
67
|
protected _version: V1;
|
|
@@ -111,6 +112,7 @@ export declare class PortingPortInInstance {
|
|
|
111
112
|
* The list of documents SID referencing a utility bills
|
|
112
113
|
*/
|
|
113
114
|
documents: Array<string>;
|
|
115
|
+
dateCreated: Date;
|
|
114
116
|
private get _proxy();
|
|
115
117
|
/**
|
|
116
118
|
* Remove a PortingPortInInstance
|
|
@@ -145,6 +147,7 @@ export declare class PortingPortInInstance {
|
|
|
145
147
|
losingCarrierInformation: any;
|
|
146
148
|
phoneNumbers: any[];
|
|
147
149
|
documents: string[];
|
|
150
|
+
dateCreated: Date;
|
|
148
151
|
};
|
|
149
152
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
150
153
|
}
|
|
@@ -73,6 +73,7 @@ class PortingPortInInstance {
|
|
|
73
73
|
this.losingCarrierInformation = payload.losing_carrier_information;
|
|
74
74
|
this.phoneNumbers = payload.phone_numbers;
|
|
75
75
|
this.documents = payload.documents;
|
|
76
|
+
this.dateCreated = deserialize.iso8601Date(payload.date_created);
|
|
76
77
|
this._solution = {
|
|
77
78
|
portInRequestSid: portInRequestSid || this.portInRequestSid,
|
|
78
79
|
};
|
|
@@ -121,6 +122,7 @@ class PortingPortInInstance {
|
|
|
121
122
|
losingCarrierInformation: this.losingCarrierInformation,
|
|
122
123
|
phoneNumbers: this.phoneNumbers,
|
|
123
124
|
documents: this.documents,
|
|
125
|
+
dateCreated: this.dateCreated,
|
|
124
126
|
};
|
|
125
127
|
}
|
|
126
128
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -52,12 +52,15 @@ interface PortingPortInPhoneNumberResource {
|
|
|
52
52
|
date_created: Date;
|
|
53
53
|
country: string;
|
|
54
54
|
missing_required_fields: boolean;
|
|
55
|
-
|
|
55
|
+
last_updated: Date;
|
|
56
56
|
phone_number: string;
|
|
57
57
|
portable: boolean;
|
|
58
58
|
not_portability_reason: string;
|
|
59
|
-
not_portability_reason_code:
|
|
59
|
+
not_portability_reason_code: number;
|
|
60
60
|
port_in_phone_number_status: string;
|
|
61
|
+
port_out_pin: number;
|
|
62
|
+
rejection_reason: string;
|
|
63
|
+
rejection_reason_code: number;
|
|
61
64
|
}
|
|
62
65
|
export declare class PortingPortInPhoneNumberInstance {
|
|
63
66
|
protected _version: V1;
|
|
@@ -96,7 +99,7 @@ export declare class PortingPortInPhoneNumberInstance {
|
|
|
96
99
|
/**
|
|
97
100
|
* The timestamp when the status was last updated.
|
|
98
101
|
*/
|
|
99
|
-
|
|
102
|
+
lastUpdated: Date;
|
|
100
103
|
/**
|
|
101
104
|
* The phone number.
|
|
102
105
|
*/
|
|
@@ -112,11 +115,23 @@ export declare class PortingPortInPhoneNumberInstance {
|
|
|
112
115
|
/**
|
|
113
116
|
* The code of the reason why the phone number is not portable.
|
|
114
117
|
*/
|
|
115
|
-
notPortabilityReasonCode:
|
|
118
|
+
notPortabilityReasonCode: number;
|
|
116
119
|
/**
|
|
117
120
|
* The status of the phone number in the port in request.
|
|
118
121
|
*/
|
|
119
122
|
portInPhoneNumberStatus: string;
|
|
123
|
+
/**
|
|
124
|
+
* The pin required for the losing carrier to port out the phone number.
|
|
125
|
+
*/
|
|
126
|
+
portOutPin: number;
|
|
127
|
+
/**
|
|
128
|
+
* The rejection reason returned by the vendor.
|
|
129
|
+
*/
|
|
130
|
+
rejectionReason: string;
|
|
131
|
+
/**
|
|
132
|
+
* The rejection reason code returned by the vendor.
|
|
133
|
+
*/
|
|
134
|
+
rejectionReasonCode: number;
|
|
120
135
|
private get _proxy();
|
|
121
136
|
/**
|
|
122
137
|
* Remove a PortingPortInPhoneNumberInstance
|
|
@@ -148,12 +163,15 @@ export declare class PortingPortInPhoneNumberInstance {
|
|
|
148
163
|
dateCreated: Date;
|
|
149
164
|
country: string;
|
|
150
165
|
missingRequiredFields: boolean;
|
|
151
|
-
|
|
166
|
+
lastUpdated: Date;
|
|
152
167
|
phoneNumber: string;
|
|
153
168
|
portable: boolean;
|
|
154
169
|
notPortabilityReason: string;
|
|
155
|
-
notPortabilityReasonCode:
|
|
170
|
+
notPortabilityReasonCode: number;
|
|
156
171
|
portInPhoneNumberStatus: string;
|
|
172
|
+
portOutPin: number;
|
|
173
|
+
rejectionReason: string;
|
|
174
|
+
rejectionReasonCode: number;
|
|
157
175
|
};
|
|
158
176
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
159
177
|
}
|
|
@@ -73,12 +73,15 @@ class PortingPortInPhoneNumberInstance {
|
|
|
73
73
|
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
74
74
|
this.country = payload.country;
|
|
75
75
|
this.missingRequiredFields = payload.missing_required_fields;
|
|
76
|
-
this.
|
|
76
|
+
this.lastUpdated = deserialize.iso8601DateTime(payload.last_updated);
|
|
77
77
|
this.phoneNumber = payload.phone_number;
|
|
78
78
|
this.portable = payload.portable;
|
|
79
79
|
this.notPortabilityReason = payload.not_portability_reason;
|
|
80
|
-
this.notPortabilityReasonCode = payload.not_portability_reason_code;
|
|
80
|
+
this.notPortabilityReasonCode = deserialize.integer(payload.not_portability_reason_code);
|
|
81
81
|
this.portInPhoneNumberStatus = payload.port_in_phone_number_status;
|
|
82
|
+
this.portOutPin = deserialize.integer(payload.port_out_pin);
|
|
83
|
+
this.rejectionReason = payload.rejection_reason;
|
|
84
|
+
this.rejectionReasonCode = deserialize.integer(payload.rejection_reason_code);
|
|
82
85
|
this._solution = {
|
|
83
86
|
portInRequestSid: portInRequestSid || this.portInRequestSid,
|
|
84
87
|
phoneNumberSid: phoneNumberSid || this.phoneNumberSid,
|
|
@@ -125,12 +128,15 @@ class PortingPortInPhoneNumberInstance {
|
|
|
125
128
|
dateCreated: this.dateCreated,
|
|
126
129
|
country: this.country,
|
|
127
130
|
missingRequiredFields: this.missingRequiredFields,
|
|
128
|
-
|
|
131
|
+
lastUpdated: this.lastUpdated,
|
|
129
132
|
phoneNumber: this.phoneNumber,
|
|
130
133
|
portable: this.portable,
|
|
131
134
|
notPortabilityReason: this.notPortabilityReason,
|
|
132
135
|
notPortabilityReasonCode: this.notPortabilityReasonCode,
|
|
133
136
|
portInPhoneNumberStatus: this.portInPhoneNumberStatus,
|
|
137
|
+
portOutPin: this.portOutPin,
|
|
138
|
+
rejectionReason: this.rejectionReason,
|
|
139
|
+
rejectionReasonCode: this.rejectionReasonCode,
|
|
134
140
|
};
|
|
135
141
|
}
|
|
136
142
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -59,8 +59,6 @@ interface PortingPortabilityResource {
|
|
|
59
59
|
not_portable_reason_code: number;
|
|
60
60
|
number_type: PortingPortabilityNumberType;
|
|
61
61
|
country: string;
|
|
62
|
-
messaging_carrier: string;
|
|
63
|
-
voice_carrier: string;
|
|
64
62
|
url: string;
|
|
65
63
|
}
|
|
66
64
|
export declare class PortingPortabilityInstance {
|
|
@@ -97,14 +95,6 @@ export declare class PortingPortabilityInstance {
|
|
|
97
95
|
* Country the phone number belongs to.
|
|
98
96
|
*/
|
|
99
97
|
country: string;
|
|
100
|
-
/**
|
|
101
|
-
* Current messaging carrier of the phone number
|
|
102
|
-
*/
|
|
103
|
-
messagingCarrier: string;
|
|
104
|
-
/**
|
|
105
|
-
* Current voice carrier of the phone number
|
|
106
|
-
*/
|
|
107
|
-
voiceCarrier: string;
|
|
108
98
|
/**
|
|
109
99
|
* This is the url of the request that you\'re trying to reach out to locate the resource.
|
|
110
100
|
*/
|
|
@@ -141,8 +131,6 @@ export declare class PortingPortabilityInstance {
|
|
|
141
131
|
notPortableReasonCode: number;
|
|
142
132
|
numberType: PortingPortabilityNumberType;
|
|
143
133
|
country: string;
|
|
144
|
-
messagingCarrier: string;
|
|
145
|
-
voiceCarrier: string;
|
|
146
134
|
url: string;
|
|
147
135
|
};
|
|
148
136
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
@@ -74,8 +74,6 @@ class PortingPortabilityInstance {
|
|
|
74
74
|
this.notPortableReasonCode = deserialize.integer(payload.not_portable_reason_code);
|
|
75
75
|
this.numberType = payload.number_type;
|
|
76
76
|
this.country = payload.country;
|
|
77
|
-
this.messagingCarrier = payload.messaging_carrier;
|
|
78
|
-
this.voiceCarrier = payload.voice_carrier;
|
|
79
77
|
this.url = payload.url;
|
|
80
78
|
this._solution = { phoneNumber: phoneNumber || this.phoneNumber };
|
|
81
79
|
}
|
|
@@ -103,8 +101,6 @@ class PortingPortabilityInstance {
|
|
|
103
101
|
notPortableReasonCode: this.notPortableReasonCode,
|
|
104
102
|
numberType: this.numberType,
|
|
105
103
|
country: this.country,
|
|
106
|
-
messagingCarrier: this.messagingCarrier,
|
|
107
|
-
voiceCarrier: this.voiceCarrier,
|
|
108
104
|
url: this.url,
|
|
109
105
|
};
|
|
110
106
|
}
|
|
@@ -4,6 +4,13 @@ import Page, { TwilioResponsePayload } from "../../../../base/Page";
|
|
|
4
4
|
import Response from "../../../../http/response";
|
|
5
5
|
import V2 from "../../V2";
|
|
6
6
|
export type RegulationEndUserType = "individual" | "business";
|
|
7
|
+
/**
|
|
8
|
+
* Options to pass to fetch a RegulationInstance
|
|
9
|
+
*/
|
|
10
|
+
export interface RegulationContextFetchOptions {
|
|
11
|
+
/** A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields */
|
|
12
|
+
includeConstraints?: boolean;
|
|
13
|
+
}
|
|
7
14
|
/**
|
|
8
15
|
* Options to pass to each
|
|
9
16
|
*/
|
|
@@ -14,6 +21,8 @@ export interface RegulationListInstanceEachOptions {
|
|
|
14
21
|
isoCountry?: string;
|
|
15
22
|
/** The type of phone number that the regulatory requiremnt is restricting. */
|
|
16
23
|
numberType?: string;
|
|
24
|
+
/** A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields */
|
|
25
|
+
includeConstraints?: boolean;
|
|
17
26
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
18
27
|
pageSize?: number;
|
|
19
28
|
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
@@ -33,6 +42,8 @@ export interface RegulationListInstanceOptions {
|
|
|
33
42
|
isoCountry?: string;
|
|
34
43
|
/** The type of phone number that the regulatory requiremnt is restricting. */
|
|
35
44
|
numberType?: string;
|
|
45
|
+
/** A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields */
|
|
46
|
+
includeConstraints?: boolean;
|
|
36
47
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
37
48
|
pageSize?: number;
|
|
38
49
|
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
@@ -48,6 +59,8 @@ export interface RegulationListInstancePageOptions {
|
|
|
48
59
|
isoCountry?: string;
|
|
49
60
|
/** The type of phone number that the regulatory requiremnt is restricting. */
|
|
50
61
|
numberType?: string;
|
|
62
|
+
/** A boolean parameter indicating whether to include constraints or not for supporting end user, documents and their fields */
|
|
63
|
+
includeConstraints?: boolean;
|
|
51
64
|
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
52
65
|
pageSize?: number;
|
|
53
66
|
/** Page Number, this value is simply for client state */
|
|
@@ -64,6 +77,15 @@ export interface RegulationContext {
|
|
|
64
77
|
* @returns Resolves to processed RegulationInstance
|
|
65
78
|
*/
|
|
66
79
|
fetch(callback?: (error: Error | null, item?: RegulationInstance) => any): Promise<RegulationInstance>;
|
|
80
|
+
/**
|
|
81
|
+
* Fetch a RegulationInstance
|
|
82
|
+
*
|
|
83
|
+
* @param params - Parameter for request
|
|
84
|
+
* @param callback - Callback to handle processed record
|
|
85
|
+
*
|
|
86
|
+
* @returns Resolves to processed RegulationInstance
|
|
87
|
+
*/
|
|
88
|
+
fetch(params: RegulationContextFetchOptions, callback?: (error: Error | null, item?: RegulationInstance) => any): Promise<RegulationInstance>;
|
|
67
89
|
/**
|
|
68
90
|
* Provide a user-friendly representation
|
|
69
91
|
*/
|
|
@@ -78,7 +100,7 @@ export declare class RegulationContextImpl implements RegulationContext {
|
|
|
78
100
|
protected _solution: RegulationContextSolution;
|
|
79
101
|
protected _uri: string;
|
|
80
102
|
constructor(_version: V2, sid: string);
|
|
81
|
-
fetch(callback?: (error: Error | null, item?: RegulationInstance) => any): Promise<RegulationInstance>;
|
|
103
|
+
fetch(params?: RegulationContextFetchOptions | ((error: Error | null, item?: RegulationInstance) => any), callback?: (error: Error | null, item?: RegulationInstance) => any): Promise<RegulationInstance>;
|
|
82
104
|
/**
|
|
83
105
|
* Provide a user-friendly representation
|
|
84
106
|
*
|
|
@@ -138,6 +160,15 @@ export declare class RegulationInstance {
|
|
|
138
160
|
* @returns Resolves to processed RegulationInstance
|
|
139
161
|
*/
|
|
140
162
|
fetch(callback?: (error: Error | null, item?: RegulationInstance) => any): Promise<RegulationInstance>;
|
|
163
|
+
/**
|
|
164
|
+
* Fetch a RegulationInstance
|
|
165
|
+
*
|
|
166
|
+
* @param params - Parameter for request
|
|
167
|
+
* @param callback - Callback to handle processed record
|
|
168
|
+
*
|
|
169
|
+
* @returns Resolves to processed RegulationInstance
|
|
170
|
+
*/
|
|
171
|
+
fetch(params: RegulationContextFetchOptions, callback?: (error: Error | null, item?: RegulationInstance) => any): Promise<RegulationInstance>;
|
|
141
172
|
/**
|
|
142
173
|
* Provide a user-friendly representation
|
|
143
174
|
*
|
|
@@ -31,11 +31,24 @@ class RegulationContextImpl {
|
|
|
31
31
|
this._solution = { sid };
|
|
32
32
|
this._uri = `/RegulatoryCompliance/Regulations/${sid}`;
|
|
33
33
|
}
|
|
34
|
-
fetch(callback) {
|
|
34
|
+
fetch(params, callback) {
|
|
35
|
+
if (params instanceof Function) {
|
|
36
|
+
callback = params;
|
|
37
|
+
params = {};
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
params = params || {};
|
|
41
|
+
}
|
|
42
|
+
let data = {};
|
|
43
|
+
if (params["includeConstraints"] !== undefined)
|
|
44
|
+
data["IncludeConstraints"] = serialize.bool(params["includeConstraints"]);
|
|
45
|
+
const headers = {};
|
|
35
46
|
const instance = this;
|
|
36
47
|
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
37
48
|
uri: instance._uri,
|
|
38
49
|
method: "get",
|
|
50
|
+
params: data,
|
|
51
|
+
headers,
|
|
39
52
|
});
|
|
40
53
|
operationPromise = operationPromise.then((payload) => new RegulationInstance(operationVersion, payload, instance._solution.sid));
|
|
41
54
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
@@ -72,15 +85,8 @@ class RegulationInstance {
|
|
|
72
85
|
new RegulationContextImpl(this._version, this._solution.sid);
|
|
73
86
|
return this._context;
|
|
74
87
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
*
|
|
78
|
-
* @param callback - Callback to handle processed record
|
|
79
|
-
*
|
|
80
|
-
* @returns Resolves to processed RegulationInstance
|
|
81
|
-
*/
|
|
82
|
-
fetch(callback) {
|
|
83
|
-
return this._proxy.fetch(callback);
|
|
88
|
+
fetch(params, callback) {
|
|
89
|
+
return this._proxy.fetch(params, callback);
|
|
84
90
|
}
|
|
85
91
|
/**
|
|
86
92
|
* Provide a user-friendly representation
|
|
@@ -126,6 +132,8 @@ function RegulationListInstance(version) {
|
|
|
126
132
|
data["IsoCountry"] = params["isoCountry"];
|
|
127
133
|
if (params["numberType"] !== undefined)
|
|
128
134
|
data["NumberType"] = params["numberType"];
|
|
135
|
+
if (params["includeConstraints"] !== undefined)
|
|
136
|
+
data["IncludeConstraints"] = serialize.bool(params["includeConstraints"]);
|
|
129
137
|
if (params["pageSize"] !== undefined)
|
|
130
138
|
data["PageSize"] = params["pageSize"];
|
|
131
139
|
if (params.pageNumber !== undefined)
|
|
@@ -50,6 +50,8 @@ export interface ComplianceTollfreeInquiriesListInstanceCreateOptions {
|
|
|
50
50
|
businessContactPhone?: string;
|
|
51
51
|
/** Theme id for styling the inquiry form. */
|
|
52
52
|
themeSetId?: string;
|
|
53
|
+
/** Skip the messaging use case screen of the inquiry form. */
|
|
54
|
+
skipMessagingUseCase?: boolean;
|
|
53
55
|
}
|
|
54
56
|
export interface ComplianceTollfreeInquiriesSolution {
|
|
55
57
|
}
|
|
@@ -78,6 +78,8 @@ function ComplianceTollfreeInquiriesListInstance(version) {
|
|
|
78
78
|
data["BusinessContactPhone"] = params["businessContactPhone"];
|
|
79
79
|
if (params["themeSetId"] !== undefined)
|
|
80
80
|
data["ThemeSetId"] = params["themeSetId"];
|
|
81
|
+
if (params["skipMessagingUseCase"] !== undefined)
|
|
82
|
+
data["SkipMessagingUseCase"] = serialize.bool(params["skipMessagingUseCase"]);
|
|
81
83
|
const headers = {};
|
|
82
84
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
83
85
|
let operationVersion = version, operationPromise = operationVersion.create({
|
|
@@ -213,6 +213,8 @@ declare namespace VoiceResponse {
|
|
|
213
213
|
type SsmlSayAsInterpretAs = "characters" | "spell-out" | "cardinal" | "number" | "ordinal" | "digits" | "fraction" | "unit" | "date" | "time" | "address" | "expletive" | "telephone";
|
|
214
214
|
type StreamStatusCallbackMethod = "GET" | "POST";
|
|
215
215
|
type StreamTrack = "inbound_track" | "outbound_track" | "both_tracks";
|
|
216
|
+
type TranscriptionStatusCallbackMethod = "GET" | "POST";
|
|
217
|
+
type TranscriptionTrack = "inbound_track" | "outbound_track" | "both_tracks";
|
|
216
218
|
/**
|
|
217
219
|
* Attributes to pass to connect
|
|
218
220
|
*/
|
|
@@ -523,6 +525,55 @@ declare namespace VoiceResponse {
|
|
|
523
525
|
/** track - Track to be streamed to remote service */
|
|
524
526
|
track?: SiprecTrack;
|
|
525
527
|
}
|
|
528
|
+
/**
|
|
529
|
+
* Attributes to pass to transcription
|
|
530
|
+
*/
|
|
531
|
+
export interface TranscriptionAttributes {
|
|
532
|
+
/** enableAutomaticPunctuation - Enable Automatic Punctuation */
|
|
533
|
+
enableAutomaticPunctuation?: boolean;
|
|
534
|
+
/** hints - Hints to be provided to the transcription engine */
|
|
535
|
+
hints?: string;
|
|
536
|
+
/** inboundTrackLabel - Friendly name given to the Inbound Track */
|
|
537
|
+
inboundTrackLabel?: string;
|
|
538
|
+
/** languageCode - Language Code used by the transcription engine */
|
|
539
|
+
languageCode?: string;
|
|
540
|
+
/** name - Friendly name given to the Transcription */
|
|
541
|
+
name?: string;
|
|
542
|
+
/** outboundTrackLabel - Friendly name given to the Outbound Track Label */
|
|
543
|
+
outboundTrackLabel?: string;
|
|
544
|
+
/** partialResults - Indicates if partial results are going to be send to the customer */
|
|
545
|
+
partialResults?: boolean;
|
|
546
|
+
/** profanityFilter - Enable Profanity Filter */
|
|
547
|
+
profanityFilter?: boolean;
|
|
548
|
+
/** speechModel - Speech Model used by the transcription engine */
|
|
549
|
+
speechModel?: string;
|
|
550
|
+
/** statusCallbackMethod - Status Callback URL method */
|
|
551
|
+
statusCallbackMethod?: TranscriptionStatusCallbackMethod;
|
|
552
|
+
/** statusCallbackUrl - Status Callback URL */
|
|
553
|
+
statusCallbackUrl?: string;
|
|
554
|
+
/** track - Track to be analyze by the provider */
|
|
555
|
+
track?: TranscriptionTrack;
|
|
556
|
+
/** transcriptionEngine - Transcription Engine to be used */
|
|
557
|
+
transcriptionEngine?: string;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Attributes to pass to config
|
|
561
|
+
*/
|
|
562
|
+
export interface ConfigAttributes {
|
|
563
|
+
/** name - The name of the custom config */
|
|
564
|
+
name?: string;
|
|
565
|
+
/** value - The value of the custom config */
|
|
566
|
+
value?: string;
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* Attributes to pass to parameter
|
|
570
|
+
*/
|
|
571
|
+
export interface ParameterAttributes {
|
|
572
|
+
/** name - The name of the custom parameter */
|
|
573
|
+
name?: string;
|
|
574
|
+
/** value - The value of the custom parameter */
|
|
575
|
+
value?: string;
|
|
576
|
+
}
|
|
526
577
|
/**
|
|
527
578
|
* Attributes to pass to parameter
|
|
528
579
|
*/
|
|
@@ -573,6 +624,37 @@ declare namespace VoiceResponse {
|
|
|
573
624
|
/** track - Track to be streamed to remote service */
|
|
574
625
|
track?: SiprecTrack;
|
|
575
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* Attributes to pass to transcription
|
|
629
|
+
*/
|
|
630
|
+
export interface TranscriptionAttributes {
|
|
631
|
+
/** enableAutomaticPunctuation - Enable Automatic Punctuation */
|
|
632
|
+
enableAutomaticPunctuation?: boolean;
|
|
633
|
+
/** hints - Hints to be provided to the transcription engine */
|
|
634
|
+
hints?: string;
|
|
635
|
+
/** inboundTrackLabel - Friendly name given to the Inbound Track */
|
|
636
|
+
inboundTrackLabel?: string;
|
|
637
|
+
/** languageCode - Language Code used by the transcription engine */
|
|
638
|
+
languageCode?: string;
|
|
639
|
+
/** name - Friendly name given to the Transcription */
|
|
640
|
+
name?: string;
|
|
641
|
+
/** outboundTrackLabel - Friendly name given to the Outbound Track Label */
|
|
642
|
+
outboundTrackLabel?: string;
|
|
643
|
+
/** partialResults - Indicates if partial results are going to be send to the customer */
|
|
644
|
+
partialResults?: boolean;
|
|
645
|
+
/** profanityFilter - Enable Profanity Filter */
|
|
646
|
+
profanityFilter?: boolean;
|
|
647
|
+
/** speechModel - Speech Model used by the transcription engine */
|
|
648
|
+
speechModel?: string;
|
|
649
|
+
/** statusCallbackMethod - Status Callback URL method */
|
|
650
|
+
statusCallbackMethod?: TranscriptionStatusCallbackMethod;
|
|
651
|
+
/** statusCallbackUrl - Status Callback URL */
|
|
652
|
+
statusCallbackUrl?: string;
|
|
653
|
+
/** track - Track to be analyze by the provider */
|
|
654
|
+
track?: TranscriptionTrack;
|
|
655
|
+
/** transcriptionEngine - Transcription Engine to be used */
|
|
656
|
+
transcriptionEngine?: string;
|
|
657
|
+
}
|
|
576
658
|
/**
|
|
577
659
|
* Attributes to pass to say
|
|
578
660
|
*/
|
|
@@ -2393,6 +2475,12 @@ declare namespace VoiceResponse {
|
|
|
2393
2475
|
* @param attributes - TwiML attributes
|
|
2394
2476
|
*/
|
|
2395
2477
|
stream(attributes?: VoiceResponse.StreamAttributes): VoiceResponse.Stream;
|
|
2478
|
+
/**
|
|
2479
|
+
* <Transcription> TwiML Noun
|
|
2480
|
+
*
|
|
2481
|
+
* @param attributes - TwiML attributes
|
|
2482
|
+
*/
|
|
2483
|
+
transcription(attributes?: VoiceResponse.TranscriptionAttributes): VoiceResponse.Transcription;
|
|
2396
2484
|
}
|
|
2397
2485
|
export class Stop extends TwiML {
|
|
2398
2486
|
stop: XMLElement;
|
|
@@ -2412,6 +2500,12 @@ declare namespace VoiceResponse {
|
|
|
2412
2500
|
* @param attributes - TwiML attributes
|
|
2413
2501
|
*/
|
|
2414
2502
|
stream(attributes?: VoiceResponse.StreamAttributes): VoiceResponse.Stream;
|
|
2503
|
+
/**
|
|
2504
|
+
* <Transcription> TwiML Noun
|
|
2505
|
+
*
|
|
2506
|
+
* @param attributes - TwiML attributes
|
|
2507
|
+
*/
|
|
2508
|
+
transcription(attributes?: VoiceResponse.TranscriptionAttributes): VoiceResponse.Transcription;
|
|
2415
2509
|
}
|
|
2416
2510
|
export class Stream extends TwiML {
|
|
2417
2511
|
stream: XMLElement;
|
|
@@ -2433,6 +2527,25 @@ declare namespace VoiceResponse {
|
|
|
2433
2527
|
*/
|
|
2434
2528
|
constructor(task: XMLElement);
|
|
2435
2529
|
}
|
|
2530
|
+
export class Transcription extends TwiML {
|
|
2531
|
+
transcription: XMLElement;
|
|
2532
|
+
/**
|
|
2533
|
+
* <Transcription> TwiML Noun
|
|
2534
|
+
*/
|
|
2535
|
+
constructor(transcription: XMLElement);
|
|
2536
|
+
/**
|
|
2537
|
+
* <Config> TwiML Noun
|
|
2538
|
+
*
|
|
2539
|
+
* @param attributes - TwiML attributes
|
|
2540
|
+
*/
|
|
2541
|
+
config(attributes?: VoiceResponse.ConfigAttributes): VoiceResponse.Config;
|
|
2542
|
+
/**
|
|
2543
|
+
* <Parameter> TwiML Noun
|
|
2544
|
+
*
|
|
2545
|
+
* @param attributes - TwiML attributes
|
|
2546
|
+
*/
|
|
2547
|
+
parameter(attributes?: VoiceResponse.ParameterAttributes): VoiceResponse.Parameter;
|
|
2548
|
+
}
|
|
2436
2549
|
export class VirtualAgent extends TwiML {
|
|
2437
2550
|
virtualAgent: XMLElement;
|
|
2438
2551
|
/**
|
|
@@ -1343,6 +1343,14 @@ class VoiceResponse extends TwiML_1.default {
|
|
|
1343
1343
|
stream(attributes) {
|
|
1344
1344
|
return new VoiceResponse.Stream(this.start.ele("Stream", attributes));
|
|
1345
1345
|
}
|
|
1346
|
+
/**
|
|
1347
|
+
* <Transcription> TwiML Noun
|
|
1348
|
+
*
|
|
1349
|
+
* @param attributes - TwiML attributes
|
|
1350
|
+
*/
|
|
1351
|
+
transcription(attributes) {
|
|
1352
|
+
return new VoiceResponse.Transcription(this.start.ele("Transcription", attributes));
|
|
1353
|
+
}
|
|
1346
1354
|
}
|
|
1347
1355
|
VoiceResponse.Start = Start;
|
|
1348
1356
|
class Stop extends TwiML_1.default {
|
|
@@ -1370,6 +1378,14 @@ class VoiceResponse extends TwiML_1.default {
|
|
|
1370
1378
|
stream(attributes) {
|
|
1371
1379
|
return new VoiceResponse.Stream(this.stop.ele("Stream", attributes));
|
|
1372
1380
|
}
|
|
1381
|
+
/**
|
|
1382
|
+
* <Transcription> TwiML Noun
|
|
1383
|
+
*
|
|
1384
|
+
* @param attributes - TwiML attributes
|
|
1385
|
+
*/
|
|
1386
|
+
transcription(attributes) {
|
|
1387
|
+
return new VoiceResponse.Transcription(this.stop.ele("Transcription", attributes));
|
|
1388
|
+
}
|
|
1373
1389
|
}
|
|
1374
1390
|
VoiceResponse.Stop = Stop;
|
|
1375
1391
|
class Stream extends TwiML_1.default {
|
|
@@ -1402,6 +1418,33 @@ class VoiceResponse extends TwiML_1.default {
|
|
|
1402
1418
|
}
|
|
1403
1419
|
}
|
|
1404
1420
|
VoiceResponse.Task = Task;
|
|
1421
|
+
class Transcription extends TwiML_1.default {
|
|
1422
|
+
/**
|
|
1423
|
+
* <Transcription> TwiML Noun
|
|
1424
|
+
*/
|
|
1425
|
+
constructor(transcription) {
|
|
1426
|
+
super();
|
|
1427
|
+
this.transcription = transcription;
|
|
1428
|
+
this._propertyName = "transcription";
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* <Config> TwiML Noun
|
|
1432
|
+
*
|
|
1433
|
+
* @param attributes - TwiML attributes
|
|
1434
|
+
*/
|
|
1435
|
+
config(attributes) {
|
|
1436
|
+
return new VoiceResponse.Config(this.transcription.ele("Config", attributes));
|
|
1437
|
+
}
|
|
1438
|
+
/**
|
|
1439
|
+
* <Parameter> TwiML Noun
|
|
1440
|
+
*
|
|
1441
|
+
* @param attributes - TwiML attributes
|
|
1442
|
+
*/
|
|
1443
|
+
parameter(attributes) {
|
|
1444
|
+
return new VoiceResponse.Parameter(this.transcription.ele("Parameter", attributes));
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
VoiceResponse.Transcription = Transcription;
|
|
1405
1448
|
class VirtualAgent extends TwiML_1.default {
|
|
1406
1449
|
/**
|
|
1407
1450
|
* <VirtualAgent> TwiML Noun
|