@crestal/nation-sdk 0.6.32 → 0.7.0
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/.openapi-generator/FILES +1 -0
- package/README.md +4 -2
- package/api.ts +101 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +59 -1
- package/dist/api.js +94 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AgentDeployRequest.md +25 -0
- package/docs/DraftApi.md +54 -0
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/index.ts +1 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @crestal/nation-sdk@0.
|
|
1
|
+
## @crestal/nation-sdk@0.7.0
|
|
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.
|
|
39
|
+
npm install @crestal/nation-sdk@0.7.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -80,6 +80,7 @@ Class | Method | HTTP request | Description
|
|
|
80
80
|
*CreditApi* | [**listUserEvents**](docs/CreditApi.md#listuserevents) | **GET** /credit/user/events | List User Events
|
|
81
81
|
*CreditApi* | [**listUserTransactions**](docs/CreditApi.md#listusertransactions) | **GET** /credit/user/transactions | List User Transactions
|
|
82
82
|
*DraftApi* | [**createAgentDraft**](docs/DraftApi.md#createagentdraft) | **POST** /agent/draft | Create Agent Draft
|
|
83
|
+
*DraftApi* | [**deployAgentFromDraft**](docs/DraftApi.md#deployagentfromdraft) | **POST** /agent/deploy | Deploy Agent From Draft
|
|
83
84
|
*DraftApi* | [**getAgentDraftById**](docs/DraftApi.md#getagentdraftbyid) | **GET** /agents/{agent_id}/drafts/{draft_id} | Get Agent Draft By Id
|
|
84
85
|
*DraftApi* | [**getAgentDrafts**](docs/DraftApi.md#getagentdrafts) | **GET** /agents/{agent_id}/drafts | Get Agent Drafts
|
|
85
86
|
*DraftApi* | [**getAgentLatestDraft**](docs/DraftApi.md#getagentlatestdraft) | **GET** /agents/{agent_id}/draft/latest | Get Agent Latest Draft
|
|
@@ -107,6 +108,7 @@ Class | Method | HTTP request | Description
|
|
|
107
108
|
- [AgentAssetsResponse](docs/AgentAssetsResponse.md)
|
|
108
109
|
- [AgentAutonomous](docs/AgentAutonomous.md)
|
|
109
110
|
- [AgentCreate](docs/AgentCreate.md)
|
|
111
|
+
- [AgentDeployRequest](docs/AgentDeployRequest.md)
|
|
110
112
|
- [AgentDraft](docs/AgentDraft.md)
|
|
111
113
|
- [AgentExample](docs/AgentExample.md)
|
|
112
114
|
- [AgentGenerateRequest](docs/AgentGenerateRequest.md)
|
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
|
+
* The version of the OpenAPI document: 0.7.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -638,6 +638,31 @@ export const AgentCreateShortTermMemoryStrategyEnum = {
|
|
|
638
638
|
|
|
639
639
|
export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
|
|
640
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Request model for agent deployment.
|
|
643
|
+
* @export
|
|
644
|
+
* @interface AgentDeployRequest
|
|
645
|
+
*/
|
|
646
|
+
export interface AgentDeployRequest {
|
|
647
|
+
/**
|
|
648
|
+
* Agent ID to deploy
|
|
649
|
+
* @type {string}
|
|
650
|
+
* @memberof AgentDeployRequest
|
|
651
|
+
*/
|
|
652
|
+
'agent_id': string;
|
|
653
|
+
/**
|
|
654
|
+
* Draft ID to deploy
|
|
655
|
+
* @type {string}
|
|
656
|
+
* @memberof AgentDeployRequest
|
|
657
|
+
*/
|
|
658
|
+
'draft_id': string;
|
|
659
|
+
/**
|
|
660
|
+
* Transaction ID for upstream tracking
|
|
661
|
+
* @type {string}
|
|
662
|
+
* @memberof AgentDeployRequest
|
|
663
|
+
*/
|
|
664
|
+
'tx_id': string;
|
|
665
|
+
}
|
|
641
666
|
/**
|
|
642
667
|
* Agent draft model.
|
|
643
668
|
* @export
|
|
@@ -5945,6 +5970,46 @@ export const DraftApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
5945
5970
|
options: localVarRequestOptions,
|
|
5946
5971
|
};
|
|
5947
5972
|
},
|
|
5973
|
+
/**
|
|
5974
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
5975
|
+
* @summary Deploy Agent From Draft
|
|
5976
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
5977
|
+
* @param {*} [options] Override http request option.
|
|
5978
|
+
* @throws {RequiredError}
|
|
5979
|
+
*/
|
|
5980
|
+
deployAgentFromDraft: async (agentDeployRequest: AgentDeployRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5981
|
+
// verify required parameter 'agentDeployRequest' is not null or undefined
|
|
5982
|
+
assertParamExists('deployAgentFromDraft', 'agentDeployRequest', agentDeployRequest)
|
|
5983
|
+
const localVarPath = `/agent/deploy`;
|
|
5984
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5985
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5986
|
+
let baseOptions;
|
|
5987
|
+
if (configuration) {
|
|
5988
|
+
baseOptions = configuration.baseOptions;
|
|
5989
|
+
}
|
|
5990
|
+
|
|
5991
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5992
|
+
const localVarHeaderParameter = {} as any;
|
|
5993
|
+
const localVarQueryParameter = {} as any;
|
|
5994
|
+
|
|
5995
|
+
// authentication HTTPBearer required
|
|
5996
|
+
// http bearer authentication required
|
|
5997
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5998
|
+
|
|
5999
|
+
|
|
6000
|
+
|
|
6001
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
6002
|
+
|
|
6003
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
6004
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6005
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
6006
|
+
localVarRequestOptions.data = serializeDataIfNeeded(agentDeployRequest, localVarRequestOptions, configuration)
|
|
6007
|
+
|
|
6008
|
+
return {
|
|
6009
|
+
url: toPathString(localVarUrlObj),
|
|
6010
|
+
options: localVarRequestOptions,
|
|
6011
|
+
};
|
|
6012
|
+
},
|
|
5948
6013
|
/**
|
|
5949
6014
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
5950
6015
|
* @summary Get Agent Draft By Id
|
|
@@ -6130,6 +6195,19 @@ export const DraftApiFp = function(configuration?: Configuration) {
|
|
|
6130
6195
|
const localVarOperationServerBasePath = operationServerMap['DraftApi.createAgentDraft']?.[localVarOperationServerIndex]?.url;
|
|
6131
6196
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6132
6197
|
},
|
|
6198
|
+
/**
|
|
6199
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
6200
|
+
* @summary Deploy Agent From Draft
|
|
6201
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
6202
|
+
* @param {*} [options] Override http request option.
|
|
6203
|
+
* @throws {RequiredError}
|
|
6204
|
+
*/
|
|
6205
|
+
async deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>> {
|
|
6206
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deployAgentFromDraft(agentDeployRequest, options);
|
|
6207
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6208
|
+
const localVarOperationServerBasePath = operationServerMap['DraftApi.deployAgentFromDraft']?.[localVarOperationServerIndex]?.url;
|
|
6209
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6210
|
+
},
|
|
6133
6211
|
/**
|
|
6134
6212
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
6135
6213
|
* @summary Get Agent Draft By Id
|
|
@@ -6204,6 +6282,16 @@ export const DraftApiFactory = function (configuration?: Configuration, basePath
|
|
|
6204
6282
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
|
|
6205
6283
|
return localVarFp.createAgentDraft(agentUserInput, options).then((request) => request(axios, basePath));
|
|
6206
6284
|
},
|
|
6285
|
+
/**
|
|
6286
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
6287
|
+
* @summary Deploy Agent From Draft
|
|
6288
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
6289
|
+
* @param {*} [options] Override http request option.
|
|
6290
|
+
* @throws {RequiredError}
|
|
6291
|
+
*/
|
|
6292
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
|
|
6293
|
+
return localVarFp.deployAgentFromDraft(agentDeployRequest, options).then((request) => request(axios, basePath));
|
|
6294
|
+
},
|
|
6207
6295
|
/**
|
|
6208
6296
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
6209
6297
|
* @summary Get Agent Draft By Id
|
|
@@ -6268,6 +6356,18 @@ export class DraftApi extends BaseAPI {
|
|
|
6268
6356
|
return DraftApiFp(this.configuration).createAgentDraft(agentUserInput, options).then((request) => request(this.axios, this.basePath));
|
|
6269
6357
|
}
|
|
6270
6358
|
|
|
6359
|
+
/**
|
|
6360
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
6361
|
+
* @summary Deploy Agent From Draft
|
|
6362
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
6363
|
+
* @param {*} [options] Override http request option.
|
|
6364
|
+
* @throws {RequiredError}
|
|
6365
|
+
* @memberof DraftApi
|
|
6366
|
+
*/
|
|
6367
|
+
public deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig) {
|
|
6368
|
+
return DraftApiFp(this.configuration).deployAgentFromDraft(agentDeployRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6369
|
+
}
|
|
6370
|
+
|
|
6271
6371
|
/**
|
|
6272
6372
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
6273
6373
|
* @summary Get Agent Draft By Id
|
package/base.ts
CHANGED
package/common.ts
CHANGED
package/configuration.ts
CHANGED
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.
|
|
5
|
+
* The version of the OpenAPI document: 0.7.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -618,6 +618,31 @@ export declare const AgentCreateShortTermMemoryStrategyEnum: {
|
|
|
618
618
|
readonly Summarize: "summarize";
|
|
619
619
|
};
|
|
620
620
|
export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
|
|
621
|
+
/**
|
|
622
|
+
* Request model for agent deployment.
|
|
623
|
+
* @export
|
|
624
|
+
* @interface AgentDeployRequest
|
|
625
|
+
*/
|
|
626
|
+
export interface AgentDeployRequest {
|
|
627
|
+
/**
|
|
628
|
+
* Agent ID to deploy
|
|
629
|
+
* @type {string}
|
|
630
|
+
* @memberof AgentDeployRequest
|
|
631
|
+
*/
|
|
632
|
+
'agent_id': string;
|
|
633
|
+
/**
|
|
634
|
+
* Draft ID to deploy
|
|
635
|
+
* @type {string}
|
|
636
|
+
* @memberof AgentDeployRequest
|
|
637
|
+
*/
|
|
638
|
+
'draft_id': string;
|
|
639
|
+
/**
|
|
640
|
+
* Transaction ID for upstream tracking
|
|
641
|
+
* @type {string}
|
|
642
|
+
* @memberof AgentDeployRequest
|
|
643
|
+
*/
|
|
644
|
+
'tx_id': string;
|
|
645
|
+
}
|
|
621
646
|
/**
|
|
622
647
|
* Agent draft model.
|
|
623
648
|
* @export
|
|
@@ -4560,6 +4585,14 @@ export declare const DraftApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
4560
4585
|
* @throws {RequiredError}
|
|
4561
4586
|
*/
|
|
4562
4587
|
createAgentDraft: (agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4588
|
+
/**
|
|
4589
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4590
|
+
* @summary Deploy Agent From Draft
|
|
4591
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4592
|
+
* @param {*} [options] Override http request option.
|
|
4593
|
+
* @throws {RequiredError}
|
|
4594
|
+
*/
|
|
4595
|
+
deployAgentFromDraft: (agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4563
4596
|
/**
|
|
4564
4597
|
* 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
|
|
4565
4598
|
* @summary Get Agent Draft By Id
|
|
@@ -4608,6 +4641,14 @@ export declare const DraftApiFp: (configuration?: Configuration) => {
|
|
|
4608
4641
|
* @throws {RequiredError}
|
|
4609
4642
|
*/
|
|
4610
4643
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>>;
|
|
4644
|
+
/**
|
|
4645
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4646
|
+
* @summary Deploy Agent From Draft
|
|
4647
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4648
|
+
* @param {*} [options] Override http request option.
|
|
4649
|
+
* @throws {RequiredError}
|
|
4650
|
+
*/
|
|
4651
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>>;
|
|
4611
4652
|
/**
|
|
4612
4653
|
* 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
|
|
4613
4654
|
* @summary Get Agent Draft By Id
|
|
@@ -4656,6 +4697,14 @@ export declare const DraftApiFactory: (configuration?: Configuration, basePath?:
|
|
|
4656
4697
|
* @throws {RequiredError}
|
|
4657
4698
|
*/
|
|
4658
4699
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft>;
|
|
4700
|
+
/**
|
|
4701
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4702
|
+
* @summary Deploy Agent From Draft
|
|
4703
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4704
|
+
* @param {*} [options] Override http request option.
|
|
4705
|
+
* @throws {RequiredError}
|
|
4706
|
+
*/
|
|
4707
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse>;
|
|
4659
4708
|
/**
|
|
4660
4709
|
* 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
|
|
4661
4710
|
* @summary Get Agent Draft By Id
|
|
@@ -4707,6 +4756,15 @@ export declare class DraftApi extends BaseAPI {
|
|
|
4707
4756
|
* @memberof DraftApi
|
|
4708
4757
|
*/
|
|
4709
4758
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentDraft, any, {}>>;
|
|
4759
|
+
/**
|
|
4760
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4761
|
+
* @summary Deploy Agent From Draft
|
|
4762
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4763
|
+
* @param {*} [options] Override http request option.
|
|
4764
|
+
* @throws {RequiredError}
|
|
4765
|
+
* @memberof DraftApi
|
|
4766
|
+
*/
|
|
4767
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentResponse, any, {}>>;
|
|
4710
4768
|
/**
|
|
4711
4769
|
* 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
|
|
4712
4770
|
* @summary Get Agent Draft By Id
|
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.
|
|
8
|
+
* The version of the OpenAPI document: 0.7.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -3282,6 +3282,54 @@ var DraftApiAxiosParamCreator = function (configuration) {
|
|
|
3282
3282
|
});
|
|
3283
3283
|
});
|
|
3284
3284
|
},
|
|
3285
|
+
/**
|
|
3286
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3287
|
+
* @summary Deploy Agent From Draft
|
|
3288
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3289
|
+
* @param {*} [options] Override http request option.
|
|
3290
|
+
* @throws {RequiredError}
|
|
3291
|
+
*/
|
|
3292
|
+
deployAgentFromDraft: function (agentDeployRequest_1) {
|
|
3293
|
+
var args_1 = [];
|
|
3294
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
3295
|
+
args_1[_i - 1] = arguments[_i];
|
|
3296
|
+
}
|
|
3297
|
+
return __awaiter(_this, __spreadArray([agentDeployRequest_1], args_1, true), void 0, function (agentDeployRequest, options) {
|
|
3298
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
3299
|
+
if (options === void 0) { options = {}; }
|
|
3300
|
+
return __generator(this, function (_a) {
|
|
3301
|
+
switch (_a.label) {
|
|
3302
|
+
case 0:
|
|
3303
|
+
// verify required parameter 'agentDeployRequest' is not null or undefined
|
|
3304
|
+
(0, common_1.assertParamExists)('deployAgentFromDraft', 'agentDeployRequest', agentDeployRequest);
|
|
3305
|
+
localVarPath = "/agent/deploy";
|
|
3306
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3307
|
+
if (configuration) {
|
|
3308
|
+
baseOptions = configuration.baseOptions;
|
|
3309
|
+
}
|
|
3310
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
3311
|
+
localVarHeaderParameter = {};
|
|
3312
|
+
localVarQueryParameter = {};
|
|
3313
|
+
// authentication HTTPBearer required
|
|
3314
|
+
// http bearer authentication required
|
|
3315
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
3316
|
+
case 1:
|
|
3317
|
+
// authentication HTTPBearer required
|
|
3318
|
+
// http bearer authentication required
|
|
3319
|
+
_a.sent();
|
|
3320
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3321
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3322
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3323
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3324
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentDeployRequest, localVarRequestOptions, configuration);
|
|
3325
|
+
return [2 /*return*/, {
|
|
3326
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3327
|
+
options: localVarRequestOptions,
|
|
3328
|
+
}];
|
|
3329
|
+
}
|
|
3330
|
+
});
|
|
3331
|
+
});
|
|
3332
|
+
},
|
|
3285
3333
|
/**
|
|
3286
3334
|
* 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
3335
|
* @summary Get Agent Draft By Id
|
|
@@ -3512,6 +3560,29 @@ var DraftApiFp = function (configuration) {
|
|
|
3512
3560
|
});
|
|
3513
3561
|
});
|
|
3514
3562
|
},
|
|
3563
|
+
/**
|
|
3564
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3565
|
+
* @summary Deploy Agent From Draft
|
|
3566
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3567
|
+
* @param {*} [options] Override http request option.
|
|
3568
|
+
* @throws {RequiredError}
|
|
3569
|
+
*/
|
|
3570
|
+
deployAgentFromDraft: function (agentDeployRequest, options) {
|
|
3571
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3572
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3573
|
+
var _a, _b, _c;
|
|
3574
|
+
return __generator(this, function (_d) {
|
|
3575
|
+
switch (_d.label) {
|
|
3576
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deployAgentFromDraft(agentDeployRequest, options)];
|
|
3577
|
+
case 1:
|
|
3578
|
+
localVarAxiosArgs = _d.sent();
|
|
3579
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3580
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.deployAgentFromDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3581
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3582
|
+
}
|
|
3583
|
+
});
|
|
3584
|
+
});
|
|
3585
|
+
},
|
|
3515
3586
|
/**
|
|
3516
3587
|
* 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
3588
|
* @summary Get Agent Draft By Id
|
|
@@ -3626,6 +3697,16 @@ var DraftApiFactory = function (configuration, basePath, axios) {
|
|
|
3626
3697
|
createAgentDraft: function (agentUserInput, options) {
|
|
3627
3698
|
return localVarFp.createAgentDraft(agentUserInput, options).then(function (request) { return request(axios, basePath); });
|
|
3628
3699
|
},
|
|
3700
|
+
/**
|
|
3701
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3702
|
+
* @summary Deploy Agent From Draft
|
|
3703
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3704
|
+
* @param {*} [options] Override http request option.
|
|
3705
|
+
* @throws {RequiredError}
|
|
3706
|
+
*/
|
|
3707
|
+
deployAgentFromDraft: function (agentDeployRequest, options) {
|
|
3708
|
+
return localVarFp.deployAgentFromDraft(agentDeployRequest, options).then(function (request) { return request(axios, basePath); });
|
|
3709
|
+
},
|
|
3629
3710
|
/**
|
|
3630
3711
|
* 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
3712
|
* @summary Get Agent Draft By Id
|
|
@@ -3694,6 +3775,18 @@ var DraftApi = /** @class */ (function (_super) {
|
|
|
3694
3775
|
var _this = this;
|
|
3695
3776
|
return (0, exports.DraftApiFp)(this.configuration).createAgentDraft(agentUserInput, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3696
3777
|
};
|
|
3778
|
+
/**
|
|
3779
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3780
|
+
* @summary Deploy Agent From Draft
|
|
3781
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3782
|
+
* @param {*} [options] Override http request option.
|
|
3783
|
+
* @throws {RequiredError}
|
|
3784
|
+
* @memberof DraftApi
|
|
3785
|
+
*/
|
|
3786
|
+
DraftApi.prototype.deployAgentFromDraft = function (agentDeployRequest, options) {
|
|
3787
|
+
var _this = this;
|
|
3788
|
+
return (0, exports.DraftApiFp)(this.configuration).deployAgentFromDraft(agentDeployRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3789
|
+
};
|
|
3697
3790
|
/**
|
|
3698
3791
|
* 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
3792
|
* @summary Get Agent Draft By Id
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AgentDeployRequest
|
|
2
|
+
|
|
3
|
+
Request model for agent deployment.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**agent_id** | **string** | Agent ID to deploy | [default to undefined]
|
|
10
|
+
**draft_id** | **string** | Draft ID to deploy | [default to undefined]
|
|
11
|
+
**tx_id** | **string** | Transaction ID for upstream tracking | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AgentDeployRequest } from '@crestal/nation-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: AgentDeployRequest = {
|
|
19
|
+
agent_id,
|
|
20
|
+
draft_id,
|
|
21
|
+
tx_id,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/DraftApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**createAgentDraft**](#createagentdraft) | **POST** /agent/draft | Create Agent Draft|
|
|
8
|
+
|[**deployAgentFromDraft**](#deployagentfromdraft) | **POST** /agent/deploy | Deploy Agent From Draft|
|
|
8
9
|
|[**getAgentDraftById**](#getagentdraftbyid) | **GET** /agents/{agent_id}/drafts/{draft_id} | Get Agent Draft By Id|
|
|
9
10
|
|[**getAgentDrafts**](#getagentdrafts) | **GET** /agents/{agent_id}/drafts | Get Agent Drafts|
|
|
10
11
|
|[**getAgentLatestDraft**](#getagentlatestdraft) | **GET** /agents/{agent_id}/draft/latest | Get Agent Latest Draft|
|
|
@@ -63,6 +64,59 @@ const { status, data } = await apiInstance.createAgentDraft(
|
|
|
63
64
|
|
|
64
65
|
[[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)
|
|
65
66
|
|
|
67
|
+
# **deployAgentFromDraft**
|
|
68
|
+
> AgentResponse deployAgentFromDraft(agentDeployRequest)
|
|
69
|
+
|
|
70
|
+
Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import {
|
|
76
|
+
DraftApi,
|
|
77
|
+
Configuration,
|
|
78
|
+
AgentDeployRequest
|
|
79
|
+
} from '@crestal/nation-sdk';
|
|
80
|
+
|
|
81
|
+
const configuration = new Configuration();
|
|
82
|
+
const apiInstance = new DraftApi(configuration);
|
|
83
|
+
|
|
84
|
+
let agentDeployRequest: AgentDeployRequest; //
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.deployAgentFromDraft(
|
|
87
|
+
agentDeployRequest
|
|
88
|
+
);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
|Name | Type | Description | Notes|
|
|
94
|
+
|------------- | ------------- | ------------- | -------------|
|
|
95
|
+
| **agentDeployRequest** | **AgentDeployRequest**| | |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Return type
|
|
99
|
+
|
|
100
|
+
**AgentResponse**
|
|
101
|
+
|
|
102
|
+
### Authorization
|
|
103
|
+
|
|
104
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
105
|
+
|
|
106
|
+
### HTTP request headers
|
|
107
|
+
|
|
108
|
+
- **Content-Type**: application/json
|
|
109
|
+
- **Accept**: application/json
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### HTTP response details
|
|
113
|
+
| Status code | Description | Response headers |
|
|
114
|
+
|-------------|-------------|------------------|
|
|
115
|
+
|**200** | Successful Response | - |
|
|
116
|
+
|**422** | Validation Error | - |
|
|
117
|
+
|
|
118
|
+
[[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)
|
|
119
|
+
|
|
66
120
|
# **getAgentDraftById**
|
|
67
121
|
> AgentDraft getAgentDraftById()
|
|
68
122
|
|
|
@@ -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-
|
|
31
|
-
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-
|
|
30
|
+
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-17T18:00:27.612+00:00]
|
|
31
|
+
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-17T18:00:27.612+00:00]
|
|
32
32
|
**provider_name** | **string** | | [default to undefined]
|
|
33
33
|
|
|
34
34
|
## Example
|
package/index.ts
CHANGED