@crestal/nation-sdk 0.7.3 → 0.7.4

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @crestal/nation-sdk@0.7.3
1
+ ## @crestal/nation-sdk@0.7.4
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @crestal/nation-sdk@0.7.3 --save
39
+ npm install @crestal/nation-sdk@0.7.4 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -84,6 +84,7 @@ Class | Method | HTTP request | Description
84
84
  *DraftApi* | [**getAgentDraftById**](docs/DraftApi.md#getagentdraftbyid) | **GET** /agents/{agent_id}/drafts/{draft_id} | Get Agent Draft By Id
85
85
  *DraftApi* | [**getAgentDrafts**](docs/DraftApi.md#getagentdrafts) | **GET** /agents/{agent_id}/drafts | Get Agent Drafts
86
86
  *DraftApi* | [**getAgentLatestDraft**](docs/DraftApi.md#getagentlatestdraft) | **GET** /agents/{agent_id}/draft/latest | Get Agent Latest Draft
87
+ *DraftApi* | [**getUserUnpublishedDrafts**](docs/DraftApi.md#getuserunpublisheddrafts) | **GET** /agent/drafts | Get User Unpublished Drafts
87
88
  *DraftApi* | [**updateAgentDraft**](docs/DraftApi.md#updateagentdraft) | **PUT** /agents/{agent_id}/draft | Update Agent Draft
88
89
  *GeneratorApi* | [**generateAgent**](docs/GeneratorApi.md#generateagent) | **POST** /generator/agent/generate | Generate Agent from Natural Language Prompt
89
90
  *GeneratorApi* | [**getGenerationHistory**](docs/GeneratorApi.md#getgenerationhistory) | **GET** /generator/agent/generations/{project_id} | Get Generation Detail by Project ID
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.3
7
+ * The version of the OpenAPI document: 0.7.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4012,6 +4012,40 @@ export const DraftApiAxiosParamCreator = function (configuration?: Configuration
4012
4012
 
4013
4013
 
4014
4014
 
4015
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4016
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4017
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4018
+
4019
+ return {
4020
+ url: toPathString(localVarUrlObj),
4021
+ options: localVarRequestOptions,
4022
+ };
4023
+ },
4024
+ /**
4025
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
4026
+ * @summary Get User Unpublished Drafts
4027
+ * @param {*} [options] Override http request option.
4028
+ * @throws {RequiredError}
4029
+ */
4030
+ getUserUnpublishedDrafts: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4031
+ const localVarPath = `/agent/drafts`;
4032
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4033
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4034
+ let baseOptions;
4035
+ if (configuration) {
4036
+ baseOptions = configuration.baseOptions;
4037
+ }
4038
+
4039
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
4040
+ const localVarHeaderParameter = {} as any;
4041
+ const localVarQueryParameter = {} as any;
4042
+
4043
+ // authentication HTTPBearer required
4044
+ // http bearer authentication required
4045
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
4046
+
4047
+
4048
+
4015
4049
  setSearchParams(localVarUrlObj, localVarQueryParameter);
4016
4050
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4017
4051
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -4140,6 +4174,18 @@ export const DraftApiFp = function(configuration?: Configuration) {
4140
4174
  const localVarOperationServerBasePath = operationServerMap['DraftApi.getAgentLatestDraft']?.[localVarOperationServerIndex]?.url;
4141
4175
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4142
4176
  },
4177
+ /**
4178
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
4179
+ * @summary Get User Unpublished Drafts
4180
+ * @param {*} [options] Override http request option.
4181
+ * @throws {RequiredError}
4182
+ */
4183
+ async getUserUnpublishedDrafts(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AgentDraft>>> {
4184
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUserUnpublishedDrafts(options);
4185
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4186
+ const localVarOperationServerBasePath = operationServerMap['DraftApi.getUserUnpublishedDrafts']?.[localVarOperationServerIndex]?.url;
4187
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4188
+ },
4143
4189
  /**
4144
4190
  * 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
4145
4191
  * @summary Update Agent Draft
@@ -4214,6 +4260,15 @@ export const DraftApiFactory = function (configuration?: Configuration, basePath
4214
4260
  getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
4215
4261
  return localVarFp.getAgentLatestDraft(agentId, options).then((request) => request(axios, basePath));
4216
4262
  },
4263
+ /**
4264
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
4265
+ * @summary Get User Unpublished Drafts
4266
+ * @param {*} [options] Override http request option.
4267
+ * @throws {RequiredError}
4268
+ */
4269
+ getUserUnpublishedDrafts(options?: RawAxiosRequestConfig): AxiosPromise<Array<AgentDraft>> {
4270
+ return localVarFp.getUserUnpublishedDrafts(options).then((request) => request(axios, basePath));
4271
+ },
4217
4272
  /**
4218
4273
  * 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
4219
4274
  * @summary Update Agent Draft
@@ -4288,6 +4343,16 @@ export class DraftApi extends BaseAPI {
4288
4343
  return DraftApiFp(this.configuration).getAgentLatestDraft(agentId, options).then((request) => request(this.axios, this.basePath));
4289
4344
  }
4290
4345
 
4346
+ /**
4347
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
4348
+ * @summary Get User Unpublished Drafts
4349
+ * @param {*} [options] Override http request option.
4350
+ * @throws {RequiredError}
4351
+ */
4352
+ public getUserUnpublishedDrafts(options?: RawAxiosRequestConfig) {
4353
+ return DraftApiFp(this.configuration).getUserUnpublishedDrafts(options).then((request) => request(this.axios, this.basePath));
4354
+ }
4355
+
4291
4356
  /**
4292
4357
  * 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
4293
4358
  * @summary Update Agent Draft
package/base.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.3
7
+ * The version of the OpenAPI document: 0.7.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/common.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.3
7
+ * The version of the OpenAPI document: 0.7.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/configuration.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.3
7
+ * The version of the OpenAPI document: 0.7.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/api.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.3
5
+ * The version of the OpenAPI document: 0.7.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2511,6 +2511,13 @@ export declare const DraftApiAxiosParamCreator: (configuration?: Configuration)
2511
2511
  * @throws {RequiredError}
2512
2512
  */
2513
2513
  getAgentLatestDraft: (agentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2514
+ /**
2515
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
2516
+ * @summary Get User Unpublished Drafts
2517
+ * @param {*} [options] Override http request option.
2518
+ * @throws {RequiredError}
2519
+ */
2520
+ getUserUnpublishedDrafts: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
2514
2521
  /**
2515
2522
  * 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
2516
2523
  * @summary Update Agent Draft
@@ -2566,6 +2573,13 @@ export declare const DraftApiFp: (configuration?: Configuration) => {
2566
2573
  * @throws {RequiredError}
2567
2574
  */
2568
2575
  getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>>;
2576
+ /**
2577
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
2578
+ * @summary Get User Unpublished Drafts
2579
+ * @param {*} [options] Override http request option.
2580
+ * @throws {RequiredError}
2581
+ */
2582
+ getUserUnpublishedDrafts(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<AgentDraft>>>;
2569
2583
  /**
2570
2584
  * 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
2571
2585
  * @summary Update Agent Draft
@@ -2621,6 +2635,13 @@ export declare const DraftApiFactory: (configuration?: Configuration, basePath?:
2621
2635
  * @throws {RequiredError}
2622
2636
  */
2623
2637
  getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft>;
2638
+ /**
2639
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
2640
+ * @summary Get User Unpublished Drafts
2641
+ * @param {*} [options] Override http request option.
2642
+ * @throws {RequiredError}
2643
+ */
2644
+ getUserUnpublishedDrafts(options?: RawAxiosRequestConfig): AxiosPromise<Array<AgentDraft>>;
2624
2645
  /**
2625
2646
  * 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
2626
2647
  * @summary Update Agent Draft
@@ -2676,6 +2697,13 @@ export declare class DraftApi extends BaseAPI {
2676
2697
  * @throws {RequiredError}
2677
2698
  */
2678
2699
  getAgentLatestDraft(agentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentDraft, any, {}>>;
2700
+ /**
2701
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
2702
+ * @summary Get User Unpublished Drafts
2703
+ * @param {*} [options] Override http request option.
2704
+ * @throws {RequiredError}
2705
+ */
2706
+ getUserUnpublishedDrafts(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentDraft[], any, {}>>;
2679
2707
  /**
2680
2708
  * 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
2681
2709
  * @summary Update Agent Draft
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.7.3
8
+ * The version of the OpenAPI document: 0.7.4
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -3401,6 +3401,49 @@ var DraftApiAxiosParamCreator = function (configuration) {
3401
3401
  });
3402
3402
  });
3403
3403
  },
3404
+ /**
3405
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
3406
+ * @summary Get User Unpublished Drafts
3407
+ * @param {*} [options] Override http request option.
3408
+ * @throws {RequiredError}
3409
+ */
3410
+ getUserUnpublishedDrafts: function () {
3411
+ var args_1 = [];
3412
+ for (var _i = 0; _i < arguments.length; _i++) {
3413
+ args_1[_i] = arguments[_i];
3414
+ }
3415
+ return __awaiter(_this, __spreadArray([], args_1, true), void 0, function (options) {
3416
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
3417
+ if (options === void 0) { options = {}; }
3418
+ return __generator(this, function (_a) {
3419
+ switch (_a.label) {
3420
+ case 0:
3421
+ localVarPath = "/agent/drafts";
3422
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
3423
+ if (configuration) {
3424
+ baseOptions = configuration.baseOptions;
3425
+ }
3426
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
3427
+ localVarHeaderParameter = {};
3428
+ localVarQueryParameter = {};
3429
+ // authentication HTTPBearer required
3430
+ // http bearer authentication required
3431
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
3432
+ case 1:
3433
+ // authentication HTTPBearer required
3434
+ // http bearer authentication required
3435
+ _a.sent();
3436
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
3437
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3438
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
3439
+ return [2 /*return*/, {
3440
+ url: (0, common_1.toPathString)(localVarUrlObj),
3441
+ options: localVarRequestOptions,
3442
+ }];
3443
+ }
3444
+ });
3445
+ });
3446
+ },
3404
3447
  /**
3405
3448
  * 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
3406
3449
  * @summary Update Agent Draft
@@ -3578,6 +3621,28 @@ var DraftApiFp = function (configuration) {
3578
3621
  });
3579
3622
  });
3580
3623
  },
3624
+ /**
3625
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
3626
+ * @summary Get User Unpublished Drafts
3627
+ * @param {*} [options] Override http request option.
3628
+ * @throws {RequiredError}
3629
+ */
3630
+ getUserUnpublishedDrafts: function (options) {
3631
+ return __awaiter(this, void 0, void 0, function () {
3632
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
3633
+ var _a, _b, _c;
3634
+ return __generator(this, function (_d) {
3635
+ switch (_d.label) {
3636
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserUnpublishedDrafts(options)];
3637
+ case 1:
3638
+ localVarAxiosArgs = _d.sent();
3639
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3640
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.getUserUnpublishedDrafts']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3641
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
3642
+ }
3643
+ });
3644
+ });
3645
+ },
3581
3646
  /**
3582
3647
  * 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
3583
3648
  * @summary Update Agent Draft
@@ -3662,6 +3727,15 @@ var DraftApiFactory = function (configuration, basePath, axios) {
3662
3727
  getAgentLatestDraft: function (agentId, options) {
3663
3728
  return localVarFp.getAgentLatestDraft(agentId, options).then(function (request) { return request(axios, basePath); });
3664
3729
  },
3730
+ /**
3731
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
3732
+ * @summary Get User Unpublished Drafts
3733
+ * @param {*} [options] Override http request option.
3734
+ * @throws {RequiredError}
3735
+ */
3736
+ getUserUnpublishedDrafts: function (options) {
3737
+ return localVarFp.getUserUnpublishedDrafts(options).then(function (request) { return request(axios, basePath); });
3738
+ },
3665
3739
  /**
3666
3740
  * 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
3667
3741
  * @summary Update Agent Draft
@@ -3740,6 +3814,16 @@ var DraftApi = /** @class */ (function (_super) {
3740
3814
  var _this = this;
3741
3815
  return (0, exports.DraftApiFp)(this.configuration).getAgentLatestDraft(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
3742
3816
  };
3817
+ /**
3818
+ * Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
3819
+ * @summary Get User Unpublished Drafts
3820
+ * @param {*} [options] Override http request option.
3821
+ * @throws {RequiredError}
3822
+ */
3823
+ DraftApi.prototype.getUserUnpublishedDrafts = function (options) {
3824
+ var _this = this;
3825
+ return (0, exports.DraftApiFp)(this.configuration).getUserUnpublishedDrafts(options).then(function (request) { return request(_this.axios, _this.basePath); });
3826
+ };
3743
3827
  /**
3744
3828
  * 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
3745
3829
  * @summary Update Agent Draft
package/dist/base.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.3
5
+ * The version of the OpenAPI document: 0.7.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/base.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.7.3
8
+ * The version of the OpenAPI document: 0.7.4
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.3
5
+ * The version of the OpenAPI document: 0.7.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/common.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.7.3
8
+ * The version of the OpenAPI document: 0.7.4
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.3
5
+ * The version of the OpenAPI document: 0.7.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -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.7.3
8
+ * The version of the OpenAPI document: 0.7.4
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.7.3
5
+ * The version of the OpenAPI document: 0.7.4
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/dist/index.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.7.3
8
+ * The version of the OpenAPI document: 0.7.4
9
9
  *
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/docs/DraftApi.md CHANGED
@@ -9,6 +9,7 @@ All URIs are relative to *http://localhost*
9
9
  |[**getAgentDraftById**](#getagentdraftbyid) | **GET** /agents/{agent_id}/drafts/{draft_id} | Get Agent Draft By Id|
10
10
  |[**getAgentDrafts**](#getagentdrafts) | **GET** /agents/{agent_id}/drafts | Get Agent Drafts|
11
11
  |[**getAgentLatestDraft**](#getagentlatestdraft) | **GET** /agents/{agent_id}/draft/latest | Get Agent Latest Draft|
12
+ |[**getUserUnpublishedDrafts**](#getuserunpublisheddrafts) | **GET** /agent/drafts | Get User Unpublished Drafts|
12
13
  |[**updateAgentDraft**](#updateagentdraft) | **PUT** /agents/{agent_id}/draft | Update Agent Draft|
13
14
 
14
15
  # **createAgentDraft**
@@ -276,6 +277,50 @@ const { status, data } = await apiInstance.getAgentLatestDraft(
276
277
 
277
278
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
278
279
 
280
+ # **getUserUnpublishedDrafts**
281
+ > Array<AgentDraft> getUserUnpublishedDrafts()
282
+
283
+ Get all unpublished drafts for the current user. Returns all drafts owned by the current user where deployed_at is null, ordered by updated_at in descending order (most recently updated first). Possible HTTP errors: - 401: Unauthorized access - 500: Internal server error
284
+
285
+ ### Example
286
+
287
+ ```typescript
288
+ import {
289
+ DraftApi,
290
+ Configuration
291
+ } from '@crestal/nation-sdk';
292
+
293
+ const configuration = new Configuration();
294
+ const apiInstance = new DraftApi(configuration);
295
+
296
+ const { status, data } = await apiInstance.getUserUnpublishedDrafts();
297
+ ```
298
+
299
+ ### Parameters
300
+ This endpoint does not have any parameters.
301
+
302
+
303
+ ### Return type
304
+
305
+ **Array<AgentDraft>**
306
+
307
+ ### Authorization
308
+
309
+ [HTTPBearer](../README.md#HTTPBearer)
310
+
311
+ ### HTTP request headers
312
+
313
+ - **Content-Type**: Not defined
314
+ - **Accept**: application/json
315
+
316
+
317
+ ### HTTP response details
318
+ | Status code | Description | Response headers |
319
+ |-------------|-------------|------------------|
320
+ |**200** | Successful Response | - |
321
+
322
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
323
+
279
324
  # **updateAgentDraft**
280
325
  > AgentDraft updateAgentDraft(agentUserInput)
281
326
 
@@ -27,8 +27,8 @@ Name | Type | Description | Notes
27
27
  **supports_presence_penalty** | **boolean** | | [optional] [default to true]
28
28
  **api_base** | **string** | | [optional] [default to undefined]
29
29
  **timeout** | **number** | | [optional] [default to 180]
30
- **created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-19T05:40:39.379+00:00]
31
- **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-19T05:40:39.379+00:00]
30
+ **created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-19T12:03:16.483+00:00]
31
+ **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-19T12:03:16.483+00:00]
32
32
  **provider_name** | **string** | | [default to undefined]
33
33
 
34
34
  ## Example
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.7.3
7
+ * The version of the OpenAPI document: 0.7.4
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crestal/nation-sdk",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "OpenAPI client for @crestal/nation-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {