@crestal/nation-sdk 0.6.29 → 0.6.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.6.29
7
+ * The version of the OpenAPI document: 0.6.31
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -23,6 +23,288 @@ import type { RequestArgs } from './base';
23
23
  // @ts-ignore
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
25
 
26
+ /**
27
+ * Agent model.
28
+ * @export
29
+ * @interface Agent
30
+ */
31
+ export interface Agent {
32
+ /**
33
+ *
34
+ * @type {string}
35
+ * @memberof Agent
36
+ */
37
+ 'description'?: string | null;
38
+ /**
39
+ *
40
+ * @type {string}
41
+ * @memberof Agent
42
+ */
43
+ 'external_website'?: string | null;
44
+ /**
45
+ *
46
+ * @type {string}
47
+ * @memberof Agent
48
+ */
49
+ 'ticker'?: string | null;
50
+ /**
51
+ *
52
+ * @type {string}
53
+ * @memberof Agent
54
+ */
55
+ 'token_address'?: string | null;
56
+ /**
57
+ *
58
+ * @type {string}
59
+ * @memberof Agent
60
+ */
61
+ 'token_pool'?: string | null;
62
+ /**
63
+ *
64
+ * @type {string}
65
+ * @memberof Agent
66
+ */
67
+ 'fee_percentage'?: string | null;
68
+ /**
69
+ *
70
+ * @type {string}
71
+ * @memberof Agent
72
+ */
73
+ 'example_intro'?: string | null;
74
+ /**
75
+ *
76
+ * @type {Array<AgentExample>}
77
+ * @memberof Agent
78
+ */
79
+ 'examples'?: Array<AgentExample> | null;
80
+ /**
81
+ *
82
+ * @type {string}
83
+ * @memberof Agent
84
+ */
85
+ 'name': string | null;
86
+ /**
87
+ *
88
+ * @type {string}
89
+ * @memberof Agent
90
+ */
91
+ 'picture'?: string | null;
92
+ /**
93
+ *
94
+ * @type {string}
95
+ * @memberof Agent
96
+ */
97
+ 'purpose'?: string | null;
98
+ /**
99
+ *
100
+ * @type {string}
101
+ * @memberof Agent
102
+ */
103
+ 'personality'?: string | null;
104
+ /**
105
+ *
106
+ * @type {string}
107
+ * @memberof Agent
108
+ */
109
+ 'principles'?: string | null;
110
+ /**
111
+ * AI model identifier to be used by this agent for processing requests.
112
+ * @type {string}
113
+ * @memberof Agent
114
+ */
115
+ 'model'?: string;
116
+ /**
117
+ *
118
+ * @type {string}
119
+ * @memberof Agent
120
+ */
121
+ 'prompt'?: string | null;
122
+ /**
123
+ *
124
+ * @type {string}
125
+ * @memberof Agent
126
+ */
127
+ 'prompt_append'?: string | null;
128
+ /**
129
+ *
130
+ * @type {number}
131
+ * @memberof Agent
132
+ */
133
+ 'temperature'?: number | null;
134
+ /**
135
+ *
136
+ * @type {number}
137
+ * @memberof Agent
138
+ */
139
+ 'frequency_penalty'?: number | null;
140
+ /**
141
+ *
142
+ * @type {number}
143
+ * @memberof Agent
144
+ */
145
+ 'presence_penalty'?: number | null;
146
+ /**
147
+ *
148
+ * @type {string}
149
+ * @memberof Agent
150
+ */
151
+ 'wallet_provider'?: AgentWalletProviderEnum | null;
152
+ /**
153
+ *
154
+ * @type {string}
155
+ * @memberof Agent
156
+ */
157
+ 'readonly_wallet_address'?: string | null;
158
+ /**
159
+ *
160
+ * @type {string}
161
+ * @memberof Agent
162
+ */
163
+ 'network_id'?: AgentNetworkIdEnum | null;
164
+ /**
165
+ *
166
+ * @type {object}
167
+ * @memberof Agent
168
+ */
169
+ 'skills'?: object | null;
170
+ /**
171
+ *
172
+ * @type {string}
173
+ * @memberof Agent
174
+ */
175
+ 'short_term_memory_strategy'?: AgentShortTermMemoryStrategyEnum | null;
176
+ /**
177
+ *
178
+ * @type {Array<AgentAutonomous>}
179
+ * @memberof Agent
180
+ */
181
+ 'autonomous'?: Array<AgentAutonomous> | null;
182
+ /**
183
+ *
184
+ * @type {boolean}
185
+ * @memberof Agent
186
+ */
187
+ 'telegram_entrypoint_enabled'?: boolean | null;
188
+ /**
189
+ *
190
+ * @type {string}
191
+ * @memberof Agent
192
+ */
193
+ 'telegram_entrypoint_prompt'?: string | null;
194
+ /**
195
+ *
196
+ * @type {object}
197
+ * @memberof Agent
198
+ */
199
+ 'telegram_config'?: object | null;
200
+ /**
201
+ *
202
+ * @type {string}
203
+ * @memberof Agent
204
+ */
205
+ 'xmtp_entrypoint_prompt'?: string | null;
206
+ /**
207
+ *
208
+ * @type {string}
209
+ * @memberof Agent
210
+ */
211
+ 'upstream_id'?: string | null;
212
+ /**
213
+ *
214
+ * @type {object}
215
+ * @memberof Agent
216
+ */
217
+ 'upstream_extra'?: object | null;
218
+ /**
219
+ * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
220
+ * @type {string}
221
+ * @memberof Agent
222
+ */
223
+ 'id'?: string;
224
+ /**
225
+ *
226
+ * @type {string}
227
+ * @memberof Agent
228
+ */
229
+ 'owner'?: string | null;
230
+ /**
231
+ *
232
+ * @type {string}
233
+ * @memberof Agent
234
+ */
235
+ 'slug'?: string | null;
236
+ /**
237
+ *
238
+ * @type {string}
239
+ * @memberof Agent
240
+ */
241
+ 'version'?: string | null;
242
+ /**
243
+ *
244
+ * @type {object}
245
+ * @memberof Agent
246
+ */
247
+ 'statistics'?: object | null;
248
+ /**
249
+ *
250
+ * @type {object}
251
+ * @memberof Agent
252
+ */
253
+ 'assets'?: object | null;
254
+ /**
255
+ *
256
+ * @type {CreditAccount}
257
+ * @memberof Agent
258
+ */
259
+ 'account_snapshot'?: CreditAccount | null;
260
+ /**
261
+ *
262
+ * @type {object}
263
+ * @memberof Agent
264
+ */
265
+ 'extra'?: object | null;
266
+ /**
267
+ * Timestamp when the agent was created, will ignore when importing
268
+ * @type {string}
269
+ * @memberof Agent
270
+ */
271
+ 'created_at'?: string;
272
+ /**
273
+ * Timestamp when the agent was last updated, will ignore when importing
274
+ * @type {string}
275
+ * @memberof Agent
276
+ */
277
+ 'updated_at'?: string;
278
+ }
279
+
280
+ export const AgentWalletProviderEnum = {
281
+ Cdp: 'cdp',
282
+ Readonly: 'readonly'
283
+ } as const;
284
+
285
+ export type AgentWalletProviderEnum = typeof AgentWalletProviderEnum[keyof typeof AgentWalletProviderEnum];
286
+ export const AgentNetworkIdEnum = {
287
+ EthereumMainnet: 'ethereum-mainnet',
288
+ EthereumSepolia: 'ethereum-sepolia',
289
+ PolygonMainnet: 'polygon-mainnet',
290
+ PolygonMumbai: 'polygon-mumbai',
291
+ BaseMainnet: 'base-mainnet',
292
+ BaseSepolia: 'base-sepolia',
293
+ ArbitrumMainnet: 'arbitrum-mainnet',
294
+ ArbitrumSepolia: 'arbitrum-sepolia',
295
+ OptimismMainnet: 'optimism-mainnet',
296
+ OptimismSepolia: 'optimism-sepolia',
297
+ Solana: 'solana'
298
+ } as const;
299
+
300
+ export type AgentNetworkIdEnum = typeof AgentNetworkIdEnum[keyof typeof AgentNetworkIdEnum];
301
+ export const AgentShortTermMemoryStrategyEnum = {
302
+ Trim: 'trim',
303
+ Summarize: 'summarize'
304
+ } as const;
305
+
306
+ export type AgentShortTermMemoryStrategyEnum = typeof AgentShortTermMemoryStrategyEnum[keyof typeof AgentShortTermMemoryStrategyEnum];
307
+
26
308
  /**
27
309
  * Response model for agent API key generation.
28
310
  * @export
@@ -171,359 +453,374 @@ export interface AgentAutonomous {
171
453
  'enabled'?: boolean | null;
172
454
  }
173
455
  /**
174
- * Agent example configuration.
456
+ * Agent create model.
175
457
  * @export
176
- * @interface AgentExample
458
+ * @interface AgentCreate
177
459
  */
