twilio 5.5.0 → 5.5.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 (183) hide show
  1. package/lib/rest/Knowledge.d.ts +4 -0
  2. package/lib/rest/Knowledge.js +8 -0
  3. package/lib/rest/KnowledgeBase.d.ts +13 -0
  4. package/lib/rest/KnowledgeBase.js +31 -0
  5. package/lib/rest/PreviewBase.d.ts +0 -3
  6. package/lib/rest/PreviewBase.js +0 -5
  7. package/lib/rest/Twilio.d.ts +5 -0
  8. package/lib/rest/Twilio.js +5 -0
  9. package/lib/rest/accounts/v1/safelist.d.ts +4 -4
  10. package/lib/rest/api/v2010/account/address/dependentPhoneNumber.d.ts +3 -0
  11. package/lib/rest/api/v2010/account/call/recording.d.ts +6 -0
  12. package/lib/rest/api/v2010/account/call/siprec.d.ts +3 -0
  13. package/lib/rest/api/v2010/account/call/stream.d.ts +3 -0
  14. package/lib/rest/api/v2010/account/call/transcription.d.ts +3 -0
  15. package/lib/rest/api/v2010/account/call.d.ts +3 -0
  16. package/lib/rest/api/v2010/account/conference/participant.d.ts +4 -1
  17. package/lib/rest/api/v2010/account/conference/recording.d.ts +6 -0
  18. package/lib/rest/api/v2010/account/conference.d.ts +7 -1
  19. package/lib/rest/api/v2010/account/incomingPhoneNumber/local.d.ts +6 -0
  20. package/lib/rest/api/v2010/account/incomingPhoneNumber/mobile.d.ts +6 -0
  21. package/lib/rest/api/v2010/account/incomingPhoneNumber/tollFree.d.ts +6 -0
  22. package/lib/rest/api/v2010/account/incomingPhoneNumber.d.ts +6 -0
  23. package/lib/rest/api/v2010/account/message/feedback.d.ts +3 -0
  24. package/lib/rest/api/v2010/account/message.d.ts +9 -0
  25. package/lib/rest/api/v2010/account/message.js +2 -0
  26. package/lib/rest/api/v2010/account/recording/addOnResult.d.ts +3 -0
  27. package/lib/rest/api/v2010/account/recording/transcription.d.ts +3 -0
  28. package/lib/rest/api/v2010/account/recording.d.ts +6 -0
  29. package/lib/rest/api/v2010/account/transcription.d.ts +3 -0
  30. package/lib/rest/api/v2010/account/usage/record/allTime.d.ts +3 -0
  31. package/lib/rest/api/v2010/account/usage/record/daily.d.ts +3 -0
  32. package/lib/rest/api/v2010/account/usage/record/lastMonth.d.ts +3 -0
  33. package/lib/rest/api/v2010/account/usage/record/monthly.d.ts +3 -0
  34. package/lib/rest/api/v2010/account/usage/record/thisMonth.d.ts +3 -0
  35. package/lib/rest/api/v2010/account/usage/record/today.d.ts +3 -0
  36. package/lib/rest/api/v2010/account/usage/record/yearly.d.ts +3 -0
  37. package/lib/rest/api/v2010/account/usage/record/yesterday.d.ts +3 -0
  38. package/lib/rest/api/v2010/account/usage/record.d.ts +3 -0
  39. package/lib/rest/api/v2010/account/usage/trigger.d.ts +6 -0
  40. package/lib/rest/api/v2010/account/usage.d.ts +3 -0
  41. package/lib/rest/api/v2010/account.d.ts +6 -0
  42. package/lib/rest/chat/v2/service/binding.d.ts +3 -0
  43. package/lib/rest/chat/v2/service/channel/webhook.d.ts +3 -0
  44. package/lib/rest/chat/v2/service/user/userBinding.d.ts +3 -0
  45. package/lib/rest/chat/v2/service/user/userChannel.d.ts +3 -0
  46. package/lib/rest/conversations/v1/addressConfiguration.d.ts +3 -0
  47. package/lib/rest/conversations/v1/configuration/webhook.d.ts +6 -0
  48. package/lib/rest/conversations/v1/conversation/webhook.d.ts +3 -0
  49. package/lib/rest/conversations/v1/conversation.d.ts +3 -0
  50. package/lib/rest/conversations/v1/conversationWithParticipants.d.ts +3 -0
  51. package/lib/rest/conversations/v1/service/binding.d.ts +3 -0
  52. package/lib/rest/conversations/v1/service/configuration/webhook.d.ts +3 -0
  53. package/lib/rest/conversations/v1/service/conversation/webhook.d.ts +3 -0
  54. package/lib/rest/conversations/v1/service/conversation.d.ts +3 -0
  55. package/lib/rest/conversations/v1/service/conversationWithParticipants.d.ts +3 -0
  56. package/lib/rest/conversations/v1/service/user/userConversation.d.ts +3 -0
  57. package/lib/rest/conversations/v1/user/userConversation.d.ts +3 -0
  58. package/lib/rest/events/v1/sink.d.ts +6 -0
  59. package/lib/rest/flexApi/v1/configuration.d.ts +3 -0
  60. package/lib/rest/flexApi/v1/flexFlow.d.ts +6 -0
  61. package/lib/rest/flexApi/v1/interaction/interactionChannel/interactionChannelParticipant.d.ts +3 -0
  62. package/lib/rest/flexApi/v1/interaction/interactionChannel.d.ts +3 -0
  63. package/lib/rest/flexApi/v1/provisioningStatus.d.ts +3 -0
  64. package/lib/rest/flexApi/v2/flexUser.d.ts +0 -24
  65. package/lib/rest/flexApi/v2/flexUser.js +0 -12
  66. package/lib/rest/iam/V1.d.ts +5 -0
  67. package/lib/rest/iam/V1.js +6 -0
  68. package/lib/rest/iam/v1/token.d.ts +88 -0
  69. package/lib/rest/iam/v1/token.js +99 -0
  70. package/lib/rest/insights/v1/room/participant.d.ts +2 -2
  71. package/lib/rest/insights/v1/room.d.ts +2 -2
  72. package/lib/rest/intelligence/v2/customOperator.d.ts +3 -0
  73. package/lib/rest/intelligence/v2/operator.d.ts +3 -0
  74. package/lib/rest/intelligence/v2/operatorType.d.ts +9 -0
  75. package/lib/rest/intelligence/v2/prebuiltOperator.d.ts +3 -0
  76. package/lib/rest/intelligence/v2/transcript/operatorResult.d.ts +3 -0
  77. package/lib/rest/intelligence/v2/transcript.d.ts +3 -0
  78. package/lib/rest/knowledge/V1.d.ts +15 -0
  79. package/lib/rest/{preview/Sync.js → knowledge/V1.js} +11 -11
  80. package/lib/rest/knowledge/v1/knowledge/chunk.d.ts +167 -0
  81. package/lib/rest/knowledge/v1/knowledge/chunk.js +131 -0
  82. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.d.ts +101 -0
  83. package/lib/rest/knowledge/v1/knowledge/knowledgeStatus.js +118 -0
  84. package/lib/rest/knowledge/v1/knowledge.d.ts +406 -0
  85. package/lib/rest/{preview/sync/service/document.js → knowledge/v1/knowledge.js} +102 -91
  86. package/lib/rest/lookups/v1/phoneNumber.d.ts +1 -1
  87. package/lib/rest/messaging/v1/brandRegistration/brandVetting.d.ts +3 -0
  88. package/lib/rest/messaging/v1/brandRegistration.d.ts +9 -0
  89. package/lib/rest/messaging/v1/service.d.ts +3 -0
  90. package/lib/rest/messaging/v1/tollfreeVerification.d.ts +6 -0
  91. package/lib/rest/monitor/v1/event.d.ts +1 -1
  92. package/lib/rest/notify/v1/service/binding.d.ts +3 -0
  93. package/lib/rest/notify/v1/service/notification.d.ts +3 -0
  94. package/lib/rest/numbers/v1/portingPortability.d.ts +3 -0
  95. package/lib/rest/numbers/v1/portingWebhookConfigurationDelete.d.ts +3 -0
  96. package/lib/rest/numbers/v2/authorizationDocument/dependentHostedNumberOrder.d.ts +3 -0
  97. package/lib/rest/numbers/v2/authorizationDocument.d.ts +3 -0
  98. package/lib/rest/numbers/v2/bulkHostedNumberOrder.d.ts +3 -0
  99. package/lib/rest/numbers/v2/bundleClone.d.ts +3 -0
  100. package/lib/rest/numbers/v2/hostedNumberOrder.d.ts +6 -0
  101. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/bundleCopy.d.ts +3 -0
  102. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/evaluation.d.ts +3 -0
  103. package/lib/rest/numbers/v2/regulatoryCompliance/bundle/replaceItems.d.ts +3 -0
  104. package/lib/rest/numbers/v2/regulatoryCompliance/bundle.d.ts +3 -0
  105. package/lib/rest/numbers/v2/regulatoryCompliance/endUser.d.ts +3 -0
  106. package/lib/rest/numbers/v2/regulatoryCompliance/regulation.d.ts +3 -0
  107. package/lib/rest/numbers/v2/regulatoryCompliance/supportingDocument.d.ts +3 -0
  108. package/lib/rest/numbers/v2/regulatoryCompliance.d.ts +3 -0
  109. package/lib/rest/preview/hosted_numbers/authorizationDocument/dependentHostedNumberOrder.d.ts +6 -0
  110. package/lib/rest/preview/hosted_numbers/authorizationDocument.d.ts +3 -0
  111. package/lib/rest/preview/hosted_numbers/hostedNumberOrder.d.ts +6 -0
  112. package/lib/rest/proxy/v1/service/session/interaction.d.ts +3 -0
  113. package/lib/rest/proxy/v1/service/session/participant/messageInteraction.d.ts +3 -0
  114. package/lib/rest/proxy/v1/service/session.d.ts +6 -0
  115. package/lib/rest/proxy/v1/service.d.ts +6 -0
  116. package/lib/rest/serverless/v1/service/asset/assetVersion.d.ts +3 -0
  117. package/lib/rest/serverless/v1/service/build/buildStatus.d.ts +3 -0
  118. package/lib/rest/serverless/v1/service/build.d.ts +6 -0
  119. package/lib/rest/serverless/v1/service/environment/log.d.ts +3 -0
  120. package/lib/rest/serverless/v1/service/function/functionVersion.d.ts +3 -0
  121. package/lib/rest/studio/v1/flow/engagement/step.d.ts +6 -0
  122. package/lib/rest/studio/v1/flow/engagement/step.js +2 -0
  123. package/lib/rest/studio/v1/flow/engagement.d.ts +3 -0
  124. package/lib/rest/studio/v1/flow/execution/executionStep.d.ts +6 -0
  125. package/lib/rest/studio/v1/flow/execution/executionStep.js +2 -0
  126. package/lib/rest/studio/v1/flow/execution.d.ts +3 -0
  127. package/lib/rest/studio/v1/flow.d.ts +3 -0
  128. package/lib/rest/studio/v2/flow/execution/executionStep.d.ts +6 -0
  129. package/lib/rest/studio/v2/flow/execution/executionStep.js +2 -0
  130. package/lib/rest/studio/v2/flow/execution.d.ts +3 -0
  131. package/lib/rest/studio/v2/flow/flowRevision.d.ts +3 -0
  132. package/lib/rest/studio/v2/flow.d.ts +3 -0
  133. package/lib/rest/supersim/v1/esimProfile.d.ts +3 -0
  134. package/lib/rest/supersim/v1/fleet.d.ts +3 -0
  135. package/lib/rest/supersim/v1/ipCommand.d.ts +9 -0
  136. package/lib/rest/supersim/v1/settingsUpdate.d.ts +3 -0
  137. package/lib/rest/supersim/v1/sim/simIpAddress.d.ts +3 -0
  138. package/lib/rest/supersim/v1/sim.d.ts +3 -0
  139. package/lib/rest/supersim/v1/smsCommand.d.ts +6 -0
  140. package/lib/rest/taskrouter/v1/workspace/task/reservation.d.ts +1 -1
  141. package/lib/rest/taskrouter/v1/workspace/taskQueue.d.ts +3 -0
  142. package/lib/rest/taskrouter/v1/workspace/worker/reservation.d.ts +1 -1
  143. package/lib/rest/trunking/v1/trunk.d.ts +3 -0
  144. package/lib/rest/trusthub/v1/customerProfiles/customerProfilesEvaluations.d.ts +3 -0
  145. package/lib/rest/trusthub/v1/customerProfiles.d.ts +3 -0
  146. package/lib/rest/trusthub/v1/supportingDocument.d.ts +3 -0
  147. package/lib/rest/trusthub/v1/trustProducts/trustProductsEvaluations.d.ts +3 -0
  148. package/lib/rest/trusthub/v1/trustProducts.d.ts +3 -0
  149. package/lib/rest/verify/v2/service/verification.d.ts +6 -0
  150. package/lib/rest/verify/v2/service/verificationCheck.d.ts +3 -0
  151. package/lib/rest/verify/v2/service/webhook.d.ts +6 -0
  152. package/lib/rest/verify/v2/verificationAttempt.d.ts +3 -0
  153. package/lib/rest/video/v1/composition.d.ts +6 -0
  154. package/lib/rest/video/v1/compositionHook.d.ts +3 -0
  155. package/lib/rest/video/v1/recording.d.ts +9 -0
  156. package/lib/rest/video/v1/room/participant/anonymize.d.ts +3 -0
  157. package/lib/rest/video/v1/room/participant/publishedTrack.d.ts +3 -0
  158. package/lib/rest/video/v1/room/participant/subscribedTrack.d.ts +3 -0
  159. package/lib/rest/video/v1/room/participant.d.ts +4 -1
  160. package/lib/rest/video/v1/room/roomRecording.d.ts +9 -0
  161. package/lib/rest/wireless/v1/command.d.ts +12 -0
  162. package/lib/rest/wireless/v1/ratePlan.d.ts +6 -0
  163. package/lib/rest/wireless/v1/ratePlan.js +2 -0
  164. package/lib/rest/wireless/v1/sim.d.ts +6 -0
  165. package/package.json +1 -1
  166. package/lib/rest/preview/Sync.d.ts +0 -15
  167. package/lib/rest/preview/sync/service/document/documentPermission.d.ts +0 -280
  168. package/lib/rest/preview/sync/service/document/documentPermission.js +0 -260
  169. package/lib/rest/preview/sync/service/document.d.ts +0 -295
  170. package/lib/rest/preview/sync/service/syncList/syncListItem.d.ts +0 -321
  171. package/lib/rest/preview/sync/service/syncList/syncListItem.js +0 -286
  172. package/lib/rest/preview/sync/service/syncList/syncListPermission.d.ts +0 -280
  173. package/lib/rest/preview/sync/service/syncList/syncListPermission.js +0 -260
  174. package/lib/rest/preview/sync/service/syncList.d.ts +0 -270
  175. package/lib/rest/preview/sync/service/syncList.js +0 -270
  176. package/lib/rest/preview/sync/service/syncMap/syncMapItem.d.ts +0 -323
  177. package/lib/rest/preview/sync/service/syncMap/syncMapItem.js +0 -290
  178. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.d.ts +0 -280
  179. package/lib/rest/preview/sync/service/syncMap/syncMapPermission.js +0 -260
  180. package/lib/rest/preview/sync/service/syncMap.d.ts +0 -270
  181. package/lib/rest/preview/sync/service/syncMap.js +0 -270
  182. package/lib/rest/preview/sync/service.d.ts +0 -330
  183. package/lib/rest/preview/sync/service.js +0 -316
