twilio 4.20.0 → 4.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/rest/Preview.d.ts +0 -5
- package/lib/rest/Preview.js +0 -7
- package/lib/rest/PreviewBase.d.ts +0 -3
- package/lib/rest/PreviewBase.js +0 -5
- package/lib/rest/Twilio.d.ts +0 -5
- package/lib/rest/Twilio.js +0 -5
- package/package.json +1 -1
- package/lib/rest/Autopilot.d.ts +0 -14
- package/lib/rest/Autopilot.js +0 -22
- package/lib/rest/AutopilotBase.d.ts +0 -13
- package/lib/rest/AutopilotBase.js +0 -31
- package/lib/rest/autopilot/V1.d.ts +0 -20
- package/lib/rest/autopilot/V1.js +0 -43
- package/lib/rest/autopilot/v1/assistant/defaults.d.ts +0 -143
- package/lib/rest/autopilot/v1/assistant/defaults.js +0 -142
- package/lib/rest/autopilot/v1/assistant/dialogue.d.ts +0 -108
- package/lib/rest/autopilot/v1/assistant/dialogue.js +0 -120
- package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.d.ts +0 -288
- package/lib/rest/autopilot/v1/assistant/fieldType/fieldValue.js +0 -249
- package/lib/rest/autopilot/v1/assistant/fieldType.d.ts +0 -324
- package/lib/rest/autopilot/v1/assistant/fieldType.js +0 -277
- package/lib/rest/autopilot/v1/assistant/modelBuild.d.ts +0 -326
- package/lib/rest/autopilot/v1/assistant/modelBuild.js +0 -266
- package/lib/rest/autopilot/v1/assistant/query.d.ts +0 -374
- package/lib/rest/autopilot/v1/assistant/query.js +0 -288
- package/lib/rest/autopilot/v1/assistant/styleSheet.d.ts +0 -143
- package/lib/rest/autopilot/v1/assistant/styleSheet.js +0 -142
- package/lib/rest/autopilot/v1/assistant/task/field.d.ts +0 -274
- package/lib/rest/autopilot/v1/assistant/task/field.js +0 -243
- package/lib/rest/autopilot/v1/assistant/task/sample.d.ts +0 -334
- package/lib/rest/autopilot/v1/assistant/task/sample.js +0 -280
- package/lib/rest/autopilot/v1/assistant/task/taskActions.d.ts +0 -151
- package/lib/rest/autopilot/v1/assistant/task/taskActions.js +0 -150
- package/lib/rest/autopilot/v1/assistant/task/taskStatistics.d.ts +0 -115
- package/lib/rest/autopilot/v1/assistant/task/taskStatistics.js +0 -125
- package/lib/rest/autopilot/v1/assistant/task.d.ts +0 -362
- package/lib/rest/autopilot/v1/assistant/task.js +0 -326
- package/lib/rest/autopilot/v1/assistant/webhook.d.ts +0 -330
- package/lib/rest/autopilot/v1/assistant/webhook.js +0 -278
- package/lib/rest/autopilot/v1/assistant.d.ts +0 -438
- package/lib/rest/autopilot/v1/assistant.js +0 -392
- package/lib/rest/autopilot/v1/restoreAssistant.d.ts +0 -119
- package/lib/rest/autopilot/v1/restoreAssistant.js +0 -96
- package/lib/rest/preview/Understand.d.ts +0 -15
- package/lib/rest/preview/Understand.js +0 -36
- package/lib/rest/preview/understand/assistant/assistantFallbackActions.d.ts +0 -131
- package/lib/rest/preview/understand/assistant/assistantFallbackActions.js +0 -142
- package/lib/rest/preview/understand/assistant/assistantInitiationActions.d.ts +0 -131
- package/lib/rest/preview/understand/assistant/assistantInitiationActions.js +0 -142
- package/lib/rest/preview/understand/assistant/dialogue.d.ts +0 -105
- package/lib/rest/preview/understand/assistant/dialogue.js +0 -120
- package/lib/rest/preview/understand/assistant/fieldType/fieldValue.d.ts +0 -285
- package/lib/rest/preview/understand/assistant/fieldType/fieldValue.js +0 -249
- package/lib/rest/preview/understand/assistant/fieldType.d.ts +0 -318
- package/lib/rest/preview/understand/assistant/fieldType.js +0 -277
- package/lib/rest/preview/understand/assistant/modelBuild.d.ts +0 -320
- package/lib/rest/preview/understand/assistant/modelBuild.js +0 -266
- package/lib/rest/preview/understand/assistant/query.d.ts +0 -361
- package/lib/rest/preview/understand/assistant/query.js +0 -286
- package/lib/rest/preview/understand/assistant/styleSheet.d.ts +0 -140
- package/lib/rest/preview/understand/assistant/styleSheet.js +0 -142
- package/lib/rest/preview/understand/assistant/task/field.d.ts +0 -271
- package/lib/rest/preview/understand/assistant/task/field.js +0 -243
- package/lib/rest/preview/understand/assistant/task/sample.d.ts +0 -331
- package/lib/rest/preview/understand/assistant/task/sample.js +0 -280
- package/lib/rest/preview/understand/assistant/task/taskActions.d.ts +0 -145
- package/lib/rest/preview/understand/assistant/task/taskActions.js +0 -150
- package/lib/rest/preview/understand/assistant/task/taskStatistics.d.ts +0 -112
- package/lib/rest/preview/understand/assistant/task/taskStatistics.js +0 -125
- package/lib/rest/preview/understand/assistant/task.d.ts +0 -356
- package/lib/rest/preview/understand/assistant/task.js +0 -326
- package/lib/rest/preview/understand/assistant.d.ts +0 -422
- package/lib/rest/preview/understand/assistant.js +0 -392
package/lib/rest/Preview.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import { HostedNumberOrderListInstance } from "./preview/hosted_numbers/hostedNu
|
|
|
4
4
|
import { AvailableAddOnListInstance } from "./preview/marketplace/availableAddOn";
|
|
5
5
|
import { InstalledAddOnListInstance } from "./preview/marketplace/installedAddOn";
|
|
6
6
|
import { ServiceListInstance } from "./preview/sync/service";
|
|
7
|
-
import { AssistantListInstance } from "./preview/understand/assistant";
|
|
8
7
|
import { CommandListInstance } from "./preview/wireless/command";
|
|
9
8
|
import { RatePlanListInstance } from "./preview/wireless/ratePlan";
|
|
10
9
|
import { SimListInstance } from "./preview/wireless/sim";
|
|
@@ -34,10 +33,6 @@ declare class Preview extends PreviewBase {
|
|
|
34
33
|
* @deprecated - Use sync.services instead
|
|
35
34
|
*/
|
|
36
35
|
get services(): ServiceListInstance;
|
|
37
|
-
/**
|
|
38
|
-
* @deprecated - Use understand.assistants instead
|
|
39
|
-
*/
|
|
40
|
-
get assistants(): AssistantListInstance;
|
|
41
36
|
/**
|
|
42
37
|
* @deprecated - Use wireless.commands instead
|
|
43
38
|
*/
|
package/lib/rest/Preview.js
CHANGED
|
@@ -46,13 +46,6 @@ class Preview extends PreviewBase_1.default {
|
|
|
46
46
|
console.warn("services is deprecated. Use sync.services instead.");
|
|
47
47
|
return this.sync.services;
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
50
|
-
* @deprecated - Use understand.assistants instead
|
|
51
|
-
*/
|
|
52
|
-
get assistants() {
|
|
53
|
-
console.warn("assistants is deprecated. Use understand.assistants instead.");
|
|
54
|
-
return this.understand.assistants;
|
|
55
|
-
}
|
|
56
49
|
/**
|
|
57
50
|
* @deprecated - Use wireless.commands instead
|
|
58
51
|
*/
|
|
@@ -3,14 +3,12 @@ import DeployedDevices from "./preview/DeployedDevices";
|
|
|
3
3
|
import HostedNumbers from "./preview/HostedNumbers";
|
|
4
4
|
import Sync from "./preview/Sync";
|
|
5
5
|
import Marketplace from "./preview/Marketplace";
|
|
6
|
-
import Understand from "./preview/Understand";
|
|
7
6
|
import Wireless from "./preview/Wireless";
|
|
8
7
|
declare class PreviewBase extends Domain {
|
|
9
8
|
_deployed_devices?: DeployedDevices;
|
|
10
9
|
_hosted_numbers?: HostedNumbers;
|
|
11
10
|
_sync?: Sync;
|
|
12
11
|
_marketplace?: Marketplace;
|
|
13
|
-
_understand?: Understand;
|
|
14
12
|
_wireless?: Wireless;
|
|
15
13
|
/**
|
|
16
14
|
* Initialize preview domain
|
|
@@ -22,7 +20,6 @@ declare class PreviewBase extends Domain {
|
|
|
22
20
|
get hosted_numbers(): HostedNumbers;
|
|
23
21
|
get sync(): Sync;
|
|
24
22
|
get marketplace(): Marketplace;
|
|
25
|
-
get understand(): Understand;
|
|
26
23
|
get wireless(): Wireless;
|
|
27
24
|
}
|
|
28
25
|
export = PreviewBase;
|
package/lib/rest/PreviewBase.js
CHANGED
|
@@ -17,7 +17,6 @@ const DeployedDevices_1 = __importDefault(require("./preview/DeployedDevices"));
|
|
|
17
17
|
const HostedNumbers_1 = __importDefault(require("./preview/HostedNumbers"));
|
|
18
18
|
const Sync_1 = __importDefault(require("./preview/Sync"));
|
|
19
19
|
const Marketplace_1 = __importDefault(require("./preview/Marketplace"));
|
|
20
|
-
const Understand_1 = __importDefault(require("./preview/Understand"));
|
|
21
20
|
const Wireless_1 = __importDefault(require("./preview/Wireless"));
|
|
22
21
|
class PreviewBase extends Domain_1.default {
|
|
23
22
|
/**
|
|
@@ -45,10 +44,6 @@ class PreviewBase extends Domain_1.default {
|
|
|
45
44
|
this._marketplace = this._marketplace || new Marketplace_1.default(this);
|
|
46
45
|
return this._marketplace;
|
|
47
46
|
}
|
|
48
|
-
get understand() {
|
|
49
|
-
this._understand = this._understand || new Understand_1.default(this);
|
|
50
|
-
return this._understand;
|
|
51
|
-
}
|
|
52
47
|
get wireless() {
|
|
53
48
|
this._wireless = this._wireless || new Wireless_1.default(this);
|
|
54
49
|
return this._wireless;
|
package/lib/rest/Twilio.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Client, ClientOpts, RequestOpts } from "../base/BaseTwilio";
|
|
2
2
|
import Accounts from "./Accounts";
|
|
3
3
|
import Api from "./Api";
|
|
4
|
-
import Autopilot from "./Autopilot";
|
|
5
4
|
import Bulkexports from "./Bulkexports";
|
|
6
5
|
import Chat from "./Chat";
|
|
7
6
|
import Content from "./Content";
|
|
@@ -66,8 +65,6 @@ declare class Twilio extends Client {
|
|
|
66
65
|
_accounts?: Accounts;
|
|
67
66
|
/** (Twilio.Api) - api domain */
|
|
68
67
|
_api?: Api;
|
|
69
|
-
/** (Twilio.Autopilot) - autopilot domain */
|
|
70
|
-
_autopilot?: Autopilot;
|
|
71
68
|
/** (Twilio.Bulkexports) - bulkexports domain */
|
|
72
69
|
_bulkexports?: Bulkexports;
|
|
73
70
|
/** (Twilio.Chat) - chat domain */
|
|
@@ -148,8 +145,6 @@ declare class Twilio extends Client {
|
|
|
148
145
|
get accounts(): Accounts;
|
|
149
146
|
/** Getter for (Twilio.Api) domain */
|
|
150
147
|
get api(): Api;
|
|
151
|
-
/** Getter for (Twilio.Autopilot) domain */
|
|
152
|
-
get autopilot(): Autopilot;
|
|
153
148
|
/** Getter for (Twilio.Bulkexports) domain */
|
|
154
149
|
get bulkexports(): Bulkexports;
|
|
155
150
|
/** Getter for (Twilio.Chat) domain */
|
package/lib/rest/Twilio.js
CHANGED
|
@@ -34,7 +34,6 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
34
34
|
if (this.opts?.lazyLoading === false) {
|
|
35
35
|
this.accounts;
|
|
36
36
|
this.api;
|
|
37
|
-
this.autopilot;
|
|
38
37
|
this.bulkexports;
|
|
39
38
|
this.chat;
|
|
40
39
|
this.content;
|
|
@@ -78,10 +77,6 @@ class Twilio extends BaseTwilio_1.Client {
|
|
|
78
77
|
get api() {
|
|
79
78
|
return this._api ?? (this._api = new (require("./Api"))(this));
|
|
80
79
|
}
|
|
81
|
-
/** Getter for (Twilio.Autopilot) domain */
|
|
82
|
-
get autopilot() {
|
|
83
|
-
return (this._autopilot ?? (this._autopilot = new (require("./Autopilot"))(this)));
|
|
84
|
-
}
|
|
85
80
|
/** Getter for (Twilio.Bulkexports) domain */
|
|
86
81
|
get bulkexports() {
|
|
87
82
|
return (this._bulkexports ??
|
package/package.json
CHANGED
package/lib/rest/Autopilot.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AssistantListInstance } from "./autopilot/v1/assistant";
|
|
2
|
-
import { RestoreAssistantListInstance } from "./autopilot/v1/restoreAssistant";
|
|
3
|
-
import AutopilotBase from "./AutopilotBase";
|
|
4
|
-
declare class Autopilot extends AutopilotBase {
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated - Use v1.assistants instead
|
|
7
|
-
*/
|
|
8
|
-
get assistants(): AssistantListInstance;
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated - Use v1.restoreAssistant instead
|
|
11
|
-
*/
|
|
12
|
-
get restoreAssistant(): RestoreAssistantListInstance;
|
|
13
|
-
}
|
|
14
|
-
export = Autopilot;
|
package/lib/rest/Autopilot.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
const AutopilotBase_1 = __importDefault(require("./AutopilotBase"));
|
|
6
|
-
class Autopilot extends AutopilotBase_1.default {
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated - Use v1.assistants instead
|
|
9
|
-
*/
|
|
10
|
-
get assistants() {
|
|
11
|
-
console.warn("assistants is deprecated. Use v1.assistants instead.");
|
|
12
|
-
return this.v1.assistants;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated - Use v1.restoreAssistant instead
|
|
16
|
-
*/
|
|
17
|
-
get restoreAssistant() {
|
|
18
|
-
console.warn("restoreAssistant is deprecated. Use v1.restoreAssistant instead.");
|
|
19
|
-
return this.v1.restoreAssistant;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
module.exports = Autopilot;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Domain from "../base/Domain";
|
|
2
|
-
import V1 from "./autopilot/V1";
|
|
3
|
-
declare class AutopilotBase extends Domain {
|
|
4
|
-
_v1?: V1;
|
|
5
|
-
/**
|
|
6
|
-
* Initialize autopilot domain
|
|
7
|
-
*
|
|
8
|
-
* @param twilio - The twilio client
|
|
9
|
-
*/
|
|
10
|
-
constructor(twilio: any);
|
|
11
|
-
get v1(): V1;
|
|
12
|
-
}
|
|
13
|
-
export = AutopilotBase;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by
|
|
4
|
-
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
-
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
-
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
|
-
const Domain_1 = __importDefault(require("../base/Domain"));
|
|
16
|
-
const V1_1 = __importDefault(require("./autopilot/V1"));
|
|
17
|
-
class AutopilotBase extends Domain_1.default {
|
|
18
|
-
/**
|
|
19
|
-
* Initialize autopilot domain
|
|
20
|
-
*
|
|
21
|
-
* @param twilio - The twilio client
|
|
22
|
-
*/
|
|
23
|
-
constructor(twilio) {
|
|
24
|
-
super(twilio, "https://autopilot.twilio.com");
|
|
25
|
-
}
|
|
26
|
-
get v1() {
|
|
27
|
-
this._v1 = this._v1 || new V1_1.default(this);
|
|
28
|
-
return this._v1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
module.exports = AutopilotBase;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import AutopilotBase from "../AutopilotBase";
|
|
2
|
-
import Version from "../../base/Version";
|
|
3
|
-
import { AssistantListInstance } from "./v1/assistant";
|
|
4
|
-
import { RestoreAssistantListInstance } from "./v1/restoreAssistant";
|
|
5
|
-
export default class V1 extends Version {
|
|
6
|
-
/**
|
|
7
|
-
* Initialize the V1 version of Autopilot
|
|
8
|
-
*
|
|
9
|
-
* @param domain - The Twilio (Twilio.Autopilot) domain
|
|
10
|
-
*/
|
|
11
|
-
constructor(domain: AutopilotBase);
|
|
12
|
-
/** assistants - { Twilio.Autopilot.V1.AssistantListInstance } resource */
|
|
13
|
-
protected _assistants?: AssistantListInstance;
|
|
14
|
-
/** restoreAssistant - { Twilio.Autopilot.V1.RestoreAssistantListInstance } resource */
|
|
15
|
-
protected _restoreAssistant?: RestoreAssistantListInstance;
|
|
16
|
-
/** Getter for assistants resource */
|
|
17
|
-
get assistants(): AssistantListInstance;
|
|
18
|
-
/** Getter for restoreAssistant resource */
|
|
19
|
-
get restoreAssistant(): RestoreAssistantListInstance;
|
|
20
|
-
}
|
package/lib/rest/autopilot/V1.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by
|
|
4
|
-
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
-
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
-
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
-
*
|
|
8
|
-
* Twilio - Autopilot
|
|
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 assistant_1 = require("./v1/assistant");
|
|
21
|
-
const restoreAssistant_1 = require("./v1/restoreAssistant");
|
|
22
|
-
class V1 extends Version_1.default {
|
|
23
|
-
/**
|
|
24
|
-
* Initialize the V1 version of Autopilot
|
|
25
|
-
*
|
|
26
|
-
* @param domain - The Twilio (Twilio.Autopilot) domain
|
|
27
|
-
*/
|
|
28
|
-
constructor(domain) {
|
|
29
|
-
super(domain, "v1");
|
|
30
|
-
}
|
|
31
|
-
/** Getter for assistants resource */
|
|
32
|
-
get assistants() {
|
|
33
|
-
this._assistants = this._assistants || (0, assistant_1.AssistantListInstance)(this);
|
|
34
|
-
return this._assistants;
|
|
35
|
-
}
|
|
36
|
-
/** Getter for restoreAssistant resource */
|
|
37
|
-
get restoreAssistant() {
|
|
38
|
-
this._restoreAssistant =
|
|
39
|
-
this._restoreAssistant || (0, restoreAssistant_1.RestoreAssistantListInstance)(this);
|
|
40
|
-
return this._restoreAssistant;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
exports.default = V1;
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { inspect, InspectOptions } from "util";
|
|
3
|
-
import V1 from "../../V1";
|
|
4
|
-
/**
|
|
5
|
-
* Options to pass to update a DefaultsInstance
|
|
6
|
-
*/
|
|
7
|
-
export interface DefaultsContextUpdateOptions {
|
|
8
|
-
/** A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations. */
|
|
9
|
-
defaults?: any;
|
|
10
|
-
}
|
|
11
|
-
export interface DefaultsContext {
|
|
12
|
-
/**
|
|
13
|
-
* Fetch a DefaultsInstance
|
|
14
|
-
*
|
|
15
|
-
* @param callback - Callback to handle processed record
|
|
16
|
-
*
|
|
17
|
-
* @returns Resolves to processed DefaultsInstance
|
|
18
|
-
*/
|
|
19
|
-
fetch(callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
20
|
-
/**
|
|
21
|
-
* Update a DefaultsInstance
|
|
22
|
-
*
|
|
23
|
-
* @param callback - Callback to handle processed record
|
|
24
|
-
*
|
|
25
|
-
* @returns Resolves to processed DefaultsInstance
|
|
26
|
-
*/
|
|
27
|
-
update(callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
28
|
-
/**
|
|
29
|
-
* Update a DefaultsInstance
|
|
30
|
-
*
|
|
31
|
-
* @param params - Parameter for request
|
|
32
|
-
* @param callback - Callback to handle processed record
|
|
33
|
-
*
|
|
34
|
-
* @returns Resolves to processed DefaultsInstance
|
|
35
|
-
*/
|
|
36
|
-
update(params: DefaultsContextUpdateOptions, callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
37
|
-
/**
|
|
38
|
-
* Provide a user-friendly representation
|
|
39
|
-
*/
|
|
40
|
-
toJSON(): any;
|
|
41
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
42
|
-
}
|
|
43
|
-
export interface DefaultsContextSolution {
|
|
44
|
-
assistantSid: string;
|
|
45
|
-
}
|
|
46
|
-
export declare class DefaultsContextImpl implements DefaultsContext {
|
|
47
|
-
protected _version: V1;
|
|
48
|
-
protected _solution: DefaultsContextSolution;
|
|
49
|
-
protected _uri: string;
|
|
50
|
-
constructor(_version: V1, assistantSid: string);
|
|
51
|
-
fetch(callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
52
|
-
update(params?: DefaultsContextUpdateOptions | ((error: Error | null, item?: DefaultsInstance) => any), callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
53
|
-
/**
|
|
54
|
-
* Provide a user-friendly representation
|
|
55
|
-
*
|
|
56
|
-
* @returns Object
|
|
57
|
-
*/
|
|
58
|
-
toJSON(): DefaultsContextSolution;
|
|
59
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
60
|
-
}
|
|
61
|
-
interface DefaultsResource {
|
|
62
|
-
account_sid: string;
|
|
63
|
-
assistant_sid: string;
|
|
64
|
-
url: string;
|
|
65
|
-
data: any;
|
|
66
|
-
}
|
|
67
|
-
export declare class DefaultsInstance {
|
|
68
|
-
protected _version: V1;
|
|
69
|
-
protected _solution: DefaultsContextSolution;
|
|
70
|
-
protected _context?: DefaultsContext;
|
|
71
|
-
constructor(_version: V1, payload: DefaultsResource, assistantSid: string);
|
|
72
|
-
/**
|
|
73
|
-
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Defaults resource.
|
|
74
|
-
*/
|
|
75
|
-
accountSid: string;
|
|
76
|
-
/**
|
|
77
|
-
* The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
|
|
78
|
-
*/
|
|
79
|
-
assistantSid: string;
|
|
80
|
-
/**
|
|
81
|
-
* The absolute URL of the Defaults resource.
|
|
82
|
-
*/
|
|
83
|
-
url: string;
|
|
84
|
-
/**
|
|
85
|
-
* The JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
|
|
86
|
-
*/
|
|
87
|
-
data: any;
|
|
88
|
-
private get _proxy();
|
|
89
|
-
/**
|
|
90
|
-
* Fetch a DefaultsInstance
|
|
91
|
-
*
|
|
92
|
-
* @param callback - Callback to handle processed record
|
|
93
|
-
*
|
|
94
|
-
* @returns Resolves to processed DefaultsInstance
|
|
95
|
-
*/
|
|
96
|
-
fetch(callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
97
|
-
/**
|
|
98
|
-
* Update a DefaultsInstance
|
|
99
|
-
*
|
|
100
|
-
* @param callback - Callback to handle processed record
|
|
101
|
-
*
|
|
102
|
-
* @returns Resolves to processed DefaultsInstance
|
|
103
|
-
*/
|
|
104
|
-
update(callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
105
|
-
/**
|
|
106
|
-
* Update a DefaultsInstance
|
|
107
|
-
*
|
|
108
|
-
* @param params - Parameter for request
|
|
109
|
-
* @param callback - Callback to handle processed record
|
|
110
|
-
*
|
|
111
|
-
* @returns Resolves to processed DefaultsInstance
|
|
112
|
-
*/
|
|
113
|
-
update(params: DefaultsContextUpdateOptions, callback?: (error: Error | null, item?: DefaultsInstance) => any): Promise<DefaultsInstance>;
|
|
114
|
-
/**
|
|
115
|
-
* Provide a user-friendly representation
|
|
116
|
-
*
|
|
117
|
-
* @returns Object
|
|
118
|
-
*/
|
|
119
|
-
toJSON(): {
|
|
120
|
-
accountSid: string;
|
|
121
|
-
assistantSid: string;
|
|
122
|
-
url: string;
|
|
123
|
-
data: any;
|
|
124
|
-
};
|
|
125
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
126
|
-
}
|
|
127
|
-
export interface DefaultsSolution {
|
|
128
|
-
assistantSid: string;
|
|
129
|
-
}
|
|
130
|
-
export interface DefaultsListInstance {
|
|
131
|
-
_version: V1;
|
|
132
|
-
_solution: DefaultsSolution;
|
|
133
|
-
_uri: string;
|
|
134
|
-
(): DefaultsContext;
|
|
135
|
-
get(): DefaultsContext;
|
|
136
|
-
/**
|
|
137
|
-
* Provide a user-friendly representation
|
|
138
|
-
*/
|
|
139
|
-
toJSON(): any;
|
|
140
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
141
|
-
}
|
|
142
|
-
export declare function DefaultsListInstance(version: V1, assistantSid: string): DefaultsListInstance;
|
|
143
|
-
export {};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by
|
|
4
|
-
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
-
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
-
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
-
*
|
|
8
|
-
* Twilio - Autopilot
|
|
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.DefaultsListInstance = exports.DefaultsInstance = exports.DefaultsContextImpl = 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 DefaultsContextImpl {
|
|
22
|
-
constructor(_version, assistantSid) {
|
|
23
|
-
this._version = _version;
|
|
24
|
-
if (!(0, utility_1.isValidPathParam)(assistantSid)) {
|
|
25
|
-
throw new Error("Parameter 'assistantSid' is not valid.");
|
|
26
|
-
}
|
|
27
|
-
this._solution = { assistantSid };
|
|
28
|
-
this._uri = `/Assistants/${assistantSid}/Defaults`;
|
|
29
|
-
}
|
|
30
|
-
fetch(callback) {
|
|
31
|
-
const instance = this;
|
|
32
|
-
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
33
|
-
uri: instance._uri,
|
|
34
|
-
method: "get",
|
|
35
|
-
});
|
|
36
|
-
operationPromise = operationPromise.then((payload) => new DefaultsInstance(operationVersion, payload, instance._solution.assistantSid));
|
|
37
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
38
|
-
return operationPromise;
|
|
39
|
-
}
|
|
40
|
-
update(params, callback) {
|
|
41
|
-
if (params instanceof Function) {
|
|
42
|
-
callback = params;
|
|
43
|
-
params = {};
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
params = params || {};
|
|
47
|
-
}
|
|
48
|
-
let data = {};
|
|
49
|
-
if (params["defaults"] !== undefined)
|
|
50
|
-
data["Defaults"] = serialize.object(params["defaults"]);
|
|
51
|
-
const headers = {};
|
|
52
|
-
headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
53
|
-
const instance = this;
|
|
54
|
-
let operationVersion = instance._version, operationPromise = operationVersion.update({
|
|
55
|
-
uri: instance._uri,
|
|
56
|
-
method: "post",
|
|
57
|
-
data,
|
|
58
|
-
headers,
|
|
59
|
-
});
|
|
60
|
-
operationPromise = operationPromise.then((payload) => new DefaultsInstance(operationVersion, payload, instance._solution.assistantSid));
|
|
61
|
-
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
62
|
-
return operationPromise;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Provide a user-friendly representation
|
|
66
|
-
*
|
|
67
|
-
* @returns Object
|
|
68
|
-
*/
|
|
69
|
-
toJSON() {
|
|
70
|
-
return this._solution;
|
|
71
|
-
}
|
|
72
|
-
[util_1.inspect.custom](_depth, options) {
|
|
73
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
exports.DefaultsContextImpl = DefaultsContextImpl;
|
|
77
|
-
class DefaultsInstance {
|
|
78
|
-
constructor(_version, payload, assistantSid) {
|
|
79
|
-
this._version = _version;
|
|
80
|
-
this.accountSid = payload.account_sid;
|
|
81
|
-
this.assistantSid = payload.assistant_sid;
|
|
82
|
-
this.url = payload.url;
|
|
83
|
-
this.data = payload.data;
|
|
84
|
-
this._solution = { assistantSid };
|
|
85
|
-
}
|
|
86
|
-
get _proxy() {
|
|
87
|
-
this._context =
|
|
88
|
-
this._context ||
|
|
89
|
-
new DefaultsContextImpl(this._version, this._solution.assistantSid);
|
|
90
|
-
return this._context;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Fetch a DefaultsInstance
|
|
94
|
-
*
|
|
95
|
-
* @param callback - Callback to handle processed record
|
|
96
|
-
*
|
|
97
|
-
* @returns Resolves to processed DefaultsInstance
|
|
98
|
-
*/
|
|
99
|
-
fetch(callback) {
|
|
100
|
-
return this._proxy.fetch(callback);
|
|
101
|
-
}
|
|
102
|
-
update(params, callback) {
|
|
103
|
-
return this._proxy.update(params, callback);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Provide a user-friendly representation
|
|
107
|
-
*
|
|
108
|
-
* @returns Object
|
|
109
|
-
*/
|
|
110
|
-
toJSON() {
|
|
111
|
-
return {
|
|
112
|
-
accountSid: this.accountSid,
|
|
113
|
-
assistantSid: this.assistantSid,
|
|
114
|
-
url: this.url,
|
|
115
|
-
data: this.data,
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
[util_1.inspect.custom](_depth, options) {
|
|
119
|
-
return (0, util_1.inspect)(this.toJSON(), options);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
exports.DefaultsInstance = DefaultsInstance;
|
|
123
|
-
function DefaultsListInstance(version, assistantSid) {
|
|
124
|
-
if (!(0, utility_1.isValidPathParam)(assistantSid)) {
|
|
125
|
-
throw new Error("Parameter 'assistantSid' is not valid.");
|
|
126
|
-
}
|
|
127
|
-
const instance = (() => instance.get());
|
|
128
|
-
instance.get = function get() {
|
|
129
|
-
return new DefaultsContextImpl(version, assistantSid);
|
|
130
|
-
};
|
|
131
|
-
instance._version = version;
|
|
132
|
-
instance._solution = { assistantSid };
|
|
133
|
-
instance._uri = ``;
|
|
134
|
-
instance.toJSON = function toJSON() {
|
|
135
|
-
return instance._solution;
|
|
136
|
-
};
|
|
137
|
-
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
138
|
-
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
139
|
-
};
|
|
140
|
-
return instance;
|
|
141
|
-
}
|
|
142
|
-
exports.DefaultsListInstance = DefaultsListInstance;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { inspect, InspectOptions } from "util";
|
|
3
|
-
import V1 from "../../V1";
|
|
4
|
-
export interface DialogueContext {
|
|
5
|
-
/**
|
|
6
|
-
* Fetch a DialogueInstance
|
|
7
|
-
*
|
|
8
|
-
* @param callback - Callback to handle processed record
|
|
9
|
-
*
|
|
10
|
-
* @returns Resolves to processed DialogueInstance
|
|
11
|
-
*/
|
|
12
|
-
fetch(callback?: (error: Error | null, item?: DialogueInstance) => any): Promise<DialogueInstance>;
|
|
13
|
-
/**
|
|
14
|
-
* Provide a user-friendly representation
|
|
15
|
-
*/
|
|
16
|
-
toJSON(): any;
|
|
17
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
18
|
-
}
|
|
19
|
-
export interface DialogueContextSolution {
|
|
20
|
-
assistantSid: string;
|
|
21
|
-
sid: string;
|
|
22
|
-
}
|
|
23
|
-
export declare class DialogueContextImpl implements DialogueContext {
|
|
24
|
-
protected _version: V1;
|
|
25
|
-
protected _solution: DialogueContextSolution;
|
|
26
|
-
protected _uri: string;
|
|
27
|
-
constructor(_version: V1, assistantSid: string, sid: string);
|
|
28
|
-
fetch(callback?: (error: Error | null, item?: DialogueInstance) => any): Promise<DialogueInstance>;
|
|
29
|
-
/**
|
|
30
|
-
* Provide a user-friendly representation
|
|
31
|
-
*
|
|
32
|
-
* @returns Object
|
|
33
|
-
*/
|
|
34
|
-
toJSON(): DialogueContextSolution;
|
|
35
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
36
|
-
}
|
|
37
|
-
interface DialogueResource {
|
|
38
|
-
account_sid: string;
|
|
39
|
-
assistant_sid: string;
|
|
40
|
-
sid: string;
|
|
41
|
-
data: any;
|
|
42
|
-
url: string;
|
|
43
|
-
}
|
|
44
|
-
export declare class DialogueInstance {
|
|
45
|
-
protected _version: V1;
|
|
46
|
-
protected _solution: DialogueContextSolution;
|
|
47
|
-
protected _context?: DialogueContext;
|
|
48
|
-
constructor(_version: V1, payload: DialogueResource, assistantSid: string, sid?: string);
|
|
49
|
-
/**
|
|
50
|
-
* The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Dialogue resource.
|
|
51
|
-
*/
|
|
52
|
-
accountSid: string;
|
|
53
|
-
/**
|
|
54
|
-
* The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
|
|
55
|
-
*/
|
|
56
|
-
assistantSid: string;
|
|
57
|
-
/**
|
|
58
|
-
* The unique string that we created to identify the Dialogue resource.
|
|
59
|
-
*/
|
|
60
|
-
sid: string;
|
|
61
|
-
/**
|
|
62
|
-
* The JSON string that describes the dialogue session object.
|
|
63
|
-
*/
|
|
64
|
-
data: any;
|
|
65
|
-
/**
|
|
66
|
-
* The absolute URL of the Dialogue resource.
|
|
67
|
-
*/
|
|
68
|
-
url: string;
|
|
69
|
-
private get _proxy();
|
|
70
|
-
/**
|
|
71
|
-
* Fetch a DialogueInstance
|
|
72
|
-
*
|
|
73
|
-
* @param callback - Callback to handle processed record
|
|
74
|
-
*
|
|
75
|
-
* @returns Resolves to processed DialogueInstance
|
|
76
|
-
*/
|
|
77
|
-
fetch(callback?: (error: Error | null, item?: DialogueInstance) => any): Promise<DialogueInstance>;
|
|
78
|
-
/**
|
|
79
|
-
* Provide a user-friendly representation
|
|
80
|
-
*
|
|
81
|
-
* @returns Object
|
|
82
|
-
*/
|
|
83
|
-
toJSON(): {
|
|
84
|
-
accountSid: string;
|
|
85
|
-
assistantSid: string;
|
|
86
|
-
sid: string;
|
|
87
|
-
data: any;
|
|
88
|
-
url: string;
|
|
89
|
-
};
|
|
90
|
-
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
91
|
-
}
|
|
92
|
-
export interface DialogueSolution {
|
|
93
|
-
assistantSid: string;
|
|
94
|
-
}
|
|
95
|
-
export interface DialogueListInstance {
|
|
96
|
-
_version: V1;
|
|
97
|
-
_solution: DialogueSolution;
|
|
98
|
-
_uri: string;
|
|
99
|
-
(sid: string): DialogueContext;
|
|
100
|
-
get(sid: string): DialogueContext;
|
|
101
|
-
/**
|
|
102
|
-
* Provide a user-friendly representation
|
|
103
|
-
*/
|
|
104
|
-
toJSON(): any;
|
|
105
|
-
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
106
|
-
}
|
|
107
|
-
export declare function DialogueListInstance(version: V1, assistantSid: string): DialogueListInstance;
|
|
108
|
-
export {};
|