twilio 5.3.1 → 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 (29) hide show
  1. package/lib/rest/Preview.d.ts +0 -5
  2. package/lib/rest/Preview.js +0 -7
  3. package/lib/rest/accounts/V1.d.ts +10 -0
  4. package/lib/rest/accounts/V1.js +12 -0
  5. package/lib/rest/accounts/v1/bulkConsents.d.ts +53 -0
  6. package/lib/rest/accounts/v1/bulkConsents.js +74 -0
  7. package/lib/rest/accounts/v1/bulkContacts.d.ts +53 -0
  8. package/lib/rest/accounts/v1/bulkContacts.js +74 -0
  9. package/lib/rest/assistants/v1/assistant/assistantsKnowledge.d.ts +260 -0
  10. package/lib/rest/assistants/v1/assistant/assistantsKnowledge.js +214 -0
  11. package/lib/rest/assistants/v1/assistant/assistantsTool.d.ts +266 -0
  12. package/lib/rest/assistants/v1/assistant/assistantsTool.js +216 -0
  13. package/lib/rest/assistants/v1/assistant/message.d.ts +112 -0
  14. package/lib/rest/assistants/v1/assistant/message.js +90 -0
  15. package/lib/rest/assistants/v1/assistant.d.ts +38 -0
  16. package/lib/rest/assistants/v1/assistant.js +40 -0
  17. package/lib/rest/assistants/v1/knowledge/knowledgeStatus.d.ts +101 -0
  18. package/lib/rest/assistants/v1/knowledge/knowledgeStatus.js +115 -0
  19. package/lib/rest/assistants/v1/knowledge.d.ts +14 -0
  20. package/lib/rest/assistants/v1/knowledge.js +15 -0
  21. package/lib/rest/assistants/v1/tool.d.ts +67 -0
  22. package/lib/rest/assistants/v1/tool.js +28 -1
  23. package/lib/rest/numbers/V1.d.ts +5 -5
  24. package/lib/rest/numbers/V1.js +6 -8
  25. package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.d.ts → webhook.d.ts} +10 -10
  26. package/lib/rest/numbers/v1/{portingWebhookConfigurationFetch.js → webhook.js} +6 -6
  27. package/lib/rest/serverless/v1/service/environment/deployment.d.ts +2 -0
  28. package/lib/rest/serverless/v1/service/environment/deployment.js +2 -0
  29. package/package.json +1 -1
