@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.
Files changed (61) hide show
  1. package/.openapi-generator/FILES +51 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +126 -0
  5. package/api.ts +4195 -0
  6. package/base.ts +86 -0
  7. package/common.ts +150 -0
  8. package/configuration.ts +115 -0
  9. package/dist/api.d.ts +3103 -0
  10. package/dist/api.js +2629 -0
  11. package/dist/base.d.ts +66 -0
  12. package/dist/base.js +86 -0
  13. package/dist/common.d.ts +65 -0
  14. package/dist/common.js +253 -0
  15. package/dist/configuration.d.ts +91 -0
  16. package/dist/configuration.js +57 -0
  17. package/dist/index.d.ts +13 -0
  18. package/dist/index.js +31 -0
  19. package/docs/AgentApi.md +167 -0
  20. package/docs/AgentAutonomous.md +33 -0
  21. package/docs/AgentExample.md +25 -0
  22. package/docs/AgentResponse.md +91 -0
  23. package/docs/AgentStatisticsResponse.md +49 -0
  24. package/docs/AgentUpdate.md +91 -0
  25. package/docs/AuthorType.md +23 -0
  26. package/docs/Chat.md +33 -0
  27. package/docs/ChatApi.md +516 -0
  28. package/docs/ChatMessage.md +63 -0
  29. package/docs/ChatMessageAttachment.md +23 -0
  30. package/docs/ChatMessageAttachmentType.md +13 -0
  31. package/docs/ChatMessageRequest.md +31 -0
  32. package/docs/ChatMessageSkillCall.md +35 -0
  33. package/docs/ChatMessagesResponse.md +25 -0
  34. package/docs/ChatUpdateRequest.md +21 -0
  35. package/docs/CreditAccount.md +45 -0
  36. package/docs/CreditApi.md +290 -0
  37. package/docs/CreditDebit.md +11 -0
  38. package/docs/CreditEvent.md +101 -0
  39. package/docs/CreditEventWithAgent.md +103 -0
  40. package/docs/CreditEventsResponse.md +25 -0
  41. package/docs/CreditTransactionResp.md +37 -0
  42. package/docs/CreditTransactionsResponse.md +25 -0
  43. package/docs/CreditType.md +13 -0
  44. package/docs/Direction.md +11 -0
  45. package/docs/EventType.md +31 -0
  46. package/docs/FeePercentage.md +19 -0
  47. package/docs/HTTPValidationError.md +20 -0
  48. package/docs/HealthApi.md +52 -0
  49. package/docs/LLMModelInfoWithProviderName.md +67 -0
  50. package/docs/LLMProvider.md +18 -0
  51. package/docs/MetadataApi.md +258 -0
  52. package/docs/OwnerType.md +13 -0
  53. package/docs/Skill.md +43 -0
  54. package/docs/TransactionType.md +39 -0
  55. package/docs/UpstreamType.md +15 -0
  56. package/docs/ValidationError.md +24 -0
  57. package/docs/ValidationErrorLocInner.md +18 -0
  58. package/git_push.sh +57 -0
  59. package/index.ts +18 -0
  60. package/package.json +31 -0
  61. package/tsconfig.json +21 -0