@@ -3,6 +3,7 @@ import Version from "../../base/Version";
3
3
  import { ApiKeyListInstance } from "./v1/apiKey";
4
4
  import { GetApiKeysListInstance } from "./v1/getApiKeys";
5
5
  import { NewApiKeyListInstance } from "./v1/newApiKey";
6
+ import { TokenListInstance } from "./v1/token";
6
7
  export default class V1 extends Version {
7
8
  /**
8
9
  * Initialize the V1 version of Iam
@@ -16,10 +17,14 @@ export default class V1 extends Version {
16
17
  protected _getApiKeys?: GetApiKeysListInstance;
17
18
  /** newApiKey - { Twilio.Iam.V1.NewApiKeyListInstance } resource */
18
19
  protected _newApiKey?: NewApiKeyListInstance;
20
+ /** token - { Twilio.Iam.V1.TokenListInstance } resource */
21
+ protected _token?: TokenListInstance;
19
22
  /** Getter for apiKey resource */
20
23
  get apiKey(): ApiKeyListInstance;
21
24
  /** Getter for getApiKeys resource */
22
25
  get getApiKeys(): GetApiKeysListInstance;
23
26
  /** Getter for newApiKey resource */
24
27
  get newApiKey(): NewApiKeyListInstance;
28
+ /** Getter for token resource */
29
+ get token(): TokenListInstance;
25
30
  }
