@crestal/nation-sdk 0.1.19 → 0.1.21

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/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Nation IntentKit API
6
6
  * API for Nation IntentKit services
7
7
  *
8
- * The version of the OpenAPI document: 0.1.19
8
+ * The version of the OpenAPI document: 0.1.21
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -84,7 +84,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
84
84
  return to.concat(ar || Array.prototype.slice.call(from));
85
85
  };
86
86
  Object.defineProperty(exports, "__esModule", { value: true });
87
- exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.CreditApi = exports.CreditApiFactory = exports.CreditApiFp = exports.CreditApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AgentApi = exports.AgentApiFactory = exports.AgentApiFp = exports.AgentApiAxiosParamCreator = exports.UpstreamType = exports.TransactionType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUpdateCdpNetworkIdEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateModeEnum = exports.AgentResponseWalletProviderEnum = exports.AgentResponseModeEnum = void 0;
87
+ exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.CreditApi = exports.CreditApiFactory = exports.CreditApiFp = exports.CreditApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AgentApi = exports.AgentApiFactory = exports.AgentApiFp = exports.AgentApiAxiosParamCreator = exports.UpstreamType = exports.TransactionType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUpdateCdpNetworkIdEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateModeEnum = exports.AgentSortOption = exports.AgentResponseWalletProviderEnum = exports.AgentResponseModeEnum = void 0;
88
88
  var axios_1 = require("axios");
89
89
  // Some imports not used depending on template conditions
90
90
  // @ts-ignore