package/api.ts ADDED
@@ -0,0 +1,4195 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nation IntentKit API
5
+ * API for Nation IntentKit services
6
+ *
7
+ * The version of the OpenAPI document: 0.1.19
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ /**
27
+ * Autonomous agent configuration.
28
+ * @export
29
+ * @interface AgentAutonomous
30
+ */
31
+ export interface AgentAutonomous {
32
+ /**
33
+ * Unique identifier for the autonomous configuration
34
+ * @type {string}
35
+ * @memberof AgentAutonomous
36
+ */
37
+ 'id'?: string;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof AgentAutonomous
42
+ */
43
+ 'name'?: string | null;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof AgentAutonomous
48
+ */
49
+ 'description'?: string | null;
50
+ /**
51
+ *
52
+ * @type {number}
53
+ * @memberof AgentAutonomous
54
+ */
55
+ 'minutes'?: number | null;
56
+ /**
57
+ *
58
+ * @type {string}
59
+ * @memberof AgentAutonomous
60
+ */
61
+ 'cron'?: string | null;
62
+ /**
63
+ * Special prompt used during autonomous operation
64
+ * @type {string}
65
+ * @memberof AgentAutonomous
66
+ */
67
+ 'prompt': string;
68
+ /**
69
+ *
70
+ * @type {boolean}
71
+ * @memberof AgentAutonomous
72
+ */
73
+ 'enabled'?: boolean | null;
74
+ }
75
+ /**
76
+ * Agent example configuration.
77
+ * @export
78
+ * @interface AgentExample
79
+ */
80
+ export interface AgentExample {
81
+ /**
82
+ * Name of the example
83
+ * @type {string}
84
+ * @memberof AgentExample
85
+ */
86
+ 'name': string;
87
+ /**
88
+ * Description of the example
89
+ * @type {string}
90
+ * @memberof AgentExample
91
+ */
92
+ 'description': string;
93
+ /**
94
+ * Example prompt
95
+ * @type {string}
96
+ * @memberof AgentExample
97
+ */
98
+ 'prompt': string;
99
+ }
100
+ /**
101
+ * Response model for Agent API.
102
+ * @export
103
+ * @interface AgentResponse
104
+ */
105
+ export interface AgentResponse {
106
+ /**
107
+ * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
108
+ * @type {string}
109
+ * @memberof AgentResponse
110
+ */
111
+ 'id': string;
112
+ /**
113
+ *
114
+ * @type {number}
115
+ * @memberof AgentResponse
116
+ */
117
+ 'number': number | null;
118
+ /**
119
+ * Timestamp when the agent was created, will ignore when importing
120
+ * @type {string}
121
+ * @memberof AgentResponse
122
+ */
123
+ 'created_at': string;
124
+ /**
125
+ * Timestamp when the agent was last updated, will ignore when importing
126
+ * @type {string}
127
+ * @memberof AgentResponse
128
+ */
129
+ 'updated_at': string;
130
+ /**
131
+ *
132
+ * @type {string}
133
+ * @memberof AgentResponse
134
+ */
135
+ 'name'?: string | null;
136
+ /**
137
+ *
138
+ * @type {string}
139
+ * @memberof AgentResponse
140
+ */
141
+ 'slug'?: string | null;
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof AgentResponse
146
+ */
147
+ 'description'?: string | null;
148
+ /**
149
+ *
150
+ * @type {string}
151
+ * @memberof AgentResponse
152
+ */
153
+ 'external_website'?: string | null;
154
+ /**
155
+ *
156
+ * @type {string}
157
+ * @memberof AgentResponse
158
+ */
159
+ 'picture'?: string | null;
160
+ /**
161
+ *
162
+ * @type {string}
163
+ * @memberof AgentResponse
164
+ */
165
+ 'ticker'?: string | null;
166
+ /**
167
+ *
168
+ * @type {string}
169
+ * @memberof AgentResponse
170
+ */
171
+ 'token_address'?: string | null;
172
+ /**
173
+ *
174
+ * @type {string}
175
+ * @memberof AgentResponse
176
+ */
177
+ 'token_pool'?: string | null;
178
+ /**
179
+ *
180
+ * @type {string}
181
+ * @memberof AgentResponse
182
+ */
183
+ 'mode'?: AgentResponseModeEnum | null;
184
+ /**
185
+ *
186
+ * @type {string}
187
+ * @memberof AgentResponse
188
+ */
189
+ 'fee_percentage'?: string | null;
190
+ /**
191
+ *
192
+ * @type {string}
193
+ * @memberof AgentResponse
194
+ */
195
+ 'owner'?: string | null;
196
+ /**
197
+ *
198
+ * @type {string}
199
+ * @memberof AgentResponse
200
+ */
201
+ 'upstream_id'?: string | null;
202
+ /**
203
+ *
204
+ * @type {object}
205
+ * @memberof AgentResponse
206
+ */
207
+ 'upstream_extra'?: object | null;
208
+ /**
209
+ * AI model identifier to be used by this agent for processing requests. Available models: gpt-4o, gpt-4o-mini, deepseek-chat, deepseek-reasoner, grok-2, eternalai, reigent
210
+ * @type {string}
211
+ * @memberof AgentResponse
212
+ */
213
+ 'model': string;
214
+ /**
215
+ *
216
+ * @type {Array<object>}
217
+ * @memberof AgentResponse
218
+ */
219
+ 'autonomous'?: Array<object> | null;
220
+ /**
221
+ *
222
+ * @type {string}
223
+ * @memberof AgentResponse
224
+ */
225
+ 'example_intro'?: string | null;
226
+ /**
227
+ *
228
+ * @type {Array<AgentExample>}
229
+ * @memberof AgentResponse
230
+ */
231
+ 'examples'?: Array<AgentExample> | null;
232
+ /**
233
+ *
234
+ * @type {object}
235
+ * @memberof AgentResponse
236
+ */
237
+ 'skills'?: object | null;
238
+ /**
239
+ *
240
+ * @type {string}
241
+ * @memberof AgentResponse
242
+ */
243
+ 'wallet_provider'?: AgentResponseWalletProviderEnum | null;
244
+ /**
245
+ *
246
+ * @type {string}
247
+ * @memberof AgentResponse
248
+ */
249
+ 'network_id'?: string | null;
250
+ /**
251
+ *
252
+ * @type {string}
253
+ * @memberof AgentResponse
254
+ */
255
+ 'cdp_network_id'?: string | null;
256
+ /**
257
+ *
258
+ * @type {boolean}
259
+ * @memberof AgentResponse
260
+ */
261
+ 'telegram_entrypoint_enabled'?: boolean | null;
262
+ /**
263
+ *
264
+ * @type {string}
265
+ * @memberof AgentResponse
266
+ */
267
+ 'cdp_wallet_address': string | null;
268
+ /**
269
+ * Whether the agent has linked their Twitter account
270
+ * @type {boolean}
271
+ * @memberof AgentResponse
272
+ */
273
+ 'has_twitter_linked': boolean;
274
+ /**
275
+ *
276
+ * @type {string}
277
+ * @memberof AgentResponse
278
+ */
279
+ 'linked_twitter_username': string | null;
280
+ /**
281
+ *
282
+ * @type {string}
283
+ * @memberof AgentResponse
284
+ */
285
+ 'linked_twitter_name': string | null;
286
+ /**
287
+ * Whether the agent has self-keyed their Twitter account
288
+ * @type {boolean}
289
+ * @memberof AgentResponse
290
+ */
291
+ 'has_twitter_self_key': boolean;
292
+ /**
293
+ * Whether the agent has self-keyed their Telegram account
294
+ * @type {boolean}
295
+ * @memberof AgentResponse
296
+ */
297
+ 'has_telegram_self_key': boolean;
298
+ /**
299
+ *
300
+ * @type {string}
301
+ * @memberof AgentResponse
302
+ */
303
+ 'linked_telegram_username': string | null;
304
+ /**
305
+ *
306
+ * @type {string}
307
+ * @memberof AgentResponse
308
+ */
309
+ 'linked_telegram_name': string | null;
310
+ /**
311
+ * Whether the agent accepts image inputs in public mode
312
+ * @type {boolean}
313
+ * @memberof AgentResponse
314
+ */
315
+ 'accept_image_input': boolean;
316
+ /**
317
+ * Whether the agent accepts image inputs in private mode
318
+ * @type {boolean}
319
+ * @memberof AgentResponse
320
+ */
321
+ 'accept_image_input_private': boolean;
322
+ }
323
+
324
+ export const AgentResponseModeEnum = {
325
+ Public: 'public',
326
+ Private: 'private'
327
+ } as const;
328
+
329
+ export type AgentResponseModeEnum = typeof AgentResponseModeEnum[keyof typeof AgentResponseModeEnum];
330
+ export const AgentResponseWalletProviderEnum = {
331
+ Cdp: 'cdp'
332
+ } as const;
333
+
334
+ export type AgentResponseWalletProviderEnum = typeof AgentResponseWalletProviderEnum[keyof typeof AgentResponseWalletProviderEnum];
335
+
336
+ /**
337
+ * Response model for agent statistics.
338
+ * @export
339
+ * @interface AgentStatisticsResponse
340
+ */
341
+ export interface AgentStatisticsResponse {
342
+ /**
343
+ * ID of the agent
344
+ * @type {string}
345
+ * @memberof AgentStatisticsResponse
346
+ */
347
+ 'agent_id': string;
348
+ /**
349
+ * ID of the agent\'s credit account
350
+ * @type {string}
351
+ * @memberof AgentStatisticsResponse
352
+ */
353
+ 'account_id': string;
354
+ /**
355
+ * Total balance of the agent\'s account
356
+ * @type {string}
357
+ * @memberof AgentStatisticsResponse
358
+ */
359
+ 'balance': string;
360
+ /**
361
+ * Total income from all credit events
362
+ * @type {string}
363
+ * @memberof AgentStatisticsResponse
364
+ */
365
+ 'total_income': string;
366
+ /**
367
+ * Net income from all credit events
368
+ * @type {string}
369
+ * @memberof AgentStatisticsResponse
370
+ */
371
+ 'net_income': string;
372
+ /**
373
+ * Permanent income from all credit events
374
+ * @type {string}
375
+ * @memberof AgentStatisticsResponse
376
+ */
377
+ 'permanent_income': string;
378
+ /**
379
+ * Permanent profit from all credit events
380
+ * @type {string}
381
+ * @memberof AgentStatisticsResponse
382
+ */
383
+ 'permanent_profit': string;
384
+ /**
385
+ * Income from last 24 hours
386
+ * @type {string}
387
+ * @memberof AgentStatisticsResponse
388
+ */
389
+ 'last_24h_income': string;
390
+ /**
391
+ * Permanent income from last 24 hours
392
+ * @type {string}
393
+ * @memberof AgentStatisticsResponse
394
+ */
395
+ 'last_24h_permanent_income': string;
396
+ /**
397
+ * Average action cost
398
+ * @type {string}
399
+ * @memberof AgentStatisticsResponse
400
+ */
401
+ 'avg_action_cost': string;
402
+ /**
403
+ * Minimum action cost
404
+ * @type {string}
405
+ * @memberof AgentStatisticsResponse
406
+ */
407
+ 'min_action_cost': string;
408
+ /**
409
+ * Maximum action cost
410
+ * @type {string}
411
+ * @memberof AgentStatisticsResponse
412
+ */
413
+ 'max_action_cost': string;
414
+ /**
415
+ * Low action cost
416
+ * @type {string}
417
+ * @memberof AgentStatisticsResponse
418
+ */
419
+ 'low_action_cost': string;
420
+ /**
421
+ * Medium action cost
422
+ * @type {string}
423
+ * @memberof AgentStatisticsResponse
424
+ */
425
+ 'medium_action_cost': string;
426
+ /**
427
+ * High action cost
428
+ * @type {string}
429
+ * @memberof AgentStatisticsResponse
430
+ */
431
+ 'high_action_cost': string;
432
+ }
433
+ /**
434
+ * Agent update model.
435
+ * @export
436
+ * @interface AgentUpdate
437
+ */
438
+ export interface AgentUpdate {
439
+ /**
440
+ *
441
+ * @type {string}
442
+ * @memberof AgentUpdate
443
+ */
444
+ 'name': string | null;
445
+ /**
446
+ *
447
+ * @type {string}
448
+ * @memberof AgentUpdate
449
+ */
450
+ 'slug'?: string | null;
451
+ /**
452
+ *
453
+ * @type {string}
454
+ * @memberof AgentUpdate
455
+ */
456
+ 'description'?: string | null;
457
+ /**
458
+ *
459
+ * @type {string}
460
+ * @memberof AgentUpdate
461
+ */
462
+ 'external_website'?: string | null;
463
+ /**
464
+ *
465
+ * @type {string}
466
+ * @memberof AgentUpdate
467
+ */
468
+ 'picture'?: string | null;
469
+ /**
470
+ *
471
+ * @type {string}
472
+ * @memberof AgentUpdate
473
+ */
474
+ 'ticker'?: string | null;
475
+ /**
476
+ *
477
+ * @type {string}
478
+ * @memberof AgentUpdate
479
+ */
480
+ 'token_address'?: string | null;
481
+ /**
482
+ *
483
+ * @type {string}
484
+ * @memberof AgentUpdate
485
+ */
486
+ 'token_pool'?: string | null;
487
+ /**
488
+ *
489
+ * @type {string}
490
+ * @memberof AgentUpdate
491
+ */
492
+ 'mode'?: AgentUpdateModeEnum | null;
493
+ /**
494
+ *
495
+ * @type {FeePercentage}
496
+ * @memberof AgentUpdate
497
+ */
498
+ 'fee_percentage'?: FeePercentage | null;
499
+ /**
500
+ *
501
+ * @type {string}
502
+ * @memberof AgentUpdate
503
+ */
504
+ 'purpose': string | null;
505
+ /**
506
+ *
507
+ * @type {string}
508
+ * @memberof AgentUpdate
509
+ */
510
+ 'personality': string | null;
511
+ /**
512
+ *
513
+ * @type {string}
514
+ * @memberof AgentUpdate
515
+ */
516
+ 'principles': string | null;
517
+ /**
518
+ *
519
+ * @type {string}
520
+ * @memberof AgentUpdate
521
+ */
522
+ 'owner'?: string | null;
523
+ /**
524
+ *
525
+ * @type {string}
526
+ * @memberof AgentUpdate
527
+ */
528
+ 'upstream_id'?: string | null;
529
+ /**
530
+ *
531
+ * @type {object}
532
+ * @memberof AgentUpdate
533
+ */
534
+ 'upstream_extra'?: object | null;
535
+ /**
536
+ * AI model identifier to be used by this agent for processing requests. Available models: gpt-4o, gpt-4o-mini, deepseek-chat, deepseek-reasoner, grok-2, eternalai, reigent, venice-uncensored
537
+ * @type {string}
538
+ * @memberof AgentUpdate
539
+ */
540
+ 'model'?: string;
541
+ /**
542
+ *
543
+ * @type {string}
544
+ * @memberof AgentUpdate
545
+ */
546
+ 'prompt'?: string | null;
547
+ /**
548
+ *
549
+ * @type {string}
550
+ * @memberof AgentUpdate
551
+ */
552
+ 'prompt_append'?: string | null;
553
+ /**
554
+ *
555
+ * @type {number}
556
+ * @memberof AgentUpdate
557
+ */
558
+ 'temperature'?: number | null;
559
+ /**
560
+ *
561
+ * @type {number}
562
+ * @memberof AgentUpdate
563
+ */
564
+ 'frequency_penalty'?: number | null;
565
+ /**
566
+ *
567
+ * @type {number}
568
+ * @memberof AgentUpdate
569
+ */
570
+ 'presence_penalty'?: number | null;
571
+ /**
572
+ *
573
+ * @type {string}
574
+ * @memberof AgentUpdate
575
+ */
576
+ 'short_term_memory_strategy'?: AgentUpdateShortTermMemoryStrategyEnum | null;
577
+ /**
578
+ *
579
+ * @type {Array<AgentAutonomous>}
580
+ * @memberof AgentUpdate
581
+ */
582
+ 'autonomous'?: Array<AgentAutonomous> | null;
583
+ /**
584
+ *
585
+ * @type {string}
586
+ * @memberof AgentUpdate
587
+ */
588
+ 'example_intro'?: string | null;
589
+ /**
590
+ *
591
+ * @type {Array<AgentExample>}
592
+ * @memberof AgentUpdate
593
+ */
594
+ 'examples'?: Array<AgentExample> | null;
595
+ /**
596
+ *
597
+ * @type {object}
598
+ * @memberof AgentUpdate
599
+ */
600
+ 'skills'?: object | null;
601
+ /**
602
+ *
603
+ * @type {string}
604
+ * @memberof AgentUpdate
605
+ */
606
+ 'wallet_provider'?: AgentUpdateWalletProviderEnum | null;
607
+ /**
608
+ *
609
+ * @type {string}
610
+ * @memberof AgentUpdate
611
+ */
612
+ 'network_id'?: AgentUpdateNetworkIdEnum | null;
613
+ /**
614
+ *
615
+ * @type {string}
616
+ * @memberof AgentUpdate
617
+ */
618
+ 'cdp_network_id'?: AgentUpdateCdpNetworkIdEnum | null;
619
+ /**
620
+ *
621
+ * @type {boolean}
622
+ * @memberof AgentUpdate
623
+ */
624
+ 'twitter_entrypoint_enabled'?: boolean | null;
625
+ /**
626
+ *
627
+ * @type {string}
628
+ * @memberof AgentUpdate
629
+ */
630
+ 'twitter_entrypoint_prompt'?: string | null;
631
+ /**
632
+ *
633
+ * @type {object}
634
+ * @memberof AgentUpdate
635
+ */
636
+ 'twitter_config'?: object | null;
637
+ /**
638
+ *
639
+ * @type {boolean}
640
+ * @memberof AgentUpdate
641
+ */
642
+ 'telegram_entrypoint_enabled'?: boolean | null;
643
+ /**
644
+ *
645
+ * @type {string}
646
+ * @memberof AgentUpdate
647
+ */
648
+ 'telegram_entrypoint_prompt'?: string | null;
649
+ /**
650
+ *
651
+ * @type {object}
652
+ * @memberof AgentUpdate
653
+ */
654
+ 'telegram_config'?: object | null;
655
+ }
656
+
657
+ export const AgentUpdateModeEnum = {
658
+ Public: 'public',
659
+ Private: 'private'
660
+ } as const;
661
+
662
+ export type AgentUpdateModeEnum = typeof AgentUpdateModeEnum[keyof typeof AgentUpdateModeEnum];
663
+ export const AgentUpdateShortTermMemoryStrategyEnum = {
664
+ Trim: 'trim',
665
+ Summarize: 'summarize'
666
+ } as const;
667
+
668
+ export type AgentUpdateShortTermMemoryStrategyEnum = typeof AgentUpdateShortTermMemoryStrategyEnum[keyof typeof AgentUpdateShortTermMemoryStrategyEnum];
669
+ export const AgentUpdateWalletProviderEnum = {
670
+ Cdp: 'cdp'
671
+ } as const;
672
+
673
+ export type AgentUpdateWalletProviderEnum = typeof AgentUpdateWalletProviderEnum[keyof typeof AgentUpdateWalletProviderEnum];
674
+ export const AgentUpdateNetworkIdEnum = {
675
+ EthereumMainnet: 'ethereum-mainnet',
676
+ EthereumSepolia: 'ethereum-sepolia',
677
+ PolygonMainnet: 'polygon-mainnet',
678
+ PolygonMumbai: 'polygon-mumbai',
679
+ BaseMainnet: 'base-mainnet',
680
+ BaseSepolia: 'base-sepolia',
681
+ ArbitrumMainnet: 'arbitrum-mainnet',
682
+ ArbitrumSepolia: 'arbitrum-sepolia',
683
+ OptimismMainnet: 'optimism-mainnet',
684
+ OptimismSepolia: 'optimism-sepolia',
685
+ Solana: 'solana'
686
+ } as const;
687
+
688
+ export type AgentUpdateNetworkIdEnum = typeof AgentUpdateNetworkIdEnum[keyof typeof AgentUpdateNetworkIdEnum];
689
+ export const AgentUpdateCdpNetworkIdEnum = {
690
+ EthereumMainnet: 'ethereum-mainnet',
691
+ EthereumSepolia: 'ethereum-sepolia',
692
+ PolygonMainnet: 'polygon-mainnet',
693
+ PolygonMumbai: 'polygon-mumbai',
694
+ BaseMainnet: 'base-mainnet',
695
+ BaseSepolia: 'base-sepolia',
696
+ ArbitrumMainnet: 'arbitrum-mainnet',
697
+ ArbitrumSepolia: 'arbitrum-sepolia',
698
+ OptimismMainnet: 'optimism-mainnet',
699
+ OptimismSepolia: 'optimism-sepolia'
700
+ } as const;
701
+
702
+ export type AgentUpdateCdpNetworkIdEnum = typeof AgentUpdateCdpNetworkIdEnum[keyof typeof AgentUpdateCdpNetworkIdEnum];
703
+
704
+ /**
705
+ * Type of message author.
706
+ * @export
707
+ * @enum {string}
708
+ */
709
+
710
+ export const AuthorType = {
711
+ Agent: 'agent',
712
+ Trigger: 'trigger',
713
+ Skill: 'skill',
714
+ Telegram: 'telegram',
715
+ Twitter: 'twitter',
716
+ Web: 'web',
717
+ System: 'system',
718
+ Api: 'api'
719
+ } as const;
720
+
721
+ export type AuthorType = typeof AuthorType[keyof typeof AuthorType];
722
+
723
+
724
+ /**
725
+ * Chat model with all fields including server-generated ones.
726
+ * @export
727
+ * @interface Chat
728
+ */
729
+ export interface Chat {
730
+ /**
731
+ * Unique identifier for the chat
732
+ * @type {string}
733
+ * @memberof Chat
734
+ */
735
+ 'id'?: string;
736
+ /**
737
+ * ID of the agent this chat belongs to
738
+ * @type {string}
739
+ * @memberof Chat
740
+ */
741
+ 'agent_id': string;
742
+ /**
743
+ * User ID of the chat
744
+ * @type {string}
745
+ * @memberof Chat
746
+ */
747
+ 'user_id': string;
748
+ /**
749
+ * Summary of the chat
750
+ * @type {string}
751
+ * @memberof Chat
752
+ */
753
+ 'summary'?: string;
754
+ /**
755
+ * Number of rounds in the chat
756
+ * @type {number}
757
+ * @memberof Chat
758
+ */
759
+ 'rounds'?: number;
760
+ /**
761
+ * Timestamp when this chat was created
762
+ * @type {string}
763
+ * @memberof Chat
764
+ */
765
+ 'created_at': string;
766
+ /**
767
+ * Timestamp when this chat was updated
768
+ * @type {string}
769
+ * @memberof Chat
770
+ */
771
+ 'updated_at': string;
772
+ }
773
+ /**
774
+ * Chat message model with all fields including server-generated ones.
775
+ * @export
776
+ * @interface ChatMessage
777
+ */
778
+ export interface ChatMessage {
779
+ /**
780
+ * Unique identifier for the chat message
781
+ * @type {string}
782
+ * @memberof ChatMessage
783
+ */
784
+ 'id'?: string;
785
+ /**
786
+ * ID of the agent this message belongs to
787
+ * @type {string}
788
+ * @memberof ChatMessage
789
+ */
790
+ 'agent_id': string;
791
+ /**
792
+ * ID of the chat this message belongs to
793
+ * @type {string}
794
+ * @memberof ChatMessage
795
+ */
796
+ 'chat_id': string;
797
+ /**
798
+ *
799
+ * @type {string}
800
+ * @memberof ChatMessage
801
+ */
802
+ 'user_id': string | null;
803
+ /**
804
+ * ID of the message author
805
+ * @type {string}
806
+ * @memberof ChatMessage
807
+ */
808
+ 'author_id': string;
809
+ /**
810
+ * Type of the message author
811
+ * @type {AuthorType}
812
+ * @memberof ChatMessage
813
+ */
814
+ 'author_type': AuthorType;
815
+ /**
816
+ *
817
+ * @type {string}
818
+ * @memberof ChatMessage
819
+ */
820
+ 'model'?: string | null;
821
+ /**
822
+ *
823
+ * @type {AuthorType}
824
+ * @memberof ChatMessage
825
+ */
826
+ 'thread_type'?: AuthorType | null;
827
+ /**
828
+ *
829
+ * @type {string}
830
+ * @memberof ChatMessage
831
+ */
832
+ 'reply_to'?: string | null;
833
+ /**
834
+ * Content of the message
835
+ * @type {string}
836
+ * @memberof ChatMessage
837
+ */
838
+ 'message': string;
839
+ /**
840
+ *
841
+ * @type {Array<ChatMessageAttachment>}
842
+ * @memberof ChatMessage
843
+ */
844
+ 'attachments'?: Array<ChatMessageAttachment> | null;
845
+ /**
846
+ *
847
+ * @type {Array<ChatMessageSkillCall>}
848
+ * @memberof ChatMessage
849
+ */
850
+ 'skill_calls'?: Array<ChatMessageSkillCall> | null;
851
+ /**
852
+ * Number of tokens in the input message
853
+ * @type {number}
854
+ * @memberof ChatMessage
855
+ */
856
+ 'input_tokens'?: number;
857
+ /**
858
+ * Number of tokens in the output message
859
+ * @type {number}
860
+ * @memberof ChatMessage
861
+ */
862
+ 'output_tokens'?: number;
863
+ /**
864
+ * Time cost for the message in seconds
865
+ * @type {number}
866
+ * @memberof ChatMessage
867
+ */
868
+ 'time_cost'?: number;
869
+ /**
870
+ *
871
+ * @type {string}
872
+ * @memberof ChatMessage
873
+ */
874
+ 'credit_event_id'?: string | null;
875
+ /**
876
+ *
877
+ * @type {string}
878
+ * @memberof ChatMessage
879
+ */
880
+ 'credit_cost'?: string | null;
881
+ /**
882
+ * Cost for the cold start of the message in seconds
883
+ * @type {number}
884
+ * @memberof ChatMessage
885
+ */
886
+ 'cold_start_cost'?: number;
887
+ /**
888
+ *
889
+ * @type {string}
890
+ * @memberof ChatMessage
891
+ */
892
+ 'app_id'?: string | null;
893
+ /**
894
+ *
895
+ * @type {boolean}
896
+ * @memberof ChatMessage
897
+ */
898
+ 'search_mode'?: boolean | null;
899
+ /**
900
+ *
901
+ * @type {boolean}
902
+ * @memberof ChatMessage
903
+ */
904
+ 'super_mode'?: boolean | null;
905
+ /**
906
+ * Timestamp when this message was created
907
+ * @type {string}
908
+ * @memberof ChatMessage
909
+ */
910
+ 'created_at': string;
911
+ }
912
+
913
+
914
+ /**
915
+ * Chat message attachment model. An attachment can be a link, image, or file that is associated with a chat message.
916
+ * @export
917
+ * @interface ChatMessageAttachment
918
+ */
919
+ export interface ChatMessageAttachment {
920
+ /**
921
+ * Type of the attachment (link, image, or file)
922
+ * @type {ChatMessageAttachmentType}
923
+ * @memberof ChatMessageAttachment
924
+ */
925
+ 'type': ChatMessageAttachmentType;
926
+ /**
927
+ * URL of the attachment
928
+ * @type {string}
929
+ * @memberof ChatMessageAttachment
930
+ */
931
+ 'url': string;
932
+ }
933
+
934
+
935
+ /**
936
+ * Type of chat message attachment.
937
+ * @export
938
+ * @enum {string}
939
+ */
940
+
941
+ export const ChatMessageAttachmentType = {
942
+ Link: 'link',
943
+ Image: 'image',
944
+ File: 'file'
945
+ } as const;
946
+
947
+ export type ChatMessageAttachmentType = typeof ChatMessageAttachmentType[keyof typeof ChatMessageAttachmentType];
948
+
949
+
950
+ /**
951
+ * Request model for chat messages. This model represents the request body for creating a new chat message. It contains the necessary fields to identify the chat context and message content, along with optional attachments. The user ID is obtained from authentication and not included in the request body.
952
+ * @export
953
+ * @interface ChatMessageRequest
954
+ */
955
+ export interface ChatMessageRequest {
956
+ /**
957
+ *
958
+ * @type {string}
959
+ * @memberof ChatMessageRequest
960
+ */
961
+ 'app_id'?: string | null;
962
+ /**
963
+ * Content of the message
964
+ * @type {string}
965
+ * @memberof ChatMessageRequest
966
+ */
967
+ 'message': string;
968
+ /**
969
+ *
970
+ * @type {boolean}
971
+ * @memberof ChatMessageRequest
972
+ */
973
+ 'stream'?: boolean | null;
974
+ /**
975
+ *
976
+ * @type {boolean}
977
+ * @memberof ChatMessageRequest
978
+ */
979
+ 'search_mode'?: boolean | null;
980
+ /**
981
+ *
982
+ * @type {boolean}
983
+ * @memberof ChatMessageRequest
984
+ */
985
+ 'super_mode'?: boolean | null;
986
+ /**
987
+ *
988
+ * @type {Array<ChatMessageAttachment>}
989
+ * @memberof ChatMessageRequest
990
+ */
991
+ 'attachments'?: Array<ChatMessageAttachment> | null;
992
+ }
993
+ /**
994
+ * TypedDict for skill call details.
995
+ * @export
996
+ * @interface ChatMessageSkillCall
997
+ */
998
+ export interface ChatMessageSkillCall {
999
+ /**
1000
+ *
1001
+ * @type {string}
1002
+ * @memberof ChatMessageSkillCall
1003
+ */
1004
+ 'id'?: string;
1005
+ /**
1006
+ *
1007
+ * @type {string}
1008
+ * @memberof ChatMessageSkillCall
1009
+ */
1010
+ 'name': string;
1011
+ /**
1012
+ *
1013
+ * @type {object}
1014
+ * @memberof ChatMessageSkillCall
1015
+ */
1016
+ 'parameters': object;
1017
+ /**
1018
+ *
1019
+ * @type {boolean}
1020
+ * @memberof ChatMessageSkillCall
1021
+ */
1022
+ 'success': boolean;
1023
+ /**
1024
+ *
1025
+ * @type {string}
1026
+ * @memberof ChatMessageSkillCall
1027
+ */
1028
+ 'response'?: string;
1029
+ /**
1030
+ *
1031
+ * @type {string}
1032
+ * @memberof ChatMessageSkillCall
1033
+ */
1034
+ 'error_message'?: string;
1035
+ /**
1036
+ *
1037
+ * @type {string}
1038
+ * @memberof ChatMessageSkillCall
1039
+ */
1040
+ 'credit_event_id'?: string;
1041
+ /**
1042
+ *
1043
+ * @type {string}
1044
+ * @memberof ChatMessageSkillCall
1045
+ */
1046
+ 'credit_cost'?: string;
1047
+ }
1048
+ /**
1049
+ * Response model for chat messages with pagination.
1050
+ * @export
1051
+ * @interface ChatMessagesResponse
1052
+ */
1053
+ export interface ChatMessagesResponse {
1054
+ /**
1055
+ *
1056
+ * @type {Array<ChatMessage>}
1057
+ * @memberof ChatMessagesResponse
1058
+ */
1059
+ 'data': Array<ChatMessage>;
1060
+ /**
1061
+ *
1062
+ * @type {boolean}
1063
+ * @memberof ChatMessagesResponse
1064
+ */
1065
+ 'has_more'?: boolean;
1066
+ /**
1067
+ *
1068
+ * @type {string}
1069
+ * @memberof ChatMessagesResponse
1070
+ */
1071
+ 'next_cursor'?: string | null;
1072
+ }
1073
+ /**
1074
+ * Request model for updating a chat thread.
1075
+ * @export
1076
+ * @interface ChatUpdateRequest
1077
+ */
1078
+ export interface ChatUpdateRequest {
1079
+ /**
1080
+ * Updated summary for the chat thread
1081
+ * @type {string}
1082
+ * @memberof ChatUpdateRequest
1083
+ */
1084
+ 'summary': string;
1085
+ }
1086
+ /**
1087
+ * Credit account model with all fields.
1088
+ * @export
1089
+ * @interface CreditAccount
1090
+ */
1091
+ export interface CreditAccount {
1092
+ /**
1093
+ * Unique identifier for the credit account
1094
+ * @type {string}
1095
+ * @memberof CreditAccount
1096
+ */
1097
+ 'id'?: string;
1098
+ /**
1099
+ * Type of the account owner
1100
+ * @type {OwnerType}
1101
+ * @memberof CreditAccount
1102
+ */
1103
+ 'owner_type': OwnerType;
1104
+ /**
1105
+ * ID of the account owner
1106
+ * @type {string}
1107
+ * @memberof CreditAccount
1108
+ */
1109
+ 'owner_id': string;
1110
+ /**
1111
+ * Daily credit quota that resets each day
1112
+ * @type {string}
1113
+ * @memberof CreditAccount
1114
+ */
1115
+ 'free_quota'?: string;
1116
+ /**
1117
+ * Amount to refill hourly, not exceeding free_quota
1118
+ * @type {string}
1119
+ * @memberof CreditAccount
1120
+ */
1121
+ 'refill_amount'?: string;
1122
+ /**
1123
+ * Current available daily credits
1124
+ * @type {string}
1125
+ * @memberof CreditAccount
1126
+ */
1127
+ 'free_credits'?: string;
1128
+ /**
1129
+ * Reward credits earned through rewards
1130
+ * @type {string}
1131
+ * @memberof CreditAccount
1132
+ */
1133
+ 'reward_credits'?: string;
1134
+ /**
1135
+ * Credits added through top-ups
1136
+ * @type {string}
1137
+ * @memberof CreditAccount
1138
+ */
1139
+ 'credits'?: string;
1140
+ /**
1141
+ *
1142
+ * @type {string}
1143
+ * @memberof CreditAccount
1144
+ */
1145
+ 'income_at'?: string | null;
1146
+ /**
1147
+ *
1148
+ * @type {string}
1149
+ * @memberof CreditAccount
1150
+ */
1151
+ 'expense_at'?: string | null;
1152
+ /**
1153
+ *
1154
+ * @type {string}
1155
+ * @memberof CreditAccount
1156
+ */
1157
+ 'last_event_id'?: string | null;
1158
+ /**
1159
+ * Timestamp when this account was created
1160
+ * @type {string}
1161
+ * @memberof CreditAccount
1162
+ */
1163
+ 'created_at': string;
1164
+ /**
1165
+ * Timestamp when this account was last updated
1166
+ * @type {string}
1167
+ * @memberof CreditAccount
1168
+ */
1169
+ 'updated_at': string;
1170
+ }
1171
+
1172
+
1173
+ /**
1174
+ * Credit or debit transaction.
1175
+ * @export
1176
+ * @enum {string}
1177
+ */
1178
+
1179
+ export const CreditDebit = {
1180
+ Credit: 'credit',
1181
+ Debit: 'debit'
1182
+ } as const;
1183
+
1184
+ export type CreditDebit = typeof CreditDebit[keyof typeof CreditDebit];
1185
+
1186
+
1187
+ /**
1188
+ * Credit event model with all fields.
1189
+ * @export
1190
+ * @interface CreditEvent
1191
+ */
1192
+ export interface CreditEvent {
1193
+ /**
1194
+ * Unique identifier for the credit event
1195
+ * @type {string}
1196
+ * @memberof CreditEvent
1197
+ */
1198
+ 'id'?: string;
1199
+ /**
1200
+ * Account ID from which credits flow
1201
+ * @type {string}
1202
+ * @memberof CreditEvent
1203
+ */
1204
+ 'account_id'?: string;
1205
+ /**
1206
+ * Type of the event
1207
+ * @type {EventType}
1208
+ * @memberof CreditEvent
1209
+ */
1210
+ 'event_type': EventType;
1211
+ /**
1212
+ *
1213
+ * @type {string}
1214
+ * @memberof CreditEvent
1215
+ */
1216
+ 'user_id'?: string | null;
1217
+ /**
1218
+ * Type of upstream transaction
1219
+ * @type {UpstreamType}
1220
+ * @memberof CreditEvent
1221
+ */
1222
+ 'upstream_type': UpstreamType;
1223
+ /**
1224
+ * Upstream transaction ID if any
1225
+ * @type {string}
1226
+ * @memberof CreditEvent
1227
+ */
1228
+ 'upstream_tx_id': string;
1229
+ /**
1230
+ *
1231
+ * @type {string}
1232
+ * @memberof CreditEvent
1233
+ */
1234
+ 'agent_id'?: string | null;
1235
+ /**
1236
+ *
1237
+ * @type {string}
1238
+ * @memberof CreditEvent
1239
+ */
1240
+ 'start_message_id'?: string | null;
1241
+ /**
1242
+ *
1243
+ * @type {string}
1244
+ * @memberof CreditEvent
1245
+ */
1246
+ 'message_id'?: string | null;
1247
+ /**
1248
+ *
1249
+ * @type {string}
1250
+ * @memberof CreditEvent
1251
+ */
1252
+ 'model'?: string | null;
1253
+ /**
1254
+ *
1255
+ * @type {string}
1256
+ * @memberof CreditEvent
1257
+ */
1258
+ 'skill_call_id'?: string | null;
1259
+ /**
1260
+ *
1261
+ * @type {string}
1262
+ * @memberof CreditEvent
1263
+ */
1264
+ 'skill_name'?: string | null;
1265
+ /**
1266
+ * Direction of the credit flow
1267
+ * @type {Direction}
1268
+ * @memberof CreditEvent
1269
+ */
1270
+ 'direction': Direction;
1271
+ /**
1272
+ * Total amount (after discount) of credits involved
1273
+ * @type {string}
1274
+ * @memberof CreditEvent
1275
+ */
1276
+ 'total_amount'?: string;
1277
+ /**
1278
+ * Type of credits involved
1279
+ * @type {CreditType}
1280
+ * @memberof CreditEvent
1281
+ */
1282
+ 'credit_type': CreditType;
1283
+ /**
1284
+ *
1285
+ * @type {Array<CreditType>}
1286
+ * @memberof CreditEvent
1287
+ */
1288
+ 'credit_types'?: Array<CreditType> | null;
1289
+ /**
1290
+ *
1291
+ * @type {string}
1292
+ * @memberof CreditEvent
1293
+ */
1294
+ 'balance_after'?: string | null;
1295
+ /**
1296
+ * Base amount of credits involved
1297
+ * @type {string}
1298
+ * @memberof CreditEvent
1299
+ */
1300
+ 'base_amount'?: string;
1301
+ /**
1302
+ *
1303
+ * @type {string}
1304
+ * @memberof CreditEvent
1305
+ */
1306
+ 'base_discount_amount'?: string | null;
1307
+ /**
1308
+ *
1309
+ * @type {string}
1310
+ * @memberof CreditEvent
1311
+ */
1312
+ 'base_original_amount'?: string | null;
1313
+ /**
1314
+ *
1315
+ * @type {string}
1316
+ * @memberof CreditEvent
1317
+ */
1318
+ 'base_llm_amount'?: string | null;
1319
+ /**
1320
+ *
1321
+ * @type {string}
1322
+ * @memberof CreditEvent
1323
+ */
1324
+ 'base_skill_amount'?: string | null;
1325
+ /**
1326
+ *
1327
+ * @type {string}
1328
+ * @memberof CreditEvent
1329
+ */
1330
+ 'fee_platform_amount'?: string | null;
1331
+ /**
1332
+ *
1333
+ * @type {string}
1334
+ * @memberof CreditEvent
1335
+ */
1336
+ 'fee_platform_free_amount'?: string | null;
1337
+ /**
1338
+ *
1339
+ * @type {string}
1340
+ * @memberof CreditEvent
1341
+ */
1342
+ 'fee_platform_reward_amount'?: string | null;
1343
+ /**
1344
+ *
1345
+ * @type {string}
1346
+ * @memberof CreditEvent
1347
+ */
1348
+ 'fee_platform_permanent_amount'?: string | null;
1349
+ /**
1350
+ *
1351
+ * @type {string}
1352
+ * @memberof CreditEvent
1353
+ */
1354
+ 'fee_dev_account'?: string | null;
1355
+ /**
1356
+ *
1357
+ * @type {string}
1358
+ * @memberof CreditEvent
1359
+ */
1360
+ 'fee_dev_amount'?: string | null;
1361
+ /**
1362
+ *
1363
+ * @type {string}
1364
+ * @memberof CreditEvent
1365
+ */
1366
+ 'fee_dev_free_amount'?: string | null;
1367
+ /**
1368
+ *
1369
+ * @type {string}
1370
+ * @memberof CreditEvent
1371
+ */
1372
+ 'fee_dev_reward_amount'?: string | null;
1373
+ /**
1374
+ *
1375
+ * @type {string}
1376
+ * @memberof CreditEvent
1377
+ */
1378
+ 'fee_dev_permanent_amount'?: string | null;
1379
+ /**
1380
+ *
1381
+ * @type {string}
1382
+ * @memberof CreditEvent
1383
+ */
1384
+ 'fee_agent_account'?: string | null;
1385
+ /**
1386
+ *
1387
+ * @type {string}
1388
+ * @memberof CreditEvent
1389
+ */
1390
+ 'fee_agent_amount'?: string | null;
1391
+ /**
1392
+ *
1393
+ * @type {string}
1394
+ * @memberof CreditEvent
1395
+ */
1396
+ 'fee_agent_free_amount'?: string | null;
1397
+ /**
1398
+ *
1399
+ * @type {string}
1400
+ * @memberof CreditEvent
1401
+ */
1402
+ 'fee_agent_reward_amount'?: string | null;
1403
+ /**
1404
+ *
1405
+ * @type {string}
1406
+ * @memberof CreditEvent
1407
+ */
1408
+ 'fee_agent_permanent_amount'?: string | null;
1409
+ /**
1410
+ *
1411
+ * @type {string}
1412
+ * @memberof CreditEvent
1413
+ */
1414
+ 'free_amount'?: string | null;
1415
+ /**
1416
+ *
1417
+ * @type {string}
1418
+ * @memberof CreditEvent
1419
+ */
1420
+ 'reward_amount'?: string | null;
1421
+ /**
1422
+ *
1423
+ * @type {string}
1424
+ * @memberof CreditEvent
1425
+ */
1426
+ 'permanent_amount'?: string | null;
1427
+ /**
1428
+ *
1429
+ * @type {string}
1430
+ * @memberof CreditEvent
1431
+ */
1432
+ 'note'?: string | null;
1433
+ /**
1434
+ * Timestamp when this event was created
1435
+ * @type {string}
1436
+ * @memberof CreditEvent
1437
+ */
1438
+ 'created_at': string;
1439
+ }
1440
+
1441
+
1442
+ /**
1443
+ * Credit event response model with agent name. Extends CreditEvent to include the agent name for better user experience.
1444
+ * @export
1445
+ * @interface CreditEventWithAgent
1446
+ */
1447
+ export interface CreditEventWithAgent {
1448
+ /**
1449
+ * Unique identifier for the credit event
1450
+ * @type {string}
1451
+ * @memberof CreditEventWithAgent
1452
+ */
1453
+ 'id'?: string;
1454
+ /**
1455
+ * Account ID from which credits flow
1456
+ * @type {string}
1457
+ * @memberof CreditEventWithAgent
1458
+ */
1459
+ 'account_id'?: string;
1460
+ /**
1461
+ * Type of the event
1462
+ * @type {EventType}
1463
+ * @memberof CreditEventWithAgent
1464
+ */
1465
+ 'event_type': EventType;
1466
+ /**
1467
+ *
1468
+ * @type {string}
1469
+ * @memberof CreditEventWithAgent
1470
+ */
1471
+ 'user_id'?: string | null;
1472
+ /**
1473
+ * Type of upstream transaction
1474
+ * @type {UpstreamType}
1475
+ * @memberof CreditEventWithAgent
1476
+ */
1477
+ 'upstream_type': UpstreamType;
1478
+ /**
1479
+ * Upstream transaction ID if any
1480
+ * @type {string}
1481
+ * @memberof CreditEventWithAgent
1482
+ */
1483
+ 'upstream_tx_id': string;
1484
+ /**
1485
+ *
1486
+ * @type {string}
1487
+ * @memberof CreditEventWithAgent
1488
+ */
1489
+ 'agent_id'?: string | null;
1490
+ /**
1491
+ *
1492
+ * @type {string}
1493
+ * @memberof CreditEventWithAgent
1494
+ */
1495
+ 'start_message_id'?: string | null;
1496
+ /**
1497
+ *
1498
+ * @type {string}
1499
+ * @memberof CreditEventWithAgent
1500
+ */
1501
+ 'message_id'?: string | null;
1502
+ /**
1503
+ *
1504
+ * @type {string}
1505
+ * @memberof CreditEventWithAgent
1506
+ */
1507
+ 'model'?: string | null;
1508
+ /**
1509
+ *
1510
+ * @type {string}
1511
+ * @memberof CreditEventWithAgent
1512
+ */
1513
+ 'skill_call_id'?: string | null;
1514
+ /**
1515
+ *
1516
+ * @type {string}
1517
+ * @memberof CreditEventWithAgent
1518
+ */
1519
+ 'skill_name'?: string | null;
1520
+ /**
1521
+ * Direction of the credit flow
1522
+ * @type {Direction}
1523
+ * @memberof CreditEventWithAgent
1524
+ */
1525
+ 'direction': Direction;
1526
+ /**
1527
+ * Total amount (after discount) of credits involved
1528
+ * @type {string}
1529
+ * @memberof CreditEventWithAgent
1530
+ */
1531
+ 'total_amount'?: string;
1532
+ /**
1533
+ * Type of credits involved
1534
+ * @type {CreditType}
1535
+ * @memberof CreditEventWithAgent
1536
+ */
1537
+ 'credit_type': CreditType;
1538
+ /**
1539
+ *
1540
+ * @type {Array<CreditType>}
1541
+ * @memberof CreditEventWithAgent
1542
+ */
1543
+ 'credit_types'?: Array<CreditType> | null;
1544
+ /**
1545
+ *
1546
+ * @type {string}
1547
+ * @memberof CreditEventWithAgent
1548
+ */
1549
+ 'balance_after'?: string | null;
1550
+ /**
1551
+ * Base amount of credits involved
1552
+ * @type {string}
1553
+ * @memberof CreditEventWithAgent
1554
+ */
1555
+ 'base_amount'?: string;
1556
+ /**
1557
+ *
1558
+ * @type {string}
1559
+ * @memberof CreditEventWithAgent
1560
+ */
1561
+ 'base_discount_amount'?: string | null;
1562
+ /**
1563
+ *
1564
+ * @type {string}
1565
+ * @memberof CreditEventWithAgent
1566
+ */
1567
+ 'base_original_amount'?: string | null;
1568
+ /**
1569
+ *
1570
+ * @type {string}
1571
+ * @memberof CreditEventWithAgent
1572
+ */
1573
+ 'base_llm_amount'?: string | null;
1574
+ /**
1575
+ *
1576
+ * @type {string}
1577
+ * @memberof CreditEventWithAgent
1578
+ */
1579
+ 'base_skill_amount'?: string | null;
1580
+ /**
1581
+ *
1582
+ * @type {string}
1583
+ * @memberof CreditEventWithAgent
1584
+ */
1585
+ 'fee_platform_amount'?: string | null;
1586
+ /**
1587
+ *
1588
+ * @type {string}
1589
+ * @memberof CreditEventWithAgent
1590
+ */
1591
+ 'fee_platform_free_amount'?: string | null;
1592
+ /**
1593
+ *
1594
+ * @type {string}
1595
+ * @memberof CreditEventWithAgent
1596
+ */
1597
+ 'fee_platform_reward_amount'?: string | null;
1598
+ /**
1599
+ *
1600
+ * @type {string}
1601
+ * @memberof CreditEventWithAgent
1602
+ */
1603
+ 'fee_platform_permanent_amount'?: string | null;
1604
+ /**
1605
+ *
1606
+ * @type {string}
1607
+ * @memberof CreditEventWithAgent
1608
+ */
1609
+ 'fee_dev_account'?: string | null;
1610
+ /**
1611
+ *
1612
+ * @type {string}
1613
+ * @memberof CreditEventWithAgent
1614
+ */
1615
+ 'fee_dev_amount'?: string | null;
1616
+ /**
1617
+ *
1618
+ * @type {string}
1619
+ * @memberof CreditEventWithAgent
1620
+ */
1621
+ 'fee_dev_free_amount'?: string | null;
1622
+ /**
1623
+ *
1624
+ * @type {string}
1625
+ * @memberof CreditEventWithAgent
1626
+ */
1627
+ 'fee_dev_reward_amount'?: string | null;
1628
+ /**
1629
+ *
1630
+ * @type {string}
1631
+ * @memberof CreditEventWithAgent
1632
+ */
1633
+ 'fee_dev_permanent_amount'?: string | null;
1634
+ /**
1635
+ *
1636
+ * @type {string}
1637
+ * @memberof CreditEventWithAgent
1638
+ */
1639
+ 'fee_agent_account'?: string | null;
1640
+ /**
1641
+ *
1642
+ * @type {string}
1643
+ * @memberof CreditEventWithAgent
1644
+ */
1645
+ 'fee_agent_amount'?: string | null;
1646
+ /**
1647
+ *
1648
+ * @type {string}
1649
+ * @memberof CreditEventWithAgent
1650
+ */
1651
+ 'fee_agent_free_amount'?: string | null;
1652
+ /**
1653
+ *
1654
+ * @type {string}
1655
+ * @memberof CreditEventWithAgent
1656
+ */
1657
+ 'fee_agent_reward_amount'?: string | null;
1658
+ /**
1659
+ *
1660
+ * @type {string}
1661
+ * @memberof CreditEventWithAgent
1662
+ */
1663
+ 'fee_agent_permanent_amount'?: string | null;
1664
+ /**
1665
+ *
1666
+ * @type {string}
1667
+ * @memberof CreditEventWithAgent
1668
+ */
1669
+ 'free_amount'?: string | null;
1670
+ /**
1671
+ *
1672
+ * @type {string}
1673
+ * @memberof CreditEventWithAgent
1674
+ */
1675
+ 'reward_amount'?: string | null;
1676
+ /**
1677
+ *
1678
+ * @type {string}
1679
+ * @memberof CreditEventWithAgent
1680
+ */
1681
+ 'permanent_amount'?: string | null;
1682
+ /**
1683
+ *
1684
+ * @type {string}
1685
+ * @memberof CreditEventWithAgent
1686
+ */
1687
+ 'note'?: string | null;
1688
+ /**
1689
+ * Timestamp when this event was created
1690
+ * @type {string}
1691
+ * @memberof CreditEventWithAgent
1692
+ */
1693
+ 'created_at': string;
1694
+ /**
1695
+ *
1696
+ * @type {string}
1697
+ * @memberof CreditEventWithAgent
1698
+ */
1699
+ 'agent_name'?: string | null;
1700
+ }
1701
+
1702
+
1703
+ /**
1704
+ * Paginated response model for credit events. Contains a list of credit events, a flag indicating if more items are available, and a cursor for pagination.
1705
+ * @export
1706
+ * @interface CreditEventsResponse
1707
+ */
1708
+ export interface CreditEventsResponse {
1709
+ /**
1710
+ * List of credit events with agent names
1711
+ * @type {Array<CreditEventWithAgent>}
1712
+ * @memberof CreditEventsResponse
1713
+ */
1714
+ 'data': Array<CreditEventWithAgent>;
1715
+ /**
1716
+ * Indicates if there are more items
1717
+ * @type {boolean}
1718
+ * @memberof CreditEventsResponse
1719
+ */
1720
+ 'has_more': boolean;
1721
+ /**
1722
+ *
1723
+ * @type {string}
1724
+ * @memberof CreditEventsResponse
1725
+ */
1726
+ 'next_cursor'?: string | null;
1727
+ }
1728
+ /**
1729
+ * Credit transaction response model with associated event data. Extends CreditTransaction to include the related CreditEvent if available.
1730
+ * @export
1731
+ * @interface CreditTransactionResp
1732
+ */
1733
+ export interface CreditTransactionResp {
1734
+ /**
1735
+ * Unique identifier for the credit transaction
1736
+ * @type {string}
1737
+ * @memberof CreditTransactionResp
1738
+ */
1739
+ 'id'?: string;
1740
+ /**
1741
+ * ID of the account this transaction belongs to
1742
+ * @type {string}
1743
+ * @memberof CreditTransactionResp
1744
+ */
1745
+ 'account_id': string;
1746
+ /**
1747
+ * ID of the event that triggered this transaction
1748
+ * @type {string}
1749
+ * @memberof CreditTransactionResp
1750
+ */
1751
+ 'event_id': string;
1752
+ /**
1753
+ * Type of the transaction
1754
+ * @type {TransactionType}
1755
+ * @memberof CreditTransactionResp
1756
+ */
1757
+ 'tx_type': TransactionType;
1758
+ /**
1759
+ * Whether this is a credit or debit transaction
1760
+ * @type {CreditDebit}
1761
+ * @memberof CreditTransactionResp
1762
+ */
1763
+ 'credit_debit': CreditDebit;
1764
+ /**
1765
+ * Amount of credits changed
1766
+ * @type {string}
1767
+ * @memberof CreditTransactionResp
1768
+ */
1769
+ 'change_amount'?: string;
1770
+ /**
1771
+ * Type of credits involved
1772
+ * @type {CreditType}
1773
+ * @memberof CreditTransactionResp
1774
+ */
1775
+ 'credit_type': CreditType;
1776
+ /**
1777
+ * Timestamp when this transaction was created
1778
+ * @type {string}
1779
+ * @memberof CreditTransactionResp
1780
+ */
1781
+ 'created_at': string;
1782
+ /**
1783
+ *
1784
+ * @type {CreditEvent}
1785
+ * @memberof CreditTransactionResp
1786
+ */
1787
+ 'event'?: CreditEvent | null;
1788
+ }
1789
+
1790
+
1791
+ /**
1792
+ * Paginated response model for credit transactions. Contains a list of credit transactions (with event data), a flag for more items, and a pagination cursor.
1793
+ * @export
1794
+ * @interface CreditTransactionsResponse
1795
+ */
1796
+ export interface CreditTransactionsResponse {
1797
+ /**
1798
+ * List of credit transactions
1799
+ * @type {Array<CreditTransactionResp>}
1800
+ * @memberof CreditTransactionsResponse
1801
+ */
1802
+ 'data': Array<CreditTransactionResp>;
1803
+ /**
1804
+ * Indicates if there are more items
1805
+ * @type {boolean}
1806
+ * @memberof CreditTransactionsResponse
1807
+ */
1808
+ 'has_more': boolean;
1809
+ /**
1810
+ *
1811
+ * @type {string}
1812
+ * @memberof CreditTransactionsResponse
1813
+ */
1814
+ 'next_cursor'?: string | null;
1815
+ }
1816
+ /**
1817
+ * Credit type is used in db column names, do not change it.
1818
+ * @export
1819
+ * @enum {string}
1820
+ */
1821
+
1822
+ export const CreditType = {
1823
+ FreeCredits: 'free_credits',
1824
+ RewardCredits: 'reward_credits',
1825
+ Credits: 'credits'
1826
+ } as const;
1827
+
1828
+ export type CreditType = typeof CreditType[keyof typeof CreditType];
1829
+
1830
+
1831
+ /**
1832
+ * Direction of credit flow.
1833
+ * @export
1834
+ * @enum {string}
1835
+ */
1836
+
1837
+ export const Direction = {
1838
+ Income: 'income',
1839
+ Expense: 'expense'
1840
+ } as const;
1841
+
1842
+ export type Direction = typeof Direction[keyof typeof Direction];
1843
+
1844
+
1845
+ /**
1846
+ * Type of credit event.
1847
+ * @export
1848
+ * @enum {string}
1849
+ */
1850
+
1851
+ export const EventType = {
1852
+ Memory: 'memory',
1853
+ Message: 'message',
1854
+ SkillCall: 'skill_call',
1855
+ Voice: 'voice',
1856
+ KnowledgeBase: 'knowledge_base',
1857
+ Recharge: 'recharge',
1858
+ Refund: 'refund',
1859
+ Adjustment: 'adjustment',
1860
+ Refill: 'refill',
1861
+ Reward: 'reward',
1862
+ EventReward: 'event_reward',
1863
+ RechargeBonus: 'recharge_bonus'
1864
+ } as const;
1865
+
1866
+ export type EventType = typeof EventType[keyof typeof EventType];
1867
+
1868
+
1869
+ /**
1870
+ * Fee percentage of the agent
1871
+ * @export
1872
+ * @interface FeePercentage
1873
+ */
1874
+ export interface FeePercentage {
1875
+ }
1876
+ /**
1877
+ *
1878
+ * @export
1879
+ * @interface HTTPValidationError
1880
+ */
1881
+ export interface HTTPValidationError {
1882
+ /**
1883
+ *
1884
+ * @type {Array<ValidationError>}
1885
+ * @memberof HTTPValidationError
1886
+ */
1887
+ 'detail'?: Array<ValidationError>;
1888
+ }
1889
+ /**
1890
+ * LLM model information with provider display name.
1891
+ * @export
1892
+ * @interface LLMModelInfoWithProviderName
1893
+ */
1894
+ export interface LLMModelInfoWithProviderName {
1895
+ /**
1896
+ *
1897
+ * @type {string}
1898
+ * @memberof LLMModelInfoWithProviderName
1899
+ */
1900
+ 'id': string;
1901
+ /**
1902
+ *
1903
+ * @type {string}
1904
+ * @memberof LLMModelInfoWithProviderName
1905
+ */
1906
+ 'name': string;
1907
+ /**
1908
+ *
1909
+ * @type {LLMProvider}
1910
+ * @memberof LLMModelInfoWithProviderName
1911
+ */
1912
+ 'provider': LLMProvider;
1913
+ /**
1914
+ *
1915
+ * @type {boolean}
1916
+ * @memberof LLMModelInfoWithProviderName
1917
+ */
1918
+ 'enabled'?: boolean;
1919
+ /**
1920
+ *
1921
+ * @type {string}
1922
+ * @memberof LLMModelInfoWithProviderName
1923
+ */
1924
+ 'input_price': string;
1925
+ /**
1926
+ *
1927
+ * @type {string}
1928
+ * @memberof LLMModelInfoWithProviderName
1929
+ */
1930
+ 'output_price': string;
1931
+ /**
1932
+ *
1933
+ * @type {number}
1934
+ * @memberof LLMModelInfoWithProviderName
1935
+ */
1936
+ 'price_level'?: number | null;
1937
+ /**
1938
+ *
1939
+ * @type {number}
1940
+ * @memberof LLMModelInfoWithProviderName
1941
+ */
1942
+ 'context_length': number;
1943
+ /**
1944
+ *
1945
+ * @type {number}
1946
+ * @memberof LLMModelInfoWithProviderName
1947
+ */
1948
+ 'output_length': number;
1949
+ /**
1950
+ *
1951
+ * @type {number}
1952
+ * @memberof LLMModelInfoWithProviderName
1953
+ */
1954
+ 'intelligence': number;
1955
+ /**
1956
+ *
1957
+ * @type {number}
1958
+ * @memberof LLMModelInfoWithProviderName
1959
+ */
1960
+ 'speed': number;
1961
+ /**
1962
+ *
1963
+ * @type {boolean}
1964
+ * @memberof LLMModelInfoWithProviderName
1965
+ */
1966
+ 'supports_image_input'?: boolean;
1967
+ /**
1968
+ *
1969
+ * @type {boolean}
1970
+ * @memberof LLMModelInfoWithProviderName
1971
+ */
1972
+ 'supports_skill_calls'?: boolean;
1973
+ /**
1974
+ *
1975
+ * @type {boolean}
1976
+ * @memberof LLMModelInfoWithProviderName
1977
+ */
1978
+ 'supports_structured_output'?: boolean;
1979
+ /**
1980
+ *
1981
+ * @type {boolean}
1982
+ * @memberof LLMModelInfoWithProviderName
1983
+ */
1984
+ 'has_reasoning'?: boolean;
1985
+ /**
1986
+ *
1987
+ * @type {boolean}
1988
+ * @memberof LLMModelInfoWithProviderName
1989
+ */
1990
+ 'supports_search'?: boolean;
1991
+ /**
1992
+ *
1993
+ * @type {boolean}
1994
+ * @memberof LLMModelInfoWithProviderName
1995
+ */
1996
+ 'supports_temperature'?: boolean;
1997
+ /**
1998
+ *
1999
+ * @type {boolean}
2000
+ * @memberof LLMModelInfoWithProviderName
2001
+ */
2002
+ 'supports_frequency_penalty'?: boolean;
2003
+ /**
2004
+ *
2005
+ * @type {boolean}
2006
+ * @memberof LLMModelInfoWithProviderName
2007
+ */
2008
+ 'supports_presence_penalty'?: boolean;
2009
+ /**
2010
+ *
2011
+ * @type {string}
2012
+ * @memberof LLMModelInfoWithProviderName
2013
+ */
2014
+ 'api_base'?: string | null;
2015
+ /**
2016
+ *
2017
+ * @type {number}
2018
+ * @memberof LLMModelInfoWithProviderName
2019
+ */
2020
+ 'timeout'?: number;
2021
+ /**
2022
+ * Timestamp when this data was created
2023
+ * @type {string}
2024
+ * @memberof LLMModelInfoWithProviderName
2025
+ */
2026
+ 'created_at'?: string;
2027
+ /**
2028
+ * Timestamp when this data was updated
2029
+ * @type {string}
2030
+ * @memberof LLMModelInfoWithProviderName
2031
+ */
2032
+ 'updated_at'?: string;
2033
+ /**
2034
+ *
2035
+ * @type {string}
2036
+ * @memberof LLMModelInfoWithProviderName
2037
+ */
2038
+ 'provider_name': string;
2039
+ }
2040
+
2041
+
2042
+ /**
2043
+ *
2044
+ * @export
2045
+ * @enum {string}
2046
+ */
2047
+
2048
+ export const LLMProvider = {
2049
+ Openai: 'openai',
2050
+ Deepseek: 'deepseek',
2051
+ Xai: 'xai',
2052
+ Eternal: 'eternal',
2053
+ Reigent: 'reigent',
2054
+ Venice: 'venice'
2055
+ } as const;
2056
+
2057
+ export type LLMProvider = typeof LLMProvider[keyof typeof LLMProvider];
2058
+
2059
+
2060
+ /**
2061
+ * Type of credit account owner.
2062
+ * @export
2063
+ * @enum {string}
2064
+ */
2065
+
2066
+ export const OwnerType = {
2067
+ User: 'user',
2068
+ Agent: 'agent',
2069
+ Platform: 'platform'
2070
+ } as const;
2071
+
2072
+ export type OwnerType = typeof OwnerType[keyof typeof OwnerType];
2073
+
2074
+
2075
+ /**
2076
+ * Pydantic model for Skill.
2077
+ * @export
2078
+ * @interface Skill
2079
+ */
2080
+ export interface Skill {
2081
+ /**
2082
+ * Name of the skill
2083
+ * @type {string}
2084
+ * @memberof Skill
2085
+ */
2086
+ 'name': string;
2087
+ /**
2088
+ * Is this skill enabled?
2089
+ * @type {boolean}
2090
+ * @memberof Skill
2091
+ */
2092
+ 'enabled': boolean;
2093
+ /**
2094
+ * Category of the skill
2095
+ * @type {string}
2096
+ * @memberof Skill
2097
+ */
2098
+ 'category': string;
2099
+ /**
2100
+ *
2101
+ * @type {string}
2102
+ * @memberof Skill
2103
+ */
2104
+ 'config_name': string | null;
2105
+ /**
2106
+ *
2107
+ * @type {number}
2108
+ * @memberof Skill
2109
+ */
2110
+ 'price_level': number | null;
2111
+ /**
2112
+ * Price for this skill
2113
+ * @type {string}
2114
+ * @memberof Skill
2115
+ */
2116
+ 'price'?: string;
2117
+ /**
2118
+ * Price for this skill with self key
2119
+ * @type {string}
2120
+ * @memberof Skill
2121
+ */
2122
+ 'price_self_key'?: string;
2123
+ /**
2124
+ *
2125
+ * @type {number}
2126
+ * @memberof Skill
2127
+ */
2128
+ 'rate_limit_count': number | null;
2129
+ /**
2130
+ *
2131
+ * @type {number}
2132
+ * @memberof Skill
2133
+ */
2134
+ 'rate_limit_minutes': number | null;
2135
+ /**
2136
+ *
2137
+ * @type {string}
2138
+ * @memberof Skill
2139
+ */
2140
+ 'author': string | null;
2141
+ /**
2142
+ * Timestamp when this record was created
2143
+ * @type {string}
2144
+ * @memberof Skill
2145
+ */
2146
+ 'created_at': string;
2147
+ /**
2148
+ * Timestamp when this record was last updated
2149
+ * @type {string}
2150
+ * @memberof Skill
2151
+ */
2152
+ 'updated_at': string;
2153
+ }
2154
+ /**
2155
+ * Type of credit transaction.
2156
+ * @export
2157
+ * @enum {string}
2158
+ */
2159
+
2160
+ export const TransactionType = {
2161
+ Pay: 'pay',
2162
+ ReceiveBaseLlm: 'receive_base_llm',
2163
+ ReceiveBaseSkill: 'receive_base_skill',
2164
+ ReceiveBaseMemory: 'receive_base_memory',
2165
+ ReceiveBaseVoice: 'receive_base_voice',
2166
+ ReceiveBaseKnowledge: 'receive_base_knowledge',
2167
+ ReceiveFeeDev: 'receive_fee_dev',
2168
+ ReceiveFeeAgent: 'receive_fee_agent',
2169
+ ReceiveFeePlatform: 'receive_fee_platform',
2170
+ Recharge: 'recharge',
2171
+ Refund: 'refund',
2172
+ Adjustment: 'adjustment',
2173
+ Refill: 'refill',
2174
+ Reward: 'reward',
2175
+ EventReward: 'event_reward',
2176
+ RechargeBonus: 'recharge_bonus'
2177
+ } as const;
2178
+
2179
+ export type TransactionType = typeof TransactionType[keyof typeof TransactionType];
2180
+
2181
+
2182
+ /**
2183
+ * Type of upstream transaction.
2184
+ * @export
2185
+ * @enum {string}
2186
+ */
2187
+
2188
+ export const UpstreamType = {
2189
+ Api: 'api',
2190
+ Scheduler: 'scheduler',
2191
+ Executor: 'executor',
2192
+ Initializer: 'initializer'
2193
+ } as const;
2194
+
2195
+ export type UpstreamType = typeof UpstreamType[keyof typeof UpstreamType];
2196
+
2197
+
2198
+ /**
2199
+ *
2200
+ * @export
2201
+ * @interface ValidationError
2202
+ */
2203
+ export interface ValidationError {
2204
+ /**
2205
+ *
2206
+ * @type {Array<ValidationErrorLocInner>}
2207
+ * @memberof ValidationError
2208
+ */
2209
+ 'loc': Array<ValidationErrorLocInner>;
2210
+ /**
2211
+ *
2212
+ * @type {string}
2213
+ * @memberof ValidationError
2214
+ */
2215
+ 'msg': string;
2216
+ /**
2217
+ *
2218
+ * @type {string}
2219
+ * @memberof ValidationError
2220
+ */
2221
+ 'type': string;
2222
+ }
2223
+ /**
2224
+ *
2225
+ * @export
2226
+ * @interface ValidationErrorLocInner
2227
+ */
2228
+ export interface ValidationErrorLocInner {
2229
+ }
2230
+
2231
+ /**
2232
+ * AgentApi - axios parameter creator
2233
+ * @export
2234
+ */
2235
+ export const AgentApiAxiosParamCreator = function (configuration?: Configuration) {
2236
+ return {
2237
+ /**
2238
+ * Create a new agent owned by the current user. The agent will be initialized with the provided details.
2239
+ * @summary Create a new agent
2240
+ * @param {AgentUpdate} agentUpdate
2241
+ * @param {*} [options] Override http request option.
2242
+ * @throws {RequiredError}
2243
+ */
2244
+ createAgent: async (agentUpdate: AgentUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2245
+ // verify required parameter 'agentUpdate' is not null or undefined
2246
+ assertParamExists('createAgent', 'agentUpdate', agentUpdate)
2247
+ const localVarPath = `/agents`;
2248
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2249
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2250
+ let baseOptions;
2251
+ if (configuration) {
2252
+ baseOptions = configuration.baseOptions;
2253
+ }
2254
+
2255
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2256
+ const localVarHeaderParameter = {} as any;
2257
+ const localVarQueryParameter = {} as any;
2258
+
2259
+ // authentication HTTPBearer required
2260
+ // http bearer authentication required
2261
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2262
+
2263
+
2264
+
2265
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2266
+
2267
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2268
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2269
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2270
+ localVarRequestOptions.data = serializeDataIfNeeded(agentUpdate, localVarRequestOptions, configuration)
2271
+
2272
+ return {
2273
+ url: toPathString(localVarUrlObj),
2274
+ options: localVarRequestOptions,
2275
+ };
2276
+ },
2277
+ /**
2278
+ * Retrieve a specific agent by its ID. Returns 404 if not found.
2279
+ * @summary Get agent by ID
2280
+ * @param {string} aid Agent ID
2281
+ * @param {*} [options] Override http request option.
2282
+ * @throws {RequiredError}
2283
+ */
2284
+ getAgentById: async (aid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2285
+ // verify required parameter 'aid' is not null or undefined
2286
+ assertParamExists('getAgentById', 'aid', aid)
2287
+ const localVarPath = `/agents/{aid}`
2288
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
2289
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2290
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2291
+ let baseOptions;
2292
+ if (configuration) {
2293
+ baseOptions = configuration.baseOptions;
2294
+ }
2295
+
2296
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2297
+ const localVarHeaderParameter = {} as any;
2298
+ const localVarQueryParameter = {} as any;
2299
+
2300
+
2301
+
2302
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2303
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2304
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2305
+
2306
+ return {
2307
+ url: toPathString(localVarUrlObj),
2308
+ options: localVarRequestOptions,
2309
+ };
2310
+ },
2311
+ /**
2312
+ * Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
2313
+ * @summary Get Agent Statistics
2314
+ * @param {string} aid ID of the agent
2315
+ * @param {*} [options] Override http request option.
2316
+ * @throws {RequiredError}
2317
+ */
2318
+ getAgentStatistics: async (aid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2319
+ // verify required parameter 'aid' is not null or undefined
2320
+ assertParamExists('getAgentStatistics', 'aid', aid)
2321
+ const localVarPath = `/agents/{aid}/statistics`
2322
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
2323
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2324
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2325
+ let baseOptions;
2326
+ if (configuration) {
2327
+ baseOptions = configuration.baseOptions;
2328
+ }
2329
+
2330
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2331
+ const localVarHeaderParameter = {} as any;
2332
+ const localVarQueryParameter = {} as any;
2333
+
2334
+
2335
+
2336
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2337
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2338
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2339
+
2340
+ return {
2341
+ url: toPathString(localVarUrlObj),
2342
+ options: localVarRequestOptions,
2343
+ };
2344
+ },
2345
+ }
2346
+ };
2347
+
2348
+ /**
2349
+ * AgentApi - functional programming interface
2350
+ * @export
2351
+ */
2352
+ export const AgentApiFp = function(configuration?: Configuration) {
2353
+ const localVarAxiosParamCreator = AgentApiAxiosParamCreator(configuration)
2354
+ return {
2355
+ /**
2356
+ * Create a new agent owned by the current user. The agent will be initialized with the provided details.
2357
+ * @summary Create a new agent
2358
+ * @param {AgentUpdate} agentUpdate
2359
+ * @param {*} [options] Override http request option.
2360
+ * @throws {RequiredError}
2361
+ */
2362
+ async createAgent(agentUpdate: AgentUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>> {
2363
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAgent(agentUpdate, options);
2364
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2365
+ const localVarOperationServerBasePath = operationServerMap['AgentApi.createAgent']?.[localVarOperationServerIndex]?.url;
2366
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2367
+ },
2368
+ /**
2369
+ * Retrieve a specific agent by its ID. Returns 404 if not found.
2370
+ * @summary Get agent by ID
2371
+ * @param {string} aid Agent ID
2372
+ * @param {*} [options] Override http request option.
2373
+ * @throws {RequiredError}
2374
+ */
2375
+ async getAgentById(aid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>> {
2376
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentById(aid, options);
2377
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2378
+ const localVarOperationServerBasePath = operationServerMap['AgentApi.getAgentById']?.[localVarOperationServerIndex]?.url;
2379
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2380
+ },
2381
+ /**
2382
+ * Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
2383
+ * @summary Get Agent Statistics
2384
+ * @param {string} aid ID of the agent
2385
+ * @param {*} [options] Override http request option.
2386
+ * @throws {RequiredError}
2387
+ */
2388
+ async getAgentStatistics(aid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentStatisticsResponse>> {
2389
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentStatistics(aid, options);
2390
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2391
+ const localVarOperationServerBasePath = operationServerMap['AgentApi.getAgentStatistics']?.[localVarOperationServerIndex]?.url;
2392
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2393
+ },
2394
+ }
2395
+ };
2396
+
2397
+ /**
2398
+ * AgentApi - factory interface
2399
+ * @export
2400
+ */
2401
+ export const AgentApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
2402
+ const localVarFp = AgentApiFp(configuration)
2403
+ return {
2404
+ /**
2405
+ * Create a new agent owned by the current user. The agent will be initialized with the provided details.
2406
+ * @summary Create a new agent
2407
+ * @param {AgentUpdate} agentUpdate
2408
+ * @param {*} [options] Override http request option.
2409
+ * @throws {RequiredError}
2410
+ */
2411
+ createAgent(agentUpdate: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
2412
+ return localVarFp.createAgent(agentUpdate, options).then((request) => request(axios, basePath));
2413
+ },
2414
+ /**
2415
+ * Retrieve a specific agent by its ID. Returns 404 if not found.
2416
+ * @summary Get agent by ID
2417
+ * @param {string} aid Agent ID
2418
+ * @param {*} [options] Override http request option.
2419
+ * @throws {RequiredError}
2420
+ */
2421
+ getAgentById(aid: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
2422
+ return localVarFp.getAgentById(aid, options).then((request) => request(axios, basePath));
2423
+ },
2424
+ /**
2425
+ * Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
2426
+ * @summary Get Agent Statistics
2427
+ * @param {string} aid ID of the agent
2428
+ * @param {*} [options] Override http request option.
2429
+ * @throws {RequiredError}
2430
+ */
2431
+ getAgentStatistics(aid: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentStatisticsResponse> {
2432
+ return localVarFp.getAgentStatistics(aid, options).then((request) => request(axios, basePath));
2433
+ },
2434
+ };
2435
+ };
2436
+
2437
+ /**
2438
+ * AgentApi - object-oriented interface
2439
+ * @export
2440
+ * @class AgentApi
2441
+ * @extends {BaseAPI}
2442
+ */
2443
+ export class AgentApi extends BaseAPI {
2444
+ /**
2445
+ * Create a new agent owned by the current user. The agent will be initialized with the provided details.
2446
+ * @summary Create a new agent
2447
+ * @param {AgentUpdate} agentUpdate
2448
+ * @param {*} [options] Override http request option.
2449
+ * @throws {RequiredError}
2450
+ * @memberof AgentApi
2451
+ */
2452
+ public createAgent(agentUpdate: AgentUpdate, options?: RawAxiosRequestConfig) {
2453
+ return AgentApiFp(this.configuration).createAgent(agentUpdate, options).then((request) => request(this.axios, this.basePath));
2454
+ }
2455
+
2456
+ /**
2457
+ * Retrieve a specific agent by its ID. Returns 404 if not found.
2458
+ * @summary Get agent by ID
2459
+ * @param {string} aid Agent ID
2460
+ * @param {*} [options] Override http request option.
2461
+ * @throws {RequiredError}
2462
+ * @memberof AgentApi
2463
+ */
2464
+ public getAgentById(aid: string, options?: RawAxiosRequestConfig) {
2465
+ return AgentApiFp(this.configuration).getAgentById(aid, options).then((request) => request(this.axios, this.basePath));
2466
+ }
2467
+
2468
+ /**
2469
+ * Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
2470
+ * @summary Get Agent Statistics
2471
+ * @param {string} aid ID of the agent
2472
+ * @param {*} [options] Override http request option.
2473
+ * @throws {RequiredError}
2474
+ * @memberof AgentApi
2475
+ */
2476
+ public getAgentStatistics(aid: string, options?: RawAxiosRequestConfig) {
2477
+ return AgentApiFp(this.configuration).getAgentStatistics(aid, options).then((request) => request(this.axios, this.basePath));
2478
+ }
2479
+ }
2480
+
2481
+
2482
+
2483
+ /**
2484
+ * ChatApi - axios parameter creator
2485
+ * @export
2486
+ */
2487
+ export const ChatApiAxiosParamCreator = function (configuration?: Configuration) {
2488
+ return {
2489
+ /**
2490
+ * Create a new chat thread for a specific agent and user.
2491
+ * @summary Create a new chat thread
2492
+ * @param {string} aid Agent ID
2493
+ * @param {*} [options] Override http request option.
2494
+ * @throws {RequiredError}
2495
+ */
2496
+ createChatThread: async (aid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2497
+ // verify required parameter 'aid' is not null or undefined
2498
+ assertParamExists('createChatThread', 'aid', aid)
2499
+ const localVarPath = `/agents/{aid}/chats`
2500
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
2501
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2502
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2503
+ let baseOptions;
2504
+ if (configuration) {
2505
+ baseOptions = configuration.baseOptions;
2506
+ }
2507
+
2508
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2509
+ const localVarHeaderParameter = {} as any;
2510
+ const localVarQueryParameter = {} as any;
2511
+
2512
+ // authentication HTTPBearer required
2513
+ // http bearer authentication required
2514
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2515
+
2516
+
2517
+
2518
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2519
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2520
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2521
+
2522
+ return {
2523
+ url: toPathString(localVarUrlObj),
2524
+ options: localVarRequestOptions,
2525
+ };
2526
+ },
2527
+ /**
2528
+ * Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
2529
+ * @summary Delete a chat thread
2530
+ * @param {string} aid Agent ID
2531
+ * @param {string} chatId Chat ID
2532
+ * @param {*} [options] Override http request option.
2533
+ * @throws {RequiredError}
2534
+ */
2535
+ deleteChatThread: async (aid: string, chatId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2536
+ // verify required parameter 'aid' is not null or undefined
2537
+ assertParamExists('deleteChatThread', 'aid', aid)
2538
+ // verify required parameter 'chatId' is not null or undefined
2539
+ assertParamExists('deleteChatThread', 'chatId', chatId)
2540
+ const localVarPath = `/agents/{aid}/chats/{chat_id}`
2541
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)))
2542
+ .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
2543
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2544
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2545
+ let baseOptions;
2546
+ if (configuration) {
2547
+ baseOptions = configuration.baseOptions;
2548
+ }
2549
+
2550
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
2551
+ const localVarHeaderParameter = {} as any;
2552
+ const localVarQueryParameter = {} as any;
2553
+
2554
+ // authentication HTTPBearer required
2555
+ // http bearer authentication required
2556
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2557
+
2558
+
2559
+
2560
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2561
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2562
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2563
+
2564
+ return {
2565
+ url: toPathString(localVarUrlObj),
2566
+ options: localVarRequestOptions,
2567
+ };
2568
+ },
2569
+ /**
2570
+ * 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.
2571
+ * @summary Get chat thread by ID
2572
+ * @param {string} aid Agent ID
2573
+ * @param {string} chatId Chat ID
2574
+ * @param {*} [options] Override http request option.
2575
+ * @throws {RequiredError}
2576
+ */
2577
+ getChatThreadById: async (aid: string, chatId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2578
+ // verify required parameter 'aid' is not null or undefined
2579
+ assertParamExists('getChatThreadById', 'aid', aid)
2580
+ // verify required parameter 'chatId' is not null or undefined
2581
+ assertParamExists('getChatThreadById', 'chatId', chatId)
2582
+ const localVarPath = `/agents/{aid}/chats/{chat_id}`
2583
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)))
2584
+ .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
2585
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2586
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2587
+ let baseOptions;
2588
+ if (configuration) {
2589
+ baseOptions = configuration.baseOptions;
2590
+ }
2591
+
2592
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2593
+ const localVarHeaderParameter = {} as any;
2594
+ const localVarQueryParameter = {} as any;
2595
+
2596
+ // authentication HTTPBearer required
2597
+ // http bearer authentication required
2598
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2599
+
2600
+
2601
+
2602
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2603
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2604
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2605
+
2606
+ return {
2607
+ url: toPathString(localVarUrlObj),
2608
+ options: localVarRequestOptions,
2609
+ };
2610
+ },
2611
+ /**
2612
+ * Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
2613
+ * @summary Get message by ID
2614
+ * @param {string} messageId Message ID
2615
+ * @param {*} [options] Override http request option.
2616
+ * @throws {RequiredError}
2617
+ */
2618
+ getMessageById: async (messageId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2619
+ // verify required parameter 'messageId' is not null or undefined
2620
+ assertParamExists('getMessageById', 'messageId', messageId)
2621
+ const localVarPath = `/messages/{message_id}`
2622
+ .replace(`{${"message_id"}}`, encodeURIComponent(String(messageId)));
2623
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2624
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2625
+ let baseOptions;
2626
+ if (configuration) {
2627
+ baseOptions = configuration.baseOptions;
2628
+ }
2629
+
2630
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2631
+ const localVarHeaderParameter = {} as any;
2632
+ const localVarQueryParameter = {} as any;
2633
+
2634
+ // authentication HTTPBearer required
2635
+ // http bearer authentication required
2636
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2637
+
2638
+
2639
+
2640
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2641
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2642
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2643
+
2644
+ return {
2645
+ url: toPathString(localVarUrlObj),
2646
+ options: localVarRequestOptions,
2647
+ };
2648
+ },
2649
+ /**
2650
+ * Retrieve all chat threads associated with a specific agent for the current user.
2651
+ * @summary List chat threads for an agent
2652
+ * @param {string} aid Agent ID
2653
+ * @param {*} [options] Override http request option.
2654
+ * @throws {RequiredError}
2655
+ */
2656
+ listChatsForAgent: async (aid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2657
+ // verify required parameter 'aid' is not null or undefined
2658
+ assertParamExists('listChatsForAgent', 'aid', aid)
2659
+ const localVarPath = `/agents/{aid}/chats`
2660
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)));
2661
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2662
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2663
+ let baseOptions;
2664
+ if (configuration) {
2665
+ baseOptions = configuration.baseOptions;
2666
+ }
2667
+
2668
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2669
+ const localVarHeaderParameter = {} as any;
2670
+ const localVarQueryParameter = {} as any;
2671
+
2672
+ // authentication HTTPBearer required
2673
+ // http bearer authentication required
2674
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2675
+
2676
+
2677
+
2678
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2679
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2680
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2681
+
2682
+ return {
2683
+ url: toPathString(localVarUrlObj),
2684
+ options: localVarRequestOptions,
2685
+ };
2686
+ },
2687
+ /**
2688
+ * Retrieve the message history for a specific chat thread with cursor-based pagination.
2689
+ * @summary List messages in a chat thread
2690
+ * @param {string} aid Agent ID
2691
+ * @param {string} chatId Chat ID
2692
+ * @param {string | null} [cursor] Cursor for pagination (message id)
2693
+ * @param {number} [limit] Maximum number of messages to return
2694
+ * @param {*} [options] Override http request option.
2695
+ * @throws {RequiredError}
2696
+ */
2697
+ listMessagesInChat: async (aid: string, chatId: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2698
+ // verify required parameter 'aid' is not null or undefined
2699
+ assertParamExists('listMessagesInChat', 'aid', aid)
2700
+ // verify required parameter 'chatId' is not null or undefined
2701
+ assertParamExists('listMessagesInChat', 'chatId', chatId)
2702
+ const localVarPath = `/agents/{aid}/chats/{chat_id}/messages`
2703
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)))
2704
+ .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
2705
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2706
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2707
+ let baseOptions;
2708
+ if (configuration) {
2709
+ baseOptions = configuration.baseOptions;
2710
+ }
2711
+
2712
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2713
+ const localVarHeaderParameter = {} as any;
2714
+ const localVarQueryParameter = {} as any;
2715
+
2716
+ // authentication HTTPBearer required
2717
+ // http bearer authentication required
2718
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2719
+
2720
+ if (cursor !== undefined) {
2721
+ localVarQueryParameter['cursor'] = cursor;
2722
+ }
2723
+
2724
+ if (limit !== undefined) {
2725
+ localVarQueryParameter['limit'] = limit;
2726
+ }
2727
+
2728
+
2729
+
2730
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2731
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2732
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2733
+
2734
+ return {
2735
+ url: toPathString(localVarUrlObj),
2736
+ options: localVarRequestOptions,
2737
+ };
2738
+ },
2739
+ /**
2740
+ * 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.
2741
+ * @summary Retry a message in a chat thread
2742
+ * @param {string} aid Agent ID
2743
+ * @param {string} chatId Chat ID
2744
+ * @param {*} [options] Override http request option.
2745
+ * @throws {RequiredError}
2746
+ */
2747
+ retryMessageInChat: async (aid: string, chatId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2748
+ // verify required parameter 'aid' is not null or undefined
2749
+ assertParamExists('retryMessageInChat', 'aid', aid)
2750
+ // verify required parameter 'chatId' is not null or undefined
2751
+ assertParamExists('retryMessageInChat', 'chatId', chatId)
2752
+ const localVarPath = `/agents/{aid}/chats/{chat_id}/messages/retry`
2753
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)))
2754
+ .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
2755
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2756
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2757
+ let baseOptions;
2758
+ if (configuration) {
2759
+ baseOptions = configuration.baseOptions;
2760
+ }
2761
+
2762
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2763
+ const localVarHeaderParameter = {} as any;
2764
+ const localVarQueryParameter = {} as any;
2765
+
2766
+ // authentication HTTPBearer required
2767
+ // http bearer authentication required
2768
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2769
+
2770
+
2771
+
2772
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2773
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2774
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2775
+
2776
+ return {
2777
+ url: toPathString(localVarUrlObj),
2778
+ options: localVarRequestOptions,
2779
+ };
2780
+ },
2781
+ /**
2782
+ * Send a new message to a specific chat thread. Supports streaming responses if requested.
2783
+ * @summary Send a message to a chat thread
2784
+ * @param {string} aid Agent ID
2785
+ * @param {string} chatId Chat ID
2786
+ * @param {ChatMessageRequest} chatMessageRequest
2787
+ * @param {*} [options] Override http request option.
2788
+ * @throws {RequiredError}
2789
+ */
2790
+ sendMessageToChat: async (aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2791
+ // verify required parameter 'aid' is not null or undefined
2792
+ assertParamExists('sendMessageToChat', 'aid', aid)
2793
+ // verify required parameter 'chatId' is not null or undefined
2794
+ assertParamExists('sendMessageToChat', 'chatId', chatId)
2795
+ // verify required parameter 'chatMessageRequest' is not null or undefined
2796
+ assertParamExists('sendMessageToChat', 'chatMessageRequest', chatMessageRequest)
2797
+ const localVarPath = `/agents/{aid}/chats/{chat_id}/messages`
2798
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)))
2799
+ .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
2800
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2801
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2802
+ let baseOptions;
2803
+ if (configuration) {
2804
+ baseOptions = configuration.baseOptions;
2805
+ }
2806
+
2807
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
2808
+ const localVarHeaderParameter = {} as any;
2809
+ const localVarQueryParameter = {} as any;
2810
+
2811
+ // authentication HTTPBearer required
2812
+ // http bearer authentication required
2813
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2814
+
2815
+
2816
+
2817
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2818
+
2819
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2820
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2821
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2822
+ localVarRequestOptions.data = serializeDataIfNeeded(chatMessageRequest, localVarRequestOptions, configuration)
2823
+
2824
+ return {
2825
+ url: toPathString(localVarUrlObj),
2826
+ options: localVarRequestOptions,
2827
+ };
2828
+ },
2829
+ /**
2830
+ * Update details of a specific chat thread. Currently only supports updating the summary.
2831
+ * @summary Update a chat thread
2832
+ * @param {string} aid Agent ID
2833
+ * @param {string} chatId Chat ID
2834
+ * @param {ChatUpdateRequest} chatUpdateRequest
2835
+ * @param {*} [options] Override http request option.
2836
+ * @throws {RequiredError}
2837
+ */
2838
+ updateChatThread: async (aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2839
+ // verify required parameter 'aid' is not null or undefined
2840
+ assertParamExists('updateChatThread', 'aid', aid)
2841
+ // verify required parameter 'chatId' is not null or undefined
2842
+ assertParamExists('updateChatThread', 'chatId', chatId)
2843
+ // verify required parameter 'chatUpdateRequest' is not null or undefined
2844
+ assertParamExists('updateChatThread', 'chatUpdateRequest', chatUpdateRequest)
2845
+ const localVarPath = `/agents/{aid}/chats/{chat_id}`
2846
+ .replace(`{${"aid"}}`, encodeURIComponent(String(aid)))
2847
+ .replace(`{${"chat_id"}}`, encodeURIComponent(String(chatId)));
2848
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2849
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2850
+ let baseOptions;
2851
+ if (configuration) {
2852
+ baseOptions = configuration.baseOptions;
2853
+ }
2854
+
2855
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
2856
+ const localVarHeaderParameter = {} as any;
2857
+ const localVarQueryParameter = {} as any;
2858
+
2859
+ // authentication HTTPBearer required
2860
+ // http bearer authentication required
2861
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
2862
+
2863
+
2864
+
2865
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2866
+
2867
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2868
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2869
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2870
+ localVarRequestOptions.data = serializeDataIfNeeded(chatUpdateRequest, localVarRequestOptions, configuration)
2871
+
2872
+ return {
2873
+ url: toPathString(localVarUrlObj),
2874
+ options: localVarRequestOptions,
2875
+ };
2876
+ },
2877
+ }
2878
+ };
2879
+
2880
+ /**
2881
+ * ChatApi - functional programming interface
2882
+ * @export
2883
+ */
2884
+ export const ChatApiFp = function(configuration?: Configuration) {
2885
+ const localVarAxiosParamCreator = ChatApiAxiosParamCreator(configuration)
2886
+ return {
2887
+ /**
2888
+ * Create a new chat thread for a specific agent and user.
2889
+ * @summary Create a new chat thread
2890
+ * @param {string} aid Agent ID
2891
+ * @param {*} [options] Override http request option.
2892
+ * @throws {RequiredError}
2893
+ */
2894
+ async createChatThread(aid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Chat>> {
2895
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createChatThread(aid, options);
2896
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2897
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.createChatThread']?.[localVarOperationServerIndex]?.url;
2898
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2899
+ },
2900
+ /**
2901
+ * Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
2902
+ * @summary Delete a chat thread
2903
+ * @param {string} aid Agent ID
2904
+ * @param {string} chatId Chat ID
2905
+ * @param {*} [options] Override http request option.
2906
+ * @throws {RequiredError}
2907
+ */
2908
+ async deleteChatThread(aid: string, chatId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
2909
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteChatThread(aid, chatId, options);
2910
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2911
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.deleteChatThread']?.[localVarOperationServerIndex]?.url;
2912
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2913
+ },
2914
+ /**
2915
+ * 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.
2916
+ * @summary Get chat thread by ID
2917
+ * @param {string} aid Agent ID
2918
+ * @param {string} chatId Chat ID
2919
+ * @param {*} [options] Override http request option.
2920
+ * @throws {RequiredError}
2921
+ */
2922
+ async getChatThreadById(aid: string, chatId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Chat>> {
2923
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getChatThreadById(aid, chatId, options);
2924
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2925
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.getChatThreadById']?.[localVarOperationServerIndex]?.url;
2926
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2927
+ },
2928
+ /**
2929
+ * Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
2930
+ * @summary Get message by ID
2931
+ * @param {string} messageId Message ID
2932
+ * @param {*} [options] Override http request option.
2933
+ * @throws {RequiredError}
2934
+ */
2935
+ async getMessageById(messageId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessage>> {
2936
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMessageById(messageId, options);
2937
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2938
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.getMessageById']?.[localVarOperationServerIndex]?.url;
2939
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2940
+ },
2941
+ /**
2942
+ * Retrieve all chat threads associated with a specific agent for the current user.
2943
+ * @summary List chat threads for an agent
2944
+ * @param {string} aid Agent ID
2945
+ * @param {*} [options] Override http request option.
2946
+ * @throws {RequiredError}
2947
+ */
2948
+ async listChatsForAgent(aid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Chat>>> {
2949
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listChatsForAgent(aid, options);
2950
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2951
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.listChatsForAgent']?.[localVarOperationServerIndex]?.url;
2952
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2953
+ },
2954
+ /**
2955
+ * Retrieve the message history for a specific chat thread with cursor-based pagination.
2956
+ * @summary List messages in a chat thread
2957
+ * @param {string} aid Agent ID
2958
+ * @param {string} chatId Chat ID
2959
+ * @param {string | null} [cursor] Cursor for pagination (message id)
2960
+ * @param {number} [limit] Maximum number of messages to return
2961
+ * @param {*} [options] Override http request option.
2962
+ * @throws {RequiredError}
2963
+ */
2964
+ async listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ChatMessagesResponse>> {
2965
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMessagesInChat(aid, chatId, cursor, limit, options);
2966
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2967
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.listMessagesInChat']?.[localVarOperationServerIndex]?.url;
2968
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2969
+ },
2970
+ /**
2971
+ * 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.
2972
+ * @summary Retry a message in a chat thread
2973
+ * @param {string} aid Agent ID
2974
+ * @param {string} chatId Chat ID
2975
+ * @param {*} [options] Override http request option.
2976
+ * @throws {RequiredError}
2977
+ */
2978
+ async retryMessageInChat(aid: string, chatId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>> {
2979
+ const localVarAxiosArgs = await localVarAxiosParamCreator.retryMessageInChat(aid, chatId, options);
2980
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2981
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.retryMessageInChat']?.[localVarOperationServerIndex]?.url;
2982
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2983
+ },
2984
+ /**
2985
+ * Send a new message to a specific chat thread. Supports streaming responses if requested.
2986
+ * @summary Send a message to a chat thread
2987
+ * @param {string} aid Agent ID
2988
+ * @param {string} chatId Chat ID
2989
+ * @param {ChatMessageRequest} chatMessageRequest
2990
+ * @param {*} [options] Override http request option.
2991
+ * @throws {RequiredError}
2992
+ */
2993
+ async sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ChatMessage>>> {
2994
+ const localVarAxiosArgs = await localVarAxiosParamCreator.sendMessageToChat(aid, chatId, chatMessageRequest, options);
2995
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2996
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.sendMessageToChat']?.[localVarOperationServerIndex]?.url;
2997
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2998
+ },
2999
+ /**
3000
+ * Update details of a specific chat thread. Currently only supports updating the summary.
3001
+ * @summary Update a chat thread
3002
+ * @param {string} aid Agent ID
3003
+ * @param {string} chatId Chat ID
3004
+ * @param {ChatUpdateRequest} chatUpdateRequest
3005
+ * @param {*} [options] Override http request option.
3006
+ * @throws {RequiredError}
3007
+ */
3008
+ async updateChatThread(aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Chat>> {
3009
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateChatThread(aid, chatId, chatUpdateRequest, options);
3010
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3011
+ const localVarOperationServerBasePath = operationServerMap['ChatApi.updateChatThread']?.[localVarOperationServerIndex]?.url;
3012
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3013
+ },
3014
+ }
3015
+ };
3016
+
3017
+ /**
3018
+ * ChatApi - factory interface
3019
+ * @export
3020
+ */
3021
+ export const ChatApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3022
+ const localVarFp = ChatApiFp(configuration)
3023
+ return {
3024
+ /**
3025
+ * Create a new chat thread for a specific agent and user.
3026
+ * @summary Create a new chat thread
3027
+ * @param {string} aid Agent ID
3028
+ * @param {*} [options] Override http request option.
3029
+ * @throws {RequiredError}
3030
+ */
3031
+ createChatThread(aid: string, options?: RawAxiosRequestConfig): AxiosPromise<Chat> {
3032
+ return localVarFp.createChatThread(aid, options).then((request) => request(axios, basePath));
3033
+ },
3034
+ /**
3035
+ * Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
3036
+ * @summary Delete a chat thread
3037
+ * @param {string} aid Agent ID
3038
+ * @param {string} chatId Chat ID
3039
+ * @param {*} [options] Override http request option.
3040
+ * @throws {RequiredError}
3041
+ */
3042
+ deleteChatThread(aid: string, chatId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
3043
+ return localVarFp.deleteChatThread(aid, chatId, options).then((request) => request(axios, basePath));
3044
+ },
3045
+ /**
3046
+ * 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.
3047
+ * @summary Get chat thread by ID
3048
+ * @param {string} aid Agent ID
3049
+ * @param {string} chatId Chat ID
3050
+ * @param {*} [options] Override http request option.
3051
+ * @throws {RequiredError}
3052
+ */
3053
+ getChatThreadById(aid: string, chatId: string, options?: RawAxiosRequestConfig): AxiosPromise<Chat> {
3054
+ return localVarFp.getChatThreadById(aid, chatId, options).then((request) => request(axios, basePath));
3055
+ },
3056
+ /**
3057
+ * Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
3058
+ * @summary Get message by ID
3059
+ * @param {string} messageId Message ID
3060
+ * @param {*} [options] Override http request option.
3061
+ * @throws {RequiredError}
3062
+ */
3063
+ getMessageById(messageId: string, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessage> {
3064
+ return localVarFp.getMessageById(messageId, options).then((request) => request(axios, basePath));
3065
+ },
3066
+ /**
3067
+ * Retrieve all chat threads associated with a specific agent for the current user.
3068
+ * @summary List chat threads for an agent
3069
+ * @param {string} aid Agent ID
3070
+ * @param {*} [options] Override http request option.
3071
+ * @throws {RequiredError}
3072
+ */
3073
+ listChatsForAgent(aid: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<Chat>> {
3074
+ return localVarFp.listChatsForAgent(aid, options).then((request) => request(axios, basePath));
3075
+ },
3076
+ /**
3077
+ * Retrieve the message history for a specific chat thread with cursor-based pagination.
3078
+ * @summary List messages in a chat thread
3079
+ * @param {string} aid Agent ID
3080
+ * @param {string} chatId Chat ID
3081
+ * @param {string | null} [cursor] Cursor for pagination (message id)
3082
+ * @param {number} [limit] Maximum number of messages to return
3083
+ * @param {*} [options] Override http request option.
3084
+ * @throws {RequiredError}
3085
+ */
3086
+ listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<ChatMessagesResponse> {
3087
+ return localVarFp.listMessagesInChat(aid, chatId, cursor, limit, options).then((request) => request(axios, basePath));
3088
+ },
3089
+ /**
3090
+ * 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.
3091
+ * @summary Retry a message in a chat thread
3092
+ * @param {string} aid Agent ID
3093
+ * @param {string} chatId Chat ID
3094
+ * @param {*} [options] Override http request option.
3095
+ * @throws {RequiredError}
3096
+ */
3097
+ retryMessageInChat(aid: string, chatId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>> {
3098
+ return localVarFp.retryMessageInChat(aid, chatId, options).then((request) => request(axios, basePath));
3099
+ },
3100
+ /**
3101
+ * Send a new message to a specific chat thread. Supports streaming responses if requested.
3102
+ * @summary Send a message to a chat thread
3103
+ * @param {string} aid Agent ID
3104
+ * @param {string} chatId Chat ID
3105
+ * @param {ChatMessageRequest} chatMessageRequest
3106
+ * @param {*} [options] Override http request option.
3107
+ * @throws {RequiredError}
3108
+ */
3109
+ sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise<Array<ChatMessage>> {
3110
+ return localVarFp.sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(axios, basePath));
3111
+ },
3112
+ /**
3113
+ * Update details of a specific chat thread. Currently only supports updating the summary.
3114
+ * @summary Update a chat thread
3115
+ * @param {string} aid Agent ID
3116
+ * @param {string} chatId Chat ID
3117
+ * @param {ChatUpdateRequest} chatUpdateRequest
3118
+ * @param {*} [options] Override http request option.
3119
+ * @throws {RequiredError}
3120
+ */
3121
+ updateChatThread(aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise<Chat> {
3122
+ return localVarFp.updateChatThread(aid, chatId, chatUpdateRequest, options).then((request) => request(axios, basePath));
3123
+ },
3124
+ };
3125
+ };
3126
+
3127
+ /**
3128
+ * ChatApi - object-oriented interface
3129
+ * @export
3130
+ * @class ChatApi
3131
+ * @extends {BaseAPI}
3132
+ */
3133
+ export class ChatApi extends BaseAPI {
3134
+ /**
3135
+ * Create a new chat thread for a specific agent and user.
3136
+ * @summary Create a new chat thread
3137
+ * @param {string} aid Agent ID
3138
+ * @param {*} [options] Override http request option.
3139
+ * @throws {RequiredError}
3140
+ * @memberof ChatApi
3141
+ */
3142
+ public createChatThread(aid: string, options?: RawAxiosRequestConfig) {
3143
+ return ChatApiFp(this.configuration).createChatThread(aid, options).then((request) => request(this.axios, this.basePath));
3144
+ }
3145
+
3146
+ /**
3147
+ * Delete a specific chat thread for the current user and agent. Returns 404 if not found or not owned by the user.
3148
+ * @summary Delete a chat thread
3149
+ * @param {string} aid Agent ID
3150
+ * @param {string} chatId Chat ID
3151
+ * @param {*} [options] Override http request option.
3152
+ * @throws {RequiredError}
3153
+ * @memberof ChatApi
3154
+ */
3155
+ public deleteChatThread(aid: string, chatId: string, options?: RawAxiosRequestConfig) {
3156
+ return ChatApiFp(this.configuration).deleteChatThread(aid, chatId, options).then((request) => request(this.axios, this.basePath));
3157
+ }
3158
+
3159
+ /**
3160
+ * 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.
3161
+ * @summary Get chat thread by ID
3162
+ * @param {string} aid Agent ID
3163
+ * @param {string} chatId Chat ID
3164
+ * @param {*} [options] Override http request option.
3165
+ * @throws {RequiredError}
3166
+ * @memberof ChatApi
3167
+ */
3168
+ public getChatThreadById(aid: string, chatId: string, options?: RawAxiosRequestConfig) {
3169
+ return ChatApiFp(this.configuration).getChatThreadById(aid, chatId, options).then((request) => request(this.axios, this.basePath));
3170
+ }
3171
+
3172
+ /**
3173
+ * Retrieve a specific chat message by its ID for the current user. Returns 404 if not found or not owned by the user.
3174
+ * @summary Get message by ID
3175
+ * @param {string} messageId Message ID
3176
+ * @param {*} [options] Override http request option.
3177
+ * @throws {RequiredError}
3178
+ * @memberof ChatApi
3179
+ */
3180
+ public getMessageById(messageId: string, options?: RawAxiosRequestConfig) {
3181
+ return ChatApiFp(this.configuration).getMessageById(messageId, options).then((request) => request(this.axios, this.basePath));
3182
+ }
3183
+
3184
+ /**
3185
+ * Retrieve all chat threads associated with a specific agent for the current user.
3186
+ * @summary List chat threads for an agent
3187
+ * @param {string} aid Agent ID
3188
+ * @param {*} [options] Override http request option.
3189
+ * @throws {RequiredError}
3190
+ * @memberof ChatApi
3191
+ */
3192
+ public listChatsForAgent(aid: string, options?: RawAxiosRequestConfig) {
3193
+ return ChatApiFp(this.configuration).listChatsForAgent(aid, options).then((request) => request(this.axios, this.basePath));
3194
+ }
3195
+
3196
+ /**
3197
+ * Retrieve the message history for a specific chat thread with cursor-based pagination.
3198
+ * @summary List messages in a chat thread
3199
+ * @param {string} aid Agent ID
3200
+ * @param {string} chatId Chat ID
3201
+ * @param {string | null} [cursor] Cursor for pagination (message id)
3202
+ * @param {number} [limit] Maximum number of messages to return
3203
+ * @param {*} [options] Override http request option.
3204
+ * @throws {RequiredError}
3205
+ * @memberof ChatApi
3206
+ */
3207
+ public listMessagesInChat(aid: string, chatId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
3208
+ return ChatApiFp(this.configuration).listMessagesInChat(aid, chatId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
3209
+ }
3210
+
3211
+ /**
3212
+ * 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.
3213
+ * @summary Retry a message in a chat thread
3214
+ * @param {string} aid Agent ID
3215
+ * @param {string} chatId Chat ID
3216
+ * @param {*} [options] Override http request option.
3217
+ * @throws {RequiredError}
3218
+ * @memberof ChatApi
3219
+ */
3220
+ public retryMessageInChat(aid: string, chatId: string, options?: RawAxiosRequestConfig) {
3221
+ return ChatApiFp(this.configuration).retryMessageInChat(aid, chatId, options).then((request) => request(this.axios, this.basePath));
3222
+ }
3223
+
3224
+ /**
3225
+ * Send a new message to a specific chat thread. Supports streaming responses if requested.
3226
+ * @summary Send a message to a chat thread
3227
+ * @param {string} aid Agent ID
3228
+ * @param {string} chatId Chat ID
3229
+ * @param {ChatMessageRequest} chatMessageRequest
3230
+ * @param {*} [options] Override http request option.
3231
+ * @throws {RequiredError}
3232
+ * @memberof ChatApi
3233
+ */
3234
+ public sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
3235
+ return ChatApiFp(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
3236
+ }
3237
+
3238
+ /**
3239
+ * Update details of a specific chat thread. Currently only supports updating the summary.
3240
+ * @summary Update a chat thread
3241
+ * @param {string} aid Agent ID
3242
+ * @param {string} chatId Chat ID
3243
+ * @param {ChatUpdateRequest} chatUpdateRequest
3244
+ * @param {*} [options] Override http request option.
3245
+ * @throws {RequiredError}
3246
+ * @memberof ChatApi
3247
+ */
3248
+ public updateChatThread(aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options?: RawAxiosRequestConfig) {
3249
+ return ChatApiFp(this.configuration).updateChatThread(aid, chatId, chatUpdateRequest, options).then((request) => request(this.axios, this.basePath));
3250
+ }
3251
+ }
3252
+
3253
+
3254
+
3255
+ /**
3256
+ * CreditApi - axios parameter creator
3257
+ * @export
3258
+ */
3259
+ export const CreditApiAxiosParamCreator = function (configuration?: Configuration) {
3260
+ return {
3261
+ /**
3262
+ * 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.
3263
+ * @summary Credit Event
3264
+ * @param {string} eventId Credit event ID
3265
+ * @param {*} [options] Override http request option.
3266
+ * @throws {RequiredError}
3267
+ */
3268
+ fetchCreditEvent: async (eventId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3269
+ // verify required parameter 'eventId' is not null or undefined
3270
+ assertParamExists('fetchCreditEvent', 'eventId', eventId)
3271
+ const localVarPath = `/credit/events/{event_id}`
3272
+ .replace(`{${"event_id"}}`, encodeURIComponent(String(eventId)));
3273
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3274
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3275
+ let baseOptions;
3276
+ if (configuration) {
3277
+ baseOptions = configuration.baseOptions;
3278
+ }
3279
+
3280
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3281
+ const localVarHeaderParameter = {} as any;
3282
+ const localVarQueryParameter = {} as any;
3283
+
3284
+ // authentication HTTPBearer required
3285
+ // http bearer authentication required
3286
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3287
+
3288
+
3289
+
3290
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3291
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3292
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3293
+
3294
+ return {
3295
+ url: toPathString(localVarUrlObj),
3296
+ options: localVarRequestOptions,
3297
+ };
3298
+ },
3299
+ /**
3300
+ * 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.
3301
+ * @summary Get User Account
3302
+ * @param {*} [options] Override http request option.
3303
+ * @throws {RequiredError}
3304
+ */
3305
+ getUserAccount: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3306
+ const localVarPath = `/credit/user/account`;
3307
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3308
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3309
+ let baseOptions;
3310
+ if (configuration) {
3311
+ baseOptions = configuration.baseOptions;
3312
+ }
3313
+
3314
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3315
+ const localVarHeaderParameter = {} as any;
3316
+ const localVarQueryParameter = {} as any;
3317
+
3318
+ // authentication HTTPBearer required
3319
+ // http bearer authentication required
3320
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3321
+
3322
+
3323
+
3324
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3325
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3326
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3327
+
3328
+ return {
3329
+ url: toPathString(localVarUrlObj),
3330
+ options: localVarRequestOptions,
3331
+ };
3332
+ },
3333
+ /**
3334
+ * 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.
3335
+ * @summary List Agent Income
3336
+ * @param {string} agentId
3337
+ * @param {string | null} [cursor] Cursor for pagination
3338
+ * @param {number} [limit] Maximum number of events to return
3339
+ * @param {*} [options] Override http request option.
3340
+ * @throws {RequiredError}
3341
+ */
3342
+ listAgentIncomeEvents: async (agentId: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3343
+ // verify required parameter 'agentId' is not null or undefined
3344
+ assertParamExists('listAgentIncomeEvents', 'agentId', agentId)
3345
+ const localVarPath = `/credit/agents/{agent_id}/events`
3346
+ .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
3347
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3348
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3349
+ let baseOptions;
3350
+ if (configuration) {
3351
+ baseOptions = configuration.baseOptions;
3352
+ }
3353
+
3354
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3355
+ const localVarHeaderParameter = {} as any;
3356
+ const localVarQueryParameter = {} as any;
3357
+
3358
+ // authentication HTTPBearer required
3359
+ // http bearer authentication required
3360
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3361
+
3362
+ if (cursor !== undefined) {
3363
+ localVarQueryParameter['cursor'] = cursor;
3364
+ }
3365
+
3366
+ if (limit !== undefined) {
3367
+ localVarQueryParameter['limit'] = limit;
3368
+ }
3369
+
3370
+
3371
+
3372
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3373
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3374
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3375
+
3376
+ return {
3377
+ url: toPathString(localVarUrlObj),
3378
+ options: localVarRequestOptions,
3379
+ };
3380
+ },
3381
+ /**
3382
+ * 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.
3383
+ * @summary List User Events
3384
+ * @param {Array<EventType> | null} [eventType] Event types
3385
+ * @param {Direction | null} [direction] Direction of events
3386
+ * @param {string | null} [cursor] Cursor for pagination
3387
+ * @param {number} [limit] Maximum number of events to return
3388
+ * @param {*} [options] Override http request option.
3389
+ * @throws {RequiredError}
3390
+ */
3391
+ listUserEvents: async (eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3392
+ const localVarPath = `/credit/user/events`;
3393
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3394
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3395
+ let baseOptions;
3396
+ if (configuration) {
3397
+ baseOptions = configuration.baseOptions;
3398
+ }
3399
+
3400
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3401
+ const localVarHeaderParameter = {} as any;
3402
+ const localVarQueryParameter = {} as any;
3403
+
3404
+ // authentication HTTPBearer required
3405
+ // http bearer authentication required
3406
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3407
+
3408
+ if (eventType) {
3409
+ localVarQueryParameter['event_type'] = eventType;
3410
+ }
3411
+
3412
+ if (direction !== undefined) {
3413
+ localVarQueryParameter['direction'] = direction;
3414
+ }
3415
+
3416
+ if (cursor !== undefined) {
3417
+ localVarQueryParameter['cursor'] = cursor;
3418
+ }
3419
+
3420
+ if (limit !== undefined) {
3421
+ localVarQueryParameter['limit'] = limit;
3422
+ }
3423
+
3424
+
3425
+
3426
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3427
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3428
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3429
+
3430
+ return {
3431
+ url: toPathString(localVarUrlObj),
3432
+ options: localVarRequestOptions,
3433
+ };
3434
+ },
3435
+ /**
3436
+ * 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.
3437
+ * @summary List User Transactions
3438
+ * @param {Array<TransactionType> | null} [txType] Transaction types
3439
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
3440
+ * @param {string | null} [cursor] Cursor for pagination
3441
+ * @param {number} [limit] Maximum number of transactions to return
3442
+ * @param {*} [options] Override http request option.
3443
+ * @throws {RequiredError}
3444
+ */
3445
+ listUserTransactions: async (txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3446
+ const localVarPath = `/credit/user/transactions`;
3447
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3448
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3449
+ let baseOptions;
3450
+ if (configuration) {
3451
+ baseOptions = configuration.baseOptions;
3452
+ }
3453
+
3454
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3455
+ const localVarHeaderParameter = {} as any;
3456
+ const localVarQueryParameter = {} as any;
3457
+
3458
+ // authentication HTTPBearer required
3459
+ // http bearer authentication required
3460
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
3461
+
3462
+ if (txType) {
3463
+ localVarQueryParameter['tx_type'] = txType;
3464
+ }
3465
+
3466
+ if (creditDebit !== undefined) {
3467
+ localVarQueryParameter['credit_debit'] = creditDebit;
3468
+ }
3469
+
3470
+ if (cursor !== undefined) {
3471
+ localVarQueryParameter['cursor'] = cursor;
3472
+ }
3473
+
3474
+ if (limit !== undefined) {
3475
+ localVarQueryParameter['limit'] = limit;
3476
+ }
3477
+
3478
+
3479
+
3480
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3481
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3482
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3483
+
3484
+ return {
3485
+ url: toPathString(localVarUrlObj),
3486
+ options: localVarRequestOptions,
3487
+ };
3488
+ },
3489
+ }
3490
+ };
3491
+
3492
+ /**
3493
+ * CreditApi - functional programming interface
3494
+ * @export
3495
+ */
3496
+ export const CreditApiFp = function(configuration?: Configuration) {
3497
+ const localVarAxiosParamCreator = CreditApiAxiosParamCreator(configuration)
3498
+ return {
3499
+ /**
3500
+ * 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.
3501
+ * @summary Credit Event
3502
+ * @param {string} eventId Credit event ID
3503
+ * @param {*} [options] Override http request option.
3504
+ * @throws {RequiredError}
3505
+ */
3506
+ async fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEvent>> {
3507
+ const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCreditEvent(eventId, options);
3508
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3509
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.fetchCreditEvent']?.[localVarOperationServerIndex]?.url;
3510
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3511
+ },
3512
+ /**
3513
+ * 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.
3514
+ * @summary Get User Account
3515
+ * @param {*} [options] Override http request option.
3516
+ * @throws {RequiredError}
3517
+ */
3518
+ async getUserAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditAccount>> {
3519
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAccount(options);
3520
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3521
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.getUserAccount']?.[localVarOperationServerIndex]?.url;
3522
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3523
+ },
3524
+ /**
3525
+ * 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.
3526
+ * @summary List Agent Income
3527
+ * @param {string} agentId
3528
+ * @param {string | null} [cursor] Cursor for pagination
3529
+ * @param {number} [limit] Maximum number of events to return
3530
+ * @param {*} [options] Override http request option.
3531
+ * @throws {RequiredError}
3532
+ */
3533
+ async listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
3534
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAgentIncomeEvents(agentId, cursor, limit, options);
3535
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3536
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.listAgentIncomeEvents']?.[localVarOperationServerIndex]?.url;
3537
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3538
+ },
3539
+ /**
3540
+ * 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.
3541
+ * @summary List User Events
3542
+ * @param {Array<EventType> | null} [eventType] Event types
3543
+ * @param {Direction | null} [direction] Direction of events
3544
+ * @param {string | null} [cursor] Cursor for pagination
3545
+ * @param {number} [limit] Maximum number of events to return
3546
+ * @param {*} [options] Override http request option.
3547
+ * @throws {RequiredError}
3548
+ */
3549
+ async listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
3550
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUserEvents(eventType, direction, cursor, limit, options);
3551
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3552
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserEvents']?.[localVarOperationServerIndex]?.url;
3553
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3554
+ },
3555
+ /**
3556
+ * 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.
3557
+ * @summary List User Transactions
3558
+ * @param {Array<TransactionType> | null} [txType] Transaction types
3559
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
3560
+ * @param {string | null} [cursor] Cursor for pagination
3561
+ * @param {number} [limit] Maximum number of transactions to return
3562
+ * @param {*} [options] Override http request option.
3563
+ * @throws {RequiredError}
3564
+ */
3565
+ async listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditTransactionsResponse>> {
3566
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUserTransactions(txType, creditDebit, cursor, limit, options);
3567
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3568
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserTransactions']?.[localVarOperationServerIndex]?.url;
3569
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3570
+ },
3571
+ }
3572
+ };
3573
+
3574
+ /**
3575
+ * CreditApi - factory interface
3576
+ * @export
3577
+ */
3578
+ export const CreditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3579
+ const localVarFp = CreditApiFp(configuration)
3580
+ return {
3581
+ /**
3582
+ * 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.
3583
+ * @summary Credit Event
3584
+ * @param {string} eventId Credit event ID
3585
+ * @param {*} [options] Override http request option.
3586
+ * @throws {RequiredError}
3587
+ */
3588
+ fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): AxiosPromise<CreditEvent> {
3589
+ return localVarFp.fetchCreditEvent(eventId, options).then((request) => request(axios, basePath));
3590
+ },
3591
+ /**
3592
+ * 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.
3593
+ * @summary Get User Account
3594
+ * @param {*} [options] Override http request option.
3595
+ * @throws {RequiredError}
3596
+ */
3597
+ getUserAccount(options?: RawAxiosRequestConfig): AxiosPromise<CreditAccount> {
3598
+ return localVarFp.getUserAccount(options).then((request) => request(axios, basePath));
3599
+ },
3600
+ /**
3601
+ * 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.
3602
+ * @summary List Agent Income
3603
+ * @param {string} agentId
3604
+ * @param {string | null} [cursor] Cursor for pagination
3605
+ * @param {number} [limit] Maximum number of events to return
3606
+ * @param {*} [options] Override http request option.
3607
+ * @throws {RequiredError}
3608
+ */
3609
+ listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
3610
+ return localVarFp.listAgentIncomeEvents(agentId, cursor, limit, options).then((request) => request(axios, basePath));
3611
+ },
3612
+ /**
3613
+ * 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.
3614
+ * @summary List User Events
3615
+ * @param {Array<EventType> | null} [eventType] Event types
3616
+ * @param {Direction | null} [direction] Direction of events
3617
+ * @param {string | null} [cursor] Cursor for pagination
3618
+ * @param {number} [limit] Maximum number of events to return
3619
+ * @param {*} [options] Override http request option.
3620
+ * @throws {RequiredError}
3621
+ */
3622
+ listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
3623
+ return localVarFp.listUserEvents(eventType, direction, cursor, limit, options).then((request) => request(axios, basePath));
3624
+ },
3625
+ /**
3626
+ * 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.
3627
+ * @summary List User Transactions
3628
+ * @param {Array<TransactionType> | null} [txType] Transaction types
3629
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
3630
+ * @param {string | null} [cursor] Cursor for pagination
3631
+ * @param {number} [limit] Maximum number of transactions to return
3632
+ * @param {*} [options] Override http request option.
3633
+ * @throws {RequiredError}
3634
+ */
3635
+ listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditTransactionsResponse> {
3636
+ return localVarFp.listUserTransactions(txType, creditDebit, cursor, limit, options).then((request) => request(axios, basePath));
3637
+ },
3638
+ };
3639
+ };
3640
+
3641
+ /**
3642
+ * CreditApi - object-oriented interface
3643
+ * @export
3644
+ * @class CreditApi
3645
+ * @extends {BaseAPI}
3646
+ */
3647
+ export class CreditApi extends BaseAPI {
3648
+ /**
3649
+ * 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.
3650
+ * @summary Credit Event
3651
+ * @param {string} eventId Credit event ID
3652
+ * @param {*} [options] Override http request option.
3653
+ * @throws {RequiredError}
3654
+ * @memberof CreditApi
3655
+ */
3656
+ public fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig) {
3657
+ return CreditApiFp(this.configuration).fetchCreditEvent(eventId, options).then((request) => request(this.axios, this.basePath));
3658
+ }
3659
+
3660
+ /**
3661
+ * 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.
3662
+ * @summary Get User Account
3663
+ * @param {*} [options] Override http request option.
3664
+ * @throws {RequiredError}
3665
+ * @memberof CreditApi
3666
+ */
3667
+ public getUserAccount(options?: RawAxiosRequestConfig) {
3668
+ return CreditApiFp(this.configuration).getUserAccount(options).then((request) => request(this.axios, this.basePath));
3669
+ }
3670
+
3671
+ /**
3672
+ * 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.
3673
+ * @summary List Agent Income
3674
+ * @param {string} agentId
3675
+ * @param {string | null} [cursor] Cursor for pagination
3676
+ * @param {number} [limit] Maximum number of events to return
3677
+ * @param {*} [options] Override http request option.
3678
+ * @throws {RequiredError}
3679
+ * @memberof CreditApi
3680
+ */
3681
+ public listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
3682
+ return CreditApiFp(this.configuration).listAgentIncomeEvents(agentId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
3683
+ }
3684
+
3685
+ /**
3686
+ * 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.
3687
+ * @summary List User Events
3688
+ * @param {Array<EventType> | null} [eventType] Event types
3689
+ * @param {Direction | null} [direction] Direction of events
3690
+ * @param {string | null} [cursor] Cursor for pagination
3691
+ * @param {number} [limit] Maximum number of events to return
3692
+ * @param {*} [options] Override http request option.
3693
+ * @throws {RequiredError}
3694
+ * @memberof CreditApi
3695
+ */
3696
+ public listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
3697
+ return CreditApiFp(this.configuration).listUserEvents(eventType, direction, cursor, limit, options).then((request) => request(this.axios, this.basePath));
3698
+ }
3699
+
3700
+ /**
3701
+ * 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.
3702
+ * @summary List User Transactions
3703
+ * @param {Array<TransactionType> | null} [txType] Transaction types
3704
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
3705
+ * @param {string | null} [cursor] Cursor for pagination
3706
+ * @param {number} [limit] Maximum number of transactions to return
3707
+ * @param {*} [options] Override http request option.
3708
+ * @throws {RequiredError}
3709
+ * @memberof CreditApi
3710
+ */
3711
+ public listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
3712
+ return CreditApiFp(this.configuration).listUserTransactions(txType, creditDebit, cursor, limit, options).then((request) => request(this.axios, this.basePath));
3713
+ }
3714
+ }
3715
+
3716
+
3717
+
3718
+ /**
3719
+ * HealthApi - axios parameter creator
3720
+ * @export
3721
+ */
3722
+ export const HealthApiAxiosParamCreator = function (configuration?: Configuration) {
3723
+ return {
3724
+ /**
3725
+ * Returns the health status of the API server
3726
+ * @summary Health check endpoint
3727
+ * @param {*} [options] Override http request option.
3728
+ * @throws {RequiredError}
3729
+ */
3730
+ healthCheckHealthGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3731
+ const localVarPath = `/health`;
3732
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3733
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3734
+ let baseOptions;
3735
+ if (configuration) {
3736
+ baseOptions = configuration.baseOptions;
3737
+ }
3738
+
3739
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3740
+ const localVarHeaderParameter = {} as any;
3741
+ const localVarQueryParameter = {} as any;
3742
+
3743
+
3744
+
3745
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3746
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3747
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3748
+
3749
+ return {
3750
+ url: toPathString(localVarUrlObj),
3751
+ options: localVarRequestOptions,
3752
+ };
3753
+ },
3754
+ }
3755
+ };
3756
+
3757
+ /**
3758
+ * HealthApi - functional programming interface
3759
+ * @export
3760
+ */
3761
+ export const HealthApiFp = function(configuration?: Configuration) {
3762
+ const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration)
3763
+ return {
3764
+ /**
3765
+ * Returns the health status of the API server
3766
+ * @summary Health check endpoint
3767
+ * @param {*} [options] Override http request option.
3768
+ * @throws {RequiredError}
3769
+ */
3770
+ async healthCheckHealthGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
3771
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthCheckHealthGet(options);
3772
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3773
+ const localVarOperationServerBasePath = operationServerMap['HealthApi.healthCheckHealthGet']?.[localVarOperationServerIndex]?.url;
3774
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3775
+ },
3776
+ }
3777
+ };
3778
+
3779
+ /**
3780
+ * HealthApi - factory interface
3781
+ * @export
3782
+ */
3783
+ export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3784
+ const localVarFp = HealthApiFp(configuration)
3785
+ return {
3786
+ /**
3787
+ * Returns the health status of the API server
3788
+ * @summary Health check endpoint
3789
+ * @param {*} [options] Override http request option.
3790
+ * @throws {RequiredError}
3791
+ */
3792
+ healthCheckHealthGet(options?: RawAxiosRequestConfig): AxiosPromise<any> {
3793
+ return localVarFp.healthCheckHealthGet(options).then((request) => request(axios, basePath));
3794
+ },
3795
+ };
3796
+ };
3797
+
3798
+ /**
3799
+ * HealthApi - object-oriented interface
3800
+ * @export
3801
+ * @class HealthApi
3802
+ * @extends {BaseAPI}
3803
+ */
3804
+ export class HealthApi extends BaseAPI {
3805
+ /**
3806
+ * Returns the health status of the API server
3807
+ * @summary Health check endpoint
3808
+ * @param {*} [options] Override http request option.
3809
+ * @throws {RequiredError}
3810
+ * @memberof HealthApi
3811
+ */
3812
+ public healthCheckHealthGet(options?: RawAxiosRequestConfig) {
3813
+ return HealthApiFp(this.configuration).healthCheckHealthGet(options).then((request) => request(this.axios, this.basePath));
3814
+ }
3815
+ }
3816
+
3817
+
3818
+
3819
+ /**
3820
+ * MetadataApi - axios parameter creator
3821
+ * @export
3822
+ */
3823
+ export const MetadataApiAxiosParamCreator = function (configuration?: Configuration) {
3824
+ return {
3825
+ /**
3826
+ * Get the JSON schema for Agent model with all $ref references resolved
3827
+ * @summary Get agent schema
3828
+ * @param {*} [options] Override http request option.
3829
+ * @throws {RequiredError}
3830
+ */
3831
+ getAgentSchema: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3832
+ const localVarPath = `/metadata/agent/schema.json`;
3833
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3834
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3835
+ let baseOptions;
3836
+ if (configuration) {
3837
+ baseOptions = configuration.baseOptions;
3838
+ }
3839
+
3840
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3841
+ const localVarHeaderParameter = {} as any;
3842
+ const localVarQueryParameter = {} as any;
3843
+
3844
+
3845
+
3846
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3847
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3848
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3849
+
3850
+ return {
3851
+ url: toPathString(localVarUrlObj),
3852
+ options: localVarRequestOptions,
3853
+ };
3854
+ },
3855
+ /**
3856
+ * Returns a list of all available LLM models in the system
3857
+ * @summary Get all LLM models
3858
+ * @param {*} [options] Override http request option.
3859
+ * @throws {RequiredError}
3860
+ */
3861
+ getLlmsMetadataLlmsGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3862
+ const localVarPath = `/metadata/llms`;
3863
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3864
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3865
+ let baseOptions;
3866
+ if (configuration) {
3867
+ baseOptions = configuration.baseOptions;
3868
+ }
3869
+
3870
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3871
+ const localVarHeaderParameter = {} as any;
3872
+ const localVarQueryParameter = {} as any;
3873
+
3874
+
3875
+
3876
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3877
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3878
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3879
+
3880
+ return {
3881
+ url: toPathString(localVarUrlObj),
3882
+ options: localVarRequestOptions,
3883
+ };
3884
+ },
3885
+ /**
3886
+ * Get the icon for a specific skill
3887
+ * @summary Get skill icon
3888
+ * @param {string} skill Skill name
3889
+ * @param {string} iconName Icon name
3890
+ * @param {string} ext Icon file extension
3891
+ * @param {*} [options] Override http request option.
3892
+ * @throws {RequiredError}
3893
+ */
3894
+ getSkillIcon: async (skill: string, iconName: string, ext: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3895
+ // verify required parameter 'skill' is not null or undefined
3896
+ assertParamExists('getSkillIcon', 'skill', skill)
3897
+ // verify required parameter 'iconName' is not null or undefined
3898
+ assertParamExists('getSkillIcon', 'iconName', iconName)
3899
+ // verify required parameter 'ext' is not null or undefined
3900
+ assertParamExists('getSkillIcon', 'ext', ext)
3901
+ const localVarPath = `/metadata/skills/{skill}/{icon_name}.{ext}`
3902
+ .replace(`{${"skill"}}`, encodeURIComponent(String(skill)))
3903
+ .replace(`{${"icon_name"}}`, encodeURIComponent(String(iconName)))
3904
+ .replace(`{${"ext"}}`, encodeURIComponent(String(ext)));
3905
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3906
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3907
+ let baseOptions;
3908
+ if (configuration) {
3909
+ baseOptions = configuration.baseOptions;
3910
+ }
3911
+
3912
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3913
+ const localVarHeaderParameter = {} as any;
3914
+ const localVarQueryParameter = {} as any;
3915
+
3916
+
3917
+
3918
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3919
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3920
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3921
+
3922
+ return {
3923
+ url: toPathString(localVarUrlObj),
3924
+ options: localVarRequestOptions,
3925
+ };
3926
+ },
3927
+ /**
3928
+ * Get the JSON schema for a specific skill
3929
+ * @summary Get skill schema
3930
+ * @param {string} skill Skill name
3931
+ * @param {*} [options] Override http request option.
3932
+ * @throws {RequiredError}
3933
+ */
3934
+ getSkillSchema: async (skill: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3935
+ // verify required parameter 'skill' is not null or undefined
3936
+ assertParamExists('getSkillSchema', 'skill', skill)
3937
+ const localVarPath = `/metadata/skills/{skill}/schema.json`
3938
+ .replace(`{${"skill"}}`, encodeURIComponent(String(skill)));
3939
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3940
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3941
+ let baseOptions;
3942
+ if (configuration) {
3943
+ baseOptions = configuration.baseOptions;
3944
+ }
3945
+
3946
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3947
+ const localVarHeaderParameter = {} as any;
3948
+ const localVarQueryParameter = {} as any;
3949
+
3950
+
3951
+
3952
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3953
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3954
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3955
+
3956
+ return {
3957
+ url: toPathString(localVarUrlObj),
3958
+ options: localVarRequestOptions,
3959
+ };
3960
+ },
3961
+ /**
3962
+ * Returns a list of all available skills in the system
3963
+ * @summary Get all skills
3964
+ * @param {*} [options] Override http request option.
3965
+ * @throws {RequiredError}
3966
+ */
3967
+ getSkillsMetadataSkillsGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3968
+ const localVarPath = `/metadata/skills`;
3969
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3970
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3971
+ let baseOptions;
3972
+ if (configuration) {
3973
+ baseOptions = configuration.baseOptions;
3974
+ }
3975
+
3976
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3977
+ const localVarHeaderParameter = {} as any;
3978
+ const localVarQueryParameter = {} as any;
3979
+
3980
+
3981
+
3982
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3983
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3984
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3985
+
3986
+ return {
3987
+ url: toPathString(localVarUrlObj),
3988
+ options: localVarRequestOptions,
3989
+ };
3990
+ },
3991
+ }
3992
+ };
3993
+
3994
+ /**
3995
+ * MetadataApi - functional programming interface
3996
+ * @export
3997
+ */
3998
+ export const MetadataApiFp = function(configuration?: Configuration) {
3999
+ const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration)
4000
+ return {
4001
+ /**
4002
+ * Get the JSON schema for Agent model with all $ref references resolved
4003
+ * @summary Get agent schema
4004
+ * @param {*} [options] Override http request option.
4005
+ * @throws {RequiredError}
4006
+ */
4007
+ async getAgentSchema(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
4008
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentSchema(options);
4009
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4010
+ const localVarOperationServerBasePath = operationServerMap['MetadataApi.getAgentSchema']?.[localVarOperationServerIndex]?.url;
4011
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4012
+ },
4013
+ /**
4014
+ * Returns a list of all available LLM models in the system
4015
+ * @summary Get all LLM models
4016
+ * @param {*} [options] Override http request option.
4017
+ * @throws {RequiredError}
4018
+ */
4019
+ async getLlmsMetadataLlmsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<LLMModelInfoWithProviderName>>> {
4020
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLlmsMetadataLlmsGet(options);
4021
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4022
+ const localVarOperationServerBasePath = operationServerMap['MetadataApi.getLlmsMetadataLlmsGet']?.[localVarOperationServerIndex]?.url;
4023
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4024
+ },
4025
+ /**
4026
+ * Get the icon for a specific skill
4027
+ * @summary Get skill icon
4028
+ * @param {string} skill Skill name
4029
+ * @param {string} iconName Icon name
4030
+ * @param {string} ext Icon file extension
4031
+ * @param {*} [options] Override http request option.
4032
+ * @throws {RequiredError}
4033
+ */
4034
+ async getSkillIcon(skill: string, iconName: string, ext: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
4035
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSkillIcon(skill, iconName, ext, options);
4036
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4037
+ const localVarOperationServerBasePath = operationServerMap['MetadataApi.getSkillIcon']?.[localVarOperationServerIndex]?.url;
4038
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4039
+ },
4040
+ /**
4041
+ * Get the JSON schema for a specific skill
4042
+ * @summary Get skill schema
4043
+ * @param {string} skill Skill name
4044
+ * @param {*} [options] Override http request option.
4045
+ * @throws {RequiredError}
4046
+ */
4047
+ async getSkillSchema(skill: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
4048
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSkillSchema(skill, options);
4049
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4050
+ const localVarOperationServerBasePath = operationServerMap['MetadataApi.getSkillSchema']?.[localVarOperationServerIndex]?.url;
4051
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4052
+ },
4053
+ /**
4054
+ * Returns a list of all available skills in the system
4055
+ * @summary Get all skills
4056
+ * @param {*} [options] Override http request option.
4057
+ * @throws {RequiredError}
4058
+ */
4059
+ async getSkillsMetadataSkillsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Skill>>> {
4060
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSkillsMetadataSkillsGet(options);
4061
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4062
+ const localVarOperationServerBasePath = operationServerMap['MetadataApi.getSkillsMetadataSkillsGet']?.[localVarOperationServerIndex]?.url;
4063
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4064
+ },
4065
+ }
4066
+ };
4067
+
4068
+ /**
4069
+ * MetadataApi - factory interface
4070
+ * @export
4071
+ */
4072
+ export const MetadataApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4073
+ const localVarFp = MetadataApiFp(configuration)
4074
+ return {
4075
+ /**
4076
+ * Get the JSON schema for Agent model with all $ref references resolved
4077
+ * @summary Get agent schema
4078
+ * @param {*} [options] Override http request option.
4079
+ * @throws {RequiredError}
4080
+ */
4081
+ getAgentSchema(options?: RawAxiosRequestConfig): AxiosPromise<any> {
4082
+ return localVarFp.getAgentSchema(options).then((request) => request(axios, basePath));
4083
+ },
4084
+ /**
4085
+ * Returns a list of all available LLM models in the system
4086
+ * @summary Get all LLM models
4087
+ * @param {*} [options] Override http request option.
4088
+ * @throws {RequiredError}
4089
+ */
4090
+ getLlmsMetadataLlmsGet(options?: RawAxiosRequestConfig): AxiosPromise<Array<LLMModelInfoWithProviderName>> {
4091
+ return localVarFp.getLlmsMetadataLlmsGet(options).then((request) => request(axios, basePath));
4092
+ },
4093
+ /**
4094
+ * Get the icon for a specific skill
4095
+ * @summary Get skill icon
4096
+ * @param {string} skill Skill name
4097
+ * @param {string} iconName Icon name
4098
+ * @param {string} ext Icon file extension
4099
+ * @param {*} [options] Override http request option.
4100
+ * @throws {RequiredError}
4101
+ */
4102
+ getSkillIcon(skill: string, iconName: string, ext: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4103
+ return localVarFp.getSkillIcon(skill, iconName, ext, options).then((request) => request(axios, basePath));
4104
+ },
4105
+ /**
4106
+ * Get the JSON schema for a specific skill
4107
+ * @summary Get skill schema
4108
+ * @param {string} skill Skill name
4109
+ * @param {*} [options] Override http request option.
4110
+ * @throws {RequiredError}
4111
+ */
4112
+ getSkillSchema(skill: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4113
+ return localVarFp.getSkillSchema(skill, options).then((request) => request(axios, basePath));
4114
+ },
4115
+ /**
4116
+ * Returns a list of all available skills in the system
4117
+ * @summary Get all skills
4118
+ * @param {*} [options] Override http request option.
4119
+ * @throws {RequiredError}
4120
+ */
4121
+ getSkillsMetadataSkillsGet(options?: RawAxiosRequestConfig): AxiosPromise<Array<Skill>> {
4122
+ return localVarFp.getSkillsMetadataSkillsGet(options).then((request) => request(axios, basePath));
4123
+ },
4124
+ };
4125
+ };
4126
+
4127
+ /**
4128
+ * MetadataApi - object-oriented interface
4129
+ * @export
4130
+ * @class MetadataApi
4131
+ * @extends {BaseAPI}
4132
+ */
4133
+ export class MetadataApi extends BaseAPI {
4134
+ /**
4135
+ * Get the JSON schema for Agent model with all $ref references resolved
4136
+ * @summary Get agent schema
4137
+ * @param {*} [options] Override http request option.
4138
+ * @throws {RequiredError}
4139
+ * @memberof MetadataApi
4140
+ */
4141
+ public getAgentSchema(options?: RawAxiosRequestConfig) {
4142
+ return MetadataApiFp(this.configuration).getAgentSchema(options).then((request) => request(this.axios, this.basePath));
4143
+ }
4144
+
4145
+ /**
4146
+ * Returns a list of all available LLM models in the system
4147
+ * @summary Get all LLM models
4148
+ * @param {*} [options] Override http request option.
4149
+ * @throws {RequiredError}
4150
+ * @memberof MetadataApi
4151
+ */
4152
+ public getLlmsMetadataLlmsGet(options?: RawAxiosRequestConfig) {
4153
+ return MetadataApiFp(this.configuration).getLlmsMetadataLlmsGet(options).then((request) => request(this.axios, this.basePath));
4154
+ }
4155
+
4156
+ /**
4157
+ * Get the icon for a specific skill
4158
+ * @summary Get skill icon
4159
+ * @param {string} skill Skill name
4160
+ * @param {string} iconName Icon name
4161
+ * @param {string} ext Icon file extension
4162
+ * @param {*} [options] Override http request option.
4163
+ * @throws {RequiredError}
4164
+ * @memberof MetadataApi
4165
+ */
4166
+ public getSkillIcon(skill: string, iconName: string, ext: string, options?: RawAxiosRequestConfig) {
4167
+ return MetadataApiFp(this.configuration).getSkillIcon(skill, iconName, ext, options).then((request) => request(this.axios, this.basePath));
4168
+ }
4169
+
4170
+ /**
4171
+ * Get the JSON schema for a specific skill
4172
+ * @summary Get skill schema
4173
+ * @param {string} skill Skill name
4174
+ * @param {*} [options] Override http request option.
4175
+ * @throws {RequiredError}
4176
+ * @memberof MetadataApi
4177
+ */
4178
+ public getSkillSchema(skill: string, options?: RawAxiosRequestConfig) {
4179
+ return MetadataApiFp(this.configuration).getSkillSchema(skill, options).then((request) => request(this.axios, this.basePath));
4180
+ }
4181
+
4182
+ /**
4183
+ * Returns a list of all available skills in the system
4184
+ * @summary Get all skills
4185
+ * @param {*} [options] Override http request option.
4186
+ * @throws {RequiredError}
4187
+ * @memberof MetadataApi
4188
+ */
4189
+ public getSkillsMetadataSkillsGet(options?: RawAxiosRequestConfig) {
4190
+ return MetadataApiFp(this.configuration).getSkillsMetadataSkillsGet(options).then((request) => request(this.axios, this.basePath));
4191
+ }
4192
+ }
4193
+
4194
+
4195
+