@@ -20,6 +20,7 @@ const Version_1 = __importDefault(require("../../base/Version"));
20
20
  const apiKey_1 = require("./v1/apiKey");
21
21
  const getApiKeys_1 = require("./v1/getApiKeys");
22
22
  const newApiKey_1 = require("./v1/newApiKey");
23
+ const token_1 = require("./v1/token");
23
24
  class V1 extends Version_1.default {
24
25
  /**
25
26
  * Initialize the V1 version of Iam
@@ -44,5 +45,10 @@ class V1 extends Version_1.default {
44
45
  this._newApiKey = this._newApiKey || (0, newApiKey_1.NewApiKeyListInstance)(this);
45
46
  return this._newApiKey;
46
47
  }
48
+ /** Getter for token resource */
49
+ get token() {
50
+ this._token = this._token || (0, token_1.TokenListInstance)(this);
51
+ return this._token;
52
+ }
47
53
  }
48
54
  exports.default = V1;
@@ -0,0 +1,88 @@
1
+ /// <reference types="node" />
2
+ import { inspect, InspectOptions } from "util";
3
+ import V1 from "../V1";
4
+ /**
5
+ * Options to pass to create a TokenInstance
6
+ */
7
+ export interface TokenListInstanceCreateOptions {
8
+ /** Grant type is a credential representing resource owner\\\'s authorization which can be used by client to obtain access token. */
9
+ grantType: string;
10
+ /** A 34 character string that uniquely identifies this OAuth App. */
11
+ clientId: string;
12
+ /** The credential for confidential OAuth App. */
13
+ clientSecret?: string;
14
+ /** JWT token related to the authorization code grant type. */
15
+ code?: string;
16
+ /** The redirect uri */
17
+ redirectUri?: string;
18
+ /** The targeted audience uri */
19
+ audience?: string;
20
+ /** JWT token related to refresh access token. */
21
+ refreshToken?: string;
22
+ /** The scope of token */
23
+ scope?: string;
24
+ }
25
+ export interface TokenSolution {
26
+ }
27
+ export interface TokenListInstance {
28
+ _version: V1;
29
+ _solution: TokenSolution;
30
+ _uri: string;
31
+ /**
32
+ * Create a TokenInstance
33
+ *
34
+ * @param params - Parameter for request
35
+ * @param callback - Callback to handle processed record
36
+ *
37
+ * @returns Resolves to processed TokenInstance
38
+ */
39
+ create(params: TokenListInstanceCreateOptions, callback?: (error: Error | null, item?: TokenInstance) => any): Promise<TokenInstance>;
40
+ /**
41
+ * Provide a user-friendly representation
42
+ */
43
+ toJSON(): any;
44
+ [inspect.custom](_depth: any, options: InspectOptions): any;
45
+ }
46
+ export declare function TokenListInstance(version: V1): TokenListInstance;
47
+ interface TokenResource {
48
+ access_token: string;
49
+ refresh_token: string;
50
+ id_token: string;
51
+ token_type: string;
52
+ expires_in: number;
53
+ }
54
+ export declare class TokenInstance {
55
+ protected _version: V1;
56
+ constructor(_version: V1, payload: TokenResource);
57
+ /**
58
+ * Token which carries the necessary information to access a Twilio resource directly.
59
+ */
60
+ accessToken: string;
61
+ /**
62
+ * Token which carries the information necessary to get a new access token.
63
+ */
64
+ refreshToken: string;
65
+ /**
66
+ * Token which carries the information necessary of user profile.
67
+ */
68
+ idToken: string;
69
+ /**
70
+ * Token type
71
+ */
72
+ tokenType: string;
73
+ expiresIn: number;
74
+ /**
75
+ * Provide a user-friendly representation
76
+ *
77
+ * @returns Object
78
+ */
79
+ toJSON(): {
80
+ accessToken: string;
81
+ refreshToken: string;
82
+ idToken: string;
83
+ tokenType: string;
84
+ expiresIn: number;
85
+ };
86
+ [inspect.custom](_depth: any, options: InspectOptions): string;
87
+ }
88
+ export {};
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Twilio - Iam
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.TokenInstance = exports.TokenListInstance = void 0;
17
+ const util_1 = require("util");
18
+ const deserialize = require("../../../base/deserialize");
19
+ const serialize = require("../../../base/serialize");
20
+ function TokenListInstance(version) {
21
+ const instance = {};
22
+ instance._version = version;
23
+ instance._solution = {};
24
+ instance._uri = `/token`;
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["grantType"] === null || params["grantType"] === undefined) {
30
+ throw new Error("Required parameter \"params['grantType']\" missing.");
31
+ }
32
+ if (params["clientId"] === null || params["clientId"] === undefined) {
33
+ throw new Error("Required parameter \"params['clientId']\" missing.");
34
+ }
35
+ let data = {};
36
+ data["grant_type"] = params["grantType"];
37
+ data["client_id"] = params["clientId"];
38
+ if (params["clientSecret"] !== undefined)
39
+ data["client_secret"] = params["clientSecret"];
40
+ if (params["code"] !== undefined)
41
+ data["code"] = params["code"];
42
+ if (params["redirectUri"] !== undefined)
43
+ data["redirect_uri"] = params["redirectUri"];
44
+ if (params["audience"] !== undefined)
45
+ data["audience"] = params["audience"];
46
+ if (params["refreshToken"] !== undefined)
47
+ data["refresh_token"] = params["refreshToken"];
48
+ if (params["scope"] !== undefined)
49
+ data["scope"] = params["scope"];
50
+ const headers = {};
51
+ headers["Content-Type"] = "application/x-www-form-urlencoded";
52
+ headers["Accept"] = "application/json";
53
+ let operationVersion = version, operationPromise = operationVersion.create({
54
+ uri: instance._uri,
55
+ method: "post",
56
+ data,
57
+ headers,
58
+ });
59
+ operationPromise = operationPromise.then((payload) => new TokenInstance(operationVersion, payload));
60
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
61
+ return operationPromise;
62
+ };
63
+ instance.toJSON = function toJSON() {
64
+ return instance._solution;
65
+ };
66
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
67
+ return (0, util_1.inspect)(instance.toJSON(), options);
68
+ };
69
+ return instance;
70
+ }
71
+ exports.TokenListInstance = TokenListInstance;
72
+ class TokenInstance {
73
+ constructor(_version, payload) {
74
+ this._version = _version;
75
+ this.accessToken = payload.access_token;
76
+ this.refreshToken = payload.refresh_token;
77
+ this.idToken = payload.id_token;
78
+ this.tokenType = payload.token_type;
79
+ this.expiresIn = payload.expires_in;
80
+ }
81
+ /**
82
+ * Provide a user-friendly representation
83
+ *
84
+ * @returns Object
85
+ */
86
+ toJSON() {
87
+ return {
88
+ accessToken: this.accessToken,
89
+ refreshToken: this.refreshToken,
90
+ idToken: this.idToken,
91
+ tokenType: this.tokenType,
92
+ expiresIn: this.expiresIn,
93
+ };
94
+ }
95
+ [util_1.inspect.custom](_depth, options) {
96
+ return (0, util_1.inspect)(this.toJSON(), options);
97
+ }
98
+ }
99
+ exports.TokenInstance = TokenInstance;
@@ -5,8 +5,8 @@ import Response from "../../../../http/response";
5
5
  import V1 from "../../V1";
