twilio 6.0.0 → 6.0.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 (121) hide show
  1. package/lib/rest/ConversationsBase.d.ts +3 -0
  2. package/lib/rest/ConversationsBase.js +5 -0
  3. package/lib/rest/InsightsBase.d.ts +3 -0
  4. package/lib/rest/InsightsBase.js +5 -0
  5. package/lib/rest/IntelligenceBase.d.ts +3 -0
  6. package/lib/rest/IntelligenceBase.js +5 -0
  7. package/lib/rest/KnowledgeBase.d.ts +3 -0
  8. package/lib/rest/KnowledgeBase.js +5 -0
  9. package/lib/rest/Memory.d.ts +4 -0
  10. package/lib/rest/Memory.js +8 -0
  11. package/lib/rest/MemoryBase.d.ts +13 -0
  12. package/lib/rest/MemoryBase.js +31 -0
  13. package/lib/rest/Twilio.d.ts +5 -0
  14. package/lib/rest/Twilio.js +5 -0
  15. package/lib/rest/VoiceBase.d.ts +3 -0
  16. package/lib/rest/VoiceBase.js +5 -0
  17. package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
  18. package/lib/rest/api/v2010/account/call/recording.js +4 -0
  19. package/lib/rest/api/v2010/account/call/transcription.d.ts +1 -1
  20. package/lib/rest/api/v2010/account/call/transcription.js +6 -4
  21. package/lib/rest/api/v2010/account/call.d.ts +2 -0
  22. package/lib/rest/api/v2010/account/call.js +4 -0
  23. package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
  24. package/lib/rest/api/v2010/account/conference/participant.js +4 -0
  25. package/lib/rest/conversations/V2.d.ts +38 -0
  26. package/lib/rest/conversations/V2.js +72 -0
  27. package/lib/rest/conversations/v2/action.d.ts +241 -0
  28. package/lib/rest/conversations/v2/action.js +246 -0
  29. package/lib/rest/conversations/v2/communication.d.ts +479 -0
  30. package/lib/rest/conversations/v2/communication.js +436 -0
  31. package/lib/rest/conversations/v2/configuration.d.ts +906 -0
  32. package/lib/rest/conversations/v2/configuration.js +619 -0
  33. package/lib/rest/conversations/v2/conversation.d.ts +936 -0
  34. package/lib/rest/conversations/v2/conversation.js +664 -0
  35. package/lib/rest/conversations/v2/operation.d.ts +167 -0
  36. package/lib/rest/conversations/v2/operation.js +170 -0
  37. package/lib/rest/conversations/v2/participant.d.ts +469 -0
  38. package/lib/rest/conversations/v2/participant.js +442 -0
  39. package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
  40. package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
  41. package/lib/rest/insights/V3.d.ts +20 -0
  42. package/lib/rest/insights/V3.js +42 -0
  43. package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
  44. package/lib/rest/insights/v1/call/event.d.ts +4 -4
  45. package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
  46. package/lib/rest/insights/v3/metadata.d.ts +115 -0
  47. package/lib/rest/insights/v3/metadata.js +118 -0
  48. package/lib/rest/insights/v3/query.d.ts +180 -0
  49. package/lib/rest/insights/v3/query.js +214 -0
  50. package/lib/rest/intelligence/V3.d.ts +35 -0
  51. package/lib/rest/intelligence/V3.js +65 -0
  52. package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
  53. package/lib/rest/intelligence/v3/configuration.js +528 -0
  54. package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
  55. package/lib/rest/intelligence/v3/conversation.js +342 -0
  56. package/lib/rest/intelligence/v3/operator.d.ts +619 -0
  57. package/lib/rest/intelligence/v3/operator.js +493 -0
  58. package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
  59. package/lib/rest/intelligence/v3/operatorResult.js +478 -0
  60. package/lib/rest/intelligence/v3/version.d.ts +469 -0
  61. package/lib/rest/intelligence/v3/version.js +341 -0
  62. package/lib/rest/knowledge/V2.d.ts +31 -0
  63. package/lib/rest/knowledge/V2.js +62 -0
  64. package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
  65. package/lib/rest/knowledge/v2/chunk.js +178 -0
  66. package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
  67. package/lib/rest/knowledge/v2/knowledge.js +466 -0
  68. package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
  69. package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
  70. package/lib/rest/knowledge/v2/operation.d.ts +162 -0
  71. package/lib/rest/knowledge/v2/operation.js +175 -0
  72. package/lib/rest/knowledge/v2/search.d.ts +180 -0
  73. package/lib/rest/knowledge/v2/search.js +174 -0
  74. package/lib/rest/memory/V1.d.ts +76 -0
  75. package/lib/rest/memory/V1.js +140 -0
  76. package/lib/rest/memory/v1/bulk.d.ts +129 -0
  77. package/lib/rest/memory/v1/bulk.js +158 -0
  78. package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
  79. package/lib/rest/memory/v1/conversationSummary.js +473 -0
  80. package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
  81. package/lib/rest/memory/v1/dataMapping.js +512 -0
  82. package/lib/rest/memory/v1/event.d.ts +153 -0
  83. package/lib/rest/memory/v1/event.js +159 -0
  84. package/lib/rest/memory/v1/identifier.d.ts +362 -0
  85. package/lib/rest/memory/v1/identifier.js +369 -0
  86. package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
  87. package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
  88. package/lib/rest/memory/v1/import.d.ts +292 -0
  89. package/lib/rest/memory/v1/import.js +280 -0
  90. package/lib/rest/memory/v1/lookup.d.ts +82 -0
  91. package/lib/rest/memory/v1/lookup.js +118 -0
  92. package/lib/rest/memory/v1/observation.d.ts +521 -0
  93. package/lib/rest/memory/v1/observation.js +477 -0
  94. package/lib/rest/memory/v1/operation.d.ts +162 -0
  95. package/lib/rest/memory/v1/operation.js +175 -0
  96. package/lib/rest/memory/v1/profile.d.ts +548 -0
  97. package/lib/rest/memory/v1/profile.js +531 -0
  98. package/lib/rest/memory/v1/recall.d.ts +306 -0
  99. package/lib/rest/memory/v1/recall.js +234 -0
  100. package/lib/rest/memory/v1/revision.d.ts +246 -0
  101. package/lib/rest/memory/v1/revision.js +195 -0
  102. package/lib/rest/memory/v1/store.d.ts +544 -0
  103. package/lib/rest/memory/v1/store.js +534 -0
  104. package/lib/rest/memory/v1/trait.d.ts +233 -0
  105. package/lib/rest/memory/v1/trait.js +190 -0
  106. package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
  107. package/lib/rest/memory/v1/traitGroup.js +555 -0
  108. package/lib/rest/messaging/v2/channelsSender.d.ts +8 -0
  109. package/lib/rest/messaging/v2/channelsSender.js +2 -0
  110. package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
  111. package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
  112. package/lib/rest/studio/v2/flow.d.ts +4 -0
  113. package/lib/rest/studio/v2/flow.js +8 -0
  114. package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
  115. package/lib/rest/verify/v2/service/webhook.js +8 -8
  116. package/lib/rest/voice/V3.d.ts +15 -0
  117. package/lib/rest/voice/V3.js +37 -0
  118. package/lib/rest/voice/v3/transcription.d.ts +378 -0
  119. package/lib/rest/voice/v3/transcription.js +264 -0
  120. package/lib/twiml/VoiceResponse.d.ts +8 -0
  121. package/package.json +1 -1
