@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/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.6.30
8
+ * The version of the OpenAPI document: 0.6.32
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -84,22 +84,14 @@ 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.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.GeneratorApi = exports.GeneratorApiFactory = exports.GeneratorApiFp = exports.GeneratorApiAxiosParamCreator = 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.SystemMessageType = 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 = exports.AgentCreateCdpNetworkIdEnum = exports.AgentCreateNetworkIdEnum = exports.AgentCreateWalletProviderEnum = exports.AgentCreateShortTermMemoryStrategyEnum = exports.AgentCreateModeEnum = exports.AgentCdpNetworkIdEnum = exports.AgentNetworkIdEnum = exports.AgentWalletProviderEnum = exports.AgentShortTermMemoryStrategyEnum = exports.AgentModeEnum = void 0;
88
- exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = void 0;
87
+ exports.GeneratorApi = exports.GeneratorApiFactory = exports.GeneratorApiFp = exports.GeneratorApiAxiosParamCreator = exports.DraftApi = exports.DraftApiFactory = exports.DraftApiFp = exports.DraftApiAxiosParamCreator = 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.SystemMessageType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUserInputShortTermMemoryStrategyEnum = exports.AgentUserInputNetworkIdEnum = exports.AgentUserInputWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentSortOption = exports.AgentResponseShortTermMemoryStrategyEnum = exports.AgentResponseNetworkIdEnum = exports.AgentResponseWalletProviderEnum = exports.AgentDraftShortTermMemoryStrategyEnum = exports.AgentDraftNetworkIdEnum = exports.AgentDraftWalletProviderEnum = exports.AgentCreateShortTermMemoryStrategyEnum = exports.AgentCreateNetworkIdEnum = exports.AgentCreateWalletProviderEnum = exports.AgentShortTermMemoryStrategyEnum = exports.AgentNetworkIdEnum = exports.AgentWalletProviderEnum = void 0;
88
+ exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = void 0;
89
89
  var axios_1 = require("axios");
90
90
  // Some imports not used depending on template conditions
91
91
  // @ts-ignore
92
92
  var common_1 = require("./common");
93
93
  // @ts-ignore
94
94
  var base_1 = require("./base");