6
6
  export type ParticipantCodec = "VP8" | "H264" | "VP9" | "opus";
7
7
  export type ParticipantEdgeLocation = "ashburn" | "dublin" | "frankfurt" | "singapore" | "sydney" | "sao_paulo" | "roaming" | "umatilla" | "tokyo";
8
- export type ParticipantRoomStatus = "in_progress" | "completed";
9
- export type ParticipantTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll" | "stage_us1" | "dev_us1";
8
+ export type ParticipantRoomStatus = "in_progress" | "connected" | "completed" | "disconnected";
9
+ export type ParticipantTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll" | "stage_us1" | "dev_us1" | "stage_au1" | "stage_sg1" | "stage_br1" | "stage_in1" | "stage_jp1" | "stage_de1" | "stage_ie1" | "stage_us2" | "dev_us2" | "outside";
10
10
  /**
11
11
  * Options to pass to each
12
12
  */
@@ -8,10 +8,10 @@ export type RoomCodec = "VP8" | "H264" | "VP9" | "opus";
8
8
  export type RoomCreatedMethod = "sdk" | "ad_hoc" | "api";
9
9
  export type RoomEdgeLocation = "ashburn" | "dublin" | "frankfurt" | "singapore" | "sydney" | "sao_paulo" | "roaming" | "umatilla" | "tokyo";
