twilio 5.3.0 → 5.3.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.
Files changed (56) hide show
  1. package/lib/rest/Assistants.d.ts +4 -0
  2. package/lib/rest/Assistants.js +8 -0
  3. package/lib/rest/AssistantsBase.d.ts +13 -0
  4. package/lib/rest/AssistantsBase.js +31 -0
  5. package/lib/rest/Preview.d.ts +0 -5
  6. package/lib/rest/Preview.js +0 -7
  7. package/lib/rest/Twilio.d.ts +5 -0
  8. package/lib/rest/Twilio.js +6 -0
  9. package/lib/rest/accounts/V1.d.ts +10 -0
  10. package/lib/rest/accounts/V1.js +12 -0
  11. package/lib/rest/accounts/v1/bulkConsents.d.ts +53 -0
  12. package/lib/rest/accounts/v1/bulkConsents.js +74 -0
  13. package/lib/rest/accounts/v1/bulkContacts.d.ts +53 -0
  14. package/lib/rest/accounts/v1/bulkContacts.js +74 -0
  15. package/lib/rest/assistants/V1.d.ts +35 -0
  16. package/lib/rest/assistants/V1.js +60 -0
  17. package/lib/rest/assistants/v1/assistant/assistantsKnowledge.d.ts +260 -0
  18. package/lib/rest/assistants/v1/assistant/assistantsKnowledge.js +214 -0
  19. package/lib/rest/assistants/v1/assistant/assistantsTool.d.ts +266 -0
  20. package/lib/rest/assistants/v1/assistant/assistantsTool.js +216 -0
  21. package/lib/rest/assistants/v1/assistant/feedback.d.ts +231 -0
  22. package/lib/rest/assistants/v1/assistant/feedback.js +161 -0
  23. package/lib/rest/assistants/v1/assistant/message.d.ts +112 -0
  24. package/lib/rest/assistants/v1/assistant/message.js +90 -0
  25. package/lib/rest/assistants/v1/assistant.d.ts +504 -0
  26. package/lib/rest/assistants/v1/assistant.js +324 -0
  27. package/lib/rest/assistants/v1/knowledge/chunk.d.ts +167 -0
  28. package/lib/rest/assistants/v1/knowledge/chunk.js +130 -0
  29. package/lib/rest/assistants/v1/knowledge/knowledgeStatus.d.ts +101 -0
  30. package/lib/rest/assistants/v1/knowledge/knowledgeStatus.js +115 -0
  31. package/lib/rest/assistants/v1/knowledge.d.ts +399 -0
  32. package/lib/rest/assistants/v1/knowledge.js +288 -0
  33. package/lib/rest/assistants/v1/policy.d.ts +202 -0
  34. package/lib/rest/assistants/v1/policy.js +138 -0
  35. package/lib/rest/assistants/v1/session/message.d.ts +197 -0
  36. package/lib/rest/assistants/v1/session/message.js +140 -0
  37. package/lib/rest/assistants/v1/session.d.ts +231 -0
  38. package/lib/rest/assistants/v1/session.js +194 -0
  39. package/lib/rest/assistants/v1/tool.d.ts +445 -0
  40. package/lib/rest/assistants/v1/tool.js +269 -0
  41. package/lib/rest/content/v1/content/approvalFetch.d.ts +5 -5
  42. package/lib/rest/content/v1/content/approvalFetch.js +14 -14
  43. package/lib/rest/intelligence/v2/operatorType.d.ts +1 -1
  44. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.d.ts +12 -18
  45. package/lib/rest/marketplace/v1/installedAddOn/installedAddOnUsage.js +3 -6
  46. package/lib/rest/marketplace/v1/moduleDataManagement.d.ts +14 -6
  47. package/lib/rest/marketplace/v1/moduleDataManagement.js +4 -0
  48. package/lib/rest/numbers/V1.d.ts +5 -5
  49. package/lib/rest/numbers/V1.js +6 -8
  50. package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.d.ts → webhook.d.ts} +10 -10
  51. package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.js → webhook.js} +6 -6
  52. package/lib/rest/numbers/v2/bundleClone.d.ts +1 -1
  53. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +4 -4
  54. package/lib/rest/serverless/v1/service/environment/deployment.d.ts +2 -0
  55. package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
  56. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import AssistantsBase from "./AssistantsBase";
