twilio 5.2.1 → 5.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/rest/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";
|
|
11
10
|
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;
|
|
35
33
|
/** signingRequestConfigurations - { Twilio.Numbers.V1.SigningRequestConfigurationListInstance } resource */
|
|
36
34
|
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;
|
|
53
51
|
/** Getter for signingRequestConfigurations resource */
|
|
54
52
|
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");
|
|
28
27
|
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,13 +79,6 @@ 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
|
-
}
|
|
89
82
|
/** Getter for signingRequestConfigurations resource */
|
|
90
83
|
get signingRequestConfigurations() {
|
|
91
84
|
this._signingRequestConfigurations =
|
|
@@ -93,5 +86,10 @@ class V1 extends Version_1.default {
|
|
|
93
86
|
(0, signingRequestConfiguration_1.SigningRequestConfigurationListInstance)(this);
|
|
94
87
|
return this._signingRequestConfigurations;
|
|
95
88
|
}
|
|
89
|
+
/** Getter for webhook resource */
|
|
90
|
+
get webhook() {
|
|
91
|
+
this._webhook = this._webhook || (0, webhook_1.WebhookListInstance)(this);
|
|
92
|
+
return this._webhook;
|
|
93
|
+
}
|
|
96
94
|
}
|
|
97
95
|
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 WebhookSolution {
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface WebhookListInstance {
|
|
7
7
|
_version: V1;
|
|
8
|
-
_solution:
|
|
8
|
+
_solution: WebhookSolution;
|
|
9
9
|
_uri: string;
|
|
10
10
|
/**
|
|
11
|
-
* Fetch a
|
|
11
|
+
* Fetch a WebhookInstance
|
|
12
12
|
*
|
|
13
13
|
* @param callback - Callback to handle processed record
|
|
14
14
|
*
|
|
15
|
-
* @returns Resolves to processed
|
|
15
|
+
* @returns Resolves to processed WebhookInstance
|
|
16
16
|
*/
|
|
17
|
-
fetch(callback?: (error: Error | null, item?:
|
|
17
|
+
fetch(callback?: (error: Error | null, item?: WebhookInstance) => any): Promise<WebhookInstance>;
|
|
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 WebhookListInstance(version: V1): WebhookListInstance;
|
|
25
|
+
interface WebhookResource {
|
|
26
26
|
url: string;
|
|
27
27
|
port_in_target_url: string;
|
|
28
28
|
port_out_target_url: string;
|
|
@@ -30,9 +30,9 @@ interface PortingWebhookConfigurationFetchResource {
|
|
|
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 WebhookInstance {
|
|
34
34
|
protected _version: V1;
|
|
35
|
-
constructor(_version: V1, payload:
|
|
35
|
+
constructor(_version: V1, payload: WebhookResource);
|
|
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.WebhookInstance = exports.WebhookListInstance = 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 WebhookListInstance(version) {
|
|
21
21
|
const instance = {};
|
|
22
22
|
instance._version = version;
|
|
23
23
|
instance._solution = {};
|
|
@@ -27,7 +27,7 @@ function PortingWebhookConfigurationFetchListInstance(version) {
|
|
|
27
27
|
uri: instance._uri,
|
|
28
28
|
method: "get",
|
|
29
29
|
});
|
|
30
|
-
operationPromise = operationPromise.then((payload) => new
|
|
30
|
+
operationPromise = operationPromise.then((payload) => new WebhookInstance(operationVersion, payload));
|
|
31
31
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
32
32
|
return operationPromise;
|
|
33
33
|
};
|
|
@@ -39,8 +39,8 @@ function PortingWebhookConfigurationFetchListInstance(version) {
|
|
|
39
39
|
};
|
|
40
40
|
return instance;
|
|
41
41
|
}
|
|
42
|
-
exports.
|
|
43
|
-
class
|
|
42
|
+
exports.WebhookListInstance = WebhookListInstance;
|
|
43
|
+
class WebhookInstance {
|
|
44
44
|
constructor(_version, payload) {
|
|
45
45
|
this._version = _version;
|
|
46
46
|
this.url = payload.url;
|
|
@@ -69,4 +69,4 @@ class PortingWebhookConfigurationFetchInstance {
|
|
|
69
69
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
exports.
|
|
72
|
+
exports.WebhookInstance = WebhookInstance;
|