@crestal/nation-sdk 0.2.12 → 0.2.13
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 +5 -2
- package/api.ts +184 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +104 -1
- package/dist/api.js +185 -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/AgentApi.md +112 -0
- package/docs/AgentApiKeyResponse.md +29 -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.2.
|
|
1
|
+
## @crestal/nation-sdk@0.2.13
|
|
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.2.
|
|
39
|
+
npm install @crestal/nation-sdk@0.2.13 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,11 +54,13 @@ Class | Method | HTTP request | Description
|
|
|
54
54
|
*AgentApi* | [**createAgent**](docs/AgentApi.md#createagent) | **POST** /agents | Create Agent
|
|
55
55
|
*AgentApi* | [**exportAgent**](docs/AgentApi.md#exportagent) | **GET** /agents/{agent_id}/export | Export Agent
|
|
56
56
|
*AgentApi* | [**getAgent**](docs/AgentApi.md#getagent) | **GET** /agents/{agent_id} | Get Agent
|
|
57
|
+
*AgentApi* | [**getAgentApiKey**](docs/AgentApi.md#getagentapikey) | **GET** /agents/{agent_id}/api-key | Get Agent API Key
|
|
57
58
|
*AgentApi* | [**getAgentStatistics**](docs/AgentApi.md#getagentstatistics) | **GET** /agents/{aid}/statistics | Get Agent Statistics
|
|
58
59
|
*AgentApi* | [**getAgents**](docs/AgentApi.md#getagents) | **GET** /agents | Get Agents
|
|
59
60
|
*AgentApi* | [**getSkillHistory**](docs/AgentApi.md#getskillhistory) | **GET** /agents/{aid}/skill/history | Skill History
|
|
60
61
|
*AgentApi* | [**importAgent**](docs/AgentApi.md#importagent) | **PUT** /agents/{agent_id}/import | Import Agent
|
|
61
62
|
*AgentApi* | [**overrideAgent**](docs/AgentApi.md#overrideagent) | **PUT** /agents/{agent_id} | Override Agent
|
|
63
|
+
*AgentApi* | [**resetAgentApiKey**](docs/AgentApi.md#resetagentapikey) | **POST** /agents/{agent_id}/api-key/reset | Reset Agent API Key
|
|
62
64
|
*AgentApi* | [**updateAgent**](docs/AgentApi.md#updateagent) | **PATCH** /agents/{agent_id} | Update Agent
|
|
63
65
|
*AgentApi* | [**validateAgentCreate**](docs/AgentApi.md#validateagentcreate) | **POST** /agent/validate | Validate Agent Create
|
|
64
66
|
*AgentApi* | [**validateAgentUpdate**](docs/AgentApi.md#validateagentupdate) | **POST** /agents/{agent_id}/validate | Validate Agent Update
|
|
@@ -96,6 +98,7 @@ Class | Method | HTTP request | Description
|
|
|
96
98
|
### Documentation For Models
|
|
97
99
|
|
|
98
100
|
- [Agent](docs/Agent.md)
|
|
101
|
+
- [AgentApiKeyResponse](docs/AgentApiKeyResponse.md)
|
|
99
102
|
- [AgentAutonomous](docs/AgentAutonomous.md)
|
|
100
103
|
- [AgentExample](docs/AgentExample.md)
|
|
101
104
|
- [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.2.
|
|
7
|
+
* The version of the OpenAPI document: 0.2.13
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -312,6 +312,43 @@ export const AgentCdpNetworkIdEnum = {
|
|
|
312
312
|
|
|
313
313
|
export type AgentCdpNetworkIdEnum = typeof AgentCdpNetworkIdEnum[keyof typeof AgentCdpNetworkIdEnum];
|
|
314
314
|
|
|
315
|
+
/**
|
|
316
|
+
* Response model for agent API key endpoints.
|
|
317
|
+
* @export
|
|
318
|
+
* @interface AgentApiKeyResponse
|
|
319
|
+
*/
|
|
320
|
+
export interface AgentApiKeyResponse {
|
|
321
|
+
/**
|
|
322
|
+
* The private API key for the agent (sk-)
|
|
323
|
+
* @type {string}
|
|
324
|
+
* @memberof AgentApiKeyResponse
|
|
325
|
+
*/
|
|
326
|
+
'api_key': string;
|
|
327
|
+
/**
|
|
328
|
+
* The public API key for the agent (pk-)
|
|
329
|
+
* @type {string}
|
|
330
|
+
* @memberof AgentApiKeyResponse
|
|
331
|
+
*/
|
|
332
|
+
'api_key_public': string;
|
|
333
|
+
/**
|
|
334
|
+
* The base URL for the API
|
|
335
|
+
* @type {string}
|
|
336
|
+
* @memberof AgentApiKeyResponse
|
|
337
|
+
*/
|
|
338
|
+
'base_url': string;
|
|
339
|
+
/**
|
|
340
|
+
* API documentation URL
|
|
341
|
+
* @type {string}
|
|
342
|
+
* @memberof AgentApiKeyResponse
|
|
343
|
+
*/
|
|
344
|
+
'api_doc': string;
|
|
345
|
+
/**
|
|
346
|
+
* OpenAPI JSON URL for AI integration
|
|
347
|
+
* @type {string}
|
|
348
|
+
* @memberof AgentApiKeyResponse
|
|
349
|
+
*/
|
|
350
|
+
'doc_for_ai': string;
|
|
351
|
+
}
|
|
315
352
|
/**
|
|
316
353
|
* Autonomous agent configuration.
|
|
317
354
|
* @export
|
|
@@ -2837,6 +2874,44 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
2837
2874
|
|
|
2838
2875
|
|
|
2839
2876
|
|
|
2877
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2878
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2879
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
2880
|
+
|
|
2881
|
+
return {
|
|
2882
|
+
url: toPathString(localVarUrlObj),
|
|
2883
|
+
options: localVarRequestOptions,
|
|
2884
|
+
};
|
|
2885
|
+
},
|
|
2886
|
+
/**
|
|
2887
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
2888
|
+
* @summary Get Agent API Key
|
|
2889
|
+
* @param {string} agentId ID of the agent
|
|
2890
|
+
* @param {*} [options] Override http request option.
|
|
2891
|
+
* @throws {RequiredError}
|
|
2892
|
+
*/
|
|
2893
|
+
getAgentApiKey: async (agentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
2894
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
2895
|
+
assertParamExists('getAgentApiKey', 'agentId', agentId)
|
|
2896
|
+
const localVarPath = `/agents/{agent_id}/api-key`
|
|
2897
|
+
.replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
|
|
2898
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2899
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2900
|
+
let baseOptions;
|
|
2901
|
+
if (configuration) {
|
|
2902
|
+
baseOptions = configuration.baseOptions;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
2906
|
+
const localVarHeaderParameter = {} as any;
|
|
2907
|
+
const localVarQueryParameter = {} as any;
|
|
2908
|
+
|
|
2909
|
+
// authentication HTTPBearer required
|
|
2910
|
+
// http bearer authentication required
|
|
2911
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
2912
|
+
|
|
2913
|
+
|
|
2914
|
+
|
|
2840
2915
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2841
2916
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2842
2917
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -3064,6 +3139,44 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
3064
3139
|
options: localVarRequestOptions,
|
|
3065
3140
|
};
|
|
3066
3141
|
},
|
|
3142
|
+
/**
|
|
3143
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3144
|
+
* @summary Reset Agent API Key
|
|
3145
|
+
* @param {string} agentId ID of the agent
|
|
3146
|
+
* @param {*} [options] Override http request option.
|
|
3147
|
+
* @throws {RequiredError}
|
|
3148
|
+
*/
|
|
3149
|
+
resetAgentApiKey: async (agentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
3150
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
3151
|
+
assertParamExists('resetAgentApiKey', 'agentId', agentId)
|
|
3152
|
+
const localVarPath = `/agents/{agent_id}/api-key/reset`
|
|
3153
|
+
.replace(`{${"agent_id"}}`, encodeURIComponent(String(agentId)));
|
|
3154
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3155
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3156
|
+
let baseOptions;
|
|
3157
|
+
if (configuration) {
|
|
3158
|
+
baseOptions = configuration.baseOptions;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
3162
|
+
const localVarHeaderParameter = {} as any;
|
|
3163
|
+
const localVarQueryParameter = {} as any;
|
|
3164
|
+
|
|
3165
|
+
// authentication HTTPBearer required
|
|
3166
|
+
// http bearer authentication required
|
|
3167
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
3168
|
+
|
|
3169
|
+
|
|
3170
|
+
|
|
3171
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3172
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3173
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
3174
|
+
|
|
3175
|
+
return {
|
|
3176
|
+
url: toPathString(localVarUrlObj),
|
|
3177
|
+
options: localVarRequestOptions,
|
|
3178
|
+
};
|
|
3179
|
+
},
|
|
3067
3180
|
/**
|
|
3068
3181
|
* 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
|
|
3069
3182
|
* @summary Update Agent
|
|
@@ -3235,6 +3348,19 @@ export const AgentApiFp = function(configuration?: Configuration) {
|
|
|
3235
3348
|
const localVarOperationServerBasePath = operationServerMap['AgentApi.getAgent']?.[localVarOperationServerIndex]?.url;
|
|
3236
3349
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3237
3350
|
},
|
|
3351
|
+
/**
|
|
3352
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3353
|
+
* @summary Get Agent API Key
|
|
3354
|
+
* @param {string} agentId ID of the agent
|
|
3355
|
+
* @param {*} [options] Override http request option.
|
|
3356
|
+
* @throws {RequiredError}
|
|
3357
|
+
*/
|
|
3358
|
+
async getAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentApiKeyResponse>> {
|
|
3359
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAgentApiKey(agentId, options);
|
|
3360
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3361
|
+
const localVarOperationServerBasePath = operationServerMap['AgentApi.getAgentApiKey']?.[localVarOperationServerIndex]?.url;
|
|
3362
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3363
|
+
},
|
|
3238
3364
|
/**
|
|
3239
3365
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
3240
3366
|
* @summary Get Agent Statistics
|
|
@@ -3306,6 +3432,19 @@ export const AgentApiFp = function(configuration?: Configuration) {
|
|
|
3306
3432
|
const localVarOperationServerBasePath = operationServerMap['AgentApi.overrideAgent']?.[localVarOperationServerIndex]?.url;
|
|
3307
3433
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3308
3434
|
},
|
|
3435
|
+
/**
|
|
3436
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3437
|
+
* @summary Reset Agent API Key
|
|
3438
|
+
* @param {string} agentId ID of the agent
|
|
3439
|
+
* @param {*} [options] Override http request option.
|
|
3440
|
+
* @throws {RequiredError}
|
|
3441
|
+
*/
|
|
3442
|
+
async resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentApiKeyResponse>> {
|
|
3443
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.resetAgentApiKey(agentId, options);
|
|
3444
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3445
|
+
const localVarOperationServerBasePath = operationServerMap['AgentApi.resetAgentApiKey']?.[localVarOperationServerIndex]?.url;
|
|
3446
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3447
|
+
},
|
|
3309
3448
|
/**
|
|
3310
3449
|
* 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
|
|
3311
3450
|
* @summary Update Agent
|
|
@@ -3387,6 +3526,16 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
3387
3526
|
getAgent(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
|
3388
3527
|
return localVarFp.getAgent(agentId, options).then((request) => request(axios, basePath));
|
|
3389
3528
|
},
|
|
3529
|
+
/**
|
|
3530
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3531
|
+
* @summary Get Agent API Key
|
|
3532
|
+
* @param {string} agentId ID of the agent
|
|
3533
|
+
* @param {*} [options] Override http request option.
|
|
3534
|
+
* @throws {RequiredError}
|
|
3535
|
+
*/
|
|
3536
|
+
getAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentApiKeyResponse> {
|
|
3537
|
+
return localVarFp.getAgentApiKey(agentId, options).then((request) => request(axios, basePath));
|
|
3538
|
+
},
|
|
3390
3539
|
/**
|
|
3391
3540
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
3392
3541
|
* @summary Get Agent Statistics
|
|
@@ -3443,6 +3592,16 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
3443
3592
|
overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
|
3444
3593
|
return localVarFp.overrideAgent(agentId, agentUpdate, options).then((request) => request(axios, basePath));
|
|
3445
3594
|
},
|
|
3595
|
+
/**
|
|
3596
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3597
|
+
* @summary Reset Agent API Key
|
|
3598
|
+
* @param {string} agentId ID of the agent
|
|
3599
|
+
* @param {*} [options] Override http request option.
|
|
3600
|
+
* @throws {RequiredError}
|
|
3601
|
+
*/
|
|
3602
|
+
resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentApiKeyResponse> {
|
|
3603
|
+
return localVarFp.resetAgentApiKey(agentId, options).then((request) => request(axios, basePath));
|
|
3604
|
+
},
|
|
3446
3605
|
/**
|
|
3447
3606
|
* 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
|
|
3448
3607
|
* @summary Update Agent
|
|
@@ -3521,6 +3680,18 @@ export class AgentApi extends BaseAPI {
|
|
|
3521
3680
|
return AgentApiFp(this.configuration).getAgent(agentId, options).then((request) => request(this.axios, this.basePath));
|
|
3522
3681
|
}
|
|
3523
3682
|
|
|
3683
|
+
/**
|
|
3684
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3685
|
+
* @summary Get Agent API Key
|
|
3686
|
+
* @param {string} agentId ID of the agent
|
|
3687
|
+
* @param {*} [options] Override http request option.
|
|
3688
|
+
* @throws {RequiredError}
|
|
3689
|
+
* @memberof AgentApi
|
|
3690
|
+
*/
|
|
3691
|
+
public getAgentApiKey(agentId: string, options?: RawAxiosRequestConfig) {
|
|
3692
|
+
return AgentApiFp(this.configuration).getAgentApiKey(agentId, options).then((request) => request(this.axios, this.basePath));
|
|
3693
|
+
}
|
|
3694
|
+
|
|
3524
3695
|
/**
|
|
3525
3696
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
3526
3697
|
* @summary Get Agent Statistics
|
|
@@ -3587,6 +3758,18 @@ export class AgentApi extends BaseAPI {
|
|
|
3587
3758
|
return AgentApiFp(this.configuration).overrideAgent(agentId, agentUpdate, options).then((request) => request(this.axios, this.basePath));
|
|
3588
3759
|
}
|
|
3589
3760
|
|
|
3761
|
+
/**
|
|
3762
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3763
|
+
* @summary Reset Agent API Key
|
|
3764
|
+
* @param {string} agentId ID of the agent
|
|
3765
|
+
* @param {*} [options] Override http request option.
|
|
3766
|
+
* @throws {RequiredError}
|
|
3767
|
+
* @memberof AgentApi
|
|
3768
|
+
*/
|
|
3769
|
+
public resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig) {
|
|
3770
|
+
return AgentApiFp(this.configuration).resetAgentApiKey(agentId, options).then((request) => request(this.axios, this.basePath));
|
|
3771
|
+
}
|
|
3772
|
+
|
|
3590
3773
|
/**
|
|
3591
3774
|
* 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
|
|
3592
3775
|
* @summary Update Agent
|
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.2.
|
|
5
|
+
* The version of the OpenAPI document: 0.2.13
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -295,6 +295,43 @@ export declare const AgentCdpNetworkIdEnum: {
|
|
|
295
295
|
readonly OptimismSepolia: "optimism-sepolia";
|
|
296
296
|
};
|
|
297
297
|
export type AgentCdpNetworkIdEnum = typeof AgentCdpNetworkIdEnum[keyof typeof AgentCdpNetworkIdEnum];
|
|
298
|
+
/**
|
|
299
|
+
* Response model for agent API key endpoints.
|
|
300
|
+
* @export
|
|
301
|
+
* @interface AgentApiKeyResponse
|
|
302
|
+
*/
|
|
303
|
+
export interface AgentApiKeyResponse {
|
|
304
|
+
/**
|
|
305
|
+
* The private API key for the agent (sk-)
|
|
306
|
+
* @type {string}
|
|
307
|
+
* @memberof AgentApiKeyResponse
|
|
308
|
+
*/
|
|
309
|
+
'api_key': string;
|
|
310
|
+
/**
|
|
311
|
+
* The public API key for the agent (pk-)
|
|
312
|
+
* @type {string}
|
|
313
|
+
* @memberof AgentApiKeyResponse
|
|
314
|
+
*/
|
|
315
|
+
'api_key_public': string;
|
|
316
|
+
/**
|
|
317
|
+
* The base URL for the API
|
|
318
|
+
* @type {string}
|
|
319
|
+
* @memberof AgentApiKeyResponse
|
|
320
|
+
*/
|
|
321
|
+
'base_url': string;
|
|
322
|
+
/**
|
|
323
|
+
* API documentation URL
|
|
324
|
+
* @type {string}
|
|
325
|
+
* @memberof AgentApiKeyResponse
|
|
326
|
+
*/
|
|
327
|
+
'api_doc': string;
|
|
328
|
+
/**
|
|
329
|
+
* OpenAPI JSON URL for AI integration
|
|
330
|
+
* @type {string}
|
|
331
|
+
* @memberof AgentApiKeyResponse
|
|
332
|
+
*/
|
|
333
|
+
'doc_for_ai': string;
|
|
334
|
+
}
|
|
298
335
|
/**
|
|
299
336
|
* Autonomous agent configuration.
|
|
300
337
|
* @export
|
|
@@ -2674,6 +2711,14 @@ export declare const AgentApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
2674
2711
|
* @throws {RequiredError}
|
|
2675
2712
|
*/
|
|
2676
2713
|
getAgent: (agentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2714
|
+
/**
|
|
2715
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
2716
|
+
* @summary Get Agent API Key
|
|
2717
|
+
* @param {string} agentId ID of the agent
|
|
2718
|
+
* @param {*} [options] Override http request option.
|
|
2719
|
+
* @throws {RequiredError}
|
|
2720
|
+
*/
|
|
2721
|
+
getAgentApiKey: (agentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2677
2722
|
/**
|
|
2678
2723
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
2679
2724
|
* @summary Get Agent Statistics
|
|
@@ -2720,6 +2765,14 @@ export declare const AgentApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
2720
2765
|
* @throws {RequiredError}
|
|
2721
2766
|
*/
|
|
2722
2767
|
overrideAgent: (agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2768
|
+
/**
|
|
2769
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
2770
|
+
* @summary Reset Agent API Key
|
|
2771
|
+
* @param {string} agentId ID of the agent
|
|
2772
|
+
* @param {*} [options] Override http request option.
|
|
2773
|
+
* @throws {RequiredError}
|
|
2774
|
+
*/
|
|
2775
|
+
resetAgentApiKey: (agentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2723
2776
|
/**
|
|
2724
2777
|
* 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
|
|
2725
2778
|
* @summary Update Agent
|
|
@@ -2776,6 +2829,14 @@ export declare const AgentApiFp: (configuration?: Configuration) => {
|
|
|
2776
2829
|
* @throws {RequiredError}
|
|
2777
2830
|
*/
|
|
2778
2831
|
getAgent(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>>;
|
|
2832
|
+
/**
|
|
2833
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
2834
|
+
* @summary Get Agent API Key
|
|
2835
|
+
* @param {string} agentId ID of the agent
|
|
2836
|
+
* @param {*} [options] Override http request option.
|
|
2837
|
+
* @throws {RequiredError}
|
|
2838
|
+
*/
|
|
2839
|
+
getAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentApiKeyResponse>>;
|
|
2779
2840
|
/**
|
|
2780
2841
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
2781
2842
|
* @summary Get Agent Statistics
|
|
@@ -2822,6 +2883,14 @@ export declare const AgentApiFp: (configuration?: Configuration) => {
|
|
|
2822
2883
|
* @throws {RequiredError}
|
|
2823
2884
|
*/
|
|
2824
2885
|
overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>>;
|
|
2886
|
+
/**
|
|
2887
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
2888
|
+
* @summary Reset Agent API Key
|
|
2889
|
+
* @param {string} agentId ID of the agent
|
|
2890
|
+
* @param {*} [options] Override http request option.
|
|
2891
|
+
* @throws {RequiredError}
|
|
2892
|
+
*/
|
|
2893
|
+
resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentApiKeyResponse>>;
|
|
2825
2894
|
/**
|
|
2826
2895
|
* 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
|
|
2827
2896
|
* @summary Update Agent
|
|
@@ -2878,6 +2947,14 @@ export declare const AgentApiFactory: (configuration?: Configuration, basePath?:
|
|
|
2878
2947
|
* @throws {RequiredError}
|
|
2879
2948
|
*/
|
|
2880
2949
|
getAgent(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<any>;
|
|
2950
|
+
/**
|
|
2951
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
2952
|
+
* @summary Get Agent API Key
|
|
2953
|
+
* @param {string} agentId ID of the agent
|
|
2954
|
+
* @param {*} [options] Override http request option.
|
|
2955
|
+
* @throws {RequiredError}
|
|
2956
|
+
*/
|
|
2957
|
+
getAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentApiKeyResponse>;
|
|
2881
2958
|
/**
|
|
2882
2959
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
2883
2960
|
* @summary Get Agent Statistics
|
|
@@ -2924,6 +3001,14 @@ export declare const AgentApiFactory: (configuration?: Configuration, basePath?:
|
|
|
2924
3001
|
* @throws {RequiredError}
|
|
2925
3002
|
*/
|
|
2926
3003
|
overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): AxiosPromise<any>;
|
|
3004
|
+
/**
|
|
3005
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3006
|
+
* @summary Reset Agent API Key
|
|
3007
|
+
* @param {string} agentId ID of the agent
|
|
3008
|
+
* @param {*} [options] Override http request option.
|
|
3009
|
+
* @throws {RequiredError}
|
|
3010
|
+
*/
|
|
3011
|
+
resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<AgentApiKeyResponse>;
|
|
2927
3012
|
/**
|
|
2928
3013
|
* 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
|
|
2929
3014
|
* @summary Update Agent
|
|
@@ -2985,6 +3070,15 @@ export declare class AgentApi extends BaseAPI {
|
|
|
2985
3070
|
* @memberof AgentApi
|
|
2986
3071
|
*/
|
|
2987
3072
|
getAgent(agentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
3073
|
+
/**
|
|
3074
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3075
|
+
* @summary Get Agent API Key
|
|
3076
|
+
* @param {string} agentId ID of the agent
|
|
3077
|
+
* @param {*} [options] Override http request option.
|
|
3078
|
+
* @throws {RequiredError}
|
|
3079
|
+
* @memberof AgentApi
|
|
3080
|
+
*/
|
|
3081
|
+
getAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentApiKeyResponse, any>>;
|
|
2988
3082
|
/**
|
|
2989
3083
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
2990
3084
|
* @summary Get Agent Statistics
|
|
@@ -3036,6 +3130,15 @@ export declare class AgentApi extends BaseAPI {
|
|
|
3036
3130
|
* @memberof AgentApi
|
|
3037
3131
|
*/
|
|
3038
3132
|
overrideAgent(agentId: string, agentUpdate?: AgentUpdate, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<any, any>>;
|
|
3133
|
+
/**
|
|
3134
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
3135
|
+
* @summary Reset Agent API Key
|
|
3136
|
+
* @param {string} agentId ID of the agent
|
|
3137
|
+
* @param {*} [options] Override http request option.
|
|
3138
|
+
* @throws {RequiredError}
|
|
3139
|
+
* @memberof AgentApi
|
|
3140
|
+
*/
|
|
3141
|
+
resetAgentApiKey(agentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentApiKeyResponse, any>>;
|
|
3039
3142
|
/**
|
|
3040
3143
|
* 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
|
|
3041
3144
|
* @summary Update Agent
|
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.2.
|
|
8
|
+
* The version of the OpenAPI document: 0.2.13
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -447,6 +447,53 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
447
447
|
});
|
|
448
448
|
});
|
|
449
449
|
},
|
|
450
|
+
/**
|
|
451
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
452
|
+
* @summary Get Agent API Key
|
|
453
|
+
* @param {string} agentId ID of the agent
|
|
454
|
+
* @param {*} [options] Override http request option.
|
|
455
|
+
* @throws {RequiredError}
|
|
456
|
+
*/
|
|
457
|
+
getAgentApiKey: function (agentId_1) {
|
|
458
|
+
var args_1 = [];
|
|
459
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
460
|
+
args_1[_i - 1] = arguments[_i];
|
|
461
|
+
}
|
|
462
|
+
return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
|
|
463
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
464
|
+
if (options === void 0) { options = {}; }
|
|
465
|
+
return __generator(this, function (_a) {
|
|
466
|
+
switch (_a.label) {
|
|
467
|
+
case 0:
|
|
468
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
469
|
+
(0, common_1.assertParamExists)('getAgentApiKey', 'agentId', agentId);
|
|
470
|
+
localVarPath = "/agents/{agent_id}/api-key"
|
|
471
|
+
.replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
|
|
472
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
473
|
+
if (configuration) {
|
|
474
|
+
baseOptions = configuration.baseOptions;
|
|
475
|
+
}
|
|
476
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
477
|
+
localVarHeaderParameter = {};
|
|
478
|
+
localVarQueryParameter = {};
|
|
479
|
+
// authentication HTTPBearer required
|
|
480
|
+
// http bearer authentication required
|
|
481
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
482
|
+
case 1:
|
|
483
|
+
// authentication HTTPBearer required
|
|
484
|
+
// http bearer authentication required
|
|
485
|
+
_a.sent();
|
|
486
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
487
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
488
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
489
|
+
return [2 /*return*/, {
|
|
490
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
491
|
+
options: localVarRequestOptions,
|
|
492
|
+
}];
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
},
|
|
450
497
|
/**
|
|
451
498
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
452
499
|
* @summary Get Agent Statistics
|
|
@@ -690,6 +737,53 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
690
737
|
});
|
|
691
738
|
});
|
|
692
739
|
},
|
|
740
|
+
/**
|
|
741
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
742
|
+
* @summary Reset Agent API Key
|
|
743
|
+
* @param {string} agentId ID of the agent
|
|
744
|
+
* @param {*} [options] Override http request option.
|
|
745
|
+
* @throws {RequiredError}
|
|
746
|
+
*/
|
|
747
|
+
resetAgentApiKey: function (agentId_1) {
|
|
748
|
+
var args_1 = [];
|
|
749
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
750
|
+
args_1[_i - 1] = arguments[_i];
|
|
751
|
+
}
|
|
752
|
+
return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
|
|
753
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
754
|
+
if (options === void 0) { options = {}; }
|
|
755
|
+
return __generator(this, function (_a) {
|
|
756
|
+
switch (_a.label) {
|
|
757
|
+
case 0:
|
|
758
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
759
|
+
(0, common_1.assertParamExists)('resetAgentApiKey', 'agentId', agentId);
|
|
760
|
+
localVarPath = "/agents/{agent_id}/api-key/reset"
|
|
761
|
+
.replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
|
|
762
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
763
|
+
if (configuration) {
|
|
764
|
+
baseOptions = configuration.baseOptions;
|
|
765
|
+
}
|
|
766
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
767
|
+
localVarHeaderParameter = {};
|
|
768
|
+
localVarQueryParameter = {};
|
|
769
|
+
// authentication HTTPBearer required
|
|
770
|
+
// http bearer authentication required
|
|
771
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
772
|
+
case 1:
|
|
773
|
+
// authentication HTTPBearer required
|
|
774
|
+
// http bearer authentication required
|
|
775
|
+
_a.sent();
|
|
776
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
777
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
778
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
779
|
+
return [2 /*return*/, {
|
|
780
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
781
|
+
options: localVarRequestOptions,
|
|
782
|
+
}];
|
|
783
|
+
}
|
|
784
|
+
});
|
|
785
|
+
});
|
|
786
|
+
},
|
|
693
787
|
/**
|
|
694
788
|
* 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
|
|
695
789
|
* @summary Update Agent
|
|
@@ -915,6 +1009,29 @@ var AgentApiFp = function (configuration) {
|
|
|
915
1009
|
});
|
|
916
1010
|
});
|
|
917
1011
|
},
|
|
1012
|
+
/**
|
|
1013
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
1014
|
+
* @summary Get Agent API Key
|
|
1015
|
+
* @param {string} agentId ID of the agent
|
|
1016
|
+
* @param {*} [options] Override http request option.
|
|
1017
|
+
* @throws {RequiredError}
|
|
1018
|
+
*/
|
|
1019
|
+
getAgentApiKey: function (agentId, options) {
|
|
1020
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1021
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1022
|
+
var _a, _b, _c;
|
|
1023
|
+
return __generator(this, function (_d) {
|
|
1024
|
+
switch (_d.label) {
|
|
1025
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getAgentApiKey(agentId, options)];
|
|
1026
|
+
case 1:
|
|
1027
|
+
localVarAxiosArgs = _d.sent();
|
|
1028
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1029
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.getAgentApiKey']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1030
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1031
|
+
}
|
|
1032
|
+
});
|
|
1033
|
+
});
|
|
1034
|
+
},
|
|
918
1035
|
/**
|
|
919
1036
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
920
1037
|
* @summary Get Agent Statistics
|
|
@@ -1036,6 +1153,29 @@ var AgentApiFp = function (configuration) {
|
|
|
1036
1153
|
});
|
|
1037
1154
|
});
|
|
1038
1155
|
},
|
|
1156
|
+
/**
|
|
1157
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
1158
|
+
* @summary Reset Agent API Key
|
|
1159
|
+
* @param {string} agentId ID of the agent
|
|
1160
|
+
* @param {*} [options] Override http request option.
|
|
1161
|
+
* @throws {RequiredError}
|
|
1162
|
+
*/
|
|
1163
|
+
resetAgentApiKey: function (agentId, options) {
|
|
1164
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1165
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
1166
|
+
var _a, _b, _c;
|
|
1167
|
+
return __generator(this, function (_d) {
|
|
1168
|
+
switch (_d.label) {
|
|
1169
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetAgentApiKey(agentId, options)];
|
|
1170
|
+
case 1:
|
|
1171
|
+
localVarAxiosArgs = _d.sent();
|
|
1172
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
1173
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['AgentApi.resetAgentApiKey']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
1174
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
1175
|
+
}
|
|
1176
|
+
});
|
|
1177
|
+
});
|
|
1178
|
+
},
|
|
1039
1179
|
/**
|
|
1040
1180
|
* 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
|
|
1041
1181
|
* @summary Update Agent
|
|
@@ -1147,6 +1287,16 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1147
1287
|
getAgent: function (agentId, options) {
|
|
1148
1288
|
return localVarFp.getAgent(agentId, options).then(function (request) { return request(axios, basePath); });
|
|
1149
1289
|
},
|
|
1290
|
+
/**
|
|
1291
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
1292
|
+
* @summary Get Agent API Key
|
|
1293
|
+
* @param {string} agentId ID of the agent
|
|
1294
|
+
* @param {*} [options] Override http request option.
|
|
1295
|
+
* @throws {RequiredError}
|
|
1296
|
+
*/
|
|
1297
|
+
getAgentApiKey: function (agentId, options) {
|
|
1298
|
+
return localVarFp.getAgentApiKey(agentId, options).then(function (request) { return request(axios, basePath); });
|
|
1299
|
+
},
|
|
1150
1300
|
/**
|
|
1151
1301
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
1152
1302
|
* @summary Get Agent Statistics
|
|
@@ -1203,6 +1353,16 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1203
1353
|
overrideAgent: function (agentId, agentUpdate, options) {
|
|
1204
1354
|
return localVarFp.overrideAgent(agentId, agentUpdate, options).then(function (request) { return request(axios, basePath); });
|
|
1205
1355
|
},
|
|
1356
|
+
/**
|
|
1357
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
1358
|
+
* @summary Reset Agent API Key
|
|
1359
|
+
* @param {string} agentId ID of the agent
|
|
1360
|
+
* @param {*} [options] Override http request option.
|
|
1361
|
+
* @throws {RequiredError}
|
|
1362
|
+
*/
|
|
1363
|
+
resetAgentApiKey: function (agentId, options) {
|
|
1364
|
+
return localVarFp.resetAgentApiKey(agentId, options).then(function (request) { return request(axios, basePath); });
|
|
1365
|
+
},
|
|
1206
1366
|
/**
|
|
1207
1367
|
* 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
|
|
1208
1368
|
* @summary Update Agent
|
|
@@ -1285,6 +1445,18 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1285
1445
|
var _this = this;
|
|
1286
1446
|
return (0, exports.AgentApiFp)(this.configuration).getAgent(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1287
1447
|
};
|
|
1448
|
+
/**
|
|
1449
|
+
* Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
1450
|
+
* @summary Get Agent API Key
|
|
1451
|
+
* @param {string} agentId ID of the agent
|
|
1452
|
+
* @param {*} [options] Override http request option.
|
|
1453
|
+
* @throws {RequiredError}
|
|
1454
|
+
* @memberof AgentApi
|
|
1455
|
+
*/
|
|
1456
|
+
AgentApi.prototype.getAgentApiKey = function (agentId, options) {
|
|
1457
|
+
var _this = this;
|
|
1458
|
+
return (0, exports.AgentApiFp)(this.configuration).getAgentApiKey(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1459
|
+
};
|
|
1288
1460
|
/**
|
|
1289
1461
|
* Get statistics for an agent account. This endpoint is not in readonly router, because it may create a new account.
|
|
1290
1462
|
* @summary Get Agent Statistics
|
|
@@ -1351,6 +1523,18 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1351
1523
|
var _this = this;
|
|
1352
1524
|
return (0, exports.AgentApiFp)(this.configuration).overrideAgent(agentId, agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1353
1525
|
};
|
|
1526
|
+
/**
|
|
1527
|
+
* Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
1528
|
+
* @summary Reset Agent API Key
|
|
1529
|
+
* @param {string} agentId ID of the agent
|
|
1530
|
+
* @param {*} [options] Override http request option.
|
|
1531
|
+
* @throws {RequiredError}
|
|
1532
|
+
* @memberof AgentApi
|
|
1533
|
+
*/
|
|
1534
|
+
AgentApi.prototype.resetAgentApiKey = function (agentId, options) {
|
|
1535
|
+
var _this = this;
|
|
1536
|
+
return (0, exports.AgentApiFp)(this.configuration).resetAgentApiKey(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1537
|
+
};
|
|
1354
1538
|
/**
|
|
1355
1539
|
* 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
|
|
1356
1540
|
* @summary Update Agent
|
package/dist/base.d.ts
CHANGED
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.2.
|
|
8
|
+
* The version of the OpenAPI document: 0.2.13
|
|
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
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.2.
|
|
8
|
+
* The version of the OpenAPI document: 0.2.13
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.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.2.
|
|
8
|
+
* The version of the OpenAPI document: 0.2.13
|
|
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
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.2.
|
|
8
|
+
* The version of the OpenAPI document: 0.2.13
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/docs/AgentApi.md
CHANGED
|
@@ -7,11 +7,13 @@ All URIs are relative to *http://localhost*
|
|
|
7
7
|
|[**createAgent**](#createagent) | **POST** /agents | Create Agent|
|
|
8
8
|
|[**exportAgent**](#exportagent) | **GET** /agents/{agent_id}/export | Export Agent|
|
|
9
9
|
|[**getAgent**](#getagent) | **GET** /agents/{agent_id} | Get Agent|
|
|
10
|
+
|[**getAgentApiKey**](#getagentapikey) | **GET** /agents/{agent_id}/api-key | Get Agent API Key|
|
|
10
11
|
|[**getAgentStatistics**](#getagentstatistics) | **GET** /agents/{aid}/statistics | Get Agent Statistics|
|
|
11
12
|
|[**getAgents**](#getagents) | **GET** /agents | Get Agents|
|
|
12
13
|
|[**getSkillHistory**](#getskillhistory) | **GET** /agents/{aid}/skill/history | Skill History|
|
|
13
14
|
|[**importAgent**](#importagent) | **PUT** /agents/{agent_id}/import | Import Agent|
|
|
14
15
|
|[**overrideAgent**](#overrideagent) | **PUT** /agents/{agent_id} | Override Agent|
|
|
16
|
+
|[**resetAgentApiKey**](#resetagentapikey) | **POST** /agents/{agent_id}/api-key/reset | Reset Agent API Key|
|
|
15
17
|
|[**updateAgent**](#updateagent) | **PATCH** /agents/{agent_id} | Update Agent|
|
|
16
18
|
|[**validateAgentCreate**](#validateagentcreate) | **POST** /agent/validate | Validate Agent Create|
|
|
17
19
|
|[**validateAgentUpdate**](#validateagentupdate) | **POST** /agents/{agent_id}/validate | Validate Agent Update|
|
|
@@ -176,6 +178,61 @@ No authorization required
|
|
|
176
178
|
|
|
177
179
|
[[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)
|
|
178
180
|
|
|
181
|
+
# **getAgentApiKey**
|
|
182
|
+
> AgentApiKeyResponse getAgentApiKey()
|
|
183
|
+
|
|
184
|
+
Get the API keys for an agent. Returns both private (sk-) and public (pk-) API keys for the agent. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
185
|
+
|
|
186
|
+
### Example
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
import {
|
|
190
|
+
AgentApi,
|
|
191
|
+
Configuration
|
|
192
|
+
} from '@crestal/nation-sdk';
|
|
193
|
+
|
|
194
|
+
const configuration = new Configuration();
|
|
195
|
+
const apiInstance = new AgentApi(configuration);
|
|
196
|
+
|
|
197
|
+
let agentId: string; //ID of the agent (default to undefined)
|
|
198
|
+
|
|
199
|
+
const { status, data } = await apiInstance.getAgentApiKey(
|
|
200
|
+
agentId
|
|
201
|
+
);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Parameters
|
|
205
|
+
|
|
206
|
+
|Name | Type | Description | Notes|
|
|
207
|
+
|------------- | ------------- | ------------- | -------------|
|
|
208
|
+
| **agentId** | [**string**] | ID of the agent | defaults to undefined|
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
### Return type
|
|
212
|
+
|
|
213
|
+
**AgentApiKeyResponse**
|
|
214
|
+
|
|
215
|
+
### Authorization
|
|
216
|
+
|
|
217
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
218
|
+
|
|
219
|
+
### HTTP request headers
|
|
220
|
+
|
|
221
|
+
- **Content-Type**: Not defined
|
|
222
|
+
- **Accept**: application/json
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
### HTTP response details
|
|
226
|
+
| Status code | Description | Response headers |
|
|
227
|
+
|-------------|-------------|------------------|
|
|
228
|
+
|**200** | Agent API key information | - |
|
|
229
|
+
|**403** | Not authorized to access this agent | - |
|
|
230
|
+
|**404** | Agent not found | - |
|
|
231
|
+
|**500** | Server error | - |
|
|
232
|
+
|**422** | Validation Error | - |
|
|
233
|
+
|
|
234
|
+
[[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)
|
|
235
|
+
|
|
179
236
|
# **getAgentStatistics**
|
|
180
237
|
> AgentStatisticsResponse getAgentStatistics()
|
|
181
238
|
|
|
@@ -455,6 +512,61 @@ const { status, data } = await apiInstance.overrideAgent(
|
|
|
455
512
|
|
|
456
513
|
[[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)
|
|
457
514
|
|
|
515
|
+
# **resetAgentApiKey**
|
|
516
|
+
> AgentApiKeyResponse resetAgentApiKey()
|
|
517
|
+
|
|
518
|
+
Reset (regenerate) the API keys for an agent. Generates new private (sk-) and public (pk-) API keys for the agent, revoking any existing keys. Private API key can access all skills (public and owner-only). Public API key can only access public skills. **Path Parameters:** * `agent_id` - ID of the agent **Returns:** * `AgentApiKeyResponse` - New API key information including private key, public key, and API documentation URLs **Raises:** * `HTTPException`: - 403: Not authorized to access this agent - 404: Agent not found - 500: Database error
|
|
519
|
+
|
|
520
|
+
### Example
|
|
521
|
+
|
|
522
|
+
```typescript
|
|
523
|
+
import {
|
|
524
|
+
AgentApi,
|
|
525
|
+
Configuration
|
|
526
|
+
} from '@crestal/nation-sdk';
|
|
527
|
+
|
|
528
|
+
const configuration = new Configuration();
|
|
529
|
+
const apiInstance = new AgentApi(configuration);
|
|
530
|
+
|
|
531
|
+
let agentId: string; //ID of the agent (default to undefined)
|
|
532
|
+
|
|
533
|
+
const { status, data } = await apiInstance.resetAgentApiKey(
|
|
534
|
+
agentId
|
|
535
|
+
);
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Parameters
|
|
539
|
+
|
|
540
|
+
|Name | Type | Description | Notes|
|
|
541
|
+
|------------- | ------------- | ------------- | -------------|
|
|
542
|
+
| **agentId** | [**string**] | ID of the agent | defaults to undefined|
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
### Return type
|
|
546
|
+
|
|
547
|
+
**AgentApiKeyResponse**
|
|
548
|
+
|
|
549
|
+
### Authorization
|
|
550
|
+
|
|
551
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
552
|
+
|
|
553
|
+
### HTTP request headers
|
|
554
|
+
|
|
555
|
+
- **Content-Type**: Not defined
|
|
556
|
+
- **Accept**: application/json
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
### HTTP response details
|
|
560
|
+
| Status code | Description | Response headers |
|
|
561
|
+
|-------------|-------------|------------------|
|
|
562
|
+
|**200** | New agent API key information | - |
|
|
563
|
+
|**403** | Not authorized to access this agent | - |
|
|
564
|
+
|**404** | Agent not found | - |
|
|
565
|
+
|**500** | Server error | - |
|
|
566
|
+
|**422** | Validation Error | - |
|
|
567
|
+
|
|
568
|
+
[[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)
|
|
569
|
+
|
|
458
570
|
# **updateAgent**
|
|
459
571
|
> any updateAgent()
|
|
460
572
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# AgentApiKeyResponse
|
|
2
|
+
|
|
3
|
+
Response model for agent API key endpoints.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**api_key** | **string** | The private API key for the agent (sk-) | [default to undefined]
|
|
10
|
+
**api_key_public** | **string** | The public API key for the agent (pk-) | [default to undefined]
|
|
11
|
+
**base_url** | **string** | The base URL for the API | [default to undefined]
|
|
12
|
+
**api_doc** | **string** | API documentation URL | [default to undefined]
|
|
13
|
+
**doc_for_ai** | **string** | OpenAPI JSON URL for AI integration | [default to undefined]
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { AgentApiKeyResponse } from '@crestal/nation-sdk';
|
|
19
|
+
|
|
20
|
+
const instance: AgentApiKeyResponse = {
|
|
21
|
+
api_key,
|
|
22
|
+
api_key_public,
|
|
23
|
+
base_url,
|
|
24
|
+
api_doc,
|
|
25
|
+
doc_for_ai,
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -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-
|
|
31
|
-
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-
|
|
30
|
+
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-08-01T03:57:25.813+00:00]
|
|
31
|
+
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-08-01T03:57:25.813+00:00]
|
|
32
32
|
**provider_name** | **string** | | [default to undefined]
|
|
33
33
|
|
|
34
34
|
## Example
|
package/index.ts
CHANGED