twilio 5.3.2 → 5.3.4
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/RequestClient.d.ts +1 -0
- package/lib/rest/PreviewBase.d.ts +0 -3
- package/lib/rest/PreviewBase.js +0 -6
- package/lib/rest/iam/V1.d.ts +5 -5
- package/lib/rest/iam/V1.js +5 -5
- package/lib/rest/iam/v1/{newApiKey.d.ts → key.d.ts} +14 -14
- package/lib/rest/iam/v1/{newApiKey.js → key.js} +6 -6
- package/lib/rest/messaging/V1.d.ts +5 -0
- package/lib/rest/messaging/V1.js +7 -0
- package/lib/rest/messaging/v1/requestManagedCert.d.ts +127 -0
- package/lib/rest/messaging/v1/requestManagedCert.js +122 -0
- package/lib/rest/numbers/v1/portingPortability.d.ts +2 -0
- package/lib/rest/numbers/v1/portingPortability.js +2 -0
- package/lib/rest/taskrouter/v1/workspace/task.d.ts +2 -2
- package/lib/rest/verify/v2/service/verification.d.ts +2 -0
- package/lib/rest/verify/v2/service/verification.js +2 -0
- package/lib/rest/verify/v2/service/verificationCheck.d.ts +2 -0
- package/lib/rest/verify/v2/service/verificationCheck.js +2 -0
- package/lib/rest/video/v1/room.d.ts +14 -14
- package/lib/webhooks/webhooks.d.ts +1 -0
- package/package.json +1 -1
- package/lib/rest/preview/DeployedDevices.d.ts +0 -15
- package/lib/rest/preview/DeployedDevices.js +0 -36
- package/lib/rest/preview/deployed_devices/fleet/certificate.d.ts +0 -324
- package/lib/rest/preview/deployed_devices/fleet/certificate.js +0 -269
- package/lib/rest/preview/deployed_devices/fleet/deployment.d.ts +0 -318
- package/lib/rest/preview/deployed_devices/fleet/deployment.js +0 -264
- package/lib/rest/preview/deployed_devices/fleet/device.d.ts +0 -358
- package/lib/rest/preview/deployed_devices/fleet/device.js +0 -284
- package/lib/rest/preview/deployed_devices/fleet/key.d.ts +0 -330
- package/lib/rest/preview/deployed_devices/fleet/key.js +0 -268
- package/lib/rest/preview/deployed_devices/fleet.d.ts +0 -352
- package/lib/rest/preview/deployed_devices/fleet.js +0 -307
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import Domain from "../base/Domain";
|
|
2
|
-
import DeployedDevices from "./preview/DeployedDevices";
|
|
3
2
|
import HostedNumbers from "./preview/HostedNumbers";
|
|
4
3
|
import Sync from "./preview/Sync";
|
|
5
4
|
import Marketplace from "./preview/Marketplace";
|
|
6
5
|
import Wireless from "./preview/Wireless";
|
|
7
6
|
declare class PreviewBase extends Domain {
|
|
8
|
-
_deployed_devices?: DeployedDevices;
|
|
9
7
|
_hosted_numbers?: HostedNumbers;
|
|
10
8
|
_sync?: Sync;
|
|
11
9
|
_marketplace?: Marketplace;
|
|
@@ -16,7 +14,6 @@ declare class PreviewBase extends Domain {
|
|
|
16
14
|
* @param twilio - The twilio client
|
|
17
15
|
*/
|
|
18
16
|
constructor(twilio: any);
|
|
19
|
-
get deployed_devices(): DeployedDevices;
|
|
20
17
|
get hosted_numbers(): HostedNumbers;
|
|
21
18
|
get sync(): Sync;
|
|
22
19
|
get marketplace(): Marketplace;
|
package/lib/rest/PreviewBase.js
CHANGED
|
@@ -13,7 +13,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
|
-
const DeployedDevices_1 = __importDefault(require("./preview/DeployedDevices"));
|
|
17
16
|
const HostedNumbers_1 = __importDefault(require("./preview/HostedNumbers"));
|
|
18
17
|
const Sync_1 = __importDefault(require("./preview/Sync"));
|
|
19
18
|
const Marketplace_1 = __importDefault(require("./preview/Marketplace"));
|
|
@@ -27,11 +26,6 @@ class PreviewBase extends Domain_1.default {
|
|
|
27
26
|
constructor(twilio) {
|
|
28
27
|
super(twilio, "https://preview.twilio.com");
|
|
29
28
|
}
|
|
30
|
-
get deployed_devices() {
|
|
31
|
-
this._deployed_devices =
|
|
32
|
-
this._deployed_devices || new DeployedDevices_1.default(this);
|
|
33
|
-
return this._deployed_devices;
|
|
34
|
-
}
|
|
35
29
|
get hosted_numbers() {
|
|
36
30
|
this._hosted_numbers = this._hosted_numbers || new HostedNumbers_1.default(this);
|
|
37
31
|
return this._hosted_numbers;
|
package/lib/rest/iam/V1.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import IamBase from "../IamBase";
|
|
|
2
2
|
import Version from "../../base/Version";
|
|
3
3
|
import { ApiKeyListInstance } from "./v1/apiKey";
|
|
4
4
|
import { GetApiKeysListInstance } from "./v1/getApiKeys";
|
|
5
|
-
import {
|
|
5
|
+
import { KeyListInstance } from "./v1/key";
|
|
6
6
|
export default class V1 extends Version {
|
|
7
7
|
/**
|
|
8
8
|
* Initialize the V1 version of Iam
|
|
@@ -14,12 +14,12 @@ export default class V1 extends Version {
|
|
|
14
14
|
protected _apiKey?: ApiKeyListInstance;
|
|
15
15
|
/** getApiKeys - { Twilio.Iam.V1.GetApiKeysListInstance } resource */
|
|
16
16
|
protected _getApiKeys?: GetApiKeysListInstance;
|
|
17
|
-
/**
|
|
18
|
-
protected
|
|
17
|
+
/** keys - { Twilio.Iam.V1.KeyListInstance } resource */
|
|
18
|
+
protected _keys?: KeyListInstance;
|
|
19
19
|
/** Getter for apiKey resource */
|
|
20
20
|
get apiKey(): ApiKeyListInstance;
|
|
21
21
|
/** Getter for getApiKeys resource */
|
|
22
22
|
get getApiKeys(): GetApiKeysListInstance;
|
|
23
|
-
/** Getter for
|
|
24
|
-
get
|
|
23
|
+
/** Getter for keys resource */
|
|
24
|
+
get keys(): KeyListInstance;
|
|
25
25
|
}
|
package/lib/rest/iam/V1.js
CHANGED
|
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
19
19
|
const Version_1 = __importDefault(require("../../base/Version"));
|
|
20
20
|
const apiKey_1 = require("./v1/apiKey");
|
|
21
21
|
const getApiKeys_1 = require("./v1/getApiKeys");
|
|
22
|
-
const
|
|
22
|
+
const key_1 = require("./v1/key");
|
|
23
23
|
class V1 extends Version_1.default {
|
|
24
24
|
/**
|
|
25
25
|
* Initialize the V1 version of Iam
|
|
@@ -39,10 +39,10 @@ class V1 extends Version_1.default {
|
|
|
39
39
|
this._getApiKeys = this._getApiKeys || (0, getApiKeys_1.GetApiKeysListInstance)(this);
|
|
40
40
|
return this._getApiKeys;
|
|
41
41
|
}
|
|
42
|
-
/** Getter for
|
|
43
|
-
get
|
|
44
|
-
this.
|
|
45
|
-
return this.
|
|
42
|
+
/** Getter for keys resource */
|
|
43
|
+
get keys() {
|
|
44
|
+
this._keys = this._keys || (0, key_1.KeyListInstance)(this);
|
|
45
|
+
return this._keys;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
exports.default = V1;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { inspect, InspectOptions } from "util";
|
|
3
3
|
import V1 from "../V1";
|
|
4
|
-
export type
|
|
4
|
+
export type KeyKeytype = "restricted";
|
|
5
5
|
/**
|
|
6
|
-
* Options to pass to create a
|
|
6
|
+
* Options to pass to create a KeyInstance
|
|
7
7
|
*/
|
|
8
|
-
export interface
|
|
8
|
+
export interface KeyListInstanceCreateOptions {
|
|
9
9
|
/** The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Payments resource. */
|
|
10
10
|
accountSid: string;
|
|
11
11
|
/** A descriptive string that you create to describe the resource. It can be up to 64 characters long. */
|
|
12
12
|
friendlyName?: string;
|
|
13
13
|
/** */
|
|
14
|
-
keyType?:
|
|
14
|
+
keyType?: KeyKeytype;
|
|
15
15
|
/** The \\\\`Policy\\\\` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the [Twilio documentation](https://www.twilio.com/docs/iam/api-keys/restricted-api-keys#permissions-available-with-restricted-api-keys). */
|
|
16
16
|
policy?: any;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface KeySolution {
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface KeyListInstance {
|
|
21
21
|
_version: V1;
|
|
22
|
-
_solution:
|
|
22
|
+
_solution: KeySolution;
|
|
23
23
|
_uri: string;
|
|
24
24
|
/**
|
|
25
|
-
* Create a
|
|
25
|
+
* Create a KeyInstance
|
|
26
26
|
*
|
|
27
27
|
* @param params - Parameter for request
|
|
28
28
|
* @param callback - Callback to handle processed record
|
|
29
29
|
*
|
|
30
|
-
* @returns Resolves to processed
|
|
30
|
+
* @returns Resolves to processed KeyInstance
|
|
31
31
|
*/
|
|
32
|
-
create(params:
|
|
32
|
+
create(params: KeyListInstanceCreateOptions, callback?: (error: Error | null, item?: KeyInstance) => any): Promise<KeyInstance>;
|
|
33
33
|
/**
|
|
34
34
|
* Provide a user-friendly representation
|
|
35
35
|
*/
|
|
36
36
|
toJSON(): any;
|
|
37
37
|
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
38
38
|
}
|
|
39
|
-
export declare function
|
|
40
|
-
interface
|
|
39
|
+
export declare function KeyListInstance(version: V1): KeyListInstance;
|
|
40
|
+
interface KeyResource {
|
|
41
41
|
sid: string;
|
|
42
42
|
friendly_name: string;
|
|
43
43
|
date_created: Date;
|
|
@@ -45,9 +45,9 @@ interface NewApiKeyResource {
|
|
|
45
45
|
secret: string;
|
|
46
46
|
policy: any;
|
|
47
47
|
}
|
|
48
|
-
export declare class
|
|
48
|
+
export declare class KeyInstance {
|
|
49
49
|
protected _version: V1;
|
|
50
|
-
constructor(_version: V1, payload:
|
|
50
|
+
constructor(_version: V1, payload: KeyResource);
|
|
51
51
|
/**
|
|
52
52
|
* The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
|
|
53
53
|
*/
|
|
@@ -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.KeyInstance = exports.KeyListInstance = 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 KeyListInstance(version) {
|
|
21
21
|
const instance = {};
|
|
22
22
|
instance._version = version;
|
|
23
23
|
instance._solution = {};
|
|
@@ -45,7 +45,7 @@ function NewApiKeyListInstance(version) {
|
|
|
45
45
|
data,
|
|
46
46
|
headers,
|
|
47
47
|
});
|
|
48
|
-
operationPromise = operationPromise.then((payload) => new
|
|
48
|
+
operationPromise = operationPromise.then((payload) => new KeyInstance(operationVersion, payload));
|
|
49
49
|
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
50
50
|
return operationPromise;
|
|
51
51
|
};
|
|
@@ -57,8 +57,8 @@ function NewApiKeyListInstance(version) {
|
|
|
57
57
|
};
|
|
58
58
|
return instance;
|
|
59
59
|
}
|
|
60
|
-
exports.
|
|
61
|
-
class
|
|
60
|
+
exports.KeyListInstance = KeyListInstance;
|
|
61
|
+
class KeyInstance {
|
|
62
62
|
constructor(_version, payload) {
|
|
63
63
|
this._version = _version;
|
|
64
64
|
this.sid = payload.sid;
|
|
@@ -87,4 +87,4 @@ class NewApiKeyInstance {
|
|
|
87
87
|
return (0, util_1.inspect)(this.toJSON(), options);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
exports.
|
|
90
|
+
exports.KeyInstance = KeyInstance;
|
|
@@ -8,6 +8,7 @@ import { DomainConfigMessagingServiceListInstance } from "./v1/domainConfigMessa
|
|
|
8
8
|
import { ExternalCampaignListInstance } from "./v1/externalCampaign";
|
|
9
9
|
import { LinkshorteningMessagingServiceListInstance } from "./v1/linkshorteningMessagingService";
|
|
10
10
|
import { LinkshorteningMessagingServiceDomainAssociationListInstance } from "./v1/linkshorteningMessagingServiceDomainAssociation";
|
|
11
|
+
import { RequestManagedCertListInstance } from "./v1/requestManagedCert";
|
|
11
12
|
import { ServiceListInstance } from "./v1/service";
|
|
12
13
|
import { TollfreeVerificationListInstance } from "./v1/tollfreeVerification";
|
|
13
14
|
import { UsecaseListInstance } from "./v1/usecase";
|
|
@@ -34,6 +35,8 @@ export default class V1 extends Version {
|
|
|
34
35
|
protected _linkshorteningMessagingService?: LinkshorteningMessagingServiceListInstance;
|
|
35
36
|
/** linkshorteningMessagingServiceDomainAssociation - { Twilio.Messaging.V1.LinkshorteningMessagingServiceDomainAssociationListInstance } resource */
|
|
36
37
|
protected _linkshorteningMessagingServiceDomainAssociation?: LinkshorteningMessagingServiceDomainAssociationListInstance;
|
|
38
|
+
/** requestManagedCert - { Twilio.Messaging.V1.RequestManagedCertListInstance } resource */
|
|
39
|
+
protected _requestManagedCert?: RequestManagedCertListInstance;
|
|
37
40
|
/** services - { Twilio.Messaging.V1.ServiceListInstance } resource */
|
|
38
41
|
protected _services?: ServiceListInstance;
|
|
39
42
|
/** tollfreeVerifications - { Twilio.Messaging.V1.TollfreeVerificationListInstance } resource */
|
|
@@ -56,6 +59,8 @@ export default class V1 extends Version {
|
|
|
56
59
|
get linkshorteningMessagingService(): LinkshorteningMessagingServiceListInstance;
|
|
57
60
|
/** Getter for linkshorteningMessagingServiceDomainAssociation resource */
|
|
58
61
|
get linkshorteningMessagingServiceDomainAssociation(): LinkshorteningMessagingServiceDomainAssociationListInstance;
|
|
62
|
+
/** Getter for requestManagedCert resource */
|
|
63
|
+
get requestManagedCert(): RequestManagedCertListInstance;
|
|
59
64
|
/** Getter for services resource */
|
|
60
65
|
get services(): ServiceListInstance;
|
|
61
66
|
/** Getter for tollfreeVerifications resource */
|
package/lib/rest/messaging/V1.js
CHANGED
|
@@ -25,6 +25,7 @@ const domainConfigMessagingService_1 = require("./v1/domainConfigMessagingServic
|
|
|
25
25
|
const externalCampaign_1 = require("./v1/externalCampaign");
|
|
26
26
|
const linkshorteningMessagingService_1 = require("./v1/linkshorteningMessagingService");
|
|
27
27
|
const linkshorteningMessagingServiceDomainAssociation_1 = require("./v1/linkshorteningMessagingServiceDomainAssociation");
|
|
28
|
+
const requestManagedCert_1 = require("./v1/requestManagedCert");
|
|
28
29
|
const service_1 = require("./v1/service");
|
|
29
30
|
const tollfreeVerification_1 = require("./v1/tollfreeVerification");
|
|
30
31
|
const usecase_1 = require("./v1/usecase");
|
|
@@ -86,6 +87,12 @@ class V1 extends Version_1.default {
|
|
|
86
87
|
(0, linkshorteningMessagingServiceDomainAssociation_1.LinkshorteningMessagingServiceDomainAssociationListInstance)(this);
|
|
87
88
|
return this._linkshorteningMessagingServiceDomainAssociation;
|
|
88
89
|
}
|
|
90
|
+
/** Getter for requestManagedCert resource */
|
|
91
|
+
get requestManagedCert() {
|
|
92
|
+
this._requestManagedCert =
|
|
93
|
+
this._requestManagedCert || (0, requestManagedCert_1.RequestManagedCertListInstance)(this);
|
|
94
|
+
return this._requestManagedCert;
|
|
95
|
+
}
|
|
89
96
|
/** Getter for services resource */
|
|
90
97
|
get services() {
|
|
91
98
|
this._services = this._services || (0, service_1.ServiceListInstance)(this);
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import V1 from "../V1";
|
|
4
|
+
export interface RequestManagedCertContext {
|
|
5
|
+
/**
|
|
6
|
+
* Update a RequestManagedCertInstance
|
|
7
|
+
*
|
|
8
|
+
* @param callback - Callback to handle processed record
|
|
9
|
+
*
|
|
10
|
+
* @returns Resolves to processed RequestManagedCertInstance
|
|
11
|
+
*/
|
|
12
|
+
update(callback?: (error: Error | null, item?: RequestManagedCertInstance) => any): Promise<RequestManagedCertInstance>;
|
|
13
|
+
/**
|
|
14
|
+
* Provide a user-friendly representation
|
|
15
|
+
*/
|
|
16
|
+
toJSON(): any;
|
|
17
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
18
|
+
}
|
|
19
|
+
export interface RequestManagedCertContextSolution {
|
|
20
|
+
domainSid: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class RequestManagedCertContextImpl implements RequestManagedCertContext {
|
|
23
|
+
protected _version: V1;
|
|
24
|
+
protected _solution: RequestManagedCertContextSolution;
|
|
25
|
+
protected _uri: string;
|
|
26
|
+
constructor(_version: V1, domainSid: string);
|
|
27
|
+
update(callback?: (error: Error | null, item?: RequestManagedCertInstance) => any): Promise<RequestManagedCertInstance>;
|
|
28
|
+
/**
|
|
29
|
+
* Provide a user-friendly representation
|
|
30
|
+
*
|
|
31
|
+
* @returns Object
|
|
32
|
+
*/
|
|
33
|
+
toJSON(): RequestManagedCertContextSolution;
|
|
34
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
35
|
+
}
|
|
36
|
+
interface RequestManagedCertResource {
|
|
37
|
+
domain_sid: string;
|
|
38
|
+
date_updated: Date;
|
|
39
|
+
date_created: Date;
|
|
40
|
+
date_expires: Date;
|
|
41
|
+
domain_name: string;
|
|
42
|
+
certificate_sid: string;
|
|
43
|
+
url: string;
|
|
44
|
+
managed: boolean;
|
|
45
|
+
requesting: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare class RequestManagedCertInstance {
|
|
48
|
+
protected _version: V1;
|
|
49
|
+
protected _solution: RequestManagedCertContextSolution;
|
|
50
|
+
protected _context?: RequestManagedCertContext;
|
|
51
|
+
constructor(_version: V1, payload: RequestManagedCertResource, domainSid?: string);
|
|
52
|
+
/**
|
|
53
|
+
* The unique string that we created to identify the Domain resource.
|
|
54
|
+
*/
|
|
55
|
+
domainSid: string;
|
|
56
|
+
/**
|
|
57
|
+
* Date that this Domain was last updated.
|
|
58
|
+
*/
|
|
59
|
+
dateUpdated: Date;
|
|
60
|
+
/**
|
|
61
|
+
* Date that this Domain was registered to the Twilio platform to create a new Domain object.
|
|
62
|
+
*/
|
|
63
|
+
dateCreated: Date;
|
|
64
|
+
/**
|
|
65
|
+
* Date that the private certificate associated with this domain expires. This is the expiration date of your existing cert.
|
|
66
|
+
*/
|
|
67
|
+
dateExpires: Date;
|
|
68
|
+
/**
|
|
69
|
+
* Full url path for this domain.
|
|
70
|
+
*/
|
|
71
|
+
domainName: string;
|
|
72
|
+
/**
|
|
73
|
+
* The unique string that we created to identify this Certificate resource.
|
|
74
|
+
*/
|
|
75
|
+
certificateSid: string;
|
|
76
|
+
url: string;
|
|
77
|
+
/**
|
|
78
|
+
* A boolean flag indicating if the certificate is managed by Twilio.
|
|
79
|
+
*/
|
|
80
|
+
managed: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* A boolean flag indicating if a managed certificate needs to be fulfilled by Twilio.
|
|
83
|
+
*/
|
|
84
|
+
requesting: boolean;
|
|
85
|
+
private get _proxy();
|
|
86
|
+
/**
|
|
87
|
+
* Update a RequestManagedCertInstance
|
|
88
|
+
*
|
|
89
|
+
* @param callback - Callback to handle processed record
|
|
90
|
+
*
|
|
91
|
+
* @returns Resolves to processed RequestManagedCertInstance
|
|
92
|
+
*/
|
|
93
|
+
update(callback?: (error: Error | null, item?: RequestManagedCertInstance) => any): Promise<RequestManagedCertInstance>;
|
|
94
|
+
/**
|
|
95
|
+
* Provide a user-friendly representation
|
|
96
|
+
*
|
|
97
|
+
* @returns Object
|
|
98
|
+
*/
|
|
99
|
+
toJSON(): {
|
|
100
|
+
domainSid: string;
|
|
101
|
+
dateUpdated: Date;
|
|
102
|
+
dateCreated: Date;
|
|
103
|
+
dateExpires: Date;
|
|
104
|
+
domainName: string;
|
|
105
|
+
certificateSid: string;
|
|
106
|
+
url: string;
|
|
107
|
+
managed: boolean;
|
|
108
|
+
requesting: boolean;
|
|
109
|
+
};
|
|
110
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
111
|
+
}
|
|
112
|
+
export interface RequestManagedCertSolution {
|
|
113
|
+
}
|
|
114
|
+
export interface RequestManagedCertListInstance {
|
|
115
|
+
_version: V1;
|
|
116
|
+
_solution: RequestManagedCertSolution;
|
|
117
|
+
_uri: string;
|
|
118
|
+
(domainSid: string): RequestManagedCertContext;
|
|
119
|
+
get(domainSid: string): RequestManagedCertContext;
|
|
120
|
+
/**
|
|
121
|
+
* Provide a user-friendly representation
|
|
122
|
+
*/
|
|
123
|
+
toJSON(): any;
|
|
124
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
125
|
+
}
|
|
126
|
+
export declare function RequestManagedCertListInstance(version: V1): RequestManagedCertListInstance;
|
|
127
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RequestManagedCertListInstance = exports.RequestManagedCertInstance = exports.RequestManagedCertContextImpl = void 0;
|
|
17
|
+
const util_1 = require("util");
|
|
18
|
+
const deserialize = require("../../../base/deserialize");
|
|
19
|
+
const serialize = require("../../../base/serialize");
|
|
20
|
+
const utility_1 = require("../../../base/utility");
|
|
21
|
+
class RequestManagedCertContextImpl {
|
|
22
|
+
constructor(_version, domainSid) {
|
|
23
|
+
this._version = _version;
|
|
24
|
+
if (!(0, utility_1.isValidPathParam)(domainSid)) {
|
|
25
|
+
throw new Error("Parameter 'domainSid' is not valid.");
|
|
26
|
+
}
|
|
27
|
+
this._solution = { domainSid };
|
|
28
|
+
this._uri = `/LinkShortening/Domains/${domainSid}/RequestManagedCert`;
|
|
29
|
+
}
|
|
30
|
+
update(callback) {
|
|
31
|
+
const instance = this;
|
|
32
|
+
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
33
|
+
uri: instance._uri,
|
|
34
|
+
method: "post",
|
|
35
|
+
});
|
|
36
|
+
operationPromise = operationPromise.then((payload) => new RequestManagedCertInstance(operationVersion, payload, instance._solution.domainSid));
|
|
37
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
38
|
+
return operationPromise;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Provide a user-friendly representation
|
|
42
|
+
*
|
|
43
|
+
* @returns Object
|
|
44
|
+
*/
|
|
45
|
+
toJSON() {
|
|
46
|
+
return this._solution;
|
|
47
|
+
}
|
|
48
|
+
[util_1.inspect.custom](_depth, options) {
|
|
49
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.RequestManagedCertContextImpl = RequestManagedCertContextImpl;
|
|
53
|
+
class RequestManagedCertInstance {
|
|
54
|
+
constructor(_version, payload, domainSid) {
|
|
55
|
+
this._version = _version;
|
|
56
|
+
this.domainSid = payload.domain_sid;
|
|
57
|
+
this.dateUpdated = deserialize.iso8601DateTime(payload.date_updated);
|
|
58
|
+
this.dateCreated = deserialize.iso8601DateTime(payload.date_created);
|
|
59
|
+
this.dateExpires = deserialize.iso8601DateTime(payload.date_expires);
|
|
60
|
+
this.domainName = payload.domain_name;
|
|
61
|
+
this.certificateSid = payload.certificate_sid;
|
|
62
|
+
this.url = payload.url;
|
|
63
|
+
this.managed = payload.managed;
|
|
64
|
+
this.requesting = payload.requesting;
|
|
65
|
+
this._solution = { domainSid: domainSid || this.domainSid };
|
|
66
|
+
}
|
|
67
|
+
get _proxy() {
|
|
68
|
+
this._context =
|
|
69
|
+
this._context ||
|
|
70
|
+
new RequestManagedCertContextImpl(this._version, this._solution.domainSid);
|
|
71
|
+
return this._context;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Update a RequestManagedCertInstance
|
|
75
|
+
*
|
|
76
|
+
* @param callback - Callback to handle processed record
|
|
77
|
+
*
|
|
78
|
+
* @returns Resolves to processed RequestManagedCertInstance
|
|
79
|
+
*/
|
|
80
|
+
update(callback) {
|
|
81
|
+
return this._proxy.update(callback);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Provide a user-friendly representation
|
|
85
|
+
*
|
|
86
|
+
* @returns Object
|
|
87
|
+
*/
|
|
88
|
+
toJSON() {
|
|
89
|
+
return {
|
|
90
|
+
domainSid: this.domainSid,
|
|
91
|
+
dateUpdated: this.dateUpdated,
|
|
92
|
+
dateCreated: this.dateCreated,
|
|
93
|
+
dateExpires: this.dateExpires,
|
|
94
|
+
domainName: this.domainName,
|
|
95
|
+
certificateSid: this.certificateSid,
|
|
96
|
+
url: this.url,
|
|
97
|
+
managed: this.managed,
|
|
98
|
+
requesting: this.requesting,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
[util_1.inspect.custom](_depth, options) {
|
|
102
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.RequestManagedCertInstance = RequestManagedCertInstance;
|
|
106
|
+
function RequestManagedCertListInstance(version) {
|
|
107
|
+
const instance = ((domainSid) => instance.get(domainSid));
|
|
108
|
+
instance.get = function get(domainSid) {
|
|
109
|
+
return new RequestManagedCertContextImpl(version, domainSid);
|
|
110
|
+
};
|
|
111
|
+
instance._version = version;
|
|
112
|
+
instance._solution = {};
|
|
113
|
+
instance._uri = ``;
|
|
114
|
+
instance.toJSON = function toJSON() {
|
|
115
|
+
return instance._solution;
|
|
116
|
+
};
|
|
117
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
118
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
119
|
+
};
|
|
120
|
+
return instance;
|
|
121
|
+
}
|
|
122
|
+
exports.RequestManagedCertListInstance = RequestManagedCertListInstance;
|
|
@@ -8,6 +8,8 @@ export type PortingPortabilityNumberType = "LOCAL" | "UNKNOWN" | "MOBILE" | "TOL
|
|
|
8
8
|
export interface PortingPortabilityContextFetchOptions {
|
|
9
9
|
/** Account Sid to which the number will be ported. This can be used to determine if a sub account already has the number in its inventory or a different sub account. If this is not provided, the authenticated account will be assumed to be the target account. */
|
|
10
10
|
targetAccountSid?: string;
|
|
11
|
+
/** Address Sid of customer to which the number will be ported. */
|
|
12
|
+
addressSid?: string;
|
|
11
13
|
}
|
|
12
14
|
export interface PortingPortabilityContext {
|
|
13
15
|
/**
|
|
@@ -38,6 +38,8 @@ class PortingPortabilityContextImpl {
|
|
|
38
38
|
let data = {};
|
|
39
39
|
if (params["targetAccountSid"] !== undefined)
|
|
40
40
|
data["TargetAccountSid"] = params["targetAccountSid"];
|
|
41
|
+
if (params["addressSid"] !== undefined)
|
|
42
|
+
data["AddressSid"] = params["addressSid"];
|
|
41
43
|
const headers = {};
|
|
42
44
|
const instance = this;
|
|
43
45
|
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
@@ -28,7 +28,7 @@ export interface TaskContextUpdateOptions {
|
|
|
28
28
|
priority?: number;
|
|
29
29
|
/** When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel\\\'s SID or its `unique_name`, such as `voice`, `sms`, or `default`. */
|
|
30
30
|
taskChannel?: string;
|
|
31
|
-
/** The task\\\'s new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can\\\'t be in the future. */
|
|
31
|
+
/** The task\\\'s new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can\\\'t be in the future or before the year of 1900. */
|
|
32
32
|
virtualStartTime?: Date;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
@@ -45,7 +45,7 @@ export interface TaskListInstanceCreateOptions {
|
|
|
45
45
|
workflowSid?: string;
|
|
46
46
|
/** A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow\\\'s `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`. */
|
|
47
47
|
attributes?: string;
|
|
48
|
-
/** The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can\\\'t be in the future. */
|
|
48
|
+
/** The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can\\\'t be in the future or before the year of 1900. */
|
|
49
49
|
virtualStartTime?: Date;
|
|
50
50
|
/** A SID of a Worker, Queue, or Workflow to route a Task to */
|
|
51
51
|
routingTarget?: string;
|
|
@@ -45,6 +45,8 @@ export interface VerificationListInstanceCreateOptions {
|
|
|
45
45
|
templateCustomSubstitutions?: string;
|
|
46
46
|
/** Strongly encouraged if using the auto channel. The IP address of the client\\\'s device. If provided, it has to be a valid IPv4 or IPv6 address. */
|
|
47
47
|
deviceIp?: string;
|
|
48
|
+
/** An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification. */
|
|
49
|
+
enableSnaClientToken?: boolean;
|
|
48
50
|
/** */
|
|
49
51
|
riskCheck?: VerificationRiskCheck;
|
|
50
52
|
/** A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length. */
|
|
@@ -194,6 +194,8 @@ function VerificationListInstance(version, serviceSid) {
|
|
|
194
194
|
params["templateCustomSubstitutions"];
|
|
195
195
|
if (params["deviceIp"] !== undefined)
|
|
196
196
|
data["DeviceIp"] = params["deviceIp"];
|
|
197
|
+
if (params["enableSnaClientToken"] !== undefined)
|
|
198
|
+
data["EnableSnaClientToken"] = serialize.bool(params["enableSnaClientToken"]);
|
|
197
199
|
if (params["riskCheck"] !== undefined)
|
|
198
200
|
data["RiskCheck"] = params["riskCheck"];
|
|
199
201
|
if (params["tags"] !== undefined)
|
|
@@ -16,6 +16,8 @@ export interface VerificationCheckListInstanceCreateOptions {
|
|
|
16
16
|
amount?: string;
|
|
17
17
|
/** The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled. */
|
|
18
18
|
payee?: string;
|
|
19
|
+
/** A sna client token received in sna url invocation response needs to be passed in Verification Check request and should match to get successful response. */
|
|
20
|
+
snaClientToken?: string;
|
|
19
21
|
}
|
|
20
22
|
export interface VerificationCheckSolution {
|
|
21
23
|
serviceSid: string;
|
|
@@ -45,6 +45,8 @@ function VerificationCheckListInstance(version, serviceSid) {
|
|
|
45
45
|
data["Amount"] = params["amount"];
|
|
46
46
|
if (params["payee"] !== undefined)
|
|
47
47
|
data["Payee"] = params["payee"];
|
|
48
|
+
if (params["snaClientToken"] !== undefined)
|
|
49
|
+
data["SnaClientToken"] = params["snaClientToken"];
|
|
48
50
|
const headers = {};
|
|
49
51
|
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
50
52
|
let operationVersion = version, operationPromise = operationVersion.create({
|