@@ -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,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,260 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
+ import Response from "../../../../http/response";
5
+ import V1 from "../../V1";
6
+ /**
7
+ * Options to pass to each
8
+ */
9
+ export interface AssistantsKnowledgeListInstanceEachOptions {
10
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
11
+ pageSize?: number;
12
+ /** Function to process each record. If this and a positional callback are passed, this one will be used */
13
+ callback?: (item: AssistantsKnowledgeInstance, done: (err?: Error) => void) => void;
14
+ /** Function to be called upon completion of streaming */
15
+ done?: Function;
16
+ /** Upper limit for the number of records to return. each() guarantees never to return more than limit. Default is no limit */
17
+ limit?: number;
18
+ }
19
+ /**
20
+ * Options to pass to list
21
+ */
22
+ export interface AssistantsKnowledgeListInstanceOptions {
23
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
24
+ pageSize?: number;
25
+ /** Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit */
26
+ limit?: number;
27
+ }
28
+ /**
29
+ * Options to pass to page
30
+ */
31
+ export interface AssistantsKnowledgeListInstancePageOptions {
32
+ /** How many resources to return in each list page. The default is 50, and the maximum is 1000. */
33
+ pageSize?: number;
34
+ /** Page Number, this value is simply for client state */
35
+ pageNumber?: number;
36
+ /** PageToken provided by the API */
37
+ pageToken?: string;
38
+ }
39
+ export interface AssistantsKnowledgeContext {
40
+ /**
41
+ * Create a AssistantsKnowledgeInstance
42
+ *
43
+ * @param callback - Callback to handle processed record
44
+ *
45
+ * @returns Resolves to processed AssistantsKnowledgeInstance
46
+ */
47
+ create(callback?: (error: Error | null, item?: AssistantsKnowledgeInstance) => any): Promise<AssistantsKnowledgeInstance>;
48
+ /**
49
+ * Remove a AssistantsKnowledgeInstance
50
+ *
51
+ * @param callback - Callback to handle processed record
52
+ *
53
+ * @returns Resolves to processed boolean
54
+ */
55
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
56
+ /**
57
+ * Provide a user-friendly representation
58
+ */
59
+ toJSON(): any;
60
+ [inspect.custom](_depth: any, options: InspectOptions): any;
61
+ }
62
+ export interface AssistantsKnowledgeContextSolution {
63
+ assistantId: string;
64
+ id: string;
65
+ }
66
+ export declare class AssistantsKnowledgeContextImpl implements AssistantsKnowledgeContext {
67
+ protected _version: V1;
68
+ protected _solution: AssistantsKnowledgeContextSolution;
69
+ protected _uri: string;
70
+ constructor(_version: V1, assistantId: string, id: string);
71
+ create(callback?: (error: Error | null, item?: AssistantsKnowledgeInstance) => any): Promise<AssistantsKnowledgeInstance>;
72
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
73
+ /**
74
+ * Provide a user-friendly representation
75
+ *
76
+ * @returns Object
77
+ */
78
+ toJSON(): AssistantsKnowledgeContextSolution;
79
+ [inspect.custom](_depth: any, options: InspectOptions): string;
80
+ }
81
+ interface AssistantsKnowledgePayload extends TwilioResponsePayload {
82
+ knowledge: AssistantsKnowledgeResource[];
83
+ }
84
+ interface AssistantsKnowledgeResource {
85
+ description: string;
86
+ id: string;
87
+ account_sid: string;
88
+ knowledge_source_details: Record<string, object>;
89
+ name: string;
90
+ status: string;
91
+ type: string;
92
+ url: string;
93
+ date_created: Date;
94
+ date_updated: Date;
95
+ }
96
+ export declare class AssistantsKnowledgeInstance {
97
+ protected _version: V1;
98
+ protected _solution: AssistantsKnowledgeContextSolution;
99
+ protected _context?: AssistantsKnowledgeContext;
100
+ constructor(_version: V1, payload: AssistantsKnowledgeResource, assistantId: string, id?: string);
101
+ /**
102
+ * The type of knowledge source.
103
+ */
104
+ description: string;
105
+ /**
106
+ * The description of knowledge.
107
+ */
108
+ id: string;
109
+ /**
110
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
111
+ */
112
+ accountSid: string;
113
+ /**
114
+ * The details of the knowledge source based on the type.
115
+ */
116
+ knowledgeSourceDetails: Record<string, object>;
117
+ /**
118
+ * The name of the knowledge source.
119
+ */
120
+ name: string;
121
+ /**
122
+ * The status of processing the knowledge source (\'QUEUED\', \'PROCESSING\', \'COMPLETED\', \'FAILED\')
123
+ */
124
+ status: string;
125
+ /**
126
+ * The type of knowledge source (\'Web\', \'Database\', \'Text\', \'File\')
127
+ */
128
+ type: string;
129
+ /**
130
+ * The url of the knowledge resource.
131
+ */
132
+ url: string;
133
+ /**
134
+ * The date and time in GMT when the Knowledge was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
135
+ */
136
+ dateCreated: Date;
137
+ /**
138
+ * The date and time in GMT when the Knowledge was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
139
+ */
140
+ dateUpdated: Date;
141
+ private get _proxy();
142
+ /**
143
+ * Create a AssistantsKnowledgeInstance
144
+ *
145
+ * @param callback - Callback to handle processed record
146
+ *
147
+ * @returns Resolves to processed AssistantsKnowledgeInstance
148
+ */
149
+ create(callback?: (error: Error | null, item?: AssistantsKnowledgeInstance) => any): Promise<AssistantsKnowledgeInstance>;
150
+ /**
151
+ * Remove a AssistantsKnowledgeInstance
152
+ *
153
+ * @param callback - Callback to handle processed record
154
+ *
155
+ * @returns Resolves to processed boolean
156
+ */
157
+ remove(callback?: (error: Error | null, item?: boolean) => any): Promise<boolean>;
158
+ /**
159
+ * Provide a user-friendly representation
160
+ *
161
+ * @returns Object
162
+ */
163
+ toJSON(): {
164
+ description: string;
165
+ id: string;
166
+ accountSid: string;
167
+ knowledgeSourceDetails: Record<string, object>;
168
+ name: string;
169
+ status: string;
170
+ type: string;
171
+ url: string;
172
+ dateCreated: Date;
173
+ dateUpdated: Date;
174
+ };
175
+ [inspect.custom](_depth: any, options: InspectOptions): string;
176
+ }
177
+ export interface AssistantsKnowledgeSolution {
178
+ assistantId: string;
179
+ }
180
+ export interface AssistantsKnowledgeListInstance {
181
+ _version: V1;
182
+ _solution: AssistantsKnowledgeSolution;
183
+ _uri: string;
184
+ (id: string): AssistantsKnowledgeContext;
185
+ get(id: string): AssistantsKnowledgeContext;
186
+ /**
187
+ * Streams AssistantsKnowledgeInstance records from the API.
188
+ *
189
+ * This operation lazily loads records as efficiently as possible until the limit
190
+ * is reached.
191
+ *
192
+ * The results are passed into the callback function, so this operation is memory
193
+ * efficient.
194
+ *
195
+ * If a function is passed as the first argument, it will be used as the callback
196
+ * function.
197
+ *
198
+ * @param { AssistantsKnowledgeListInstanceEachOptions } [params] - Options for request
199
+ * @param { function } [callback] - Function to process each record
200
+ */
201
+ each(callback?: (item: AssistantsKnowledgeInstance, done: (err?: Error) => void) => void): void;
202
+ each(params: AssistantsKnowledgeListInstanceEachOptions, callback?: (item: AssistantsKnowledgeInstance, done: (err?: Error) => void) => void): void;
203
+ /**
204
+ * Retrieve a single target page of AssistantsKnowledgeInstance records from the API.
205
+ *
206
+ * The request is executed immediately.
207
+ *
208
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
209
+ * @param { function } [callback] - Callback to handle list of records
210
+ */
211
+ getPage(targetUrl: string, callback?: (error: Error | null, items: AssistantsKnowledgePage) => any): Promise<AssistantsKnowledgePage>;
212
+ /**
213
+ * Lists AssistantsKnowledgeInstance records from the API as a list.
214
+ *
215
+ * If a function is passed as the first argument, it will be used as the callback
216
+ * function.
217
+ *
218
+ * @param { AssistantsKnowledgeListInstanceOptions } [params] - Options for request
219
+ * @param { function } [callback] - Callback to handle list of records
220
+ */
221
+ list(callback?: (error: Error | null, items: AssistantsKnowledgeInstance[]) => any): Promise<AssistantsKnowledgeInstance[]>;
222
+ list(params: AssistantsKnowledgeListInstanceOptions, callback?: (error: Error | null, items: AssistantsKnowledgeInstance[]) => any): Promise<AssistantsKnowledgeInstance[]>;
223
+ /**
224
+ * Retrieve a single page of AssistantsKnowledgeInstance records from the API.
225
+ *
226
+ * The request is executed immediately.
227
+ *
228
+ * If a function is passed as the first argument, it will be used as the callback
229
+ * function.
230
+ *
231
+ * @param { AssistantsKnowledgeListInstancePageOptions } [params] - Options for request
232
+ * @param { function } [callback] - Callback to handle list of records
233
+ */
234
+ page(callback?: (error: Error | null, items: AssistantsKnowledgePage) => any): Promise<AssistantsKnowledgePage>;
235
+ page(params: AssistantsKnowledgeListInstancePageOptions, callback?: (error: Error | null, items: AssistantsKnowledgePage) => any): Promise<AssistantsKnowledgePage>;
236
+ /**
237
+ * Provide a user-friendly representation
238
+ */
239
+ toJSON(): any;
240
+ [inspect.custom](_depth: any, options: InspectOptions): any;
241
+ }
242
+ export declare function AssistantsKnowledgeListInstance(version: V1, assistantId: string): AssistantsKnowledgeListInstance;
243
+ export declare class AssistantsKnowledgePage extends Page<V1, AssistantsKnowledgePayload, AssistantsKnowledgeResource, AssistantsKnowledgeInstance> {
244
+ /**
245
+ * Initialize the AssistantsKnowledgePage
246
+ *
247
+ * @param version - Version of the resource
248
+ * @param response - Response from the API
249
+ * @param solution - Path solution
250
+ */
251
+ constructor(version: V1, response: Response<string>, solution: AssistantsKnowledgeSolution);
252
+ /**
253
+ * Build an instance of AssistantsKnowledgeInstance
254
+ *
255
+ * @param payload - Payload response from the API
256
+ */
257
+ getInstance(payload: AssistantsKnowledgeResource): AssistantsKnowledgeInstance;
258
+ [inspect.custom](depth: any, options: InspectOptions): string;
259
+ }
260
+ export {};