@crestal/nation-sdk 0.1.19
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/.openapi-generator/FILES +51 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +126 -0
- package/api.ts +4195 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +115 -0
- package/dist/api.d.ts +3103 -0
- package/dist/api.js +2629 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +86 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +253 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +57 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +31 -0
- package/docs/AgentApi.md +167 -0
- package/docs/AgentAutonomous.md +33 -0
- package/docs/AgentExample.md +25 -0
- package/docs/AgentResponse.md +91 -0
- package/docs/AgentStatisticsResponse.md +49 -0
- package/docs/AgentUpdate.md +91 -0
- package/docs/AuthorType.md +23 -0
- package/docs/Chat.md +33 -0
- package/docs/ChatApi.md +516 -0
- package/docs/ChatMessage.md +63 -0
- package/docs/ChatMessageAttachment.md +23 -0
- package/docs/ChatMessageAttachmentType.md +13 -0
- package/docs/ChatMessageRequest.md +31 -0
- package/docs/ChatMessageSkillCall.md +35 -0
- package/docs/ChatMessagesResponse.md +25 -0
- package/docs/ChatUpdateRequest.md +21 -0
- package/docs/CreditAccount.md +45 -0
- package/docs/CreditApi.md +290 -0
- package/docs/CreditDebit.md +11 -0
- package/docs/CreditEvent.md +101 -0
- package/docs/CreditEventWithAgent.md +103 -0
- package/docs/CreditEventsResponse.md +25 -0
- package/docs/CreditTransactionResp.md +37 -0
- package/docs/CreditTransactionsResponse.md +25 -0
- package/docs/CreditType.md +13 -0
- package/docs/Direction.md +11 -0
- package/docs/EventType.md +31 -0
- package/docs/FeePercentage.md +19 -0
- package/docs/HTTPValidationError.md +20 -0
- package/docs/HealthApi.md +52 -0
- package/docs/LLMModelInfoWithProviderName.md +67 -0
- package/docs/LLMProvider.md +18 -0
- package/docs/MetadataApi.md +258 -0
- package/docs/OwnerType.md +13 -0
- package/docs/Skill.md +43 -0
- package/docs/TransactionType.md +39 -0
- package/docs/UpstreamType.md +15 -0
- package/docs/ValidationError.md +24 -0
- package/docs/ValidationErrorLocInner.md +18 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +31 -0
- package/tsconfig.json +21 -0
package/dist/api.js
ADDED
|
@@ -0,0 +1,2629 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Nation IntentKit API
|
|
6
|
+
* API for Nation IntentKit services
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.19
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
52
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
78
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
79
|
+
if (ar || !(i in from)) {
|
|
80
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
81
|
+
ar[i] = from[i];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
|
+
};
|
|
86
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
+
exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.CreditApi = exports.CreditApiFactory = exports.CreditApiFp = exports.CreditApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AgentApi = exports.AgentApiFactory = exports.AgentApiFp = exports.AgentApiAxiosParamCreator = exports.UpstreamType = exports.TransactionType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUpdateCdpNetworkIdEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateModeEnum = exports.AgentResponseWalletProviderEnum = exports.AgentResponseModeEnum = void 0;
|
|
88
|
+
var axios_1 = require("axios");
|
|
89
|
+
// Some imports not used depending on template conditions
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
var common_1 = require("./common");
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
var base_1 = require("./base");
|
|
94
|
+
exports.AgentResponseModeEnum = {
|
|
95
|
+
Public: 'public',
|
|
96
|
+
Private: 'private'
|
|
97
|
+
};
|
|
98
|
+
exports.AgentResponseWalletProviderEnum = {
|
|
99
|
+
Cdp: 'cdp'
|
|
100
|
+
};
|
|
101
|
+
exports.AgentUpdateModeEnum = {
|
|
102
|
+
Public: 'public',
|
|
103
|
+
Private: 'private'
|
|
104
|
+
};
|
|
105
|
+
exports.AgentUpdateShortTermMemoryStrategyEnum = {
|
|
106
|
+
Trim: 'trim',
|
|
107
|
+
Summarize: 'summarize'
|
|
108
|
+
};
|
|
109
|
+
exports.AgentUpdateWalletProviderEnum = {
|
|
110
|
+
Cdp: 'cdp'
|
|
111
|
+
};
|
|
112
|
+
exports.AgentUpdateNetworkIdEnum = {
|
|
113
|
+
EthereumMainnet: 'ethereum-mainnet',
|
|
114
|
+
EthereumSepolia: 'ethereum-sepolia',
|
|
115
|
+
PolygonMainnet: 'polygon-mainnet',
|
|
116
|
+
PolygonMumbai: 'polygon-mumbai',
|
|
117
|
+
BaseMainnet: 'base-mainnet',
|
|
118
|
+
BaseSepolia: 'base-sepolia',
|
|
119
|
+
ArbitrumMainnet: 'arbitrum-mainnet',
|
|
120
|
+
ArbitrumSepolia: 'arbitrum-sepolia',
|
|
121
|
+
OptimismMainnet: 'optimism-mainnet',
|
|
122
|
+
OptimismSepolia: 'optimism-sepolia',
|
|
123
|
+
Solana: 'solana'
|
|
124
|
+
};
|
|
125
|
+
exports.AgentUpdateCdpNetworkIdEnum = {
|
|
126
|
+
EthereumMainnet: 'ethereum-mainnet',
|
|
127
|
+
EthereumSepolia: 'ethereum-sepolia',
|
|
128
|
+
PolygonMainnet: 'polygon-mainnet',
|
|
129
|
+
PolygonMumbai: 'polygon-mumbai',
|
|
130
|
+
BaseMainnet: 'base-mainnet',
|
|
131
|
+
BaseSepolia: 'base-sepolia',
|
|
132
|
+
ArbitrumMainnet: 'arbitrum-mainnet',
|
|
133
|
+
ArbitrumSepolia: 'arbitrum-sepolia',
|
|
134
|
+
OptimismMainnet: 'optimism-mainnet',
|
|
135
|
+
OptimismSepolia: 'optimism-sepolia'
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Type of message author.
|
|
139
|
+
* @export
|
|
140
|
+
* @enum {string}
|
|
141
|
+
*/
|
|
142
|
+
exports.AuthorType = {
|
|
143
|
+
Agent: 'agent',
|
|
144
|
+
Trigger: 'trigger',
|
|
145
|
+
Skill: 'skill',
|
|
146
|
+
Telegram: 'telegram',
|
|
147
|
+
Twitter: 'twitter',
|
|
148
|
+
Web: 'web',
|
|
149
|
+
System: 'system',
|
|
150
|
+
Api: 'api'
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Type of chat message attachment.
|
|
154
|
+
* @export
|
|
155
|
+
* @enum {string}
|
|
156
|
+
*/
|
|
157
|
+
exports.ChatMessageAttachmentType = {
|
|
158
|
+
Link: 'link',
|
|
159
|
+
Image: 'image',
|
|
160
|
+
File: 'file'
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Credit or debit transaction.
|
|
164
|
+
* @export
|
|
165
|
+
* @enum {string}
|
|
166
|
+
*/
|
|
167
|
+
exports.CreditDebit = {
|
|
168
|
+
Credit: 'credit',
|
|
169
|
+
Debit: 'debit'
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Credit type is used in db column names, do not change it.
|
|
173
|
+
* @export
|
|
174
|
+
* @enum {string}
|
|
175
|
+
*/
|
|
176
|
+
exports.CreditType = {
|
|
177
|
+
FreeCredits: 'free_credits',
|
|
178
|
+
RewardCredits: 'reward_credits',
|
|
179
|
+
Credits: 'credits'
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Direction of credit flow.
|
|
183
|
+
* @export
|
|
184
|
+
* @enum {string}
|
|
185
|
+
*/
|
|
186
|
+
exports.Direction = {
|
|
187
|
+
Income: 'income',
|
|
188
|
+
Expense: 'expense'
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Type of credit event.
|
|
192
|
+
* @export
|
|
193
|
+
* @enum {string}
|
|
194
|
+
*/
|
|
195
|
+
exports.EventType = {
|
|
196
|
+
Memory: 'memory',
|
|
197
|
+
Message: 'message',
|
|
198
|
+
SkillCall: 'skill_call',
|
|
199
|
+
Voice: 'voice',
|
|
200
|
+
KnowledgeBase: 'knowledge_base',
|
|
201
|
+
Recharge: 'recharge',
|
|
202
|
+
Refund: 'refund',
|
|
203
|
+
Adjustment: 'adjustment',
|
|
204
|
+
Refill: 'refill',
|
|
205
|
+
Reward: 'reward',
|
|
206
|
+
EventReward: 'event_reward',
|
|
207
|
+
RechargeBonus: 'recharge_bonus'
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @export
|
|
212
|
+
* @enum {string}
|
|
213
|
+
*/
|
|
214
|
+
exports.LLMProvider = {
|
|
215
|
+
Openai: 'openai',
|
|
216
|
+
Deepseek: 'deepseek',
|
|
217
|
+
Xai: 'xai',
|
|
218
|
+
Eternal: 'eternal',
|
|
219
|
+
Reigent: 'reigent',
|
|
220
|
+
Venice: 'venice'
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Type of credit account owner.
|
|
224
|
+
* @export
|
|
225
|
+
* @enum {string}
|
|
226
|
+
*/
|
|
227
|
+
exports.OwnerType = {
|
|
228
|
+
User: 'user',
|
|
229
|
+
Agent: 'agent',
|
|
230
|
+
Platform: 'platform'
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Type of credit transaction.
|
|
234
|
+
* @export
|
|
235
|
+
* @enum {string}
|
|
236
|
+
*/
|
|
237
|
+
exports.TransactionType = {
|
|
238
|
+
Pay: 'pay',
|
|
239
|
+
ReceiveBaseLlm: 'receive_base_llm',
|
|
240
|
+
ReceiveBaseSkill: 'receive_base_skill',
|
|
241
|
+
ReceiveBaseMemory: 'receive_base_memory',
|
|
242
|
+
ReceiveBaseVoice: 'receive_base_voice',
|
|
243
|
+
ReceiveBaseKnowledge: 'receive_base_knowledge',
|
|
244
|
+
ReceiveFeeDev: 'receive_fee_dev',
|
|
245
|
+
ReceiveFeeAgent: 'receive_fee_agent',
|
|
246
|
+
ReceiveFeePlatform: 'receive_fee_platform',
|
|
247
|
+
Recharge: 'recharge',
|
|
248
|
+
Refund: 'refund',
|
|
249
|
+
Adjustment: 'adjustment',
|
|
250
|
+
Refill: 'refill',
|
|
251
|
+
Reward: 'reward',
|
|
252
|
+
EventReward: 'event_reward',
|
|
253
|
+
RechargeBonus: 'recharge_bonus'
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Type of upstream transaction.
|
|
257
|
+
* @export
|
|
258
|
+
* @enum {string}
|
|
259
|
+
*/
|
|
260
|
+
exports.UpstreamType = {
|
|
261
|
+
Api: 'api',
|
|
262
|
+
Scheduler: 'scheduler',
|
|
263
|
+
Executor: 'executor',
|
|
264
|
+
Initializer: 'initializer'
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* AgentApi - axios parameter creator
|
|
268
|
+
* @export
|
|
269
|
+
*/
|
|
270
|
+
var AgentApiAxiosParamCreator = function (configuration) {
|
|
271
|
+
var _this = this;
|
|
272
|
+
return {
|
|
273
|
+
/**
|
|
274
|
+
* Create a new agent owned by the current user. The agent will be initialized with the provided details.
|
|
275
|
+
* @summary Create a new agent
|
|
276
|
+
* @param {AgentUpdate} agentUpdate
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
*/
|
|
280
|
+
createAgent: function (agentUpdate_1) {
|
|
281
|
+
var args_1 = [];
|
|
282
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
283
|
+
args_1[_i - 1] = arguments[_i];
|
|
284
|
+
}
|
|
285
|
+
return __awaiter(_this, __spreadArray([agentUpdate_1], args_1, true), void 0, function (agentUpdate, options) {
|
|
286
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
287
|
+
if (options === void 0) { options = {}; }
|
|
288
|
+
return __generator(this, function (_a) {
|
|
289
|
+
switch (_a.label) {
|
|
290
|
+
case 0:
|
|
291
|
+
// verify required parameter 'agentUpdate' is not null or undefined
|
|
292
|
+
(0, common_1.assertParamExists)('createAgent', 'agentUpdate', agentUpdate);
|
|
293
|
+
localVarPath = "/agents";
|
|
294
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
295
|
+
if (configuration) {
|
|
296
|
+
baseOptions = configuration.baseOptions;
|
|
297
|
+
}
|
|
298
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
299
|
+
localVarHeaderParameter = {};
|
|
300
|
+
localVarQueryParameter = {};
|
|
301
|
+
// authentication HTTPBearer required
|
|
302
|
+
// http bearer authentication required
|
|
303
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
304
|
+
case 1:
|
|
305
|
+
// authentication HTTPBearer required
|
|
306
|
+
// http bearer authentication required
|
|
307
|
+
_a.sent();
|
|
308
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
309
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
310
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
311
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
312
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUpdate, localVarRequestOptions, configuration);
|
|
313
|
+
return [2 /*return*/, {
|
|
314
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
315
|
+
options: localVarRequestOptions,
|
|
316
|
+
}];
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
},
|
|
321
|
+
/**
|
|
322
|
+
* Retrieve a specific agent by its ID. Returns 404 if not found.
|
|
323
|
+
* @summary Get agent by ID
|
|
324
|
+
* @param {string} aid Agent ID
|
|
325
|
+
* @param {*} [options] Override http request option.
|
|
326
|
+
* @throws {RequiredError}
|
|
327
|
+
*/
|
|
328
|
+
getAgentById: function (aid_1) {
|
|
329
|
+
var args_1 = [];
|
|
330
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
331
|
+
args_1[_i - 1] = arguments[_i];
|
|
332
|
+
}
|
|
333
|
+
return __awaiter(_this, __spreadArray([aid_1], args_1, true), void 0, function (aid, options) {
|
|
334
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
335
|
+
if (options === void 0) { options = {}; }
|
|
336
|
+
return __generator(this, function (_a) {
|
|
337
|
+
// verify required parameter 'aid' is not null or undefined
|
|
338
|
+
(0, common_1.assertParamExists)('getAgentById', 'aid', aid);
|
|
339
|
+
localVarPath = "/agents/{aid}"
|
|
340
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
|
|
341
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
342
|
+
if (configuration) {
|
|
343
|
+
baseOptions = configuration.baseOptions;
|
|
344
|
+
}
|
|
345
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
346
|
+
localVarHeaderParameter = {};
|
|
347
|
+
localVarQueryParameter = {};
|
|
348
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
349
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
350
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
351
|
+
return [2 /*return*/, {
|
|
352
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
353
|
+
options: localVarRequestOptions,
|
|
354
|
+
}];
|
|
355
|
+
});
|
|
356
|
+
});
|
|
357
|
+
},
|
|
358
|
+
/**
|
|
359
|
+
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
360
|
+
* @summary Get Agent Statistics
|
|
361
|
+
* @param {string} aid ID of the agent
|
|
362
|
+
* @param {*} [options] Override http request option.
|
|
363
|
+
* @throws {RequiredError}
|
|
364
|
+
*/
|
|
365
|
+
getAgentStatistics: function (aid_1) {
|
|
366
|
+
var args_1 = [];
|
|
367
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
368
|
+
args_1[_i - 1] = arguments[_i];
|
|
369
|
+
}
|
|
370
|
+
return __awaiter(_this, __spreadArray([aid_1], args_1, true), void 0, function (aid, options) {
|
|
371
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
372
|
+
if (options === void 0) { options = {}; }
|
|
373
|
+
return __generator(this, function (_a) {
|
|
374
|
+
// verify required parameter 'aid' is not null or undefined
|
|
375
|
+
(0, common_1.assertParamExists)('getAgentStatistics', 'aid', aid);
|
|
376
|
+
localVarPath = "/agents/{aid}/statistics"
|
|
377
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
|
|
378
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
379
|
+
if (configuration) {
|
|
380
|
+
baseOptions = configuration.baseOptions;
|
|
381
|
+
}
|
|
382
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
383
|
+
localVarHeaderParameter = {};
|
|
384
|
+
localVarQueryParameter = {};
|
|
385
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
386
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
387
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
388
|
+
return [2 /*return*/, {
|
|
389
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
390
|
+
options: localVarRequestOptions,
|
|
391
|
+
}];
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
},
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
exports.AgentApiAxiosParamCreator = AgentApiAxiosParamCreator;
|
|
398
|
+
/**
|
|
399
|
+
* AgentApi - functional programming interface
|
|
400
|
+
* @export
|
|
401
|
+
*/
|
|
402
|
+
var AgentApiFp = function (configuration) {
|
|
403
|
+
var localVarAxiosParamCreator = (0, exports.AgentApiAxiosParamCreator)(configuration);
|
|
404
|
+
return {
|
|
405
|
+
/**
|
|
406
|
+
* Create a new agent owned by the current user. The agent will be initialized with the provided details.
|
|
407
|
+
* @summary Create a new agent
|
|
408
|
+
* @param {AgentUpdate} agentUpdate
|
|
409
|
+
* @param {*} [options] Override http request option.
|
|
410
|
+
* @throws {RequiredError}
|
|
411
|
+
*/
|
|
412
|
+
createAgent: function (agentUpdate, options) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
414
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
415
|
+
var _a, _b, _c;
|
|
416
|
+
return __generator(this, function (_d) {
|
|
417
|
+
switch (_d.label) {
|
|
418
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAgent(agentUpdate, options)];
|
|
419
|
+
case 1:
|
|
420
|
+
localVarAxiosArgs = _d.sent();
|
|
421
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
422
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.createAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
423
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
});
|
|
427
|
+
},
|
|
428
|
+
/**
|
|
429
|
+
* Retrieve a specific agent by its ID. Returns 404 if not found.
|
|
430
|
+
* @summary Get agent by ID
|
|
431
|
+
* @param {string} aid Agent ID
|
|
432
|
+
* @param {*} [options] Override http request option.
|
|
433
|
+
* @throws {RequiredError}
|
|
434
|
+
*/
|
|
435
|
+
getAgentById: function (aid, options) {
|
|
436
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
437
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
438
|
+
var _a, _b, _c;
|
|
439
|
+
return __generator(this, function (_d) {
|
|
440
|
+
switch (_d.label) {
|
|
441
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentById(aid, options)];
|
|
442
|
+
case 1:
|
|
443
|
+
localVarAxiosArgs = _d.sent();
|
|
444
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
445
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.getAgentById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
446
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
});
|
|
450
|
+
},
|
|
451
|
+
/**
|
|
452
|
+
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
453
|
+
* @summary Get Agent Statistics
|
|
454
|
+
* @param {string} aid ID of the agent
|
|
455
|
+
* @param {*} [options] Override http request option.
|
|
456
|
+
* @throws {RequiredError}
|
|
457
|
+
*/
|
|
458
|
+
getAgentStatistics: function (aid, options) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
460
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
461
|
+
var _a, _b, _c;
|
|
462
|
+
return __generator(this, function (_d) {
|
|
463
|
+
switch (_d.label) {
|
|
464
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentStatistics(aid, options)];
|
|
465
|
+
case 1:
|
|
466
|
+
localVarAxiosArgs = _d.sent();
|
|
467
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
468
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.getAgentStatistics']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
469
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
},
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
exports.AgentApiFp = AgentApiFp;
|
|
477
|
+
/**
|
|
478
|
+
* AgentApi - factory interface
|
|
479
|
+
* @export
|
|
480
|
+
*/
|
|
481
|
+
var AgentApiFactory = function (configuration, basePath, axios) {
|
|
482
|
+
var localVarFp = (0, exports.AgentApiFp)(configuration);
|
|
483
|
+
return {
|
|
484
|
+
/**
|
|
485
|
+
* Create a new agent owned by the current user. The agent will be initialized with the provided details.
|
|
486
|
+
* @summary Create a new agent
|
|
487
|
+
* @param {AgentUpdate} agentUpdate
|
|
488
|
+
* @param {*} [options] Override http request option.
|
|
489
|
+
* @throws {RequiredError}
|
|
490
|
+
*/
|
|
491
|
+
createAgent: function (agentUpdate, options) {
|
|
492
|
+
return localVarFp.createAgent(agentUpdate, options).then(function (request) { return request(axios, basePath); });
|
|
493
|
+
},
|
|
494
|
+
/**
|
|
495
|
+
* Retrieve a specific agent by its ID. Returns 404 if not found.
|
|
496
|
+
* @summary Get agent by ID
|
|
497
|
+
* @param {string} aid Agent ID
|
|
498
|
+
* @param {*} [options] Override http request option.
|
|
499
|
+
* @throws {RequiredError}
|
|
500
|
+
*/
|
|
501
|
+
getAgentById: function (aid, options) {
|
|
502
|
+
return localVarFp.getAgentById(aid, options).then(function (request) { return request(axios, basePath); });
|
|
503
|
+
},
|
|
504
|
+
/**
|
|
505
|
+
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
506
|
+
* @summary Get Agent Statistics
|
|
507
|
+
* @param {string} aid ID of the agent
|
|
508
|
+
* @param {*} [options] Override http request option.
|
|
509
|
+
* @throws {RequiredError}
|
|
510
|
+
*/
|
|
511
|
+
getAgentStatistics: function (aid, options) {
|
|
512
|
+
return localVarFp.getAgentStatistics(aid, options).then(function (request) { return request(axios, basePath); });
|
|
513
|
+
},
|
|
514
|
+
};
|
|
515
|
+
};
|
|
516
|
+
exports.AgentApiFactory = AgentApiFactory;
|
|
517
|
+
/**
|
|
518
|
+
* AgentApi - object-oriented interface
|
|
519
|
+
* @export
|
|
520
|
+
* @class AgentApi
|
|
521
|
+
* @extends {BaseAPI}
|
|
522
|
+
*/
|
|
523
|
+
var AgentApi = /** @class */ (function (_super) {
|
|
524
|
+
__extends(AgentApi, _super);
|
|
525
|
+
function AgentApi() {
|
|
526
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Create a new agent owned by the current user. The agent will be initialized with the provided details.
|
|
530
|
+
* @summary Create a new agent
|
|
531
|
+
* @param {AgentUpdate} agentUpdate
|
|
532
|
+
* @param {*} [options] Override http request option.
|
|
533
|
+
* @throws {RequiredError}
|
|
534
|
+
* @memberof AgentApi
|
|
535
|
+
*/
|
|
536
|
+
AgentApi.prototype.createAgent = function (agentUpdate, options) {
|
|
537
|
+
var _this = this;
|
|
538
|
+
return (0, exports.AgentApiFp)(this.configuration).createAgent(agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* Retrieve a specific agent by its ID. Returns 404 if not found.
|
|
542
|
+
* @summary Get agent by ID
|
|
543
|
+
* @param {string} aid Agent ID
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @throws {RequiredError}
|
|
546
|
+
* @memberof AgentApi
|
|
547
|
+
*/
|
|
548
|
+
AgentApi.prototype.getAgentById = function (aid, options) {
|
|
549
|
+
var _this = this;
|
|
550
|
+
return (0, exports.AgentApiFp)(this.configuration).getAgentById(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
551
|
+
};
|
|
552
|
+
/**
|
|
553
|
+
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
554
|
+
* @summary Get Agent Statistics
|
|
555
|
+
* @param {string} aid ID of the agent
|
|
556
|
+
* @param {*} [options] Override http request option.
|
|
557
|
+
* @throws {RequiredError}
|
|
558
|
+
* @memberof AgentApi
|
|
559
|
+
*/
|
|
560
|
+
AgentApi.prototype.getAgentStatistics = function (aid, options) {
|
|
561
|
+
var _this = this;
|
|
562
|
+
return (0, exports.AgentApiFp)(this.configuration).getAgentStatistics(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
563
|
+
};
|
|
564
|
+
return AgentApi;
|
|
565
|
+
}(base_1.BaseAPI));
|
|
566
|
+
exports.AgentApi = AgentApi;
|
|
567
|
+
/**
|
|
568
|
+
* ChatApi - axios parameter creator
|
|
569
|
+
* @export
|
|
570
|
+
*/
|
|
571
|
+
var ChatApiAxiosParamCreator = function (configuration) {
|
|
572
|
+
var _this = this;
|
|
573
|
+
return {
|
|
574
|
+
/**
|
|
575
|
+
* Create a new chat thread for a specific agent and user.
|
|
576
|
+
* @summary Create a new chat thread
|
|
577
|
+
* @param {string} aid Agent ID
|
|
578
|
+
* @param {*} [options] Override http request option.
|
|
579
|
+
* @throws {RequiredError}
|
|
580
|
+
*/
|
|
581
|
+
createChatThread: function (aid_1) {
|
|
582
|
+
var args_1 = [];
|
|
583
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
584
|
+
args_1[_i - 1] = arguments[_i];
|
|
585
|
+
}
|
|
586
|
+
return __awaiter(_this, __spreadArray([aid_1], args_1, true), void 0, function (aid, options) {
|
|
587
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
588
|
+
if (options === void 0) { options = {}; }
|
|
589
|
+
return __generator(this, function (_a) {
|
|
590
|
+
switch (_a.label) {
|
|
591
|
+
case 0:
|
|
592
|
+
// verify required parameter 'aid' is not null or undefined
|
|
593
|
+
(0, common_1.assertParamExists)('createChatThread', 'aid', aid);
|
|
594
|
+
localVarPath = "/agents/{aid}/chats"
|
|
595
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
|
|
596
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
597
|
+
if (configuration) {
|
|
598
|
+
baseOptions = configuration.baseOptions;
|
|
599
|
+
}
|
|
600
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
601
|
+
localVarHeaderParameter = {};
|
|
602
|
+
localVarQueryParameter = {};
|
|
603
|
+
// authentication HTTPBearer required
|
|
604
|
+
// http bearer authentication required
|
|
605
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
606
|
+
case 1:
|
|
607
|
+
// authentication HTTPBearer required
|
|
608
|
+
// http bearer authentication required
|
|
609
|
+
_a.sent();
|
|
610
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
611
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
612
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
613
|
+
return [2 /*return*/, {
|
|
614
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
615
|
+
options: localVarRequestOptions,
|
|
616
|
+
}];
|
|
617
|
+
}
|
|
618
|
+
});
|
|
619
|
+
});
|
|
620
|
+
},
|
|
621
|
+
/**
|
|
622
|
+
* Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
623
|
+
* @summary Delete a chat thread
|
|
624
|
+
* @param {string} aid Agent ID
|
|
625
|
+
* @param {string} chatId Chat ID
|
|
626
|
+
* @param {*} [options] Override http request option.
|
|
627
|
+
* @throws {RequiredError}
|
|
628
|
+
*/
|
|
629
|
+
deleteChatThread: function (aid_1, chatId_1) {
|
|
630
|
+
var args_1 = [];
|
|
631
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
632
|
+
args_1[_i - 2] = arguments[_i];
|
|
633
|
+
}
|
|
634
|
+
return __awaiter(_this, __spreadArray([aid_1, chatId_1], args_1, true), void 0, function (aid, chatId, options) {
|
|
635
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
636
|
+
if (options === void 0) { options = {}; }
|
|
637
|
+
return __generator(this, function (_a) {
|
|
638
|
+
switch (_a.label) {
|
|
639
|
+
case 0:
|
|
640
|
+
// verify required parameter 'aid' is not null or undefined
|
|
641
|
+
(0, common_1.assertParamExists)('deleteChatThread', 'aid', aid);
|
|
642
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
643
|
+
(0, common_1.assertParamExists)('deleteChatThread', 'chatId', chatId);
|
|
644
|
+
localVarPath = "/agents/{aid}/chats/{chat_id}"
|
|
645
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)))
|
|
646
|
+
.replace("{".concat("chat_id", "}"), encodeURIComponent(String(chatId)));
|
|
647
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
648
|
+
if (configuration) {
|
|
649
|
+
baseOptions = configuration.baseOptions;
|
|
650
|
+
}
|
|
651
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
652
|
+
localVarHeaderParameter = {};
|
|
653
|
+
localVarQueryParameter = {};
|
|
654
|
+
// authentication HTTPBearer required
|
|
655
|
+
// http bearer authentication required
|
|
656
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
657
|
+
case 1:
|
|
658
|
+
// authentication HTTPBearer required
|
|
659
|
+
// http bearer authentication required
|
|
660
|
+
_a.sent();
|
|
661
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
662
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
663
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
664
|
+
return [2 /*return*/, {
|
|
665
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
666
|
+
options: localVarRequestOptions,
|
|
667
|
+
}];
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
});
|
|
671
|
+
},
|
|
672
|
+
/**
|
|
673
|
+
* Retrieve a specific chat thread by its ID for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
674
|
+
* @summary Get chat thread by ID
|
|
675
|
+
* @param {string} aid Agent ID
|
|
676
|
+
* @param {string} chatId Chat ID
|
|
677
|
+
* @param {*} [options] Override http request option.
|
|
678
|
+
* @throws {RequiredError}
|
|
679
|
+
*/
|
|
680
|
+
getChatThreadById: function (aid_1, chatId_1) {
|
|
681
|
+
var args_1 = [];
|
|
682
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
683
|
+
args_1[_i - 2] = arguments[_i];
|
|
684
|
+
}
|
|
685
|
+
return __awaiter(_this, __spreadArray([aid_1, chatId_1], args_1, true), void 0, function (aid, chatId, options) {
|
|
686
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
687
|
+
if (options === void 0) { options = {}; }
|
|
688
|
+
return __generator(this, function (_a) {
|
|
689
|
+
switch (_a.label) {
|
|
690
|
+
case 0:
|
|
691
|
+
// verify required parameter 'aid' is not null or undefined
|
|
692
|
+
(0, common_1.assertParamExists)('getChatThreadById', 'aid', aid);
|
|
693
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
694
|
+
(0, common_1.assertParamExists)('getChatThreadById', 'chatId', chatId);
|
|
695
|
+
localVarPath = "/agents/{aid}/chats/{chat_id}"
|
|
696
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)))
|
|
697
|
+
.replace("{".concat("chat_id", "}"), encodeURIComponent(String(chatId)));
|
|
698
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
699
|
+
if (configuration) {
|
|
700
|
+
baseOptions = configuration.baseOptions;
|
|
701
|
+
}
|
|
702
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
703
|
+
localVarHeaderParameter = {};
|
|
704
|
+
localVarQueryParameter = {};
|
|
705
|
+
// authentication HTTPBearer required
|
|
706
|
+
// http bearer authentication required
|
|
707
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
708
|
+
case 1:
|
|
709
|
+
// authentication HTTPBearer required
|
|
710
|
+
// http bearer authentication required
|
|
711
|
+
_a.sent();
|
|
712
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
713
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
714
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
715
|
+
return [2 /*return*/, {
|
|
716
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
717
|
+
options: localVarRequestOptions,
|
|
718
|
+
}];
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
});
|
|
722
|
+
},
|
|
723
|
+
/**
|
|
724
|
+
* Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
|
|
725
|
+
* @summary Get message by ID
|
|
726
|
+
* @param {string} messageId Message ID
|
|
727
|
+
* @param {*} [options] Override http request option.
|
|
728
|
+
* @throws {RequiredError}
|
|
729
|
+
*/
|
|
730
|
+
getMessageById: function (messageId_1) {
|
|
731
|
+
var args_1 = [];
|
|
732
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
733
|
+
args_1[_i - 1] = arguments[_i];
|
|
734
|
+
}
|
|
735
|
+
return __awaiter(_this, __spreadArray([messageId_1], args_1, true), void 0, function (messageId, options) {
|
|
736
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
737
|
+
if (options === void 0) { options = {}; }
|
|
738
|
+
return __generator(this, function (_a) {
|
|
739
|
+
switch (_a.label) {
|
|
740
|
+
case 0:
|
|
741
|
+
// verify required parameter 'messageId' is not null or undefined
|
|
742
|
+
(0, common_1.assertParamExists)('getMessageById', 'messageId', messageId);
|
|
743
|
+
localVarPath = "/messages/{message_id}"
|
|
744
|
+
.replace("{".concat("message_id", "}"), encodeURIComponent(String(messageId)));
|
|
745
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
746
|
+
if (configuration) {
|
|
747
|
+
baseOptions = configuration.baseOptions;
|
|
748
|
+
}
|
|
749
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
750
|
+
localVarHeaderParameter = {};
|
|
751
|
+
localVarQueryParameter = {};
|
|
752
|
+
// authentication HTTPBearer required
|
|
753
|
+
// http bearer authentication required
|
|
754
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
755
|
+
case 1:
|
|
756
|
+
// authentication HTTPBearer required
|
|
757
|
+
// http bearer authentication required
|
|
758
|
+
_a.sent();
|
|
759
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
760
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
761
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
762
|
+
return [2 /*return*/, {
|
|
763
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
764
|
+
options: localVarRequestOptions,
|
|
765
|
+
}];
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
});
|
|
769
|
+
},
|
|
770
|
+
/**
|
|
771
|
+
* Retrieve all chat threads associated with a specific agent for the current user.
|
|
772
|
+
* @summary List chat threads for an agent
|
|
773
|
+
* @param {string} aid Agent ID
|
|
774
|
+
* @param {*} [options] Override http request option.
|
|
775
|
+
* @throws {RequiredError}
|
|
776
|
+
*/
|
|
777
|
+
listChatsForAgent: function (aid_1) {
|
|
778
|
+
var args_1 = [];
|
|
779
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
780
|
+
args_1[_i - 1] = arguments[_i];
|
|
781
|
+
}
|
|
782
|
+
return __awaiter(_this, __spreadArray([aid_1], args_1, true), void 0, function (aid, options) {
|
|
783
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
784
|
+
if (options === void 0) { options = {}; }
|
|
785
|
+
return __generator(this, function (_a) {
|
|
786
|
+
switch (_a.label) {
|
|
787
|
+
case 0:
|
|
788
|
+
// verify required parameter 'aid' is not null or undefined
|
|
789
|
+
(0, common_1.assertParamExists)('listChatsForAgent', 'aid', aid);
|
|
790
|
+
localVarPath = "/agents/{aid}/chats"
|
|
791
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
|
|
792
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
793
|
+
if (configuration) {
|
|
794
|
+
baseOptions = configuration.baseOptions;
|
|
795
|
+
}
|
|
796
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
797
|
+
localVarHeaderParameter = {};
|
|
798
|
+
localVarQueryParameter = {};
|
|
799
|
+
// authentication HTTPBearer required
|
|
800
|
+
// http bearer authentication required
|
|
801
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
802
|
+
case 1:
|
|
803
|
+
// authentication HTTPBearer required
|
|
804
|
+
// http bearer authentication required
|
|
805
|
+
_a.sent();
|
|
806
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
807
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
808
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
809
|
+
return [2 /*return*/, {
|
|
810
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
811
|
+
options: localVarRequestOptions,
|
|
812
|
+
}];
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
});
|
|
816
|
+
},
|
|
817
|
+
/**
|
|
818
|
+
* Retrieve the message history for a specific chat thread with cursor-based pagination.
|
|
819
|
+
* @summary List messages in a chat thread
|
|
820
|
+
* @param {string} aid Agent ID
|
|
821
|
+
* @param {string} chatId Chat ID
|
|
822
|
+
* @param {string | null} [cursor] Cursor for pagination (message id)
|
|
823
|
+
* @param {number} [limit] Maximum number of messages to return
|
|
824
|
+
* @param {*} [options] Override http request option.
|
|
825
|
+
* @throws {RequiredError}
|
|
826
|
+
*/
|
|
827
|
+
listMessagesInChat: function (aid_1, chatId_1, cursor_1, limit_1) {
|
|
828
|
+
var args_1 = [];
|
|
829
|
+
for (var _i = 4; _i < arguments.length; _i++) {
|
|
830
|
+
args_1[_i - 4] = arguments[_i];
|
|
831
|
+
}
|
|
832
|
+
return __awaiter(_this, __spreadArray([aid_1, chatId_1, cursor_1, limit_1], args_1, true), void 0, function (aid, chatId, cursor, limit, options) {
|
|
833
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
834
|
+
if (options === void 0) { options = {}; }
|
|
835
|
+
return __generator(this, function (_a) {
|
|
836
|
+
switch (_a.label) {
|
|
837
|
+
case 0:
|
|
838
|
+
// verify required parameter 'aid' is not null or undefined
|
|
839
|
+
(0, common_1.assertParamExists)('listMessagesInChat', 'aid', aid);
|
|
840
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
841
|
+
(0, common_1.assertParamExists)('listMessagesInChat', 'chatId', chatId);
|
|
842
|
+
localVarPath = "/agents/{aid}/chats/{chat_id}/messages"
|
|
843
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)))
|
|
844
|
+
.replace("{".concat("chat_id", "}"), encodeURIComponent(String(chatId)));
|
|
845
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
846
|
+
if (configuration) {
|
|
847
|
+
baseOptions = configuration.baseOptions;
|
|
848
|
+
}
|
|
849
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
850
|
+
localVarHeaderParameter = {};
|
|
851
|
+
localVarQueryParameter = {};
|
|
852
|
+
// authentication HTTPBearer required
|
|
853
|
+
// http bearer authentication required
|
|
854
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
855
|
+
case 1:
|
|
856
|
+
// authentication HTTPBearer required
|
|
857
|
+
// http bearer authentication required
|
|
858
|
+
_a.sent();
|
|
859
|
+
if (cursor !== undefined) {
|
|
860
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
861
|
+
}
|
|
862
|
+
if (limit !== undefined) {
|
|
863
|
+
localVarQueryParameter['limit'] = limit;
|
|
864
|
+
}
|
|
865
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
866
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
867
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
868
|
+
return [2 /*return*/, {
|
|
869
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
870
|
+
options: localVarRequestOptions,
|
|
871
|
+
}];
|
|
872
|
+
}
|
|
873
|
+
});
|
|
874
|
+
});
|
|
875
|
+
},
|
|
876
|
+
/**
|
|
877
|
+
* Retry sending the last message in a specific chat thread. If the last message is from an agent/system, returns all messages after the last user message. If the last message is from a user, generates a new agent response. Only works with non-streaming mode.
|
|
878
|
+
* @summary Retry a message in a chat thread
|
|
879
|
+
* @param {string} aid Agent ID
|
|
880
|
+
* @param {string} chatId Chat ID
|
|
881
|
+
* @param {*} [options] Override http request option.
|
|
882
|
+
* @throws {RequiredError}
|
|
883
|
+
*/
|
|
884
|
+
retryMessageInChat: function (aid_1, chatId_1) {
|
|
885
|
+
var args_1 = [];
|
|
886
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
887
|
+
args_1[_i - 2] = arguments[_i];
|
|
888
|
+
}
|
|
889
|
+
return __awaiter(_this, __spreadArray([aid_1, chatId_1], args_1, true), void 0, function (aid, chatId, options) {
|
|
890
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
891
|
+
if (options === void 0) { options = {}; }
|
|
892
|
+
return __generator(this, function (_a) {
|
|
893
|
+
switch (_a.label) {
|
|
894
|
+
case 0:
|
|
895
|
+
// verify required parameter 'aid' is not null or undefined
|
|
896
|
+
(0, common_1.assertParamExists)('retryMessageInChat', 'aid', aid);
|
|
897
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
898
|
+
(0, common_1.assertParamExists)('retryMessageInChat', 'chatId', chatId);
|
|
899
|
+
localVarPath = "/agents/{aid}/chats/{chat_id}/messages/retry"
|
|
900
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)))
|
|
901
|
+
.replace("{".concat("chat_id", "}"), encodeURIComponent(String(chatId)));
|
|
902
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
903
|
+
if (configuration) {
|
|
904
|
+
baseOptions = configuration.baseOptions;
|
|
905
|
+
}
|
|
906
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
907
|
+
localVarHeaderParameter = {};
|
|
908
|
+
localVarQueryParameter = {};
|
|
909
|
+
// authentication HTTPBearer required
|
|
910
|
+
// http bearer authentication required
|
|
911
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
912
|
+
case 1:
|
|
913
|
+
// authentication HTTPBearer required
|
|
914
|
+
// http bearer authentication required
|
|
915
|
+
_a.sent();
|
|
916
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
917
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
918
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
919
|
+
return [2 /*return*/, {
|
|
920
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
921
|
+
options: localVarRequestOptions,
|
|
922
|
+
}];
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
});
|
|
926
|
+
},
|
|
927
|
+
/**
|
|
928
|
+
* Send a new message to a specific chat thread. Supports streaming responses if requested.
|
|
929
|
+
* @summary Send a message to a chat thread
|
|
930
|
+
* @param {string} aid Agent ID
|
|
931
|
+
* @param {string} chatId Chat ID
|
|
932
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
933
|
+
* @param {*} [options] Override http request option.
|
|
934
|
+
* @throws {RequiredError}
|
|
935
|
+
*/
|
|
936
|
+
sendMessageToChat: function (aid_1, chatId_1, chatMessageRequest_1) {
|
|
937
|
+
var args_1 = [];
|
|
938
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
939
|
+
args_1[_i - 3] = arguments[_i];
|
|
940
|
+
}
|
|
941
|
+
return __awaiter(_this, __spreadArray([aid_1, chatId_1, chatMessageRequest_1], args_1, true), void 0, function (aid, chatId, chatMessageRequest, options) {
|
|
942
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
943
|
+
if (options === void 0) { options = {}; }
|
|
944
|
+
return __generator(this, function (_a) {
|
|
945
|
+
switch (_a.label) {
|
|
946
|
+
case 0:
|
|
947
|
+
// verify required parameter 'aid' is not null or undefined
|
|
948
|
+
(0, common_1.assertParamExists)('sendMessageToChat', 'aid', aid);
|
|
949
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
950
|
+
(0, common_1.assertParamExists)('sendMessageToChat', 'chatId', chatId);
|
|
951
|
+
// verify required parameter 'chatMessageRequest' is not null or undefined
|
|
952
|
+
(0, common_1.assertParamExists)('sendMessageToChat', 'chatMessageRequest', chatMessageRequest);
|
|
953
|
+
localVarPath = "/agents/{aid}/chats/{chat_id}/messages"
|
|
954
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)))
|
|
955
|
+
.replace("{".concat("chat_id", "}"), encodeURIComponent(String(chatId)));
|
|
956
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
957
|
+
if (configuration) {
|
|
958
|
+
baseOptions = configuration.baseOptions;
|
|
959
|
+
}
|
|
960
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
961
|
+
localVarHeaderParameter = {};
|
|
962
|
+
localVarQueryParameter = {};
|
|
963
|
+
// authentication HTTPBearer required
|
|
964
|
+
// http bearer authentication required
|
|
965
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
966
|
+
case 1:
|
|
967
|
+
// authentication HTTPBearer required
|
|
968
|
+
// http bearer authentication required
|
|
969
|
+
_a.sent();
|
|
970
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
971
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
972
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
973
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
974
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatMessageRequest, localVarRequestOptions, configuration);
|
|
975
|
+
return [2 /*return*/, {
|
|
976
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
977
|
+
options: localVarRequestOptions,
|
|
978
|
+
}];
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
});
|
|
982
|
+
},
|
|
983
|
+
/**
|
|
984
|
+
* Update details of a specific chat thread. Currently only supports updating the summary.
|
|
985
|
+
* @summary Update a chat thread
|
|
986
|
+
* @param {string} aid Agent ID
|
|
987
|
+
* @param {string} chatId Chat ID
|
|
988
|
+
* @param {ChatUpdateRequest} chatUpdateRequest
|
|
989
|
+
* @param {*} [options] Override http request option.
|
|
990
|
+
* @throws {RequiredError}
|
|
991
|
+
*/
|
|
992
|
+
updateChatThread: function (aid_1, chatId_1, chatUpdateRequest_1) {
|
|
993
|
+
var args_1 = [];
|
|
994
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
995
|
+
args_1[_i - 3] = arguments[_i];
|
|
996
|
+
}
|
|
997
|
+
return __awaiter(_this, __spreadArray([aid_1, chatId_1, chatUpdateRequest_1], args_1, true), void 0, function (aid, chatId, chatUpdateRequest, options) {
|
|
998
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
999
|
+
if (options === void 0) { options = {}; }
|
|
1000
|
+
return __generator(this, function (_a) {
|
|
1001
|
+
switch (_a.label) {
|
|
1002
|
+
case 0:
|
|
1003
|
+
// verify required parameter 'aid' is not null or undefined
|
|
1004
|
+
(0, common_1.assertParamExists)('updateChatThread', 'aid', aid);
|
|
1005
|
+
// verify required parameter 'chatId' is not null or undefined
|
|
1006
|
+
(0, common_1.assertParamExists)('updateChatThread', 'chatId', chatId);
|
|
1007
|
+
// verify required parameter 'chatUpdateRequest' is not null or undefined
|
|
1008
|
+
(0, common_1.assertParamExists)('updateChatThread', 'chatUpdateRequest', chatUpdateRequest);
|
|
1009
|
+
localVarPath = "/agents/{aid}/chats/{chat_id}"
|
|
1010
|
+
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)))
|
|
1011
|
+
.replace("{".concat("chat_id", "}"), encodeURIComponent(String(chatId)));
|
|
1012
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1013
|
+
if (configuration) {
|
|
1014
|
+
baseOptions = configuration.baseOptions;
|
|
1015
|
+
}
|
|
1016
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
1017
|
+
localVarHeaderParameter = {};
|
|
1018
|
+
localVarQueryParameter = {};
|
|
1019
|
+
// authentication HTTPBearer required
|
|
1020
|
+
// http bearer authentication required
|
|
1021
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1022
|
+
case 1:
|
|
1023
|
+
// authentication HTTPBearer required
|
|
1024
|
+
// http bearer authentication required
|
|
1025
|
+
_a.sent();
|
|
1026
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1027
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1028
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1029
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1030
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(chatUpdateRequest, localVarRequestOptions, configuration);
|
|
1031
|
+
return [2 /*return*/, {
|
|
1032
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1033
|
+
options: localVarRequestOptions,
|
|
1034
|
+
}];
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
});
|
|
1038
|
+
},
|
|
1039
|
+
};
|
|
1040
|
+
};
|
|
1041
|
+
exports.ChatApiAxiosParamCreator = ChatApiAxiosParamCreator;
|
|
1042
|
+
/**
|
|
1043
|
+
* ChatApi - functional programming interface
|
|
1044
|
+
* @export
|
|
1045
|
+
*/
|
|
1046
|
+
var ChatApiFp = function (configuration) {
|
|
1047
|
+
var localVarAxiosParamCreator = (0, exports.ChatApiAxiosParamCreator)(configuration);
|
|
1048
|
+
return {
|
|
1049
|
+
/**
|
|
1050
|
+
* Create a new chat thread for a specific agent and user.
|
|
1051
|
+
* @summary Create a new chat thread
|
|
1052
|
+
* @param {string} aid Agent ID
|
|
1053
|
+
* @param {*} [options] Override http request option.
|
|
1054
|
+
* @throws {RequiredError}
|
|
1055
|
+
*/
|
|
1056
|
+
createChatThread: function (aid, options) {
|
|
1057
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1058
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1059
|
+
var _a, _b, _c;
|
|
1060
|
+
return __generator(this, function (_d) {
|
|
1061
|
+
switch (_d.label) {
|
|
1062
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createChatThread(aid, options)];
|
|
1063
|
+
case 1:
|
|
1064
|
+
localVarAxiosArgs = _d.sent();
|
|
1065
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1066
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.createChatThread']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1067
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
});
|
|
1071
|
+
},
|
|
1072
|
+
/**
|
|
1073
|
+
* Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
1074
|
+
* @summary Delete a chat thread
|
|
1075
|
+
* @param {string} aid Agent ID
|
|
1076
|
+
* @param {string} chatId Chat ID
|
|
1077
|
+
* @param {*} [options] Override http request option.
|
|
1078
|
+
* @throws {RequiredError}
|
|
1079
|
+
*/
|
|
1080
|
+
deleteChatThread: function (aid, chatId, options) {
|
|
1081
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1082
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1083
|
+
var _a, _b, _c;
|
|
1084
|
+
return __generator(this, function (_d) {
|
|
1085
|
+
switch (_d.label) {
|
|
1086
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteChatThread(aid, chatId, options)];
|
|
1087
|
+
case 1:
|
|
1088
|
+
localVarAxiosArgs = _d.sent();
|
|
1089
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1090
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.deleteChatThread']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1091
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
});
|
|
1095
|
+
},
|
|
1096
|
+
/**
|
|
1097
|
+
* Retrieve a specific chat thread by its ID for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
1098
|
+
* @summary Get chat thread by ID
|
|
1099
|
+
* @param {string} aid Agent ID
|
|
1100
|
+
* @param {string} chatId Chat ID
|
|
1101
|
+
* @param {*} [options] Override http request option.
|
|
1102
|
+
* @throws {RequiredError}
|
|
1103
|
+
*/
|
|
1104
|
+
getChatThreadById: function (aid, chatId, options) {
|
|
1105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1106
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1107
|
+
var _a, _b, _c;
|
|
1108
|
+
return __generator(this, function (_d) {
|
|
1109
|
+
switch (_d.label) {
|
|
1110
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getChatThreadById(aid, chatId, options)];
|
|
1111
|
+
case 1:
|
|
1112
|
+
localVarAxiosArgs = _d.sent();
|
|
1113
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1114
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.getChatThreadById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1115
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
});
|
|
1119
|
+
},
|
|
1120
|
+
/**
|
|
1121
|
+
* Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
|
|
1122
|
+
* @summary Get message by ID
|
|
1123
|
+
* @param {string} messageId Message ID
|
|
1124
|
+
* @param {*} [options] Override http request option.
|
|
1125
|
+
* @throws {RequiredError}
|
|
1126
|
+
*/
|
|
1127
|
+
getMessageById: function (messageId, options) {
|
|
1128
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1129
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1130
|
+
var _a, _b, _c;
|
|
1131
|
+
return __generator(this, function (_d) {
|
|
1132
|
+
switch (_d.label) {
|
|
1133
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getMessageById(messageId, options)];
|
|
1134
|
+
case 1:
|
|
1135
|
+
localVarAxiosArgs = _d.sent();
|
|
1136
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1137
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.getMessageById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1138
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1139
|
+
}
|
|
1140
|
+
});
|
|
1141
|
+
});
|
|
1142
|
+
},
|
|
1143
|
+
/**
|
|
1144
|
+
* Retrieve all chat threads associated with a specific agent for the current user.
|
|
1145
|
+
* @summary List chat threads for an agent
|
|
1146
|
+
* @param {string} aid Agent ID
|
|
1147
|
+
* @param {*} [options] Override http request option.
|
|
1148
|
+
* @throws {RequiredError}
|
|
1149
|
+
*/
|
|
1150
|
+
listChatsForAgent: function (aid, options) {
|
|
1151
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1152
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1153
|
+
var _a, _b, _c;
|
|
1154
|
+
return __generator(this, function (_d) {
|
|
1155
|
+
switch (_d.label) {
|
|
1156
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listChatsForAgent(aid, options)];
|
|
1157
|
+
case 1:
|
|
1158
|
+
localVarAxiosArgs = _d.sent();
|
|
1159
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1160
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.listChatsForAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1161
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1162
|
+
}
|
|
1163
|
+
});
|
|
1164
|
+
});
|
|
1165
|
+
},
|
|
1166
|
+
/**
|
|
1167
|
+
* Retrieve the message history for a specific chat thread with cursor-based pagination.
|
|
1168
|
+
* @summary List messages in a chat thread
|
|
1169
|
+
* @param {string} aid Agent ID
|
|
1170
|
+
* @param {string} chatId Chat ID
|
|
1171
|
+
* @param {string | null} [cursor] Cursor for pagination (message id)
|
|
1172
|
+
* @param {number} [limit] Maximum number of messages to return
|
|
1173
|
+
* @param {*} [options] Override http request option.
|
|
1174
|
+
* @throws {RequiredError}
|
|
1175
|
+
*/
|
|
1176
|
+
listMessagesInChat: function (aid, chatId, cursor, limit, options) {
|
|
1177
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1178
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1179
|
+
var _a, _b, _c;
|
|
1180
|
+
return __generator(this, function (_d) {
|
|
1181
|
+
switch (_d.label) {
|
|
1182
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listMessagesInChat(aid, chatId, cursor, limit, options)];
|
|
1183
|
+
case 1:
|
|
1184
|
+
localVarAxiosArgs = _d.sent();
|
|
1185
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1186
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.listMessagesInChat']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1187
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
});
|
|
1191
|
+
},
|
|
1192
|
+
/**
|
|
1193
|
+
* Retry sending the last message in a specific chat thread. If the last message is from an agent/system, returns all messages after the last user message. If the last message is from a user, generates a new agent response. Only works with non-streaming mode.
|
|
1194
|
+
* @summary Retry a message in a chat thread
|
|
1195
|
+
* @param {string} aid Agent ID
|
|
1196
|
+
* @param {string} chatId Chat ID
|
|
1197
|
+
* @param {*} [options] Override http request option.
|
|
1198
|
+
* @throws {RequiredError}
|
|
1199
|
+
*/
|
|
1200
|
+
retryMessageInChat: function (aid, chatId, options) {
|
|
1201
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1202
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1203
|
+
var _a, _b, _c;
|
|
1204
|
+
return __generator(this, function (_d) {
|
|
1205
|
+
switch (_d.label) {
|
|
1206
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.retryMessageInChat(aid, chatId, options)];
|
|
1207
|
+
case 1:
|
|
1208
|
+
localVarAxiosArgs = _d.sent();
|
|
1209
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1210
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.retryMessageInChat']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1211
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
/**
|
|
1217
|
+
* Send a new message to a specific chat thread. Supports streaming responses if requested.
|
|
1218
|
+
* @summary Send a message to a chat thread
|
|
1219
|
+
* @param {string} aid Agent ID
|
|
1220
|
+
* @param {string} chatId Chat ID
|
|
1221
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1222
|
+
* @param {*} [options] Override http request option.
|
|
1223
|
+
* @throws {RequiredError}
|
|
1224
|
+
*/
|
|
1225
|
+
sendMessageToChat: function (aid, chatId, chatMessageRequest, options) {
|
|
1226
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1227
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1228
|
+
var _a, _b, _c;
|
|
1229
|
+
return __generator(this, function (_d) {
|
|
1230
|
+
switch (_d.label) {
|
|
1231
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.sendMessageToChat(aid, chatId, chatMessageRequest, options)];
|
|
1232
|
+
case 1:
|
|
1233
|
+
localVarAxiosArgs = _d.sent();
|
|
1234
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1235
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.sendMessageToChat']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1236
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1237
|
+
}
|
|
1238
|
+
});
|
|
1239
|
+
});
|
|
1240
|
+
},
|
|
1241
|
+
/**
|
|
1242
|
+
* Update details of a specific chat thread. Currently only supports updating the summary.
|
|
1243
|
+
* @summary Update a chat thread
|
|
1244
|
+
* @param {string} aid Agent ID
|
|
1245
|
+
* @param {string} chatId Chat ID
|
|
1246
|
+
* @param {ChatUpdateRequest} chatUpdateRequest
|
|
1247
|
+
* @param {*} [options] Override http request option.
|
|
1248
|
+
* @throws {RequiredError}
|
|
1249
|
+
*/
|
|
1250
|
+
updateChatThread: function (aid, chatId, chatUpdateRequest, options) {
|
|
1251
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1252
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1253
|
+
var _a, _b, _c;
|
|
1254
|
+
return __generator(this, function (_d) {
|
|
1255
|
+
switch (_d.label) {
|
|
1256
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateChatThread(aid, chatId, chatUpdateRequest, options)];
|
|
1257
|
+
case 1:
|
|
1258
|
+
localVarAxiosArgs = _d.sent();
|
|
1259
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1260
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ChatApi.updateChatThread']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1261
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1262
|
+
}
|
|
1263
|
+
});
|
|
1264
|
+
});
|
|
1265
|
+
},
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
exports.ChatApiFp = ChatApiFp;
|
|
1269
|
+
/**
|
|
1270
|
+
* ChatApi - factory interface
|
|
1271
|
+
* @export
|
|
1272
|
+
*/
|
|
1273
|
+
var ChatApiFactory = function (configuration, basePath, axios) {
|
|
1274
|
+
var localVarFp = (0, exports.ChatApiFp)(configuration);
|
|
1275
|
+
return {
|
|
1276
|
+
/**
|
|
1277
|
+
* Create a new chat thread for a specific agent and user.
|
|
1278
|
+
* @summary Create a new chat thread
|
|
1279
|
+
* @param {string} aid Agent ID
|
|
1280
|
+
* @param {*} [options] Override http request option.
|
|
1281
|
+
* @throws {RequiredError}
|
|
1282
|
+
*/
|
|
1283
|
+
createChatThread: function (aid, options) {
|
|
1284
|
+
return localVarFp.createChatThread(aid, options).then(function (request) { return request(axios, basePath); });
|
|
1285
|
+
},
|
|
1286
|
+
/**
|
|
1287
|
+
* Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
1288
|
+
* @summary Delete a chat thread
|
|
1289
|
+
* @param {string} aid Agent ID
|
|
1290
|
+
* @param {string} chatId Chat ID
|
|
1291
|
+
* @param {*} [options] Override http request option.
|
|
1292
|
+
* @throws {RequiredError}
|
|
1293
|
+
*/
|
|
1294
|
+
deleteChatThread: function (aid, chatId, options) {
|
|
1295
|
+
return localVarFp.deleteChatThread(aid, chatId, options).then(function (request) { return request(axios, basePath); });
|
|
1296
|
+
},
|
|
1297
|
+
/**
|
|
1298
|
+
* Retrieve a specific chat thread by its ID for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
1299
|
+
* @summary Get chat thread by ID
|
|
1300
|
+
* @param {string} aid Agent ID
|
|
1301
|
+
* @param {string} chatId Chat ID
|
|
1302
|
+
* @param {*} [options] Override http request option.
|
|
1303
|
+
* @throws {RequiredError}
|
|
1304
|
+
*/
|
|
1305
|
+
getChatThreadById: function (aid, chatId, options) {
|
|
1306
|
+
return localVarFp.getChatThreadById(aid, chatId, options).then(function (request) { return request(axios, basePath); });
|
|
1307
|
+
},
|
|
1308
|
+
/**
|
|
1309
|
+
* Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
|
|
1310
|
+
* @summary Get message by ID
|
|
1311
|
+
* @param {string} messageId Message ID
|
|
1312
|
+
* @param {*} [options] Override http request option.
|
|
1313
|
+
* @throws {RequiredError}
|
|
1314
|
+
*/
|
|
1315
|
+
getMessageById: function (messageId, options) {
|
|
1316
|
+
return localVarFp.getMessageById(messageId, options).then(function (request) { return request(axios, basePath); });
|
|
1317
|
+
},
|
|
1318
|
+
/**
|
|
1319
|
+
* Retrieve all chat threads associated with a specific agent for the current user.
|
|
1320
|
+
* @summary List chat threads for an agent
|
|
1321
|
+
* @param {string} aid Agent ID
|
|
1322
|
+
* @param {*} [options] Override http request option.
|
|
1323
|
+
* @throws {RequiredError}
|
|
1324
|
+
*/
|
|
1325
|
+
listChatsForAgent: function (aid, options) {
|
|
1326
|
+
return localVarFp.listChatsForAgent(aid, options).then(function (request) { return request(axios, basePath); });
|
|
1327
|
+
},
|
|
1328
|
+
/**
|
|
1329
|
+
* Retrieve the message history for a specific chat thread with cursor-based pagination.
|
|
1330
|
+
* @summary List messages in a chat thread
|
|
1331
|
+
* @param {string} aid Agent ID
|
|
1332
|
+
* @param {string} chatId Chat ID
|
|
1333
|
+
* @param {string | null} [cursor] Cursor for pagination (message id)
|
|
1334
|
+
* @param {number} [limit] Maximum number of messages to return
|
|
1335
|
+
* @param {*} [options] Override http request option.
|
|
1336
|
+
* @throws {RequiredError}
|
|
1337
|
+
*/
|
|
1338
|
+
listMessagesInChat: function (aid, chatId, cursor, limit, options) {
|
|
1339
|
+
return localVarFp.listMessagesInChat(aid, chatId, cursor, limit, options).then(function (request) { return request(axios, basePath); });
|
|
1340
|
+
},
|
|
1341
|
+
/**
|
|
1342
|
+
* Retry sending the last message in a specific chat thread. If the last message is from an agent/system, returns all messages after the last user message. If the last message is from a user, generates a new agent response. Only works with non-streaming mode.
|
|
1343
|
+
* @summary Retry a message in a chat thread
|
|
1344
|
+
* @param {string} aid Agent ID
|
|
1345
|
+
* @param {string} chatId Chat ID
|
|
1346
|
+
* @param {*} [options] Override http request option.
|
|
1347
|
+
* @throws {RequiredError}
|
|
1348
|
+
*/
|
|
1349
|
+
retryMessageInChat: function (aid, chatId, options) {
|
|
1350
|
+
return localVarFp.retryMessageInChat(aid, chatId, options).then(function (request) { return request(axios, basePath); });
|
|
1351
|
+
},
|
|
1352
|
+
/**
|
|
1353
|
+
* Send a new message to a specific chat thread. Supports streaming responses if requested.
|
|
1354
|
+
* @summary Send a message to a chat thread
|
|
1355
|
+
* @param {string} aid Agent ID
|
|
1356
|
+
* @param {string} chatId Chat ID
|
|
1357
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1358
|
+
* @param {*} [options] Override http request option.
|
|
1359
|
+
* @throws {RequiredError}
|
|
1360
|
+
*/
|
|
1361
|
+
sendMessageToChat: function (aid, chatId, chatMessageRequest, options) {
|
|
1362
|
+
return localVarFp.sendMessageToChat(aid, chatId, chatMessageRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1363
|
+
},
|
|
1364
|
+
/**
|
|
1365
|
+
* Update details of a specific chat thread. Currently only supports updating the summary.
|
|
1366
|
+
* @summary Update a chat thread
|
|
1367
|
+
* @param {string} aid Agent ID
|
|
1368
|
+
* @param {string} chatId Chat ID
|
|
1369
|
+
* @param {ChatUpdateRequest} chatUpdateRequest
|
|
1370
|
+
* @param {*} [options] Override http request option.
|
|
1371
|
+
* @throws {RequiredError}
|
|
1372
|
+
*/
|
|
1373
|
+
updateChatThread: function (aid, chatId, chatUpdateRequest, options) {
|
|
1374
|
+
return localVarFp.updateChatThread(aid, chatId, chatUpdateRequest, options).then(function (request) { return request(axios, basePath); });
|
|
1375
|
+
},
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
exports.ChatApiFactory = ChatApiFactory;
|
|
1379
|
+
/**
|
|
1380
|
+
* ChatApi - object-oriented interface
|
|
1381
|
+
* @export
|
|
1382
|
+
* @class ChatApi
|
|
1383
|
+
* @extends {BaseAPI}
|
|
1384
|
+
*/
|
|
1385
|
+
var ChatApi = /** @class */ (function (_super) {
|
|
1386
|
+
__extends(ChatApi, _super);
|
|
1387
|
+
function ChatApi() {
|
|
1388
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Create a new chat thread for a specific agent and user.
|
|
1392
|
+
* @summary Create a new chat thread
|
|
1393
|
+
* @param {string} aid Agent ID
|
|
1394
|
+
* @param {*} [options] Override http request option.
|
|
1395
|
+
* @throws {RequiredError}
|
|
1396
|
+
* @memberof ChatApi
|
|
1397
|
+
*/
|
|
1398
|
+
ChatApi.prototype.createChatThread = function (aid, options) {
|
|
1399
|
+
var _this = this;
|
|
1400
|
+
return (0, exports.ChatApiFp)(this.configuration).createChatThread(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1401
|
+
};
|
|
1402
|
+
/**
|
|
1403
|
+
* Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
1404
|
+
* @summary Delete a chat thread
|
|
1405
|
+
* @param {string} aid Agent ID
|
|
1406
|
+
* @param {string} chatId Chat ID
|
|
1407
|
+
* @param {*} [options] Override http request option.
|
|
1408
|
+
* @throws {RequiredError}
|
|
1409
|
+
* @memberof ChatApi
|
|
1410
|
+
*/
|
|
1411
|
+
ChatApi.prototype.deleteChatThread = function (aid, chatId, options) {
|
|
1412
|
+
var _this = this;
|
|
1413
|
+
return (0, exports.ChatApiFp)(this.configuration).deleteChatThread(aid, chatId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1414
|
+
};
|
|
1415
|
+
/**
|
|
1416
|
+
* Retrieve a specific chat thread by its ID for the current user and agent. Returns 404 if not found or not owned by the user.
|
|
1417
|
+
* @summary Get chat thread by ID
|
|
1418
|
+
* @param {string} aid Agent ID
|
|
1419
|
+
* @param {string} chatId Chat ID
|
|
1420
|
+
* @param {*} [options] Override http request option.
|
|
1421
|
+
* @throws {RequiredError}
|
|
1422
|
+
* @memberof ChatApi
|
|
1423
|
+
*/
|
|
1424
|
+
ChatApi.prototype.getChatThreadById = function (aid, chatId, options) {
|
|
1425
|
+
var _this = this;
|
|
1426
|
+
return (0, exports.ChatApiFp)(this.configuration).getChatThreadById(aid, chatId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1427
|
+
};
|
|
1428
|
+
/**
|
|
1429
|
+
* Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
|
|
1430
|
+
* @summary Get message by ID
|
|
1431
|
+
* @param {string} messageId Message ID
|
|
1432
|
+
* @param {*} [options] Override http request option.
|
|
1433
|
+
* @throws {RequiredError}
|
|
1434
|
+
* @memberof ChatApi
|
|
1435
|
+
*/
|
|
1436
|
+
ChatApi.prototype.getMessageById = function (messageId, options) {
|
|
1437
|
+
var _this = this;
|
|
1438
|
+
return (0, exports.ChatApiFp)(this.configuration).getMessageById(messageId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1439
|
+
};
|
|
1440
|
+
/**
|
|
1441
|
+
* Retrieve all chat threads associated with a specific agent for the current user.
|
|
1442
|
+
* @summary List chat threads for an agent
|
|
1443
|
+
* @param {string} aid Agent ID
|
|
1444
|
+
* @param {*} [options] Override http request option.
|
|
1445
|
+
* @throws {RequiredError}
|
|
1446
|
+
* @memberof ChatApi
|
|
1447
|
+
*/
|
|
1448
|
+
ChatApi.prototype.listChatsForAgent = function (aid, options) {
|
|
1449
|
+
var _this = this;
|
|
1450
|
+
return (0, exports.ChatApiFp)(this.configuration).listChatsForAgent(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1451
|
+
};
|
|
1452
|
+
/**
|
|
1453
|
+
* Retrieve the message history for a specific chat thread with cursor-based pagination.
|
|
1454
|
+
* @summary List messages in a chat thread
|
|
1455
|
+
* @param {string} aid Agent ID
|
|
1456
|
+
* @param {string} chatId Chat ID
|
|
1457
|
+
* @param {string | null} [cursor] Cursor for pagination (message id)
|
|
1458
|
+
* @param {number} [limit] Maximum number of messages to return
|
|
1459
|
+
* @param {*} [options] Override http request option.
|
|
1460
|
+
* @throws {RequiredError}
|
|
1461
|
+
* @memberof ChatApi
|
|
1462
|
+
*/
|
|
1463
|
+
ChatApi.prototype.listMessagesInChat = function (aid, chatId, cursor, limit, options) {
|
|
1464
|
+
var _this = this;
|
|
1465
|
+
return (0, exports.ChatApiFp)(this.configuration).listMessagesInChat(aid, chatId, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1466
|
+
};
|
|
1467
|
+
/**
|
|
1468
|
+
* Retry sending the last message in a specific chat thread. If the last message is from an agent/system, returns all messages after the last user message. If the last message is from a user, generates a new agent response. Only works with non-streaming mode.
|
|
1469
|
+
* @summary Retry a message in a chat thread
|
|
1470
|
+
* @param {string} aid Agent ID
|
|
1471
|
+
* @param {string} chatId Chat ID
|
|
1472
|
+
* @param {*} [options] Override http request option.
|
|
1473
|
+
* @throws {RequiredError}
|
|
1474
|
+
* @memberof ChatApi
|
|
1475
|
+
*/
|
|
1476
|
+
ChatApi.prototype.retryMessageInChat = function (aid, chatId, options) {
|
|
1477
|
+
var _this = this;
|
|
1478
|
+
return (0, exports.ChatApiFp)(this.configuration).retryMessageInChat(aid, chatId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1479
|
+
};
|
|
1480
|
+
/**
|
|
1481
|
+
* Send a new message to a specific chat thread. Supports streaming responses if requested.
|
|
1482
|
+
* @summary Send a message to a chat thread
|
|
1483
|
+
* @param {string} aid Agent ID
|
|
1484
|
+
* @param {string} chatId Chat ID
|
|
1485
|
+
* @param {ChatMessageRequest} chatMessageRequest
|
|
1486
|
+
* @param {*} [options] Override http request option.
|
|
1487
|
+
* @throws {RequiredError}
|
|
1488
|
+
* @memberof ChatApi
|
|
1489
|
+
*/
|
|
1490
|
+
ChatApi.prototype.sendMessageToChat = function (aid, chatId, chatMessageRequest, options) {
|
|
1491
|
+
var _this = this;
|
|
1492
|
+
return (0, exports.ChatApiFp)(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1493
|
+
};
|
|
1494
|
+
/**
|
|
1495
|
+
* Update details of a specific chat thread. Currently only supports updating the summary.
|
|
1496
|
+
* @summary Update a chat thread
|
|
1497
|
+
* @param {string} aid Agent ID
|
|
1498
|
+
* @param {string} chatId Chat ID
|
|
1499
|
+
* @param {ChatUpdateRequest} chatUpdateRequest
|
|
1500
|
+
* @param {*} [options] Override http request option.
|
|
1501
|
+
* @throws {RequiredError}
|
|
1502
|
+
* @memberof ChatApi
|
|
1503
|
+
*/
|
|
1504
|
+
ChatApi.prototype.updateChatThread = function (aid, chatId, chatUpdateRequest, options) {
|
|
1505
|
+
var _this = this;
|
|
1506
|
+
return (0, exports.ChatApiFp)(this.configuration).updateChatThread(aid, chatId, chatUpdateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1507
|
+
};
|
|
1508
|
+
return ChatApi;
|
|
1509
|
+
}(base_1.BaseAPI));
|
|
1510
|
+
exports.ChatApi = ChatApi;
|
|
1511
|
+
/**
|
|
1512
|
+
* CreditApi - axios parameter creator
|
|
1513
|
+
* @export
|
|
1514
|
+
*/
|
|
1515
|
+
var CreditApiAxiosParamCreator = function (configuration) {
|
|
1516
|
+
var _this = this;
|
|
1517
|
+
return {
|
|
1518
|
+
/**
|
|
1519
|
+
* Fetch a credit event by its ID, with authorization check. Returns the credit event if it exists and belongs to the user, otherwise raises an HTTP error.
|
|
1520
|
+
* @summary Credit Event
|
|
1521
|
+
* @param {string} eventId Credit event ID
|
|
1522
|
+
* @param {*} [options] Override http request option.
|
|
1523
|
+
* @throws {RequiredError}
|
|
1524
|
+
*/
|
|
1525
|
+
fetchCreditEvent: function (eventId_1) {
|
|
1526
|
+
var args_1 = [];
|
|
1527
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
1528
|
+
args_1[_i - 1] = arguments[_i];
|
|
1529
|
+
}
|
|
1530
|
+
return __awaiter(_this, __spreadArray([eventId_1], args_1, true), void 0, function (eventId, options) {
|
|
1531
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1532
|
+
if (options === void 0) { options = {}; }
|
|
1533
|
+
return __generator(this, function (_a) {
|
|
1534
|
+
switch (_a.label) {
|
|
1535
|
+
case 0:
|
|
1536
|
+
// verify required parameter 'eventId' is not null or undefined
|
|
1537
|
+
(0, common_1.assertParamExists)('fetchCreditEvent', 'eventId', eventId);
|
|
1538
|
+
localVarPath = "/credit/events/{event_id}"
|
|
1539
|
+
.replace("{".concat("event_id", "}"), encodeURIComponent(String(eventId)));
|
|
1540
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1541
|
+
if (configuration) {
|
|
1542
|
+
baseOptions = configuration.baseOptions;
|
|
1543
|
+
}
|
|
1544
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1545
|
+
localVarHeaderParameter = {};
|
|
1546
|
+
localVarQueryParameter = {};
|
|
1547
|
+
// authentication HTTPBearer required
|
|
1548
|
+
// http bearer authentication required
|
|
1549
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1550
|
+
case 1:
|
|
1551
|
+
// authentication HTTPBearer required
|
|
1552
|
+
// http bearer authentication required
|
|
1553
|
+
_a.sent();
|
|
1554
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1555
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1556
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1557
|
+
return [2 /*return*/, {
|
|
1558
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1559
|
+
options: localVarRequestOptions,
|
|
1560
|
+
}];
|
|
1561
|
+
}
|
|
1562
|
+
});
|
|
1563
|
+
});
|
|
1564
|
+
},
|
|
1565
|
+
/**
|
|
1566
|
+
* Get or create a user\'s credit account. This endpoint will create a new account if it does not exist. Not in the readonly router because it may create a new account.
|
|
1567
|
+
* @summary Get User Account
|
|
1568
|
+
* @param {*} [options] Override http request option.
|
|
1569
|
+
* @throws {RequiredError}
|
|
1570
|
+
*/
|
|
1571
|
+
getUserAccount: function () {
|
|
1572
|
+
var args_1 = [];
|
|
1573
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1574
|
+
args_1[_i] = arguments[_i];
|
|
1575
|
+
}
|
|
1576
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
1577
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1578
|
+
if (options === void 0) { options = {}; }
|
|
1579
|
+
return __generator(this, function (_a) {
|
|
1580
|
+
switch (_a.label) {
|
|
1581
|
+
case 0:
|
|
1582
|
+
localVarPath = "/credit/user/account";
|
|
1583
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1584
|
+
if (configuration) {
|
|
1585
|
+
baseOptions = configuration.baseOptions;
|
|
1586
|
+
}
|
|
1587
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1588
|
+
localVarHeaderParameter = {};
|
|
1589
|
+
localVarQueryParameter = {};
|
|
1590
|
+
// authentication HTTPBearer required
|
|
1591
|
+
// http bearer authentication required
|
|
1592
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1593
|
+
case 1:
|
|
1594
|
+
// authentication HTTPBearer required
|
|
1595
|
+
// http bearer authentication required
|
|
1596
|
+
_a.sent();
|
|
1597
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1598
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1599
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1600
|
+
return [2 /*return*/, {
|
|
1601
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1602
|
+
options: localVarRequestOptions,
|
|
1603
|
+
}];
|
|
1604
|
+
}
|
|
1605
|
+
});
|
|
1606
|
+
});
|
|
1607
|
+
},
|
|
1608
|
+
/**
|
|
1609
|
+
* List all income events for an agent account, with authorization check. Returns a paginated list of income events for the specified agent, only if the agent belongs to the user.
|
|
1610
|
+
* @summary List Agent Income
|
|
1611
|
+
* @param {string} agentId
|
|
1612
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1613
|
+
* @param {number} [limit] Maximum number of events to return
|
|
1614
|
+
* @param {*} [options] Override http request option.
|
|
1615
|
+
* @throws {RequiredError}
|
|
1616
|
+
*/
|
|
1617
|
+
listAgentIncomeEvents: function (agentId_1, cursor_1, limit_1) {
|
|
1618
|
+
var args_1 = [];
|
|
1619
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
1620
|
+
args_1[_i - 3] = arguments[_i];
|
|
1621
|
+
}
|
|
1622
|
+
return __awaiter(_this, __spreadArray([agentId_1, cursor_1, limit_1], args_1, true), void 0, function (agentId, cursor, limit, options) {
|
|
1623
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1624
|
+
if (options === void 0) { options = {}; }
|
|
1625
|
+
return __generator(this, function (_a) {
|
|
1626
|
+
switch (_a.label) {
|
|
1627
|
+
case 0:
|
|
1628
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
1629
|
+
(0, common_1.assertParamExists)('listAgentIncomeEvents', 'agentId', agentId);
|
|
1630
|
+
localVarPath = "/credit/agents/{agent_id}/events"
|
|
1631
|
+
.replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
|
|
1632
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1633
|
+
if (configuration) {
|
|
1634
|
+
baseOptions = configuration.baseOptions;
|
|
1635
|
+
}
|
|
1636
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1637
|
+
localVarHeaderParameter = {};
|
|
1638
|
+
localVarQueryParameter = {};
|
|
1639
|
+
// authentication HTTPBearer required
|
|
1640
|
+
// http bearer authentication required
|
|
1641
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1642
|
+
case 1:
|
|
1643
|
+
// authentication HTTPBearer required
|
|
1644
|
+
// http bearer authentication required
|
|
1645
|
+
_a.sent();
|
|
1646
|
+
if (cursor !== undefined) {
|
|
1647
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
1648
|
+
}
|
|
1649
|
+
if (limit !== undefined) {
|
|
1650
|
+
localVarQueryParameter['limit'] = limit;
|
|
1651
|
+
}
|
|
1652
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1653
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1654
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1655
|
+
return [2 /*return*/, {
|
|
1656
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1657
|
+
options: localVarRequestOptions,
|
|
1658
|
+
}];
|
|
1659
|
+
}
|
|
1660
|
+
});
|
|
1661
|
+
});
|
|
1662
|
+
},
|
|
1663
|
+
/**
|
|
1664
|
+
* List all credit events for a user account, with optional filtering by event types and direction. Returns a paginated list of events for the user.
|
|
1665
|
+
* @summary List User Events
|
|
1666
|
+
* @param {Array<EventType> | null} [eventType] Event types
|
|
1667
|
+
* @param {Direction | null} [direction] Direction of events
|
|
1668
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1669
|
+
* @param {number} [limit] Maximum number of events to return
|
|
1670
|
+
* @param {*} [options] Override http request option.
|
|
1671
|
+
* @throws {RequiredError}
|
|
1672
|
+
*/
|
|
1673
|
+
listUserEvents: function (eventType_1, direction_1, cursor_1, limit_1) {
|
|
1674
|
+
var args_1 = [];
|
|
1675
|
+
for (var _i = 4; _i < arguments.length; _i++) {
|
|
1676
|
+
args_1[_i - 4] = arguments[_i];
|
|
1677
|
+
}
|
|
1678
|
+
return __awaiter(_this, __spreadArray([eventType_1, direction_1, cursor_1, limit_1], args_1, true), void 0, function (eventType, direction, cursor, limit, options) {
|
|
1679
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1680
|
+
if (options === void 0) { options = {}; }
|
|
1681
|
+
return __generator(this, function (_a) {
|
|
1682
|
+
switch (_a.label) {
|
|
1683
|
+
case 0:
|
|
1684
|
+
localVarPath = "/credit/user/events";
|
|
1685
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1686
|
+
if (configuration) {
|
|
1687
|
+
baseOptions = configuration.baseOptions;
|
|
1688
|
+
}
|
|
1689
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1690
|
+
localVarHeaderParameter = {};
|
|
1691
|
+
localVarQueryParameter = {};
|
|
1692
|
+
// authentication HTTPBearer required
|
|
1693
|
+
// http bearer authentication required
|
|
1694
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1695
|
+
case 1:
|
|
1696
|
+
// authentication HTTPBearer required
|
|
1697
|
+
// http bearer authentication required
|
|
1698
|
+
_a.sent();
|
|
1699
|
+
if (eventType) {
|
|
1700
|
+
localVarQueryParameter['event_type'] = eventType;
|
|
1701
|
+
}
|
|
1702
|
+
if (direction !== undefined) {
|
|
1703
|
+
localVarQueryParameter['direction'] = direction;
|
|
1704
|
+
}
|
|
1705
|
+
if (cursor !== undefined) {
|
|
1706
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
1707
|
+
}
|
|
1708
|
+
if (limit !== undefined) {
|
|
1709
|
+
localVarQueryParameter['limit'] = limit;
|
|
1710
|
+
}
|
|
1711
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1712
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1713
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1714
|
+
return [2 /*return*/, {
|
|
1715
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1716
|
+
options: localVarRequestOptions,
|
|
1717
|
+
}];
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
});
|
|
1721
|
+
},
|
|
1722
|
+
/**
|
|
1723
|
+
* List credit transactions for a user account, with optional filtering by transaction type and credit/debit. Returns a paginated list of transactions, each with optional associated event data.
|
|
1724
|
+
* @summary List User Transactions
|
|
1725
|
+
* @param {Array<TransactionType> | null} [txType] Transaction types
|
|
1726
|
+
* @param {CreditDebit | null} [creditDebit] Credit or debit
|
|
1727
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1728
|
+
* @param {number} [limit] Maximum number of transactions to return
|
|
1729
|
+
* @param {*} [options] Override http request option.
|
|
1730
|
+
* @throws {RequiredError}
|
|
1731
|
+
*/
|
|
1732
|
+
listUserTransactions: function (txType_1, creditDebit_1, cursor_1, limit_1) {
|
|
1733
|
+
var args_1 = [];
|
|
1734
|
+
for (var _i = 4; _i < arguments.length; _i++) {
|
|
1735
|
+
args_1[_i - 4] = arguments[_i];
|
|
1736
|
+
}
|
|
1737
|
+
return __awaiter(_this, __spreadArray([txType_1, creditDebit_1, cursor_1, limit_1], args_1, true), void 0, function (txType, creditDebit, cursor, limit, options) {
|
|
1738
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
1739
|
+
if (options === void 0) { options = {}; }
|
|
1740
|
+
return __generator(this, function (_a) {
|
|
1741
|
+
switch (_a.label) {
|
|
1742
|
+
case 0:
|
|
1743
|
+
localVarPath = "/credit/user/transactions";
|
|
1744
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1745
|
+
if (configuration) {
|
|
1746
|
+
baseOptions = configuration.baseOptions;
|
|
1747
|
+
}
|
|
1748
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
1749
|
+
localVarHeaderParameter = {};
|
|
1750
|
+
localVarQueryParameter = {};
|
|
1751
|
+
// authentication HTTPBearer required
|
|
1752
|
+
// http bearer authentication required
|
|
1753
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
1754
|
+
case 1:
|
|
1755
|
+
// authentication HTTPBearer required
|
|
1756
|
+
// http bearer authentication required
|
|
1757
|
+
_a.sent();
|
|
1758
|
+
if (txType) {
|
|
1759
|
+
localVarQueryParameter['tx_type'] = txType;
|
|
1760
|
+
}
|
|
1761
|
+
if (creditDebit !== undefined) {
|
|
1762
|
+
localVarQueryParameter['credit_debit'] = creditDebit;
|
|
1763
|
+
}
|
|
1764
|
+
if (cursor !== undefined) {
|
|
1765
|
+
localVarQueryParameter['cursor'] = cursor;
|
|
1766
|
+
}
|
|
1767
|
+
if (limit !== undefined) {
|
|
1768
|
+
localVarQueryParameter['limit'] = limit;
|
|
1769
|
+
}
|
|
1770
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1771
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1772
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1773
|
+
return [2 /*return*/, {
|
|
1774
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1775
|
+
options: localVarRequestOptions,
|
|
1776
|
+
}];
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
});
|
|
1780
|
+
},
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
exports.CreditApiAxiosParamCreator = CreditApiAxiosParamCreator;
|
|
1784
|
+
/**
|
|
1785
|
+
* CreditApi - functional programming interface
|
|
1786
|
+
* @export
|
|
1787
|
+
*/
|
|
1788
|
+
var CreditApiFp = function (configuration) {
|
|
1789
|
+
var localVarAxiosParamCreator = (0, exports.CreditApiAxiosParamCreator)(configuration);
|
|
1790
|
+
return {
|
|
1791
|
+
/**
|
|
1792
|
+
* Fetch a credit event by its ID, with authorization check. Returns the credit event if it exists and belongs to the user, otherwise raises an HTTP error.
|
|
1793
|
+
* @summary Credit Event
|
|
1794
|
+
* @param {string} eventId Credit event ID
|
|
1795
|
+
* @param {*} [options] Override http request option.
|
|
1796
|
+
* @throws {RequiredError}
|
|
1797
|
+
*/
|
|
1798
|
+
fetchCreditEvent: function (eventId, options) {
|
|
1799
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1800
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1801
|
+
var _a, _b, _c;
|
|
1802
|
+
return __generator(this, function (_d) {
|
|
1803
|
+
switch (_d.label) {
|
|
1804
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.fetchCreditEvent(eventId, options)];
|
|
1805
|
+
case 1:
|
|
1806
|
+
localVarAxiosArgs = _d.sent();
|
|
1807
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1808
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreditApi.fetchCreditEvent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1809
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1810
|
+
}
|
|
1811
|
+
});
|
|
1812
|
+
});
|
|
1813
|
+
},
|
|
1814
|
+
/**
|
|
1815
|
+
* Get or create a user\'s credit account. This endpoint will create a new account if it does not exist. Not in the readonly router because it may create a new account.
|
|
1816
|
+
* @summary Get User Account
|
|
1817
|
+
* @param {*} [options] Override http request option.
|
|
1818
|
+
* @throws {RequiredError}
|
|
1819
|
+
*/
|
|
1820
|
+
getUserAccount: function (options) {
|
|
1821
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1822
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1823
|
+
var _a, _b, _c;
|
|
1824
|
+
return __generator(this, function (_d) {
|
|
1825
|
+
switch (_d.label) {
|
|
1826
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccount(options)];
|
|
1827
|
+
case 1:
|
|
1828
|
+
localVarAxiosArgs = _d.sent();
|
|
1829
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1830
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreditApi.getUserAccount']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1831
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1832
|
+
}
|
|
1833
|
+
});
|
|
1834
|
+
});
|
|
1835
|
+
},
|
|
1836
|
+
/**
|
|
1837
|
+
* List all income events for an agent account, with authorization check. Returns a paginated list of income events for the specified agent, only if the agent belongs to the user.
|
|
1838
|
+
* @summary List Agent Income
|
|
1839
|
+
* @param {string} agentId
|
|
1840
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1841
|
+
* @param {number} [limit] Maximum number of events to return
|
|
1842
|
+
* @param {*} [options] Override http request option.
|
|
1843
|
+
* @throws {RequiredError}
|
|
1844
|
+
*/
|
|
1845
|
+
listAgentIncomeEvents: function (agentId, cursor, limit, options) {
|
|
1846
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1847
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1848
|
+
var _a, _b, _c;
|
|
1849
|
+
return __generator(this, function (_d) {
|
|
1850
|
+
switch (_d.label) {
|
|
1851
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listAgentIncomeEvents(agentId, cursor, limit, options)];
|
|
1852
|
+
case 1:
|
|
1853
|
+
localVarAxiosArgs = _d.sent();
|
|
1854
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1855
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreditApi.listAgentIncomeEvents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1856
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1857
|
+
}
|
|
1858
|
+
});
|
|
1859
|
+
});
|
|
1860
|
+
},
|
|
1861
|
+
/**
|
|
1862
|
+
* List all credit events for a user account, with optional filtering by event types and direction. Returns a paginated list of events for the user.
|
|
1863
|
+
* @summary List User Events
|
|
1864
|
+
* @param {Array<EventType> | null} [eventType] Event types
|
|
1865
|
+
* @param {Direction | null} [direction] Direction of events
|
|
1866
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1867
|
+
* @param {number} [limit] Maximum number of events to return
|
|
1868
|
+
* @param {*} [options] Override http request option.
|
|
1869
|
+
* @throws {RequiredError}
|
|
1870
|
+
*/
|
|
1871
|
+
listUserEvents: function (eventType, direction, cursor, limit, options) {
|
|
1872
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1873
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1874
|
+
var _a, _b, _c;
|
|
1875
|
+
return __generator(this, function (_d) {
|
|
1876
|
+
switch (_d.label) {
|
|
1877
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listUserEvents(eventType, direction, cursor, limit, options)];
|
|
1878
|
+
case 1:
|
|
1879
|
+
localVarAxiosArgs = _d.sent();
|
|
1880
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1881
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreditApi.listUserEvents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1882
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1883
|
+
}
|
|
1884
|
+
});
|
|
1885
|
+
});
|
|
1886
|
+
},
|
|
1887
|
+
/**
|
|
1888
|
+
* List credit transactions for a user account, with optional filtering by transaction type and credit/debit. Returns a paginated list of transactions, each with optional associated event data.
|
|
1889
|
+
* @summary List User Transactions
|
|
1890
|
+
* @param {Array<TransactionType> | null} [txType] Transaction types
|
|
1891
|
+
* @param {CreditDebit | null} [creditDebit] Credit or debit
|
|
1892
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1893
|
+
* @param {number} [limit] Maximum number of transactions to return
|
|
1894
|
+
* @param {*} [options] Override http request option.
|
|
1895
|
+
* @throws {RequiredError}
|
|
1896
|
+
*/
|
|
1897
|
+
listUserTransactions: function (txType, creditDebit, cursor, limit, options) {
|
|
1898
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1899
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1900
|
+
var _a, _b, _c;
|
|
1901
|
+
return __generator(this, function (_d) {
|
|
1902
|
+
switch (_d.label) {
|
|
1903
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listUserTransactions(txType, creditDebit, cursor, limit, options)];
|
|
1904
|
+
case 1:
|
|
1905
|
+
localVarAxiosArgs = _d.sent();
|
|
1906
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1907
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['CreditApi.listUserTransactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1908
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
});
|
|
1912
|
+
},
|
|
1913
|
+
};
|
|
1914
|
+
};
|
|
1915
|
+
exports.CreditApiFp = CreditApiFp;
|
|
1916
|
+
/**
|
|
1917
|
+
* CreditApi - factory interface
|
|
1918
|
+
* @export
|
|
1919
|
+
*/
|
|
1920
|
+
var CreditApiFactory = function (configuration, basePath, axios) {
|
|
1921
|
+
var localVarFp = (0, exports.CreditApiFp)(configuration);
|
|
1922
|
+
return {
|
|
1923
|
+
/**
|
|
1924
|
+
* Fetch a credit event by its ID, with authorization check. Returns the credit event if it exists and belongs to the user, otherwise raises an HTTP error.
|
|
1925
|
+
* @summary Credit Event
|
|
1926
|
+
* @param {string} eventId Credit event ID
|
|
1927
|
+
* @param {*} [options] Override http request option.
|
|
1928
|
+
* @throws {RequiredError}
|
|
1929
|
+
*/
|
|
1930
|
+
fetchCreditEvent: function (eventId, options) {
|
|
1931
|
+
return localVarFp.fetchCreditEvent(eventId, options).then(function (request) { return request(axios, basePath); });
|
|
1932
|
+
},
|
|
1933
|
+
/**
|
|
1934
|
+
* Get or create a user\'s credit account. This endpoint will create a new account if it does not exist. Not in the readonly router because it may create a new account.
|
|
1935
|
+
* @summary Get User Account
|
|
1936
|
+
* @param {*} [options] Override http request option.
|
|
1937
|
+
* @throws {RequiredError}
|
|
1938
|
+
*/
|
|
1939
|
+
getUserAccount: function (options) {
|
|
1940
|
+
return localVarFp.getUserAccount(options).then(function (request) { return request(axios, basePath); });
|
|
1941
|
+
},
|
|
1942
|
+
/**
|
|
1943
|
+
* List all income events for an agent account, with authorization check. Returns a paginated list of income events for the specified agent, only if the agent belongs to the user.
|
|
1944
|
+
* @summary List Agent Income
|
|
1945
|
+
* @param {string} agentId
|
|
1946
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1947
|
+
* @param {number} [limit] Maximum number of events to return
|
|
1948
|
+
* @param {*} [options] Override http request option.
|
|
1949
|
+
* @throws {RequiredError}
|
|
1950
|
+
*/
|
|
1951
|
+
listAgentIncomeEvents: function (agentId, cursor, limit, options) {
|
|
1952
|
+
return localVarFp.listAgentIncomeEvents(agentId, cursor, limit, options).then(function (request) { return request(axios, basePath); });
|
|
1953
|
+
},
|
|
1954
|
+
/**
|
|
1955
|
+
* List all credit events for a user account, with optional filtering by event types and direction. Returns a paginated list of events for the user.
|
|
1956
|
+
* @summary List User Events
|
|
1957
|
+
* @param {Array<EventType> | null} [eventType] Event types
|
|
1958
|
+
* @param {Direction | null} [direction] Direction of events
|
|
1959
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1960
|
+
* @param {number} [limit] Maximum number of events to return
|
|
1961
|
+
* @param {*} [options] Override http request option.
|
|
1962
|
+
* @throws {RequiredError}
|
|
1963
|
+
*/
|
|
1964
|
+
listUserEvents: function (eventType, direction, cursor, limit, options) {
|
|
1965
|
+
return localVarFp.listUserEvents(eventType, direction, cursor, limit, options).then(function (request) { return request(axios, basePath); });
|
|
1966
|
+
},
|
|
1967
|
+
/**
|
|
1968
|
+
* List credit transactions for a user account, with optional filtering by transaction type and credit/debit. Returns a paginated list of transactions, each with optional associated event data.
|
|
1969
|
+
* @summary List User Transactions
|
|
1970
|
+
* @param {Array<TransactionType> | null} [txType] Transaction types
|
|
1971
|
+
* @param {CreditDebit | null} [creditDebit] Credit or debit
|
|
1972
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
1973
|
+
* @param {number} [limit] Maximum number of transactions to return
|
|
1974
|
+
* @param {*} [options] Override http request option.
|
|
1975
|
+
* @throws {RequiredError}
|
|
1976
|
+
*/
|
|
1977
|
+
listUserTransactions: function (txType, creditDebit, cursor, limit, options) {
|
|
1978
|
+
return localVarFp.listUserTransactions(txType, creditDebit, cursor, limit, options).then(function (request) { return request(axios, basePath); });
|
|
1979
|
+
},
|
|
1980
|
+
};
|
|
1981
|
+
};
|
|
1982
|
+
exports.CreditApiFactory = CreditApiFactory;
|
|
1983
|
+
/**
|
|
1984
|
+
* CreditApi - object-oriented interface
|
|
1985
|
+
* @export
|
|
1986
|
+
* @class CreditApi
|
|
1987
|
+
* @extends {BaseAPI}
|
|
1988
|
+
*/
|
|
1989
|
+
var CreditApi = /** @class */ (function (_super) {
|
|
1990
|
+
__extends(CreditApi, _super);
|
|
1991
|
+
function CreditApi() {
|
|
1992
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* Fetch a credit event by its ID, with authorization check. Returns the credit event if it exists and belongs to the user, otherwise raises an HTTP error.
|
|
1996
|
+
* @summary Credit Event
|
|
1997
|
+
* @param {string} eventId Credit event ID
|
|
1998
|
+
* @param {*} [options] Override http request option.
|
|
1999
|
+
* @throws {RequiredError}
|
|
2000
|
+
* @memberof CreditApi
|
|
2001
|
+
*/
|
|
2002
|
+
CreditApi.prototype.fetchCreditEvent = function (eventId, options) {
|
|
2003
|
+
var _this = this;
|
|
2004
|
+
return (0, exports.CreditApiFp)(this.configuration).fetchCreditEvent(eventId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2005
|
+
};
|
|
2006
|
+
/**
|
|
2007
|
+
* Get or create a user\'s credit account. This endpoint will create a new account if it does not exist. Not in the readonly router because it may create a new account.
|
|
2008
|
+
* @summary Get User Account
|
|
2009
|
+
* @param {*} [options] Override http request option.
|
|
2010
|
+
* @throws {RequiredError}
|
|
2011
|
+
* @memberof CreditApi
|
|
2012
|
+
*/
|
|
2013
|
+
CreditApi.prototype.getUserAccount = function (options) {
|
|
2014
|
+
var _this = this;
|
|
2015
|
+
return (0, exports.CreditApiFp)(this.configuration).getUserAccount(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2016
|
+
};
|
|
2017
|
+
/**
|
|
2018
|
+
* List all income events for an agent account, with authorization check. Returns a paginated list of income events for the specified agent, only if the agent belongs to the user.
|
|
2019
|
+
* @summary List Agent Income
|
|
2020
|
+
* @param {string} agentId
|
|
2021
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
2022
|
+
* @param {number} [limit] Maximum number of events to return
|
|
2023
|
+
* @param {*} [options] Override http request option.
|
|
2024
|
+
* @throws {RequiredError}
|
|
2025
|
+
* @memberof CreditApi
|
|
2026
|
+
*/
|
|
2027
|
+
CreditApi.prototype.listAgentIncomeEvents = function (agentId, cursor, limit, options) {
|
|
2028
|
+
var _this = this;
|
|
2029
|
+
return (0, exports.CreditApiFp)(this.configuration).listAgentIncomeEvents(agentId, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2030
|
+
};
|
|
2031
|
+
/**
|
|
2032
|
+
* List all credit events for a user account, with optional filtering by event types and direction. Returns a paginated list of events for the user.
|
|
2033
|
+
* @summary List User Events
|
|
2034
|
+
* @param {Array<EventType> | null} [eventType] Event types
|
|
2035
|
+
* @param {Direction | null} [direction] Direction of events
|
|
2036
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
2037
|
+
* @param {number} [limit] Maximum number of events to return
|
|
2038
|
+
* @param {*} [options] Override http request option.
|
|
2039
|
+
* @throws {RequiredError}
|
|
2040
|
+
* @memberof CreditApi
|
|
2041
|
+
*/
|
|
2042
|
+
CreditApi.prototype.listUserEvents = function (eventType, direction, cursor, limit, options) {
|
|
2043
|
+
var _this = this;
|
|
2044
|
+
return (0, exports.CreditApiFp)(this.configuration).listUserEvents(eventType, direction, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2045
|
+
};
|
|
2046
|
+
/**
|
|
2047
|
+
* List credit transactions for a user account, with optional filtering by transaction type and credit/debit. Returns a paginated list of transactions, each with optional associated event data.
|
|
2048
|
+
* @summary List User Transactions
|
|
2049
|
+
* @param {Array<TransactionType> | null} [txType] Transaction types
|
|
2050
|
+
* @param {CreditDebit | null} [creditDebit] Credit or debit
|
|
2051
|
+
* @param {string | null} [cursor] Cursor for pagination
|
|
2052
|
+
* @param {number} [limit] Maximum number of transactions to return
|
|
2053
|
+
* @param {*} [options] Override http request option.
|
|
2054
|
+
* @throws {RequiredError}
|
|
2055
|
+
* @memberof CreditApi
|
|
2056
|
+
*/
|
|
2057
|
+
CreditApi.prototype.listUserTransactions = function (txType, creditDebit, cursor, limit, options) {
|
|
2058
|
+
var _this = this;
|
|
2059
|
+
return (0, exports.CreditApiFp)(this.configuration).listUserTransactions(txType, creditDebit, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2060
|
+
};
|
|
2061
|
+
return CreditApi;
|
|
2062
|
+
}(base_1.BaseAPI));
|
|
2063
|
+
exports.CreditApi = CreditApi;
|
|
2064
|
+
/**
|
|
2065
|
+
* HealthApi - axios parameter creator
|
|
2066
|
+
* @export
|
|
2067
|
+
*/
|
|
2068
|
+
var HealthApiAxiosParamCreator = function (configuration) {
|
|
2069
|
+
var _this = this;
|
|
2070
|
+
return {
|
|
2071
|
+
/**
|
|
2072
|
+
* Returns the health status of the API server
|
|
2073
|
+
* @summary Health check endpoint
|
|
2074
|
+
* @param {*} [options] Override http request option.
|
|
2075
|
+
* @throws {RequiredError}
|
|
2076
|
+
*/
|
|
2077
|
+
healthCheckHealthGet: function () {
|
|
2078
|
+
var args_1 = [];
|
|
2079
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2080
|
+
args_1[_i] = arguments[_i];
|
|
2081
|
+
}
|
|
2082
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
2083
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2084
|
+
if (options === void 0) { options = {}; }
|
|
2085
|
+
return __generator(this, function (_a) {
|
|
2086
|
+
localVarPath = "/health";
|
|
2087
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2088
|
+
if (configuration) {
|
|
2089
|
+
baseOptions = configuration.baseOptions;
|
|
2090
|
+
}
|
|
2091
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2092
|
+
localVarHeaderParameter = {};
|
|
2093
|
+
localVarQueryParameter = {};
|
|
2094
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2095
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2096
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2097
|
+
return [2 /*return*/, {
|
|
2098
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2099
|
+
options: localVarRequestOptions,
|
|
2100
|
+
}];
|
|
2101
|
+
});
|
|
2102
|
+
});
|
|
2103
|
+
},
|
|
2104
|
+
};
|
|
2105
|
+
};
|
|
2106
|
+
exports.HealthApiAxiosParamCreator = HealthApiAxiosParamCreator;
|
|
2107
|
+
/**
|
|
2108
|
+
* HealthApi - functional programming interface
|
|
2109
|
+
* @export
|
|
2110
|
+
*/
|
|
2111
|
+
var HealthApiFp = function (configuration) {
|
|
2112
|
+
var localVarAxiosParamCreator = (0, exports.HealthApiAxiosParamCreator)(configuration);
|
|
2113
|
+
return {
|
|
2114
|
+
/**
|
|
2115
|
+
* Returns the health status of the API server
|
|
2116
|
+
* @summary Health check endpoint
|
|
2117
|
+
* @param {*} [options] Override http request option.
|
|
2118
|
+
* @throws {RequiredError}
|
|
2119
|
+
*/
|
|
2120
|
+
healthCheckHealthGet: function (options) {
|
|
2121
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2122
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2123
|
+
var _a, _b, _c;
|
|
2124
|
+
return __generator(this, function (_d) {
|
|
2125
|
+
switch (_d.label) {
|
|
2126
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.healthCheckHealthGet(options)];
|
|
2127
|
+
case 1:
|
|
2128
|
+
localVarAxiosArgs = _d.sent();
|
|
2129
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2130
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['HealthApi.healthCheckHealthGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2131
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2132
|
+
}
|
|
2133
|
+
});
|
|
2134
|
+
});
|
|
2135
|
+
},
|
|
2136
|
+
};
|
|
2137
|
+
};
|
|
2138
|
+
exports.HealthApiFp = HealthApiFp;
|
|
2139
|
+
/**
|
|
2140
|
+
* HealthApi - factory interface
|
|
2141
|
+
* @export
|
|
2142
|
+
*/
|
|
2143
|
+
var HealthApiFactory = function (configuration, basePath, axios) {
|
|
2144
|
+
var localVarFp = (0, exports.HealthApiFp)(configuration);
|
|
2145
|
+
return {
|
|
2146
|
+
/**
|
|
2147
|
+
* Returns the health status of the API server
|
|
2148
|
+
* @summary Health check endpoint
|
|
2149
|
+
* @param {*} [options] Override http request option.
|
|
2150
|
+
* @throws {RequiredError}
|
|
2151
|
+
*/
|
|
2152
|
+
healthCheckHealthGet: function (options) {
|
|
2153
|
+
return localVarFp.healthCheckHealthGet(options).then(function (request) { return request(axios, basePath); });
|
|
2154
|
+
},
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
2157
|
+
exports.HealthApiFactory = HealthApiFactory;
|
|
2158
|
+
/**
|
|
2159
|
+
* HealthApi - object-oriented interface
|
|
2160
|
+
* @export
|
|
2161
|
+
* @class HealthApi
|
|
2162
|
+
* @extends {BaseAPI}
|
|
2163
|
+
*/
|
|
2164
|
+
var HealthApi = /** @class */ (function (_super) {
|
|
2165
|
+
__extends(HealthApi, _super);
|
|
2166
|
+
function HealthApi() {
|
|
2167
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2168
|
+
}
|
|
2169
|
+
/**
|
|
2170
|
+
* Returns the health status of the API server
|
|
2171
|
+
* @summary Health check endpoint
|
|
2172
|
+
* @param {*} [options] Override http request option.
|
|
2173
|
+
* @throws {RequiredError}
|
|
2174
|
+
* @memberof HealthApi
|
|
2175
|
+
*/
|
|
2176
|
+
HealthApi.prototype.healthCheckHealthGet = function (options) {
|
|
2177
|
+
var _this = this;
|
|
2178
|
+
return (0, exports.HealthApiFp)(this.configuration).healthCheckHealthGet(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2179
|
+
};
|
|
2180
|
+
return HealthApi;
|
|
2181
|
+
}(base_1.BaseAPI));
|
|
2182
|
+
exports.HealthApi = HealthApi;
|
|
2183
|
+
/**
|
|
2184
|
+
* MetadataApi - axios parameter creator
|
|
2185
|
+
* @export
|
|
2186
|
+
*/
|
|
2187
|
+
var MetadataApiAxiosParamCreator = function (configuration) {
|
|
2188
|
+
var _this = this;
|
|
2189
|
+
return {
|
|
2190
|
+
/**
|
|
2191
|
+
* Get the JSON schema for Agent model with all $ref references resolved
|
|
2192
|
+
* @summary Get agent schema
|
|
2193
|
+
* @param {*} [options] Override http request option.
|
|
2194
|
+
* @throws {RequiredError}
|
|
2195
|
+
*/
|
|
2196
|
+
getAgentSchema: function () {
|
|
2197
|
+
var args_1 = [];
|
|
2198
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2199
|
+
args_1[_i] = arguments[_i];
|
|
2200
|
+
}
|
|
2201
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
2202
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2203
|
+
if (options === void 0) { options = {}; }
|
|
2204
|
+
return __generator(this, function (_a) {
|
|
2205
|
+
localVarPath = "/metadata/agent/schema.json";
|
|
2206
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2207
|
+
if (configuration) {
|
|
2208
|
+
baseOptions = configuration.baseOptions;
|
|
2209
|
+
}
|
|
2210
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2211
|
+
localVarHeaderParameter = {};
|
|
2212
|
+
localVarQueryParameter = {};
|
|
2213
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2214
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2215
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2216
|
+
return [2 /*return*/, {
|
|
2217
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2218
|
+
options: localVarRequestOptions,
|
|
2219
|
+
}];
|
|
2220
|
+
});
|
|
2221
|
+
});
|
|
2222
|
+
},
|
|
2223
|
+
/**
|
|
2224
|
+
* Returns a list of all available LLM models in the system
|
|
2225
|
+
* @summary Get all LLM models
|
|
2226
|
+
* @param {*} [options] Override http request option.
|
|
2227
|
+
* @throws {RequiredError}
|
|
2228
|
+
*/
|
|
2229
|
+
getLlmsMetadataLlmsGet: function () {
|
|
2230
|
+
var args_1 = [];
|
|
2231
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2232
|
+
args_1[_i] = arguments[_i];
|
|
2233
|
+
}
|
|
2234
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
2235
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2236
|
+
if (options === void 0) { options = {}; }
|
|
2237
|
+
return __generator(this, function (_a) {
|
|
2238
|
+
localVarPath = "/metadata/llms";
|
|
2239
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2240
|
+
if (configuration) {
|
|
2241
|
+
baseOptions = configuration.baseOptions;
|
|
2242
|
+
}
|
|
2243
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2244
|
+
localVarHeaderParameter = {};
|
|
2245
|
+
localVarQueryParameter = {};
|
|
2246
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2247
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2248
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2249
|
+
return [2 /*return*/, {
|
|
2250
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2251
|
+
options: localVarRequestOptions,
|
|
2252
|
+
}];
|
|
2253
|
+
});
|
|
2254
|
+
});
|
|
2255
|
+
},
|
|
2256
|
+
/**
|
|
2257
|
+
* Get the icon for a specific skill
|
|
2258
|
+
* @summary Get skill icon
|
|
2259
|
+
* @param {string} skill Skill name
|
|
2260
|
+
* @param {string} iconName Icon name
|
|
2261
|
+
* @param {string} ext Icon file extension
|
|
2262
|
+
* @param {*} [options] Override http request option.
|
|
2263
|
+
* @throws {RequiredError}
|
|
2264
|
+
*/
|
|
2265
|
+
getSkillIcon: function (skill_1, iconName_1, ext_1) {
|
|
2266
|
+
var args_1 = [];
|
|
2267
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
2268
|
+
args_1[_i - 3] = arguments[_i];
|
|
2269
|
+
}
|
|
2270
|
+
return __awaiter(_this, __spreadArray([skill_1, iconName_1, ext_1], args_1, true), void 0, function (skill, iconName, ext, options) {
|
|
2271
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2272
|
+
if (options === void 0) { options = {}; }
|
|
2273
|
+
return __generator(this, function (_a) {
|
|
2274
|
+
// verify required parameter 'skill' is not null or undefined
|
|
2275
|
+
(0, common_1.assertParamExists)('getSkillIcon', 'skill', skill);
|
|
2276
|
+
// verify required parameter 'iconName' is not null or undefined
|
|
2277
|
+
(0, common_1.assertParamExists)('getSkillIcon', 'iconName', iconName);
|
|
2278
|
+
// verify required parameter 'ext' is not null or undefined
|
|
2279
|
+
(0, common_1.assertParamExists)('getSkillIcon', 'ext', ext);
|
|
2280
|
+
localVarPath = "/metadata/skills/{skill}/{icon_name}.{ext}"
|
|
2281
|
+
.replace("{".concat("skill", "}"), encodeURIComponent(String(skill)))
|
|
2282
|
+
.replace("{".concat("icon_name", "}"), encodeURIComponent(String(iconName)))
|
|
2283
|
+
.replace("{".concat("ext", "}"), encodeURIComponent(String(ext)));
|
|
2284
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2285
|
+
if (configuration) {
|
|
2286
|
+
baseOptions = configuration.baseOptions;
|
|
2287
|
+
}
|
|
2288
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2289
|
+
localVarHeaderParameter = {};
|
|
2290
|
+
localVarQueryParameter = {};
|
|
2291
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2292
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2293
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2294
|
+
return [2 /*return*/, {
|
|
2295
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2296
|
+
options: localVarRequestOptions,
|
|
2297
|
+
}];
|
|
2298
|
+
});
|
|
2299
|
+
});
|
|
2300
|
+
},
|
|
2301
|
+
/**
|
|
2302
|
+
* Get the JSON schema for a specific skill
|
|
2303
|
+
* @summary Get skill schema
|
|
2304
|
+
* @param {string} skill Skill name
|
|
2305
|
+
* @param {*} [options] Override http request option.
|
|
2306
|
+
* @throws {RequiredError}
|
|
2307
|
+
*/
|
|
2308
|
+
getSkillSchema: function (skill_1) {
|
|
2309
|
+
var args_1 = [];
|
|
2310
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2311
|
+
args_1[_i - 1] = arguments[_i];
|
|
2312
|
+
}
|
|
2313
|
+
return __awaiter(_this, __spreadArray([skill_1], args_1, true), void 0, function (skill, options) {
|
|
2314
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2315
|
+
if (options === void 0) { options = {}; }
|
|
2316
|
+
return __generator(this, function (_a) {
|
|
2317
|
+
// verify required parameter 'skill' is not null or undefined
|
|
2318
|
+
(0, common_1.assertParamExists)('getSkillSchema', 'skill', skill);
|
|
2319
|
+
localVarPath = "/metadata/skills/{skill}/schema.json"
|
|
2320
|
+
.replace("{".concat("skill", "}"), encodeURIComponent(String(skill)));
|
|
2321
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2322
|
+
if (configuration) {
|
|
2323
|
+
baseOptions = configuration.baseOptions;
|
|
2324
|
+
}
|
|
2325
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2326
|
+
localVarHeaderParameter = {};
|
|
2327
|
+
localVarQueryParameter = {};
|
|
2328
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2329
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2330
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2331
|
+
return [2 /*return*/, {
|
|
2332
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2333
|
+
options: localVarRequestOptions,
|
|
2334
|
+
}];
|
|
2335
|
+
});
|
|
2336
|
+
});
|
|
2337
|
+
},
|
|
2338
|
+
/**
|
|
2339
|
+
* Returns a list of all available skills in the system
|
|
2340
|
+
* @summary Get all skills
|
|
2341
|
+
* @param {*} [options] Override http request option.
|
|
2342
|
+
* @throws {RequiredError}
|
|
2343
|
+
*/
|
|
2344
|
+
getSkillsMetadataSkillsGet: function () {
|
|
2345
|
+
var args_1 = [];
|
|
2346
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2347
|
+
args_1[_i] = arguments[_i];
|
|
2348
|
+
}
|
|
2349
|
+
return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
|
|
2350
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2351
|
+
if (options === void 0) { options = {}; }
|
|
2352
|
+
return __generator(this, function (_a) {
|
|
2353
|
+
localVarPath = "/metadata/skills";
|
|
2354
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2355
|
+
if (configuration) {
|
|
2356
|
+
baseOptions = configuration.baseOptions;
|
|
2357
|
+
}
|
|
2358
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2359
|
+
localVarHeaderParameter = {};
|
|
2360
|
+
localVarQueryParameter = {};
|
|
2361
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2362
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2363
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2364
|
+
return [2 /*return*/, {
|
|
2365
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2366
|
+
options: localVarRequestOptions,
|
|
2367
|
+
}];
|
|
2368
|
+
});
|
|
2369
|
+
});
|
|
2370
|
+
},
|
|
2371
|
+
};
|
|
2372
|
+
};
|
|
2373
|
+
exports.MetadataApiAxiosParamCreator = MetadataApiAxiosParamCreator;
|
|
2374
|
+
/**
|
|
2375
|
+
* MetadataApi - functional programming interface
|
|
2376
|
+
* @export
|
|
2377
|
+
*/
|
|
2378
|
+
var MetadataApiFp = function (configuration) {
|
|
2379
|
+
var localVarAxiosParamCreator = (0, exports.MetadataApiAxiosParamCreator)(configuration);
|
|
2380
|
+
return {
|
|
2381
|
+
/**
|
|
2382
|
+
* Get the JSON schema for Agent model with all $ref references resolved
|
|
2383
|
+
* @summary Get agent schema
|
|
2384
|
+
* @param {*} [options] Override http request option.
|
|
2385
|
+
* @throws {RequiredError}
|
|
2386
|
+
*/
|
|
2387
|
+
getAgentSchema: function (options) {
|
|
2388
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2389
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2390
|
+
var _a, _b, _c;
|
|
2391
|
+
return __generator(this, function (_d) {
|
|
2392
|
+
switch (_d.label) {
|
|
2393
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentSchema(options)];
|
|
2394
|
+
case 1:
|
|
2395
|
+
localVarAxiosArgs = _d.sent();
|
|
2396
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2397
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetadataApi.getAgentSchema']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2398
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2399
|
+
}
|
|
2400
|
+
});
|
|
2401
|
+
});
|
|
2402
|
+
},
|
|
2403
|
+
/**
|
|
2404
|
+
* Returns a list of all available LLM models in the system
|
|
2405
|
+
* @summary Get all LLM models
|
|
2406
|
+
* @param {*} [options] Override http request option.
|
|
2407
|
+
* @throws {RequiredError}
|
|
2408
|
+
*/
|
|
2409
|
+
getLlmsMetadataLlmsGet: function (options) {
|
|
2410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2411
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2412
|
+
var _a, _b, _c;
|
|
2413
|
+
return __generator(this, function (_d) {
|
|
2414
|
+
switch (_d.label) {
|
|
2415
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLlmsMetadataLlmsGet(options)];
|
|
2416
|
+
case 1:
|
|
2417
|
+
localVarAxiosArgs = _d.sent();
|
|
2418
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2419
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetadataApi.getLlmsMetadataLlmsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2420
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
});
|
|
2424
|
+
},
|
|
2425
|
+
/**
|
|
2426
|
+
* Get the icon for a specific skill
|
|
2427
|
+
* @summary Get skill icon
|
|
2428
|
+
* @param {string} skill Skill name
|
|
2429
|
+
* @param {string} iconName Icon name
|
|
2430
|
+
* @param {string} ext Icon file extension
|
|
2431
|
+
* @param {*} [options] Override http request option.
|
|
2432
|
+
* @throws {RequiredError}
|
|
2433
|
+
*/
|
|
2434
|
+
getSkillIcon: function (skill, iconName, ext, options) {
|
|
2435
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2436
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2437
|
+
var _a, _b, _c;
|
|
2438
|
+
return __generator(this, function (_d) {
|
|
2439
|
+
switch (_d.label) {
|
|
2440
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSkillIcon(skill, iconName, ext, options)];
|
|
2441
|
+
case 1:
|
|
2442
|
+
localVarAxiosArgs = _d.sent();
|
|
2443
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2444
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetadataApi.getSkillIcon']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2445
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2446
|
+
}
|
|
2447
|
+
});
|
|
2448
|
+
});
|
|
2449
|
+
},
|
|
2450
|
+
/**
|
|
2451
|
+
* Get the JSON schema for a specific skill
|
|
2452
|
+
* @summary Get skill schema
|
|
2453
|
+
* @param {string} skill Skill name
|
|
2454
|
+
* @param {*} [options] Override http request option.
|
|
2455
|
+
* @throws {RequiredError}
|
|
2456
|
+
*/
|
|
2457
|
+
getSkillSchema: function (skill, options) {
|
|
2458
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2459
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2460
|
+
var _a, _b, _c;
|
|
2461
|
+
return __generator(this, function (_d) {
|
|
2462
|
+
switch (_d.label) {
|
|
2463
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSkillSchema(skill, options)];
|
|
2464
|
+
case 1:
|
|
2465
|
+
localVarAxiosArgs = _d.sent();
|
|
2466
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2467
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetadataApi.getSkillSchema']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2468
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2469
|
+
}
|
|
2470
|
+
});
|
|
2471
|
+
});
|
|
2472
|
+
},
|
|
2473
|
+
/**
|
|
2474
|
+
* Returns a list of all available skills in the system
|
|
2475
|
+
* @summary Get all skills
|
|
2476
|
+
* @param {*} [options] Override http request option.
|
|
2477
|
+
* @throws {RequiredError}
|
|
2478
|
+
*/
|
|
2479
|
+
getSkillsMetadataSkillsGet: function (options) {
|
|
2480
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2481
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2482
|
+
var _a, _b, _c;
|
|
2483
|
+
return __generator(this, function (_d) {
|
|
2484
|
+
switch (_d.label) {
|
|
2485
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getSkillsMetadataSkillsGet(options)];
|
|
2486
|
+
case 1:
|
|
2487
|
+
localVarAxiosArgs = _d.sent();
|
|
2488
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2489
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['MetadataApi.getSkillsMetadataSkillsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2490
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2491
|
+
}
|
|
2492
|
+
});
|
|
2493
|
+
});
|
|
2494
|
+
},
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
exports.MetadataApiFp = MetadataApiFp;
|
|
2498
|
+
/**
|
|
2499
|
+
* MetadataApi - factory interface
|
|
2500
|
+
* @export
|
|
2501
|
+
*/
|
|
2502
|
+
var MetadataApiFactory = function (configuration, basePath, axios) {
|
|
2503
|
+
var localVarFp = (0, exports.MetadataApiFp)(configuration);
|
|
2504
|
+
return {
|
|
2505
|
+
/**
|
|
2506
|
+
* Get the JSON schema for Agent model with all $ref references resolved
|
|
2507
|
+
* @summary Get agent schema
|
|
2508
|
+
* @param {*} [options] Override http request option.
|
|
2509
|
+
* @throws {RequiredError}
|
|
2510
|
+
*/
|
|
2511
|
+
getAgentSchema: function (options) {
|
|
2512
|
+
return localVarFp.getAgentSchema(options).then(function (request) { return request(axios, basePath); });
|
|
2513
|
+
},
|
|
2514
|
+
/**
|
|
2515
|
+
* Returns a list of all available LLM models in the system
|
|
2516
|
+
* @summary Get all LLM models
|
|
2517
|
+
* @param {*} [options] Override http request option.
|
|
2518
|
+
* @throws {RequiredError}
|
|
2519
|
+
*/
|
|
2520
|
+
getLlmsMetadataLlmsGet: function (options) {
|
|
2521
|
+
return localVarFp.getLlmsMetadataLlmsGet(options).then(function (request) { return request(axios, basePath); });
|
|
2522
|
+
},
|
|
2523
|
+
/**
|
|
2524
|
+
* Get the icon for a specific skill
|
|
2525
|
+
* @summary Get skill icon
|
|
2526
|
+
* @param {string} skill Skill name
|
|
2527
|
+
* @param {string} iconName Icon name
|
|
2528
|
+
* @param {string} ext Icon file extension
|
|
2529
|
+
* @param {*} [options] Override http request option.
|
|
2530
|
+
* @throws {RequiredError}
|
|
2531
|
+
*/
|
|
2532
|
+
getSkillIcon: function (skill, iconName, ext, options) {
|
|
2533
|
+
return localVarFp.getSkillIcon(skill, iconName, ext, options).then(function (request) { return request(axios, basePath); });
|
|
2534
|
+
},
|
|
2535
|
+
/**
|
|
2536
|
+
* Get the JSON schema for a specific skill
|
|
2537
|
+
* @summary Get skill schema
|
|
2538
|
+
* @param {string} skill Skill name
|
|
2539
|
+
* @param {*} [options] Override http request option.
|
|
2540
|
+
* @throws {RequiredError}
|
|
2541
|
+
*/
|
|
2542
|
+
getSkillSchema: function (skill, options) {
|
|
2543
|
+
return localVarFp.getSkillSchema(skill, options).then(function (request) { return request(axios, basePath); });
|
|
2544
|
+
},
|
|
2545
|
+
/**
|
|
2546
|
+
* Returns a list of all available skills in the system
|
|
2547
|
+
* @summary Get all skills
|
|
2548
|
+
* @param {*} [options] Override http request option.
|
|
2549
|
+
* @throws {RequiredError}
|
|
2550
|
+
*/
|
|
2551
|
+
getSkillsMetadataSkillsGet: function (options) {
|
|
2552
|
+
return localVarFp.getSkillsMetadataSkillsGet(options).then(function (request) { return request(axios, basePath); });
|
|
2553
|
+
},
|
|
2554
|
+
};
|
|
2555
|
+
};
|
|
2556
|
+
exports.MetadataApiFactory = MetadataApiFactory;
|
|
2557
|
+
/**
|
|
2558
|
+
* MetadataApi - object-oriented interface
|
|
2559
|
+
* @export
|
|
2560
|
+
* @class MetadataApi
|
|
2561
|
+
* @extends {BaseAPI}
|
|
2562
|
+
*/
|
|
2563
|
+
var MetadataApi = /** @class */ (function (_super) {
|
|
2564
|
+
__extends(MetadataApi, _super);
|
|
2565
|
+
function MetadataApi() {
|
|
2566
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2567
|
+
}
|
|
2568
|
+
/**
|
|
2569
|
+
* Get the JSON schema for Agent model with all $ref references resolved
|
|
2570
|
+
* @summary Get agent schema
|
|
2571
|
+
* @param {*} [options] Override http request option.
|
|
2572
|
+
* @throws {RequiredError}
|
|
2573
|
+
* @memberof MetadataApi
|
|
2574
|
+
*/
|
|
2575
|
+
MetadataApi.prototype.getAgentSchema = function (options) {
|
|
2576
|
+
var _this = this;
|
|
2577
|
+
return (0, exports.MetadataApiFp)(this.configuration).getAgentSchema(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2578
|
+
};
|
|
2579
|
+
/**
|
|
2580
|
+
* Returns a list of all available LLM models in the system
|
|
2581
|
+
* @summary Get all LLM models
|
|
2582
|
+
* @param {*} [options] Override http request option.
|
|
2583
|
+
* @throws {RequiredError}
|
|
2584
|
+
* @memberof MetadataApi
|
|
2585
|
+
*/
|
|
2586
|
+
MetadataApi.prototype.getLlmsMetadataLlmsGet = function (options) {
|
|
2587
|
+
var _this = this;
|
|
2588
|
+
return (0, exports.MetadataApiFp)(this.configuration).getLlmsMetadataLlmsGet(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2589
|
+
};
|
|
2590
|
+
/**
|
|
2591
|
+
* Get the icon for a specific skill
|
|
2592
|
+
* @summary Get skill icon
|
|
2593
|
+
* @param {string} skill Skill name
|
|
2594
|
+
* @param {string} iconName Icon name
|
|
2595
|
+
* @param {string} ext Icon file extension
|
|
2596
|
+
* @param {*} [options] Override http request option.
|
|
2597
|
+
* @throws {RequiredError}
|
|
2598
|
+
* @memberof MetadataApi
|
|
2599
|
+
*/
|
|
2600
|
+
MetadataApi.prototype.getSkillIcon = function (skill, iconName, ext, options) {
|
|
2601
|
+
var _this = this;
|
|
2602
|
+
return (0, exports.MetadataApiFp)(this.configuration).getSkillIcon(skill, iconName, ext, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2603
|
+
};
|
|
2604
|
+
/**
|
|
2605
|
+
* Get the JSON schema for a specific skill
|
|
2606
|
+
* @summary Get skill schema
|
|
2607
|
+
* @param {string} skill Skill name
|
|
2608
|
+
* @param {*} [options] Override http request option.
|
|
2609
|
+
* @throws {RequiredError}
|
|
2610
|
+
* @memberof MetadataApi
|
|
2611
|
+
*/
|
|
2612
|
+
MetadataApi.prototype.getSkillSchema = function (skill, options) {
|
|
2613
|
+
var _this = this;
|
|
2614
|
+
return (0, exports.MetadataApiFp)(this.configuration).getSkillSchema(skill, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2615
|
+
};
|
|
2616
|
+
/**
|
|
2617
|
+
* Returns a list of all available skills in the system
|
|
2618
|
+
* @summary Get all skills
|
|
2619
|
+
* @param {*} [options] Override http request option.
|
|
2620
|
+
* @throws {RequiredError}
|
|
2621
|
+
* @memberof MetadataApi
|
|
2622
|
+
*/
|
|
2623
|
+
MetadataApi.prototype.getSkillsMetadataSkillsGet = function (options) {
|
|
2624
|
+
var _this = this;
|
|
2625
|
+
return (0, exports.MetadataApiFp)(this.configuration).getSkillsMetadataSkillsGet(options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
2626
|
+
};
|
|
2627
|
+
return MetadataApi;
|
|
2628
|
+
}(base_1.BaseAPI));
|
|
2629
|
+
exports.MetadataApi = MetadataApi;
|