10
10
  export type RoomEndReason = "room_ended_via_api" | "timeout";
11
- export type RoomProcessingState = "complete" | "in_progress";
11
+ export type RoomProcessingState = "complete" | "in_progress" | "timeout" | "not_started";
12
12
  export type RoomRoomStatus = "in_progress" | "completed";
13
13
  export type RoomRoomType = "go" | "peer_to_peer" | "group" | "group_small";
14
- export type RoomTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll" | "stage_us1" | "dev_us1";
14
+ export type RoomTwilioRealm = "us1" | "us2" | "au1" | "br1" | "ie1" | "jp1" | "sg1" | "in1" | "de1" | "gll" | "stage_us1" | "stage_us2" | "dev_us1" | "dev_us2" | "stage_de1" | "stage_in1" | "stage_ie1" | "stage_br1" | "stage_au1" | "stage_sg1" | "stage_jp1" | "outside";
15
15
  /**
16
16
  * Options to pass to each
17
17
  */
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
+ /**
7
+ * Custom Operator availability status. Possible values: internal, beta, public, retired.
8
+ */
6
9
  export type CustomOperatorAvailability = "internal" | "beta" | "public" | "retired";
7
10
  /**
8
11
  * Options to pass to update a CustomOperatorInstance
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
+ /**
7
+ * Operator availability status. Possible values: internal, beta, public, retired.
8
+ */
6
9
  export type OperatorAvailability = "internal" | "beta" | "public" | "retired";