2
+ declare class Assistants extends AssistantsBase {
3
+ }
4
+ export = Assistants;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const AssistantsBase_1 = __importDefault(require("./AssistantsBase"));
6
+ class Assistants extends AssistantsBase_1.default {
7
+ }
8
+ module.exports = Assistants;
@@ -0,0 +1,13 @@
1
+ import Domain from "../base/Domain";
2
+ import V1 from "./assistants/V1";
3
+ declare class AssistantsBase extends Domain {
4
+ _v1?: V1;
5
+ /**
6
+ * Initialize assistants domain
7
+ *
8
+ * @param twilio - The twilio client
9
+ */
10
+ constructor(twilio: any);
11
+ get v1(): V1;
12
+ }
13
+ export = AssistantsBase;
@@ -0,0 +1,31 @@
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("./assistants/V1"));
17
+ class AssistantsBase extends Domain_1.default {
18
+ /**
19
+ * Initialize assistants domain
20
+ *
21
+ * @param twilio - The twilio client
22
+ */
23
+ constructor(twilio) {
24
+ super(twilio, "https://assistants.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 = AssistantsBase;
@@ -1,4 +1,3 @@
1
- import { FleetListInstance } from "./preview/deployed_devices/fleet";
2
1
  import { AuthorizationDocumentListInstance } from "./preview/hosted_numbers/authorizationDocument";
3
2
  import { HostedNumberOrderListInstance } from "./preview/hosted_numbers/hostedNumberOrder";
4
3
  import { AvailableAddOnListInstance } from "./preview/marketplace/availableAddOn";
@@ -9,10 +8,6 @@ import { RatePlanListInstance } from "./preview/wireless/ratePlan";
9
8
  import { SimListInstance } from "./preview/wireless/sim";
10
9
  import PreviewBase from "./PreviewBase";
11
10
  declare class Preview extends PreviewBase {
12
- /**
13
- * @deprecated - Use deployed_devices.fleets instead
14
- */
15
- get fleets(): FleetListInstance;
16
11
  /**
17
12
  * @deprecated - Use hosted_numbers.authorizationDocuments instead
18
13
  */
@@ -4,13 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  const PreviewBase_1 = __importDefault(require("./PreviewBase"));
6
6
  class Preview extends PreviewBase_1.default {
7
- /**
8
- * @deprecated - Use deployed_devices.fleets instead
9
- */
10
- get fleets() {
11
- console.warn("fleets is deprecated. Use deployed_devices.fleets instead.");
12
- return this.deployed_devices.fleets;
13
- }
14
7
  /**
15
8
  * @deprecated - Use hosted_numbers.authorizationDocuments instead
16
9
  */
@@ -1,6 +1,7 @@
1
1
  import { Client, ClientOpts, RequestOpts } from "../base/BaseTwilio";
2
2
  import Accounts from "./Accounts";
3
3
  import Api from "./Api";
4
+ import Assistants from "./Assistants";
4
5
  import Bulkexports from "./Bulkexports";
5
6
  import Chat from "./Chat";
6
7
  import Content from "./Content";
@@ -67,6 +68,8 @@ declare class Twilio extends Client {
67
68
  _accounts?: Accounts;
68
69
  /** (Twilio.Api) - api domain */
69
70
  _api?: Api;
71
+ /** (Twilio.Assistants) - assistants domain */
72
+ _assistants?: Assistants;
70
73
  /** (Twilio.Bulkexports) - bulkexports domain */
71
74
  _bulkexports?: Bulkexports;
72
75
  /** (Twilio.Chat) - chat domain */
@@ -151,6 +154,8 @@ declare class Twilio extends Client {
151
154
  get accounts(): Accounts;
152
155
  /** Getter for (Twilio.Api) domain */
153
156
  get api(): Api;
157
+ /** Getter for (Twilio.Assistants) domain */
158
+ get assistants(): Assistants;
154
159
  /** Getter for (Twilio.Bulkexports) domain */
155
160
  get bulkexports(): Bulkexports;
156
161
  /** Getter for (Twilio.Chat) domain */
@@ -34,6 +34,7 @@ class Twilio extends BaseTwilio_1.Client {
34
34
  if (this.opts?.lazyLoading === false) {
35
35
  this.accounts;
36
36
  this.api;
37
+ this.assistants;
37
38
  this.bulkexports;
38
39
  this.chat;
39
40
  this.content;
@@ -79,6 +80,11 @@ class Twilio extends BaseTwilio_1.Client {
79
80
  get api() {
80
81
  return this._api ?? (this._api = new (require("./Api"))(this));
81
82
  }
83
+ /** Getter for (Twilio.Assistants) domain */
84
+ get assistants() {
85
+ return (this._assistants ??
86
+ (this._assistants = new (require("./Assistants"))(this)));
87
+ }
82
88
  /** Getter for (Twilio.Bulkexports) domain */
83
89
  get bulkexports() {
84
90
  return (this._bulkexports ??
@@ -1,6 +1,8 @@
1
1
  import AccountsBase from "../AccountsBase";
2
2
  import Version from "../../base/Version";
3
3
  import { AuthTokenPromotionListInstance } from "./v1/authTokenPromotion";
4
+ import { BulkConsentsListInstance } from "./v1/bulkConsents";
5
+ import { BulkContactsListInstance } from "./v1/bulkContacts";
4
6
  import { CredentialListInstance } from "./v1/credential";
5
7
  import { SafelistListInstance } from "./v1/safelist";
6
8
  import { SecondaryAuthTokenListInstance } from "./v1/secondaryAuthToken";
@@ -13,6 +15,10 @@ export default class V1 extends Version {
13
15
  constructor(domain: AccountsBase);
14
16
  /** authTokenPromotion - { Twilio.Accounts.V1.AuthTokenPromotionListInstance } resource */
15
17
  protected _authTokenPromotion?: AuthTokenPromotionListInstance;
18
+ /** bulkConsents - { Twilio.Accounts.V1.BulkConsentsListInstance } resource */
19
+ protected _bulkConsents?: BulkConsentsListInstance;
20
+ /** bulkContacts - { Twilio.Accounts.V1.BulkContactsListInstance } resource */
21
+ protected _bulkContacts?: BulkContactsListInstance;
16
22
  /** credentials - { Twilio.Accounts.V1.CredentialListInstance } resource */
17
23
  protected _credentials?: CredentialListInstance;
18
24
  /** safelist - { Twilio.Accounts.V1.SafelistListInstance } resource */
@@ -21,6 +27,10 @@ export default class V1 extends Version {
21
27
  protected _secondaryAuthToken?: SecondaryAuthTokenListInstance;
22
28
  /** Getter for authTokenPromotion resource */
23
29
  get authTokenPromotion(): AuthTokenPromotionListInstance;
30
+ /** Getter for bulkConsents resource */
31
+ get bulkConsents(): BulkConsentsListInstance;
32
+ /** Getter for bulkContacts resource */
33
+ get bulkContacts(): BulkContactsListInstance;
24
34
  /** Getter for credentials resource */
25
35
  get credentials(): CredentialListInstance;
26
36
  /** Getter for safelist resource */
@@ -18,6 +18,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
20
  const authTokenPromotion_1 = require("./v1/authTokenPromotion");
21
+ const bulkConsents_1 = require("./v1/bulkConsents");
22
+ const bulkContacts_1 = require("./v1/bulkContacts");
21
23
  const credential_1 = require("./v1/credential");
22
24
  const safelist_1 = require("./v1/safelist");
23
25
  const secondaryAuthToken_1 = require("./v1/secondaryAuthToken");
@@ -36,6 +38,16 @@ class V1 extends Version_1.default {
36
38
  this._authTokenPromotion || (0, authTokenPromotion_1.AuthTokenPromotionListInstance)(this);
37
39
  return this._authTokenPromotion;
38
40
  }
41
+ /** Getter for bulkConsents resource */
42
+ get bulkConsents() {
43
+ this._bulkConsents = this._bulkConsents || (0, bulkConsents_1.BulkConsentsListInstance)(this);
44
+ return this._bulkConsents;
45
+ }
46
+ /** Getter for bulkContacts resource */
47
+ get bulkContacts() {
48
+ this._bulkContacts = this._bulkContacts || (0, bulkContacts_1.BulkContactsListInstance)(this);
49
+ return this._bulkContacts;
50
+ }
39
51
  /** Getter for credentials resource */
40
52
  get credentials() {
41
53
  this._credentials = this._credentials || (0, credential_1.CredentialListInstance)(this);
@@ -0,0 +1,53 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ /**
5
+ * Options to pass to create a BulkConsentsInstance
6
+ */
7
+ export interface BulkConsentsListInstanceCreateOptions {
8
+ /** This is a list of objects that describes a contact\\\'s opt-in status. Each object contains the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID used to uniquely map the request item with the response item; `sender_id`, which can be either a valid messaging service SID or a from phone number; `status`, a string representing the consent status. Can be one of [`opt-in`, `opt-out`]; and `source`, a string indicating the medium through which the consent was collected. Can be one of [`website`, `offline`, `opt-in-message`, `opt-out-message`, `others`]. */
9
+ items: Array<any>;
10
+ }
11
+ export interface BulkConsentsSolution {
12
+ }
13
+ export interface BulkConsentsListInstance {
14
+ _version: V1;
15
+ _solution: BulkConsentsSolution;
16
+ _uri: string;
17
+ /**
18
+ * Create a BulkConsentsInstance
19
+ *
20
+ * @param params - Parameter for request
21
+ * @param callback - Callback to handle processed record
22
+ *
23
+ * @returns Resolves to processed BulkConsentsInstance
24
+ */
25
+ create(params: BulkConsentsListInstanceCreateOptions, callback?: (error: Error | null, item?: BulkConsentsInstance) => any): Promise<BulkConsentsInstance>;
26
+ /**
27
+ * Provide a user-friendly representation
28
+ */
29
+ toJSON(): any;
30
+ [inspect.custom](_depth: any, options: InspectOptions): any;
31
+ }
32
+ export declare function BulkConsentsListInstance(version: V1): BulkConsentsListInstance;
33
+ interface BulkConsentsResource {
34
+ items: any;
35
+ }
36
+ export declare class BulkConsentsInstance {
37
+ protected _version: V1;
38
+ constructor(_version: V1, payload: BulkConsentsResource);
39
+ /**
40
+ * A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
41
+ */
42
+ items: any;
43
+ /**
44
+ * Provide a user-friendly representation
45
+ *
46
+ * @returns Object
47
+ */
48
+ toJSON(): {
49
+ items: any;
50
+ };
51
+ [inspect.custom](_depth: any, options: InspectOptions): string;
52
+ }
53
+ export {};
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Accounts
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.BulkConsentsInstance = exports.BulkConsentsListInstance = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ function BulkConsentsListInstance(version) {
21
+ const instance = {};
22
+ instance._version = version;
23
+ instance._solution = {};
24
+ instance._uri = `/Consents/Bulk`;
25
+ instance.create = function create(params, callback) {
26
+ if (params === null || params === undefined) {
27
+ throw new Error('Required parameter "params" missing.');
28
+ }
29
+ if (params["items"] === null || params["items"] === undefined) {
30
+ throw new Error("Required parameter \"params['items']\" missing.");
31
+ }
32
+ let data = {};
33
+ data["Items"] = serialize.map(params["items"], (e) => serialize.object(e));
34
+ const headers = {};
35
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
36
+ let operationVersion = version, operationPromise = operationVersion.create({
37
+ uri: instance._uri,
38
+ method: "post",
39
+ data,
40
+ headers,
41
+ });
42
+ operationPromise = operationPromise.then((payload) => new BulkConsentsInstance(operationVersion, payload));
43
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
44
+ return operationPromise;
45
+ };
46
+ instance.toJSON = function toJSON() {
47
+ return instance._solution;
48
+ };
49
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
50
+ return (0, util_1.inspect)(instance.toJSON(), options);
51
+ };
52
+ return instance;
53
+ }
54
+ exports.BulkConsentsListInstance = BulkConsentsListInstance;
55
+ class BulkConsentsInstance {
56
+ constructor(_version, payload) {
57
+ this._version = _version;
58
+ this.items = payload.items;
59
+ }
60
+ /**
61
+ * Provide a user-friendly representation
62
+ *
63
+ * @returns Object
64
+ */
65
+ toJSON() {
66
+ return {
67
+ items: this.items,
68
+ };
69
+ }
70
+ [util_1.inspect.custom](_depth, options) {
71
+ return (0, util_1.inspect)(this.toJSON(), options);
72
+ }
73
+ }
74
+ exports.BulkConsentsInstance = BulkConsentsInstance;
@@ -0,0 +1,53 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ /**
5
+ * Options to pass to create a BulkContactsInstance
6
+ */
7
+ export interface BulkContactsListInstanceCreateOptions {
8
+ /** A list of objects where each object represents a contact\\\'s details. Each object includes the following fields: `contact_id`, which must be a string representing phone number in [E.164 format](https://www.twilio.com/docs/glossary/what-e164); `correlation_id`, a unique 32-character UUID that maps the response to the original request; `country_iso_code`, a string representing the country using the ISO format (e.g., US for the United States); and `zip_code`, a string representing the postal code. */
9
+ items: Array<any>;
10
+ }
11
+ export interface BulkContactsSolution {
12
+ }
13
+ export interface BulkContactsListInstance {
14
+ _version: V1;
15
+ _solution: BulkContactsSolution;
16
+ _uri: string;
17
+ /**
18
+ * Create a BulkContactsInstance
19
+ *
20
+ * @param params - Parameter for request
21
+ * @param callback - Callback to handle processed record
22
+ *
23
+ * @returns Resolves to processed BulkContactsInstance
24
+ */
25
+ create(params: BulkContactsListInstanceCreateOptions, callback?: (error: Error | null, item?: BulkContactsInstance) => any): Promise<BulkContactsInstance>;
26
+ /**
27
+ * Provide a user-friendly representation
28
+ */
29
+ toJSON(): any;
30
+ [inspect.custom](_depth: any, options: InspectOptions): any;
31
+ }
32
+ export declare function BulkContactsListInstance(version: V1): BulkContactsListInstance;
33
+ interface BulkContactsResource {
34
+ items: any;
35
+ }
36
+ export declare class BulkContactsInstance {
37
+ protected _version: V1;
38
+ constructor(_version: V1, payload: BulkContactsResource);
39
+ /**
40
+ * A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
41
+ */
42
+ items: any;
43
+ /**
44
+ * Provide a user-friendly representation
45
+ *
46
+ * @returns Object
47
+ */
48
+ toJSON(): {
49
+ items: any;
50
+ };
51
+ [inspect.custom](_depth: any, options: InspectOptions): string;
52
+ }
53
+ export {};
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Accounts
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.BulkContactsInstance = exports.BulkContactsListInstance = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ function BulkContactsListInstance(version) {
21
+ const instance = {};
22
+ instance._version = version;
23
+ instance._solution = {};
24
+ instance._uri = `/Contacts/Bulk`;
25
+ instance.create = function create(params, callback) {
26
+ if (params === null || params === undefined) {
27
+ throw new Error('Required parameter "params" missing.');
28
+ }
29
+ if (params["items"] === null || params["items"] === undefined) {
30
+ throw new Error("Required parameter \"params['items']\" missing.");
31
+ }
32
+ let data = {};
33
+ data["Items"] = serialize.map(params["items"], (e) => serialize.object(e));
34
+ const headers = {};
35
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
36
+ let operationVersion = version, operationPromise = operationVersion.create({
37
+ uri: instance._uri,
38
+ method: "post",
39
+ data,
40
+ headers,
41
+ });
42
+ operationPromise = operationPromise.then((payload) => new BulkContactsInstance(operationVersion, payload));
43
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
44
+ return operationPromise;
45
+ };
46
+ instance.toJSON = function toJSON() {
47
+ return instance._solution;
48
+ };
49
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
50
+ return (0, util_1.inspect)(instance.toJSON(), options);
51
+ };
52
+ return instance;
53
+ }
54
+ exports.BulkContactsListInstance = BulkContactsListInstance;
55
+ class BulkContactsInstance {
56
+ constructor(_version, payload) {
57
+ this._version = _version;
58
+ this.items = payload.items;
59
+ }
60
+ /**
61
+ * Provide a user-friendly representation
62
+ *
63
+ * @returns Object
64
+ */
65
+ toJSON() {
66
+ return {
67
+ items: this.items,
68
+ };
69
+ }
70
+ [util_1.inspect.custom](_depth, options) {
71
+ return (0, util_1.inspect)(this.toJSON(), options);
72
+ }
73
+ }
74
+ exports.BulkContactsInstance = BulkContactsInstance;
@@ -0,0 +1,35 @@
1
+ import AssistantsBase from "../AssistantsBase";
2
+ import Version from "../../base/Version";
3
+ import { AssistantListInstance } from "./v1/assistant";
4
+ import { KnowledgeListInstance } from "./v1/knowledge";
5
+ import { PolicyListInstance } from "./v1/policy";
6
+ import { SessionListInstance } from "./v1/session";
7
+ import { ToolListInstance } from "./v1/tool";
8
+ export default class V1 extends Version {
9
+ /**
10
+ * Initialize the V1 version of Assistants
11
+ *
12
+ * @param domain - The Twilio (Twilio.Assistants) domain
13
+ */
14
+ constructor(domain: AssistantsBase);
15
+ /** assistants - { Twilio.Assistants.V1.AssistantListInstance } resource */
16
+ protected _assistants?: AssistantListInstance;
17
+ /** knowledge - { Twilio.Assistants.V1.KnowledgeListInstance } resource */
18
+ protected _knowledge?: KnowledgeListInstance;
19
+ /** policies - { Twilio.Assistants.V1.PolicyListInstance } resource */
20
+ protected _policies?: PolicyListInstance;
21
+ /** sessions - { Twilio.Assistants.V1.SessionListInstance } resource */
22
+ protected _sessions?: SessionListInstance;
23
+ /** tools - { Twilio.Assistants.V1.ToolListInstance } resource */
24
+ protected _tools?: ToolListInstance;
25
+ /** Getter for assistants resource */
26
+ get assistants(): AssistantListInstance;
27
+ /** Getter for knowledge resource */
28
+ get knowledge(): KnowledgeListInstance;
29
+ /** Getter for policies resource */
30
+ get policies(): PolicyListInstance;
31
+ /** Getter for sessions resource */
32
+ get sessions(): SessionListInstance;
33
+ /** Getter for tools resource */
34
+ get tools(): ToolListInstance;
35
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Assistants
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 knowledge_1 = require("./v1/knowledge");
22
+ const policy_1 = require("./v1/policy");
23
+ const session_1 = require("./v1/session");
24
+ const tool_1 = require("./v1/tool");
25
+ class V1 extends Version_1.default {
26
+ /**
27
+ * Initialize the V1 version of Assistants
28
+ *
29
+ * @param domain - The Twilio (Twilio.Assistants) domain
30
+ */
31
+ constructor(domain) {
32
+ super(domain, "v1");
33
+ }
34
+ /** Getter for assistants resource */
35
+ get assistants() {
36
+ this._assistants = this._assistants || (0, assistant_1.AssistantListInstance)(this);
37
+ return this._assistants;
38
+ }
39
+ /** Getter for knowledge resource */
40
+ get knowledge() {
41
+ this._knowledge = this._knowledge || (0, knowledge_1.KnowledgeListInstance)(this);
42
+ return this._knowledge;
43
+ }
44
+ /** Getter for policies resource */
45
+ get policies() {
46
+ this._policies = this._policies || (0, policy_1.PolicyListInstance)(this);
47
+ return this._policies;
48
+ }
49
+ /** Getter for sessions resource */
50
+ get sessions() {
51
+ this._sessions = this._sessions || (0, session_1.SessionListInstance)(this);
52
+ return this._sessions;
53
+ }
54
+ /** Getter for tools resource */
55
+ get tools() {
56
+ this._tools = this._tools || (0, tool_1.ToolListInstance)(this);
57
+ return this._tools;
58
+ }
59
+ }
60
+ exports.default = V1;