@@ -0,0 +1,167 @@
1
+ import { inspect, InspectOptions } from "util";
2
+ import V2 from "../V2";
3
+ import { ApiResponse } from "../../../base/ApiResponse";
4
+ /**
5
+ * Error details if the operation failed. Follows RFC 9457 Problem Details.
6
+ */
7
+ export declare class FetchOperationStatus200ResponseError {
8
+ /**
9
+ * A URI reference that identifies the problem type.
10
+ */
11
+ "type"?: string;
12
+ /**
13
+ * A short, human-readable summary of the problem type.
14
+ */
15
+ "title"?: string;
16
+ /**
17
+ * The HTTP status code for this occurrence of the problem.
18
+ */
19
+ "status"?: number;
20
+ /**
21
+ * A human-readable explanation specific to this occurrence.
22
+ */
23
+ "detail"?: string;
24
+ /**
25
+ * A URI reference that identifies the specific occurrence of the problem.
26
+ */
27
+ "instance"?: string;
28
+ constructor(payload: any);
29
+ }
30
+ export interface OperationContext {
31
+ /**
32
+ * Fetch a OperationInstance
33
+ *
34
+ * @param callback - Callback to handle processed record
35
+ *
36
+ * @returns Resolves to processed OperationInstance
37
+ */
38
+ fetch(callback?: (error: Error | null, item?: OperationInstance) => any): Promise<OperationInstance>;
39
+ /**
40
+ * Fetch a OperationInstance and return HTTP info
41
+ *
42
+ * @param callback - Callback to handle processed record
43
+ *
44
+ * @returns Resolves to processed OperationInstance with HTTP metadata
45
+ */
46
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<OperationInstance>) => any): Promise<ApiResponse<OperationInstance>>;
47
+ /**
48
+ * Provide a user-friendly representation
49
+ */
50
+ toJSON(): any;
51
+ [inspect.custom](_depth: any, options: InspectOptions): any;
52
+ }
53
+ export interface OperationContextSolution {
54
+ sid: string;
55
+ }
56
+ export declare class OperationContextImpl implements OperationContext {
57
+ protected _version: V2;
58
+ protected _solution: OperationContextSolution;
59
+ protected _uri: string;
60
+ constructor(_version: V2, sid: string);
61
+ fetch(callback?: (error: Error | null, item?: OperationInstance) => any): Promise<OperationInstance>;
62
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<OperationInstance>) => any): Promise<ApiResponse<OperationInstance>>;
63
+ /**
64
+ * Provide a user-friendly representation
65
+ *
66
+ * @returns Object
67
+ */
68
+ toJSON(): OperationContextSolution;
69
+ [inspect.custom](_depth: any, options: InspectOptions): string;
70
+ }
71
+ interface OperationResource {
72
+ operationId: string;
73
+ status: string;
74
+ createdAt: Date;
75
+ completedAt: Date;
76
+ statusUrl: string;
77
+ error: FetchOperationStatus200ResponseError;
78
+ related: {
79
+ [key: string]: string;
80
+ };
81
+ }
82
+ /**
83
+ * Status of a long-running operation.
84
+ */
85
+ export declare class OperationInstance {
86
+ protected _version: V2;
87
+ protected _solution: OperationContextSolution;
88
+ protected _context?: OperationContext;
89
+ constructor(_version: V2, _payload: OperationResource, sid?: string);
90
+ /**
91
+ * Unique identifier for the long-running operation.
92
+ */
93
+ operationId: string;
94
+ /**
95
+ * Current status of the operation.
96
+ */
97
+ status: string;
98
+ /**
99
+ * Timestamp when the operation was created.
100
+ */
101
+ createdAt: Date;
102
+ /**
103
+ * Timestamp when the operation completed. Only present for completed or failed operations.
104
+ */
105
+ completedAt: Date;
106
+ /**
107
+ * URL to poll for operation status.
108
+ */
109
+ statusUrl: string;
110
+ error: FetchOperationStatus200ResponseError;
111
+ /**
112
+ * Named resource identifiers associated with this operation. Keys depend on the operation type: - config-create, config-update, config-delete: configurationId - conversation-delete: conversationId
113
+ */
114
+ related: {
115
+ [key: string]: string;
116
+ };
117
+ private get _proxy();
118
+ /**
119
+ * Fetch a OperationInstance
120
+ *
121
+ * @param callback - Callback to handle processed record
122
+ *
123
+ * @returns Resolves to processed OperationInstance
124
+ */
125
+ fetch(callback?: (error: Error | null, item?: OperationInstance) => any): Promise<OperationInstance>;
126
+ /**
127
+ * Fetch a OperationInstance and return HTTP info
128
+ *
129
+ * @param callback - Callback to handle processed record
130
+ *
131
+ * @returns Resolves to processed OperationInstance with HTTP metadata
132
+ */
133
+ fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<OperationInstance>) => any): Promise<ApiResponse<OperationInstance>>;
134
+ /**
135
+ * Provide a user-friendly representation
136
+ *
137
+ * @returns Object
138
+ */
139
+ toJSON(): {
140
+ operationId: string;
141
+ status: string;
142
+ createdAt: Date;
143
+ completedAt: Date;
144
+ statusUrl: string;
145
+ error: FetchOperationStatus200ResponseError;
146
+ related: {
147
+ [key: string]: string;
148
+ };
149
+ };
150
+ [inspect.custom](_depth: any, options: InspectOptions): string;
151
+ }
152
+ export interface OperationSolution {
153
+ }
154
+ export interface OperationListInstance {
155
+ _version: V2;
156
+ _solution: OperationSolution;
157
+ _uri: string;
158
+ (sid: string): OperationContext;
159
+ get(sid: string): OperationContext;
160
+ /**
161
+ * Provide a user-friendly representation
162
+ */
163
+ toJSON(): any;
164
+ [inspect.custom](_depth: any, options: InspectOptions): any;
165
+ }
166
+ export declare function OperationListInstance(version: V2): OperationListInstance;
167
+ export {};
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ /*
3
+ * This code was generated by
4
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
5
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
6
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
7
+ *
8
+ * Conversation Orchestrator
9
+ * Manage configurations, conversations, participants, and communications. Create configurations to define capture rules and channel settings, then use conversations to group related communications.
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.OperationInstance = exports.OperationContextImpl = exports.FetchOperationStatus200ResponseError = void 0;
17
+ exports.OperationListInstance = OperationListInstance;
18
+ const util_1 = require("util");
19
+ const deserialize = require("../../../base/deserialize");
20
+ const serialize = require("../../../base/serialize");
21
+ const utility_1 = require("../../../base/utility");
22
+ /**
23
+ * Error details if the operation failed. Follows RFC 9457 Problem Details.
24
+ */
25
+ class FetchOperationStatus200ResponseError {
26
+ constructor(payload) {
27
+ this.type = payload["type"];
28
+ this.title = payload["title"];
29
+ this.status = payload["status"];
30
+ this.detail = payload["detail"];
31
+ this.instance = payload["instance"];
32
+ }
33
+ }
34
+ exports.FetchOperationStatus200ResponseError = FetchOperationStatus200ResponseError;
35
+ class OperationContextImpl {
36
+ constructor(_version, sid) {
37
+ this._version = _version;
38
+ if (!(0, utility_1.isValidPathParam)(sid)) {
39
+ throw new Error("Parameter 'sid' is not valid.");
40
+ }
41
+ this._solution = { sid };
42
+ this._uri = `/ControlPlane/Operations/${sid}`;
43
+ }
44
+ fetch(callback) {
45
+ const headers = {};
46
+ headers["Accept"] = "application/json";
47
+ const instance = this;
48
+ let operationVersion = instance._version, operationPromise = operationVersion.fetch({
49
+ uri: instance._uri,
50
+ method: "get",
51
+ headers,
52
+ });
53
+ operationPromise = operationPromise.then((payload) => new OperationInstance(operationVersion, payload, instance._solution.sid));
54
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
55
+ return operationPromise;
56
+ }
57
+ fetchWithHttpInfo(callback) {
58
+ const headers = {};
59
+ headers["Accept"] = "application/json";
60
+ const instance = this;
61
+ let operationVersion = instance._version;
62
+ // CREATE, FETCH, UPDATE operations
63
+ let operationPromise = operationVersion
64
+ .fetchWithResponseInfo({
65
+ uri: instance._uri,
66
+ method: "get",
67
+ headers,
68
+ })
69
+ .then((response) => ({
70
+ ...response,
71
+ body: new OperationInstance(operationVersion, response.body, instance._solution.sid),
72
+ }));
73
+ operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
74
+ return operationPromise;
75
+ }
76
+ /**
77
+ * Provide a user-friendly representation
78
+ *
79
+ * @returns Object
80
+ */
81
+ toJSON() {
82
+ return this._solution;
83
+ }
84
+ [util_1.inspect.custom](_depth, options) {
85
+ return (0, util_1.inspect)(this.toJSON(), options);
86
+ }
87
+ }
88
+ exports.OperationContextImpl = OperationContextImpl;
89
+ /**
90
+ * Status of a long-running operation.
91
+ */
92
+ class OperationInstance {
93
+ constructor(_version, _payload, sid) {
94
+ this._version = _version;
95
+ const payload = _payload;
96
+ this.operationId = payload.operationId;
97
+ this.status = payload.status;
98
+ this.createdAt = deserialize.iso8601DateTime(payload.createdAt);
99
+ this.completedAt = deserialize.iso8601DateTime(payload.completedAt);
100
+ this.statusUrl = payload.statusUrl;
101
+ this.error =
102
+ payload.error !== null && payload.error !== undefined
103
+ ? new FetchOperationStatus200ResponseError(payload.error)
104
+ : null;
105
+ this.related = payload.related;
106
+ this._solution = { sid: sid };
107
+ }
108
+ get _proxy() {
109
+ this._context =
110
+ this._context ||
111
+ new OperationContextImpl(this._version, this._solution.sid);
112
+ return this._context;
113
+ }
114
+ /**
115
+ * Fetch a OperationInstance
116
+ *
117
+ * @param callback - Callback to handle processed record
118
+ *
119
+ * @returns Resolves to processed OperationInstance
120
+ */
121
+ fetch(callback) {
122
+ return this._proxy.fetch(callback);
123
+ }
124
+ /**
125
+ * Fetch a OperationInstance and return HTTP info
126
+ *
127
+ * @param callback - Callback to handle processed record
128
+ *
129
+ * @returns Resolves to processed OperationInstance with HTTP metadata
130
+ */
131
+ fetchWithHttpInfo(callback) {
132
+ return this._proxy.fetchWithHttpInfo(callback);
133
+ }
134
+ /**
135
+ * Provide a user-friendly representation
136
+ *
137
+ * @returns Object
138
+ */
139
+ toJSON() {
140
+ return {
141
+ operationId: this.operationId,
142
+ status: this.status,
143
+ createdAt: this.createdAt,
144
+ completedAt: this.completedAt,
145
+ statusUrl: this.statusUrl,
146
+ error: this.error,
147
+ related: this.related,
148
+ };
149
+ }
150
+ [util_1.inspect.custom](_depth, options) {
151
+ return (0, util_1.inspect)(this.toJSON(), options);
152
+ }
153
+ }
154
+ exports.OperationInstance = OperationInstance;
155
+ function OperationListInstance(version) {
156
+ const instance = ((sid) => instance.get(sid));
157
+ instance.get = function get(sid) {
158
+ return new OperationContextImpl(version, sid);
159
+ };
160
+ instance._version = version;
161
+ instance._solution = {};
162
+ instance._uri = ``;
163
+ instance.toJSON = function toJSON() {
164
+ return instance._solution;
165
+ };
166
+ instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
167
+ return (0, util_1.inspect)(instance.toJSON(), options);
168
+ };
169
+ return instance;
170
+ }