7
10
  /**
8
11
  * Options to pass to each
@@ -3,8 +3,17 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
+ /**
7
+ * Operator Type availability status. Possible values: internal, beta, general-availability, retired, deprecated.
8
+ */
6
9
  export type OperatorTypeAvailability = "internal" | "beta" | "general-availability" | "retired" | "deprecated";
10
+ /**
11
+ * Operator Results for this Operator Type will follow this format. Possible values: text-classification, text-extraction, text-extraction-normalized, text-generation.
12
+ */
7
13
  export type OperatorTypeOutputType = "text-classification" | "text-extraction" | "text-extraction-normalized" | "text-generation";
14
+ /**
15
+ * Operators with this Operator Type are executed using this provider. Possible values: twilio, amazon, openai.
16
+ */
8
17
  export type OperatorTypeProvider = "twilio" | "amazon" | "openai";
9
18
  /**
10
19
  * Options to pass to each
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../base/Page";
4
4
  import Response from "../../../http/response";
5
5
  import V2 from "../V2";
6
+ /**
7
+ * Operator availability status. Possible values: internal, beta, public, retired.
8
+ */
6
9
  export type PrebuiltOperatorAvailability = "internal" | "beta" | "public" | "retired";
7
10
  /**
8
11
  * Options to pass to each
@@ -3,6 +3,9 @@ import { inspect, InspectOptions } from "util";
3
3
  import Page, { TwilioResponsePayload } from "../../../../base/Page";
4
4
  import Response from "../../../../http/response";
5
5
  import V2 from "../../V2";
6
+ /**
7
+ * The type of the applied Language Understanding Operator. One of conversation-classify, utterance-classify, extract, extract-normalize, or pii-extract
8
+ */
6
9
  export type OperatorResultOperatorType = "conversation_classify" | "utterance_classify" | "extract" | "extract_normalize" | "pii_extract" | "text_generation" | "json";
