@crestal/nation-sdk 0.6.30 → 0.6.32

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.30
7
+ * The version of the OpenAPI document: 0.6.32
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -29,18 +29,6 @@ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerM
29
29
  * @interface Agent
30
30
  */
31
31
  export interface Agent {
32
- /**
33
- *
34
- * @type {string}
35
- * @memberof Agent
36
- */
37
- 'name': string | null;
38
- /**
39
- *
40
- * @type {string}
41
- * @memberof Agent
42
- */
43
- 'slug'?: string | null;
44
32
  /**
45
33
  *
46
34
  * @type {string}
@@ -53,12 +41,6 @@ export interface Agent {
53
41
  * @memberof Agent
54
42
  */
55
43
  'external_website'?: string | null;
56
- /**
57
- *
58
- * @type {string}
59
- * @memberof Agent
60
- */
61
- 'picture'?: string | null;
62
44
  /**
63
45
  *
64
46
  * @type {string}
@@ -82,49 +64,49 @@ export interface Agent {
82
64
  * @type {string}
83
65
  * @memberof Agent
84
66
  */
85
- 'mode'?: AgentModeEnum | null;
67
+ 'fee_percentage'?: string | null;
86
68
  /**
87
69
  *
88
70
  * @type {string}
89
71
  * @memberof Agent
90
72
  */
91
- 'fee_percentage'?: string | null;
73
+ 'example_intro'?: string | null;
92
74
  /**
93
75
  *
94
- * @type {string}
76
+ * @type {Array<AgentExample>}
95
77
  * @memberof Agent
96
78
  */
97
- 'purpose': string | null;
79
+ 'examples'?: Array<AgentExample> | null;
98
80
  /**
99
81
  *
100
82
  * @type {string}
101
83
  * @memberof Agent
102
84
  */
103
- 'personality': string | null;
85
+ 'name': string | null;
104
86
  /**
105
87
  *
106
88
  * @type {string}
107
89
  * @memberof Agent
108
90
  */
109
- 'principles': string | null;
91
+ 'picture'?: string | null;
110
92
  /**
111
93
  *
112
94
  * @type {string}
113
95
  * @memberof Agent
114
96
  */
115
- 'owner'?: string | null;
97
+ 'purpose'?: string | null;
116
98
  /**
117
99
  *
118
100
  * @type {string}
119
101
  * @memberof Agent
120
102
  */
121
- 'upstream_id'?: string | null;
103
+ 'personality'?: string | null;
122
104
  /**
123
105
  *
124
- * @type {object}
106
+ * @type {string}
125
107
  * @memberof Agent
126
108
  */
127
- 'upstream_extra'?: object | null;
109
+ 'principles'?: string | null;
128
110
  /**
129
111
  * AI model identifier to be used by this agent for processing requests.
130
112
  * @type {string}
@@ -161,6 +143,30 @@ export interface Agent {
161
143
  * @memberof Agent
162
144
  */
163
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;
164
170
  /**
165
171
  *
166
172
  * @type {string}
@@ -175,76 +181,88 @@ export interface Agent {
175
181
  'autonomous'?: Array<AgentAutonomous> | null;
176
182
  /**
177
183
  *
178
- * @type {string}
184
+ * @type {boolean}
179
185
  * @memberof Agent
180
186
  */
181
- 'example_intro'?: string | null;
187
+ 'telegram_entrypoint_enabled'?: boolean | null;
182
188
  /**
183
189
  *
184
- * @type {Array<AgentExample>}
190
+ * @type {string}
185
191
  * @memberof Agent
186
192
  */
187
- 'examples'?: Array<AgentExample> | null;
193
+ 'telegram_entrypoint_prompt'?: string | null;
188
194
  /**
189
195
  *
190
196
  * @type {object}
191
197
  * @memberof Agent
192
198
  */
193
- 'skills'?: object | null;
199
+ 'telegram_config'?: object | null;
194
200
  /**
195
201
  *
196
202
  * @type {string}
197
203
  * @memberof Agent
198
204
  */
199
- 'wallet_provider'?: AgentWalletProviderEnum | null;
205
+ 'xmtp_entrypoint_prompt'?: string | null;
200
206
  /**
201
207
  *
202
208
  * @type {string}
203
209
  * @memberof Agent
204
210
  */
205
- 'readonly_wallet_address'?: string | null;
211
+ 'upstream_id'?: string | null;
206
212
  /**
207
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
208
220
  * @type {string}
209
221
  * @memberof Agent
210
222
  */
211
- 'network_id'?: AgentNetworkIdEnum | null;
223
+ 'id'?: string;
212
224
  /**
213
225
  *
214
226
  * @type {string}
215
227
  * @memberof Agent
216
228
  */
217
- 'cdp_network_id'?: AgentCdpNetworkIdEnum | null;
229
+ 'owner'?: string | null;
218
230
  /**
219
231
  *
220
- * @type {boolean}
232
+ * @type {string}
221
233
  * @memberof Agent
222
234
  */
223
- 'telegram_entrypoint_enabled'?: boolean | null;
235
+ 'slug'?: string | null;
224
236
  /**
225
237
  *
226
238
  * @type {string}
227
239
  * @memberof Agent
228
240
  */
229
- 'telegram_entrypoint_prompt'?: string | null;
241
+ 'version'?: string | null;
230
242
  /**
231
243
  *
232
244
  * @type {object}
233
245
  * @memberof Agent
234
246
  */
235
- 'telegram_config'?: object | null;
247
+ 'statistics'?: object | null;
236
248
  /**
237
249
  *
238
- * @type {string}
250
+ * @type {object}
239
251
  * @memberof Agent
240
252
  */
241
- 'xmtp_entrypoint_prompt'?: string | null;
253
+ 'assets'?: object | null;
242
254
  /**
243
- * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
244
- * @type {string}
255
+ *
256
+ * @type {CreditAccount}
245
257
  * @memberof Agent
246
258
  */
247
- 'id'?: string;
259
+ 'account_snapshot'?: CreditAccount | null;
260
+ /**
261
+ *
262
+ * @type {object}
263
+ * @memberof Agent
264
+ */
265
+ 'extra'?: object | null;
248
266
  /**
249
267
  * Timestamp when the agent was created, will ignore when importing
250
268
  * @type {string}
@@ -259,18 +277,6 @@ export interface Agent {
259
277
  'updated_at'?: string;
260
278
  }
261
279
 
262
- export const AgentModeEnum = {
263
- Public: 'public',
264
- Private: 'private'
265
- } as const;
266
-
267
- export type AgentModeEnum = typeof AgentModeEnum[keyof typeof AgentModeEnum];
268
- export const AgentShortTermMemoryStrategyEnum = {
269
- Trim: 'trim',
270
- Summarize: 'summarize'
271
- } as const;
272
-
273
- export type AgentShortTermMemoryStrategyEnum = typeof AgentShortTermMemoryStrategyEnum[keyof typeof AgentShortTermMemoryStrategyEnum];
274
280
  export const AgentWalletProviderEnum = {
275
281
  Cdp: 'cdp',
276
282
  Readonly: 'readonly'
@@ -292,20 +298,12 @@ export const AgentNetworkIdEnum = {
292
298
  } as const;
293
299
 
294
300
  export type AgentNetworkIdEnum = typeof AgentNetworkIdEnum[keyof typeof AgentNetworkIdEnum];
295
- export const AgentCdpNetworkIdEnum = {
296
- EthereumMainnet: 'ethereum-mainnet',
297
- EthereumSepolia: 'ethereum-sepolia',
298
- PolygonMainnet: 'polygon-mainnet',
299
- PolygonMumbai: 'polygon-mumbai',
300
- BaseMainnet: 'base-mainnet',
301
- BaseSepolia: 'base-sepolia',
302
- ArbitrumMainnet: 'arbitrum-mainnet',
303
- ArbitrumSepolia: 'arbitrum-sepolia',
304
- OptimismMainnet: 'optimism-mainnet',
305
- OptimismSepolia: 'optimism-sepolia'
301
+ export const AgentShortTermMemoryStrategyEnum = {
302
+ Trim: 'trim',
303
+ Summarize: 'summarize'
306
304
  } as const;
307
305
 
308
- export type AgentCdpNetworkIdEnum = typeof AgentCdpNetworkIdEnum[keyof typeof AgentCdpNetworkIdEnum];
306
+ export type AgentShortTermMemoryStrategyEnum = typeof AgentShortTermMemoryStrategyEnum[keyof typeof AgentShortTermMemoryStrategyEnum];
309
307
 
310
308
  /**
311
309
  * Response model for agent API key generation.
@@ -466,24 +464,6 @@ export interface AgentCreate {
466
464
  * @memberof AgentCreate
467
465
  */
468
466
  'name': string | null;
469
- /**
470
- *
471
- * @type {string}
472
- * @memberof AgentCreate
473
- */
474
- 'slug'?: string | null;
475
- /**
476
- *
477
- * @type {string}
478
- * @memberof AgentCreate
479
- */
480
- 'description'?: string | null;
481
- /**
482
- *
483
- * @type {string}
484
- * @memberof AgentCreate
485
- */
486
- 'external_website'?: string | null;
487
467
  /**
488
468
  *
489
469
  * @type {string}
@@ -495,67 +475,19 @@ export interface AgentCreate {
495
475
  * @type {string}
496
476
  * @memberof AgentCreate
497
477
  */
498
- 'ticker'?: string | null;
499
- /**
500
- *
501
- * @type {string}
502
- * @memberof AgentCreate
503
- */
504
- 'token_address'?: string | null;
505
- /**
506
- *
507
- * @type {string}
508
- * @memberof AgentCreate
509
- */
510
- 'token_pool'?: string | null;
511
- /**
512
- *
513
- * @type {string}
514
- * @memberof AgentCreate
515
- */
516
- 'mode'?: AgentCreateModeEnum | null;
517
- /**
518
- *
519
- * @type {FeePercentage}
520
- * @memberof AgentCreate
521
- */
522
- 'fee_percentage'?: FeePercentage | null;
523
- /**
524
- *
525
- * @type {string}
526
- * @memberof AgentCreate
527
- */
528
- 'purpose': string | null;
529
- /**
530
- *
531
- * @type {string}
532
- * @memberof AgentCreate
533
- */
534
- 'personality': string | null;
478
+ 'purpose'?: string | null;
535
479
  /**
536
480
  *
537
481
  * @type {string}
538
482
  * @memberof AgentCreate
539
483
  */
540
- 'principles': string | null;
484
+ 'personality'?: string | null;
541
485
  /**
542
486
  *
543
487
  * @type {string}
544
488
  * @memberof AgentCreate
545
489
  */
546
- 'owner'?: string | null;
547
- /**
548
- *
549
- * @type {string}
550
- * @memberof AgentCreate
551
- */
552
- 'upstream_id'?: string | null;
553
- /**
554
- *
555
- * @type {object}
556
- * @memberof AgentCreate
557
- */
558
- 'upstream_extra'?: object | null;
490
+ 'principles'?: string | null;
559
491
  /**
560
492
  * AI model identifier to be used by this agent for processing requests.
561
493
  * @type {string}
@@ -597,25 +529,19 @@ export interface AgentCreate {
597
529
  * @type {string}
598
530
  * @memberof AgentCreate
599
531
  */
600
- 'short_term_memory_strategy'?: AgentCreateShortTermMemoryStrategyEnum | null;
601
- /**
602
- *
603
- * @type {Array<AgentAutonomous>}
604
- * @memberof AgentCreate
605
- */
606
- 'autonomous'?: Array<AgentAutonomous> | null;
532
+ 'wallet_provider'?: AgentCreateWalletProviderEnum | null;
607
533
  /**
608
534
  *
609
535
  * @type {string}
610
536
  * @memberof AgentCreate
611
537
  */
612
- 'example_intro'?: string | null;
538
+ 'readonly_wallet_address'?: string | null;
613
539
  /**
614
540
  *
615
- * @type {Array<AgentExample>}
541
+ * @type {string}
616
542
  * @memberof AgentCreate
617
543
  */
618
- 'examples'?: Array<AgentExample> | null;
544
+ 'network_id'?: AgentCreateNetworkIdEnum | null;
619
545
  /**
620
546
  *
621
547
  * @type {object}
@@ -627,69 +553,63 @@ export interface AgentCreate {
627
553
  * @type {string}
628
554
  * @memberof AgentCreate
629
555
  */
630
- 'wallet_provider'?: AgentCreateWalletProviderEnum | null;
556
+ 'short_term_memory_strategy'?: AgentCreateShortTermMemoryStrategyEnum | null;
631
557
  /**
632
558
  *
633
- * @type {string}
559
+ * @type {Array<AgentAutonomous>}
634
560
  * @memberof AgentCreate
635
561
  */
636
- 'readonly_wallet_address'?: string | null;
562
+ 'autonomous'?: Array<AgentAutonomous> | null;
637
563
  /**
638
564
  *
639
- * @type {string}
565
+ * @type {boolean}
640
566
  * @memberof AgentCreate
641
567
  */
642
- 'network_id'?: AgentCreateNetworkIdEnum | null;
568
+ 'telegram_entrypoint_enabled'?: boolean | null;
643
569
  /**
644
570
  *
645
571
  * @type {string}
646
572
  * @memberof AgentCreate
647
573
  */
648
- 'cdp_network_id'?: AgentCreateCdpNetworkIdEnum | null;
574
+ 'telegram_entrypoint_prompt'?: string | null;
649
575
  /**
650
576
  *
651
- * @type {boolean}
577
+ * @type {object}
652
578
  * @memberof AgentCreate
653
579
  */
654
- 'telegram_entrypoint_enabled'?: boolean | null;
580
+ 'telegram_config'?: object | null;
655
581
  /**
656
582
  *
657
583
  * @type {string}
658
584
  * @memberof AgentCreate
659
585
  */
660
- 'telegram_entrypoint_prompt'?: string | null;
586
+ 'xmtp_entrypoint_prompt'?: string | null;
661
587
  /**
662
588
  *
663
- * @type {object}
589
+ * @type {string}
664
590
  * @memberof AgentCreate
665
591
  */
666
- 'telegram_config'?: object | null;
592
+ 'upstream_id'?: string | null;
667
593
  /**
668
594
  *
669
- * @type {string}
595
+ * @type {object}
670
596
  * @memberof AgentCreate
671
597
  */
672
- 'xmtp_entrypoint_prompt'?: string | null;
598
+ 'upstream_extra'?: object | null;
673
599
  /**
674
600
  * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
675
601
  * @type {string}
676
602
  * @memberof AgentCreate
677
603
  */
678
604
  'id'?: string;
605
+ /**
606
+ *
607
+ * @type {string}
608
+ * @memberof AgentCreate
609
+ */
610
+ 'owner'?: string | null;
679
611
  }