95
- exports.AgentModeEnum = {
96
- Public: 'public',
97
- Private: 'private'
98
- };
99
- exports.AgentShortTermMemoryStrategyEnum = {
100
- Trim: 'trim',
101
- Summarize: 'summarize'
102
- };
103
95
  exports.AgentWalletProviderEnum = {
104
96
  Cdp: 'cdp',
105
97
  Readonly: 'readonly'
@@ -117,7 +109,15 @@ exports.AgentNetworkIdEnum = {
117
109
  OptimismSepolia: 'optimism-sepolia',
118
110
  Solana: 'solana'
119
111
  };
120
- exports.AgentCdpNetworkIdEnum = {
112
+ exports.AgentShortTermMemoryStrategyEnum = {
113
+ Trim: 'trim',
114
+ Summarize: 'summarize'
115
+ };
116
+ exports.AgentCreateWalletProviderEnum = {
117
+ Cdp: 'cdp',
118
+ Readonly: 'readonly'
119
+ };
120
+ exports.AgentCreateNetworkIdEnum = {
121
121
  EthereumMainnet: 'ethereum-mainnet',
122
122
  EthereumSepolia: 'ethereum-sepolia',
123
123
  PolygonMainnet: 'polygon-mainnet',
@@ -127,21 +127,18 @@ exports.AgentCdpNetworkIdEnum = {
127
127
  ArbitrumMainnet: 'arbitrum-mainnet',
128
128
  ArbitrumSepolia: 'arbitrum-sepolia',
129
129
  OptimismMainnet: 'optimism-mainnet',
130
- OptimismSepolia: 'optimism-sepolia'
131
- };
132
- exports.AgentCreateModeEnum = {
133
- Public: 'public',
134
- Private: 'private'
130
+ OptimismSepolia: 'optimism-sepolia',
131
+ Solana: 'solana'
135
132
  };
136
133
  exports.AgentCreateShortTermMemoryStrategyEnum = {
137
134
  Trim: 'trim',
138
135
  Summarize: 'summarize'
139
136
  };
140
- exports.AgentCreateWalletProviderEnum = {
137
+ exports.AgentDraftWalletProviderEnum = {
141
138
  Cdp: 'cdp',
142
139
  Readonly: 'readonly'
143
140
  };
144
- exports.AgentCreateNetworkIdEnum = {
141
+ exports.AgentDraftNetworkIdEnum = {
145
142
  EthereumMainnet: 'ethereum-mainnet',
146
143
  EthereumSepolia: 'ethereum-sepolia',
147
144
  PolygonMainnet: 'polygon-mainnet',
@@ -154,7 +151,15 @@ exports.AgentCreateNetworkIdEnum = {
154
151
  OptimismSepolia: 'optimism-sepolia',
155
152
  Solana: 'solana'
156
153
  };
157
- exports.AgentCreateCdpNetworkIdEnum = {
154
+ exports.AgentDraftShortTermMemoryStrategyEnum = {
155
+ Trim: 'trim',
156
+ Summarize: 'summarize'
157
+ };
158
+ exports.AgentResponseWalletProviderEnum = {
159
+ Cdp: 'cdp',
160
+ Readonly: 'readonly'
161
+ };
162
+ exports.AgentResponseNetworkIdEnum = {
158
163
  EthereumMainnet: 'ethereum-mainnet',
159
164
  EthereumSepolia: 'ethereum-sepolia',
160
165
  PolygonMainnet: 'polygon-mainnet',
@@ -164,15 +169,12 @@ exports.AgentCreateCdpNetworkIdEnum = {
164
169
  ArbitrumMainnet: 'arbitrum-mainnet',
165
170
  ArbitrumSepolia: 'arbitrum-sepolia',
166
171
  OptimismMainnet: 'optimism-mainnet',
167
- OptimismSepolia: 'optimism-sepolia'
168
- };
169
- exports.AgentResponseModeEnum = {
170
- Public: 'public',
171
- Private: 'private'
172
+ OptimismSepolia: 'optimism-sepolia',
173
+ Solana: 'solana'
172
174
  };
173
- exports.AgentResponseWalletProviderEnum = {
174
- Cdp: 'cdp',
175
- Readonly: 'readonly'
175
+ exports.AgentResponseShortTermMemoryStrategyEnum = {
176
+ Trim: 'trim',
177
+ Summarize: 'summarize'
176
178
  };
177
179
  /**
178
180
  * Sort options for agents list.
@@ -184,14 +186,6 @@ exports.AgentSortOption = {
184
186
  CreatedAtAsc: 'created_at asc',
185
187
  UpdatedAtDesc: 'updated_at desc'
186
188
  };
187
- exports.AgentUpdateModeEnum = {
188
- Public: 'public',
189
- Private: 'private'
190
- };
191
- exports.AgentUpdateShortTermMemoryStrategyEnum = {
192
- Trim: 'trim',
193
- Summarize: 'summarize'
194
- };
195
189
  exports.AgentUpdateWalletProviderEnum = {
196
190
  Cdp: 'cdp',
197
191
  Readonly: 'readonly'
@@ -209,7 +203,15 @@ exports.AgentUpdateNetworkIdEnum = {
209
203
  OptimismSepolia: 'optimism-sepolia',
210
204
  Solana: 'solana'
211
205
  };
212
- exports.AgentUpdateCdpNetworkIdEnum = {
206
+ exports.AgentUpdateShortTermMemoryStrategyEnum = {
207
+ Trim: 'trim',
208
+ Summarize: 'summarize'
209
+ };
210
+ exports.AgentUserInputWalletProviderEnum = {
211
+ Cdp: 'cdp',
212
+ Readonly: 'readonly'
213
+ };
214
+ exports.AgentUserInputNetworkIdEnum = {
213
215
  EthereumMainnet: 'ethereum-mainnet',
214
216
  EthereumSepolia: 'ethereum-sepolia',
215
217
  PolygonMainnet: 'polygon-mainnet',
@@ -219,7 +221,12 @@ exports.AgentUpdateCdpNetworkIdEnum = {
219
221
  ArbitrumMainnet: 'arbitrum-mainnet',
220
222
  ArbitrumSepolia: 'arbitrum-sepolia',
221
223
  OptimismMainnet: 'optimism-mainnet',
222
- OptimismSepolia: 'optimism-sepolia'
224
+ OptimismSepolia: 'optimism-sepolia',
225
+ Solana: 'solana'
226
+ };
227
+ exports.AgentUserInputShortTermMemoryStrategyEnum = {
228
+ Trim: 'trim',
229
+ Summarize: 'summarize'
223
230
  };
224
231
  /**
225
232
  * Type of message author.
@@ -878,56 +885,6 @@ var AgentApiAxiosParamCreator = function (configuration) {
878
885
  });
879
886
  });
880
887
  },
881
- /**
882
- * 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
883
- * @summary Update Agent
884
- * @param {string} agentId ID of the agent to update
885
- * @param {AgentUpdate} [agentUpdate]
886
- * @param {*} [options] Override http request option.
887
- * @throws {RequiredError}
888
- */
889
- updateAgent: function (agentId_1, agentUpdate_1) {
890
- var args_1 = [];
891
- for (var _i = 2; _i < arguments.length; _i++) {
892
- args_1[_i - 2] = arguments[_i];
893
- }
894
- return __awaiter(_this, __spreadArray([agentId_1, agentUpdate_1], args_1, true), void 0, function (agentId, agentUpdate, options) {
895
- var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
896
- if (options === void 0) { options = {}; }
897
- return __generator(this, function (_a) {
898
- switch (_a.label) {
899
- case 0:
900
- // verify required parameter 'agentId' is not null or undefined
901
- (0, common_1.assertParamExists)('updateAgent', 'agentId', agentId);
902
- localVarPath = "/agents/{agent_id}"
903
- .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
904
- localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
905
- if (configuration) {
906
- baseOptions = configuration.baseOptions;
907
- }
908
- localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
909
- localVarHeaderParameter = {};
910
- localVarQueryParameter = {};
911
- // authentication HTTPBearer required
912
- // http bearer authentication required
913
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
914
- case 1:
915
- // authentication HTTPBearer required
916
- // http bearer authentication required
917
- _a.sent();
918
- localVarHeaderParameter['Content-Type'] = 'application/json';
919
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
920
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
921
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
922
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUpdate, localVarRequestOptions, configuration);
923
- return [2 /*return*/, {
924
- url: (0, common_1.toPathString)(localVarUrlObj),
925
- options: localVarRequestOptions,
926
- }];
927
- }
928
- });
929
- });
930
- },
931
888
  /**
932
889
  * 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
933
890
  * @summary Validate Agent Create
@@ -1293,30 +1250,6 @@ var AgentApiFp = function (configuration) {
1293
1250
  });
1294
1251
  });
1295
1252
  },
1296
- /**
1297
- * 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
1298
- * @summary Update Agent
1299
- * @param {string} agentId ID of the agent to update
1300
- * @param {AgentUpdate} [agentUpdate]
1301
- * @param {*} [options] Override http request option.
1302
- * @throws {RequiredError}
1303
- */
1304
- updateAgent: function (agentId, agentUpdate, options) {
1305
- return __awaiter(this, void 0, void 0, function () {
1306
- var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
1307
- var _a, _b, _c;
1308
- return __generator(this, function (_d) {
1309
- switch (_d.label) {
1310
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAgent(agentId, agentUpdate, options)];
1311
- case 1:
1312
- localVarAxiosArgs = _d.sent();
1313
- localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1314
- localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.updateAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1315
- return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
1316
- }
1317
- });
1318
- });
1319
- },
1320
1253
  /**
1321
1254
  * 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
1322
1255
  * @summary Validate Agent Create
@@ -1490,17 +1423,6 @@ var AgentApiFactory = function (configuration, basePath, axios) {
1490
1423
  resetAgentApiKey: function (agentId, options) {
1491
1424
  return localVarFp.resetAgentApiKey(agentId, options).then(function (request) { return request(axios, basePath); });
1492
1425
  },
1493
- /**
1494
- * 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
1495
- * @summary Update Agent
1496
- * @param {string} agentId ID of the agent to update
1497
- * @param {AgentUpdate} [agentUpdate]
1498
- * @param {*} [options] Override http request option.
1499
- * @throws {RequiredError}
1500
- */
1501
- updateAgent: function (agentId, agentUpdate, options) {
1502
- return localVarFp.updateAgent(agentId, agentUpdate, options).then(function (request) { return request(axios, basePath); });
1503
- },
1504
1426
  /**
1505
1427
  * 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
1506
1428
  * @summary Validate Agent Create
@@ -1674,19 +1596,6 @@ var AgentApi = /** @class */ (function (_super) {
1674
1596
  var _this = this;
1675
1597
  return (0, exports.AgentApiFp)(this.configuration).resetAgentApiKey(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1676
1598
  };
1677
- /**
1678
- * 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
1679
- * @summary Update Agent
1680
- * @param {string} agentId ID of the agent to update
1681
- * @param {AgentUpdate} [agentUpdate]
1682
- * @param {*} [options] Override http request option.
1683
- * @throws {RequiredError}
1684
- * @memberof AgentApi
1685
- */
1686
- AgentApi.prototype.updateAgent = function (agentId, agentUpdate, options) {
1687
- var _this = this;
1688
- return (0, exports.AgentApiFp)(this.configuration).updateAgent(agentId, agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
1689
- };
1690
1599
  /**
1691
1600
  * 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
1692
1601
  * @summary Validate Agent Create
@@ -3318,6 +3227,526 @@ var CreditApi = /** @class */ (function (_super) {
3318
3227
  return CreditApi;
3319
3228
  }(base_1.BaseAPI));
3320
3229
  exports.CreditApi = CreditApi;
3230
+ /**
3231
+ * DraftApi - axios parameter creator
3232
+ * @export
3233
+ */
3234
+ var DraftApiAxiosParamCreator = function (configuration) {
3235
+ var _this = this;
3236
+ return {
3237
+ /**
3238
+ * 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
3239
+ * @summary Create Agent Draft
3240
+ * @param {AgentUserInput} agentUserInput
3241
+ * @param {*} [options] Override http request option.
3242
+ * @throws {RequiredError}
3243
+ */
3244
+ createAgentDraft: function (agentUserInput_1) {
3245
+ var args_1 = [];
3246
+ for (var _i = 1; _i < arguments.length; _i++) {
3247
+ args_1[_i - 1] = arguments[_i];
3248
+ }
3249
+ return __awaiter(_this, __spreadArray([agentUserInput_1], args_1, true), void 0, function (agentUserInput, options) {
3250
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3251
+ if (options === void 0) { options = {}; }
3252
+ return __generator(this, function (_a) {
3253
+ switch (_a.label) {
3254
+ case 0:
3255
+ // verify required parameter 'agentUserInput' is not null or undefined
3256
+ (0, common_1.assertParamExists)('createAgentDraft', 'agentUserInput', agentUserInput);
3257
+ localVarPath = "/agent/draft";
3258
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3259
+ if (configuration) {
3260
+ baseOptions = configuration.baseOptions;
3261
+ }
3262
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
3263
+ localVarHeaderParameter = {};
3264
+ localVarQueryParameter = {};
3265
+ // authentication HTTPBearer required
3266
+ // http bearer authentication required
3267
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3268
+ case 1:
3269
+ // authentication HTTPBearer required
3270
+ // http bearer authentication required
3271
+ _a.sent();
3272
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3273
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3274
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3275
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3276
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUserInput, localVarRequestOptions, configuration);
3277
+ return [2 /*return*/, {
3278
+ url: (0, common_1.toPathString)(localVarUrlObj),
3279
+ options: localVarRequestOptions,
3280
+ }];
3281
+ }
3282
+ });
3283
+ });
3284
+ },
3285
+ /**
3286
+ * 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
3287
+ * @summary Get Agent Draft By Id
3288
+ * @param {string} agentId Agent ID
3289
+ * @param {string} draftId Draft ID
3290
+ * @param {*} [options] Override http request option.
3291
+ * @throws {RequiredError}
3292
+ */
3293
+ getAgentDraftById: function (agentId_1, draftId_1) {
3294
+ var args_1 = [];
3295
+ for (var _i = 2; _i < arguments.length; _i++) {
3296
+ args_1[_i - 2] = arguments[_i];
3297
+ }
3298
+ return __awaiter(_this, __spreadArray([agentId_1, draftId_1], args_1, true), void 0, function (agentId, draftId, options) {
3299
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3300
+ if (options === void 0) { options = {}; }
3301
+ return __generator(this, function (_a) {
3302
+ switch (_a.label) {
3303
+ case 0:
3304
+ // verify required parameter 'agentId' is not null or undefined
3305
+ (0, common_1.assertParamExists)('getAgentDraftById', 'agentId', agentId);
3306
+ // verify required parameter 'draftId' is not null or undefined
3307
+ (0, common_1.assertParamExists)('getAgentDraftById', 'draftId', draftId);
3308
+ localVarPath = "/agents/{agent_id}/drafts/{draft_id}"
3309
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)))
3310
+ .replace("{".concat("draft_id", "}"), encodeURIComponent(String(draftId)));
3311
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3312
+ if (configuration) {
3313
+ baseOptions = configuration.baseOptions;
3314
+ }
3315
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
3316
+ localVarHeaderParameter = {};
3317
+ localVarQueryParameter = {};
3318
+ // authentication HTTPBearer required
3319
+ // http bearer authentication required
3320
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3321
+ case 1:
3322
+ // authentication HTTPBearer required
3323
+ // http bearer authentication required
3324
+ _a.sent();
3325
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3326
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3327
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3328
+ return [2 /*return*/, {
3329
+ url: (0, common_1.toPathString)(localVarUrlObj),
3330
+ options: localVarRequestOptions,
3331
+ }];
3332
+ }
3333
+ });
3334
+ });
3335
+ },
3336
+ /**
3337
+ * 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
3338
+ * @summary Get Agent Drafts
3339
+ * @param {string} agentId Agent ID
3340
+ * @param {*} [options] Override http request option.
3341
+ * @throws {RequiredError}
3342
+ */
3343
+ getAgentDrafts: function (agentId_1) {
3344
+ var args_1 = [];
3345
+ for (var _i = 1; _i < arguments.length; _i++) {
3346
+ args_1[_i - 1] = arguments[_i];
3347
+ }
3348
+ return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
3349
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3350
+ if (options === void 0) { options = {}; }
3351
+ return __generator(this, function (_a) {
3352
+ switch (_a.label) {
3353
+ case 0:
3354
+ // verify required parameter 'agentId' is not null or undefined
3355
+ (0, common_1.assertParamExists)('getAgentDrafts', 'agentId', agentId);
3356
+ localVarPath = "/agents/{agent_id}/drafts"
3357
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
3358
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3359
+ if (configuration) {
3360
+ baseOptions = configuration.baseOptions;
3361
+ }
3362
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
3363
+ localVarHeaderParameter = {};
3364
+ localVarQueryParameter = {};
3365
+ // authentication HTTPBearer required
3366
+ // http bearer authentication required
3367
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3368
+ case 1:
3369
+ // authentication HTTPBearer required
3370
+ // http bearer authentication required
3371
+ _a.sent();
3372
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3373
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3374
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3375
+ return [2 /*return*/, {
3376
+ url: (0, common_1.toPathString)(localVarUrlObj),
3377
+ options: localVarRequestOptions,
3378
+ }];
3379
+ }
3380
+ });
3381
+ });
3382
+ },
3383
+ /**
3384
+ * 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
3385
+ * @summary Get Agent Latest Draft
3386
+ * @param {string} agentId Agent ID
3387
+ * @param {*} [options] Override http request option.
3388
+ * @throws {RequiredError}
3389
+ */
3390
+ getAgentLatestDraft: function (agentId_1) {
3391
+ var args_1 = [];
3392
+ for (var _i = 1; _i < arguments.length; _i++) {
3393
+ args_1[_i - 1] = arguments[_i];
3394
+ }
3395
+ return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
3396
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3397
+ if (options === void 0) { options = {}; }
3398
+ return __generator(this, function (_a) {
3399
+ switch (_a.label) {
3400
+ case 0:
3401
+ // verify required parameter 'agentId' is not null or undefined
3402
+ (0, common_1.assertParamExists)('getAgentLatestDraft', 'agentId', agentId);
3403
+ localVarPath = "/agents/{agent_id}/draft/latest"
3404
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
3405
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3406
+ if (configuration) {
3407
+ baseOptions = configuration.baseOptions;
3408
+ }
3409
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
3410
+ localVarHeaderParameter = {};
3411
+ localVarQueryParameter = {};
3412
+ // authentication HTTPBearer required
3413
+ // http bearer authentication required
3414
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3415
+ case 1:
3416
+ // authentication HTTPBearer required
3417
+ // http bearer authentication required
3418
+ _a.sent();
3419
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3420
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3421
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3422
+ return [2 /*return*/, {
3423
+ url: (0, common_1.toPathString)(localVarUrlObj),
3424
+ options: localVarRequestOptions,
3425
+ }];
3426
+ }
3427
+ });
3428
+ });
3429
+ },
3430
+ /**
3431
+ * 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
3432
+ * @summary Update Agent Draft
3433
+ * @param {string} agentId Agent ID
3434
+ * @param {AgentUserInput} agentUserInput
3435
+ * @param {*} [options] Override http request option.
3436
+ * @throws {RequiredError}
3437
+ */
3438
+ updateAgentDraft: function (agentId_1, agentUserInput_1) {
3439
+ var args_1 = [];
3440
+ for (var _i = 2; _i < arguments.length; _i++) {
3441
+ args_1[_i - 2] = arguments[_i];
3442
+ }
3443
+ return __awaiter(_this, __spreadArray([agentId_1, agentUserInput_1], args_1, true), void 0, function (agentId, agentUserInput, options) {
3444
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3445
+ if (options === void 0) { options = {}; }
3446
+ return __generator(this, function (_a) {
3447
+ switch (_a.label) {
3448
+ case 0:
3449
+ // verify required parameter 'agentId' is not null or undefined
3450
+ (0, common_1.assertParamExists)('updateAgentDraft', 'agentId', agentId);
3451
+ // verify required parameter 'agentUserInput' is not null or undefined
3452
+ (0, common_1.assertParamExists)('updateAgentDraft', 'agentUserInput', agentUserInput);
3453
+ localVarPath = "/agents/{agent_id}/draft"
3454
+ .replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
3455
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3456
+ if (configuration) {
3457
+ baseOptions = configuration.baseOptions;
3458
+ }
3459
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
3460
+ localVarHeaderParameter = {};
3461
+ localVarQueryParameter = {};
3462
+ // authentication HTTPBearer required
3463
+ // http bearer authentication required
3464
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3465
+ case 1:
3466
+ // authentication HTTPBearer required
3467
+ // http bearer authentication required
3468
+ _a.sent();
3469
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3470
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3471
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3472
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3473
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentUserInput, localVarRequestOptions, configuration);
3474
+ return [2 /*return*/, {
3475
+ url: (0, common_1.toPathString)(localVarUrlObj),
3476
+ options: localVarRequestOptions,
3477
+ }];
3478
+ }
3479
+ });
3480
+ });
3481
+ },
3482
+ };
3483
+ };
3484
+ exports.DraftApiAxiosParamCreator = DraftApiAxiosParamCreator;
3485
+ /**
3486
+ * DraftApi - functional programming interface
3487
+ * @export
3488
+ */
3489
+ var DraftApiFp = function (configuration) {
3490
+ var localVarAxiosParamCreator = (0, exports.DraftApiAxiosParamCreator)(configuration);
3491
+ return {
3492
+ /**
3493
+ * 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
3494
+ * @summary Create Agent Draft
3495
+ * @param {AgentUserInput} agentUserInput
3496
+ * @param {*} [options] Override http request option.
3497
+ * @throws {RequiredError}
3498
+ */
3499
+ createAgentDraft: function (agentUserInput, options) {
3500
+ return __awaiter(this, void 0, void 0, function () {
3501
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3502
+ var _a, _b, _c;
3503
+ return __generator(this, function (_d) {
3504
+ switch (_d.label) {
3505
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createAgentDraft(agentUserInput, options)];
3506
+ case 1:
3507
+ localVarAxiosArgs = _d.sent();
3508
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3509
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.createAgentDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3510
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3511
+ }
3512
+ });
3513
+ });
3514
+ },
3515
+ /**
3516
+ * 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
3517
+ * @summary Get Agent Draft By Id
3518
+ * @param {string} agentId Agent ID
3519
+ * @param {string} draftId Draft ID
3520
+ * @param {*} [options] Override http request option.
3521
+ * @throws {RequiredError}
3522
+ */
3523
+ getAgentDraftById: function (agentId, draftId, options) {
3524
+ return __awaiter(this, void 0, void 0, function () {
3525
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3526
+ var _a, _b, _c;
3527
+ return __generator(this, function (_d) {
3528
+ switch (_d.label) {
3529
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentDraftById(agentId, draftId, options)];
3530
+ case 1:
3531
+ localVarAxiosArgs = _d.sent();
3532
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3533
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.getAgentDraftById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3534
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3535
+ }
3536
+ });
3537
+ });
3538
+ },
3539
+ /**
3540
+ * 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
3541
+ * @summary Get Agent Drafts
3542
+ * @param {string} agentId Agent ID
3543
+ * @param {*} [options] Override http request option.
3544
+ * @throws {RequiredError}
3545
+ */
3546
+ getAgentDrafts: function (agentId, options) {
3547
+ return __awaiter(this, void 0, void 0, function () {
3548
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3549
+ var _a, _b, _c;
3550
+ return __generator(this, function (_d) {
3551
+ switch (_d.label) {
3552
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentDrafts(agentId, options)];
3553
+ case 1:
3554
+ localVarAxiosArgs = _d.sent();
3555
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3556
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.getAgentDrafts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3557
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3558
+ }
3559
+ });
3560
+ });
3561
+ },
3562
+ /**
3563
+ * 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
3564
+ * @summary Get Agent Latest Draft
3565
+ * @param {string} agentId Agent ID
3566
+ * @param {*} [options] Override http request option.
3567
+ * @throws {RequiredError}
3568
+ */
3569
+ getAgentLatestDraft: function (agentId, options) {
3570
+ return __awaiter(this, void 0, void 0, function () {
3571
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3572
+ var _a, _b, _c;
3573
+ return __generator(this, function (_d) {
3574
+ switch (_d.label) {
3575
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentLatestDraft(agentId, options)];
3576
+ case 1:
3577
+ localVarAxiosArgs = _d.sent();
3578
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3579
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.getAgentLatestDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3580
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3581
+ }
3582
+ });
3583
+ });
3584
+ },
3585
+ /**
3586
+ * 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
3587
+ * @summary Update Agent Draft
3588
+ * @param {string} agentId Agent ID
3589
+ * @param {AgentUserInput} agentUserInput
3590
+ * @param {*} [options] Override http request option.
3591
+ * @throws {RequiredError}
3592
+ */
3593
+ updateAgentDraft: function (agentId, agentUserInput, options) {
3594
+ return __awaiter(this, void 0, void 0, function () {
3595
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3596
+ var _a, _b, _c;
3597
+ return __generator(this, function (_d) {
3598
+ switch (_d.label) {
3599
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateAgentDraft(agentId, agentUserInput, options)];
3600
+ case 1:
3601
+ localVarAxiosArgs = _d.sent();
3602
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3603
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.updateAgentDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3604
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3605
+ }
3606
+ });
3607
+ });
3608
+ },
3609
+ };
3610
+ };
3611
+ exports.DraftApiFp = DraftApiFp;
3612
+ /**
3613
+ * DraftApi - factory interface
3614
+ * @export
3615
+ */
3616
+ var DraftApiFactory = function (configuration, basePath, axios) {
3617
+ var localVarFp = (0, exports.DraftApiFp)(configuration);
3618
+ return {
3619
+ /**
3620
+ * 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
3621
+ * @summary Create Agent Draft
3622
+ * @param {AgentUserInput} agentUserInput
3623
+ * @param {*} [options] Override http request option.
3624
+ * @throws {RequiredError}
3625
+ */
3626
+ createAgentDraft: function (agentUserInput, options) {
3627
+ return localVarFp.createAgentDraft(agentUserInput, options).then(function (request) { return request(axios, basePath); });
3628
+ },
3629
+ /**
3630
+ * 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
3631
+ * @summary Get Agent Draft By Id
3632
+ * @param {string} agentId Agent ID
3633
+ * @param {string} draftId Draft ID
3634
+ * @param {*} [options] Override http request option.
3635
+ * @throws {RequiredError}
3636
+ */
3637
+ getAgentDraftById: function (agentId, draftId, options) {
3638
+ return localVarFp.getAgentDraftById(agentId, draftId, options).then(function (request) { return request(axios, basePath); });
3639
+ },
3640
+ /**
3641
+ * 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
3642
+ * @summary Get Agent Drafts
3643
+ * @param {string} agentId Agent ID
3644
+ * @param {*} [options] Override http request option.
3645
+ * @throws {RequiredError}
3646
+ */
3647
+ getAgentDrafts: function (agentId, options) {
3648
+ return localVarFp.getAgentDrafts(agentId, options).then(function (request) { return request(axios, basePath); });
3649
+ },
3650
+ /**
3651
+ * 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
3652
+ * @summary Get Agent Latest Draft
3653
+ * @param {string} agentId Agent ID
3654
+ * @param {*} [options] Override http request option.
3655
+ * @throws {RequiredError}
3656
+ */
3657
+ getAgentLatestDraft: function (agentId, options) {
3658
+ return localVarFp.getAgentLatestDraft(agentId, options).then(function (request) { return request(axios, basePath); });
3659
+ },
3660
+ /**
3661
+ * 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
3662
+ * @summary Update Agent Draft
3663
+ * @param {string} agentId Agent ID
3664
+ * @param {AgentUserInput} agentUserInput
3665
+ * @param {*} [options] Override http request option.
3666
+ * @throws {RequiredError}
3667
+ */
3668
+ updateAgentDraft: function (agentId, agentUserInput, options) {
3669
+ return localVarFp.updateAgentDraft(agentId, agentUserInput, options).then(function (request) { return request(axios, basePath); });
3670
+ },
3671
+ };
3672
+ };
3673
+ exports.DraftApiFactory = DraftApiFactory;
3674
+ /**
3675
+ * DraftApi - object-oriented interface
3676
+ * @export
3677
+ * @class DraftApi
3678
+ * @extends {BaseAPI}
3679
+ */
3680
+ var DraftApi = /** @class */ (function (_super) {
3681
+ __extends(DraftApi, _super);
3682
+ function DraftApi() {
3683
+ return _super !== null && _super.apply(this, arguments) || this;
3684
+ }
3685
+ /**
3686
+ * 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
3687
+ * @summary Create Agent Draft
3688
+ * @param {AgentUserInput} agentUserInput
3689
+ * @param {*} [options] Override http request option.
3690
+ * @throws {RequiredError}
3691
+ * @memberof DraftApi
3692
+ */
3693
+ DraftApi.prototype.createAgentDraft = function (agentUserInput, options) {
3694
+ var _this = this;
3695
+ return (0, exports.DraftApiFp)(this.configuration).createAgentDraft(agentUserInput, options).then(function (request) { return request(_this.axios, _this.basePath); });
3696
+ };
3697
+ /**
3698
+ * 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
3699
+ * @summary Get Agent Draft By Id
3700
+ * @param {string} agentId Agent ID
3701
+ * @param {string} draftId Draft ID
3702
+ * @param {*} [options] Override http request option.
3703
+ * @throws {RequiredError}
3704
+ * @memberof DraftApi
3705
+ */
3706
+ DraftApi.prototype.getAgentDraftById = function (agentId, draftId, options) {
3707
+ var _this = this;
3708
+ return (0, exports.DraftApiFp)(this.configuration).getAgentDraftById(agentId, draftId, options).then(function (request) { return request(_this.axios, _this.basePath); });
3709
+ };
3710
+ /**
3711
+ * 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
3712
+ * @summary Get Agent Drafts
3713
+ * @param {string} agentId Agent ID
3714
+ * @param {*} [options] Override http request option.
3715
+ * @throws {RequiredError}
3716
+ * @memberof DraftApi
3717
+ */
3718
+ DraftApi.prototype.getAgentDrafts = function (agentId, options) {
3719
+ var _this = this;
3720
+ return (0, exports.DraftApiFp)(this.configuration).getAgentDrafts(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
3721
+ };
3722
+ /**
3723
+ * 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
3724
+ * @summary Get Agent Latest Draft
3725
+ * @param {string} agentId Agent ID
3726
+ * @param {*} [options] Override http request option.
3727
+ * @throws {RequiredError}
3728
+ * @memberof DraftApi
3729
+ */
3730
+ DraftApi.prototype.getAgentLatestDraft = function (agentId, options) {
3731
+ var _this = this;
3732
+ return (0, exports.DraftApiFp)(this.configuration).getAgentLatestDraft(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
3733
+ };
3734
+ /**
3735
+ * 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
3736
+ * @summary Update Agent Draft
3737
+ * @param {string} agentId Agent ID
3738
+ * @param {AgentUserInput} agentUserInput
3739
+ * @param {*} [options] Override http request option.
3740
+ * @throws {RequiredError}
3741
+ * @memberof DraftApi
3742
+ */
3743
+ DraftApi.prototype.updateAgentDraft = function (agentId, agentUserInput, options) {
3744
+ var _this = this;
3745
+ return (0, exports.DraftApiFp)(this.configuration).updateAgentDraft(agentId, agentUserInput, options).then(function (request) { return request(_this.axios, _this.basePath); });
3746
+ };
3747
+ return DraftApi;
3748
+ }(base_1.BaseAPI));
3749
+ exports.DraftApi = DraftApi;
3321
3750
  /**
3322
3751
  * GeneratorApi - axios parameter creator
3323
3752
  * @export