7
10
  /**
8
11
  * Options to pass to fetch a OperatorResultInstance
@@ -6,6 +6,9 @@ import V2 from "../V2";
6
6
  import { MediaListInstance } from "./transcript/media";
7
7
  import { OperatorResultListInstance } from "./transcript/operatorResult";
8
8
  import { SentenceListInstance } from "./transcript/sentence";
9
+ /**
10
+ * The Status of this Transcript. One of `queued`, `in-progress`, `completed`, `failed` or `canceled`.
11
+ */
9
12
  export type TranscriptStatus = "queued" | "in-progress" | "completed" | "failed" | "canceled";
10
13
  /**
11
14
  * Options to pass to create a TranscriptInstance
@@ -0,0 +1,15 @@
1
+ import KnowledgeBase from "../KnowledgeBase";
2
+ import Version from "../../base/Version";
3
+ import { KnowledgeListInstance } from "./v1/knowledge";
4
+ export default class V1 extends Version {
5
+ /**
6
+ * Initialize the V1 version of Knowledge
7
+ *
8
+ * @param domain - The Twilio (Twilio.Knowledge) domain
9
+ */
10
+ constructor(domain: KnowledgeBase);
11
+ /** knowledge - { Twilio.Knowledge.V1.KnowledgeListInstance } resource */
12
+ protected _knowledge?: KnowledgeListInstance;
13
+ /** Getter for knowledge resource */
14
+ get knowledge(): KnowledgeListInstance;
15
+ }
@@ -5,7 +5,7 @@
5
5
  * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
6
  * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
7
  *