@@ -98,6 +98,16 @@ exports.AgentResponseModeEnum = {
98
98
  exports.AgentResponseWalletProviderEnum = {
99
99
  Cdp: 'cdp'
100
100
  };
101
+ /**
102
+ * Sort options for agents list.
103
+ * @export
104
+ * @enum {string}
105
+ */
106
+ exports.AgentSortOption = {
107
+ CreatedAtDesc: 'created_at desc',
108
+ CreatedAtAsc: 'created_at asc',
109
+ UpdatedAtDesc: 'updated_at desc'
110
+ };
101
111
  exports.AgentUpdateModeEnum = {
102
112
  Public: 'public',
103
113
  Private: 'private'
@@ -271,9 +281,9 @@ var AgentApiAxiosParamCreator = function (configuration) {
271
281
  var _this = this;
272
282
  return {
273
283
  /**
274
- * Create a new agent owned by the current user. The agent will be initialized with the provided details.
275
- * @summary Create a new agent
276
- * @param {AgentUpdate} agentUpdate
284
+ * Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
285
+ * @summary Create Agent
286
+ * @param {AgentUpdate} [agentUpdate]
277
287
  * @param {*} [options] Override http request option.
278
288
  * @throws {RequiredError}
279
289
  */
@@ -288,8 +298,6 @@ var AgentApiAxiosParamCreator = function (configuration) {
288
298
  return __generator(this, function (_a) {
289
299
  switch (_a.label) {
290
300
  case 0:
291
- // verify required parameter 'agentUpdate' is not null or undefined
292
- (0, common_1.assertParamExists)('createAgent', 'agentUpdate', agentUpdate);
293
301
  localVarPath = "/agents";
294
302
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
295
303
  if (configuration) {
@@ -319,25 +327,72 @@ var AgentApiAxiosParamCreator = function (configuration) {
319
327
  });
320
328
  },
321
329
  /**
322
- * Retrieve a specific agent by its ID. Returns 404 if not found.
323
- * @summary Get agent by ID
324
- * @param {string} aid Agent ID
330
+ * Export agent configuration as YAML. **Path Parameters:** * `agent_id` - ID of the agent to export **Returns:** * `str` - YAML configuration of the agent **Raises:** * `HTTPException`: - 404: Agent not found
331
+ * @summary Export Agent
332
+ * @param {string} agentId ID of the agent to export
325
333
  * @param {*} [options] Override http request option.
326
334
  * @throws {RequiredError}
327
335
  */
328
- getAgentById: function (aid_1) {
336
+ exportAgent: function (agentId_1) {
329
337
  var args_1 = [];
330
338
  for (var _i = 1; _i < arguments.length; _i++) {
331
339
  args_1[_i - 1] = arguments[_i];
332
340
  }
333
- return __awaiter(_this, __spreadArray([aid_1], args_1, true), void 0, function (aid, options) {
341
+ return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
334
342
  var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
335
343
  if (options === void 0) { options = {}; }
336
344
  return __generator(this, function (_a) {
337
- // verify required parameter 'aid' is not null or undefined
338
- (0, common_1.assertParamExists)('getAgentById', 'aid', aid);
339
- localVarPath = "/agents/{aid}"
340
- .replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
345
+ switch (_a.label) {
346
+ case 0:
347
+ // verify required parameter 'agentId' is not null or undefined
348
+ (0, common_1.assertParamExists)('exportAgent', 'agentId', agentId);
349
+ localVarPath = "/agents/{agent_id}/export"
350
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
351
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
352
+ if (configuration) {
353
+ baseOptions = configuration.baseOptions;
354
+ }
355
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
356
+ localVarHeaderParameter = {};
357
+ localVarQueryParameter = {};
358
+ // authentication HTTPBearer required
359
+ // http bearer authentication required
360
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
361
+ case 1:
362
+ // authentication HTTPBearer required
363
+ // http bearer authentication required
364
+ _a.sent();
365
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
366
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
367
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
368
+ return [2 /*return*/, {
369
+ url: (0, common_1.toPathString)(localVarUrlObj),
370
+ options: localVarRequestOptions,
371
+ }];
372
+ }
373
+ });
374
+ });
375
+ },
376
+ /**
377
+ * Get a single agent by ID. **Path Parameters:** * `agent_id` - ID of the agent to retrieve **Returns:** * `AgentResponse` - Agent configuration with additional processed data **Raises:** * `HTTPException`: - 404: Agent not found
378
+ * @summary Get Agent
379
+ * @param {string} agentId ID of the agent to retrieve
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ getAgent: function (agentId_1) {
384
+ var args_1 = [];
385
+ for (var _i = 1; _i < arguments.length; _i++) {
386
+ args_1[_i - 1] = arguments[_i];
387
+ }
388
+ return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
389
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
390
+ if (options === void 0) { options = {}; }
391
+ return __generator(this, function (_a) {
392
+ // verify required parameter 'agentId' is not null or undefined
393
+ (0, common_1.assertParamExists)('getAgent', 'agentId', agentId);
394
+ localVarPath = "/agents/{agent_id}"
395
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
341
396
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
342
397
  if (configuration) {
343
398
  baseOptions = configuration.baseOptions;
@@ -392,6 +447,303 @@ var AgentApiAxiosParamCreator = function (configuration) {
392
447
  });
393
448
  });
394
449
  },
450
+ /**
451
+ * Get all agents with their quota information. **Query Parameters:** * `sort` - Sort order for the agents list * `cursor` - Cursor for pagination * `limit` - Maximum number of agents to return (1-100) **Returns:** * `AgentListResponse` - Paginated list of agents with their quota information and additional processed data
452
+ * @summary Get Agents
453
+ * @param {AgentSortOption} [sort] Sort order for agents list
454
+ * @param {string | null} [cursor] Cursor for pagination
455
+ * @param {number} [limit] Maximum number of agents to return
456
+ * @param {*} [options] Override http request option.
457
+ * @throws {RequiredError}
458
+ */
459
+ getAgents: function (sort_1, cursor_1, limit_1) {
460
+ var args_1 = [];
461
+ for (var _i = 3; _i < arguments.length; _i++) {
462
+ args_1[_i - 3] = arguments[_i];
463
+ }
464
+ return __awaiter(_this, __spreadArray([sort_1, cursor_1, limit_1], args_1, true), void 0, function (sort, cursor, limit, options) {
465
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
466
+ if (options === void 0) { options = {}; }
467
+ return __generator(this, function (_a) {
468
+ localVarPath = "/agents";
469
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
470
+ if (configuration) {
471
+ baseOptions = configuration.baseOptions;
472
+ }
473
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
474
+ localVarHeaderParameter = {};
475
+ localVarQueryParameter = {};
476
+ if (sort !== undefined) {
477
+ localVarQueryParameter['sort'] = sort;
478
+ }
479
+ if (cursor !== undefined) {
480
+ localVarQueryParameter['cursor'] = cursor;
481
+ }
482
+ if (limit !== undefined) {
483
+ localVarQueryParameter['limit'] = limit;
484
+ }
485
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
486
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
487
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
488
+ return [2 /*return*/, {
489
+ url: (0, common_1.toPathString)(localVarUrlObj),
490
+ options: localVarRequestOptions,
491
+ }];
492
+ });
493
+ });
494
+ },
495
+ /**
496
+ * Import agent configuration from YAML file. Only updates existing agents, will not create new ones. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `file` - YAML file containing agent configuration **Returns:** * `str` - Success message **Raises:** * `HTTPException`: - 400: Invalid YAML or agent configuration - 404: Agent not found - 500: Server error
497
+ * @summary Import Agent
498
+ * @param {string} agentId
499
+ * @param {File} file YAML file containing agent configuration
500
+ * @param {*} [options] Override http request option.
501
+ * @throws {RequiredError}
502
+ */
503
+ importAgent: function (agentId_1, file_1) {
504
+ var args_1 = [];
505
+ for (var _i = 2; _i < arguments.length; _i++) {
506
+ args_1[_i - 2] = arguments[_i];
507
+ }
508
+ return __awaiter(_this, __spreadArray([agentId_1, file_1], args_1, true), void 0, function (agentId, file, options) {
509
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
510
+ if (options === void 0) { options = {}; }
511
+ return __generator(this, function (_a) {
512
+ switch (_a.label) {
513
+ case 0:
514
+ // verify required parameter 'agentId' is not null or undefined
515
+ (0, common_1.assertParamExists)('importAgent', 'agentId', agentId);
516
+ // verify required parameter 'file' is not null or undefined
517
+ (0, common_1.assertParamExists)('importAgent', 'file', file);
518
+ localVarPath = "/agents/{agent_id}/import"
519
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
520
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
521
+ if (configuration) {
522
+ baseOptions = configuration.baseOptions;
523
+ }
524
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
525
+ localVarHeaderParameter = {};
526
+ localVarQueryParameter = {};
527
+ localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
528
+ // authentication HTTPBearer required
529
+ // http bearer authentication required
530
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
531
+ case 1:
532
+ // authentication HTTPBearer required
533
+ // http bearer authentication required
534
+ _a.sent();
535
+ if (file !== undefined) {
536
+ localVarFormParams.append('file', file);
537
+ }
538
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
539
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
540
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
541
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
542
+ localVarRequestOptions.data = localVarFormParams;
543
+ return [2 /*return*/, {
544
+ url: (0, common_1.toPathString)(localVarUrlObj),
545
+ options: localVarRequestOptions,
546
+ }];
547
+ }
548
+ });
549
+ });
550
+ },
551
+ /**
552
+ * Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **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
553
+ * @summary Override Agent
554
+ * @param {string} agentId ID of the agent to update
555
+ * @param {AgentUpdate} [agentUpdate]
556
+ * @param {*} [options] Override http request option.
557
+ * @throws {RequiredError}
558
+ */
559
+ overrideAgent: function (agentId_1, agentUpdate_1) {
560
+ var args_1 = [];
561
+ for (var _i = 2; _i < arguments.length; _i++) {
562
+ args_1[_i - 2] = arguments[_i];
563
+ }
564
+ return __awaiter(_this, __spreadArray([agentId_1, agentUpdate_1], args_1, true), void 0, function (agentId, agentUpdate, options) {
565
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
566
+ if (options === void 0) { options = {}; }
567
+ return __generator(this, function (_a) {
568
+ switch (_a.label) {
569
+ case 0:
570
+ // verify required parameter 'agentId' is not null or undefined
571
+ (0, common_1.assertParamExists)('overrideAgent', 'agentId', agentId);
572
+ localVarPath = "/agents/{agent_id}"
573
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
574
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
575
+ if (configuration) {
576
+ baseOptions = configuration.baseOptions;
577
+ }
578
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
579
+ localVarHeaderParameter = {};
580
+ localVarQueryParameter = {};
581
+ // authentication HTTPBearer required
582
+ // http bearer authentication required
583
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
584
+ case 1:
585
+ // authentication HTTPBearer required
586
+ // http bearer authentication required
587
+ _a.sent();
588
+ localVarHeaderParameter['Content-Type'] = 'application/json';
589
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
590
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
591
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
592
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUpdate, localVarRequestOptions, configuration);
593
+ return [2 /*return*/, {
594
+ url: (0, common_1.toPathString)(localVarUrlObj),
595
+ options: localVarRequestOptions,
596
+ }];
597
+ }
598
+ });
599
+ });
600
+ },
601
+ /**
602
+ * 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
603
+ * @summary Update Agent
604
+ * @param {string} agentId ID of the agent to update
605
+ * @param {AgentUpdate} [agentUpdate]
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ */
609
+ updateAgent: function (agentId_1, agentUpdate_1) {
610
+ var args_1 = [];
611
+ for (var _i = 2; _i < arguments.length; _i++) {
612
+ args_1[_i - 2] = arguments[_i];
613
+ }
614
+ return __awaiter(_this, __spreadArray([agentId_1, agentUpdate_1], args_1, true), void 0, function (agentId, agentUpdate, options) {
615
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
616
+ if (options === void 0) { options = {}; }
617
+ return __generator(this, function (_a) {
618
+ switch (_a.label) {
619
+ case 0:
620
+ // verify required parameter 'agentId' is not null or undefined
621
+ (0, common_1.assertParamExists)('updateAgent', 'agentId', agentId);
622
+ localVarPath = "/agents/{agent_id}"
623
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
624
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
625
+ if (configuration) {
626
+ baseOptions = configuration.baseOptions;
627
+ }
628
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
629
+ localVarHeaderParameter = {};
630
+ localVarQueryParameter = {};
631
+ // authentication HTTPBearer required
632
+ // http bearer authentication required
633
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
634
+ case 1:
635
+ // authentication HTTPBearer required
636
+ // http bearer authentication required
637
+ _a.sent();
638
+ localVarHeaderParameter['Content-Type'] = 'application/json';
639
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
640
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
641
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
642
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUpdate, localVarRequestOptions, configuration);
643
+ return [2 /*return*/, {
644
+ url: (0, common_1.toPathString)(localVarUrlObj),
645
+ options: localVarRequestOptions,
646
+ }];
647
+ }
648
+ });
649
+ });
650
+ },
651
+ /**
652
+ * 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 - 500: Server error
653
+ * @summary Validate Agent Create
654
+ * @param {AgentUpdate} [agentUpdate]
655
+ * @param {*} [options] Override http request option.
656
+ * @throws {RequiredError}
657
+ */
658
+ validateAgentCreate: function (agentUpdate_1) {
659
+ var args_1 = [];
660
+ for (var _i = 1; _i < arguments.length; _i++) {
661
+ args_1[_i - 1] = arguments[_i];
662
+ }
663
+ return __awaiter(_this, __spreadArray([agentUpdate_1], args_1, true), void 0, function (agentUpdate, options) {
664
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
665
+ if (options === void 0) { options = {}; }
666
+ return __generator(this, function (_a) {
667
+ switch (_a.label) {
668
+ case 0:
669
+ localVarPath = "/agent/validate";
670
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
671
+ if (configuration) {
672
+ baseOptions = configuration.baseOptions;
673
+ }
674
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
675
+ localVarHeaderParameter = {};
676
+ localVarQueryParameter = {};
677
+ // authentication HTTPBearer required
678
+ // http bearer authentication required
679
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
680
+ case 1:
681
+ // authentication HTTPBearer required
682
+ // http bearer authentication required
683
+ _a.sent();
684
+ localVarHeaderParameter['Content-Type'] = 'application/json';
685
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
686
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
687
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
688
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUpdate, localVarRequestOptions, configuration);
689
+ return [2 /*return*/, {
690
+ url: (0, common_1.toPathString)(localVarUrlObj),
691
+ options: localVarRequestOptions,
692
+ }];
693
+ }
694
+ });
695
+ });
696
+ },
697
+ /**
698
+ * 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 - 500: Server error
699
+ * @summary Validate Agent Update
700
+ * @param {string} agentId Agent ID
701
+ * @param {AgentUpdate} [agentUpdate]
702
+ * @param {*} [options] Override http request option.
703
+ * @throws {RequiredError}
704
+ */
705
+ validateAgentUpdate: function (agentId_1, agentUpdate_1) {
706
+ var args_1 = [];
707
+ for (var _i = 2; _i < arguments.length; _i++) {
708
+ args_1[_i - 2] = arguments[_i];
709
+ }
710
+ return __awaiter(_this, __spreadArray([agentId_1, agentUpdate_1], args_1, true), void 0, function (agentId, agentUpdate, options) {
711
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
712
+ if (options === void 0) { options = {}; }
713
+ return __generator(this, function (_a) {
714
+ switch (_a.label) {
715
+ case 0:
716
+ // verify required parameter 'agentId' is not null or undefined
717
+ (0, common_1.assertParamExists)('validateAgentUpdate', 'agentId', agentId);
718
+ localVarPath = "/agents/{agent_id}/validate"
719
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
720
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
721
+ if (configuration) {
722
+ baseOptions = configuration.baseOptions;
723
+ }
724
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
725
+ localVarHeaderParameter = {};
726
+ localVarQueryParameter = {};
727
+ // authentication HTTPBearer required
728
+ // http bearer authentication required
729
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
730
+ case 1:
731
+ // authentication HTTPBearer required
732
+ // http bearer authentication required
733
+ _a.sent();
734
+ localVarHeaderParameter['Content-Type'] = 'application/json';
735
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
736
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
737
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
738
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUpdate, localVarRequestOptions, configuration);
739
+ return [2 /*return*/, {
740
+ url: (0, common_1.toPathString)(localVarUrlObj),
741
+ options: localVarRequestOptions,
742
+ }];
743
+ }
744
+ });
745
+ });
746
+ },
395
747
  };
396
748
  };
397
749
  exports.AgentApiAxiosParamCreator = AgentApiAxiosParamCreator;
@@ -403,9 +755,9 @@ var AgentApiFp = function (configuration) {
403
755
  var localVarAxiosParamCreator = (0, exports.AgentApiAxiosParamCreator)(configuration);
404
756
  return {
405
757
  /**
406
- * Create a new agent owned by the current user. The agent will be initialized with the provided details.
407
- * @summary Create a new agent
408
- * @param {AgentUpdate} agentUpdate
758
+ * Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
759
+ * @summary Create Agent
760
+ * @param {AgentUpdate} [agentUpdate]
409
761
  * @param {*} [options] Override http request option.
410
762
  * @throws {RequiredError}
411
763
  */
@@ -426,23 +778,46 @@ var AgentApiFp = function (configuration) {
426
778
  });
427
779
  },
428
780
  /**
429
- * Retrieve a specific agent by its ID. Returns 404 if not found.
430
- * @summary Get agent by ID
431
- * @param {string} aid Agent ID
781
+ * Export agent configuration as YAML. **Path Parameters:** * `agent_id` - ID of the agent to export **Returns:** * `str` - YAML configuration of the agent **Raises:** * `HTTPException`: - 404: Agent not found
782
+ * @summary Export Agent
783
+ * @param {string} agentId ID of the agent to export
432
784
  * @param {*} [options] Override http request option.
433
785
  * @throws {RequiredError}
434
786
  */
435
- getAgentById: function (aid, options) {
787
+ exportAgent: function (agentId, options) {
436
788
  return __awaiter(this, void 0, void 0, function () {
437
789
  var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
438
790
  var _a, _b, _c;
439
791
  return __generator(this, function (_d) {
440
792
  switch (_d.label) {
441
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentById(aid, options)];
793
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.exportAgent(agentId, options)];
442
794
  case 1:
443
795
  localVarAxiosArgs = _d.sent();
444
796
  localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
445
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.getAgentById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
797
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.exportAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
798
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
799
+ }
800
+ });
801
+ });
802
+ },
803
+ /**
804
+ * Get a single agent by ID. **Path Parameters:** * `agent_id` - ID of the agent to retrieve **Returns:** * `AgentResponse` - Agent configuration with additional processed data **Raises:** * `HTTPException`: - 404: Agent not found
805
+ * @summary Get Agent
806
+ * @param {string} agentId ID of the agent to retrieve
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ getAgent: function (agentId, options) {
811
+ return __awaiter(this, void 0, void 0, function () {
812
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
813
+ var _a, _b, _c;
814
+ return __generator(this, function (_d) {
815
+ switch (_d.label) {
816
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgent(agentId, options)];
817
+ case 1:
818
+ localVarAxiosArgs = _d.sent();
819
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
820
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.getAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
446
821
  return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
447
822
  }
448
823
  });
@@ -471,6 +846,150 @@ var AgentApiFp = function (configuration) {
471
846
  });
472
847
  });
473
848
  },
849
+ /**
850
+ * Get all agents with their quota information. **Query Parameters:** * `sort` - Sort order for the agents list * `cursor` - Cursor for pagination * `limit` - Maximum number of agents to return (1-100) **Returns:** * `AgentListResponse` - Paginated list of agents with their quota information and additional processed data
851
+ * @summary Get Agents
852
+ * @param {AgentSortOption} [sort] Sort order for agents list
853
+ * @param {string | null} [cursor] Cursor for pagination
854
+ * @param {number} [limit] Maximum number of agents to return
855
+ * @param {*} [options] Override http request option.
856
+ * @throws {RequiredError}
857
+ */
858
+ getAgents: function (sort, cursor, limit, options) {
859
+ return __awaiter(this, void 0, void 0, function () {
860
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
861
+ var _a, _b, _c;
862
+ return __generator(this, function (_d) {
863
+ switch (_d.label) {
864
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgents(sort, cursor, limit, options)];
865
+ case 1:
866
+ localVarAxiosArgs = _d.sent();
867
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
868
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.getAgents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
869
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
870
+ }
871
+ });
872
+ });
873
+ },
874
+ /**
875
+ * Import agent configuration from YAML file. Only updates existing agents, will not create new ones. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `file` - YAML file containing agent configuration **Returns:** * `str` - Success message **Raises:** * `HTTPException`: - 400: Invalid YAML or agent configuration - 404: Agent not found - 500: Server error
876
+ * @summary Import Agent
877
+ * @param {string} agentId
878
+ * @param {File} file YAML file containing agent configuration
879
+ * @param {*} [options] Override http request option.
880
+ * @throws {RequiredError}
881
+ */
882
+ importAgent: function (agentId, file, options) {
883
+ return __awaiter(this, void 0, void 0, function () {
884
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
885
+ var _a, _b, _c;
886
+ return __generator(this, function (_d) {
887
+ switch (_d.label) {
888
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.importAgent(agentId, file, options)];
889
+ case 1:
890
+ localVarAxiosArgs = _d.sent();
891
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
892
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.importAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
893
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
894
+ }
895
+ });
896
+ });
897
+ },
898
+ /**
899
+ * Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **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
900
+ * @summary Override Agent
901
+ * @param {string} agentId ID of the agent to update
902
+ * @param {AgentUpdate} [agentUpdate]
903
+ * @param {*} [options] Override http request option.
904
+ * @throws {RequiredError}
905
+ */
906
+ overrideAgent: function (agentId, agentUpdate, options) {
907
+ return __awaiter(this, void 0, void 0, function () {
908
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
909
+ var _a, _b, _c;
910
+ return __generator(this, function (_d) {
911
+ switch (_d.label) {
912
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.overrideAgent(agentId, agentUpdate, options)];
913
+ case 1:
914
+ localVarAxiosArgs = _d.sent();
915
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
916
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.overrideAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
917
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
918
+ }
919
+ });
920
+ });
921
+ },
922
+ /**
923
+ * 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
924
+ * @summary Update Agent
925
+ * @param {string} agentId ID of the agent to update
926
+ * @param {AgentUpdate} [agentUpdate]
927
+ * @param {*} [options] Override http request option.
928
+ * @throws {RequiredError}
929
+ */
930
+ updateAgent: function (agentId, agentUpdate, options) {
931
+ return __awaiter(this, void 0, void 0, function () {
932
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
933
+ var _a, _b, _c;
934
+ return __generator(this, function (_d) {
935
+ switch (_d.label) {
936
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAgent(agentId, agentUpdate, options)];
937
+ case 1:
938
+ localVarAxiosArgs = _d.sent();
939
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
940
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.updateAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
941
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
942
+ }
943
+ });
944
+ });
945
+ },
946
+ /**
947
+ * 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 - 500: Server error
948
+ * @summary Validate Agent Create
949
+ * @param {AgentUpdate} [agentUpdate]
950
+ * @param {*} [options] Override http request option.
951
+ * @throws {RequiredError}
952
+ */
953
+ validateAgentCreate: function (agentUpdate, options) {
954
+ return __awaiter(this, void 0, void 0, function () {
955
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
956
+ var _a, _b, _c;
957
+ return __generator(this, function (_d) {
958
+ switch (_d.label) {
959
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateAgentCreate(agentUpdate, options)];
960
+ case 1:
961
+ localVarAxiosArgs = _d.sent();
962
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
963
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.validateAgentCreate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
964
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
965
+ }
966
+ });
967
+ });
968
+ },
969
+ /**
970
+ * 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 - 500: Server error
971
+ * @summary Validate Agent Update
972
+ * @param {string} agentId Agent ID
973
+ * @param {AgentUpdate} [agentUpdate]
974
+ * @param {*} [options] Override http request option.
975
+ * @throws {RequiredError}
976
+ */
977
+ validateAgentUpdate: function (agentId, agentUpdate, options) {
978
+ return __awaiter(this, void 0, void 0, function () {
979
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
980
+ var _a, _b, _c;
981
+ return __generator(this, function (_d) {
982
+ switch (_d.label) {
983
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateAgentUpdate(agentId, agentUpdate, options)];
984
+ case 1:
985
+ localVarAxiosArgs = _d.sent();
986
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
987
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.validateAgentUpdate']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
988
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
989
+ }
990
+ });
991
+ });
992
+ },
474
993
  };
