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.
- package/lib/rest/ConversationsBase.d.ts +3 -0
- package/lib/rest/ConversationsBase.js +5 -0
- package/lib/rest/InsightsBase.d.ts +3 -0
- package/lib/rest/InsightsBase.js +5 -0
- package/lib/rest/IntelligenceBase.d.ts +3 -0
- package/lib/rest/IntelligenceBase.js +5 -0
- package/lib/rest/KnowledgeBase.d.ts +3 -0
- package/lib/rest/KnowledgeBase.js +5 -0
- package/lib/rest/Memory.d.ts +4 -0
- package/lib/rest/Memory.js +8 -0
- package/lib/rest/MemoryBase.d.ts +13 -0
- package/lib/rest/MemoryBase.js +31 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +5 -0
- package/lib/rest/VoiceBase.d.ts +3 -0
- package/lib/rest/VoiceBase.js +5 -0
- package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/recording.js +4 -0
- package/lib/rest/api/v2010/account/call/transcription.d.ts +1 -1
- package/lib/rest/api/v2010/account/call/transcription.js +6 -4
- package/lib/rest/api/v2010/account/call.d.ts +2 -0
- package/lib/rest/api/v2010/account/call.js +4 -0
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
- package/lib/rest/api/v2010/account/conference/participant.js +4 -0
- package/lib/rest/conversations/V2.d.ts +38 -0
- package/lib/rest/conversations/V2.js +72 -0
- package/lib/rest/conversations/v2/action.d.ts +241 -0
- package/lib/rest/conversations/v2/action.js +246 -0
- package/lib/rest/conversations/v2/communication.d.ts +479 -0
- package/lib/rest/conversations/v2/communication.js +436 -0
- package/lib/rest/conversations/v2/configuration.d.ts +906 -0
- package/lib/rest/conversations/v2/configuration.js +619 -0
- package/lib/rest/conversations/v2/conversation.d.ts +936 -0
- package/lib/rest/conversations/v2/conversation.js +664 -0
- package/lib/rest/conversations/v2/operation.d.ts +167 -0
- package/lib/rest/conversations/v2/operation.js +170 -0
- package/lib/rest/conversations/v2/participant.d.ts +469 -0
- package/lib/rest/conversations/v2/participant.js +442 -0
- package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
- package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
- package/lib/rest/insights/V3.d.ts +20 -0
- package/lib/rest/insights/V3.js +42 -0
- package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
- package/lib/rest/insights/v1/call/event.d.ts +4 -4
- package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
- package/lib/rest/insights/v3/metadata.d.ts +115 -0
- package/lib/rest/insights/v3/metadata.js +118 -0
- package/lib/rest/insights/v3/query.d.ts +180 -0
- package/lib/rest/insights/v3/query.js +214 -0
- package/lib/rest/intelligence/V3.d.ts +35 -0
- package/lib/rest/intelligence/V3.js +65 -0
- package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
- package/lib/rest/intelligence/v3/configuration.js +528 -0
- package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
- package/lib/rest/intelligence/v3/conversation.js +342 -0
- package/lib/rest/intelligence/v3/operator.d.ts +619 -0
- package/lib/rest/intelligence/v3/operator.js +493 -0
- package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
- package/lib/rest/intelligence/v3/operatorResult.js +478 -0
- package/lib/rest/intelligence/v3/version.d.ts +469 -0
- package/lib/rest/intelligence/v3/version.js +341 -0
- package/lib/rest/knowledge/V2.d.ts +31 -0
- package/lib/rest/knowledge/V2.js +62 -0
- package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
- package/lib/rest/knowledge/v2/chunk.js +178 -0
- package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
- package/lib/rest/knowledge/v2/knowledge.js +466 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
- package/lib/rest/knowledge/v2/operation.d.ts +162 -0
- package/lib/rest/knowledge/v2/operation.js +175 -0
- package/lib/rest/knowledge/v2/search.d.ts +180 -0
- package/lib/rest/knowledge/v2/search.js +174 -0
- package/lib/rest/memory/V1.d.ts +76 -0
- package/lib/rest/memory/V1.js +140 -0
- package/lib/rest/memory/v1/bulk.d.ts +129 -0
- package/lib/rest/memory/v1/bulk.js +158 -0
- package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
- package/lib/rest/memory/v1/conversationSummary.js +473 -0
- package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
- package/lib/rest/memory/v1/dataMapping.js +512 -0
- package/lib/rest/memory/v1/event.d.ts +153 -0
- package/lib/rest/memory/v1/event.js +159 -0
- package/lib/rest/memory/v1/identifier.d.ts +362 -0
- package/lib/rest/memory/v1/identifier.js +369 -0
- package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
- package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
- package/lib/rest/memory/v1/import.d.ts +292 -0
- package/lib/rest/memory/v1/import.js +280 -0
- package/lib/rest/memory/v1/lookup.d.ts +82 -0
- package/lib/rest/memory/v1/lookup.js +118 -0
- package/lib/rest/memory/v1/observation.d.ts +521 -0
- package/lib/rest/memory/v1/observation.js +477 -0
- package/lib/rest/memory/v1/operation.d.ts +162 -0
- package/lib/rest/memory/v1/operation.js +175 -0
- package/lib/rest/memory/v1/profile.d.ts +548 -0
- package/lib/rest/memory/v1/profile.js +531 -0
- package/lib/rest/memory/v1/recall.d.ts +306 -0
- package/lib/rest/memory/v1/recall.js +234 -0
- package/lib/rest/memory/v1/revision.d.ts +246 -0
- package/lib/rest/memory/v1/revision.js +195 -0
- package/lib/rest/memory/v1/store.d.ts +544 -0
- package/lib/rest/memory/v1/store.js +534 -0
- package/lib/rest/memory/v1/trait.d.ts +233 -0
- package/lib/rest/memory/v1/trait.js +190 -0
- package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
- package/lib/rest/memory/v1/traitGroup.js +555 -0
- package/lib/rest/messaging/v2/channelsSender.d.ts +8 -0
- package/lib/rest/messaging/v2/channelsSender.js +2 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
- package/lib/rest/studio/v2/flow.d.ts +4 -0
- package/lib/rest/studio/v2/flow.js +8 -0
- package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
- package/lib/rest/verify/v2/service/webhook.js +8 -8
- package/lib/rest/voice/V3.d.ts +15 -0
- package/lib/rest/voice/V3.js +37 -0
- package/lib/rest/voice/v3/transcription.d.ts +378 -0
- package/lib/rest/voice/v3/transcription.js +264 -0
- package/lib/twiml/VoiceResponse.d.ts +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio Memory API
|
|
9
|
+
* APIs for managing memory stores, profiles, events, and conversational intelligence capabilities.
|
|
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.OperationStatusError = exports.OperationResultResourceId = 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
|
+
class OperationResultResourceId {
|
|
23
|
+
constructor(payload) {
|
|
24
|
+
this.type = payload["type"];
|
|
25
|
+
this.id = payload["id"];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.OperationResultResourceId = OperationResultResourceId;
|
|
29
|
+
class OperationStatusError {
|
|
30
|
+
constructor(payload) {
|
|
31
|
+
this.type = payload["type"];
|
|
32
|
+
this.title = payload["title"];
|
|
33
|
+
this.code = payload["code"];
|
|
34
|
+
this.detail = payload["detail"];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.OperationStatusError = OperationStatusError;
|
|
38
|
+
class OperationContextImpl {
|
|
39
|
+
constructor(_version, operationId) {
|
|
40
|
+
this._version = _version;
|
|
41
|
+
if (!(0, utility_1.isValidPathParam)(operationId)) {
|
|
42
|
+
throw new Error("Parameter 'operationId' is not valid.");
|
|
43
|
+
}
|
|
44
|
+
this._solution = { operationId };
|
|
45
|
+
this._uri = `/ControlPlane/Operations/${operationId}`;
|
|
46
|
+
}
|
|
47
|
+
fetch(callback) {
|
|
48
|
+
const headers = {};
|
|
49
|
+
headers["Accept"] = "application/json";
|
|
50
|
+
const instance = this;
|
|
51
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
52
|
+
uri: instance._uri,
|
|
53
|
+
method: "get",
|
|
54
|
+
headers,
|
|
55
|
+
});
|
|
56
|
+
operationPromise = operationPromise.then((payload) => new OperationInstance(operationVersion, payload, instance._solution.operationId));
|
|
57
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
58
|
+
return operationPromise;
|
|
59
|
+
}
|
|
60
|
+
fetchWithHttpInfo(callback) {
|
|
61
|
+
const headers = {};
|
|
62
|
+
headers["Accept"] = "application/json";
|
|
63
|
+
const instance = this;
|
|
64
|
+
let operationVersion = instance._version;
|
|
65
|
+
// CREATE, FETCH, UPDATE operations
|
|
66
|
+
let operationPromise = operationVersion
|
|
67
|
+
.fetchWithResponseInfo({
|
|
68
|
+
uri: instance._uri,
|
|
69
|
+
method: "get",
|
|
70
|
+
headers,
|
|
71
|
+
})
|
|
72
|
+
.then((response) => ({
|
|
73
|
+
...response,
|
|
74
|
+
body: new OperationInstance(operationVersion, response.body, instance._solution.operationId),
|
|
75
|
+
}));
|
|
76
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
77
|
+
return operationPromise;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Provide a user-friendly representation
|
|
81
|
+
*
|
|
82
|
+
* @returns Object
|
|
83
|
+
*/
|
|
84
|
+
toJSON() {
|
|
85
|
+
return this._solution;
|
|
86
|
+
}
|
|
87
|
+
[util_1.inspect.custom](_depth, options) {
|
|
88
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.OperationContextImpl = OperationContextImpl;
|
|
92
|
+
class OperationInstance {
|
|
93
|
+
constructor(_version, _payload, operationId) {
|
|
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.statusUrl = payload.statusUrl;
|
|
100
|
+
this.completedAt = deserialize.iso8601DateTime(payload.completedAt);
|
|
101
|
+
this.result =
|
|
102
|
+
payload.result !== null && payload.result !== undefined
|
|
103
|
+
? new OperationResultResourceId(payload.result)
|
|
104
|
+
: null;
|
|
105
|
+
this.error =
|
|
106
|
+
payload.error !== null && payload.error !== undefined
|
|
107
|
+
? new OperationStatusError(payload.error)
|
|
108
|
+
: null;
|
|
109
|
+
this.resultUrl = payload.resultUrl;
|
|
110
|
+
this._solution = { operationId: operationId };
|
|
111
|
+
}
|
|
112
|
+
get _proxy() {
|
|
113
|
+
this._context =
|
|
114
|
+
this._context ||
|
|
115
|
+
new OperationContextImpl(this._version, this._solution.operationId);
|
|
116
|
+
return this._context;
|
|
117
|
+
}
|
|
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) {
|
|
126
|
+
return this._proxy.fetch(callback);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Fetch a OperationInstance and return HTTP info
|
|
130
|
+
*
|
|
131
|
+
* @param callback - Callback to handle processed record
|
|
132
|
+
*
|
|
133
|
+
* @returns Resolves to processed OperationInstance with HTTP metadata
|
|
134
|
+
*/
|
|
135
|
+
fetchWithHttpInfo(callback) {
|
|
136
|
+
return this._proxy.fetchWithHttpInfo(callback);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Provide a user-friendly representation
|
|
140
|
+
*
|
|
141
|
+
* @returns Object
|
|
142
|
+
*/
|
|
143
|
+
toJSON() {
|
|
144
|
+
return {
|
|
145
|
+
operationId: this.operationId,
|
|
146
|
+
status: this.status,
|
|
147
|
+
createdAt: this.createdAt,
|
|
148
|
+
statusUrl: this.statusUrl,
|
|
149
|
+
completedAt: this.completedAt,
|
|
150
|
+
result: this.result,
|
|
151
|
+
error: this.error,
|
|
152
|
+
resultUrl: this.resultUrl,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
[util_1.inspect.custom](_depth, options) {
|
|
156
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.OperationInstance = OperationInstance;
|
|
160
|
+
function OperationListInstance(version) {
|
|
161
|
+
const instance = ((operationId) => instance.get(operationId));
|
|
162
|
+
instance.get = function get(operationId) {
|
|
163
|
+
return new OperationContextImpl(version, operationId);
|
|
164
|
+
};
|
|
165
|
+
instance._version = version;
|
|
166
|
+
instance._solution = {};
|
|
167
|
+
instance._uri = ``;
|
|
168
|
+
instance.toJSON = function toJSON() {
|
|
169
|
+
return instance._solution;
|
|
170
|
+
};
|
|
171
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
172
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
173
|
+
};
|
|
174
|
+
return instance;
|
|
175
|
+
}
|