8
- * Twilio - Preview
8
+ * Twilio - Knowledge
9
9
  * This is the public Twilio REST API.
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator.
@@ -17,20 +17,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  };
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  const Version_1 = __importDefault(require("../../base/Version"));
20
- const service_1 = require("./sync/service");
21
- class Sync extends Version_1.default {
20
+ const knowledge_1 = require("./v1/knowledge");
21
+ class V1 extends Version_1.default {
22
22
  /**
23
- * Initialize the Sync version of Preview
23
+ * Initialize the V1 version of Knowledge
24
24
  *
25
- * @param domain - The Twilio (Twilio.Preview) domain
25
+ * @param domain - The Twilio (Twilio.Knowledge) domain
26
26
  */
27
27
  constructor(domain) {
28
- super(domain, "Sync");
28
+ super(domain, "v1");
29
29
  }
30
- /** Getter for services resource */
31
- get services() {
32
- this._services = this._services || (0, service_1.ServiceListInstance)(this);
33
- return this._services;
30
+ /** Getter for knowledge resource */
31
+ get knowledge() {
32
+ this._knowledge = this._knowledge || (0, knowledge_1.KnowledgeListInstance)(this);
33
+ return this._knowledge;
34
34
  }
35
35
  }
36
- exports.default = Sync;
36
+ exports.default = V1;
@@ -0,0 +1,167 @@
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 ChunkListInstanceEachOptions {
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: ChunkInstance, 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 ChunkListInstanceOptions {
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 ChunkListInstancePageOptions {
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 ChunkSolution {
40
+ id: string;
41
+ }
42
+ export interface ChunkListInstance {
43
+ _version: V1;
44
+ _solution: ChunkSolution;
45
+ _uri: string;
46
+ /**
47
+ * Streams ChunkInstance records from the API.
48
+ *
49
+ * This operation lazily loads records as efficiently as possible until the limit
50
+ * is reached.
51
+ *
52
+ * The results are passed into the callback function, so this operation is memory
53
+ * efficient.
54
+ *
55
+ * If a function is passed as the first argument, it will be used as the callback
56
+ * function.
57
+ *
58
+ * @param { ChunkListInstanceEachOptions } [params] - Options for request
59
+ * @param { function } [callback] - Function to process each record
60
+ */
61
+ each(callback?: (item: ChunkInstance, done: (err?: Error) => void) => void): void;
62
+ each(params: ChunkListInstanceEachOptions, callback?: (item: ChunkInstance, done: (err?: Error) => void) => void): void;
63
+ /**
64
+ * Retrieve a single target page of ChunkInstance records from the API.
65
+ *
66
+ * The request is executed immediately.
67
+ *
68
+ * @param { string } [targetUrl] - API-generated URL for the requested results page
69
+ * @param { function } [callback] - Callback to handle list of records
70
+ */
71
+ getPage(targetUrl: string, callback?: (error: Error | null, items: ChunkPage) => any): Promise<ChunkPage>;
72
+ /**
73
+ * Lists ChunkInstance records from the API as a list.
74
+ *
75
+ * If a function is passed as the first argument, it will be used as the callback
76
+ * function.
77
+ *
78
+ * @param { ChunkListInstanceOptions } [params] - Options for request
79
+ * @param { function } [callback] - Callback to handle list of records
80
+ */
81
+ list(callback?: (error: Error | null, items: ChunkInstance[]) => any): Promise<ChunkInstance[]>;
82
+ list(params: ChunkListInstanceOptions, callback?: (error: Error | null, items: ChunkInstance[]) => any): Promise<ChunkInstance[]>;
83
+ /**
84
+ * Retrieve a single page of ChunkInstance records from the API.
85
+ *
86
+ * The request is executed immediately.
87
+ *
88
+ * If a function is passed as the first argument, it will be used as the callback
89
+ * function.
90
+ *
91
+ * @param { ChunkListInstancePageOptions } [params] - Options for request
92
+ * @param { function } [callback] - Callback to handle list of records
93
+ */
94
+ page(callback?: (error: Error | null, items: ChunkPage) => any): Promise<ChunkPage>;
95
+ page(params: ChunkListInstancePageOptions, callback?: (error: Error | null, items: ChunkPage) => any): Promise<ChunkPage>;
96
+ /**
97
+ * Provide a user-friendly representation
98
+ */
99
+ toJSON(): any;
100
+ [inspect.custom](_depth: any, options: InspectOptions): any;
101
+ }
102
+ export declare function ChunkListInstance(version: V1, id: string): ChunkListInstance;
103
+ interface ChunkPayload extends TwilioResponsePayload {
104
+ chunks: ChunkResource[];
105
+ }
106
+ interface ChunkResource {
107
+ account_sid: string;
108
+ content: string;
109
+ metadata: Record<string, object>;
110
+ date_created: Date;
111
+ date_updated: Date;
112
+ }
113
+ export declare class ChunkInstance {
114
+ protected _version: V1;
115
+ constructor(_version: V1, payload: ChunkResource, id: string);
116
+ /**
117
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
118
+ */
119
+ accountSid: string;
120
+ /**
121
+ * The chunk content.
122
+ */
123
+ content: string;
124
+ /**
125
+ * The metadata of the chunk.
126
+ */
127
+ metadata: Record<string, object>;
128
+ /**
129
+ * The date and time in GMT when the Chunk was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
130
+ */
131
+ dateCreated: Date;
132
+ /**
133
+ * The date and time in GMT when the Chunk was updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
134
+ */
135
+ dateUpdated: Date;
136
+ /**
137
+ * Provide a user-friendly representation
138
+ *
139
+ * @returns Object
140
+ */
141
+ toJSON(): {
142
+ accountSid: string;
143
+ content: string;
144
+ metadata: Record<string, object>;
145
+ dateCreated: Date;
146
+ dateUpdated: Date;
147
+ };
148
+ [inspect.custom](_depth: any, options: InspectOptions): string;
149
+ }
150
+ export declare class ChunkPage extends Page<V1, ChunkPayload, ChunkResource, ChunkInstance> {
151
+ /**
152
+ * Initialize the ChunkPage
153
+ *
154
+ * @param version - Version of the resource
155
+ * @param response - Response from the API
156
+ * @param solution - Path solution
157
+ */
158
+ constructor(version: V1, response: Response<string>, solution: ChunkSolution);
159
+ /**
160
+ * Build an instance of ChunkInstance
161
+ *
162
+ * @param payload - Payload response from the API
163
+ */
164
+ getInstance(payload: ChunkResource): ChunkInstance;
165
+ [inspect.custom](depth: any, options: InspectOptions): string;
166
+ }
167
+ export {};