475
994
  };
476
995
  exports.AgentApiFp = AgentApiFp;
@@ -482,9 +1001,9 @@ var AgentApiFactory = function (configuration, basePath, axios) {
482
1001
  var localVarFp = (0, exports.AgentApiFp)(configuration);
483
1002
  return {
484
1003
  /**
485
- * Create a new agent owned by the current user. The agent will be initialized with the provided details.
486
- * @summary Create a new agent
487
- * @param {AgentUpdate} agentUpdate
1004
+ * Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
1005
+ * @summary Create Agent
1006
+ * @param {AgentUpdate} [agentUpdate]
488
1007
  * @param {*} [options] Override http request option.
489
1008
  * @throws {RequiredError}
490
1009
  */
@@ -492,14 +1011,24 @@ var AgentApiFactory = function (configuration, basePath, axios) {
492
1011
  return localVarFp.createAgent(agentUpdate, options).then(function (request) { return request(axios, basePath); });
493
1012
  },
494
1013
  /**
495
- * Retrieve a specific agent by its ID. Returns 404 if not found.
496
- * @summary Get agent by ID
497
- * @param {string} aid Agent ID
1014
+ * Export agent configuration as YAML. **Path Parameters:** * `agent_id` - ID of the agent to export **Returns:** * `str` - YAML configuration of the agent **Raises:** * `HTTPException`: - 404: Agent not found
1015
+ * @summary Export Agent
1016
+ * @param {string} agentId ID of the agent to export
1017
+ * @param {*} [options] Override http request option.
1018
+ * @throws {RequiredError}
1019
+ */
1020
+ exportAgent: function (agentId, options) {
1021
+ return localVarFp.exportAgent(agentId, options).then(function (request) { return request(axios, basePath); });
1022
+ },
1023
+ /**
1024
+ * Get a single agent by ID. **Path Parameters:** * `agent_id` - ID of the agent to retrieve **Returns:** * `AgentResponse` - Agent configuration with additional processed data **Raises:** * `HTTPException`: - 404: Agent not found
1025
+ * @summary Get Agent
1026
+ * @param {string} agentId ID of the agent to retrieve
498
1027
  * @param {*} [options] Override http request option.
499
1028
  * @throws {RequiredError}
500
1029
  */
501
- getAgentById: function (aid, options) {
502
- return localVarFp.getAgentById(aid, options).then(function (request) { return request(axios, basePath); });
1030
+ getAgent: function (agentId, options) {
1031
+ return localVarFp.getAgent(agentId, options).then(function (request) { return request(axios, basePath); });
503
1032
  },
504
1033
  /**
505
1034
  * Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
@@ -511,6 +1040,72 @@ var AgentApiFactory = function (configuration, basePath, axios) {
511
1040
  getAgentStatistics: function (aid, options) {
512
1041
  return localVarFp.getAgentStatistics(aid, options).then(function (request) { return request(axios, basePath); });
513
1042
  },
1043
+ /**
1044
+ * Get all agents with their quota information. **Query Parameters:** * `sort` - Sort order for the agents list * `cursor` - Cursor for pagination * `limit` - Maximum number of agents to return (1-100) **Returns:** * `AgentListResponse` - Paginated list of agents with their quota information and additional processed data
1045
+ * @summary Get Agents
1046
+ * @param {AgentSortOption} [sort] Sort order for agents list
1047
+ * @param {string | null} [cursor] Cursor for pagination
1048
+ * @param {number} [limit] Maximum number of agents to return
1049
+ * @param {*} [options] Override http request option.
1050
+ * @throws {RequiredError}
1051
+ */
1052
+ getAgents: function (sort, cursor, limit, options) {
1053
+ return localVarFp.getAgents(sort, cursor, limit, options).then(function (request) { return request(axios, basePath); });
1054
+ },
1055
+ /**
1056
+ * Import agent configuration from YAML file. Only updates existing agents, will not create new ones. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `file` - YAML file containing agent configuration **Returns:** * `str` - Success message **Raises:** * `HTTPException`: - 400: Invalid YAML or agent configuration - 404: Agent not found - 500: Server error
1057
+ * @summary Import Agent
1058
+ * @param {string} agentId
1059
+ * @param {File} file YAML file containing agent configuration
1060
+ * @param {*} [options] Override http request option.
1061
+ * @throws {RequiredError}
1062
+ */
1063
+ importAgent: function (agentId, file, options) {
1064
+ return localVarFp.importAgent(agentId, file, options).then(function (request) { return request(axios, basePath); });
1065
+ },
1066
+ /**
1067
+ * Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **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
1068
+ * @summary Override Agent
1069
+ * @param {string} agentId ID of the agent to update
1070
+ * @param {AgentUpdate} [agentUpdate]
1071
+ * @param {*} [options] Override http request option.
1072
+ * @throws {RequiredError}
1073
+ */
1074
+ overrideAgent: function (agentId, agentUpdate, options) {
1075
+ return localVarFp.overrideAgent(agentId, agentUpdate, options).then(function (request) { return request(axios, basePath); });
1076
+ },
1077
+ /**
1078
+ * 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
1079
+ * @summary Update Agent
1080
+ * @param {string} agentId ID of the agent to update
1081
+ * @param {AgentUpdate} [agentUpdate]
1082
+ * @param {*} [options] Override http request option.
1083
+ * @throws {RequiredError}
1084
+ */
1085
+ updateAgent: function (agentId, agentUpdate, options) {
1086
+ return localVarFp.updateAgent(agentId, agentUpdate, options).then(function (request) { return request(axios, basePath); });
1087
+ },
1088
+ /**
1089
+ * 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 - 500: Server error
1090
+ * @summary Validate Agent Create
1091
+ * @param {AgentUpdate} [agentUpdate]
1092
+ * @param {*} [options] Override http request option.
1093
+ * @throws {RequiredError}
1094
+ */
1095
+ validateAgentCreate: function (agentUpdate, options) {
1096
+ return localVarFp.validateAgentCreate(agentUpdate, options).then(function (request) { return request(axios, basePath); });
1097
+ },
1098
+ /**
1099
+ * 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 - 500: Server error
1100
+ * @summary Validate Agent Update
1101
+ * @param {string} agentId Agent ID
1102
+ * @param {AgentUpdate} [agentUpdate]
1103
+ * @param {*} [options] Override http request option.
1104
+ * @throws {RequiredError}
1105
+ */
1106
+ validateAgentUpdate: function (agentId, agentUpdate, options) {
1107
+ return localVarFp.validateAgentUpdate(agentId, agentUpdate, options).then(function (request) { return request(axios, basePath); });
1108
+ },
514
1109
  };
515
1110
  };
516
1111
  exports.AgentApiFactory = AgentApiFactory;
@@ -526,9 +1121,9 @@ var AgentApi = /** @class */ (function (_super) {
526
1121
  return _super !== null && _super.apply(this, arguments) || this;
527
1122
  }
528
1123
  /**
529
- * Create a new agent owned by the current user. The agent will be initialized with the provided details.
530
- * @summary Create a new agent
531
- * @param {AgentUpdate} agentUpdate
1124
+ * Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
1125
+ * @summary Create Agent
1126
+ * @param {AgentUpdate} [agentUpdate]
532
1127
  * @param {*} [options] Override http request option.
533
1128
  * @throws {RequiredError}
534
1129
  * @memberof AgentApi
@@ -538,16 +1133,28 @@ var AgentApi = /** @class */ (function (_super) {
538
1133
  return (0, exports.AgentApiFp)(this.configuration).createAgent(agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
539
1134
  };
540
1135
  /**
541
- * Retrieve a specific agent by its ID. Returns 404 if not found.
542
- * @summary Get agent by ID
543
- * @param {string} aid Agent ID
1136
+ * Export agent configuration as YAML. **Path Parameters:** * `agent_id` - ID of the agent to export **Returns:** * `str` - YAML configuration of the agent **Raises:** * `HTTPException`: - 404: Agent not found
1137
+ * @summary Export Agent
1138
+ * @param {string} agentId ID of the agent to export
544
1139
  * @param {*} [options] Override http request option.
545
1140
  * @throws {RequiredError}
546
1141
  * @memberof AgentApi
547
1142
  */
548
- AgentApi.prototype.getAgentById = function (aid, options) {
1143
+ AgentApi.prototype.exportAgent = function (agentId, options) {
549
1144
  var _this = this;
550
- return (0, exports.AgentApiFp)(this.configuration).getAgentById(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
1145
+ return (0, exports.AgentApiFp)(this.configuration).exportAgent(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1146
+ };
1147
+ /**
1148
+ * Get a single agent by ID. **Path Parameters:** * `agent_id` - ID of the agent to retrieve **Returns:** * `AgentResponse` - Agent configuration with additional processed data **Raises:** * `HTTPException`: - 404: Agent not found
1149
+ * @summary Get Agent
1150
+ * @param {string} agentId ID of the agent to retrieve
1151
+ * @param {*} [options] Override http request option.
1152
+ * @throws {RequiredError}
1153
+ * @memberof AgentApi
1154
+ */
1155
+ AgentApi.prototype.getAgent = function (agentId, options) {
1156
+ var _this = this;
1157
+ return (0, exports.AgentApiFp)(this.configuration).getAgent(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
551
1158
  };
552
1159
  /**
553
1160
  * Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
@@ -561,6 +1168,84 @@ var AgentApi = /** @class */ (function (_super) {
561
1168
  var _this = this;
562
1169
  return (0, exports.AgentApiFp)(this.configuration).getAgentStatistics(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
563
1170
  };
1171
+ /**
1172
+ * Get all agents with their quota information. **Query Parameters:** * `sort` - Sort order for the agents list * `cursor` - Cursor for pagination * `limit` - Maximum number of agents to return (1-100) **Returns:** * `AgentListResponse` - Paginated list of agents with their quota information and additional processed data
1173
+ * @summary Get Agents
1174
+ * @param {AgentSortOption} [sort] Sort order for agents list
1175
+ * @param {string | null} [cursor] Cursor for pagination
1176
+ * @param {number} [limit] Maximum number of agents to return
1177
+ * @param {*} [options] Override http request option.
1178
+ * @throws {RequiredError}
1179
+ * @memberof AgentApi
1180
+ */
1181
+ AgentApi.prototype.getAgents = function (sort, cursor, limit, options) {
1182
+ var _this = this;
1183
+ return (0, exports.AgentApiFp)(this.configuration).getAgents(sort, cursor, limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
1184
+ };
1185
+ /**
1186
+ * Import agent configuration from YAML file. Only updates existing agents, will not create new ones. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `file` - YAML file containing agent configuration **Returns:** * `str` - Success message **Raises:** * `HTTPException`: - 400: Invalid YAML or agent configuration - 404: Agent not found - 500: Server error
1187
+ * @summary Import Agent
1188
+ * @param {string} agentId
1189
+ * @param {File} file YAML file containing agent configuration
1190
+ * @param {*} [options] Override http request option.
1191
+ * @throws {RequiredError}
1192
+ * @memberof AgentApi
1193
+ */
1194
+ AgentApi.prototype.importAgent = function (agentId, file, options) {
1195
+ var _this = this;
1196
+ return (0, exports.AgentApiFp)(this.configuration).importAgent(agentId, file, options).then(function (request) { return request(_this.axios, _this.basePath); });
1197
+ };
1198
+ /**
1199
+ * Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **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
1200
+ * @summary Override Agent
1201
+ * @param {string} agentId ID of the agent to update
1202
+ * @param {AgentUpdate} [agentUpdate]
1203
+ * @param {*} [options] Override http request option.
1204
+ * @throws {RequiredError}
1205
+ * @memberof AgentApi
1206
+ */
1207
+ AgentApi.prototype.overrideAgent = function (agentId, agentUpdate, options) {
1208
+ var _this = this;
1209
+ return (0, exports.AgentApiFp)(this.configuration).overrideAgent(agentId, agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
1210
+ };
1211
+ /**
1212
+ * 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
1213
+ * @summary Update Agent
1214
+ * @param {string} agentId ID of the agent to update
1215
+ * @param {AgentUpdate} [agentUpdate]
1216
+ * @param {*} [options] Override http request option.
1217
+ * @throws {RequiredError}
1218
+ * @memberof AgentApi
1219
+ */
1220
+ AgentApi.prototype.updateAgent = function (agentId, agentUpdate, options) {
1221
+ var _this = this;
1222
+ return (0, exports.AgentApiFp)(this.configuration).updateAgent(agentId, agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
1223
+ };
1224
+ /**
1225
+ * 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 - 500: Server error
1226
+ * @summary Validate Agent Create
1227
+ * @param {AgentUpdate} [agentUpdate]
1228
+ * @param {*} [options] Override http request option.
1229
+ * @throws {RequiredError}
1230
+ * @memberof AgentApi
1231
+ */
1232
+ AgentApi.prototype.validateAgentCreate = function (agentUpdate, options) {
1233
+ var _this = this;
1234
+ return (0, exports.AgentApiFp)(this.configuration).validateAgentCreate(agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
1235
+ };
1236
+ /**
1237
+ * 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 - 500: Server error
1238
+ * @summary Validate Agent Update
1239
+ * @param {string} agentId Agent ID
1240
+ * @param {AgentUpdate} [agentUpdate]
1241
+ * @param {*} [options] Override http request option.
1242
+ * @throws {RequiredError}
1243
+ * @memberof AgentApi
1244
+ */
1245
+ AgentApi.prototype.validateAgentUpdate = function (agentId, agentUpdate, options) {
1246
+ var _this = this;
1247
+ return (0, exports.AgentApiFp)(this.configuration).validateAgentUpdate(agentId, agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
1248
+ };
564
1249
  return AgentApi;
565
1250
  }(base_1.BaseAPI));
566
1251
  exports.AgentApi = AgentApi;