680
612
 
681
- export const AgentCreateModeEnum = {
682
- Public: 'public',
683
- Private: 'private'
684
- } as const;
685
-
686
- export type AgentCreateModeEnum = typeof AgentCreateModeEnum[keyof typeof AgentCreateModeEnum];
687
- export const AgentCreateShortTermMemoryStrategyEnum = {
688
- Trim: 'trim',
689
- Summarize: 'summarize'
690
- } as const;
691
-
692
- export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
693
613
  export const AgentCreateWalletProviderEnum = {
694
614
  Cdp: 'cdp',
695
615
  Readonly: 'readonly'
@@ -711,35 +631,231 @@ export const AgentCreateNetworkIdEnum = {
711
631
  } as const;
712
632
 
713
633
  export type AgentCreateNetworkIdEnum = typeof AgentCreateNetworkIdEnum[keyof typeof AgentCreateNetworkIdEnum];
714
- export const AgentCreateCdpNetworkIdEnum = {
715
- EthereumMainnet: 'ethereum-mainnet',
716
- EthereumSepolia: 'ethereum-sepolia',
717
- PolygonMainnet: 'polygon-mainnet',
718
- PolygonMumbai: 'polygon-mumbai',
719
- BaseMainnet: 'base-mainnet',
720
- BaseSepolia: 'base-sepolia',
721
- ArbitrumMainnet: 'arbitrum-mainnet',
722
- ArbitrumSepolia: 'arbitrum-sepolia',
723
- OptimismMainnet: 'optimism-mainnet',
724
- OptimismSepolia: 'optimism-sepolia'
634
+ export const AgentCreateShortTermMemoryStrategyEnum = {
635
+ Trim: 'trim',
636
+ Summarize: 'summarize'
725
637
  } as const;
726
638
 
727
- export type AgentCreateCdpNetworkIdEnum = typeof AgentCreateCdpNetworkIdEnum[keyof typeof AgentCreateCdpNetworkIdEnum];
639
+ export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
728
640
 
729
641
  /**
730
- * Agent example configuration.
642
+ * Agent draft model.
731
643
  * @export
732
- * @interface AgentExample
644
+ * @interface AgentDraft
733
645
  */
734
- export interface AgentExample {
646
+ export interface AgentDraft {
735
647
  /**
736
- * Name of the example
648
+ *
737
649
  * @type {string}
738
- * @memberof AgentExample
650
+ * @memberof AgentDraft
739
651
  */
740
- 'name': string;
652
+ 'name': string | null;
741
653
  /**
742
- * Description of the example
654
+ *
655
+ * @type {string}
656
+ * @memberof AgentDraft
657
+ */
658
+ 'picture'?: string | null;
659
+ /**
660
+ *
661
+ * @type {string}
662
+ * @memberof AgentDraft
663
+ */
664
+ 'purpose'?: string | null;
665
+ /**
666
+ *
667
+ * @type {string}
668
+ * @memberof AgentDraft
669
+ */
670
+ 'personality'?: string | null;
671
+ /**
672
+ *
673
+ * @type {string}
674
+ * @memberof AgentDraft
675
+ */
676
+ 'principles'?: string | null;
677
+ /**
678
+ * AI model identifier to be used by this agent for processing requests.
679
+ * @type {string}
680
+ * @memberof AgentDraft
681
+ */
682
+ 'model'?: string;
683
+ /**
684
+ *
685
+ * @type {string}
686
+ * @memberof AgentDraft
687
+ */
688
+ 'prompt'?: string | null;
689
+ /**
690
+ *
691
+ * @type {string}
692
+ * @memberof AgentDraft
693
+ */
694
+ 'prompt_append'?: string | null;
695
+ /**
696
+ *
697
+ * @type {number}
698
+ * @memberof AgentDraft
699
+ */
700
+ 'temperature'?: number | null;
701
+ /**
702
+ *
703
+ * @type {number}
704
+ * @memberof AgentDraft
705
+ */
706
+ 'frequency_penalty'?: number | null;
707
+ /**
708
+ *
709
+ * @type {number}
710
+ * @memberof AgentDraft
711
+ */
712
+ 'presence_penalty'?: number | null;
713
+ /**
714
+ *
715
+ * @type {string}
716
+ * @memberof AgentDraft
717
+ */
718
+ 'wallet_provider'?: AgentDraftWalletProviderEnum | null;
719
+ /**
720
+ *
721
+ * @type {string}
722
+ * @memberof AgentDraft
723
+ */
724
+ 'readonly_wallet_address'?: string | null;
725
+ /**
726
+ *
727
+ * @type {string}
728
+ * @memberof AgentDraft
729
+ */
730
+ 'network_id'?: AgentDraftNetworkIdEnum | null;
731
+ /**
732
+ *
733
+ * @type {object}
734
+ * @memberof AgentDraft
735
+ */
736
+ 'skills'?: object | null;
737
+ /**
738
+ *
739
+ * @type {string}
740
+ * @memberof AgentDraft
741
+ */
742
+ 'short_term_memory_strategy'?: AgentDraftShortTermMemoryStrategyEnum | null;
743
+ /**
744
+ *
745
+ * @type {Array<AgentAutonomous>}
746
+ * @memberof AgentDraft
747
+ */
748
+ 'autonomous'?: Array<AgentAutonomous> | null;
749
+ /**
750
+ *
751
+ * @type {boolean}
752
+ * @memberof AgentDraft
753
+ */
754
+ 'telegram_entrypoint_enabled'?: boolean | null;
755
+ /**
756
+ *
757
+ * @type {string}
758
+ * @memberof AgentDraft
759
+ */
760
+ 'telegram_entrypoint_prompt'?: string | null;
761
+ /**
762
+ *
763
+ * @type {object}
764
+ * @memberof AgentDraft
765
+ */
766
+ 'telegram_config'?: object | null;
767
+ /**
768
+ *
769
+ * @type {string}
770
+ * @memberof AgentDraft
771
+ */
772
+ 'xmtp_entrypoint_prompt'?: string | null;
773
+ /**
774
+ * Unique identifier for the draft
775
+ * @type {string}
776
+ * @memberof AgentDraft
777
+ */
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;
803
+ /**
804
+ * Timestamp when the agent was created, will ignore when importing
805
+ * @type {string}
806
+ * @memberof AgentDraft
807
+ */
808
+ 'created_at'?: string;
809
+ /**
810
+ * Timestamp when the agent was last updated, will ignore when importing
811
+ * @type {string}
812
+ * @memberof AgentDraft
813
+ */
814
+ 'updated_at'?: string;
815
+ }
816
+
817
+ export const AgentDraftWalletProviderEnum = {
818
+ Cdp: 'cdp',
819
+ Readonly: 'readonly'
820
+ } as const;
821
+
822
+ export type AgentDraftWalletProviderEnum = typeof AgentDraftWalletProviderEnum[keyof typeof AgentDraftWalletProviderEnum];
823
+ export const AgentDraftNetworkIdEnum = {
824
+ EthereumMainnet: 'ethereum-mainnet',
825
+ EthereumSepolia: 'ethereum-sepolia',
826
+ PolygonMainnet: 'polygon-mainnet',
827
+ PolygonMumbai: 'polygon-mumbai',
828
+ BaseMainnet: 'base-mainnet',
829
+ BaseSepolia: 'base-sepolia',
830
+ ArbitrumMainnet: 'arbitrum-mainnet',
831
+ ArbitrumSepolia: 'arbitrum-sepolia',
832
+ OptimismMainnet: 'optimism-mainnet',
833
+ OptimismSepolia: 'optimism-sepolia',
834
+ Solana: 'solana'
835
+ } as const;
836
+
837
+ export type AgentDraftNetworkIdEnum = typeof AgentDraftNetworkIdEnum[keyof typeof AgentDraftNetworkIdEnum];
838
+ export const AgentDraftShortTermMemoryStrategyEnum = {
839
+ Trim: 'trim',
840
+ Summarize: 'summarize'
841
+ } as const;
842
+
843
+ export type AgentDraftShortTermMemoryStrategyEnum = typeof AgentDraftShortTermMemoryStrategyEnum[keyof typeof AgentDraftShortTermMemoryStrategyEnum];
844
+
845
+ /**
846
+ * Agent example configuration.
847
+ * @export
848
+ * @interface AgentExample
849
+ */
850
+ export interface AgentExample {
851
+ /**
852
+ * Name of the example
853
+ * @type {string}
854
+ * @memberof AgentExample
855
+ */
856
+ 'name': string;
857
+ /**
858
+ * Description of the example
743
859
  * @type {string}
744
860
  * @memberof AgentExample
745
861
  */
@@ -857,241 +973,352 @@ export interface AgentListResponse {
857
973
  */
858
974
  export interface AgentResponse {
859
975
  /**
860
- * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
976
+ *
861
977
  * @type {string}
862
978
  * @memberof AgentResponse
863
979
  */
864
- 'id': string;
980
+ 'description'?: string | null;
865
981
  /**
866
- * Timestamp when the agent was created, will ignore when importing
982
+ *
867
983
  * @type {string}
868
984
  * @memberof AgentResponse
869
985
  */
870
- 'created_at': string;
986
+ 'external_website'?: string | null;
871
987
  /**
872
- * Timestamp when the agent was last updated, will ignore when importing
988
+ *
873
989
  * @type {string}
874
990
  * @memberof AgentResponse
875
991
  */
876
- 'updated_at': string;
992
+ 'ticker'?: string | null;
877
993
  /**
878
994
  *
879
995
  * @type {string}
880
996
  * @memberof AgentResponse
881
997
  */
882
- 'name'?: string | null;
998
+ 'token_address'?: string | null;
883
999
  /**
884
1000
  *
885
1001
  * @type {string}
886
1002
  * @memberof AgentResponse
887
1003
  */
888
- 'slug'?: string | null;
1004
+ 'token_pool'?: string | null;
889
1005
  /**
890
1006
  *
891
1007
  * @type {string}
892
1008
  * @memberof AgentResponse
893
1009
  */
894
- 'description'?: string | null;
1010
+ 'fee_percentage'?: string | null;
895
1011
  /**
896
1012
  *
897
1013
  * @type {string}
898
1014
  * @memberof AgentResponse
899
1015
  */
900
- 'external_website'?: string | null;
1016
+ 'example_intro'?: string | null;
901
1017
  /**
902
1018
  *
903
- * @type {string}
1019
+ * @type {Array<AgentExample>}
904
1020
  * @memberof AgentResponse
905
1021
  */
906
- 'picture'?: string | null;
1022
+ 'examples'?: Array<AgentExample> | null;
907
1023
  /**
908
1024
  *
909
1025
  * @type {string}
910
1026
  * @memberof AgentResponse
911
1027
  */
912
- 'ticker'?: string | null;
1028
+ 'name': string | null;
913
1029
  /**
914
1030
  *
915
1031
  * @type {string}
916
1032
  * @memberof AgentResponse
917
1033
  */
918
- 'token_address'?: string | null;
1034
+ 'picture'?: string | null;
919
1035
  /**
920
1036
  *
921
1037
  * @type {string}
922
1038
  * @memberof AgentResponse
923
1039
  */
924
- 'token_pool'?: string | null;
1040
+ 'purpose'?: string | null;
925
1041
  /**
926
1042
  *
927
1043
  * @type {string}
928
1044
  * @memberof AgentResponse
929
1045
  */
930
- 'mode'?: AgentResponseModeEnum | null;
1046
+ 'personality'?: string | null;
931
1047
  /**
932
1048
  *
933
1049
  * @type {string}
934
1050
  * @memberof AgentResponse
935
1051
  */
936
- 'fee_percentage'?: string | null;
1052
+ 'principles'?: string | null;
937
1053
  /**
938
- *
1054
+ * AI model identifier to be used by this agent for processing requests.
939
1055
  * @type {string}
940
1056
  * @memberof AgentResponse
941
1057
  */
942
- 'owner'?: string | null;
1058
+ 'model'?: string;
943
1059
  /**
944
1060
  *
945
1061
  * @type {string}
946
1062
  * @memberof AgentResponse
947
1063
  */
948
- 'upstream_id'?: string | null;
1064
+ 'prompt'?: string | null;
949
1065
  /**
950
1066
  *
951
- * @type {object}
952
- * @memberof AgentResponse
953
- */
954
- 'upstream_extra'?: object | null;
955
- /**
956
- * 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
957
1067
  * @type {string}
958
1068
  * @memberof AgentResponse
959
1069
  */
960
- 'model': string;
1070
+ 'prompt_append'?: string | null;
961
1071
  /**
962
1072
  *
963
- * @type {Array<object>}
1073
+ * @type {number}
964
1074
  * @memberof AgentResponse
965
1075
  */
966
- 'autonomous'?: Array<object> | null;
1076
+ 'temperature'?: number | null;
967
1077
  /**
968
1078
  *
969
- * @type {string}
1079
+ * @type {number}
970
1080
  * @memberof AgentResponse
971
1081
  */
972
- 'example_intro'?: string | null;
1082
+ 'frequency_penalty'?: number | null;
973
1083
  /**
974
1084
  *
975
- * @type {Array<AgentExample>}
1085
+ * @type {number}
976
1086
  * @memberof AgentResponse
977
1087
  */
978
- 'examples'?: Array<AgentExample> | null;
1088
+ 'presence_penalty'?: number | null;
979
1089
  /**
980
1090
  *
981
- * @type {object}
1091
+ * @type {string}
982
1092
  * @memberof AgentResponse
983
1093
  */
984
- 'skills'?: object | null;
1094
+ 'wallet_provider'?: AgentResponseWalletProviderEnum | null;
985
1095
  /**
986
1096
  *
987
1097
  * @type {string}
988
1098
  * @memberof AgentResponse
989
1099
  */
990
- 'wallet_provider'?: AgentResponseWalletProviderEnum | null;
1100
+ 'readonly_wallet_address'?: string | null;
991
1101
  /**
992
1102
  *
993
1103
  * @type {string}
994
1104
  * @memberof AgentResponse
995
1105
  */
996
- 'network_id'?: string | null;
1106
+ 'network_id'?: AgentResponseNetworkIdEnum | null;
997
1107
  /**
998
1108
  *
999
- * @type {string}
1109
+ * @type {object}
1000
1110
  * @memberof AgentResponse
1001
1111
  */
1002
- 'cdp_network_id'?: string | null;
1112
+ 'skills'?: object | null;
1003
1113
  /**
1004
1114
  *
1005
- * @type {boolean}
1115
+ * @type {string}
1006
1116
  * @memberof AgentResponse
1007
1117
  */
1008
- 'telegram_entrypoint_enabled'?: boolean | null;
1118
+ 'short_term_memory_strategy'?: AgentResponseShortTermMemoryStrategyEnum | null;
1009
1119
  /**
1010
1120
  *
1011
- * @type {string}
1121
+ * @type {Array<AgentAutonomous>}
1012
1122
  * @memberof AgentResponse
1013
1123
  */
1014
- 'cdp_wallet_address': string | null;
1124
+ 'autonomous'?: Array<AgentAutonomous> | null;
1015
1125
  /**
1016
1126
  *
1017
- * @type {string}
1127
+ * @type {boolean}
1018
1128
  * @memberof AgentResponse
1019
1129
  */
1020
- 'evm_wallet_address': string | null;
1130
+ 'telegram_entrypoint_enabled'?: boolean | null;
1021
1131
  /**
1022
1132
  *
1023
1133
  * @type {string}
1024
1134
  * @memberof AgentResponse
1025
1135
  */
1026
- 'solana_wallet_address': string | null;
1136
+ 'telegram_entrypoint_prompt'?: string | null;
1027
1137
  /**
1028
- * Whether the agent has linked their Twitter account
1029
- * @type {boolean}
1138
+ *
1139
+ * @type {object}
1030
1140
  * @memberof AgentResponse
1031
1141
  */
1032
- 'has_twitter_linked': boolean;
1142
+ 'telegram_config'?: object | null;
1033
1143
  /**
1034
1144
  *
1035
1145
  * @type {string}
1036
1146
  * @memberof AgentResponse
1037
1147
  */
1038
- 'linked_twitter_username': string | null;
1148
+ 'xmtp_entrypoint_prompt'?: string | null;
1039
1149
  /**
1040
1150
  *
1041
1151
  * @type {string}
1042
1152
  * @memberof AgentResponse
1043
1153
  */
1044
- 'linked_twitter_name': string | null;
1154
+ 'upstream_id'?: string | null;
1045
1155
  /**
1046
- * Whether the agent has self-keyed their Twitter account
1047
- * @type {boolean}
1156
+ *
1157
+ * @type {object}
1048
1158
  * @memberof AgentResponse
1049
1159
  */
1050
- 'has_twitter_self_key': boolean;
1160
+ 'upstream_extra'?: object | null;
1051
1161
  /**
1052
- * Whether the agent has self-keyed their Telegram account
1053
- * @type {boolean}
1162
+ * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
1163
+ * @type {string}
1054
1164
  * @memberof AgentResponse
1055
1165
  */
1056
- 'has_telegram_self_key': boolean;
1166
+ 'id'?: string;
1057
1167
  /**
1058
1168
  *
1059
1169
  * @type {string}
1060
1170
  * @memberof AgentResponse
1061
1171
  */
1062
- 'linked_telegram_username': string | null;
1172
+ 'owner'?: string | null;
1063
1173
  /**
1064
1174
  *
1065
1175
  * @type {string}
1066
1176
  * @memberof AgentResponse
1067
1177
  */
1068
- 'linked_telegram_name': string | null;
1178
+ 'slug'?: string | null;
1069
1179
  /**
1070
- * Whether the agent accepts image inputs in public mode
1071
- * @type {boolean}
1180
+ *
1181
+ * @type {string}
1072
1182
  * @memberof AgentResponse
1073
1183
  */
1074
- 'accept_image_input': boolean;
1184
+ 'version'?: string | null;
1185
+ /**
1186
+ *
1187
+ * @type {object}
1188
+ * @memberof AgentResponse
1189
+ */
1190
+ 'statistics'?: object | null;
1191
+ /**
1192
+ *
1193
+ * @type {object}
1194
+ * @memberof AgentResponse
1195
+ */
1196
+ 'assets'?: object | null;
1197
+ /**
1198
+ *
1199
+ * @type {CreditAccount}
1200
+ * @memberof AgentResponse
1201
+ */
1202
+ 'account_snapshot'?: CreditAccount | null;
1203
+ /**
1204
+ *
1205
+ * @type {object}
1206
+ * @memberof AgentResponse
1207
+ */
1208
+ 'extra'?: object | null;
1209
+ /**
1210
+ * Timestamp when the agent was created, will ignore when importing
1211
+ * @type {string}
1212
+ * @memberof AgentResponse
1213
+ */
1214
+ 'created_at'?: string;
1215
+ /**
1216
+ * Timestamp when the agent was last updated, will ignore when importing
1217
+ * @type {string}
1218
+ * @memberof AgentResponse
1219
+ */
1220
+ 'updated_at'?: string;
1221
+ /**
1222
+ *
1223
+ * @type {string}
1224
+ * @memberof AgentResponse
1225
+ */
1226
+ 'cdp_wallet_address'?: string | null;
1227
+ /**
1228
+ *
1229
+ * @type {string}
1230
+ * @memberof AgentResponse
1231
+ */
1232
+ 'evm_wallet_address'?: string | null;
1233
+ /**
1234
+ *
1235
+ * @type {string}
1236
+ * @memberof AgentResponse
1237
+ */
1238
+ 'solana_wallet_address'?: string | null;
1239
+ /**
1240
+ * Whether the agent has linked their Twitter account
1241
+ * @type {boolean}
1242
+ * @memberof AgentResponse
1243
+ */
1244
+ 'has_twitter_linked'?: boolean;
1245
+ /**
1246
+ *
1247
+ * @type {string}
1248
+ * @memberof AgentResponse
1249
+ */
1250
+ 'linked_twitter_username'?: string | null;
1251
+ /**
1252
+ *
1253
+ * @type {string}
1254
+ * @memberof AgentResponse
1255
+ */
1256
+ 'linked_twitter_name'?: string | null;
1257
+ /**
1258
+ * Whether the agent has self-keyed their Twitter account
1259
+ * @type {boolean}
1260
+ * @memberof AgentResponse
1261
+ */
1262
+ 'has_twitter_self_key'?: boolean;
1263
+ /**
1264
+ * Whether the agent has self-keyed their Telegram account
1265
+ * @type {boolean}
1266
+ * @memberof AgentResponse
1267
+ */
1268
+ 'has_telegram_self_key'?: boolean;
1269
+ /**
1270
+ *
1271
+ * @type {string}
1272
+ * @memberof AgentResponse
1273
+ */
1274
+ 'linked_telegram_username'?: string | null;
1275
+ /**
1276
+ *
1277
+ * @type {string}
1278
+ * @memberof AgentResponse
1279
+ */
1280
+ 'linked_telegram_name'?: string | null;
1281
+ /**
1282
+ * Whether the agent accepts image inputs in public mode
1283
+ * @type {boolean}
1284
+ * @memberof AgentResponse
1285
+ */
1286
+ 'accept_image_input'?: boolean;
1075
1287
  /**
1076
1288
  * Whether the agent accepts image inputs in private mode
1077
1289
  * @type {boolean}
1078
1290
  * @memberof AgentResponse
1079
1291
  */
1080
- 'accept_image_input_private': boolean;
1292
+ 'accept_image_input_private'?: boolean;
1081
1293
  }
1082
1294
 
1083
- export const AgentResponseModeEnum = {
1084
- Public: 'public',
1085
- Private: 'private'
1086
- } as const;
1087
-
1088
- export type AgentResponseModeEnum = typeof AgentResponseModeEnum[keyof typeof AgentResponseModeEnum];
1089
1295
  export const AgentResponseWalletProviderEnum = {
1090
1296
  Cdp: 'cdp',
1091
1297
  Readonly: 'readonly'
1092
1298
  } as const;
1093
1299
 
1094
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;
1314
+
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];
1095
1322
 
1096
1323
  /**
1097
1324
  * Sort options for agents list.
@@ -1217,24 +1444,6 @@ export interface AgentUpdate {
1217
1444
  * @memberof AgentUpdate
1218
1445
  */
1219
1446
  'name': string | null;
1220
- /**
1221
- *
1222
- * @type {string}
1223
- * @memberof AgentUpdate
1224
- */
1225
- 'slug'?: string | null;
1226
- /**
1227
- *
1228
- * @type {string}
1229
- * @memberof AgentUpdate
1230
- */
1231
- 'description'?: string | null;
1232
- /**
1233
- *
1234
- * @type {string}
1235
- * @memberof AgentUpdate
1236
- */
1237
- 'external_website'?: string | null;
1238
1447
  /**
1239
1448
  *
1240
1449
  * @type {string}
@@ -1246,67 +1455,19 @@ export interface AgentUpdate {
1246
1455
  * @type {string}
1247
1456
  * @memberof AgentUpdate
1248
1457
  */
1249
- 'ticker'?: string | null;
1250
- /**
1251
- *
1252
- * @type {string}
1253
- * @memberof AgentUpdate
1254
- */
1255
- 'token_address'?: string | null;
1256
- /**
1257
- *
1258
- * @type {string}
1259
- * @memberof AgentUpdate
1260
- */
1261
- 'token_pool'?: string | null;
1262
- /**
1263
- *
1264
- * @type {string}
1265
- * @memberof AgentUpdate
1266
- */
1267
- 'mode'?: AgentUpdateModeEnum | null;
1268
- /**
1269
- *
1270
- * @type {FeePercentage}
1271
- * @memberof AgentUpdate
1272
- */
1273
- 'fee_percentage'?: FeePercentage | null;
1274
- /**
1275
- *
1276
- * @type {string}
1277
- * @memberof AgentUpdate
1278
- */
1279
- 'purpose': string | null;
1280
- /**
1281
- *
1282
- * @type {string}
1283
- * @memberof AgentUpdate
1284
- */
1285
- 'personality': string | null;
1286
- /**
1287
- *
1288
- * @type {string}
1289
- * @memberof AgentUpdate
1290
- */
1291
- 'principles': string | null;
1458
+ 'purpose'?: string | null;
1292
1459
  /**
1293
1460
  *
1294
1461
  * @type {string}
1295
1462
  * @memberof AgentUpdate
1296
1463
  */
1297
- 'owner'?: string | null;
1464
+ 'personality'?: string | null;
1298
1465
  /**
1299
1466
  *
1300
1467
  * @type {string}
1301
1468
  * @memberof AgentUpdate
1302
1469
  */
1303
- 'upstream_id'?: string | null;
1304
- /**
1305
- *
1306
- * @type {object}
1307
- * @memberof AgentUpdate
1308
- */
1309
- 'upstream_extra'?: object | null;
1470
+ 'principles'?: string | null;
1310
1471
  /**
1311
1472
  * AI model identifier to be used by this agent for processing requests.
1312
1473
  * @type {string}
@@ -1348,25 +1509,19 @@ export interface AgentUpdate {
1348
1509
  * @type {string}
1349
1510
  * @memberof AgentUpdate
1350
1511
  */
1351
- 'short_term_memory_strategy'?: AgentUpdateShortTermMemoryStrategyEnum | null;
1352
- /**
1353
- *
1354
- * @type {Array<AgentAutonomous>}
1355
- * @memberof AgentUpdate
1356
- */
1357
- 'autonomous'?: Array<AgentAutonomous> | null;
1512
+ 'wallet_provider'?: AgentUpdateWalletProviderEnum | null;
1358
1513
  /**
1359
1514
  *
1360
1515
  * @type {string}
1361
1516
  * @memberof AgentUpdate
1362
1517
  */
1363
- 'example_intro'?: string | null;
1518
+ 'readonly_wallet_address'?: string | null;
1364
1519
  /**
1365
1520
  *
1366
- * @type {Array<AgentExample>}
1521
+ * @type {string}
1367
1522
  * @memberof AgentUpdate
1368
1523
  */
1369
- 'examples'?: Array<AgentExample> | null;
1524
+ 'network_id'?: AgentUpdateNetworkIdEnum | null;
1370
1525
  /**
1371
1526
  *
1372
1527
  * @type {object}
@@ -1378,63 +1533,51 @@ export interface AgentUpdate {
1378
1533
  * @type {string}
1379
1534
  * @memberof AgentUpdate
1380
1535
  */
1381
- 'wallet_provider'?: AgentUpdateWalletProviderEnum | null;
1536
+ 'short_term_memory_strategy'?: AgentUpdateShortTermMemoryStrategyEnum | null;
1382
1537
  /**
1383
1538
  *
1384
- * @type {string}
1539
+ * @type {Array<AgentAutonomous>}
1385
1540
  * @memberof AgentUpdate
1386
1541
  */
1387
- 'readonly_wallet_address'?: string | null;
1542
+ 'autonomous'?: Array<AgentAutonomous> | null;
1388
1543
  /**
1389
1544
  *
1390
- * @type {string}
1545
+ * @type {boolean}
1391
1546
  * @memberof AgentUpdate
1392
1547
  */
1393
- 'network_id'?: AgentUpdateNetworkIdEnum | null;
1548
+ 'telegram_entrypoint_enabled'?: boolean | null;
1394
1549
  /**
1395
1550
  *
1396
1551
  * @type {string}
1397
1552
  * @memberof AgentUpdate
1398
1553
  */
1399
- 'cdp_network_id'?: AgentUpdateCdpNetworkIdEnum | null;
1554
+ 'telegram_entrypoint_prompt'?: string | null;
1400
1555
  /**
1401
1556
  *
1402
- * @type {boolean}
1557
+ * @type {object}
1403
1558
  * @memberof AgentUpdate
1404
1559
  */
1405
- 'telegram_entrypoint_enabled'?: boolean | null;
1560
+ 'telegram_config'?: object | null;
1406
1561
  /**
1407
1562
  *
1408
1563
  * @type {string}
1409
1564
  * @memberof AgentUpdate
1410
1565
  */
1411
- 'telegram_entrypoint_prompt'?: string | null;
1566
+ 'xmtp_entrypoint_prompt'?: string | null;
1412
1567
  /**
1413
1568
  *
1414
- * @type {object}
1569
+ * @type {string}
1415
1570
  * @memberof AgentUpdate
1416
1571
  */
1417
- 'telegram_config'?: object | null;
1572
+ 'upstream_id'?: string | null;
1418
1573
  /**
1419
1574
  *
1420
- * @type {string}
1575
+ * @type {object}
1421
1576
  * @memberof AgentUpdate
1422
1577
  */
1423
- 'xmtp_entrypoint_prompt'?: string | null;
1578
+ 'upstream_extra'?: object | null;
1424
1579
  }
1425
1580
 
1426
- export const AgentUpdateModeEnum = {
1427
- Public: 'public',
1428
- Private: 'private'
1429
- } as const;
1430
-
1431
- export type AgentUpdateModeEnum = typeof AgentUpdateModeEnum[keyof typeof AgentUpdateModeEnum];
1432
- export const AgentUpdateShortTermMemoryStrategyEnum = {
1433
- Trim: 'trim',
1434
- Summarize: 'summarize'
1435
- } as const;
1436
-
1437
- export type AgentUpdateShortTermMemoryStrategyEnum = typeof AgentUpdateShortTermMemoryStrategyEnum[keyof typeof AgentUpdateShortTermMemoryStrategyEnum];
1438
1581
  export const AgentUpdateWalletProviderEnum = {
1439
1582
  Cdp: 'cdp',
1440
1583
  Readonly: 'readonly'
@@ -1456,53 +1599,207 @@ export const AgentUpdateNetworkIdEnum = {
1456
1599
  } as const;
1457
1600
 
1458
1601
  export type AgentUpdateNetworkIdEnum = typeof AgentUpdateNetworkIdEnum[keyof typeof AgentUpdateNetworkIdEnum];
1459
- export const AgentUpdateCdpNetworkIdEnum = {
1460
- EthereumMainnet: 'ethereum-mainnet',
1461
- EthereumSepolia: 'ethereum-sepolia',
1462
- PolygonMainnet: 'polygon-mainnet',
1463
- PolygonMumbai: 'polygon-mumbai',
1464
- BaseMainnet: 'base-mainnet',
1465
- BaseSepolia: 'base-sepolia',
1466
- ArbitrumMainnet: 'arbitrum-mainnet',
1467
- ArbitrumSepolia: 'arbitrum-sepolia',
1468
- OptimismMainnet: 'optimism-mainnet',
1469
- OptimismSepolia: 'optimism-sepolia'
1602
+ export const AgentUpdateShortTermMemoryStrategyEnum = {
1603
+ Trim: 'trim',
1604
+ Summarize: 'summarize'
1470
1605
  } as const;
1471
1606
 
1472
- export type AgentUpdateCdpNetworkIdEnum = typeof AgentUpdateCdpNetworkIdEnum[keyof typeof AgentUpdateCdpNetworkIdEnum];
1607
+ export type AgentUpdateShortTermMemoryStrategyEnum = typeof AgentUpdateShortTermMemoryStrategyEnum[keyof typeof AgentUpdateShortTermMemoryStrategyEnum];
1473
1608
 
1474
1609
  /**
1475
- * Model for individual asset with symbol and balance.
1610
+ * Agent update model.
1476
1611
  * @export
1477
- * @interface Asset
1612
+ * @interface AgentUserInput
1478
1613
  */
1479
- export interface Asset {
1614
+ export interface AgentUserInput {
1480
1615
  /**
1481
- * Asset symbol (e.g., ETH, USDC, NATION)
1616
+ *
1482
1617
  * @type {string}
1483
- * @memberof Asset
1618
+ * @memberof AgentUserInput
1484
1619
  */
1485
- 'symbol': string;
1620
+ 'name': string | null;
1486
1621
  /**
1487
- * Asset balance as decimal
1622
+ *
1488
1623
  * @type {string}
1489
- * @memberof Asset
1624
+ * @memberof AgentUserInput
1490
1625
  */
1491
- 'balance': string;
1492
- }
1493
- /**
1494
- * Type of message author.
1495
- * @export
1496
- * @enum {string}
1497
- */
1498
-
1499
- export const AuthorType = {
1500
- Agent: 'agent',
1501
- Trigger: 'trigger',
1502
- Skill: 'skill',
1503
- Telegram: 'telegram',
1504
- Twitter: 'twitter',
1505
- Web: 'web',
1626
+ 'picture'?: string | null;
1627
+ /**
1628
+ *
1629
+ * @type {string}
1630
+ * @memberof AgentUserInput
1631
+ */
1632
+ 'purpose'?: string | null;
1633
+ /**
1634
+ *
1635
+ * @type {string}
1636
+ * @memberof AgentUserInput
1637
+ */
1638
+ 'personality'?: string | null;
1639
+ /**
1640
+ *
1641
+ * @type {string}
1642
+ * @memberof AgentUserInput
1643
+ */
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;
1651
+ /**
1652
+ *
1653
+ * @type {string}
1654
+ * @memberof AgentUserInput
1655
+ */
1656
+ 'prompt'?: string | null;
1657
+ /**
1658
+ *
1659
+ * @type {string}
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
1691
+ */
1692
+ 'readonly_wallet_address'?: string | null;
1693
+ /**
1694
+ *
1695
+ * @type {string}
1696
+ * @memberof AgentUserInput
1697
+ */
1698
+ 'network_id'?: AgentUserInputNetworkIdEnum | null;
1699
+ /**
1700
+ *
1701
+ * @type {object}
1702
+ * @memberof AgentUserInput
1703
+ */
1704
+ 'skills'?: object | null;
1705
+ /**
1706
+ *
1707
+ * @type {string}
1708
+ * @memberof AgentUserInput
1709
+ */
1710
+ 'short_term_memory_strategy'?: AgentUserInputShortTermMemoryStrategyEnum | null;
1711
+ /**
1712
+ *
1713
+ * @type {Array<AgentAutonomous>}
1714
+ * @memberof AgentUserInput
1715
+ */
1716
+ 'autonomous'?: Array<AgentAutonomous> | null;
1717
+ /**
1718
+ *
1719
+ * @type {boolean}
1720
+ * @memberof AgentUserInput
1721
+ */
1722
+ 'telegram_entrypoint_enabled'?: boolean | null;
1723
+ /**
1724
+ *
1725
+ * @type {string}
1726
+ * @memberof AgentUserInput
1727
+ */
1728
+ 'telegram_entrypoint_prompt'?: string | null;
1729
+ /**
1730
+ *
1731
+ * @type {object}
1732
+ * @memberof AgentUserInput
1733
+ */
1734
+ 'telegram_config'?: object | null;
1735
+ /**
1736
+ *
1737
+ * @type {string}
1738
+ * @memberof AgentUserInput
1739
+ */
1740
+ 'xmtp_entrypoint_prompt'?: string | null;
1741
+ }
1742
+
1743
+ export const AgentUserInputWalletProviderEnum = {
1744
+ Cdp: 'cdp',
1745
+ Readonly: 'readonly'
1746
+ } as const;
1747
+
1748
+ export type AgentUserInputWalletProviderEnum = typeof AgentUserInputWalletProviderEnum[keyof typeof AgentUserInputWalletProviderEnum];
1749
+ export const AgentUserInputNetworkIdEnum = {
1750
+ EthereumMainnet: 'ethereum-mainnet',
1751
+ EthereumSepolia: 'ethereum-sepolia',
1752
+ PolygonMainnet: 'polygon-mainnet',
1753
+ PolygonMumbai: 'polygon-mumbai',
1754
+ BaseMainnet: 'base-mainnet',
1755
+ BaseSepolia: 'base-sepolia',
1756
+ ArbitrumMainnet: 'arbitrum-mainnet',
1757
+ ArbitrumSepolia: 'arbitrum-sepolia',
1758
+ OptimismMainnet: 'optimism-mainnet',
1759
+ OptimismSepolia: 'optimism-sepolia',
1760
+ Solana: 'solana'
1761
+ } as const;
1762
+
1763
+ export type AgentUserInputNetworkIdEnum = typeof AgentUserInputNetworkIdEnum[keyof typeof AgentUserInputNetworkIdEnum];
1764
+ export const AgentUserInputShortTermMemoryStrategyEnum = {
1765
+ Trim: 'trim',
1766
+ Summarize: 'summarize'
1767
+ } as const;
1768
+
1769
+ export type AgentUserInputShortTermMemoryStrategyEnum = typeof AgentUserInputShortTermMemoryStrategyEnum[keyof typeof AgentUserInputShortTermMemoryStrategyEnum];
1770
+
1771
+ /**
1772
+ * Model for individual asset with symbol and balance.
1773
+ * @export
1774
+ * @interface Asset
1775
+ */
1776
+ export interface Asset {
1777
+ /**
1778
+ * Asset symbol (e.g., ETH, USDC, NATION)
1779
+ * @type {string}
1780
+ * @memberof Asset
1781
+ */
1782
+ 'symbol': string;
1783
+ /**
1784
+ * Asset balance as decimal
1785
+ * @type {string}
1786
+ * @memberof Asset
1787
+ */
1788
+ 'balance': string;
1789
+ }
1790
+ /**
1791
+ * Type of message author.
1792
+ * @export
1793
+ * @enum {string}
1794
+ */
1795
+
1796
+ export const AuthorType = {
1797
+ Agent: 'agent',
1798
+ Trigger: 'trigger',
1799
+ Skill: 'skill',
1800
+ Telegram: 'telegram',
1801
+ Twitter: 'twitter',
1802
+ Web: 'web',
1506
1803
  System: 'system',
1507
1804
  Api: 'api',
1508
1805
  Xmtp: 'xmtp'
@@ -2784,13 +3081,6 @@ export const EventType = {
2784
3081
  export type EventType = typeof EventType[keyof typeof EventType];
2785
3082
 
2786
3083
 
2787
- /**
2788
- * Fee percentage of the agent
2789
- * @export
2790
- * @interface FeePercentage
2791
- */
2792
- export interface FeePercentage {
2793
- }
2794
3084
  /**
2795
3085
  * Response model for single generation detail.
2796
3086
  * @export
@@ -3696,48 +3986,6 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
3696
3986
  options: localVarRequestOptions,
3697
3987
  };
3698
3988
  },
3699
- /**
3700
- * 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
3701
- * @summary Update Agent
3702
- * @param {string} agentId ID of the agent to update
3703
- * @param {AgentUpdate} [agentUpdate]
3704
- * @param {*} [options] Override http request option.
3705
- * @throws {RequiredError}
3706
- */
3707
- updateAgent: async (agentId: string, agentUpdate?: AgentUpdate, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3708
- // verify required parameter 'agentId' is not null or undefined
3709
- assertParamExists('updateAgent', 'agentId', agentId)
3710
- const localVarPath = `/agents/{agent_id}`
3711
- .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
3712
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
3713
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3714
- let baseOptions;
3715
- if (configuration) {
3716
- baseOptions = configuration.baseOptions;
3717
- }
3718
-
3719
- const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
3720
- const localVarHeaderParameter = {} as any;
3721
- const localVarQueryParameter = {} as any;
3722
-
3723
- // authentication HTTPBearer required
3724
- // http bearer authentication required
3725
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
3726
-
3727
-
3728
-
3729
- localVarHeaderParameter['Content-Type'] = 'application/json';
3730
-
3731
- setSearchParams(localVarUrlObj, localVarQueryParameter);
3732
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3733
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3734
- localVarRequestOptions.data = serializeDataIfNeeded(agentUpdate, localVarRequestOptions, configuration)
3735
-
3736
- return {
3737
- url: toPathString(localVarUrlObj),
3738
- options: localVarRequestOptions,
3739
- };
3740
- },
3741
3989
  /**
3742
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
3743
3991
  * @summary Validate Agent Create
@@ -3861,7 +4109,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
3861
4109
  * @param {*} [options] Override http request option.
3862
4110
  * @throws {RequiredError}
3863
4111
  */
3864
- 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>> {
3865
4113
  const localVarAxiosArgs = await localVarAxiosParamCreator.getAgent(agentId, options);
3866
4114
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3867
4115
  const localVarOperationServerBasePath = operationServerMap['AgentApi.getAgent']?.[localVarOperationServerIndex]?.url;
@@ -3958,7 +4206,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
3958
4206
  * @param {*} [options] Override http request option.
3959
4207
  * @throws {RequiredError}
3960
4208
  */
3961
- 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>> {
3962
4210
  const localVarAxiosArgs = await localVarAxiosParamCreator.overrideAgent(agentId, agentUpdate, options);
3963
4211
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3964
4212
  const localVarOperationServerBasePath = operationServerMap['AgentApi.overrideAgent']?.[localVarOperationServerIndex]?.url;
@@ -3977,20 +4225,6 @@ export const AgentApiFp = function(configuration?: Configuration) {
3977
4225
  const localVarOperationServerBasePath = operationServerMap['AgentApi.resetAgentApiKey']?.[localVarOperationServerIndex]?.url;
3978
4226
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3979
4227
  },
3980
- /**
3981
- * 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
3982
- * @summary Update Agent
3983
- * @param {string} agentId ID of the agent to update
3984
- * @param {AgentUpdate} [agentUpdate]
3985
- * @param {*} [options] Override http request option.
3986
- * @throws {RequiredError}
3987
- */
3988
- async updateAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
3989
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateAgent(agentId, agentUpdate, options);
3990
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3991
- const localVarOperationServerBasePath = operationServerMap['AgentApi.updateAgent']?.[localVarOperationServerIndex]?.url;
3992
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3993
- },
3994
4228
  /**
3995
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
3996
4230
  * @summary Validate Agent Create
@@ -4055,7 +4289,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
4055
4289
  * @param {*} [options] Override http request option.
4056
4290
  * @throws {RequiredError}
4057
4291
  */
4058
- getAgent(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4292
+ getAgent(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
4059
4293
  return localVarFp.getAgent(agentId, options).then((request) => request(axios, basePath));
4060
4294
  },
4061
4295
  /**
@@ -4131,7 +4365,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
4131
4365
  * @param {*} [options] Override http request option.
4132
4366
  * @throws {RequiredError}
4133
4367
  */
4134
- overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4368
+ overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
4135
4369
  return localVarFp.overrideAgent(agentId, agentUpdate, options).then((request) => request(axios, basePath));
4136
4370
  },
4137
4371
  /**
@@ -4144,17 +4378,6 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
4144
4378
  resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentApiKeyResponse> {
4145
4379
  return localVarFp.resetAgentApiKey(agentId, options).then((request) => request(axios, basePath));
4146
4380
  },
4147
- /**
4148
- * 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
4149
- * @summary Update Agent
4150
- * @param {string} agentId ID of the agent to update
4151
- * @param {AgentUpdate} [agentUpdate]
4152
- * @param {*} [options] Override http request option.
4153
- * @throws {RequiredError}
4154
- */
4155
- updateAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<any> {
4156
- return localVarFp.updateAgent(agentId, agentUpdate, options).then((request) => request(axios, basePath));
4157
- },
4158
4381
  /**
4159
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
4160
4383
  * @summary Validate Agent Create
@@ -4324,19 +4547,6 @@ export class AgentApi extends BaseAPI {
4324
4547
  return AgentApiFp(this.configuration).resetAgentApiKey(agentId, options).then((request) => request(this.axios, this.basePath));
4325
4548
  }
4326
4549
 
4327
- /**
4328
- * 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
4329
- * @summary Update Agent
4330
- * @param {string} agentId ID of the agent to update
4331
- * @param {AgentUpdate} [agentUpdate]
4332
- * @param {*} [options] Override http request option.
4333
- * @throws {RequiredError}
4334
- * @memberof AgentApi
4335
- */
4336
- public updateAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig) {
4337
- return AgentApiFp(this.configuration).updateAgent(agentId, agentUpdate, options).then((request) => request(this.axios, this.basePath));
4338
- }
4339
-
4340
4550
  /**
4341
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
4342
4552
  * @summary Validate Agent Create
@@ -5196,54 +5406,516 @@ export class ChatApi extends BaseAPI {
5196
5406
  }
5197
5407
 
5198
5408
  /**
5199
- * 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\'.
5200
- * @summary Send a message to a chat thread
5201
- * @param {string} aid Agent ID
5202
- * @param {string} chatId Chat ID
5203
- * @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
5204
5876
  * @param {*} [options] Override http request option.
5205
5877
  * @throws {RequiredError}
5206
- * @memberof ChatApi
5878
+ * @memberof CreditApi
5207
5879
  */
5208
- public sendMessageToChat(aid: string, chatId: string, chatMessageRequest: ChatMessageRequest, options?: RawAxiosRequestConfig) {
5209
- 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));
5210
5882
  }
5211
5883
 
5212
5884
  /**
5213
- * Update details of a specific chat thread. Currently only supports updating the summary.
5214
- * @summary Update a chat thread
5215
- * @param {string} aid Agent ID
5216
- * @param {string} chatId Chat ID
5217
- * @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
5218
5891
  * @param {*} [options] Override http request option.
5219
5892
  * @throws {RequiredError}
5220
- * @memberof ChatApi
5893
+ * @memberof CreditApi
5221
5894
  */
5222
- public updateChatThread(aid: string, chatId: string, chatUpdateRequest: ChatUpdateRequest, options?: RawAxiosRequestConfig) {
5223
- 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));
5224
5897
  }
5225
5898
  }
5226
5899
 
5227
5900
 
5228
5901
 
5229
5902
  /**
5230
- * CreditApi - axios parameter creator
5903
+ * DraftApi - axios parameter creator
5231
5904
  * @export
5232
5905
  */
5233
- export const CreditApiAxiosParamCreator = function (configuration?: Configuration) {
5906
+ export const DraftApiAxiosParamCreator = function (configuration?: Configuration) {
5234
5907
  return {
5235
5908
  /**
5236
- * 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.
5237
- * @summary Credit Event
5238
- * @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
5239
5912
  * @param {*} [options] Override http request option.
5240
5913
  * @throws {RequiredError}
5241
5914
  */
5242
- fetchCreditEvent: async (eventId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5243
- // verify required parameter 'eventId' is not null or undefined
5244
- assertParamExists('fetchCreditEvent', 'eventId', eventId)
5245
- const localVarPath = `/credit/events/{event_id}`
5246
- .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`;
5247
5919
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5248
5920
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5249
5921
  let baseOptions;
@@ -5251,7 +5923,7 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5251
5923
  baseOptions = configuration.baseOptions;
5252
5924
  }
5253
5925
 
5254
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
5926
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
5255
5927
  const localVarHeaderParameter = {} as any;
5256
5928
  const localVarQueryParameter = {} as any;
5257
5929
 
@@ -5261,9 +5933,12 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5261
5933
 
5262
5934
 
5263
5935
 
5936
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5937
+
5264
5938
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5265
5939
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5266
5940
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
5941
+ localVarRequestOptions.data = serializeDataIfNeeded(agentUserInput, localVarRequestOptions, configuration)
5267
5942
 
5268
5943
  return {
5269
5944
  url: toPathString(localVarUrlObj),
@@ -5271,13 +5946,21 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5271
5946
  };
5272
5947
  },
5273
5948
  /**
5274
- * 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.
5275
- * @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
5276
5953
  * @param {*} [options] Override http request option.
5277
5954
  * @throws {RequiredError}
5278
5955
  */
5279
- getUserAccount: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5280
- 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)));
5281
5964
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5282
5965
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5283
5966
  let baseOptions;
@@ -5305,18 +5988,16 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5305
5988
  };
5306
5989
  },
5307
5990
  /**
5308
- * 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.
5309
- * @summary List Agent Income
5310
- * @param {string} agentId
5311
- * @param {string | null} [cursor] Cursor for pagination
5312
- * @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
5313
5994
  * @param {*} [options] Override http request option.
5314
5995
  * @throws {RequiredError}
5315
5996
  */
5316
- listAgentIncomeEvents: async (agentId: string, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5997
+ getAgentDrafts: async (agentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5317
5998
  // verify required parameter 'agentId' is not null or undefined
5318
- assertParamExists('listAgentIncomeEvents', 'agentId', agentId)
5319
- const localVarPath = `/credit/agents/{agent_id}/events`
5999
+ assertParamExists('getAgentDrafts', 'agentId', agentId)
6000
+ const localVarPath = `/agents/{agent_id}/drafts`
5320
6001
  .replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
5321
6002
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5322
6003
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -5333,14 +6014,6 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5333
6014
  // http bearer authentication required
5334
6015
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
5335
6016
 
5336
- if (cursor !== undefined) {
5337
- localVarQueryParameter['cursor'] = cursor;
5338
- }
5339
-
5340
- if (limit !== undefined) {
5341
- localVarQueryParameter['limit'] = limit;
5342
- }
5343
-
5344
6017
 
5345
6018
 
5346
6019
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -5353,17 +6026,17 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5353
6026
  };
5354
6027
  },
5355
6028
  /**
5356
- * 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.
5357
- * @summary List User Events
5358
- * @param {Array<EventType> | null} [eventType] Event types
5359
- * @param {Direction | null} [direction] Direction of events
5360
- * @param {string | null} [cursor] Cursor for pagination
5361
- * @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. For backward compatibility, if no draft exists for the agent, this endpoint will check if the agent exists in the agents table and automatically create a draft from the existing agent data. 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
5362
6032
  * @param {*} [options] Override http request option.
5363
6033
  * @throws {RequiredError}
5364
6034
  */
5365
- listUserEvents: async (eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5366
- 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)));
5367
6040
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5368
6041
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5369
6042
  let baseOptions;
@@ -5379,22 +6052,6 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5379
6052
  // http bearer authentication required
5380
6053
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
5381
6054
 
5382
- if (eventType) {
5383
- localVarQueryParameter['event_type'] = eventType;
5384
- }
5385
-
5386
- if (direction !== undefined) {
5387
- localVarQueryParameter['direction'] = direction;
5388
- }
5389
-
5390
- if (cursor !== undefined) {
5391
- localVarQueryParameter['cursor'] = cursor;
5392
- }
5393
-
5394
- if (limit !== undefined) {
5395
- localVarQueryParameter['limit'] = limit;
5396
- }
5397
-
5398
6055
 
5399
6056
 
5400
6057
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -5407,17 +6064,20 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5407
6064
  };
5408
6065
  },
5409
6066
  /**
5410
- * 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.
5411
- * @summary List User Transactions
5412
- * @param {Array<TransactionType> | null} [txType] Transaction types
5413
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5414
- * @param {string | null} [cursor] Cursor for pagination
5415
- * @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
5416
6071
  * @param {*} [options] Override http request option.
5417
6072
  * @throws {RequiredError}
5418
6073
  */
5419
- listUserTransactions: async (txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
5420
- 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)));
5421
6081
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
5422
6082
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
5423
6083
  let baseOptions;
@@ -5425,7 +6085,7 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5425
6085
  baseOptions = configuration.baseOptions;
5426
6086
  }
5427
6087
 
5428
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
6088
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
5429
6089
  const localVarHeaderParameter = {} as any;
5430
6090
  const localVarQueryParameter = {} as any;
5431
6091
 
@@ -5433,27 +6093,14 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5433
6093
  // http bearer authentication required
5434
6094
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
5435
6095
 
5436
- if (txType) {
5437
- localVarQueryParameter['tx_type'] = txType;
5438
- }
5439
-
5440
- if (creditDebit !== undefined) {
5441
- localVarQueryParameter['credit_debit'] = creditDebit;
5442
- }
5443
-
5444
- if (cursor !== undefined) {
5445
- localVarQueryParameter['cursor'] = cursor;
5446
- }
5447
-
5448
- if (limit !== undefined) {
5449
- localVarQueryParameter['limit'] = limit;
5450
- }
5451
-
5452
6096
 
5453
6097
 
6098
+ localVarHeaderParameter['Content-Type'] = 'application/json';
6099
+
5454
6100
  setSearchParams(localVarUrlObj, localVarQueryParameter);
5455
6101
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
5456
6102
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
6103
+ localVarRequestOptions.data = serializeDataIfNeeded(agentUserInput, localVarRequestOptions, configuration)
5457
6104
 
5458
6105
  return {
5459
6106
  url: toPathString(localVarUrlObj),
@@ -5464,226 +6111,211 @@ export const CreditApiAxiosParamCreator = function (configuration?: Configuratio
5464
6111
  };
5465
6112
 
5466
6113
  /**
5467
- * CreditApi - functional programming interface
6114
+ * DraftApi - functional programming interface
5468
6115
  * @export
5469
6116
  */
5470
- export const CreditApiFp = function(configuration?: Configuration) {
5471
- const localVarAxiosParamCreator = CreditApiAxiosParamCreator(configuration)
6117
+ export const DraftApiFp = function(configuration?: Configuration) {
6118
+ const localVarAxiosParamCreator = DraftApiAxiosParamCreator(configuration)
5472
6119
  return {
5473
6120
  /**
5474
- * 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.
5475
- * @summary Credit Event
5476
- * @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
5477
6124
  * @param {*} [options] Override http request option.
5478
6125
  * @throws {RequiredError}
5479
6126
  */
5480
- async fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEvent>> {
5481
- 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);
5482
6129
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5483
- const localVarOperationServerBasePath = operationServerMap['CreditApi.fetchCreditEvent']?.[localVarOperationServerIndex]?.url;
6130
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.createAgentDraft']?.[localVarOperationServerIndex]?.url;
5484
6131
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5485
6132
  },
5486
6133
  /**
5487
- * 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.
5488
- * @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
5489
6138
  * @param {*} [options] Override http request option.
5490
6139
  * @throws {RequiredError}
5491
6140
  */
5492
- async getUserAccount(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditAccount>> {
5493
- 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);
5494
6143
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5495
- const localVarOperationServerBasePath = operationServerMap['CreditApi.getUserAccount']?.[localVarOperationServerIndex]?.url;
6144
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentDraftById']?.[localVarOperationServerIndex]?.url;
5496
6145
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5497
6146
  },
5498
6147
  /**
5499
- * 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.
5500
- * @summary List Agent Income
5501
- * @param {string} agentId
5502
- * @param {string | null} [cursor] Cursor for pagination
5503
- * @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
5504
6151
  * @param {*} [options] Override http request option.
5505
6152
  * @throws {RequiredError}
5506
6153
  */
5507
- async listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
5508
- 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);
5509
6156
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5510
- const localVarOperationServerBasePath = operationServerMap['CreditApi.listAgentIncomeEvents']?.[localVarOperationServerIndex]?.url;
6157
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentDrafts']?.[localVarOperationServerIndex]?.url;
5511
6158
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5512
6159
  },
5513
6160
  /**
5514
- * 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.
5515
- * @summary List User Events
5516
- * @param {Array<EventType> | null} [eventType] Event types
5517
- * @param {Direction | null} [direction] Direction of events
5518
- * @param {string | null} [cursor] Cursor for pagination
5519
- * @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. For backward compatibility, if no draft exists for the agent, this endpoint will check if the agent exists in the agents table and automatically create a draft from the existing agent data. 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
5520
6164
  * @param {*} [options] Override http request option.
5521
6165
  * @throws {RequiredError}
5522
6166
  */
5523
- async listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditEventsResponse>> {
5524
- 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);
5525
6169
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5526
- const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserEvents']?.[localVarOperationServerIndex]?.url;
6170
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentLatestDraft']?.[localVarOperationServerIndex]?.url;
5527
6171
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5528
6172
  },
5529
6173
  /**
5530
- * 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.
5531
- * @summary List User Transactions
5532
- * @param {Array<TransactionType> | null} [txType] Transaction types
5533
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5534
- * @param {string | null} [cursor] Cursor for pagination
5535
- * @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
5536
6178
  * @param {*} [options] Override http request option.
5537
6179
  * @throws {RequiredError}
5538
6180
  */
5539
- async listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreditTransactionsResponse>> {
5540
- 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);
5541
6183
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
5542
- const localVarOperationServerBasePath = operationServerMap['CreditApi.listUserTransactions']?.[localVarOperationServerIndex]?.url;
6184
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.updateAgentDraft']?.[localVarOperationServerIndex]?.url;
5543
6185
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
5544
6186
  },
5545
6187
  }
5546
6188
  };
5547
6189
 
5548
6190
  /**
5549
- * CreditApi - factory interface
6191
+ * DraftApi - factory interface
5550
6192
  * @export
5551
6193
  */
5552
- export const CreditApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
5553
- const localVarFp = CreditApiFp(configuration)
6194
+ export const DraftApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
6195
+ const localVarFp = DraftApiFp(configuration)
5554
6196
  return {
5555
6197
  /**
5556
- * 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.
5557
- * @summary Credit Event
5558
- * @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
5559
6201
  * @param {*} [options] Override http request option.
5560
6202
  * @throws {RequiredError}
5561
6203
  */
5562
- fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig): AxiosPromise<CreditEvent> {
5563
- 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));
5564
6206
  },
5565
6207
  /**
5566
- * 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.
5567
- * @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
5568
6212
  * @param {*} [options] Override http request option.
5569
6213
  * @throws {RequiredError}
5570
6214
  */
5571
- getUserAccount(options?: RawAxiosRequestConfig): AxiosPromise<CreditAccount> {
5572
- 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));
5573
6217
  },
5574
6218
  /**
5575
- * 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.
5576
- * @summary List Agent Income
5577
- * @param {string} agentId
5578
- * @param {string | null} [cursor] Cursor for pagination
5579
- * @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
5580
6222
  * @param {*} [options] Override http request option.
5581
6223
  * @throws {RequiredError}
5582
6224
  */
5583
- listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
5584
- 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));
5585
6227
  },
5586
6228
  /**
5587
- * 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.
5588
- * @summary List User Events
5589
- * @param {Array<EventType> | null} [eventType] Event types
5590
- * @param {Direction | null} [direction] Direction of events
5591
- * @param {string | null} [cursor] Cursor for pagination
5592
- * @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. For backward compatibility, if no draft exists for the agent, this endpoint will check if the agent exists in the agents table and automatically create a draft from the existing agent data. 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
5593
6232
  * @param {*} [options] Override http request option.
5594
6233
  * @throws {RequiredError}
5595
6234
  */
5596
- listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditEventsResponse> {
5597
- 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));
5598
6237
  },
5599
6238
  /**
5600
- * 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.
5601
- * @summary List User Transactions
5602
- * @param {Array<TransactionType> | null} [txType] Transaction types
5603
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5604
- * @param {string | null} [cursor] Cursor for pagination
5605
- * @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
5606
6243
  * @param {*} [options] Override http request option.
5607
6244
  * @throws {RequiredError}
5608
6245
  */
5609
- listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<CreditTransactionsResponse> {
5610
- 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));
5611
6248
  },
5612
6249
  };
5613
6250
  };
5614
6251
 
5615
6252
  /**
5616
- * CreditApi - object-oriented interface
6253
+ * DraftApi - object-oriented interface
5617
6254
  * @export
5618
- * @class CreditApi
6255
+ * @class DraftApi
5619
6256
  * @extends {BaseAPI}
5620
6257
  */
5621
- export class CreditApi extends BaseAPI {
6258
+ export class DraftApi extends BaseAPI {
5622
6259
  /**
5623
- * 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.
5624
- * @summary Credit Event
5625
- * @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
5626
6263
  * @param {*} [options] Override http request option.
5627
6264
  * @throws {RequiredError}
5628
- * @memberof CreditApi
6265
+ * @memberof DraftApi
5629
6266
  */
5630
- public fetchCreditEvent(eventId: string, options?: RawAxiosRequestConfig) {
5631
- 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));
5632
6269
  }
5633
6270
 
5634
6271
  /**
5635
- * 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.
5636
- * @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
5637
6276
  * @param {*} [options] Override http request option.
5638
6277
  * @throws {RequiredError}
5639
- * @memberof CreditApi
6278
+ * @memberof DraftApi
5640
6279
  */
5641
- public getUserAccount(options?: RawAxiosRequestConfig) {
5642
- 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));
5643
6282
  }
5644
6283
 
5645
6284
  /**
5646
- * 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.
5647
- * @summary List Agent Income
5648
- * @param {string} agentId
5649
- * @param {string | null} [cursor] Cursor for pagination
5650
- * @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
5651
6288
  * @param {*} [options] Override http request option.
5652
6289
  * @throws {RequiredError}
5653
- * @memberof CreditApi
6290
+ * @memberof DraftApi
5654
6291
  */
5655
- public listAgentIncomeEvents(agentId: string, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5656
- 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));
5657
6294
  }
5658
6295
 
5659
6296
  /**
5660
- * 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.
5661
- * @summary List User Events
5662
- * @param {Array<EventType> | null} [eventType] Event types
5663
- * @param {Direction | null} [direction] Direction of events
5664
- * @param {string | null} [cursor] Cursor for pagination
5665
- * @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. For backward compatibility, if no draft exists for the agent, this endpoint will check if the agent exists in the agents table and automatically create a draft from the existing agent data. 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
5666
6300
  * @param {*} [options] Override http request option.
5667
6301
  * @throws {RequiredError}
5668
- * @memberof CreditApi
6302
+ * @memberof DraftApi
5669
6303
  */
5670
- public listUserEvents(eventType?: Array<EventType> | null, direction?: Direction | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5671
- 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));
5672
6306
  }
5673
6307
 
5674
6308
  /**
5675
- * 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.
5676
- * @summary List User Transactions
5677
- * @param {Array<TransactionType> | null} [txType] Transaction types
5678
- * @param {CreditDebit | null} [creditDebit] Credit or debit
5679
- * @param {string | null} [cursor] Cursor for pagination
5680
- * @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
5681
6313
  * @param {*} [options] Override http request option.
5682
6314
  * @throws {RequiredError}
5683
- * @memberof CreditApi
6315
+ * @memberof DraftApi
5684
6316
  */
5685
- public listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig) {
5686
- 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));
5687
6319
  }
5688
6320
  }
5689
6321