twilio 5.5.2 → 5.6.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/lib/rest/MessagingBase.d.ts +3 -0
- package/lib/rest/MessagingBase.js +5 -0
- package/lib/rest/api/v2010/account/call.d.ts +1 -1
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -2
- package/lib/rest/flexApi/v1/interaction.d.ts +47 -0
- package/lib/rest/flexApi/v1/interaction.js +32 -0
- package/lib/rest/messaging/V2.d.ts +15 -0
- package/lib/rest/messaging/V2.js +37 -0
- package/lib/rest/messaging/v2/channelsSender.d.ts +453 -0
- package/lib/rest/messaging/v2/channelsSender.js +301 -0
- package/lib/rest/numbers/V1.d.ts +5 -5
- package/lib/rest/numbers/V1.js +8 -6
- package/lib/rest/numbers/v1/{webhook.d.ts → portingWebhookConfigurationFetch.d.ts} +10 -10
- package/lib/rest/numbers/v1/{webhook.js → portingWebhookConfigurationFetch.js} +6 -6
- package/lib/rest/serverless/v1/service/build.d.ts +1 -1
- package/lib/rest/video/v1/room.d.ts +4 -0
- package/lib/rest/video/v1/room.js +4 -0
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import Domain from "../base/Domain";
|
|
2
2
|
import V1 from "./messaging/V1";
|
|
3
|
+
import V2 from "./messaging/V2";
|
|
3
4
|
declare class MessagingBase extends Domain {
|
|
4
5
|
_v1?: V1;
|
|
6
|
+
_v2?: V2;
|
|
5
7
|
/**
|
|
6
8
|
* Initialize messaging domain
|
|
7
9
|
*
|
|
@@ -9,5 +11,6 @@ declare class MessagingBase extends Domain {
|
|
|
9
11
|
*/
|
|
10
12
|
constructor(twilio: any);
|
|
11
13
|
get v1(): V1;
|
|
14
|
+
get v2(): V2;
|
|
12
15
|
}
|
|
13
16
|
export = MessagingBase;
|
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
};
|
|
15
15
|
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
16
|
const V1_1 = __importDefault(require("./messaging/V1"));
|
|
17
|
+
const V2_1 = __importDefault(require("./messaging/V2"));
|
|
17
18
|
class MessagingBase extends Domain_1.default {
|
|
18
19
|
/**
|
|
19
20
|
* Initialize messaging domain
|
|
@@ -27,5 +28,9 @@ class MessagingBase extends Domain_1.default {
|
|
|
27
28
|
this._v1 = this._v1 || new V1_1.default(this);
|
|
28
29
|
return this._v1;
|
|
29
30
|
}
|
|
31
|
+
get v2() {
|
|
32
|
+
this._v2 = this._v2 || new V2_1.default(this);
|
|
33
|
+
return this._v2;
|
|
34
|
+
}
|
|
30
35
|
}
|
|
31
36
|
module.exports = MessagingBase;
|
|
@@ -61,7 +61,7 @@ export interface CallListInstanceCreateOptions {
|
|
|
61
61
|
statusCallbackEvent?: Array<string>;
|
|
62
62
|
/** The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored. */
|
|
63
63
|
statusCallbackMethod?: string;
|
|
64
|
-
/**
|
|
64
|
+
/** The string of keys to dial after connecting to the number, with a maximum length of 32 digits. Valid digits in the string include any digit (`0`-`9`), \\\'`A`\\\', \\\'`B`\\\', \\\'`C`\\\', \\\'`D`\\\', \\\'`#`\\\', and \\\'`*`\\\'. You can also use \\\'`w`\\\' to insert a half-second pause and \\\'`W`\\\' to insert a one-second pause. For example, to pause for one second after connecting and then dial extension 1234 followed by the # key, set this parameter to `W1234#`. Be sure to URL-encode this string because the \\\'`#`\\\' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored. */
|
|
65
65
|
sendDigits?: string;
|
|
66
66
|
/** The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail. */
|
|
67
67
|
timeout?: number;
|
|
@@ -23,7 +23,7 @@ export interface ParticipantContextUpdateOptions {
|
|
|
23
23
|
announceUrl?: string;
|
|
24
24
|
/** The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`. */
|
|
25
25
|
announceMethod?: string;
|
|
26
|
-
/** The URL
|
|
26
|
+
/** The URL that Twilio calls using the `wait_method` before the conference has started. The URL may return an MP3 file, a WAV file, or a TwiML document. The default value is the URL of our standard hold music. If you do not want anything to play while waiting for the conference to start, specify an empty string by setting `wait_url` to `\\\'\\\'`. For more details on the allowable verbs within the `waitUrl`, see the `waitUrl` attribute in the [<Conference> TwiML instruction](https://www.twilio.com/docs/voice/twiml/conference#attributes-waiturl). */
|
|
27
27
|
waitUrl?: string;
|
|
28
28
|
/** The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. */
|
|
29
29
|
waitMethod?: string;
|
|
@@ -64,7 +64,7 @@ export interface ParticipantListInstanceCreateOptions {
|
|
|
64
64
|
startConferenceOnEnter?: boolean;
|
|
65
65
|
/** Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`. */
|
|
66
66
|
endConferenceOnExit?: boolean;
|
|
67
|
-
/** The URL
|
|
67
|
+
/** The URL that Twilio calls using the `wait_method` before the conference has started. The URL may return an MP3 file, a WAV file, or a TwiML document. The default value is the URL of our standard hold music. If you do not want anything to play while waiting for the conference to start, specify an empty string by setting `wait_url` to `\\\'\\\'`. For more details on the allowable verbs within the `waitUrl`, see the `waitUrl` attribute in the [<Conference> TwiML instruction](https://www.twilio.com/docs/voice/twiml/conference#attributes-waiturl). */
|
|
68
68
|
waitUrl?: string;
|
|
69
69
|
/** The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file. */
|
|
70
70
|
waitMethod?: string;
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../V1";
|
|
4
4
|
import { InteractionChannelListInstance } from "./interaction/interactionChannel";
|
|
5
|
+
/**
|
|
6
|
+
* Options to pass to update a InteractionInstance
|
|
7
|
+
*/
|
|
8
|
+
export interface InteractionContextUpdateOptions {
|
|
9
|
+
/** The unique identifier for Interaction level webhook */
|
|
10
|
+
webhookTtid?: string;
|
|
11
|
+
}
|
|
5
12
|
/**
|
|
6
13
|
* Options to pass to create a InteractionInstance
|
|
7
14
|
*/
|
|
@@ -12,6 +19,8 @@ export interface InteractionListInstanceCreateOptions {
|
|
|
12
19
|
routing?: object;
|
|
13
20
|
/** The Interaction context sid is used for adding a context lookup sid */
|
|
14
21
|
interactionContextSid?: string;
|
|
22
|
+
/** The unique identifier for Interaction level webhook */
|
|
23
|
+
webhookTtid?: string;
|
|
15
24
|
}
|
|
16
25
|
export interface InteractionContext {
|
|
17
26
|
channels: InteractionChannelListInstance;
|
|
@@ -23,6 +32,23 @@ export interface InteractionContext {
|
|
|
23
32
|
* @returns Resolves to processed InteractionInstance
|
|
24
33
|
*/
|
|
25
34
|
fetch(callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
35
|
+
/**
|
|
36
|
+
* Update a InteractionInstance
|
|
37
|
+
*
|
|
38
|
+
* @param callback - Callback to handle processed record
|
|
39
|
+
*
|
|
40
|
+
* @returns Resolves to processed InteractionInstance
|
|
41
|
+
*/
|
|
42
|
+
update(callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
43
|
+
/**
|
|
44
|
+
* Update a InteractionInstance
|
|
45
|
+
*
|
|
46
|
+
* @param params - Parameter for request
|
|
47
|
+
* @param callback - Callback to handle processed record
|
|
48
|
+
*
|
|
49
|
+
* @returns Resolves to processed InteractionInstance
|
|
50
|
+
*/
|
|
51
|
+
update(params: InteractionContextUpdateOptions, callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
26
52
|
/**
|
|
27
53
|
* Provide a user-friendly representation
|
|
28
54
|
*/
|
|
@@ -40,6 +66,7 @@ export declare class InteractionContextImpl implements InteractionContext {
|
|
|
40
66
|
constructor(_version: V1, sid: string);
|
|
41
67
|
get channels(): InteractionChannelListInstance;
|
|
42
68
|
fetch(callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
69
|
+
update(params?: InteractionContextUpdateOptions | ((error: Error | null, item?: InteractionInstance) => any), callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
43
70
|
/**
|
|
44
71
|
* Provide a user-friendly representation
|
|
45
72
|
*
|
|
@@ -55,6 +82,7 @@ interface InteractionResource {
|
|
|
55
82
|
url: string;
|
|
56
83
|
links: Record<string, string>;
|
|
57
84
|
interaction_context_sid: string;
|
|
85
|
+
webhook_ttid: string;
|
|
58
86
|
}
|
|
59
87
|
export declare class InteractionInstance {
|
|
60
88
|
protected _version: V1;
|
|
@@ -76,6 +104,7 @@ export declare class InteractionInstance {
|
|
|
76
104
|
url: string;
|
|
77
105
|
links: Record<string, string>;
|
|
78
106
|
interactionContextSid: string;
|
|
107
|
+
webhookTtid: string;
|
|
79
108
|
private get _proxy();
|
|
80
109
|
/**
|
|
81
110
|
* Fetch a InteractionInstance
|
|
@@ -85,6 +114,23 @@ export declare class InteractionInstance {
|
|
|
85
114
|
* @returns Resolves to processed InteractionInstance
|
|
86
115
|
*/
|
|
87
116
|
fetch(callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
117
|
+
/**
|
|
118
|
+
* Update a InteractionInstance
|
|
119
|
+
*
|
|
120
|
+
* @param callback - Callback to handle processed record
|
|
121
|
+
*
|
|
122
|
+
* @returns Resolves to processed InteractionInstance
|
|
123
|
+
*/
|
|
124
|
+
update(callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
125
|
+
/**
|
|
126
|
+
* Update a InteractionInstance
|
|
127
|
+
*
|
|
128
|
+
* @param params - Parameter for request
|
|
129
|
+
* @param callback - Callback to handle processed record
|
|
130
|
+
*
|
|
131
|
+
* @returns Resolves to processed InteractionInstance
|
|
132
|
+
*/
|
|
133
|
+
update(params: InteractionContextUpdateOptions, callback?: (error: Error | null, item?: InteractionInstance) => any): Promise<InteractionInstance>;
|
|
88
134
|
/**
|
|
89
135
|
* Access the channels.
|
|
90
136
|
*/
|
|
@@ -101,6 +147,7 @@ export declare class InteractionInstance {
|
|
|
101
147
|
url: string;
|
|
102
148
|
links: Record<string, string>;
|
|
103
149
|
interactionContextSid: string;
|
|
150
|
+
webhookTtid: string;
|
|
104
151
|
};
|
|
105
152
|
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
106
153
|
}
|
|
@@ -47,6 +47,31 @@ class InteractionContextImpl {
|
|
|
47
47
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
48
48
|
return operationPromise;
|
|
49
49
|
}
|
|
50
|
+
update(params, callback) {
|
|
51
|
+
if (params instanceof Function) {
|
|
52
|
+
callback = params;
|
|
53
|
+
params = {};
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
params = params || {};
|
|
57
|
+
}
|
|
58
|
+
let data = {};
|
|
59
|
+
if (params["webhookTtid"] !== undefined)
|
|
60
|
+
data["WebhookTtid"] = params["webhookTtid"];
|
|
61
|
+
const headers = {};
|
|
62
|
+
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
63
|
+
headers["Accept"] = "application/json";
|
|
64
|
+
const instance = this;
|
|
65
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
66
|
+
uri: instance._uri,
|
|
67
|
+
method: "post",
|
|
68
|
+
data,
|
|
69
|
+
headers,
|
|
70
|
+
});
|
|
71
|
+
operationPromise = operationPromise.then((payload) => new InteractionInstance(operationVersion, payload, instance._solution.sid));
|
|
72
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
73
|
+
return operationPromise;
|
|
74
|
+
}
|
|
50
75
|
/**
|
|
51
76
|
* Provide a user-friendly representation
|
|
52
77
|
*
|
|
@@ -69,6 +94,7 @@ class InteractionInstance {
|
|
|
69
94
|
this.url = payload.url;
|
|
70
95
|
this.links = payload.links;
|
|
71
96
|
this.interactionContextSid = payload.interaction_context_sid;
|
|
97
|
+
this.webhookTtid = payload.webhook_ttid;
|
|
72
98
|
this._solution = { sid: sid || this.sid };
|
|
73
99
|
}
|
|
74
100
|
get _proxy() {
|
|
@@ -87,6 +113,9 @@ class InteractionInstance {
|
|
|
87
113
|
fetch(callback) {
|
|
88
114
|
return this._proxy.fetch(callback);
|
|
89
115
|
}
|
|
116
|
+
update(params, callback) {
|
|
117
|
+
return this._proxy.update(params, callback);
|
|
118
|
+
}
|
|
90
119
|
/**
|
|
91
120
|
* Access the channels.
|
|
92
121
|
*/
|
|
@@ -106,6 +135,7 @@ class InteractionInstance {
|
|
|
106
135
|
url: this.url,
|
|
107
136
|
links: this.links,
|
|
108
137
|
interactionContextSid: this.interactionContextSid,
|
|
138
|
+
webhookTtid: this.webhookTtid,
|
|
109
139
|
};
|
|
110
140
|
}
|
|
111
141
|
[util_1.inspect.custom](_depth, options) {
|
|
@@ -134,6 +164,8 @@ function InteractionListInstance(version) {
|
|
|
134
164
|
data["Routing"] = serialize.object(params["routing"]);
|
|
135
165
|
if (params["interactionContextSid"] !== undefined)
|
|
136
166
|
data["InteractionContextSid"] = params["interactionContextSid"];
|
|
167
|
+
if (params["webhookTtid"] !== undefined)
|
|
168
|
+
data["WebhookTtid"] = params["webhookTtid"];
|
|
137
169
|
const headers = {};
|
|
138
170
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
139
171
|
headers["Accept"] = "application/json";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import MessagingBase from "../MessagingBase";
|
|
2
|
+
import Version from "../../base/Version";
|
|
3
|
+
import { ChannelsSenderListInstance } from "./v2/channelsSender";
|
|
4
|
+
export default class V2 extends Version {
|
|
5
|
+
/**
|
|
6
|
+
* Initialize the V2 version of Messaging
|
|
7
|
+
*
|
|
8
|
+
* @param domain - The Twilio (Twilio.Messaging) domain
|
|
9
|
+
*/
|
|
10
|
+
constructor(domain: MessagingBase);
|
|
11
|
+
/** channelsSenders - { Twilio.Messaging.V2.ChannelsSenderListInstance } resource */
|
|
12
|
+
protected _channelsSenders?: ChannelsSenderListInstance;
|
|
13
|
+
/** Getter for channelsSenders resource */
|
|
14
|
+
get channelsSenders(): ChannelsSenderListInstance;
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Messaging
|
|
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
|
+
const Version_1 = __importDefault(require("../../base/Version"));
|
|
20
|
+
const channelsSender_1 = require("./v2/channelsSender");
|
|
21
|
+
class V2 extends Version_1.default {
|
|
22
|
+
/**
|
|
23
|
+
* Initialize the V2 version of Messaging
|
|
24
|
+
*
|
|
25
|
+
* @param domain - The Twilio (Twilio.Messaging) domain
|
|
26
|
+
*/
|
|
27
|
+
constructor(domain) {
|
|
28
|
+
super(domain, "v2");
|
|
29
|
+
}
|
|
30
|
+
/** Getter for channelsSenders resource */
|
|
31
|
+
get channelsSenders() {
|
|
32
|
+
this._channelsSenders =
|
|
33
|
+
this._channelsSenders || (0, channelsSender_1.ChannelsSenderListInstance)(this);
|
|
34
|
+
return this._channelsSenders;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = V2;
|
|
@@ -0,0 +1,453 @@
|
|
|
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 V2 from "../V2";
|
|
6
|
+
/**
|
|
7
|
+
* The Status of this Sender. One of `CREATING`, `ONLINE`, `OFFLINE`, `PENDING_VERIFICATION`, `VERIFYING` or `ONLINE:UPDATING`.
|
|
8
|
+
*/
|
|
9
|
+
export type ChannelsSenderStatus = "CREATING" | "ONLINE" | "OFFLINE" | "PENDING_VERIFICATION" | "VERIFYING" | "ONLINE:UPDATING" | "STUBBED";
|
|
10
|
+
/**
|
|
11
|
+
* Configuration settings for creating a sender, e.g., {\"waba_id\": \"1234567890\", \"verification_method\": \"sms\"}
|
|
12
|
+
*/
|
|
13
|
+
export declare class MessagingV2ChannelsSenderConfiguration {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the WhatsApp Business Account to use for this sender.
|
|
16
|
+
*/
|
|
17
|
+
"waba_id"?: string | null;
|
|
18
|
+
/**
|
|
19
|
+
* The method to use for verification. Either \"sms\" or \"voice\".
|
|
20
|
+
*/
|
|
21
|
+
"verification_method"?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* The verification code to use for this sender.
|
|
24
|
+
*/
|
|
25
|
+
"verification_code"?: string | null;
|
|
26
|
+
/**
|
|
27
|
+
* The SID of the Twilio Voice application to use for this sender.
|
|
28
|
+
*/
|
|
29
|
+
"voice_application_sid"?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare class MessagingV2ChannelsSenderOfflineReasonsItems {
|
|
32
|
+
/**
|
|
33
|
+
* The error code.
|
|
34
|
+
*/
|
|
35
|
+
"code"?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* The error message.
|
|
38
|
+
*/
|
|
39
|
+
"message"?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* The URL to get more information about the error.
|
|
42
|
+
*/
|
|
43
|
+
"more_info"?: string | null;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Sender profile specific configurations, e.g., {\"name\": \"xxx\", \"about\": \"xxx\", \"address\": \"xxx\", \"description\": \"xxx\", \"email\": \"xxx@xxx\", \"logo_url\": \"https://xxx\", \"vertical\": \"xxx\", \"websites\": [\"https://xxx\", \"...\"]}
|
|
47
|
+
*/
|
|
48
|
+
export declare class MessagingV2ChannelsSenderProfile {
|
|
49
|
+
/**
|
|
50
|
+
* The name of the sender.
|
|
51
|
+
*/
|
|
52
|
+
"name"?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* The about text of the sender.
|
|
55
|
+
*/
|
|
56
|
+
"about"?: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The address of the sender.
|
|
59
|
+
*/
|
|
60
|
+
"address"?: string | null;
|
|
61
|
+
/**
|
|
62
|
+
* The description of the sender.
|
|
63
|
+
*/
|
|
64
|
+
"description"?: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* The emails of the sender.
|
|
67
|
+
*/
|
|
68
|
+
"emails"?: Array<MessagingV2ChannelsSenderProfileEmails> | null;
|
|
69
|
+
/**
|
|
70
|
+
* The logo URL of the sender.
|
|
71
|
+
*/
|
|
72
|
+
"logo_url"?: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* The vertical of the sender. Allowed values are: - \"Automotive\" - \"Beauty, Spa and Salon\" - \"Clothing and Apparel\" - \"Education\" - \"Entertainment\" - \"Event Planning and Service\" - \"Finance and Banking\" - \"Food and Grocery\" - \"Public Service\" - \"Hotel and Lodging\" - \"Medical and Health\" - \"Non-profit\" - \"Professional Services\" - \"Shopping and Retail\" - \"Travel and Transportation\" - \"Restaurant\" - \"Other\"
|
|
75
|
+
*/
|
|
76
|
+
"vertical"?: string | null;
|
|
77
|
+
/**
|
|
78
|
+
* The websites of the sender.
|
|
79
|
+
*/
|
|
80
|
+
"websites"?: Array<MessagingV2ChannelsSenderProfileWebsites> | null;
|
|
81
|
+
}
|
|
82
|
+
export declare class MessagingV2ChannelsSenderProfileEmails {
|
|
83
|
+
/**
|
|
84
|
+
* The email of the sender.
|
|
85
|
+
*/
|
|
86
|
+
"email"?: string | null;
|
|
87
|
+
/**
|
|
88
|
+
* The label of the sender.
|
|
89
|
+
*/
|
|
90
|
+
"label"?: string | null;
|
|
91
|
+
}
|
|
92
|
+
export declare class MessagingV2ChannelsSenderProfileWebsites {
|
|
93
|
+
/**
|
|
94
|
+
* The label of the sender.
|
|
95
|
+
*/
|
|
96
|
+
"label"?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* The website of the sender.
|
|
99
|
+
*/
|
|
100
|
+
"website"?: string | null;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Sender specific additional properties, e.g., {\"quality_rating\": \"HIGH\", \"messaging_limit\": \"10K Customers/24hr\"}
|
|
104
|
+
*/
|
|
105
|
+
export declare class MessagingV2ChannelsSenderProperties {
|
|
106
|
+
/**
|
|
107
|
+
* The quality rating of the sender.
|
|
108
|
+
*/
|
|
109
|
+
"quality_rating"?: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* The messaging limit of the sender.
|
|
112
|
+
*/
|
|
113
|
+
"messaging_limit"?: string | null;
|
|
114
|
+
}
|
|
115
|
+
export declare class MessagingV2ChannelsSenderRequestsCreate {
|
|
116
|
+
/**
|
|
117
|
+
* The ID of this Sender prefixed with the channel, e.g., `whatsapp:E.164`
|
|
118
|
+
*/
|
|
119
|
+
"sender_id": string | null;
|
|
120
|
+
"configuration"?: MessagingV2ChannelsSenderConfiguration | null;
|
|
121
|
+
"webhook"?: MessagingV2ChannelsSenderWebhook | null;
|
|
122
|
+
"profile"?: MessagingV2ChannelsSenderProfile | null;
|
|
123
|
+
}
|
|
124
|
+
export declare class MessagingV2ChannelsSenderRequestsUpdate {
|
|
125
|
+
"configuration"?: MessagingV2ChannelsSenderConfiguration | null;
|
|
126
|
+
"webhook"?: MessagingV2ChannelsSenderWebhook | null;
|
|
127
|
+
"profile"?: MessagingV2ChannelsSenderProfile | null;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Webhook specific configurations, e.g., {\"callback_url\": \"https://xxx\", \"callback_method\": \"POST\", \"fallback_url\": \"https://xxx\", \"fallback_method\": \"POST\", \"status_callback_url\": \"https://xxx\", \"status_callback_method\": \"POST\"}
|
|
131
|
+
*/
|
|
132
|
+
export declare class MessagingV2ChannelsSenderWebhook {
|
|
133
|
+
/**
|
|
134
|
+
* The URL to send the webhook to.
|
|
135
|
+
*/
|
|
136
|
+
"callback_url"?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* The HTTP method to use for the webhook. Either \"POST\" or \"PUT\".
|
|
139
|
+
*/
|
|
140
|
+
"callback_method"?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* The URL to send the fallback webhook to.
|
|
143
|
+
*/
|
|
144
|
+
"fallback_url"?: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* The HTTP method to use for the fallback webhook. Either \"POST\" or \"PUT\".
|
|
147
|
+
*/
|
|
148
|
+
"fallback_method"?: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* The URL to send the status callback to.
|
|
151
|
+
*/
|
|
152
|
+
"status_callback_url"?: string | null;
|
|
153
|
+
/**
|
|
154
|
+
* The HTTP method to use for the status callback.
|
|
155
|
+
*/
|
|
156
|
+
"status_callback_method"?: string | null;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Options to pass to update a ChannelsSenderInstance
|
|
160
|
+
*/
|
|
161
|
+
export interface ChannelsSenderContextUpdateOptions {
|
|
162
|
+
/** */
|
|
163
|
+
messagingV2ChannelsSenderRequestsUpdate?: MessagingV2ChannelsSenderRequestsUpdate;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Options to pass to create a ChannelsSenderInstance
|
|
167
|
+
*/
|
|
168
|
+
export interface ChannelsSenderListInstanceCreateOptions {
|
|
169
|
+
/** */
|
|
170
|
+
messagingV2ChannelsSenderRequestsCreate: MessagingV2ChannelsSenderRequestsCreate;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Options to pass to each
|
|
174
|
+
*/
|
|
175
|
+
export interface ChannelsSenderListInstanceEachOptions {
|
|
176
|
+
/** */
|
|
177
|
+
channel: string;
|
|
178
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
179
|
+
pageSize?: number;
|
|
180
|
+
/** Function to process each record. If this and a positional callback are passed, this one will be used */
|
|
181
|
+
callback?: (item: ChannelsSenderInstance, done: (err?: Error) => void) => void;
|
|
182
|
+
/** Function to be called upon completion of streaming */
|
|
183
|
+
done?: Function;
|
|
184
|
+
/** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
|
|
185
|
+
limit?: number;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Options to pass to list
|
|
189
|
+
*/
|
|
190
|
+
export interface ChannelsSenderListInstanceOptions {
|
|
191
|
+
/** */
|
|
192
|
+
channel: string;
|
|
193
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
194
|
+
pageSize?: number;
|
|
195
|
+
/** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
|
|
196
|
+
limit?: number;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Options to pass to page
|
|
200
|
+
*/
|
|
201
|
+
export interface ChannelsSenderListInstancePageOptions {
|
|
202
|
+
/** */
|
|
203
|
+
channel: string;
|
|
204
|
+
/** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
|
|
205
|
+
pageSize?: number;
|
|
206
|
+
/** Page Number, this value is simply for client state */
|
|
207
|
+
pageNumber?: number;
|
|
208
|
+
/** PageToken provided by the API */
|
|
209
|
+
pageToken?: string;
|
|
210
|
+
}
|
|
211
|
+
export interface ChannelsSenderContext {
|
|
212
|
+
/**
|
|
213
|
+
* Remove a ChannelsSenderInstance
|
|
214
|
+
*
|
|
215
|
+
* @param callback - Callback to handle processed record
|
|
216
|
+
*
|
|
217
|
+
* @returns Resolves to processed boolean
|
|
218
|
+
*/
|
|
219
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
220
|
+
/**
|
|
221
|
+
* Fetch a ChannelsSenderInstance
|
|
222
|
+
*
|
|
223
|
+
* @param callback - Callback to handle processed record
|
|
224
|
+
*
|
|
225
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
226
|
+
*/
|
|
227
|
+
fetch(callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
228
|
+
/**
|
|
229
|
+
* Update a ChannelsSenderInstance
|
|
230
|
+
*
|
|
231
|
+
* @param callback - Callback to handle processed record
|
|
232
|
+
*
|
|
233
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
234
|
+
*/
|
|
235
|
+
update(callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
236
|
+
/**
|
|
237
|
+
* Update a ChannelsSenderInstance
|
|
238
|
+
*
|
|
239
|
+
* @param params - Body for request
|
|
240
|
+
* @param headers - header params for request
|
|
241
|
+
* @param callback - Callback to handle processed record
|
|
242
|
+
*
|
|
243
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
244
|
+
*/
|
|
245
|
+
update(params: MessagingV2ChannelsSenderRequestsUpdate, headers?: any, callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
246
|
+
/**
|
|
247
|
+
* Provide a user-friendly representation
|
|
248
|
+
*/
|
|
249
|
+
toJSON(): any;
|
|
250
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
251
|
+
}
|
|
252
|
+
export interface ChannelsSenderContextSolution {
|
|
253
|
+
sid: string;
|
|
254
|
+
}
|
|
255
|
+
export declare class ChannelsSenderContextImpl implements ChannelsSenderContext {
|
|
256
|
+
protected _version: V2;
|
|
257
|
+
protected _solution: ChannelsSenderContextSolution;
|
|
258
|
+
protected _uri: string;
|
|
259
|
+
constructor(_version: V2, sid: string);
|
|
260
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
261
|
+
fetch(callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
262
|
+
update(params?: MessagingV2ChannelsSenderRequestsUpdate | ((error: Error | null, item?: ChannelsSenderInstance) => any), headers?: any, callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
263
|
+
/**
|
|
264
|
+
* Provide a user-friendly representation
|
|
265
|
+
*
|
|
266
|
+
* @returns Object
|
|
267
|
+
*/
|
|
268
|
+
toJSON(): ChannelsSenderContextSolution;
|
|
269
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
270
|
+
}
|
|
271
|
+
interface ChannelsSenderPayload extends TwilioResponsePayload {
|
|
272
|
+
senders: ChannelsSenderResource[];
|
|
273
|
+
}
|
|
274
|
+
interface ChannelsSenderResource {
|
|
275
|
+
sid: string;
|
|
276
|
+
status: ChannelsSenderStatus;
|
|
277
|
+
sender_id: string;
|
|
278
|
+
configuration: MessagingV2ChannelsSenderConfiguration;
|
|
279
|
+
webhook: MessagingV2ChannelsSenderWebhook;
|
|
280
|
+
profile: MessagingV2ChannelsSenderProfile;
|
|
281
|
+
properties: MessagingV2ChannelsSenderProperties;
|
|
282
|
+
offline_reasons: Array<MessagingV2ChannelsSenderOfflineReasonsItems>;
|
|
283
|
+
url: string;
|
|
284
|
+
}
|
|
285
|
+
export declare class ChannelsSenderInstance {
|
|
286
|
+
protected _version: V2;
|
|
287
|
+
protected _solution: ChannelsSenderContextSolution;
|
|
288
|
+
protected _context?: ChannelsSenderContext;
|
|
289
|
+
constructor(_version: V2, payload: ChannelsSenderResource, sid?: string);
|
|
290
|
+
/**
|
|
291
|
+
* A 34 character string that uniquely identifies this Sender.
|
|
292
|
+
*/
|
|
293
|
+
sid: string;
|
|
294
|
+
status: ChannelsSenderStatus;
|
|
295
|
+
/**
|
|
296
|
+
* The ID of this Sender prefixed with the channel, e.g., `whatsapp:E.164`
|
|
297
|
+
*/
|
|
298
|
+
senderId: string;
|
|
299
|
+
configuration: MessagingV2ChannelsSenderConfiguration;
|
|
300
|
+
webhook: MessagingV2ChannelsSenderWebhook;
|
|
301
|
+
profile: MessagingV2ChannelsSenderProfile;
|
|
302
|
+
properties: MessagingV2ChannelsSenderProperties;
|
|
303
|
+
/**
|
|
304
|
+
* Reasons why the sender is offline., e.g., [{\"code\": \"21211400\", \"message\": \"Whatsapp business account is banned by provider {provider_name} | Credit line is assigned to another BSP\", \"more_info\": \"https://www.twilio.com/docs/errors/21211400\"}]
|
|
305
|
+
*/
|
|
306
|
+
offlineReasons: Array<MessagingV2ChannelsSenderOfflineReasonsItems>;
|
|
307
|
+
/**
|
|
308
|
+
* The URL of this resource, relative to `https://messaging.twilio.com`.
|
|
309
|
+
*/
|
|
310
|
+
url: string;
|
|
311
|
+
private get _proxy();
|
|
312
|
+
/**
|
|
313
|
+
* Remove a ChannelsSenderInstance
|
|
314
|
+
*
|
|
315
|
+
* @param callback - Callback to handle processed record
|
|
316
|
+
*
|
|
317
|
+
* @returns Resolves to processed boolean
|
|
318
|
+
*/
|
|
319
|
+
remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
|
|
320
|
+
/**
|
|
321
|
+
* Fetch a ChannelsSenderInstance
|
|
322
|
+
*
|
|
323
|
+
* @param callback - Callback to handle processed record
|
|
324
|
+
*
|
|
325
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
326
|
+
*/
|
|
327
|
+
fetch(callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
328
|
+
/**
|
|
329
|
+
* Update a ChannelsSenderInstance
|
|
330
|
+
*
|
|
331
|
+
* @param callback - Callback to handle processed record
|
|
332
|
+
*
|
|
333
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
334
|
+
*/
|
|
335
|
+
update(callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
336
|
+
/**
|
|
337
|
+
* Update a ChannelsSenderInstance
|
|
338
|
+
*
|
|
339
|
+
* @param params - Body for request
|
|
340
|
+
* @param headers - header params for request
|
|
341
|
+
* @param callback - Callback to handle processed record
|
|
342
|
+
*
|
|
343
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
344
|
+
*/
|
|
345
|
+
update(params: MessagingV2ChannelsSenderRequestsUpdate, headers?: any, callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
346
|
+
/**
|
|
347
|
+
* Provide a user-friendly representation
|
|
348
|
+
*
|
|
349
|
+
* @returns Object
|
|
350
|
+
*/
|
|
351
|
+
toJSON(): {
|
|
352
|
+
sid: string;
|
|
353
|
+
status: ChannelsSenderStatus;
|
|
354
|
+
senderId: string;
|
|
355
|
+
configuration: MessagingV2ChannelsSenderConfiguration;
|
|
356
|
+
webhook: MessagingV2ChannelsSenderWebhook;
|
|
357
|
+
profile: MessagingV2ChannelsSenderProfile;
|
|
358
|
+
properties: MessagingV2ChannelsSenderProperties;
|
|
359
|
+
offlineReasons: MessagingV2ChannelsSenderOfflineReasonsItems[];
|
|
360
|
+
url: string;
|
|
361
|
+
};
|
|
362
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
363
|
+
}
|
|
364
|
+
export interface ChannelsSenderSolution {
|
|
365
|
+
}
|
|
366
|
+
export interface ChannelsSenderListInstance {
|
|
367
|
+
_version: V2;
|
|
368
|
+
_solution: ChannelsSenderSolution;
|
|
369
|
+
_uri: string;
|
|
370
|
+
(sid: string): ChannelsSenderContext;
|
|
371
|
+
get(sid: string): ChannelsSenderContext;
|
|
372
|
+
/**
|
|
373
|
+
* Create a ChannelsSenderInstance
|
|
374
|
+
*
|
|
375
|
+
* @param params - Body for request
|
|
376
|
+
* @param headers - header params for request
|
|
377
|
+
* @param callback - Callback to handle processed record
|
|
378
|
+
*
|
|
379
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
380
|
+
*/
|
|
381
|
+
create(params: MessagingV2ChannelsSenderRequestsCreate, headers?: any, callback?: (error: Error | null, item?: ChannelsSenderInstance) => any): Promise<ChannelsSenderInstance>;
|
|
382
|
+
/**
|
|
383
|
+
* Streams ChannelsSenderInstance records from the API.
|
|
384
|
+
*
|
|
385
|
+
* This operation lazily loads records as efficiently as possible until the limit
|
|
386
|
+
* is reached.
|
|
387
|
+
*
|
|
388
|
+
* The results are passed into the callback function, so this operation is memory
|
|
389
|
+
* efficient.
|
|
390
|
+
*
|
|
391
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
392
|
+
* function.
|
|
393
|
+
*
|
|
394
|
+
* @param { ChannelsSenderListInstanceEachOptions } [params] - Options for request
|
|
395
|
+
* @param { function } [callback] - Function to process each record
|
|
396
|
+
*/
|
|
397
|
+
each(params: ChannelsSenderListInstanceEachOptions, callback?: (item: ChannelsSenderInstance, done: (err?: Error) => void) => void): void;
|
|
398
|
+
/**
|
|
399
|
+
* Retrieve a single target page of ChannelsSenderInstance records from the API.
|
|
400
|
+
*
|
|
401
|
+
* The request is executed immediately.
|
|
402
|
+
*
|
|
403
|
+
* @param { string } [targetUrl] - API-generated URL for the requested results page
|
|
404
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
405
|
+
*/
|
|
406
|
+
getPage(targetUrl: string, callback?: (error: Error | null, items: ChannelsSenderPage) => any): Promise<ChannelsSenderPage>;
|
|
407
|
+
/**
|
|
408
|
+
* Lists ChannelsSenderInstance records from the API as a list.
|
|
409
|
+
*
|
|
410
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
411
|
+
* function.
|
|
412
|
+
*
|
|
413
|
+
* @param { ChannelsSenderListInstanceOptions } [params] - Options for request
|
|
414
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
415
|
+
*/
|
|
416
|
+
list(params: ChannelsSenderListInstanceOptions, callback?: (error: Error | null, items: ChannelsSenderInstance[]) => any): Promise<ChannelsSenderInstance[]>;
|
|
417
|
+
/**
|
|
418
|
+
* Retrieve a single page of ChannelsSenderInstance records from the API.
|
|
419
|
+
*
|
|
420
|
+
* The request is executed immediately.
|
|
421
|
+
*
|
|
422
|
+
* If a function is passed as the first argument, it will be used as the callback
|
|
423
|
+
* function.
|
|
424
|
+
*
|
|
425
|
+
* @param { ChannelsSenderListInstancePageOptions } [params] - Options for request
|
|
426
|
+
* @param { function } [callback] - Callback to handle list of records
|
|
427
|
+
*/
|
|
428
|
+
page(params: ChannelsSenderListInstancePageOptions, callback?: (error: Error | null, items: ChannelsSenderPage) => any): Promise<ChannelsSenderPage>;
|
|
429
|
+
/**
|
|
430
|
+
* Provide a user-friendly representation
|
|
431
|
+
*/
|
|
432
|
+
toJSON(): any;
|
|
433
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
434
|
+
}
|
|
435
|
+
export declare function ChannelsSenderListInstance(version: V2): ChannelsSenderListInstance;
|
|
436
|
+
export declare class ChannelsSenderPage extends Page<V2, ChannelsSenderPayload, ChannelsSenderResource, ChannelsSenderInstance> {
|
|
437
|
+
/**
|
|
438
|
+
* Initialize the ChannelsSenderPage
|
|
439
|
+
*
|
|
440
|
+
* @param version - Version of the resource
|
|
441
|
+
* @param response - Response from the API
|
|
442
|
+
* @param solution - Path solution
|
|
443
|
+
*/
|
|
444
|
+
constructor(version: V2, response: Response<string>, solution: ChannelsSenderSolution);
|
|
445
|
+
/**
|
|
446
|
+
* Build an instance of ChannelsSenderInstance
|
|
447
|
+
*
|
|
448
|
+
* @param payload - Payload response from the API
|
|
449
|
+
*/
|
|
450
|
+
getInstance(payload: ChannelsSenderResource): ChannelsSenderInstance;
|
|
451
|
+
[inspect.custom](depth: any, options: InspectOptions): string;
|
|
452
|
+
}
|
|
453
|
+
export {};
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Messaging
|
|
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.ChannelsSenderPage = exports.ChannelsSenderListInstance = exports.ChannelsSenderInstance = exports.ChannelsSenderContextImpl = exports.MessagingV2ChannelsSenderWebhook = exports.MessagingV2ChannelsSenderRequestsUpdate = exports.MessagingV2ChannelsSenderRequestsCreate = exports.MessagingV2ChannelsSenderProperties = exports.MessagingV2ChannelsSenderProfileWebsites = exports.MessagingV2ChannelsSenderProfileEmails = exports.MessagingV2ChannelsSenderProfile = exports.MessagingV2ChannelsSenderOfflineReasonsItems = exports.MessagingV2ChannelsSenderConfiguration = 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
|
+
/**
|
|
26
|
+
* Configuration settings for creating a sender, e.g., {\"waba_id\": \"1234567890\", \"verification_method\": \"sms\"}
|
|
27
|
+
*/
|
|
28
|
+
class MessagingV2ChannelsSenderConfiguration {
|
|
29
|
+
}
|
|
30
|
+
exports.MessagingV2ChannelsSenderConfiguration = MessagingV2ChannelsSenderConfiguration;
|
|
31
|
+
class MessagingV2ChannelsSenderOfflineReasonsItems {
|
|
32
|
+
}
|
|
33
|
+
exports.MessagingV2ChannelsSenderOfflineReasonsItems = MessagingV2ChannelsSenderOfflineReasonsItems;
|
|
34
|
+
/**
|
|
35
|
+
* Sender profile specific configurations, e.g., {\"name\": \"xxx\", \"about\": \"xxx\", \"address\": \"xxx\", \"description\": \"xxx\", \"email\": \"xxx@xxx\", \"logo_url\": \"https://xxx\", \"vertical\": \"xxx\", \"websites\": [\"https://xxx\", \"...\"]}
|
|
36
|
+
*/
|
|
37
|
+
class MessagingV2ChannelsSenderProfile {
|
|
38
|
+
}
|
|
39
|
+
exports.MessagingV2ChannelsSenderProfile = MessagingV2ChannelsSenderProfile;
|
|
40
|
+
class MessagingV2ChannelsSenderProfileEmails {
|
|
41
|
+
}
|
|
42
|
+
exports.MessagingV2ChannelsSenderProfileEmails = MessagingV2ChannelsSenderProfileEmails;
|
|
43
|
+
class MessagingV2ChannelsSenderProfileWebsites {
|
|
44
|
+
}
|
|
45
|
+
exports.MessagingV2ChannelsSenderProfileWebsites = MessagingV2ChannelsSenderProfileWebsites;
|
|
46
|
+
/**
|
|
47
|
+
* Sender specific additional properties, e.g., {\"quality_rating\": \"HIGH\", \"messaging_limit\": \"10K Customers/24hr\"}
|
|
48
|
+
*/
|
|
49
|
+
class MessagingV2ChannelsSenderProperties {
|
|
50
|
+
}
|
|
51
|
+
exports.MessagingV2ChannelsSenderProperties = MessagingV2ChannelsSenderProperties;
|
|
52
|
+
class MessagingV2ChannelsSenderRequestsCreate {
|
|
53
|
+
}
|
|
54
|
+
exports.MessagingV2ChannelsSenderRequestsCreate = MessagingV2ChannelsSenderRequestsCreate;
|
|
55
|
+
class MessagingV2ChannelsSenderRequestsUpdate {
|
|
56
|
+
}
|
|
57
|
+
exports.MessagingV2ChannelsSenderRequestsUpdate = MessagingV2ChannelsSenderRequestsUpdate;
|
|
58
|
+
/**
|
|
59
|
+
* Webhook specific configurations, e.g., {\"callback_url\": \"https://xxx\", \"callback_method\": \"POST\", \"fallback_url\": \"https://xxx\", \"fallback_method\": \"POST\", \"status_callback_url\": \"https://xxx\", \"status_callback_method\": \"POST\"}
|
|
60
|
+
*/
|
|
61
|
+
class MessagingV2ChannelsSenderWebhook {
|
|
62
|
+
}
|
|
63
|
+
exports.MessagingV2ChannelsSenderWebhook = MessagingV2ChannelsSenderWebhook;
|
|
64
|
+
class ChannelsSenderContextImpl {
|
|
65
|
+
constructor(_version, sid) {
|
|
66
|
+
this._version = _version;
|
|
67
|
+
if (!(0, utility_1.isValidPathParam)(sid)) {
|
|
68
|
+
throw new Error("Parameter 'sid' is not valid.");
|
|
69
|
+
}
|
|
70
|
+
this._solution = { sid };
|
|
71
|
+
this._uri = `/Channels/Senders/${sid}`;
|
|
72
|
+
}
|
|
73
|
+
remove(callback) {
|
|
74
|
+
const headers = {};
|
|
75
|
+
const instance = this;
|
|
76
|
+
let operationVersion = instance._version, operationPromise = operationVersion.remove({
|
|
77
|
+
uri: instance._uri,
|
|
78
|
+
method: "delete",
|
|
79
|
+
headers,
|
|
80
|
+
});
|
|
81
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
82
|
+
return operationPromise;
|
|
83
|
+
}
|
|
84
|
+
fetch(callback) {
|
|
85
|
+
const headers = {};
|
|
86
|
+
headers["Accept"] = "application/json";
|
|
87
|
+
const instance = this;
|
|
88
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
89
|
+
uri: instance._uri,
|
|
90
|
+
method: "get",
|
|
91
|
+
headers,
|
|
92
|
+
});
|
|
93
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderInstance(operationVersion, payload, instance._solution.sid));
|
|
94
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
95
|
+
return operationPromise;
|
|
96
|
+
}
|
|
97
|
+
update(params, headers, callback) {
|
|
98
|
+
if (params instanceof Function) {
|
|
99
|
+
callback = params;
|
|
100
|
+
params = {};
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
params = params || {};
|
|
104
|
+
}
|
|
105
|
+
let data = {};
|
|
106
|
+
data = params;
|
|
107
|
+
if (headers === null || headers === undefined) {
|
|
108
|
+
headers = {};
|
|
109
|
+
}
|
|
110
|
+
headers["Content-Type"] = "application/json";
|
|
111
|
+
headers["Accept"] = "application/json";
|
|
112
|
+
const instance = this;
|
|
113
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
114
|
+
uri: instance._uri,
|
|
115
|
+
method: "post",
|
|
116
|
+
data,
|
|
117
|
+
headers,
|
|
118
|
+
});
|
|
119
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderInstance(operationVersion, payload, instance._solution.sid));
|
|
120
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
121
|
+
return operationPromise;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Provide a user-friendly representation
|
|
125
|
+
*
|
|
126
|
+
* @returns Object
|
|
127
|
+
*/
|
|
128
|
+
toJSON() {
|
|
129
|
+
return this._solution;
|
|
130
|
+
}
|
|
131
|
+
[util_1.inspect.custom](_depth, options) {
|
|
132
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.ChannelsSenderContextImpl = ChannelsSenderContextImpl;
|
|
136
|
+
class ChannelsSenderInstance {
|
|
137
|
+
constructor(_version, payload, sid) {
|
|
138
|
+
this._version = _version;
|
|
139
|
+
this.sid = payload.sid;
|
|
140
|
+
this.status = payload.status;
|
|
141
|
+
this.senderId = payload.sender_id;
|
|
142
|
+
this.configuration = payload.configuration;
|
|
143
|
+
this.webhook = payload.webhook;
|
|
144
|
+
this.profile = payload.profile;
|
|
145
|
+
this.properties = payload.properties;
|
|
146
|
+
this.offlineReasons = payload.offline_reasons;
|
|
147
|
+
this.url = payload.url;
|
|
148
|
+
this._solution = { sid: sid || this.sid };
|
|
149
|
+
}
|
|
150
|
+
get _proxy() {
|
|
151
|
+
this._context =
|
|
152
|
+
this._context ||
|
|
153
|
+
new ChannelsSenderContextImpl(this._version, this._solution.sid);
|
|
154
|
+
return this._context;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Remove a ChannelsSenderInstance
|
|
158
|
+
*
|
|
159
|
+
* @param callback - Callback to handle processed record
|
|
160
|
+
*
|
|
161
|
+
* @returns Resolves to processed boolean
|
|
162
|
+
*/
|
|
163
|
+
remove(callback) {
|
|
164
|
+
return this._proxy.remove(callback);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Fetch a ChannelsSenderInstance
|
|
168
|
+
*
|
|
169
|
+
* @param callback - Callback to handle processed record
|
|
170
|
+
*
|
|
171
|
+
* @returns Resolves to processed ChannelsSenderInstance
|
|
172
|
+
*/
|
|
173
|
+
fetch(callback) {
|
|
174
|
+
return this._proxy.fetch(callback);
|
|
175
|
+
}
|
|
176
|
+
update(params, callback) {
|
|
177
|
+
return this._proxy.update(params, callback);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Provide a user-friendly representation
|
|
181
|
+
*
|
|
182
|
+
* @returns Object
|
|
183
|
+
*/
|
|
184
|
+
toJSON() {
|
|
185
|
+
return {
|
|
186
|
+
sid: this.sid,
|
|
187
|
+
status: this.status,
|
|
188
|
+
senderId: this.senderId,
|
|
189
|
+
configuration: this.configuration,
|
|
190
|
+
webhook: this.webhook,
|
|
191
|
+
profile: this.profile,
|
|
192
|
+
properties: this.properties,
|
|
193
|
+
offlineReasons: this.offlineReasons,
|
|
194
|
+
url: this.url,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
[util_1.inspect.custom](_depth, options) {
|
|
198
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.ChannelsSenderInstance = ChannelsSenderInstance;
|
|
202
|
+
function ChannelsSenderListInstance(version) {
|
|
203
|
+
const instance = ((sid) => instance.get(sid));
|
|
204
|
+
instance.get = function get(sid) {
|
|
205
|
+
return new ChannelsSenderContextImpl(version, sid);
|
|
206
|
+
};
|
|
207
|
+
instance._version = version;
|
|
208
|
+
instance._solution = {};
|
|
209
|
+
instance._uri = `/Channels/Senders`;
|
|
210
|
+
instance.create = function create(params, headers, callback) {
|
|
211
|
+
if (params === null || params === undefined) {
|
|
212
|
+
throw new Error('Required parameter "params" missing.');
|
|
213
|
+
}
|
|
214
|
+
let data = {};
|
|
215
|
+
data = params;
|
|
216
|
+
if (headers === null || headers === undefined) {
|
|
217
|
+
headers = {};
|
|
218
|
+
}
|
|
219
|
+
headers["Content-Type"] = "application/json";
|
|
220
|
+
headers["Accept"] = "application/json";
|
|
221
|
+
let operationVersion = version, operationPromise = operationVersion.create({
|
|
222
|
+
uri: instance._uri,
|
|
223
|
+
method: "post",
|
|
224
|
+
data,
|
|
225
|
+
headers,
|
|
226
|
+
});
|
|
227
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderInstance(operationVersion, payload));
|
|
228
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
229
|
+
return operationPromise;
|
|
230
|
+
};
|
|
231
|
+
instance.page = function page(params, callback) {
|
|
232
|
+
if (params === null || params === undefined) {
|
|
233
|
+
throw new Error('Required parameter "params" missing.');
|
|
234
|
+
}
|
|
235
|
+
if (params["channel"] === null || params["channel"] === undefined) {
|
|
236
|
+
throw new Error("Required parameter \"params['channel']\" missing.");
|
|
237
|
+
}
|
|
238
|
+
let data = {};
|
|
239
|
+
data["Channel"] = params["channel"];
|
|
240
|
+
if (params["pageSize"] !== undefined)
|
|
241
|
+
data["PageSize"] = params["pageSize"];
|
|
242
|
+
if (params.pageNumber !== undefined)
|
|
243
|
+
data["Page"] = params.pageNumber;
|
|
244
|
+
if (params.pageToken !== undefined)
|
|
245
|
+
data["PageToken"] = params.pageToken;
|
|
246
|
+
const headers = {};
|
|
247
|
+
headers["Accept"] = "application/json";
|
|
248
|
+
let operationVersion = version, operationPromise = operationVersion.page({
|
|
249
|
+
uri: instance._uri,
|
|
250
|
+
method: "get",
|
|
251
|
+
params: data,
|
|
252
|
+
headers,
|
|
253
|
+
});
|
|
254
|
+
operationPromise = operationPromise.then((payload) => new ChannelsSenderPage(operationVersion, payload, instance._solution));
|
|
255
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
256
|
+
return operationPromise;
|
|
257
|
+
};
|
|
258
|
+
instance.each = instance._version.each;
|
|
259
|
+
instance.list = instance._version.list;
|
|
260
|
+
instance.getPage = function getPage(targetUrl, callback) {
|
|
261
|
+
const operationPromise = instance._version._domain.twilio.request({
|
|
262
|
+
method: "get",
|
|
263
|
+
uri: targetUrl,
|
|
264
|
+
});
|
|
265
|
+
let pagePromise = operationPromise.then((payload) => new ChannelsSenderPage(instance._version, payload, instance._solution));
|
|
266
|
+
pagePromise = instance._version.setPromiseCallback(pagePromise, callback);
|
|
267
|
+
return pagePromise;
|
|
268
|
+
};
|
|
269
|
+
instance.toJSON = function toJSON() {
|
|
270
|
+
return instance._solution;
|
|
271
|
+
};
|
|
272
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
273
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
274
|
+
};
|
|
275
|
+
return instance;
|
|
276
|
+
}
|
|
277
|
+
exports.ChannelsSenderListInstance = ChannelsSenderListInstance;
|
|
278
|
+
class ChannelsSenderPage extends Page_1.default {
|
|
279
|
+
/**
|
|
280
|
+
* Initialize the ChannelsSenderPage
|
|
281
|
+
*
|
|
282
|
+
* @param version - Version of the resource
|
|
283
|
+
* @param response - Response from the API
|
|
284
|
+
* @param solution - Path solution
|
|
285
|
+
*/
|
|
286
|
+
constructor(version, response, solution) {
|
|
287
|
+
super(version, response, solution);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Build an instance of ChannelsSenderInstance
|
|
291
|
+
*
|
|
292
|
+
* @param payload - Payload response from the API
|
|
293
|
+
*/
|
|
294
|
+
getInstance(payload) {
|
|
295
|
+
return new ChannelsSenderInstance(this._version, payload);
|
|
296
|
+
}
|
|
297
|
+
[util_1.inspect.custom](depth, options) {
|
|
298
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
exports.ChannelsSenderPage = ChannelsSenderPage;
|
package/lib/rest/numbers/V1.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { PortingPortInPhoneNumberListInstance } from "./v1/portingPortInPhoneNum
|
|
|
7
7
|
import { PortingPortabilityListInstance } from "./v1/portingPortability";
|
|
8
8
|
import { PortingWebhookConfigurationListInstance } from "./v1/portingWebhookConfiguration";
|
|
9
9
|
import { PortingWebhookConfigurationDeleteListInstance } from "./v1/portingWebhookConfigurationDelete";
|
|
10
|
+
import { PortingWebhookConfigurationFetchListInstance } from "./v1/portingWebhookConfigurationFetch";
|
|
10
11
|
import { SigningRequestConfigurationListInstance } from "./v1/signingRequestConfiguration";
|
|
11
|
-
import { WebhookListInstance } from "./v1/webhook";
|
|
12
12
|
export default class V1 extends Version {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize the V1 version of Numbers
|
|
@@ -30,10 +30,10 @@ export default class V1 extends Version {
|
|
|
30
30
|
protected _portingWebhookConfigurations?: PortingWebhookConfigurationListInstance;
|
|
31
31
|
/** portingWebhookConfigurationsDelete - { Twilio.Numbers.V1.PortingWebhookConfigurationDeleteListInstance } resource */
|
|
32
32
|
protected _portingWebhookConfigurationsDelete?: PortingWebhookConfigurationDeleteListInstance;
|
|
33
|
+
/** portingWebhookConfigurationFetch - { Twilio.Numbers.V1.PortingWebhookConfigurationFetchListInstance } resource */
|
|
34
|
+
protected _portingWebhookConfigurationFetch?: PortingWebhookConfigurationFetchListInstance;
|
|
33
35
|
/** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
|
|
34
36
|
protected _signingRequestConfigurations?: SigningRequestConfigurationListInstance;
|
|
35
|
-
/** webhook - { Twilio.Numbers.V1.WebhookListInstance } resource */
|
|
36
|
-
protected _webhook?: WebhookListInstance;
|
|
37
37
|
/** Getter for bulkEligibilities resource */
|
|
38
38
|
get bulkEligibilities(): BulkEligibilityListInstance;
|
|
39
39
|
/** Getter for eligibilities resource */
|
|
@@ -48,8 +48,8 @@ export default class V1 extends Version {
|
|
|
48
48
|
get portingWebhookConfigurations(): PortingWebhookConfigurationListInstance;
|
|
49
49
|
/** Getter for portingWebhookConfigurationsDelete resource */
|
|
50
50
|
get portingWebhookConfigurationsDelete(): PortingWebhookConfigurationDeleteListInstance;
|
|
51
|
+
/** Getter for portingWebhookConfigurationFetch resource */
|
|
52
|
+
get portingWebhookConfigurationFetch(): PortingWebhookConfigurationFetchListInstance;
|
|
51
53
|
/** Getter for signingRequestConfigurations resource */
|
|
52
54
|
get signingRequestConfigurations(): SigningRequestConfigurationListInstance;
|
|
53
|
-
/** Getter for webhook resource */
|
|
54
|
-
get webhook(): WebhookListInstance;
|
|
55
55
|
}
|
package/lib/rest/numbers/V1.js
CHANGED
|
@@ -24,8 +24,8 @@ const portingPortInPhoneNumber_1 = require("./v1/portingPortInPhoneNumber");
|
|
|
24
24
|
const portingPortability_1 = require("./v1/portingPortability");
|
|
25
25
|
const portingWebhookConfiguration_1 = require("./v1/portingWebhookConfiguration");
|
|
26
26
|
const portingWebhookConfigurationDelete_1 = require("./v1/portingWebhookConfigurationDelete");
|
|
27
|
+
const portingWebhookConfigurationFetch_1 = require("./v1/portingWebhookConfigurationFetch");
|
|
27
28
|
const signingRequestConfiguration_1 = require("./v1/signingRequestConfiguration");
|
|
28
|
-
const webhook_1 = require("./v1/webhook");
|
|
29
29
|
class V1 extends Version_1.default {
|
|
30
30
|
/**
|
|
31
31
|
* Initialize the V1 version of Numbers
|
|
@@ -79,6 +79,13 @@ class V1 extends Version_1.default {
|
|
|
79
79
|
(0, portingWebhookConfigurationDelete_1.PortingWebhookConfigurationDeleteListInstance)(this);
|
|
80
80
|
return this._portingWebhookConfigurationsDelete;
|
|
81
81
|
}
|
|
82
|
+
/** Getter for portingWebhookConfigurationFetch resource */
|
|
83
|
+
get portingWebhookConfigurationFetch() {
|
|
84
|
+
this._portingWebhookConfigurationFetch =
|
|
85
|
+
this._portingWebhookConfigurationFetch ||
|
|
86
|
+
(0, portingWebhookConfigurationFetch_1.PortingWebhookConfigurationFetchListInstance)(this);
|
|
87
|
+
return this._portingWebhookConfigurationFetch;
|
|
88
|
+
}
|
|
82
89
|
/** Getter for signingRequestConfigurations resource */
|
|
83
90
|
get signingRequestConfigurations() {
|
|
84
91
|
this._signingRequestConfigurations =
|
|
@@ -86,10 +93,5 @@ class V1 extends Version_1.default {
|
|
|
86
93
|
(0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
|
|
87
94
|
return this._signingRequestConfigurations;
|
|
88
95
|
}
|
|
89
|
-
/** Getter for webhook resource */
|
|
90
|
-
get webhook() {
|
|
91
|
-
this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
|
|
92
|
-
return this._webhook;
|
|
93
|
-
}
|
|
94
96
|
}
|
|
95
97
|
exports.default = V1;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../V1";
|
|
4
|
-
export interface
|
|
4
|
+
export interface PortingWebhookConfigurationFetchSolution {
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface PortingWebhookConfigurationFetchListInstance {
|
|
7
7
|
_version: V1;
|
|
8
|
-
_solution:
|
|
8
|
+
_solution: PortingWebhookConfigurationFetchSolution;
|
|
9
9
|
_uri: string;
|
|
10
10
|
/**
|
|
11
|
-
* Fetch a
|
|
11
|
+
* Fetch a PortingWebhookConfigurationFetchInstance
|
|
12
12
|
*
|
|
13
13
|
* @param callback - Callback to handle processed record
|
|
14
14
|
*
|
|
15
|
-
* @returns Resolves to processed
|
|
15
|
+
* @returns Resolves to processed PortingWebhookConfigurationFetchInstance
|
|
16
16
|
*/
|
|
17
|
-
fetch(callback?: (error: Error | null, item?:
|
|
17
|
+
fetch(callback?: (error: Error | null, item?: PortingWebhookConfigurationFetchInstance) => any): Promise<PortingWebhookConfigurationFetchInstance>;
|
|
18
18
|
/**
|
|
19
19
|
* Provide a user-friendly representation
|
|
20
20
|
*/
|
|
21
21
|
toJSON(): any;
|
|
22
22
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
23
23
|
}
|
|
24
|
-
export declare function
|
|
25
|
-
interface
|
|
24
|
+
export declare function PortingWebhookConfigurationFetchListInstance(version: V1): PortingWebhookConfigurationFetchListInstance;
|
|
25
|
+
interface PortingWebhookConfigurationFetchResource {
|
|
26
26
|
url: string;
|
|
27
27
|
port_in_target_url: string;
|
|
28
28
|
port_out_target_url: string;
|
|
@@ -30,9 +30,9 @@ interface WebhookResource {
|
|
|
30
30
|
port_in_target_date_created: Date;
|
|
31
31
|
port_out_target_date_created: Date;
|
|
32
32
|
}
|
|
33
|
-
export declare class
|
|
33
|
+
export declare class PortingWebhookConfigurationFetchInstance {
|
|
34
34
|
protected _version: V1;
|
|
35
|
-
constructor(_version: V1, payload:
|
|
35
|
+
constructor(_version: V1, payload: PortingWebhookConfigurationFetchResource);
|
|
36
36
|
/**
|
|
37
37
|
* The URL of the webhook configuration request
|
|
38
38
|
*/
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.PortingWebhookConfigurationFetchInstance = exports.PortingWebhookConfigurationFetchListInstance = void 0;
|
|
17
17
|
const util_1 = require("util");
|
|
18
18
|
const deserialize = require("../../../base/deserialize");
|
|
19
19
|
const serialize = require("../../../base/serialize");
|
|
20
|
-
function
|
|
20
|
+
function PortingWebhookConfigurationFetchListInstance(version) {
|
|
21
21
|
const instance = {};
|
|
22
22
|
instance._version = version;
|
|
23
23
|
instance._solution = {};
|
|
@@ -30,7 +30,7 @@ function WebhookListInstance(version) {
|
|
|
30
30
|
method: "get",
|
|
31
31
|
headers,
|
|
32
32
|
});
|
|
33
|
-
operationPromise = operationPromise.then((payload) => new
|
|
33
|
+
operationPromise = operationPromise.then((payload) => new PortingWebhookConfigurationFetchInstance(operationVersion, payload));
|
|
34
34
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
35
35
|
return operationPromise;
|
|
36
36
|
};
|
|
@@ -42,8 +42,8 @@ function WebhookListInstance(version) {
|
|
|
42
42
|
};
|
|
43
43
|
return instance;
|
|
44
44
|
}
|
|
45
|
-
exports.
|
|
46
|
-
class
|
|
45
|
+
exports.PortingWebhookConfigurationFetchListInstance = PortingWebhookConfigurationFetchListInstance;
|
|
46
|
+
class PortingWebhookConfigurationFetchInstance {
|
|
47
47
|
constructor(_version, payload) {
|
|
48
48
|
this._version = _version;
|
|
49
49
|
this.url = payload.url;
|
|
@@ -72,4 +72,4 @@ class WebhookInstance {
|
|
|
72
72
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
exports.
|
|
75
|
+
exports.PortingWebhookConfigurationFetchInstance = PortingWebhookConfigurationFetchInstance;
|
|
@@ -7,7 +7,7 @@ import { BuildStatusListInstance } from "./build/buildStatus";
|
|
|
7
7
|
/**
|
|
8
8
|
* The Runtime version that will be used to run the Build resource when it is deployed.
|
|
9
9
|
*/
|
|
10
|
-
export type BuildRuntime = "node8" | "node10" | "node12" | "node14" | "node16" | "node18";
|
|
10
|
+
export type BuildRuntime = "node8" | "node10" | "node12" | "node14" | "node16" | "node18" | "node20" | "node22";
|
|
11
11
|
/**
|
|
12
12
|
* The status of the Build. Can be: `building`, `completed`, or `failed`.
|
|
13
13
|
*/
|
|
@@ -34,12 +34,16 @@ export interface RoomListInstanceCreateOptions {
|
|
|
34
34
|
maxParticipants?: number;
|
|
35
35
|
/** Whether to start recording when Participants connect. */
|
|
36
36
|
recordParticipantsOnConnect?: boolean;
|
|
37
|
+
/** Whether to start transcriptions when Participants connect. If TranscriptionsConfiguration is not provided, default settings will be used. */
|
|
38
|
+
transcribeParticipantsOnConnect?: boolean;
|
|
37
39
|
/** An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. */
|
|
38
40
|
videoCodecs?: Array<RoomVideoCodec>;
|
|
39
41
|
/** The region for the Room\\\'s media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers). */
|
|
40
42
|
mediaRegion?: string;
|
|
41
43
|
/** A collection of Recording Rules that describe how to include or exclude matching tracks for recording */
|
|
42
44
|
recordingRules?: object;
|
|
45
|
+
/** A collection of properties that describe transcription behaviour. If TranscribeParticipantsOnConnect is set to true and TranscriptionsConfiguration is not provided, default settings will be used. */
|
|
46
|
+
transcriptionsConfiguration?: object;
|
|
43
47
|
/** When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. */
|
|
44
48
|
audioOnly?: boolean;
|
|
45
49
|
/** The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours). */
|
|
@@ -235,12 +235,16 @@ function RoomListInstance(version) {
|
|
|
235
235
|
data["MaxParticipants"] = params["maxParticipants"];
|
|
236
236
|
if (params["recordParticipantsOnConnect"] !== undefined)
|
|
237
237
|
data["RecordParticipantsOnConnect"] = serialize.bool(params["recordParticipantsOnConnect"]);
|
|
238
|
+
if (params["transcribeParticipantsOnConnect"] !== undefined)
|
|
239
|
+
data["TranscribeParticipantsOnConnect"] = serialize.bool(params["transcribeParticipantsOnConnect"]);
|
|
238
240
|
if (params["videoCodecs"] !== undefined)
|
|
239
241
|
data["VideoCodecs"] = serialize.map(params["videoCodecs"], (e) => e);
|
|
240
242
|
if (params["mediaRegion"] !== undefined)
|
|
241
243
|
data["MediaRegion"] = params["mediaRegion"];
|
|
242
244
|
if (params["recordingRules"] !== undefined)
|
|
243
245
|
data["RecordingRules"] = serialize.object(params["recordingRules"]);
|
|
246
|
+
if (params["transcriptionsConfiguration"] !== undefined)
|
|
247
|
+
data["TranscriptionsConfiguration"] = serialize.object(params["transcriptionsConfiguration"]);
|
|
244
248
|
if (params["audioOnly"] !== undefined)
|
|
245
249
|
data["AudioOnly"] = serialize.bool(params["audioOnly"]);
|
|
246
250
|
if (params["maxParticipantDuration"] !== undefined)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio",
|
|
3
3
|
"description": "A Twilio helper library",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.6.0",
|
|
5
5
|
"author": "API Team <api@twilio.com>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
{
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/twilio/twilio-node.git"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"axios": "^1.
|
|
23
|
+
"axios": "^1.8.3",
|
|
24
24
|
"dayjs": "^1.11.9",
|
|
25
25
|
"https-proxy-agent": "^5.0.0",
|
|
26
26
|
"jsonwebtoken": "^9.0.2",
|