178
- export interface AgentExample {
460
+ export interface AgentCreate {
179
461
  /**
180
- * Name of the example
462
+ *
181
463
  * @type {string}
182
- * @memberof AgentExample
464
+ * @memberof AgentCreate
183
465
  */
184
- 'name': string;
466
+ 'name': string | null;
185
467
  /**
186
- * Description of the example
468
+ *
187
469
  * @type {string}
188
- * @memberof AgentExample
470
+ * @memberof AgentCreate
189
471
  */
190
- 'description': string;
472
+ 'picture'?: string | null;
191
473
  /**
192
- * Example prompt
474
+ *
193
475
  * @type {string}
194
- * @memberof AgentExample
476
+ * @memberof AgentCreate
195
477
  */
196
- 'prompt': string;
197
- }
198
- /**
199
- * Request model for agent generation.
200
- * @export
201
- * @interface AgentGenerateRequest
202
- */
203
- export interface AgentGenerateRequest {
478
+ 'purpose'?: string | null;
204
479
  /**
205
- * Natural language description of the agent\'s desired capabilities
480
+ *
206
481
  * @type {string}
207
- * @memberof AgentGenerateRequest
482
+ * @memberof AgentCreate
208
483
  */
209
- 'prompt': string;
484
+ 'personality'?: string | null;
210
485
  /**
211
486
  *
212
- * @type {AgentInput}
213
- * @memberof AgentGenerateRequest
487
+ * @type {string}
488
+ * @memberof AgentCreate
214
489
  */
215
- 'existing_agent'?: AgentInput | null;
490
+ 'principles'?: string | null;
216
491
  /**
217
- *
492
+ * AI model identifier to be used by this agent for processing requests.
218
493
  * @type {string}
219
- * @memberof AgentGenerateRequest
494
+ * @memberof AgentCreate
220
495
  */
221
- 'project_id'?: string | null;
496
+ 'model'?: string;
222
497
  /**
223
498
  *
224
- * @type {boolean}
225
- * @memberof AgentGenerateRequest
226
- */
227
- 'deploy'?: boolean | null;
228
- }
229
- /**
230
- * Response model for agent generation.
231
- * @export
232
- * @interface AgentGenerateResponse
233
- */
234
- export interface AgentGenerateResponse {
235
- /**
236
- * The generated agent schema
237
- * @type {object}
238
- * @memberof AgentGenerateResponse
239
- */
240
- 'agent': object;
241
- /**
242
- * Project ID for this conversation session
243
499
  * @type {string}
244
- * @memberof AgentGenerateResponse
500
+ * @memberof AgentCreate
245
501
  */
246
- 'project_id': string;
502
+ 'prompt'?: string | null;
247
503
  /**
248
- * Human-readable summary of the generated agent
504
+ *
249
505
  * @type {string}
250
- * @memberof AgentGenerateResponse
506
+ * @memberof AgentCreate
251
507
  */
252
- 'summary': string;
508
+ 'prompt_append'?: string | null;
253
509
  /**
254
- * Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}]
255
- * @type {Array<{ [key: string]: number; }>}
256
- * @memberof AgentGenerateResponse
510
+ *
511
+ * @type {number}
512
+ * @memberof AgentCreate
257
513
  */
258
- 'tags'?: Array<{ [key: string]: number; }>;
514
+ 'temperature'?: number | null;
259
515
  /**
260
516
  *
261
- * @type {Array<object>}
262
- * @memberof AgentGenerateResponse
517
+ * @type {number}
518
+ * @memberof AgentCreate
263
519
  */
264
- 'autonomous_tasks'?: Array<object> | null;
520
+ 'frequency_penalty'?: number | null;
265
521
  /**
266
522
  *
267
- * @type {Array<string>}
268
- * @memberof AgentGenerateResponse
523
+ * @type {number}
524
+ * @memberof AgentCreate
269
525
  */
270
- 'activated_skills'?: Array<string> | null;
271
- }
272
- /**
273
- * Agent model.
274
- * @export
275
- * @interface AgentInput
276
- */
277
- export interface AgentInput {
526
+ 'presence_penalty'?: number | null;
278
527
  /**
279
528
  *
280
529
  * @type {string}
281
- * @memberof AgentInput
530
+ * @memberof AgentCreate
282
531
  */
283
- 'name': string | null;
532
+ 'wallet_provider'?: AgentCreateWalletProviderEnum | null;
284
533
  /**
285
534
  *
286
535
  * @type {string}
287
- * @memberof AgentInput
536
+ * @memberof AgentCreate
288
537
  */
289
- 'slug'?: string | null;
538
+ 'readonly_wallet_address'?: string | null;
290
539
  /**
291
540
  *
292
541
  * @type {string}
293
- * @memberof AgentInput
542
+ * @memberof AgentCreate
294
543
  */
295
- 'description'?: string | null;
544
+ 'network_id'?: AgentCreateNetworkIdEnum | null;
296
545
  /**
297
546
  *
298
- * @type {string}
299
- * @memberof AgentInput
547
+ * @type {object}
548
+ * @memberof AgentCreate
300
549
  */
301
- 'external_website'?: string | null;
550
+ 'skills'?: object | null;
302
551
  /**
303
552
  *
304
553
  * @type {string}
305
- * @memberof AgentInput
554
+ * @memberof AgentCreate
306
555
  */
307
- 'picture'?: string | null;
556
+ 'short_term_memory_strategy'?: AgentCreateShortTermMemoryStrategyEnum | null;
308
557
  /**
309
558
  *
310
- * @type {string}
311
- * @memberof AgentInput
559
+ * @type {Array<AgentAutonomous>}
560
+ * @memberof AgentCreate
312
561
  */
313
- 'ticker'?: string | null;
562
+ 'autonomous'?: Array<AgentAutonomous> | null;
563
+ /**
564
+ *
565
+ * @type {boolean}
566
+ * @memberof AgentCreate
567
+ */
568
+ 'telegram_entrypoint_enabled'?: boolean | null;
314
569
  /**
315
570
  *
316
571
  * @type {string}
317
- * @memberof AgentInput
572
+ * @memberof AgentCreate
318
573
  */
319
- 'token_address'?: string | null;
574
+ 'telegram_entrypoint_prompt'?: string | null;
575
+ /**
576
+ *
577
+ * @type {object}
578
+ * @memberof AgentCreate
579
+ */
580
+ 'telegram_config'?: object | null;
320
581
  /**
321
582
  *
322
583
  * @type {string}
323
- * @memberof AgentInput
584
+ * @memberof AgentCreate
324
585
  */
325
- 'token_pool'?: string | null;
586
+ 'xmtp_entrypoint_prompt'?: string | null;
326
587
  /**
327
588
  *
328
589
  * @type {string}
329
- * @memberof AgentInput
590
+ * @memberof AgentCreate
330
591
  */
331
- 'mode'?: AgentInputModeEnum | null;
592
+ 'upstream_id'?: string | null;
332
593
  /**
333
594
  *
334
- * @type {FeePercentage}
335
- * @memberof AgentInput
595
+ * @type {object}
596
+ * @memberof AgentCreate
597
+ */
598
+ 'upstream_extra'?: object | null;
599
+ /**
600
+ * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
601
+ * @type {string}
602
+ * @memberof AgentCreate
336
603
  */
337
- 'fee_percentage'?: FeePercentage | null;
604
+ 'id'?: string;
338
605
  /**
339
606
  *
340
607
  * @type {string}
341
- * @memberof AgentInput
608
+ * @memberof AgentCreate
342
609
  */
343
- 'purpose': string | null;
610
+ 'owner'?: string | null;
611
+ }
612
+
613
+ export const AgentCreateWalletProviderEnum = {
614
+ Cdp: 'cdp',
615
+ Readonly: 'readonly'
616
+ } as const;
617
+
618
+ export type AgentCreateWalletProviderEnum = typeof AgentCreateWalletProviderEnum[keyof typeof AgentCreateWalletProviderEnum];
619
+ export const AgentCreateNetworkIdEnum = {
620
+ EthereumMainnet: 'ethereum-mainnet',
621
+ EthereumSepolia: 'ethereum-sepolia',
622
+ PolygonMainnet: 'polygon-mainnet',
623
+ PolygonMumbai: 'polygon-mumbai',
624
+ BaseMainnet: 'base-mainnet',
625
+ BaseSepolia: 'base-sepolia',
626
+ ArbitrumMainnet: 'arbitrum-mainnet',
627
+ ArbitrumSepolia: 'arbitrum-sepolia',
628
+ OptimismMainnet: 'optimism-mainnet',
629
+ OptimismSepolia: 'optimism-sepolia',
630
+ Solana: 'solana'
631
+ } as const;
632
+
633
+ export type AgentCreateNetworkIdEnum = typeof AgentCreateNetworkIdEnum[keyof typeof AgentCreateNetworkIdEnum];
634
+ export const AgentCreateShortTermMemoryStrategyEnum = {
635
+ Trim: 'trim',
636
+ Summarize: 'summarize'
637
+ } as const;
638
+
639
+ export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
640
+
641
+ /**
642
+ * Agent draft model.
643
+ * @export
644
+ * @interface AgentDraft
645
+ */
646
+ export interface AgentDraft {
344
647
  /**
345
648
  *
346
649
  * @type {string}
347
- * @memberof AgentInput
650
+ * @memberof AgentDraft
348
651
  */
349
- 'personality': string | null;
652
+ 'name': string | null;
350
653
  /**
351
654
  *
352
655
  * @type {string}
353
- * @memberof AgentInput
656
+ * @memberof AgentDraft
354
657
  */
355
- 'principles': string | null;
658
+ 'picture'?: string | null;
356
659
  /**
357
660
  *
358
661
  * @type {string}
359
- * @memberof AgentInput
662
+ * @memberof AgentDraft
360
663
  */
361
- 'owner'?: string | null;
664
+ 'purpose'?: string | null;
362
665
  /**
363
666
  *
364
667
  * @type {string}
365
- * @memberof AgentInput
668
+ * @memberof AgentDraft
366
669
  */
367
- 'upstream_id'?: string | null;
670
+ 'personality'?: string | null;
368
671
  /**
369
672
  *
370
- * @type {object}
371
- * @memberof AgentInput
673
+ * @type {string}
674
+ * @memberof AgentDraft
372
675
  */
373
- 'upstream_extra'?: object | null;
676
+ 'principles'?: string | null;
374
677
  /**
375
678
  * AI model identifier to be used by this agent for processing requests.
376
679
  * @type {string}
377
- * @memberof AgentInput
680
+ * @memberof AgentDraft
378
681
  */
379
682
  'model'?: string;
380
683
  /**
381
684
  *
382
685
  * @type {string}
383
- * @memberof AgentInput
686
+ * @memberof AgentDraft
384
687
  */
385
688
  'prompt'?: string | null;
386
689
  /**
387
690
  *
388
691
  * @type {string}
389
- * @memberof AgentInput
692
+ * @memberof AgentDraft
390
693
  */
391
694
  'prompt_append'?: string | null;
392
695
  /**
393
696
  *
394
697
  * @type {number}
395
- * @memberof AgentInput
698
+ * @memberof AgentDraft
396
699
  */
397
700
  'temperature'?: number | null;
398
701
  /**
399
702
  *
400
703
  * @type {number}
401
- * @memberof AgentInput
704
+ * @memberof AgentDraft
402
705
  */
403
706
  'frequency_penalty'?: number | null;
404
707
  /**
405
708
  *
406
709
  * @type {number}
407
- * @memberof AgentInput
710
+ * @memberof AgentDraft
408
711
  */
409
712
  'presence_penalty'?: number | null;
410
713
  /**
411
714
  *
412
715
  * @type {string}
413
- * @memberof AgentInput
716
+ * @memberof AgentDraft
414
717
  */
415
- 'short_term_memory_strategy'?: AgentInputShortTermMemoryStrategyEnum | null;
416
- /**
417
- *
418
- * @type {Array<AgentAutonomous>}
419
- * @memberof AgentInput
420
- */
421
- 'autonomous'?: Array<AgentAutonomous> | null;
718
+ 'wallet_provider'?: AgentDraftWalletProviderEnum | null;
422
719
  /**
423
720
  *
424
721
  * @type {string}
425
- * @memberof AgentInput
722
+ * @memberof AgentDraft
426
723
  */
427
- 'example_intro'?: string | null;
724
+ 'readonly_wallet_address'?: string | null;
428
725
  /**
429
726
  *
430
- * @type {Array<AgentExample>}
431
- * @memberof AgentInput
727
+ * @type {string}
728
+ * @memberof AgentDraft
432
729
  */
433
- 'examples'?: Array<AgentExample> | null;
730
+ 'network_id'?: AgentDraftNetworkIdEnum | null;
434
731
  /**
435
732
  *
436
733
  * @type {object}
437
- * @memberof AgentInput
734
+ * @memberof AgentDraft
438
735
  */
439
736
  'skills'?: object | null;
440
737
  /**
441
738
  *
442
739
  * @type {string}
443
- * @memberof AgentInput
444
- */
445
- 'wallet_provider'?: AgentInputWalletProviderEnum | null;
446
- /**
447
- *
448
- * @type {string}
449
- * @memberof AgentInput
450
- */
451
- 'readonly_wallet_address'?: string | null;
452
- /**
453
- *
454
- * @type {string}
455
- * @memberof AgentInput
740
+ * @memberof AgentDraft
456
741
  */
457
- 'network_id'?: AgentInputNetworkIdEnum | null;
742
+ 'short_term_memory_strategy'?: AgentDraftShortTermMemoryStrategyEnum | null;
458
743
  /**
459
744
  *
460
- * @type {string}
461
- * @memberof AgentInput
745
+ * @type {Array<AgentAutonomous>}
746
+ * @memberof AgentDraft
462
747
  */
463
- 'cdp_network_id'?: AgentInputCdpNetworkIdEnum | null;
748
+ 'autonomous'?: Array<AgentAutonomous> | null;
464
749
  /**
465
750
  *
466
751
  * @type {boolean}
467
- * @memberof AgentInput
752
+ * @memberof AgentDraft
468
753
  */
469
754
  'telegram_entrypoint_enabled'?: boolean | null;
470
755
  /**
471
756
  *
472
757
  * @type {string}
473
- * @memberof AgentInput
758
+ * @memberof AgentDraft
474
759
  */
475
760
  'telegram_entrypoint_prompt'?: string | null;
476
761
  /**
477
762
  *
478
763
  * @type {object}
479
- * @memberof AgentInput
764
+ * @memberof AgentDraft
480
765
  */
481
766
  'telegram_config'?: object | null;
482
767
  /**
483
768
  *
484
769
  * @type {string}
485
- * @memberof AgentInput
770
+ * @memberof AgentDraft
486
771
  */
487
772
  'xmtp_entrypoint_prompt'?: string | null;
488
773
  /**
489
- * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
774
+ * Unique identifier for the draft
490
775
  * @type {string}
491
- * @memberof AgentInput
776
+ * @memberof AgentDraft
492
777
  */
493
778
  'id'?: string;
779
+ /**
780
+ * Agent id
781
+ * @type {string}
782
+ * @memberof AgentDraft
783
+ */
784
+ 'agent_id'?: string;
785
+ /**
786
+ *
787
+ * @type {string}
788
+ * @memberof AgentDraft
789
+ */
790
+ 'owner'?: string | null;
791
+ /**
792
+ *
793
+ * @type {string}
794
+ * @memberof AgentDraft
795
+ */
796
+ 'version'?: string | null;
797
+ /**
798
+ *
799
+ * @type {string}
800
+ * @memberof AgentDraft
801
+ */
802
+ 'deployed_at'?: string | null;
494
803
  /**
495
804
  * Timestamp when the agent was created, will ignore when importing
496
805
  * @type {string}
497
- * @memberof AgentInput
806
+ * @memberof AgentDraft
498
807
  */
499
808
  'created_at'?: string;
500
809
  /**
501
810
  * Timestamp when the agent was last updated, will ignore when importing
502
811
  * @type {string}
503
- * @memberof AgentInput
812
+ * @memberof AgentDraft
504
813
  */
505
814
  'updated_at'?: string;
506
815
  }
507
816
 
508
- export const AgentInputModeEnum = {
509
- Public: 'public',
510
- Private: 'private'
511
- } as const;
512
-
513
- export type AgentInputModeEnum = typeof AgentInputModeEnum[keyof typeof AgentInputModeEnum];
514
- export const AgentInputShortTermMemoryStrategyEnum = {
515
- Trim: 'trim',
516
- Summarize: 'summarize'
517
- } as const;
518
-
519
- export type AgentInputShortTermMemoryStrategyEnum = typeof AgentInputShortTermMemoryStrategyEnum[keyof typeof AgentInputShortTermMemoryStrategyEnum];
520
- export const AgentInputWalletProviderEnum = {
817
+ export const AgentDraftWalletProviderEnum = {
521
818
  Cdp: 'cdp',
522
819
  Readonly: 'readonly'
523
820
  } as const;
524
821
 
525
- export type AgentInputWalletProviderEnum = typeof AgentInputWalletProviderEnum[keyof typeof AgentInputWalletProviderEnum];
526
- export const AgentInputNetworkIdEnum = {
822
+ export type AgentDraftWalletProviderEnum = typeof AgentDraftWalletProviderEnum[keyof typeof AgentDraftWalletProviderEnum];
823
+ export const AgentDraftNetworkIdEnum = {
527
824
  EthereumMainnet: 'ethereum-mainnet',
528
825
  EthereumSepolia: 'ethereum-sepolia',
529
826
  PolygonMainnet: 'polygon-mainnet',
@@ -537,421 +834,318 @@ export const AgentInputNetworkIdEnum = {
537
834
  Solana: 'solana'
538
835
  } as const;
539
836
 
540
- export type AgentInputNetworkIdEnum = typeof AgentInputNetworkIdEnum[keyof typeof AgentInputNetworkIdEnum];
541
- export const AgentInputCdpNetworkIdEnum = {
542
- EthereumMainnet: 'ethereum-mainnet',
543
- EthereumSepolia: 'ethereum-sepolia',
544
- PolygonMainnet: 'polygon-mainnet',
545
- PolygonMumbai: 'polygon-mumbai',
546
- BaseMainnet: 'base-mainnet',
547
- BaseSepolia: 'base-sepolia',
548
- ArbitrumMainnet: 'arbitrum-mainnet',
549
- ArbitrumSepolia: 'arbitrum-sepolia',
550
- OptimismMainnet: 'optimism-mainnet',
551
- OptimismSepolia: 'optimism-sepolia'
837
+ export type AgentDraftNetworkIdEnum = typeof AgentDraftNetworkIdEnum[keyof typeof AgentDraftNetworkIdEnum];
838
+ export const AgentDraftShortTermMemoryStrategyEnum = {
839
+ Trim: 'trim',
840
+ Summarize: 'summarize'
552
841
  } as const;
553
842
 
554
- export type AgentInputCdpNetworkIdEnum = typeof AgentInputCdpNetworkIdEnum[keyof typeof AgentInputCdpNetworkIdEnum];
843
+ export type AgentDraftShortTermMemoryStrategyEnum = typeof AgentDraftShortTermMemoryStrategyEnum[keyof typeof AgentDraftShortTermMemoryStrategyEnum];
555
844
 
556
845
  /**
557
- * Paginated response model for agents list. Contains a list of agents, a flag indicating if more items are available, and a cursor for pagination.
846
+ * Agent example configuration.
558
847
  * @export
559
- * @interface AgentListResponse
848
+ * @interface AgentExample
560
849
  */
561
- export interface AgentListResponse {
850
+ export interface AgentExample {
562
851
  /**
563
- * List of agents
564
- * @type {Array<AgentResponse>}
565
- * @memberof AgentListResponse
852
+ * Name of the example
853
+ * @type {string}
854
+ * @memberof AgentExample
566
855
  */
567
- 'data': Array<AgentResponse>;
856
+ 'name': string;
568
857
  /**
569
- * Indicates if there are more items
570
- * @type {boolean}
571
- * @memberof AgentListResponse
858
+ * Description of the example
859
+ * @type {string}
860
+ * @memberof AgentExample
572
861
  */
573
- 'has_more': boolean;
862
+ 'description': string;
574
863
  /**
575
- *
864
+ * Example prompt
576
865
  * @type {string}
577
- * @memberof AgentListResponse
866
+ * @memberof AgentExample
578
867
  */
579
- 'next_cursor'?: string | null;
868
+ 'prompt': string;
580
869
  }
581
870
  /**
582
- * Agent model.
871
+ * Request model for agent generation.
583
872
  * @export
584
- * @interface AgentOutput
873
+ * @interface AgentGenerateRequest
585
874
  */
586
- export interface AgentOutput {
875
+ export interface AgentGenerateRequest {
587
876
  /**
588
- *
877
+ * Natural language description of the agent\'s desired capabilities
589
878
  * @type {string}
590
- * @memberof AgentOutput
879
+ * @memberof AgentGenerateRequest
591
880
  */
592
- 'name': string | null;
881
+ 'prompt': string;
593
882
  /**
594
883
  *
595
- * @type {string}
596
- * @memberof AgentOutput
884
+ * @type {AgentCreate}
885
+ * @memberof AgentGenerateRequest
597
886
  */
598
- 'slug'?: string | null;
887
+ 'existing_agent'?: AgentCreate | null;
599
888
  /**
600
889
  *
601
890
  * @type {string}
602
- * @memberof AgentOutput
891
+ * @memberof AgentGenerateRequest
603
892
  */
604
- 'description'?: string | null;
893
+ 'project_id'?: string | null;
605
894
  /**
606
895
  *
607
- * @type {string}
608
- * @memberof AgentOutput
896
+ * @type {boolean}
897
+ * @memberof AgentGenerateRequest
609
898
  */
610
- 'external_website'?: string | null;
899
+ 'deploy'?: boolean | null;
900
+ }
901
+ /**
902
+ * Response model for agent generation.
903
+ * @export
904
+ * @interface AgentGenerateResponse
905
+ */
906
+ export interface AgentGenerateResponse {
611
907
  /**
612
- *
613
- * @type {string}
614
- * @memberof AgentOutput
908
+ * The generated agent schema
909
+ * @type {object}
910
+ * @memberof AgentGenerateResponse
615
911
  */
616
- 'picture'?: string | null;
912
+ 'agent': object;
617
913
  /**
618
- *
914
+ * Project ID for this conversation session
619
915
  * @type {string}
620
- * @memberof AgentOutput
916
+ * @memberof AgentGenerateResponse
621
917
  */
622
- 'ticker'?: string | null;
918
+ 'project_id': string;
623
919
  /**
624
- *
920
+ * Human-readable summary of the generated agent
625
921
  * @type {string}
626
- * @memberof AgentOutput
922
+ * @memberof AgentGenerateResponse
627
923
  */
628
- 'token_address'?: string | null;
924
+ 'summary': string;
629
925
  /**
630
- *
631
- * @type {string}
632
- * @memberof AgentOutput
926
+ * Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}]
927
+ * @type {Array<{ [key: string]: number; }>}
928
+ * @memberof AgentGenerateResponse
633
929
  */
634
- 'token_pool'?: string | null;
930
+ 'tags'?: Array<{ [key: string]: number; }>;
635
931
  /**
636
932
  *
637
- * @type {string}
638
- * @memberof AgentOutput
933
+ * @type {Array<object>}
934
+ * @memberof AgentGenerateResponse
639
935
  */
640
- 'mode'?: AgentOutputModeEnum | null;
936
+ 'autonomous_tasks'?: Array<object> | null;
641
937
  /**
642
938
  *
643
- * @type {string}
644
- * @memberof AgentOutput
939
+ * @type {Array<string>}
940
+ * @memberof AgentGenerateResponse
645
941
  */
646
- 'fee_percentage'?: string | null;
942
+ 'activated_skills'?: Array<string> | null;
943
+ }
944
+ /**
945
+ * Paginated response model for agents list. Contains a list of agents, a flag indicating if more items are available, and a cursor for pagination.
946
+ * @export
947
+ * @interface AgentListResponse
948
+ */
949
+ export interface AgentListResponse {
647
950
  /**
648
- *
649
- * @type {string}
650
- * @memberof AgentOutput
951
+ * List of agents
952
+ * @type {Array<AgentResponse>}
953
+ * @memberof AgentListResponse
651
954
  */
652
- 'purpose': string | null;
955
+ 'data': Array<AgentResponse>;
653
956
  /**
654
- *
655
- * @type {string}
656
- * @memberof AgentOutput
957
+ * Indicates if there are more items
958
+ * @type {boolean}
959
+ * @memberof AgentListResponse
657
960
  */
658
- 'personality': string | null;
961
+ 'has_more': boolean;
659
962
  /**
660
963
  *
661
964
  * @type {string}
662
- * @memberof AgentOutput
965
+ * @memberof AgentListResponse
663
966
  */
664
- 'principles': string | null;
967
+ 'next_cursor'?: string | null;
968
+ }
969
+ /**
970
+ * Response model for Agent API.
971
+ * @export
972
+ * @interface AgentResponse
973
+ */
974
+ export interface AgentResponse {
665
975
  /**
666
976
  *
667
977
  * @type {string}
668
- * @memberof AgentOutput
978
+ * @memberof AgentResponse
669
979
  */
670
- 'owner'?: string | null;
980
+ 'description'?: string | null;
671
981
  /**
672
982
  *
673
983
  * @type {string}
674
- * @memberof AgentOutput
984
+ * @memberof AgentResponse
675
985
  */
676
- 'upstream_id'?: string | null;
986
+ 'external_website'?: string | null;
677
987
  /**
678
988
  *
679
- * @type {object}
680
- * @memberof AgentOutput
681
- */
682
- 'upstream_extra'?: object | null;
683
- /**
684
- * AI model identifier to be used by this agent for processing requests.
685
989
  * @type {string}
686
- * @memberof AgentOutput
990
+ * @memberof AgentResponse
687
991
  */
688
- 'model'?: string;
992
+ 'ticker'?: string | null;
689
993
  /**
690
994
  *
691
995
  * @type {string}
692
- * @memberof AgentOutput
996
+ * @memberof AgentResponse
693
997
  */
694
- 'prompt'?: string | null;
998
+ 'token_address'?: string | null;
695
999
  /**
696
1000
  *
697
1001
  * @type {string}
698
- * @memberof AgentOutput
699
- */
700
- 'prompt_append'?: string | null;
701
- /**
702
- *
703
- * @type {number}
704
- * @memberof AgentOutput
705
- */
706
- 'temperature'?: number | null;
707
- /**
708
- *
709
- * @type {number}
710
- * @memberof AgentOutput
711
- */
712
- 'frequency_penalty'?: number | null;
713
- /**
714
- *
715
- * @type {number}
716
- * @memberof AgentOutput
1002
+ * @memberof AgentResponse
717
1003
  */
718
- 'presence_penalty'?: number | null;
1004
+ 'token_pool'?: string | null;
719
1005
  /**
720
1006
  *
721
1007
  * @type {string}
722
- * @memberof AgentOutput
723
- */
724
- 'short_term_memory_strategy'?: AgentOutputShortTermMemoryStrategyEnum | null;
725
- /**
726
- *
727
- * @type {Array<AgentAutonomous>}
728
- * @memberof AgentOutput
1008
+ * @memberof AgentResponse
729
1009
  */
730
- 'autonomous'?: Array<AgentAutonomous> | null;
1010
+ 'fee_percentage'?: string | null;
731
1011
  /**
732
1012
  *
733
1013
  * @type {string}
734
- * @memberof AgentOutput
1014
+ * @memberof AgentResponse
735
1015
  */
736
1016
  'example_intro'?: string | null;
737
1017
  /**
738
1018
  *
739
1019
  * @type {Array<AgentExample>}
740
- * @memberof AgentOutput
1020
+ * @memberof AgentResponse
741
1021
  */
742
1022
  'examples'?: Array<AgentExample> | null;
743
- /**
744
- *
745
- * @type {object}
746
- * @memberof AgentOutput
747
- */
748
- 'skills'?: object | null;
749
- /**
750
- *
751
- * @type {string}
752
- * @memberof AgentOutput
753
- */
754
- 'wallet_provider'?: AgentOutputWalletProviderEnum | null;
755
1023
  /**
756
1024
  *
757
1025
  * @type {string}
758
- * @memberof AgentOutput
1026
+ * @memberof AgentResponse
759
1027
  */
760
- 'readonly_wallet_address'?: string | null;
1028
+ 'name': string | null;
761
1029
  /**
762
1030
  *
763
1031
  * @type {string}
764
- * @memberof AgentOutput
1032
+ * @memberof AgentResponse
765
1033
  */
766
- 'network_id'?: AgentOutputNetworkIdEnum | null;
1034
+ 'picture'?: string | null;
767
1035
  /**
768
1036
  *
769
1037
  * @type {string}
770
- * @memberof AgentOutput
771
- */
772
- 'cdp_network_id'?: AgentOutputCdpNetworkIdEnum | null;
773
- /**
774
- *
775
- * @type {boolean}
776
- * @memberof AgentOutput
1038
+ * @memberof AgentResponse
777
1039
  */
778
- 'telegram_entrypoint_enabled'?: boolean | null;
1040
+ 'purpose'?: string | null;
779
1041
  /**
780
1042
  *
781
1043
  * @type {string}
782
- * @memberof AgentOutput
783
- */
784
- 'telegram_entrypoint_prompt'?: string | null;
785
- /**
786
- *
787
- * @type {object}
788
- * @memberof AgentOutput
1044
+ * @memberof AgentResponse
789
1045
  */
790
- 'telegram_config'?: object | null;
1046
+ 'personality'?: string | null;
791
1047
  /**
792
1048
  *
793
1049
  * @type {string}
794
- * @memberof AgentOutput
795
- */
796
- 'xmtp_entrypoint_prompt'?: string | null;
797
- /**
798
- * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
799
- * @type {string}
800
- * @memberof AgentOutput
1050
+ * @memberof AgentResponse
801
1051
  */
802
- 'id'?: string;
1052
+ 'principles'?: string | null;
803
1053
  /**
804
- * Timestamp when the agent was created, will ignore when importing
1054
+ * AI model identifier to be used by this agent for processing requests.
805
1055
  * @type {string}
806
- * @memberof AgentOutput
1056
+ * @memberof AgentResponse
807
1057
  */
808
- 'created_at'?: string;
1058
+ 'model'?: string;
809
1059
  /**
810
- * Timestamp when the agent was last updated, will ignore when importing
1060
+ *
811
1061
  * @type {string}
812
- * @memberof AgentOutput
1062
+ * @memberof AgentResponse
813
1063
  */
814
- 'updated_at'?: string;
815
- }
816
-
817
- export const AgentOutputModeEnum = {
818
- Public: 'public',
819
- Private: 'private'
820
- } as const;
821
-
822
- export type AgentOutputModeEnum = typeof AgentOutputModeEnum[keyof typeof AgentOutputModeEnum];
823
- export const AgentOutputShortTermMemoryStrategyEnum = {
824
- Trim: 'trim',
825
- Summarize: 'summarize'
826
- } as const;
827
-
828
- export type AgentOutputShortTermMemoryStrategyEnum = typeof AgentOutputShortTermMemoryStrategyEnum[keyof typeof AgentOutputShortTermMemoryStrategyEnum];
829
- export const AgentOutputWalletProviderEnum = {
830
- Cdp: 'cdp',
831
- Readonly: 'readonly'
832
- } as const;
833
-
834
- export type AgentOutputWalletProviderEnum = typeof AgentOutputWalletProviderEnum[keyof typeof AgentOutputWalletProviderEnum];
835
- export const AgentOutputNetworkIdEnum = {
836
- EthereumMainnet: 'ethereum-mainnet',
837
- EthereumSepolia: 'ethereum-sepolia',
838
- PolygonMainnet: 'polygon-mainnet',
839
- PolygonMumbai: 'polygon-mumbai',
840
- BaseMainnet: 'base-mainnet',
841
- BaseSepolia: 'base-sepolia',
842
- ArbitrumMainnet: 'arbitrum-mainnet',
843
- ArbitrumSepolia: 'arbitrum-sepolia',
844
- OptimismMainnet: 'optimism-mainnet',
845
- OptimismSepolia: 'optimism-sepolia',
846
- Solana: 'solana'
847
- } as const;
848
-
849
- export type AgentOutputNetworkIdEnum = typeof AgentOutputNetworkIdEnum[keyof typeof AgentOutputNetworkIdEnum];
850
- export const AgentOutputCdpNetworkIdEnum = {
851
- EthereumMainnet: 'ethereum-mainnet',
852
- EthereumSepolia: 'ethereum-sepolia',
853
- PolygonMainnet: 'polygon-mainnet',
854
- PolygonMumbai: 'polygon-mumbai',
855
- BaseMainnet: 'base-mainnet',
856
- BaseSepolia: 'base-sepolia',
857
- ArbitrumMainnet: 'arbitrum-mainnet',
858
- ArbitrumSepolia: 'arbitrum-sepolia',
859
- OptimismMainnet: 'optimism-mainnet',
860
- OptimismSepolia: 'optimism-sepolia'
861
- } as const;
862
-
863
- export type AgentOutputCdpNetworkIdEnum = typeof AgentOutputCdpNetworkIdEnum[keyof typeof AgentOutputCdpNetworkIdEnum];
864
-
865
- /**
866
- * Response model for Agent API.
867
- * @export
868
- * @interface AgentResponse
869
- */
870
- export interface AgentResponse {
1064
+ 'prompt'?: string | null;
871
1065
  /**
872
- * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
1066
+ *
873
1067
  * @type {string}
874
1068
  * @memberof AgentResponse
875
1069
  */
876
- 'id': string;
1070
+ 'prompt_append'?: string | null;
877
1071
  /**
878
- * Timestamp when the agent was created, will ignore when importing
879
- * @type {string}
1072
+ *
1073
+ * @type {number}
880
1074
  * @memberof AgentResponse
881
1075
  */
882
- 'created_at': string;
1076
+ 'temperature'?: number | null;
883
1077
  /**
884
- * Timestamp when the agent was last updated, will ignore when importing
885
- * @type {string}
1078
+ *
1079
+ * @type {number}
886
1080
  * @memberof AgentResponse
887
1081
  */
888
- 'updated_at': string;
1082
+ 'frequency_penalty'?: number | null;
889
1083
  /**
890
1084
  *
891
- * @type {string}
1085
+ * @type {number}
892
1086
  * @memberof AgentResponse
893
1087
  */
894
- 'name'?: string | null;
1088
+ 'presence_penalty'?: number | null;
895
1089
  /**
896
1090
  *
897
1091
  * @type {string}
898
1092
  * @memberof AgentResponse
899
1093
  */
900
- 'slug'?: string | null;
1094
+ 'wallet_provider'?: AgentResponseWalletProviderEnum | null;
901
1095
  /**
902
1096
  *
903
1097
  * @type {string}
904
1098
  * @memberof AgentResponse
905
1099
  */
906
- 'description'?: string | null;
1100
+ 'readonly_wallet_address'?: string | null;
907
1101
  /**
908
1102
  *
909
1103
  * @type {string}
910
1104
  * @memberof AgentResponse
911
1105
  */
912
- 'external_website'?: string | null;
1106
+ 'network_id'?: AgentResponseNetworkIdEnum | null;
913
1107
  /**
914
1108
  *
915
- * @type {string}
1109
+ * @type {object}
916
1110
  * @memberof AgentResponse
917
1111
  */
918
- 'picture'?: string | null;
1112
+ 'skills'?: object | null;
919
1113
  /**
920
1114
  *
921
1115
  * @type {string}
922
1116
  * @memberof AgentResponse
923
1117
  */
924
- 'ticker'?: string | null;
1118
+ 'short_term_memory_strategy'?: AgentResponseShortTermMemoryStrategyEnum | null;
925
1119
  /**
926
1120
  *
927
- * @type {string}
1121
+ * @type {Array<AgentAutonomous>}
928
1122
  * @memberof AgentResponse
929
1123
  */
930
- 'token_address'?: string | null;
1124
+ 'autonomous'?: Array<AgentAutonomous> | null;
931
1125
  /**
932
1126
  *
933
- * @type {string}
1127
+ * @type {boolean}
934
1128
  * @memberof AgentResponse
935
1129
  */
936
- 'token_pool'?: string | null;
1130
+ 'telegram_entrypoint_enabled'?: boolean | null;
937
1131
  /**
938
1132
  *
939
1133
  * @type {string}
940
1134
  * @memberof AgentResponse
941
1135
  */
942
- 'mode'?: AgentResponseModeEnum | null;
1136
+ 'telegram_entrypoint_prompt'?: string | null;
943
1137
  /**
944
1138
  *
945
- * @type {string}
1139
+ * @type {object}
946
1140
  * @memberof AgentResponse
947
1141
  */
948
- 'fee_percentage'?: string | null;
1142
+ 'telegram_config'?: object | null;
949
1143
  /**
950
1144
  *
951
1145
  * @type {string}
952
1146
  * @memberof AgentResponse
953
1147
  */
954
- 'owner'?: string | null;
1148
+ 'xmtp_entrypoint_prompt'?: string | null;
955
1149
  /**
956
1150
  *
957
1151
  * @type {string}
@@ -965,148 +1159,169 @@ export interface AgentResponse {
965
1159
  */
966
1160
  'upstream_extra'?: object | null;
967
1161
  /**
968
- * 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
1162
+ * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
969
1163
  * @type {string}
970
1164
  * @memberof AgentResponse
971
1165
  */
972
- 'model': string;
1166
+ 'id'?: string;
973
1167
  /**
974
1168
  *
975
- * @type {Array<object>}
1169
+ * @type {string}
976
1170
  * @memberof AgentResponse
977
1171
  */
978
- 'autonomous'?: Array<object> | null;
1172
+ 'owner'?: string | null;
979
1173
  /**
980
1174
  *
981
1175
  * @type {string}
982
1176
  * @memberof AgentResponse
983
1177
  */
984
- 'example_intro'?: string | null;
1178
+ 'slug'?: string | null;
985
1179
  /**
986
1180
  *
987
- * @type {Array<AgentExample>}
1181
+ * @type {string}
988
1182
  * @memberof AgentResponse
989
1183
  */
990
- 'examples'?: Array<AgentExample> | null;
1184
+ 'version'?: string | null;
991
1185
  /**
992
1186
  *
993
1187
  * @type {object}
994
1188
  * @memberof AgentResponse
995
1189
  */
996
- 'skills'?: object | null;
1190
+ 'statistics'?: object | null;
997
1191
  /**
998
1192
  *
999
- * @type {string}
1193
+ * @type {object}
1000
1194
  * @memberof AgentResponse
1001
1195
  */
1002
- 'wallet_provider'?: AgentResponseWalletProviderEnum | null;
1196
+ 'assets'?: object | null;
1003
1197
  /**
1004
1198
  *
1005
- * @type {string}
1199
+ * @type {CreditAccount}
1006
1200
  * @memberof AgentResponse
1007
1201
  */
1008
- 'network_id'?: string | null;
1202
+ 'account_snapshot'?: CreditAccount | null;
1009
1203
  /**
1010
1204
  *
1205
+ * @type {object}
1206
+ * @memberof AgentResponse
1207
+ */
1208
+ 'extra'?: object | null;
1209
+ /**
1210
+ * Timestamp when the agent was created, will ignore when importing
1011
1211
  * @type {string}
1012
1212
  * @memberof AgentResponse
1013
1213
  */
1014
- 'cdp_network_id'?: string | null;
1214
+ 'created_at'?: string;
1015
1215
  /**
1016
- *
1017
- * @type {boolean}
1216
+ * Timestamp when the agent was last updated, will ignore when importing
1217
+ * @type {string}
1018
1218
  * @memberof AgentResponse
1019
1219
  */
1020
- 'telegram_entrypoint_enabled'?: boolean | null;
1220
+ 'updated_at'?: string;
1021
1221
  /**
1022
1222
  *
1023
1223
  * @type {string}
1024
1224
  * @memberof AgentResponse
1025
1225
  */
1026
- 'cdp_wallet_address': string | null;
1226
+ 'cdp_wallet_address'?: string | null;
1027
1227
  /**
1028
1228
  *
1029
1229
  * @type {string}
1030
1230
  * @memberof AgentResponse
1031
1231
  */
1032
- 'evm_wallet_address': string | null;
1232
+ 'evm_wallet_address'?: string | null;
1033
1233
  /**
1034
1234
  *
1035
1235
  * @type {string}
1036
1236
  * @memberof AgentResponse
1037
1237
  */
1038
- 'solana_wallet_address': string | null;
1238
+ 'solana_wallet_address'?: string | null;
1039
1239
  /**
1040
1240
  * Whether the agent has linked their Twitter account
1041
1241
  * @type {boolean}
1042
1242
  * @memberof AgentResponse
1043
1243
  */
1044
- 'has_twitter_linked': boolean;
1244
+ 'has_twitter_linked'?: boolean;
1045
1245
  /**
1046
1246
  *
1047
1247
  * @type {string}
1048
1248
  * @memberof AgentResponse
1049
1249
  */
1050
- 'linked_twitter_username': string | null;
1250
+ 'linked_twitter_username'?: string | null;
1051
1251
  /**
1052
1252
  *
1053
1253
  * @type {string}
1054
1254
  * @memberof AgentResponse
1055
1255
  */
1056
- 'linked_twitter_name': string | null;
1256
+ 'linked_twitter_name'?: string | null;
1057
1257
  /**
1058
1258
  * Whether the agent has self-keyed their Twitter account
1059
1259
  * @type {boolean}
1060
1260
  * @memberof AgentResponse
1061
1261
  */
1062
- 'has_twitter_self_key': boolean;
1262
+ 'has_twitter_self_key'?: boolean;
1063
1263
  /**
1064
1264
  * Whether the agent has self-keyed their Telegram account
1065
1265
  * @type {boolean}
1066
1266
  * @memberof AgentResponse
1067
1267
  */
1068
- 'has_telegram_self_key': boolean;
1268
+ 'has_telegram_self_key'?: boolean;
1069
1269
  /**
1070
1270
  *
1071
1271
  * @type {string}
1072
1272
  * @memberof AgentResponse
1073
1273
  */
1074
- 'linked_telegram_username': string | null;
1274
+ 'linked_telegram_username'?: string | null;
1075
1275
  /**
1076
1276
  *
1077
1277
  * @type {string}
1078
1278
  * @memberof AgentResponse
1079
1279
  */
1080
- 'linked_telegram_name': string | null;
1280
+ 'linked_telegram_name'?: string | null;
1081
1281
  /**
1082
1282
  * Whether the agent accepts image inputs in public mode
1083
1283
  * @type {boolean}
1084
1284
  * @memberof AgentResponse
1085
1285
  */
1086
- 'accept_image_input': boolean;
1286
+ 'accept_image_input'?: boolean;
1087
1287
  /**
1088
1288
  * Whether the agent accepts image inputs in private mode
1089
1289
  * @type {boolean}
1090
1290
  * @memberof AgentResponse
1091
1291
  */
1092
- 'accept_image_input_private': boolean;
1292
+ 'accept_image_input_private'?: boolean;
1093
1293
  }
1094
1294
 
1095
- export const AgentResponseModeEnum = {
1096
- Public: 'public',
1097
- Private: 'private'
1098
- } as const;
1099
-
1100
- export type AgentResponseModeEnum = typeof AgentResponseModeEnum[keyof typeof AgentResponseModeEnum];
1101
1295
  export const AgentResponseWalletProviderEnum = {
1102
1296
  Cdp: 'cdp',
1103
1297
  Readonly: 'readonly'
1104
1298
  } as const;
1105
1299
 
1106
1300
  export type AgentResponseWalletProviderEnum = typeof AgentResponseWalletProviderEnum[keyof typeof AgentResponseWalletProviderEnum];
1301
+ export const AgentResponseNetworkIdEnum = {
1302
+ EthereumMainnet: 'ethereum-mainnet',
1303
+ EthereumSepolia: 'ethereum-sepolia',
1304
+ PolygonMainnet: 'polygon-mainnet',
1305
+ PolygonMumbai: 'polygon-mumbai',
1306
+ BaseMainnet: 'base-mainnet',
1307
+ BaseSepolia: 'base-sepolia',
1308
+ ArbitrumMainnet: 'arbitrum-mainnet',
1309
+ ArbitrumSepolia: 'arbitrum-sepolia',
1310
+ OptimismMainnet: 'optimism-mainnet',
1311
+ OptimismSepolia: 'optimism-sepolia',
1312
+ Solana: 'solana'
1313
+ } as const;
1107
1314
 
1108
- /**
1109
- * Sort options for agents list.
1315
+ export type AgentResponseNetworkIdEnum = typeof AgentResponseNetworkIdEnum[keyof typeof AgentResponseNetworkIdEnum];
1316
+ export const AgentResponseShortTermMemoryStrategyEnum = {
1317
+ Trim: 'trim',
1318
+ Summarize: 'summarize'
1319
+ } as const;
1320
+
1321
+ export type AgentResponseShortTermMemoryStrategyEnum = typeof AgentResponseShortTermMemoryStrategyEnum[keyof typeof AgentResponseShortTermMemoryStrategyEnum];
1322
+
1323
+ /**
1324
+ * Sort options for agents list.
1110
1325
  * @export
1111
1326
  * @enum {string}
1112
1327
  */
@@ -1234,226 +1449,304 @@ export interface AgentUpdate {
1234
1449
  * @type {string}
1235
1450
  * @memberof AgentUpdate
1236
1451
  */
1237
- 'slug'?: string | null;
1452
+ 'picture'?: string | null;
1238
1453
  /**
1239
1454
  *
1240
1455
  * @type {string}
1241
1456
  * @memberof AgentUpdate
1242
1457
  */
1243
- 'description'?: string | null;
1458
+ 'purpose'?: string | null;
1244
1459
  /**
1245
1460
  *
1246
1461
  * @type {string}
1247
1462
  * @memberof AgentUpdate
1248
1463
  */
1249
- 'external_website'?: string | null;
1464
+ 'personality'?: string | null;
1250
1465
  /**
1251
1466
  *
1252
1467
  * @type {string}
1253
1468
  * @memberof AgentUpdate
1254
1469
  */
1255
- 'picture'?: string | null;
1470
+ 'principles'?: string | null;
1256
1471
  /**
1257
- *
1472
+ * AI model identifier to be used by this agent for processing requests.
1258
1473
  * @type {string}
1259
1474
  * @memberof AgentUpdate
1260
1475
  */
1261
- 'ticker'?: string | null;
1476
+ 'model'?: string;
1262
1477
  /**
1263
1478
  *
1264
1479
  * @type {string}
1265
1480
  * @memberof AgentUpdate
1266
1481
  */
1267
- 'token_address'?: string | null;
1482
+ 'prompt'?: string | null;
1268
1483
  /**
1269
1484
  *
1270
1485
  * @type {string}
1271
1486
  * @memberof AgentUpdate
1272
1487
  */
1273
- 'token_pool'?: string | null;
1488
+ 'prompt_append'?: string | null;
1274
1489
  /**
1275
1490
  *
1276
- * @type {string}
1491
+ * @type {number}
1277
1492
  * @memberof AgentUpdate
1278
1493
  */
1279
- 'mode'?: AgentUpdateModeEnum | null;
1494
+ 'temperature'?: number | null;
1280
1495
  /**
1281
1496
  *
1282
- * @type {FeePercentage}
1497
+ * @type {number}
1283
1498
  * @memberof AgentUpdate
1284
1499
  */
1285
- 'fee_percentage'?: FeePercentage | null;
1500
+ 'frequency_penalty'?: number | null;
1286
1501
  /**
1287
1502
  *
1288
- * @type {string}
1503
+ * @type {number}
1289
1504
  * @memberof AgentUpdate
1290
1505
  */
1291
- 'purpose': string | null;
1506
+ 'presence_penalty'?: number | null;
1292
1507
  /**
1293
1508
  *
1294
1509
  * @type {string}
1295
1510
  * @memberof AgentUpdate
1296
1511
  */
1297
- 'personality': string | null;
1512
+ 'wallet_provider'?: AgentUpdateWalletProviderEnum | null;
1298
1513
  /**
1299
1514
  *
1300
1515
  * @type {string}
1301
1516
  * @memberof AgentUpdate
1302
1517
  */
1303
- 'principles': string | null;
1518
+ 'readonly_wallet_address'?: string | null;
1304
1519
  /**
1305
1520
  *
1306
1521
  * @type {string}
1307
1522
  * @memberof AgentUpdate
1308
1523
  */
1309
- 'owner'?: string | null;
1524
+ 'network_id'?: AgentUpdateNetworkIdEnum | null;
1525
+ /**
1526
+ *
1527
+ * @type {object}
1528
+ * @memberof AgentUpdate
1529
+ */
1530
+ 'skills'?: object | null;
1310
1531
  /**
1311
1532
  *
1312
1533
  * @type {string}
1313
1534
  * @memberof AgentUpdate
1314
1535
  */
1315
- 'upstream_id'?: string | null;
1536
+ 'short_term_memory_strategy'?: AgentUpdateShortTermMemoryStrategyEnum | null;
1316
1537
  /**
1317
1538
  *
1318
- * @type {object}
1539
+ * @type {Array<AgentAutonomous>}
1319
1540
  * @memberof AgentUpdate
1320
1541
  */
1321
- 'upstream_extra'?: object | null;
1542
+ 'autonomous'?: Array<AgentAutonomous> | null;
1322
1543
  /**
1323
- * AI model identifier to be used by this agent for processing requests.
1324
- * @type {string}
1544
+ *
1545
+ * @type {boolean}
1325
1546
  * @memberof AgentUpdate
1326
1547
  */
1327
- 'model'?: string;
1548
+ 'telegram_entrypoint_enabled'?: boolean | null;
1328
1549
  /**
1329
1550
  *
1330
1551
  * @type {string}
1331
1552
  * @memberof AgentUpdate
1332
1553
  */
1333
- 'prompt'?: string | null;
1554
+ 'telegram_entrypoint_prompt'?: string | null;
1334
1555
  /**
1335
1556
  *
1336
- * @type {string}
1557
+ * @type {object}
1337
1558
  * @memberof AgentUpdate
1338
1559
  */
1339
- 'prompt_append'?: string | null;
1560
+ 'telegram_config'?: object | null;
1340
1561
  /**
1341
1562
  *
1342
- * @type {number}
1563
+ * @type {string}
1343
1564
  * @memberof AgentUpdate
1344
1565
  */
1345
- 'temperature'?: number | null;
1566
+ 'xmtp_entrypoint_prompt'?: string | null;
1346
1567
  /**
1347
1568
  *
1348
- * @type {number}
1569
+ * @type {string}
1349
1570
  * @memberof AgentUpdate
1350
1571
  */
1351
- 'frequency_penalty'?: number | null;
1572
+ 'upstream_id'?: string | null;
1352
1573
  /**
1353
1574
  *
1354
- * @type {number}
1575
+ * @type {object}
1355
1576
  * @memberof AgentUpdate
1356
1577
  */
1357
- 'presence_penalty'?: number | null;
1578
+ 'upstream_extra'?: object | null;
1579
+ }
1580
+
1581
+ export const AgentUpdateWalletProviderEnum = {
1582
+ Cdp: 'cdp',
1583
+ Readonly: 'readonly'
1584
+ } as const;
1585
+
1586
+ export type AgentUpdateWalletProviderEnum = typeof AgentUpdateWalletProviderEnum[keyof typeof AgentUpdateWalletProviderEnum];
1587
+ export const AgentUpdateNetworkIdEnum = {
1588
+ EthereumMainnet: 'ethereum-mainnet',
1589
+ EthereumSepolia: 'ethereum-sepolia',
1590
+ PolygonMainnet: 'polygon-mainnet',
1591
+ PolygonMumbai: 'polygon-mumbai',
1592
+ BaseMainnet: 'base-mainnet',
1593
+ BaseSepolia: 'base-sepolia',
1594
+ ArbitrumMainnet: 'arbitrum-mainnet',
1595
+ ArbitrumSepolia: 'arbitrum-sepolia',
1596
+ OptimismMainnet: 'optimism-mainnet',
1597
+ OptimismSepolia: 'optimism-sepolia',
1598
+ Solana: 'solana'
1599
+ } as const;
1600
+
1601
+ export type AgentUpdateNetworkIdEnum = typeof AgentUpdateNetworkIdEnum[keyof typeof AgentUpdateNetworkIdEnum];
1602
+ export const AgentUpdateShortTermMemoryStrategyEnum = {
1603
+ Trim: 'trim',
1604
+ Summarize: 'summarize'
1605
+ } as const;
1606
+
1607
+ export type AgentUpdateShortTermMemoryStrategyEnum = typeof AgentUpdateShortTermMemoryStrategyEnum[keyof typeof AgentUpdateShortTermMemoryStrategyEnum];
1608
+
1609
+ /**
1610
+ * Agent update model.
1611
+ * @export
1612
+ * @interface AgentUserInput
1613
+ */
1614
+ export interface AgentUserInput {
1358
1615
  /**
1359
1616
  *
1360
1617
  * @type {string}
1361
- * @memberof AgentUpdate
1618
+ * @memberof AgentUserInput
1362
1619
  */
1363
- 'short_term_memory_strategy'?: AgentUpdateShortTermMemoryStrategyEnum | null;
1620
+ 'name': string | null;
1364
1621
  /**
1365
1622
  *
1366
- * @type {Array<AgentAutonomous>}
1367
- * @memberof AgentUpdate
1623
+ * @type {string}
1624
+ * @memberof AgentUserInput
1368
1625
  */
1369
- 'autonomous'?: Array<AgentAutonomous> | null;
1626
+ 'picture'?: string | null;
1370
1627
  /**
1371
1628
  *
1372
1629
  * @type {string}
1373
- * @memberof AgentUpdate
1630
+ * @memberof AgentUserInput
1374
1631
  */
1375
- 'example_intro'?: string | null;
1632
+ 'purpose'?: string | null;
1376
1633
  /**
1377
1634
  *
1378
- * @type {Array<AgentExample>}
1379
- * @memberof AgentUpdate
1635
+ * @type {string}
1636
+ * @memberof AgentUserInput
1380
1637
  */
1381
- 'examples'?: Array<AgentExample> | null;
1638
+ 'personality'?: string | null;
1382
1639
  /**
1383
1640
  *
1384
- * @type {object}
1385
- * @memberof AgentUpdate
1641
+ * @type {string}
1642
+ * @memberof AgentUserInput
1386
1643
  */
1387
- 'skills'?: object | null;
1644
+ 'principles'?: string | null;
1645
+ /**
1646
+ * AI model identifier to be used by this agent for processing requests.
1647
+ * @type {string}
1648
+ * @memberof AgentUserInput
1649
+ */
1650
+ 'model'?: string;
1388
1651
  /**
1389
1652
  *
1390
1653
  * @type {string}
1391
- * @memberof AgentUpdate
1654
+ * @memberof AgentUserInput
1392
1655
  */
1393
- 'wallet_provider'?: AgentUpdateWalletProviderEnum | null;
1656
+ 'prompt'?: string | null;
1394
1657
  /**
1395
1658
  *
1396
1659
  * @type {string}
1397
- * @memberof AgentUpdate
1660
+ * @memberof AgentUserInput
1661
+ */
1662
+ 'prompt_append'?: string | null;
1663
+ /**
1664
+ *
1665
+ * @type {number}
1666
+ * @memberof AgentUserInput
1667
+ */
1668
+ 'temperature'?: number | null;
1669
+ /**
1670
+ *
1671
+ * @type {number}
1672
+ * @memberof AgentUserInput
1673
+ */
1674
+ 'frequency_penalty'?: number | null;
1675
+ /**
1676
+ *
1677
+ * @type {number}
1678
+ * @memberof AgentUserInput
1679
+ */
1680
+ 'presence_penalty'?: number | null;
1681
+ /**
1682
+ *
1683
+ * @type {string}
1684
+ * @memberof AgentUserInput
1685
+ */
1686
+ 'wallet_provider'?: AgentUserInputWalletProviderEnum | null;
1687
+ /**
1688
+ *
1689
+ * @type {string}
1690
+ * @memberof AgentUserInput
1398
1691
  */
1399
1692
  'readonly_wallet_address'?: string | null;
1400
1693
  /**
1401
1694
  *
1402
1695
  * @type {string}
1403
- * @memberof AgentUpdate
1696
+ * @memberof AgentUserInput
1404
1697
  */
1405
- 'network_id'?: AgentUpdateNetworkIdEnum | null;
1698
+ 'network_id'?: AgentUserInputNetworkIdEnum | null;
1699
+ /**
1700
+ *
1701
+ * @type {object}
1702
+ * @memberof AgentUserInput
1703
+ */
1704
+ 'skills'?: object | null;
1406
1705
  /**
1407
1706
  *
1408
1707
  * @type {string}
1409
- * @memberof AgentUpdate
1708
+ * @memberof AgentUserInput
1709
+ */
1710
+ 'short_term_memory_strategy'?: AgentUserInputShortTermMemoryStrategyEnum | null;
1711
+ /**
1712
+ *
1713
+ * @type {Array<AgentAutonomous>}
1714
+ * @memberof AgentUserInput
1410
1715
  */
1411
- 'cdp_network_id'?: AgentUpdateCdpNetworkIdEnum | null;
1716
+ 'autonomous'?: Array<AgentAutonomous> | null;
1412
1717
  /**
1413
1718
  *
1414
1719
  * @type {boolean}
1415
- * @memberof AgentUpdate
1720
+ * @memberof AgentUserInput
1416
1721
  */
1417
1722
  'telegram_entrypoint_enabled'?: boolean | null;
1418
1723
  /**
1419
1724
  *
1420
1725
  * @type {string}
1421
- * @memberof AgentUpdate
1726
+ * @memberof AgentUserInput
1422
1727
  */
1423
1728
  'telegram_entrypoint_prompt'?: string | null;
1424
1729
  /**
1425
1730
  *
1426
1731
  * @type {object}
1427
- * @memberof AgentUpdate
1732
+ * @memberof AgentUserInput
1428
1733
  */
1429
1734
  'telegram_config'?: object | null;
1430
1735
  /**
1431
1736
  *
1432
1737
  * @type {string}
1433
- * @memberof AgentUpdate
1738
+ * @memberof AgentUserInput
1434
1739
  */
1435
1740
  'xmtp_entrypoint_prompt'?: string | null;
1436
1741
  }
1437
1742
 
1438
- export const AgentUpdateModeEnum = {
1439
- Public: 'public',
1440
- Private: 'private'
1441
- } as const;
1442
-
1443
- export type AgentUpdateModeEnum = typeof AgentUpdateModeEnum[keyof typeof AgentUpdateModeEnum];
1444
- export const AgentUpdateShortTermMemoryStrategyEnum = {
1445
- Trim: 'trim',
1446
- Summarize: 'summarize'
1447
- } as const;
1448
-
1449
- export type AgentUpdateShortTermMemoryStrategyEnum = typeof AgentUpdateShortTermMemoryStrategyEnum[keyof typeof AgentUpdateShortTermMemoryStrategyEnum];
1450
- export const AgentUpdateWalletProviderEnum = {
1743
+ export const AgentUserInputWalletProviderEnum = {
1451
1744
  Cdp: 'cdp',
1452
1745
  Readonly: 'readonly'
1453
1746
  } as const;
1454
1747
 
1455
- export type AgentUpdateWalletProviderEnum = typeof AgentUpdateWalletProviderEnum[keyof typeof AgentUpdateWalletProviderEnum];
1456
- export const AgentUpdateNetworkIdEnum = {
1748
+ export type AgentUserInputWalletProviderEnum = typeof AgentUserInputWalletProviderEnum[keyof typeof AgentUserInputWalletProviderEnum];
1749
+ export const AgentUserInputNetworkIdEnum = {
1457
1750
  EthereumMainnet: 'ethereum-mainnet',
1458
1751
  EthereumSepolia: 'ethereum-sepolia',
1459
1752
  PolygonMainnet: 'polygon-mainnet',
@@ -1467,21 +1760,13 @@ export const AgentUpdateNetworkIdEnum = {
1467
1760
  Solana: 'solana'
1468
1761
  } as const;
1469
1762
 
1470
- export type AgentUpdateNetworkIdEnum = typeof AgentUpdateNetworkIdEnum[keyof typeof AgentUpdateNetworkIdEnum];
1471
- export const AgentUpdateCdpNetworkIdEnum = {
1472
- EthereumMainnet: 'ethereum-mainnet',
1473
- EthereumSepolia: 'ethereum-sepolia',
1474
- PolygonMainnet: 'polygon-mainnet',
1475
- PolygonMumbai: 'polygon-mumbai',
1476
- BaseMainnet: 'base-mainnet',
1477
- BaseSepolia: 'base-sepolia',
1478
- ArbitrumMainnet: 'arbitrum-mainnet',
1479
- ArbitrumSepolia: 'arbitrum-sepolia',
1480
- OptimismMainnet: 'optimism-mainnet',
1481
- OptimismSepolia: 'optimism-sepolia'
1763
+ export type AgentUserInputNetworkIdEnum = typeof AgentUserInputNetworkIdEnum[keyof typeof AgentUserInputNetworkIdEnum];
1764
+ export const AgentUserInputShortTermMemoryStrategyEnum = {
1765
+ Trim: 'trim',
1766
+ Summarize: 'summarize'
1482
1767
  } as const;
1483
1768
 
1484
- export type AgentUpdateCdpNetworkIdEnum = typeof AgentUpdateCdpNetworkIdEnum[keyof typeof AgentUpdateCdpNetworkIdEnum];
1769
+ export type AgentUserInputShortTermMemoryStrategyEnum = typeof AgentUserInputShortTermMemoryStrategyEnum[keyof typeof AgentUserInputShortTermMemoryStrategyEnum];
1485
1770
 
1486
1771
  /**
1487
1772
  * Model for individual asset with symbol and balance.
@@ -2796,13 +3081,6 @@ export const EventType = {
2796
3081
  export type EventType = typeof EventType[keyof typeof EventType];
2797
3082
 
2798
3083
 
2799
- /**
2800
- * Fee percentage of the agent
2801
- * @export
2802
- * @interface FeePercentage
2803
- */
2804
- export interface FeePercentage {
2805
- }
2806
3084
  /**
2807
3085
  * Response model for single generation detail.
2808
3086
  * @export
@@ -3708,48 +3986,6 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
3708
3986
  options: localVarRequestOptions,
3709
3987
  };
3710
3988
  },
3711
- /**
3712
- * Update an existing agent. Use input to update agent configuration. If some fields are not provided, they will not be changed. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
3713
- * @summary Update Agent
3714
- * @param {string} agentId ID of the agent to update
3715
- * @param {AgentUpdate} [agentUpdate]
3716
- * @param {*} [options] Override http request option.
3717
- * @throws {RequiredError}
3718
- */
3719
- updateAgent: async (agentId: string, agentUpdate?: AgentUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3720
- // verify required parameter 'agentId' is not null or undefined
3721
- assertParamExists('updateAgent', 'agentId', agentId)
3722
- const localVarPath = `/agents/{agent_id}`
3723
- .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
3724
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
3725
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3726
- let baseOptions;
3727
- if (configuration) {
3728
- baseOptions = configuration.baseOptions;
3729
- }
3730
-
3731
- const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
3732
- const localVarHeaderParameter = {} as any;
3733
- const localVarQueryParameter = {} as any;
3734
-
3735
- // authentication HTTPBearer required
3736
- // http bearer authentication required
3737
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
3738
-
3739
-
3740
-
3741
- localVarHeaderParameter['Content-Type'] = 'application/json';
3742
-
3743
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3744
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3745
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3746
- localVarRequestOptions.data = serializeDataIfNeeded(agentUpdate, localVarRequestOptions, configuration)
3747
-
3748
- return {
3749
- url: toPathString(localVarUrlObj),
3750
- options: localVarRequestOptions,
3751
- };
3752
- },
3753
3989
  /**
3754
3990
  * Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
3755
3991
  * @summary Validate Agent Create
@@ -3873,7 +4109,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
3873
4109
  * @param {*} [options] Override http request option.
3874
4110
  * @throws {RequiredError}
3875
4111
  */
3876
- async getAgent(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
4112
+ async getAgent(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>> {
3877
4113
  const localVarAxiosArgs = await localVarAxiosParamCreator.getAgent(agentId, options);
3878
4114
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3879
4115
  const localVarOperationServerBasePath = operationServerMap['AgentApi.getAgent']?.[localVarOperationServerIndex]?.url;
@@ -3970,7 +4206,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
3970
4206
  * @param {*} [options] Override http request option.
3971
4207
  * @throws {RequiredError}
3972
4208
  */
3973
- async overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
4209
+ async overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>> {
3974
4210
  const localVarAxiosArgs = await localVarAxiosParamCreator.overrideAgent(agentId, agentUpdate, options);
3975
4211
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3976
4212
  const localVarOperationServerBasePath = operationServerMap['AgentApi.overrideAgent']?.[localVarOperationServerIndex]?.url;
@@ -3989,20 +4225,6 @@ export const AgentApiFp = function(configuration?: Configuration) {
3989
4225
  const localVarOperationServerBasePath = operationServerMap['AgentApi.resetAgentApiKey']?.[localVarOperationServerIndex]?.url;
3990
4226
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3991
4227
  },
3992
- /**
3993
- * Update an existing agent. Use input to update agent configuration. If some fields are not provided, they will not be changed. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
3994
- * @summary Update Agent
3995
- * @param {string} agentId ID of the agent to update
3996
- * @param {AgentUpdate} [agentUpdate]
3997
- * @param {*} [options] Override http request option.
3998
- * @throws {RequiredError}
3999
- */
4000
- async updateAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
4001
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateAgent(agentId, agentUpdate, options);
4002
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4003
- const localVarOperationServerBasePath = operationServerMap['AgentApi.updateAgent']?.[localVarOperationServerIndex]?.url;
4004
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4005
- },
4006
4228
  /**
4007
4229
  * Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
4008
4230
  * @summary Validate Agent Create
@@ -4067,7 +4289,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
4067
4289
  * @param {*} [options] Override http request option.
4068
4290
  * @throws {RequiredError}
4069
4291
  */
4070
- getAgent(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4292
+ getAgent(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
4071
4293
  return localVarFp.getAgent(agentId, options).then((request) => request(axios, basePath));
4072
4294
  },
4073
4295
  /**
@@ -4143,7 +4365,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
4143
4365
  * @param {*} [options] Override http request option.
4144
4366
  * @throws {RequiredError}
4145
4367
  */
4146
- overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4368
+ overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
4147
4369
  return localVarFp.overrideAgent(agentId, agentUpdate, options).then((request) => request(axios, basePath));
4148
4370
  },
4149
4371
  /**
@@ -4156,17 +4378,6 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
4156
4378
  resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentApiKeyResponse> {
4157
4379
  return localVarFp.resetAgentApiKey(agentId, options).then((request) => request(axios, basePath));
4158
4380
  },
4159
- /**
4160
- * Update an existing agent. Use input to update agent configuration. If some fields are not provided, they will not be changed. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
4161
- * @summary Update Agent
4162
- * @param {string} agentId ID of the agent to update
4163
- * @param {AgentUpdate} [agentUpdate]
4164
- * @param {*} [options] Override http request option.
4165
- * @throws {RequiredError}
4166
- */
4167
- updateAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4168
- return localVarFp.updateAgent(agentId, agentUpdate, options).then((request) => request(axios, basePath));
4169
- },
4170
4381
  /**
4171
4382
  * Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
4172
4383
  * @summary Validate Agent Create
@@ -4337,28 +4548,15 @@ export class AgentApi extends BaseAPI {
4337
4548
  }
4338
4549
 
4339
4550
  /**
4340
- * Update an existing agent. Use input to update agent configuration. If some fields are not provided, they will not be changed. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
4341
- * @summary Update Agent
4342
- * @param {string} agentId ID of the agent to update
4551
+ * Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
4552
+ * @summary Validate Agent Create
4343
4553
  * @param {AgentUpdate} [agentUpdate]
4344
4554
  * @param {*} [options] Override http request option.
4345
4555
  * @throws {RequiredError}
4346
4556
  * @memberof AgentApi
4347
4557
  */
4348
- public updateAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig) {
4349
- return AgentApiFp(this.configuration).updateAgent(agentId, agentUpdate, options).then((request) => request(this.axios, this.basePath));
4350
- }
4351
-
4352
- /**
4353
- * Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
4354
- * @summary Validate Agent Create
4355
- * @param {AgentUpdate} [agentUpdate]
4356
- * @param {*} [options] Override http request option.
4357
- * @throws {RequiredError}
4358
- * @memberof AgentApi
4359
- */
4360
- public validateAgentCreate(agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig) {
4361
- return AgentApiFp(this.configuration).validateAgentCreate(agentUpdate, options).then((request) => request(this.axios, this.basePath));
4558
+ public validateAgentCreate(agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig) {
4559
+ return AgentApiFp(this.configuration).validateAgentCreate(agentUpdate, options).then((request) => request(this.axios, this.basePath));
4362
4560
  }
4363
4561
 
4364
4562
  /**
@@ -5208,54 +5406,516 @@ export class ChatApi extends BaseAPI {
5208
5406
  }
5209
5407
 
5210
5408
  /**
5211
- * Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. If the stream mode is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
5212
- * @summary Send a message to a chat thread
5213
- * @param {string} aid Agent ID
5214
- * @param {string} chatId Chat ID
5215
- * @param {ChatMessageRequest} chatMessageRequest
5409
+ * Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. If the stream mode is requested, the response will be a Server-Sent Events (SSE) stream with event type \'message\'.
5410
+ * @summary Send a message to a chat thread
5411
+ * @param {string} aid Agent ID
5412
+ * @param {string} chatId Chat ID
5413
+ * @param {ChatMessageRequest} chatMessageRequest
5414
+ * @param {*} [options] Override http request option.
5415
+ * @throws {RequiredError}
5416
+ * @memberof ChatApi
5417
+ */
5418
+ public sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
5419
+ return ChatApiFp(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
5420
+ }
5421
+
5422
+ /**
5423
+ * Update details of a specific chat thread. Currently only supports updating the summary.
5424
+ * @summary Update a chat thread
5425
+ * @param {string} aid Agent ID
5426
+ * @param {string} chatId Chat ID
5427
+ * @param {ChatUpdateRequest} chatUpdateRequest
5428
+ * @param {*} [options] Override http request option.
5429
+ * @throws {RequiredError}
5430
+ * @memberof ChatApi
5431
+ */
5432
+ public updateChatThread(aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options?: RawAxiosRequestConfig) {
5433
+ return ChatApiFp(this.configuration).updateChatThread(aid, chatId, chatUpdateRequest, options).then((request) => request(this.axios, this.basePath));
5434
+ }
5435
+ }
5436
+
5437
+
5438
+
5439
+ /**
5440
+ * CreditApi - axios parameter creator
5441
+ * @export
5442
+ */
5443
+ export const CreditApiAxiosParamCreator = function (configuration?: Configuration) {
5444
+ return {
5445
+ /**
5446
+ * 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.
5447
+ * @summary Credit Event
5448
+ * @param {string} eventId Credit event ID
5449
+ * @param {*} [options] Override http request option.
5450
+ * @throws {RequiredError}
5451
+ */
5452
+ fetchCreditEvent: async (eventId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5453
+ // verify required parameter 'eventId' is not null or undefined
5454
+ assertParamExists('fetchCreditEvent', 'eventId', eventId)
5455
+ const localVarPath = `/credit/events/{event_id}`
5456
+ .replace(`{${"event_id"}}`, encodeURIComponent(String(eventId)));
5457
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5458
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5459
+ let baseOptions;
5460
+ if (configuration) {
5461
+ baseOptions = configuration.baseOptions;
5462
+ }
5463
+
5464
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5465
+ const localVarHeaderParameter = {} as any;
5466
+ const localVarQueryParameter = {} as any;
5467
+
5468
+ // authentication HTTPBearer required
5469
+ // http bearer authentication required
5470
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5471
+
5472
+
5473
+
5474
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5475
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5476
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5477
+
5478
+ return {
5479
+ url: toPathString(localVarUrlObj),
5480
+ options: localVarRequestOptions,
5481
+ };
5482
+ },
5483
+ /**
5484
+ * 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.
5485
+ * @summary Get User Account
5486
+ * @param {*} [options] Override http request option.
5487
+ * @throws {RequiredError}
5488
+ */
5489
+ getUserAccount: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5490
+ const localVarPath = `/credit/user/account`;
5491
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5492
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5493
+ let baseOptions;
5494
+ if (configuration) {
5495
+ baseOptions = configuration.baseOptions;
5496
+ }
5497
+
5498
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5499
+ const localVarHeaderParameter = {} as any;
5500
+ const localVarQueryParameter = {} as any;
5501
+
5502
+ // authentication HTTPBearer required
5503
+ // http bearer authentication required
5504
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5505
+
5506
+
5507
+
5508
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5509
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5510
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5511
+
5512
+ return {
5513
+ url: toPathString(localVarUrlObj),
5514
+ options: localVarRequestOptions,
5515
+ };
5516
+ },
5517
+ /**
5518
+ * 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.
5519
+ * @summary List Agent Income
5520
+ * @param {string} agentId
5521
+ * @param {string | null} [cursor] Cursor for pagination
5522
+ * @param {number} [limit] Maximum number of events to return
5523
+ * @param {*} [options] Override http request option.
5524
+ * @throws {RequiredError}
5525
+ */
5526
+ listAgentIncomeEvents: async (agentId: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5527
+ // verify required parameter 'agentId' is not null or undefined
5528
+ assertParamExists('listAgentIncomeEvents', 'agentId', agentId)
5529
+ const localVarPath = `/credit/agents/{agent_id}/events`
5530
+ .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
5531
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5532
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5533
+ let baseOptions;
5534
+ if (configuration) {
5535
+ baseOptions = configuration.baseOptions;
5536
+ }
5537
+
5538
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5539
+ const localVarHeaderParameter = {} as any;
5540
+ const localVarQueryParameter = {} as any;
5541
+
5542
+ // authentication HTTPBearer required
5543
+ // http bearer authentication required
5544
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5545
+
5546
+ if (cursor !== undefined) {
5547
+ localVarQueryParameter['cursor'] = cursor;
5548
+ }
5549
+
5550
+ if (limit !== undefined) {
5551
+ localVarQueryParameter['limit'] = limit;
5552
+ }
5553
+
5554
+
5555
+
5556
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5557
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5558
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5559
+
5560
+ return {
5561
+ url: toPathString(localVarUrlObj),
5562
+ options: localVarRequestOptions,
5563
+ };
5564
+ },
5565
+ /**
5566
+ * 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.
5567
+ * @summary List User Events
5568
+ * @param {Array<EventType> | null} [eventType] Event types
5569
+ * @param {Direction | null} [direction] Direction of events
5570
+ * @param {string | null} [cursor] Cursor for pagination
5571
+ * @param {number} [limit] Maximum number of events to return
5572
+ * @param {*} [options] Override http request option.
5573
+ * @throws {RequiredError}
5574
+ */
5575
+ listUserEvents: async (eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5576
+ const localVarPath = `/credit/user/events`;
5577
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5578
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5579
+ let baseOptions;
5580
+ if (configuration) {
5581
+ baseOptions = configuration.baseOptions;
5582
+ }
5583
+
5584
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5585
+ const localVarHeaderParameter = {} as any;
5586
+ const localVarQueryParameter = {} as any;
5587
+
5588
+ // authentication HTTPBearer required
5589
+ // http bearer authentication required
5590
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5591
+
5592
+ if (eventType) {
5593
+ localVarQueryParameter['event_type'] = eventType;
5594
+ }
5595
+
5596
+ if (direction !== undefined) {
5597
+ localVarQueryParameter['direction'] = direction;
5598
+ }
5599
+
5600
+ if (cursor !== undefined) {
5601
+ localVarQueryParameter['cursor'] = cursor;
5602
+ }
5603
+
5604
+ if (limit !== undefined) {
5605
+ localVarQueryParameter['limit'] = limit;
5606
+ }
5607
+
5608
+
5609
+
5610
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5611
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5612
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5613
+
5614
+ return {
5615
+ url: toPathString(localVarUrlObj),
5616
+ options: localVarRequestOptions,
5617
+ };
5618
+ },
5619
+ /**
5620
+ * 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.
5621
+ * @summary List User Transactions
5622
+ * @param {Array<TransactionType> | null} [txType] Transaction types
5623
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
5624
+ * @param {string | null} [cursor] Cursor for pagination
5625
+ * @param {number} [limit] Maximum number of transactions to return
5626
+ * @param {*} [options] Override http request option.
5627
+ * @throws {RequiredError}
5628
+ */
5629
+ listUserTransactions: async (txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5630
+ const localVarPath = `/credit/user/transactions`;
5631
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
5632
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5633
+ let baseOptions;
5634
+ if (configuration) {
5635
+ baseOptions = configuration.baseOptions;
5636
+ }
5637
+
5638
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5639
+ const localVarHeaderParameter = {} as any;
5640
+ const localVarQueryParameter = {} as any;
5641
+
5642
+ // authentication HTTPBearer required
5643
+ // http bearer authentication required
5644
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
5645
+
5646
+ if (txType) {
5647
+ localVarQueryParameter['tx_type'] = txType;
5648
+ }
5649
+
5650
+ if (creditDebit !== undefined) {
5651
+ localVarQueryParameter['credit_debit'] = creditDebit;
5652
+ }
5653
+
5654
+ if (cursor !== undefined) {
5655
+ localVarQueryParameter['cursor'] = cursor;
5656
+ }
5657
+
5658
+ if (limit !== undefined) {
5659
+ localVarQueryParameter['limit'] = limit;
5660
+ }
5661
+
5662
+
5663
+
5664
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
5665
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5666
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5667
+
5668
+ return {
5669
+ url: toPathString(localVarUrlObj),
5670
+ options: localVarRequestOptions,
5671
+ };
5672
+ },
5673
+ }
5674
+ };
5675
+
5676
+ /**
5677
+ * CreditApi - functional programming interface
5678
+ * @export
5679
+ */
5680
+ export const CreditApiFp = function(configuration?: Configuration) {
5681
+ const localVarAxiosParamCreator = CreditApiAxiosParamCreator(configuration)
5682
+ return {
5683
+ /**
5684
+ * 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.
5685
+ * @summary Credit Event
5686
+ * @param {string} eventId Credit event ID
5687
+ * @param {*} [options] Override http request option.
5688
+ * @throws {RequiredError}
5689
+ */
5690
+ async fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEvent>> {
5691
+ const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCreditEvent(eventId, options);
5692
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5693
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.fetchCreditEvent']?.[localVarOperationServerIndex]?.url;
5694
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5695
+ },
5696
+ /**
5697
+ * 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.
5698
+ * @summary Get User Account
5699
+ * @param {*} [options] Override http request option.
5700
+ * @throws {RequiredError}
5701
+ */
5702
+ async getUserAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditAccount>> {
5703
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAccount(options);
5704
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5705
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.getUserAccount']?.[localVarOperationServerIndex]?.url;
5706
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5707
+ },
5708
+ /**
5709
+ * 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.
5710
+ * @summary List Agent Income
5711
+ * @param {string} agentId
5712
+ * @param {string | null} [cursor] Cursor for pagination
5713
+ * @param {number} [limit] Maximum number of events to return
5714
+ * @param {*} [options] Override http request option.
5715
+ * @throws {RequiredError}
5716
+ */
5717
+ async listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
5718
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAgentIncomeEvents(agentId, cursor, limit, options);
5719
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5720
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.listAgentIncomeEvents']?.[localVarOperationServerIndex]?.url;
5721
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5722
+ },
5723
+ /**
5724
+ * 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.
5725
+ * @summary List User Events
5726
+ * @param {Array<EventType> | null} [eventType] Event types
5727
+ * @param {Direction | null} [direction] Direction of events
5728
+ * @param {string | null} [cursor] Cursor for pagination
5729
+ * @param {number} [limit] Maximum number of events to return
5730
+ * @param {*} [options] Override http request option.
5731
+ * @throws {RequiredError}
5732
+ */
5733
+ async listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
5734
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUserEvents(eventType, direction, cursor, limit, options);
5735
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5736
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserEvents']?.[localVarOperationServerIndex]?.url;
5737
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5738
+ },
5739
+ /**
5740
+ * 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.
5741
+ * @summary List User Transactions
5742
+ * @param {Array<TransactionType> | null} [txType] Transaction types
5743
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
5744
+ * @param {string | null} [cursor] Cursor for pagination
5745
+ * @param {number} [limit] Maximum number of transactions to return
5746
+ * @param {*} [options] Override http request option.
5747
+ * @throws {RequiredError}
5748
+ */
5749
+ async listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditTransactionsResponse>> {
5750
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listUserTransactions(txType, creditDebit, cursor, limit, options);
5751
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5752
+ const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserTransactions']?.[localVarOperationServerIndex]?.url;
5753
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5754
+ },
5755
+ }
5756
+ };
5757
+
5758
+ /**
5759
+ * CreditApi - factory interface
5760
+ * @export
5761
+ */
5762
+ export const CreditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5763
+ const localVarFp = CreditApiFp(configuration)
5764
+ return {
5765
+ /**
5766
+ * 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.
5767
+ * @summary Credit Event
5768
+ * @param {string} eventId Credit event ID
5769
+ * @param {*} [options] Override http request option.
5770
+ * @throws {RequiredError}
5771
+ */
5772
+ fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): AxiosPromise<CreditEvent> {
5773
+ return localVarFp.fetchCreditEvent(eventId, options).then((request) => request(axios, basePath));
5774
+ },
5775
+ /**
5776
+ * 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.
5777
+ * @summary Get User Account
5778
+ * @param {*} [options] Override http request option.
5779
+ * @throws {RequiredError}
5780
+ */
5781
+ getUserAccount(options?: RawAxiosRequestConfig): AxiosPromise<CreditAccount> {
5782
+ return localVarFp.getUserAccount(options).then((request) => request(axios, basePath));
5783
+ },
5784
+ /**
5785
+ * 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.
5786
+ * @summary List Agent Income
5787
+ * @param {string} agentId
5788
+ * @param {string | null} [cursor] Cursor for pagination
5789
+ * @param {number} [limit] Maximum number of events to return
5790
+ * @param {*} [options] Override http request option.
5791
+ * @throws {RequiredError}
5792
+ */
5793
+ listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
5794
+ return localVarFp.listAgentIncomeEvents(agentId, cursor, limit, options).then((request) => request(axios, basePath));
5795
+ },
5796
+ /**
5797
+ * 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.
5798
+ * @summary List User Events
5799
+ * @param {Array<EventType> | null} [eventType] Event types
5800
+ * @param {Direction | null} [direction] Direction of events
5801
+ * @param {string | null} [cursor] Cursor for pagination
5802
+ * @param {number} [limit] Maximum number of events to return
5803
+ * @param {*} [options] Override http request option.
5804
+ * @throws {RequiredError}
5805
+ */
5806
+ listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
5807
+ return localVarFp.listUserEvents(eventType, direction, cursor, limit, options).then((request) => request(axios, basePath));
5808
+ },
5809
+ /**
5810
+ * 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.
5811
+ * @summary List User Transactions
5812
+ * @param {Array<TransactionType> | null} [txType] Transaction types
5813
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
5814
+ * @param {string | null} [cursor] Cursor for pagination
5815
+ * @param {number} [limit] Maximum number of transactions to return
5816
+ * @param {*} [options] Override http request option.
5817
+ * @throws {RequiredError}
5818
+ */
5819
+ listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditTransactionsResponse> {
5820
+ return localVarFp.listUserTransactions(txType, creditDebit, cursor, limit, options).then((request) => request(axios, basePath));
5821
+ },
5822
+ };
5823
+ };
5824
+
5825
+ /**
5826
+ * CreditApi - object-oriented interface
5827
+ * @export
5828
+ * @class CreditApi
5829
+ * @extends {BaseAPI}
5830
+ */
5831
+ export class CreditApi extends BaseAPI {
5832
+ /**
5833
+ * 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.
5834
+ * @summary Credit Event
5835
+ * @param {string} eventId Credit event ID
5836
+ * @param {*} [options] Override http request option.
5837
+ * @throws {RequiredError}
5838
+ * @memberof CreditApi
5839
+ */
5840
+ public fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig) {
5841
+ return CreditApiFp(this.configuration).fetchCreditEvent(eventId, options).then((request) => request(this.axios, this.basePath));
5842
+ }
5843
+
5844
+ /**
5845
+ * 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.
5846
+ * @summary Get User Account
5847
+ * @param {*} [options] Override http request option.
5848
+ * @throws {RequiredError}
5849
+ * @memberof CreditApi
5850
+ */
5851
+ public getUserAccount(options?: RawAxiosRequestConfig) {
5852
+ return CreditApiFp(this.configuration).getUserAccount(options).then((request) => request(this.axios, this.basePath));
5853
+ }
5854
+
5855
+ /**
5856
+ * 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.
5857
+ * @summary List Agent Income
5858
+ * @param {string} agentId
5859
+ * @param {string | null} [cursor] Cursor for pagination
5860
+ * @param {number} [limit] Maximum number of events to return
5861
+ * @param {*} [options] Override http request option.
5862
+ * @throws {RequiredError}
5863
+ * @memberof CreditApi
5864
+ */
5865
+ public listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5866
+ return CreditApiFp(this.configuration).listAgentIncomeEvents(agentId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
5867
+ }
5868
+
5869
+ /**
5870
+ * 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.
5871
+ * @summary List User Events
5872
+ * @param {Array<EventType> | null} [eventType] Event types
5873
+ * @param {Direction | null} [direction] Direction of events
5874
+ * @param {string | null} [cursor] Cursor for pagination
5875
+ * @param {number} [limit] Maximum number of events to return
5216
5876
  * @param {*} [options] Override http request option.
5217
5877
  * @throws {RequiredError}
5218
- * @memberof ChatApi
5878
+ * @memberof CreditApi
5219
5879
  */
5220
- public sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
5221
- return ChatApiFp(this.configuration).sendMessageToChat(aid, chatId, chatMessageRequest, options).then((request) => request(this.axios, this.basePath));
5880
+ public listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5881
+ return CreditApiFp(this.configuration).listUserEvents(eventType, direction, cursor, limit, options).then((request) => request(this.axios, this.basePath));
5222
5882
  }
5223
5883
 
5224
5884
  /**
5225
- * Update details of a specific chat thread. Currently only supports updating the summary.
5226
- * @summary Update a chat thread
5227
- * @param {string} aid Agent ID
5228
- * @param {string} chatId Chat ID
5229
- * @param {ChatUpdateRequest} chatUpdateRequest
5885
+ * 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.
5886
+ * @summary List User Transactions
5887
+ * @param {Array<TransactionType> | null} [txType] Transaction types
5888
+ * @param {CreditDebit | null} [creditDebit] Credit or debit
5889
+ * @param {string | null} [cursor] Cursor for pagination
5890
+ * @param {number} [limit] Maximum number of transactions to return
5230
5891
  * @param {*} [options] Override http request option.
5231
5892
  * @throws {RequiredError}
5232
- * @memberof ChatApi
5893
+ * @memberof CreditApi
5233
5894
  */
5234
- public updateChatThread(aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options?: RawAxiosRequestConfig) {
5235
- return ChatApiFp(this.configuration).updateChatThread(aid, chatId, chatUpdateRequest, options).then((request) => request(this.axios, this.basePath));
5895
+ public listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5896
+ return CreditApiFp(this.configuration).listUserTransactions(txType, creditDebit, cursor, limit, options).then((request) => request(this.axios, this.basePath));
5236
5897
  }
5237
5898
  }
5238
5899
 
5239
5900
 
5240
5901
 
5241
5902
  /**
5242
- * CreditApi - axios parameter creator
5903
+ * DraftApi - axios parameter creator
5243
5904
  * @export
5244
5905
  */
5245
- export const CreditApiAxiosParamCreator = function (configuration?: Configuration) {
5906
+ export const DraftApiAxiosParamCreator = function (configuration?: Configuration) {
5246
5907
  return {
5247
5908
  /**
5248
- * 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.
5249
- * @summary Credit Event
5250
- * @param {string} eventId Credit event ID
5909
+ * Create a new agent draft. Creates a new draft with the provided agent configuration. The draft will be assigned a unique ID and agent ID, with the current user as the owner. The version is calculated as a hash of the input configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 500: Internal server error
5910
+ * @summary Create Agent Draft
5911
+ * @param {AgentUserInput} agentUserInput
5251
5912
  * @param {*} [options] Override http request option.
5252
5913
  * @throws {RequiredError}
5253
5914
  */
5254
- fetchCreditEvent: async (eventId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5255
- // verify required parameter 'eventId' is not null or undefined
5256
- assertParamExists('fetchCreditEvent', 'eventId', eventId)
5257
- const localVarPath = `/credit/events/{event_id}`
5258
- .replace(`{${"event_id"}}`, encodeURIComponent(String(eventId)));
5915
+ createAgentDraft: async (agentUserInput: AgentUserInput, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5916
+ // verify required parameter 'agentUserInput' is not null or undefined
5917
+ assertParamExists('createAgentDraft', 'agentUserInput', agentUserInput)
5918
+ const localVarPath = `/agent/draft`;
5259
5919
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5260
5920
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5261
5921
  let baseOptions;
@@ -5263,7 +5923,7 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5263
5923
  baseOptions = configuration.baseOptions;
5264
5924
  }
5265
5925
 
5266
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5926
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5267
5927
  const localVarHeaderParameter = {} as any;
5268
5928
  const localVarQueryParameter = {} as any;
5269
5929
 
@@ -5273,9 +5933,12 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5273
5933
 
5274
5934
 
5275
5935
 
5936
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5937
+
5276
5938
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5277
5939
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5278
5940
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5941
+ localVarRequestOptions.data = serializeDataIfNeeded(agentUserInput, localVarRequestOptions, configuration)
5279
5942
 
5280
5943
  return {
5281
5944
  url: toPathString(localVarUrlObj),
@@ -5283,13 +5946,21 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5283
5946
  };
5284
5947
  },
5285
5948
  /**
5286
- * 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.
5287
- * @summary Get User Account
5949
+ * Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
5950
+ * @summary Get Agent Draft By Id
5951
+ * @param {string} agentId Agent ID
5952
+ * @param {string} draftId Draft ID
5288
5953
  * @param {*} [options] Override http request option.
5289
5954
  * @throws {RequiredError}
5290
5955
  */
5291
- getUserAccount: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5292
- const localVarPath = `/credit/user/account`;
5956
+ getAgentDraftById: async (agentId: string, draftId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5957
+ // verify required parameter 'agentId' is not null or undefined
5958
+ assertParamExists('getAgentDraftById', 'agentId', agentId)
5959
+ // verify required parameter 'draftId' is not null or undefined
5960
+ assertParamExists('getAgentDraftById', 'draftId', draftId)
5961
+ const localVarPath = `/agents/{agent_id}/drafts/{draft_id}`
5962
+ .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)))
5963
+ .replace(`{${"draft_id"}}`, encodeURIComponent(String(draftId)));
5293
5964
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5294
5965
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5295
5966
  let baseOptions;
@@ -5317,18 +5988,16 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5317
5988
  };
5318
5989
  },
5319
5990
  /**
5320
- * 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.
5321
- * @summary List Agent Income
5322
- * @param {string} agentId
5323
- * @param {string | null} [cursor] Cursor for pagination
5324
- * @param {number} [limit] Maximum number of events to return
5991
+ * Get drafts for an agent. Retrieves the latest 10 drafts for the specified agent, ordered by creation time (most recent first). This endpoint is useful for viewing draft history and finding rollback targets. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
5992
+ * @summary Get Agent Drafts
5993
+ * @param {string} agentId Agent ID
5325
5994
  * @param {*} [options] Override http request option.
5326
5995
  * @throws {RequiredError}
5327
5996
  */
5328
- listAgentIncomeEvents: async (agentId: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5997
+ getAgentDrafts: async (agentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5329
5998
  // verify required parameter 'agentId' is not null or undefined
5330
- assertParamExists('listAgentIncomeEvents', 'agentId', agentId)
5331
- const localVarPath = `/credit/agents/{agent_id}/events`
5999
+ assertParamExists('getAgentDrafts', 'agentId', agentId)
6000
+ const localVarPath = `/agents/{agent_id}/drafts`
5332
6001
  .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
5333
6002
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5334
6003
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -5345,14 +6014,6 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5345
6014
  // http bearer authentication required
5346
6015
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
5347
6016
 
5348
- if (cursor !== undefined) {
5349
- localVarQueryParameter['cursor'] = cursor;
5350
- }
5351
-
5352
- if (limit !== undefined) {
5353
- localVarQueryParameter['limit'] = limit;
5354
- }
5355
-
5356
6017
 
5357
6018
 
5358
6019
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -5365,17 +6026,17 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5365
6026
  };
5366
6027
  },
5367
6028
  /**
5368
- * 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.
5369
- * @summary List User Events
5370
- * @param {Array<EventType> | null} [eventType] Event types
5371
- * @param {Direction | null} [direction] Direction of events
5372
- * @param {string | null} [cursor] Cursor for pagination
5373
- * @param {number} [limit] Maximum number of events to return
6029
+ * Get the latest draft for an agent. Retrieves the most recent draft for the specified agent. The draft is ordered by creation time, with the most recent draft returned. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6030
+ * @summary Get Agent Latest Draft
6031
+ * @param {string} agentId Agent ID
5374
6032
  * @param {*} [options] Override http request option.
5375
6033
  * @throws {RequiredError}
5376
6034
  */
5377
- listUserEvents: async (eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5378
- const localVarPath = `/credit/user/events`;
6035
+ getAgentLatestDraft: async (agentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6036
+ // verify required parameter 'agentId' is not null or undefined
6037
+ assertParamExists('getAgentLatestDraft', 'agentId', agentId)
6038
+ const localVarPath = `/agents/{agent_id}/draft/latest`
6039
+ .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
5379
6040
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5380
6041
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5381
6042
  let baseOptions;
@@ -5391,22 +6052,6 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5391
6052
  // http bearer authentication required
5392
6053
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
5393
6054
 
5394
- if (eventType) {
5395
- localVarQueryParameter['event_type'] = eventType;
5396
- }
5397
-
5398
- if (direction !== undefined) {
5399
- localVarQueryParameter['direction'] = direction;
5400
- }
5401
-
5402
- if (cursor !== undefined) {
5403
- localVarQueryParameter['cursor'] = cursor;
5404
- }
5405
-
5406
- if (limit !== undefined) {
5407
- localVarQueryParameter['limit'] = limit;
5408
- }
5409
-
5410
6055
 
5411
6056
 
5412
6057
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -5419,17 +6064,20 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5419
6064
  };
5420
6065
  },
5421
6066
  /**
5422
- * 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.
5423
- * @summary List User Transactions
5424
- * @param {Array<TransactionType> | null} [txType] Transaction types
5425
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5426
- * @param {string | null} [cursor] Cursor for pagination
5427
- * @param {number} [limit] Maximum number of transactions to return
6067
+ * Update an agent draft. Updates the latest draft for the specified agent. If the latest draft has been deployed (has deployed_at timestamp), creates a new draft. Otherwise, updates the existing draft with the new configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6068
+ * @summary Update Agent Draft
6069
+ * @param {string} agentId Agent ID
6070
+ * @param {AgentUserInput} agentUserInput
5428
6071
  * @param {*} [options] Override http request option.
5429
6072
  * @throws {RequiredError}
5430
6073
  */
5431
- listUserTransactions: async (txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5432
- const localVarPath = `/credit/user/transactions`;
6074
+ updateAgentDraft: async (agentId: string, agentUserInput: AgentUserInput, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
6075
+ // verify required parameter 'agentId' is not null or undefined
6076
+ assertParamExists('updateAgentDraft', 'agentId', agentId)
6077
+ // verify required parameter 'agentUserInput' is not null or undefined
6078
+ assertParamExists('updateAgentDraft', 'agentUserInput', agentUserInput)
6079
+ const localVarPath = `/agents/{agent_id}/draft`
6080
+ .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
5433
6081
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5434
6082
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5435
6083
  let baseOptions;
@@ -5437,7 +6085,7 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5437
6085
  baseOptions = configuration.baseOptions;
5438
6086
  }
5439
6087
 
5440
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
6088
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
5441
6089
  const localVarHeaderParameter = {} as any;
5442
6090
  const localVarQueryParameter = {} as any;
5443
6091
 
@@ -5445,27 +6093,14 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5445
6093
  // http bearer authentication required
5446
6094
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
5447
6095
 
5448
- if (txType) {
5449
- localVarQueryParameter['tx_type'] = txType;
5450
- }
5451
-
5452
- if (creditDebit !== undefined) {
5453
- localVarQueryParameter['credit_debit'] = creditDebit;
5454
- }
5455
-
5456
- if (cursor !== undefined) {
5457
- localVarQueryParameter['cursor'] = cursor;
5458
- }
5459
-
5460
- if (limit !== undefined) {
5461
- localVarQueryParameter['limit'] = limit;
5462
- }
5463
-
5464
6096
 
5465
6097
 
6098
+ localVarHeaderParameter['Content-Type'] = 'application/json';
6099
+
5466
6100
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5467
6101
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5468
6102
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6103
+ localVarRequestOptions.data = serializeDataIfNeeded(agentUserInput, localVarRequestOptions, configuration)
5469
6104
 
5470
6105
  return {
5471
6106
  url: toPathString(localVarUrlObj),
@@ -5476,226 +6111,211 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5476
6111
  };
5477
6112
 
5478
6113
  /**
5479
- * CreditApi - functional programming interface
6114
+ * DraftApi - functional programming interface
5480
6115
  * @export
5481
6116
  */
5482
- export const CreditApiFp = function(configuration?: Configuration) {
5483
- const localVarAxiosParamCreator = CreditApiAxiosParamCreator(configuration)
6117
+ export const DraftApiFp = function(configuration?: Configuration) {
6118
+ const localVarAxiosParamCreator = DraftApiAxiosParamCreator(configuration)
5484
6119
  return {
5485
6120
  /**
5486
- * 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.
5487
- * @summary Credit Event
5488
- * @param {string} eventId Credit event ID
6121
+ * Create a new agent draft. Creates a new draft with the provided agent configuration. The draft will be assigned a unique ID and agent ID, with the current user as the owner. The version is calculated as a hash of the input configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 500: Internal server error
6122
+ * @summary Create Agent Draft
6123
+ * @param {AgentUserInput} agentUserInput
5489
6124
  * @param {*} [options] Override http request option.
5490
6125
  * @throws {RequiredError}
5491
6126
  */
5492
- async fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEvent>> {
5493
- const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCreditEvent(eventId, options);
6127
+ async createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>> {
6128
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createAgentDraft(agentUserInput, options);
5494
6129
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5495
- const localVarOperationServerBasePath = operationServerMap['CreditApi.fetchCreditEvent']?.[localVarOperationServerIndex]?.url;
6130
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.createAgentDraft']?.[localVarOperationServerIndex]?.url;
5496
6131
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5497
6132
  },
5498
6133
  /**
5499
- * 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.
5500
- * @summary Get User Account
6134
+ * Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
6135
+ * @summary Get Agent Draft By Id
6136
+ * @param {string} agentId Agent ID
6137
+ * @param {string} draftId Draft ID
5501
6138
  * @param {*} [options] Override http request option.
5502
6139
  * @throws {RequiredError}
5503
6140
  */
5504
- async getUserAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditAccount>> {
5505
- const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAccount(options);
6141
+ async getAgentDraftById(agentId: string, draftId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>> {
6142
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentDraftById(agentId, draftId, options);
5506
6143
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5507
- const localVarOperationServerBasePath = operationServerMap['CreditApi.getUserAccount']?.[localVarOperationServerIndex]?.url;
6144
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentDraftById']?.[localVarOperationServerIndex]?.url;
5508
6145
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5509
6146
  },
5510
6147
  /**
5511
- * 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.
5512
- * @summary List Agent Income
5513
- * @param {string} agentId
5514
- * @param {string | null} [cursor] Cursor for pagination
5515
- * @param {number} [limit] Maximum number of events to return
6148
+ * Get drafts for an agent. Retrieves the latest 10 drafts for the specified agent, ordered by creation time (most recent first). This endpoint is useful for viewing draft history and finding rollback targets. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6149
+ * @summary Get Agent Drafts
6150
+ * @param {string} agentId Agent ID
5516
6151
  * @param {*} [options] Override http request option.
5517
6152
  * @throws {RequiredError}
5518
6153
  */
5519
- async listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
5520
- const localVarAxiosArgs = await localVarAxiosParamCreator.listAgentIncomeEvents(agentId, cursor, limit, options);
6154
+ async getAgentDrafts(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AgentDraft>>> {
6155
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentDrafts(agentId, options);
5521
6156
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5522
- const localVarOperationServerBasePath = operationServerMap['CreditApi.listAgentIncomeEvents']?.[localVarOperationServerIndex]?.url;
6157
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentDrafts']?.[localVarOperationServerIndex]?.url;
5523
6158
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5524
6159
  },
5525
6160
  /**
5526
- * 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.
5527
- * @summary List User Events
5528
- * @param {Array<EventType> | null} [eventType] Event types
5529
- * @param {Direction | null} [direction] Direction of events
5530
- * @param {string | null} [cursor] Cursor for pagination
5531
- * @param {number} [limit] Maximum number of events to return
6161
+ * Get the latest draft for an agent. Retrieves the most recent draft for the specified agent. The draft is ordered by creation time, with the most recent draft returned. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6162
+ * @summary Get Agent Latest Draft
6163
+ * @param {string} agentId Agent ID
5532
6164
  * @param {*} [options] Override http request option.
5533
6165
  * @throws {RequiredError}
5534
6166
  */
5535
- async listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
5536
- const localVarAxiosArgs = await localVarAxiosParamCreator.listUserEvents(eventType, direction, cursor, limit, options);
6167
+ async getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>> {
6168
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentLatestDraft(agentId, options);
5537
6169
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5538
- const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserEvents']?.[localVarOperationServerIndex]?.url;
6170
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentLatestDraft']?.[localVarOperationServerIndex]?.url;
5539
6171
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5540
6172
  },
5541
6173
  /**
5542
- * 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.
5543
- * @summary List User Transactions
5544
- * @param {Array<TransactionType> | null} [txType] Transaction types
5545
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5546
- * @param {string | null} [cursor] Cursor for pagination
5547
- * @param {number} [limit] Maximum number of transactions to return
6174
+ * Update an agent draft. Updates the latest draft for the specified agent. If the latest draft has been deployed (has deployed_at timestamp), creates a new draft. Otherwise, updates the existing draft with the new configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6175
+ * @summary Update Agent Draft
6176
+ * @param {string} agentId Agent ID
6177
+ * @param {AgentUserInput} agentUserInput
5548
6178
  * @param {*} [options] Override http request option.
5549
6179
  * @throws {RequiredError}
5550
6180
  */
5551
- async listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditTransactionsResponse>> {
5552
- const localVarAxiosArgs = await localVarAxiosParamCreator.listUserTransactions(txType, creditDebit, cursor, limit, options);
6181
+ async updateAgentDraft(agentId: string, agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>> {
6182
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateAgentDraft(agentId, agentUserInput, options);
5553
6183
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5554
- const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserTransactions']?.[localVarOperationServerIndex]?.url;
6184
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.updateAgentDraft']?.[localVarOperationServerIndex]?.url;
5555
6185
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5556
6186
  },
5557
6187
  }
5558
6188
  };
5559
6189
 
5560
6190
  /**
5561
- * CreditApi - factory interface
6191
+ * DraftApi - factory interface
5562
6192
  * @export
5563
6193
  */
5564
- export const CreditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5565
- const localVarFp = CreditApiFp(configuration)
6194
+ export const DraftApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
6195
+ const localVarFp = DraftApiFp(configuration)
5566
6196
  return {
5567
6197
  /**
5568
- * 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.
5569
- * @summary Credit Event
5570
- * @param {string} eventId Credit event ID
6198
+ * Create a new agent draft. Creates a new draft with the provided agent configuration. The draft will be assigned a unique ID and agent ID, with the current user as the owner. The version is calculated as a hash of the input configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 500: Internal server error
6199
+ * @summary Create Agent Draft
6200
+ * @param {AgentUserInput} agentUserInput
5571
6201
  * @param {*} [options] Override http request option.
5572
6202
  * @throws {RequiredError}
5573
6203
  */
5574
- fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): AxiosPromise<CreditEvent> {
5575
- return localVarFp.fetchCreditEvent(eventId, options).then((request) => request(axios, basePath));
6204
+ createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
6205
+ return localVarFp.createAgentDraft(agentUserInput, options).then((request) => request(axios, basePath));
5576
6206
  },
5577
6207
  /**
5578
- * 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.
5579
- * @summary Get User Account
6208
+ * Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
6209
+ * @summary Get Agent Draft By Id
6210
+ * @param {string} agentId Agent ID
6211
+ * @param {string} draftId Draft ID
5580
6212
  * @param {*} [options] Override http request option.
5581
6213
  * @throws {RequiredError}
5582
6214
  */
5583
- getUserAccount(options?: RawAxiosRequestConfig): AxiosPromise<CreditAccount> {
5584
- return localVarFp.getUserAccount(options).then((request) => request(axios, basePath));
6215
+ getAgentDraftById(agentId: string, draftId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
6216
+ return localVarFp.getAgentDraftById(agentId, draftId, options).then((request) => request(axios, basePath));
5585
6217
  },
5586
6218
  /**
5587
- * 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.
5588
- * @summary List Agent Income
5589
- * @param {string} agentId
5590
- * @param {string | null} [cursor] Cursor for pagination
5591
- * @param {number} [limit] Maximum number of events to return
6219
+ * Get drafts for an agent. Retrieves the latest 10 drafts for the specified agent, ordered by creation time (most recent first). This endpoint is useful for viewing draft history and finding rollback targets. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6220
+ * @summary Get Agent Drafts
6221
+ * @param {string} agentId Agent ID
5592
6222
  * @param {*} [options] Override http request option.
5593
6223
  * @throws {RequiredError}
5594
6224
  */
5595
- listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
5596
- return localVarFp.listAgentIncomeEvents(agentId, cursor, limit, options).then((request) => request(axios, basePath));
6225
+ getAgentDrafts(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<AgentDraft>> {
6226
+ return localVarFp.getAgentDrafts(agentId, options).then((request) => request(axios, basePath));
5597
6227
  },
5598
6228
  /**
5599
- * 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.
5600
- * @summary List User Events
5601
- * @param {Array<EventType> | null} [eventType] Event types
5602
- * @param {Direction | null} [direction] Direction of events
5603
- * @param {string | null} [cursor] Cursor for pagination
5604
- * @param {number} [limit] Maximum number of events to return
6229
+ * Get the latest draft for an agent. Retrieves the most recent draft for the specified agent. The draft is ordered by creation time, with the most recent draft returned. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6230
+ * @summary Get Agent Latest Draft
6231
+ * @param {string} agentId Agent ID
5605
6232
  * @param {*} [options] Override http request option.
5606
6233
  * @throws {RequiredError}
5607
6234
  */
5608
- listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
5609
- return localVarFp.listUserEvents(eventType, direction, cursor, limit, options).then((request) => request(axios, basePath));
6235
+ getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
6236
+ return localVarFp.getAgentLatestDraft(agentId, options).then((request) => request(axios, basePath));
5610
6237
  },
5611
6238
  /**
5612
- * 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.
5613
- * @summary List User Transactions
5614
- * @param {Array<TransactionType> | null} [txType] Transaction types
5615
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5616
- * @param {string | null} [cursor] Cursor for pagination
5617
- * @param {number} [limit] Maximum number of transactions to return
6239
+ * Update an agent draft. Updates the latest draft for the specified agent. If the latest draft has been deployed (has deployed_at timestamp), creates a new draft. Otherwise, updates the existing draft with the new configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6240
+ * @summary Update Agent Draft
6241
+ * @param {string} agentId Agent ID
6242
+ * @param {AgentUserInput} agentUserInput
5618
6243
  * @param {*} [options] Override http request option.
5619
6244
  * @throws {RequiredError}
5620
6245
  */
5621
- listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditTransactionsResponse> {
5622
- return localVarFp.listUserTransactions(txType, creditDebit, cursor, limit, options).then((request) => request(axios, basePath));
6246
+ updateAgentDraft(agentId: string, agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
6247
+ return localVarFp.updateAgentDraft(agentId, agentUserInput, options).then((request) => request(axios, basePath));
5623
6248
  },
5624
6249
  };
5625
6250
  };
5626
6251
 
5627
6252
  /**
5628
- * CreditApi - object-oriented interface
6253
+ * DraftApi - object-oriented interface
5629
6254
  * @export
5630
- * @class CreditApi
6255
+ * @class DraftApi
5631
6256
  * @extends {BaseAPI}
5632
6257
  */
5633
- export class CreditApi extends BaseAPI {
6258
+ export class DraftApi extends BaseAPI {
5634
6259
  /**
5635
- * 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.
5636
- * @summary Credit Event
5637
- * @param {string} eventId Credit event ID
6260
+ * Create a new agent draft. Creates a new draft with the provided agent configuration. The draft will be assigned a unique ID and agent ID, with the current user as the owner. The version is calculated as a hash of the input configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 500: Internal server error
6261
+ * @summary Create Agent Draft
6262
+ * @param {AgentUserInput} agentUserInput
5638
6263
  * @param {*} [options] Override http request option.
5639
6264
  * @throws {RequiredError}
5640
- * @memberof CreditApi
6265
+ * @memberof DraftApi
5641
6266
  */
5642
- public fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig) {
5643
- return CreditApiFp(this.configuration).fetchCreditEvent(eventId, options).then((request) => request(this.axios, this.basePath));
6267
+ public createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig) {
6268
+ return DraftApiFp(this.configuration).createAgentDraft(agentUserInput, options).then((request) => request(this.axios, this.basePath));
5644
6269
  }
5645
6270
 
5646
6271
  /**
5647
- * 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.
5648
- * @summary Get User Account
6272
+ * Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
6273
+ * @summary Get Agent Draft By Id
6274
+ * @param {string} agentId Agent ID
6275
+ * @param {string} draftId Draft ID
5649
6276
  * @param {*} [options] Override http request option.
5650
6277
  * @throws {RequiredError}
5651
- * @memberof CreditApi
6278
+ * @memberof DraftApi
5652
6279
  */
5653
- public getUserAccount(options?: RawAxiosRequestConfig) {
5654
- return CreditApiFp(this.configuration).getUserAccount(options).then((request) => request(this.axios, this.basePath));
6280
+ public getAgentDraftById(agentId: string, draftId: string, options?: RawAxiosRequestConfig) {
6281
+ return DraftApiFp(this.configuration).getAgentDraftById(agentId, draftId, options).then((request) => request(this.axios, this.basePath));
5655
6282
  }
5656
6283
 
5657
6284
  /**
5658
- * 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.
5659
- * @summary List Agent Income
5660
- * @param {string} agentId
5661
- * @param {string | null} [cursor] Cursor for pagination
5662
- * @param {number} [limit] Maximum number of events to return
6285
+ * Get drafts for an agent. Retrieves the latest 10 drafts for the specified agent, ordered by creation time (most recent first). This endpoint is useful for viewing draft history and finding rollback targets. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6286
+ * @summary Get Agent Drafts
6287
+ * @param {string} agentId Agent ID
5663
6288
  * @param {*} [options] Override http request option.
5664
6289
  * @throws {RequiredError}
5665
- * @memberof CreditApi
6290
+ * @memberof DraftApi
5666
6291
  */
5667
- public listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5668
- return CreditApiFp(this.configuration).listAgentIncomeEvents(agentId, cursor, limit, options).then((request) => request(this.axios, this.basePath));
6292
+ public getAgentDrafts(agentId: string, options?: RawAxiosRequestConfig) {
6293
+ return DraftApiFp(this.configuration).getAgentDrafts(agentId, options).then((request) => request(this.axios, this.basePath));
5669
6294
  }
5670
6295
 
5671
6296
  /**
5672
- * 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.
5673
- * @summary List User Events
5674
- * @param {Array<EventType> | null} [eventType] Event types
5675
- * @param {Direction | null} [direction] Direction of events
5676
- * @param {string | null} [cursor] Cursor for pagination
5677
- * @param {number} [limit] Maximum number of events to return
6297
+ * Get the latest draft for an agent. Retrieves the most recent draft for the specified agent. The draft is ordered by creation time, with the most recent draft returned. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6298
+ * @summary Get Agent Latest Draft
6299
+ * @param {string} agentId Agent ID
5678
6300
  * @param {*} [options] Override http request option.
5679
6301
  * @throws {RequiredError}
5680
- * @memberof CreditApi
6302
+ * @memberof DraftApi
5681
6303
  */
5682
- public listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5683
- return CreditApiFp(this.configuration).listUserEvents(eventType, direction, cursor, limit, options).then((request) => request(this.axios, this.basePath));
6304
+ public getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig) {
6305
+ return DraftApiFp(this.configuration).getAgentLatestDraft(agentId, options).then((request) => request(this.axios, this.basePath));
5684
6306
  }
5685
6307
 
5686
6308
  /**
5687
- * 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.
5688
- * @summary List User Transactions
5689
- * @param {Array<TransactionType> | null} [txType] Transaction types
5690
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5691
- * @param {string | null} [cursor] Cursor for pagination
5692
- * @param {number} [limit] Maximum number of transactions to return
6309
+ * Update an agent draft. Updates the latest draft for the specified agent. If the latest draft has been deployed (has deployed_at timestamp), creates a new draft. Otherwise, updates the existing draft with the new configuration. Possible HTTP errors: - 400: Invalid input data - 401: Unauthorized (invalid or missing authentication) - 404: Agent not found or no drafts exist for this agent - 500: Internal server error
6310
+ * @summary Update Agent Draft
6311
+ * @param {string} agentId Agent ID
6312
+ * @param {AgentUserInput} agentUserInput
5693
6313
  * @param {*} [options] Override http request option.
5694
6314
  * @throws {RequiredError}
5695
- * @memberof CreditApi
6315
+ * @memberof DraftApi
5696
6316
  */
5697
- public listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5698
- return CreditApiFp(this.configuration).listUserTransactions(txType, creditDebit, cursor, limit, options).then((request) => request(this.axios, this.basePath));
6317
+ public updateAgentDraft(agentId: string, agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig) {
6318
+ return DraftApiFp(this.configuration).updateAgentDraft(agentId, agentUserInput, options).then((request) => request(this.axios, this.basePath));
5699
6319
  }
5700
6320
  }
5701
6321
 
@@ -6834,7 +7454,7 @@ export const UserApiFp = function(configuration?: Configuration) {
6834
7454
  * @param {*} [options] Override http request option.
6835
7455
  * @throws {RequiredError}
6836
7456
  */
6837
- async getUserAgentById(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentOutput>> {
7457
+ async getUserAgentById(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Agent>> {
6838
7458
  const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAgentById(agentId, options);
6839
7459
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
6840
7460
  const localVarOperationServerBasePath = operationServerMap['UserApi.getUserAgentById']?.[localVarOperationServerIndex]?.url;
@@ -6871,7 +7491,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath?
6871
7491
  * @param {*} [options] Override http request option.
6872
7492
  * @throws {RequiredError}
6873
7493
  */
6874
- getUserAgentById(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentOutput> {
7494
+ getUserAgentById(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<Agent> {
6875
7495
  return localVarFp.getUserAgentById(agentId, options).then((request) => request(axios, basePath));
6876
7496
  },
6877
7497
  /**