@crestal/nation-sdk 0.1.29 → 0.1.31
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 +2 -0
- package/README.md +9 -5
- package/api.ts +347 -39
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +181 -25
- package/dist/api.js +380 -41
- 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 +3 -3
- package/docs/GeneratorApi.md +12 -12
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/docs/OAuthApi.md +175 -0
- package/docs/TwitterAuthResponse.md +22 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -47,9 +47,11 @@ docs/HealthApi.md
|
|
|
47
47
|
docs/LLMModelInfoWithProviderName.md
|
|
48
48
|
docs/LLMProvider.md
|
|
49
49
|
docs/MetadataApi.md
|
|
50
|
+
docs/OAuthApi.md
|
|
50
51
|
docs/OwnerType.md
|
|
51
52
|
docs/Skill.md
|
|
52
53
|
docs/TransactionType.md
|
|
54
|
+
docs/TwitterAuthResponse.md
|
|
53
55
|
docs/UpstreamType.md
|
|
54
56
|
docs/UserApi.md
|
|
55
57
|
docs/ValidationError.md
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @crestal/nation-sdk@0.1.
|
|
1
|
+
## @crestal/nation-sdk@0.1.31
|
|
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.1.
|
|
39
|
+
npm install @crestal/nation-sdk@0.1.31 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -75,15 +75,18 @@ Class | Method | HTTP request | Description
|
|
|
75
75
|
*CreditApi* | [**listAgentIncomeEvents**](docs/CreditApi.md#listagentincomeevents) | **GET** /credit/agents/{agent_id}/events | List Agent Income
|
|
76
76
|
*CreditApi* | [**listUserEvents**](docs/CreditApi.md#listuserevents) | **GET** /credit/user/events | List User Events
|
|
77
77
|
*CreditApi* | [**listUserTransactions**](docs/CreditApi.md#listusertransactions) | **GET** /credit/user/transactions | List User Transactions
|
|
78
|
-
*GeneratorApi* | [**
|
|
79
|
-
*GeneratorApi* | [**
|
|
80
|
-
*GeneratorApi* | [**
|
|
78
|
+
*GeneratorApi* | [**generateAgent**](docs/GeneratorApi.md#generateagent) | **POST** /generator/agent/generate | Generate Agent from Natural Language Prompt
|
|
79
|
+
*GeneratorApi* | [**getGenerationHistory**](docs/GeneratorApi.md#getgenerationhistory) | **GET** /generator/agent/generations/{project_id} | Get Generation Detail by Project ID
|
|
80
|
+
*GeneratorApi* | [**getGenerations**](docs/GeneratorApi.md#getgenerations) | **GET** /generator/agent/generations | Get Generations List by User
|
|
81
81
|
*HealthApi* | [**healthCheckHealthGet**](docs/HealthApi.md#healthcheckhealthget) | **GET** /health | Health check endpoint
|
|
82
82
|
*MetadataApi* | [**getAgentSchema**](docs/MetadataApi.md#getagentschema) | **GET** /metadata/agent/schema.json | Get agent schema
|
|
83
83
|
*MetadataApi* | [**getLlmsMetadataLlmsGet**](docs/MetadataApi.md#getllmsmetadatallmsget) | **GET** /metadata/llms | Get all LLM models
|
|
84
84
|
*MetadataApi* | [**getSkillIcon**](docs/MetadataApi.md#getskillicon) | **GET** /metadata/skills/{skill}/{icon_name}.{ext} | Get skill icon
|
|
85
85
|
*MetadataApi* | [**getSkillSchema**](docs/MetadataApi.md#getskillschema) | **GET** /metadata/skills/{skill}/schema.json | Get skill schema
|
|
86
86
|
*MetadataApi* | [**getSkillsMetadataSkillsGet**](docs/MetadataApi.md#getskillsmetadataskillsget) | **GET** /metadata/skills | Get all skills
|
|
87
|
+
*OAuthApi* | [**getTwitterAuthUrl**](docs/OAuthApi.md#gettwitterauthurl) | **GET** /oauth/twitter | Get Twitter Auth Url
|
|
88
|
+
*OAuthApi* | [**twitterOauthCallback**](docs/OAuthApi.md#twitteroauthcallback) | **GET** /oauth/twitter/callback | Twitter Oauth Callback
|
|
89
|
+
*OAuthApi* | [**unlinkTwitter**](docs/OAuthApi.md#unlinktwitter) | **PUT** /oauth/twitter/unlink | Unlink Twitter Endpoint
|
|
87
90
|
*UserApi* | [**getUserAgentById**](docs/UserApi.md#getuseragentbyid) | **GET** /user/agents/{agent_id} | Get User Agent By Id
|
|
88
91
|
*UserApi* | [**getUserAgents**](docs/UserApi.md#getuseragents) | **GET** /user/agents | Get User Agents
|
|
89
92
|
|
|
@@ -128,6 +131,7 @@ Class | Method | HTTP request | Description
|
|
|
128
131
|
- [OwnerType](docs/OwnerType.md)
|
|
129
132
|
- [Skill](docs/Skill.md)
|
|
130
133
|
- [TransactionType](docs/TransactionType.md)
|
|
134
|
+
- [TwitterAuthResponse](docs/TwitterAuthResponse.md)
|
|
131
135
|
- [UpstreamType](docs/UpstreamType.md)
|
|
132
136
|
- [ValidationError](docs/ValidationError.md)
|
|
133
137
|
- [ValidationErrorLocInner](docs/ValidationErrorLocInner.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.1.
|
|
7
|
+
* The version of the OpenAPI document: 0.1.31
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2650,6 +2650,25 @@ export const TransactionType = {
|
|
|
2650
2650
|
export type TransactionType = typeof TransactionType[keyof typeof TransactionType];
|
|
2651
2651
|
|
|
2652
2652
|
|
|
2653
|
+
/**
|
|
2654
|
+
*
|
|
2655
|
+
* @export
|
|
2656
|
+
* @interface TwitterAuthResponse
|
|
2657
|
+
*/
|
|
2658
|
+
export interface TwitterAuthResponse {
|
|
2659
|
+
/**
|
|
2660
|
+
*
|
|
2661
|
+
* @type {string}
|
|
2662
|
+
* @memberof TwitterAuthResponse
|
|
2663
|
+
*/
|
|
2664
|
+
'agent_id': string;
|
|
2665
|
+
/**
|
|
2666
|
+
*
|
|
2667
|
+
* @type {string}
|
|
2668
|
+
* @memberof TwitterAuthResponse
|
|
2669
|
+
*/
|
|
2670
|
+
'url': string;
|
|
2671
|
+
}
|
|
2653
2672
|
/**
|
|
2654
2673
|
* Type of upstream transaction.
|
|
2655
2674
|
* @export
|
|
@@ -2706,7 +2725,7 @@ export interface ValidationErrorLocInner {
|
|
|
2706
2725
|
export const AgentApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
2707
2726
|
return {
|
|
2708
2727
|
/**
|
|
2709
|
-
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
|
|
2728
|
+
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
2710
2729
|
* @summary Create Agent
|
|
2711
2730
|
* @param {AgentUpdate} [agentUpdate]
|
|
2712
2731
|
* @param {*} [options] Override http request option.
|
|
@@ -2944,7 +2963,7 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
2944
2963
|
};
|
|
2945
2964
|
},
|
|
2946
2965
|
/**
|
|
2947
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
|
|
2966
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
2948
2967
|
* @summary Override Agent
|
|
2949
2968
|
* @param {string} agentId ID of the agent to update
|
|
2950
2969
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3028,7 +3047,7 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
3028
3047
|
};
|
|
3029
3048
|
},
|
|
3030
3049
|
/**
|
|
3031
|
-
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core - 500: Server error
|
|
3050
|
+
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
|
|
3032
3051
|
* @summary Validate Agent Create
|
|
3033
3052
|
* @param {AgentUpdate} [agentUpdate]
|
|
3034
3053
|
* @param {*} [options] Override http request option.
|
|
@@ -3118,7 +3137,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
|
|
|
3118
3137
|
const localVarAxiosParamCreator = AgentApiAxiosParamCreator(configuration)
|
|
3119
3138
|
return {
|
|
3120
3139
|
/**
|
|
3121
|
-
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
|
|
3140
|
+
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3122
3141
|
* @summary Create Agent
|
|
3123
3142
|
* @param {AgentUpdate} [agentUpdate]
|
|
3124
3143
|
* @param {*} [options] Override http request option.
|
|
@@ -3199,7 +3218,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
|
|
|
3199
3218
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3200
3219
|
},
|
|
3201
3220
|
/**
|
|
3202
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
|
|
3221
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3203
3222
|
* @summary Override Agent
|
|
3204
3223
|
* @param {string} agentId ID of the agent to update
|
|
3205
3224
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3227,7 +3246,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
|
|
|
3227
3246
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3228
3247
|
},
|
|
3229
3248
|
/**
|
|
3230
|
-
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core - 500: Server error
|
|
3249
|
+
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
|
|
3231
3250
|
* @summary Validate Agent Create
|
|
3232
3251
|
* @param {AgentUpdate} [agentUpdate]
|
|
3233
3252
|
* @param {*} [options] Override http request option.
|
|
@@ -3264,7 +3283,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
3264
3283
|
const localVarFp = AgentApiFp(configuration)
|
|
3265
3284
|
return {
|
|
3266
3285
|
/**
|
|
3267
|
-
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
|
|
3286
|
+
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3268
3287
|
* @summary Create Agent
|
|
3269
3288
|
* @param {AgentUpdate} [agentUpdate]
|
|
3270
3289
|
* @param {*} [options] Override http request option.
|
|
@@ -3327,7 +3346,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
3327
3346
|
return localVarFp.importAgent(agentId, file, options).then((request) => request(axios, basePath));
|
|
3328
3347
|
},
|
|
3329
3348
|
/**
|
|
3330
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
|
|
3349
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3331
3350
|
* @summary Override Agent
|
|
3332
3351
|
* @param {string} agentId ID of the agent to update
|
|
3333
3352
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3349,7 +3368,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
3349
3368
|
return localVarFp.updateAgent(agentId, agentUpdate, options).then((request) => request(axios, basePath));
|
|
3350
3369
|
},
|
|
3351
3370
|
/**
|
|
3352
|
-
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core - 500: Server error
|
|
3371
|
+
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
|
|
3353
3372
|
* @summary Validate Agent Create
|
|
3354
3373
|
* @param {AgentUpdate} [agentUpdate]
|
|
3355
3374
|
* @param {*} [options] Override http request option.
|
|
@@ -3380,7 +3399,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
3380
3399
|
*/
|
|
3381
3400
|
export class AgentApi extends BaseAPI {
|
|
3382
3401
|
/**
|
|
3383
|
-
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 500: Database error
|
|
3402
|
+
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3384
3403
|
* @summary Create Agent
|
|
3385
3404
|
* @param {AgentUpdate} [agentUpdate]
|
|
3386
3405
|
* @param {*} [options] Override http request option.
|
|
@@ -3455,7 +3474,7 @@ export class AgentApi extends BaseAPI {
|
|
|
3455
3474
|
}
|
|
3456
3475
|
|
|
3457
3476
|
/**
|
|
3458
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 500: Database error
|
|
3477
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `agent` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3459
3478
|
* @summary Override Agent
|
|
3460
3479
|
* @param {string} agentId ID of the agent to update
|
|
3461
3480
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3481,7 +3500,7 @@ export class AgentApi extends BaseAPI {
|
|
|
3481
3500
|
}
|
|
3482
3501
|
|
|
3483
3502
|
/**
|
|
3484
|
-
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core - 500: Server error
|
|
3503
|
+
* Validate agent configuration. **Request Body:** * `agent` - Agent configuration **Returns:** * `204 No Content` - Agent configuration is valid **Raises:** * `HTTPException`: - 400: Invalid agent configuration - 422: Invalid agent configuration from intentkit core or JSON schema validation - 500: Server error
|
|
3485
3504
|
* @summary Validate Agent Create
|
|
3486
3505
|
* @param {AgentUpdate} [agentUpdate]
|
|
3487
3506
|
* @param {*} [options] Override http request option.
|
|
@@ -4756,9 +4775,9 @@ export const GeneratorApiAxiosParamCreator = function (configuration?: Configura
|
|
|
4756
4775
|
* @param {*} [options] Override http request option.
|
|
4757
4776
|
* @throws {RequiredError}
|
|
4758
4777
|
*/
|
|
4759
|
-
|
|
4778
|
+
generateAgent: async (agentGenerateRequest: AgentGenerateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4760
4779
|
// verify required parameter 'agentGenerateRequest' is not null or undefined
|
|
4761
|
-
assertParamExists('
|
|
4780
|
+
assertParamExists('generateAgent', 'agentGenerateRequest', agentGenerateRequest)
|
|
4762
4781
|
const localVarPath = `/generator/agent/generate`;
|
|
4763
4782
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4764
4783
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -4796,9 +4815,9 @@ export const GeneratorApiAxiosParamCreator = function (configuration?: Configura
|
|
|
4796
4815
|
* @param {*} [options] Override http request option.
|
|
4797
4816
|
* @throws {RequiredError}
|
|
4798
4817
|
*/
|
|
4799
|
-
|
|
4818
|
+
getGenerationHistory: async (projectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4800
4819
|
// verify required parameter 'projectId' is not null or undefined
|
|
4801
|
-
assertParamExists('
|
|
4820
|
+
assertParamExists('getGenerationHistory', 'projectId', projectId)
|
|
4802
4821
|
const localVarPath = `/generator/agent/generations/{project_id}`
|
|
4803
4822
|
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
4804
4823
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -4834,7 +4853,7 @@ export const GeneratorApiAxiosParamCreator = function (configuration?: Configura
|
|
|
4834
4853
|
* @param {*} [options] Override http request option.
|
|
4835
4854
|
* @throws {RequiredError}
|
|
4836
4855
|
*/
|
|
4837
|
-
|
|
4856
|
+
getGenerations: async (limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4838
4857
|
const localVarPath = `/generator/agent/generations`;
|
|
4839
4858
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4840
4859
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -4883,10 +4902,10 @@ export const GeneratorApiFp = function(configuration?: Configuration) {
|
|
|
4883
4902
|
* @param {*} [options] Override http request option.
|
|
4884
4903
|
* @throws {RequiredError}
|
|
4885
4904
|
*/
|
|
4886
|
-
async
|
|
4887
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
4905
|
+
async generateAgent(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentGenerateResponse>> {
|
|
4906
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.generateAgent(agentGenerateRequest, options);
|
|
4888
4907
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4889
|
-
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.
|
|
4908
|
+
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.generateAgent']?.[localVarOperationServerIndex]?.url;
|
|
4890
4909
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4891
4910
|
},
|
|
4892
4911
|
/**
|
|
@@ -4896,10 +4915,10 @@ export const GeneratorApiFp = function(configuration?: Configuration) {
|
|
|
4896
4915
|
* @param {*} [options] Override http request option.
|
|
4897
4916
|
* @throws {RequiredError}
|
|
4898
4917
|
*/
|
|
4899
|
-
async
|
|
4900
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
4918
|
+
async getGenerationHistory(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationDetailResponse>> {
|
|
4919
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGenerationHistory(projectId, options);
|
|
4901
4920
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4902
|
-
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.
|
|
4921
|
+
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.getGenerationHistory']?.[localVarOperationServerIndex]?.url;
|
|
4903
4922
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4904
4923
|
},
|
|
4905
4924
|
/**
|
|
@@ -4909,10 +4928,10 @@ export const GeneratorApiFp = function(configuration?: Configuration) {
|
|
|
4909
4928
|
* @param {*} [options] Override http request option.
|
|
4910
4929
|
* @throws {RequiredError}
|
|
4911
4930
|
*/
|
|
4912
|
-
async
|
|
4913
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
4931
|
+
async getGenerations(limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationsListResponse>> {
|
|
4932
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGenerations(limit, options);
|
|
4914
4933
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4915
|
-
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.
|
|
4934
|
+
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.getGenerations']?.[localVarOperationServerIndex]?.url;
|
|
4916
4935
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4917
4936
|
},
|
|
4918
4937
|
}
|
|
@@ -4932,8 +4951,8 @@ export const GeneratorApiFactory = function (configuration?: Configuration, base
|
|
|
4932
4951
|
* @param {*} [options] Override http request option.
|
|
4933
4952
|
* @throws {RequiredError}
|
|
4934
4953
|
*/
|
|
4935
|
-
|
|
4936
|
-
return localVarFp.
|
|
4954
|
+
generateAgent(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentGenerateResponse> {
|
|
4955
|
+
return localVarFp.generateAgent(agentGenerateRequest, options).then((request) => request(axios, basePath));
|
|
4937
4956
|
},
|
|
4938
4957
|
/**
|
|
4939
4958
|
* Get specific project conversation history. **Path Parameters:** * `project_id` - Project ID to get conversation history for **Query Parameters:** * `user_id` - Optional user ID for access validation **Returns:** * `GenerationDetailResponse` - Contains full conversation history for the project **Raises:** * `HTTPException`: - 404: Project not found or access denied - 500: Failed to retrieve generation detail
|
|
@@ -4942,8 +4961,8 @@ export const GeneratorApiFactory = function (configuration?: Configuration, base
|
|
|
4942
4961
|
* @param {*} [options] Override http request option.
|
|
4943
4962
|
* @throws {RequiredError}
|
|
4944
4963
|
*/
|
|
4945
|
-
|
|
4946
|
-
return localVarFp.
|
|
4964
|
+
getGenerationHistory(projectId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerationDetailResponse> {
|
|
4965
|
+
return localVarFp.getGenerationHistory(projectId, options).then((request) => request(axios, basePath));
|
|
4947
4966
|
},
|
|
4948
4967
|
/**
|
|
4949
4968
|
* Get all projects/generations for a user. **Query Parameters:** * `user_id` - Optional user ID to filter projects * `limit` - Maximum number of recent projects to return (default: 50, max: 100) **Returns:** * `GenerationsListResponse` - Contains list of projects with their conversation history **Raises:** * `HTTPException`: - 400: Invalid parameters - 500: Failed to retrieve generations
|
|
@@ -4952,8 +4971,8 @@ export const GeneratorApiFactory = function (configuration?: Configuration, base
|
|
|
4952
4971
|
* @param {*} [options] Override http request option.
|
|
4953
4972
|
* @throws {RequiredError}
|
|
4954
4973
|
*/
|
|
4955
|
-
|
|
4956
|
-
return localVarFp.
|
|
4974
|
+
getGenerations(limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<GenerationsListResponse> {
|
|
4975
|
+
return localVarFp.getGenerations(limit, options).then((request) => request(axios, basePath));
|
|
4957
4976
|
},
|
|
4958
4977
|
};
|
|
4959
4978
|
};
|
|
@@ -4973,8 +4992,8 @@ export class GeneratorApi extends BaseAPI {
|
|
|
4973
4992
|
* @throws {RequiredError}
|
|
4974
4993
|
* @memberof GeneratorApi
|
|
4975
4994
|
*/
|
|
4976
|
-
public
|
|
4977
|
-
return GeneratorApiFp(this.configuration).
|
|
4995
|
+
public generateAgent(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig) {
|
|
4996
|
+
return GeneratorApiFp(this.configuration).generateAgent(agentGenerateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4978
4997
|
}
|
|
4979
4998
|
|
|
4980
4999
|
/**
|
|
@@ -4985,8 +5004,8 @@ export class GeneratorApi extends BaseAPI {
|
|
|
4985
5004
|
* @throws {RequiredError}
|
|
4986
5005
|
* @memberof GeneratorApi
|
|
4987
5006
|
*/
|
|
4988
|
-
public
|
|
4989
|
-
return GeneratorApiFp(this.configuration).
|
|
5007
|
+
public getGenerationHistory(projectId: string, options?: RawAxiosRequestConfig) {
|
|
5008
|
+
return GeneratorApiFp(this.configuration).getGenerationHistory(projectId, options).then((request) => request(this.axios, this.basePath));
|
|
4990
5009
|
}
|
|
4991
5010
|
|
|
4992
5011
|
/**
|
|
@@ -4997,8 +5016,8 @@ export class GeneratorApi extends BaseAPI {
|
|
|
4997
5016
|
* @throws {RequiredError}
|
|
4998
5017
|
* @memberof GeneratorApi
|
|
4999
5018
|
*/
|
|
5000
|
-
public
|
|
5001
|
-
return GeneratorApiFp(this.configuration).
|
|
5019
|
+
public getGenerations(limit?: number, options?: RawAxiosRequestConfig) {
|
|
5020
|
+
return GeneratorApiFp(this.configuration).getGenerations(limit, options).then((request) => request(this.axios, this.basePath));
|
|
5002
5021
|
}
|
|
5003
5022
|
}
|
|
5004
5023
|
|
|
@@ -5482,6 +5501,295 @@ export class MetadataApi extends BaseAPI {
|
|
|
5482
5501
|
|
|
5483
5502
|
|
|
5484
5503
|
|
|
5504
|
+
/**
|
|
5505
|
+
* OAuthApi - axios parameter creator
|
|
5506
|
+
* @export
|
|
5507
|
+
*/
|
|
5508
|
+
export const OAuthApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
5509
|
+
return {
|
|
5510
|
+
/**
|
|
5511
|
+
* Get Twitter OAuth2 authorization URL. **Query Parameters:** * `agent_id` - ID of the agent to authenticate * `redirect_uri` - DApp URI to redirect to after authorization from agentkit to DApp **Returns:** * Object containing agent_id and authorization URL
|
|
5512
|
+
* @summary Get Twitter Auth Url
|
|
5513
|
+
* @param {string} agentId
|
|
5514
|
+
* @param {string} redirectUri
|
|
5515
|
+
* @param {*} [options] Override http request option.
|
|
5516
|
+
* @throws {RequiredError}
|
|
5517
|
+
*/
|
|
5518
|
+
getTwitterAuthUrl: async (agentId: string, redirectUri: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5519
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
5520
|
+
assertParamExists('getTwitterAuthUrl', 'agentId', agentId)
|
|
5521
|
+
// verify required parameter 'redirectUri' is not null or undefined
|
|
5522
|
+
assertParamExists('getTwitterAuthUrl', 'redirectUri', redirectUri)
|
|
5523
|
+
const localVarPath = `/oauth/twitter`;
|
|
5524
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5525
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5526
|
+
let baseOptions;
|
|
5527
|
+
if (configuration) {
|
|
5528
|
+
baseOptions = configuration.baseOptions;
|
|
5529
|
+
}
|
|
5530
|
+
|
|
5531
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5532
|
+
const localVarHeaderParameter = {} as any;
|
|
5533
|
+
const localVarQueryParameter = {} as any;
|
|
5534
|
+
|
|
5535
|
+
// authentication HTTPBearer required
|
|
5536
|
+
// http bearer authentication required
|
|
5537
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5538
|
+
|
|
5539
|
+
if (agentId !== undefined) {
|
|
5540
|
+
localVarQueryParameter['agent_id'] = agentId;
|
|
5541
|
+
}
|
|
5542
|
+
|
|
5543
|
+
if (redirectUri !== undefined) {
|
|
5544
|
+
localVarQueryParameter['redirect_uri'] = redirectUri;
|
|
5545
|
+
}
|
|
5546
|
+
|
|
5547
|
+
|
|
5548
|
+
|
|
5549
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5550
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5551
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5552
|
+
|
|
5553
|
+
return {
|
|
5554
|
+
url: toPathString(localVarUrlObj),
|
|
5555
|
+
options: localVarRequestOptions,
|
|
5556
|
+
};
|
|
5557
|
+
},
|
|
5558
|
+
/**
|
|
5559
|
+
* Handle Twitter OAuth2 callback. This endpoint is called by Twitter after the user authorizes the application. It exchanges the authorization code for access and refresh tokens, then stores them in the database. **Query Parameters:** * `state` - URL-encoded state containing agent_id and redirect_uri * `code` - Authorization code from Twitter * `error` - Error message from Twitter (optional) **Returns:** * JSONResponse or RedirectResponse depending on redirect_uri
|
|
5560
|
+
* @summary Twitter Oauth Callback
|
|
5561
|
+
* @param {string} state
|
|
5562
|
+
* @param {string | null} [code]
|
|
5563
|
+
* @param {string | null} [error]
|
|
5564
|
+
* @param {*} [options] Override http request option.
|
|
5565
|
+
* @throws {RequiredError}
|
|
5566
|
+
*/
|
|
5567
|
+
twitterOauthCallback: async (state: string, code?: string | null, error?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5568
|
+
// verify required parameter 'state' is not null or undefined
|
|
5569
|
+
assertParamExists('twitterOauthCallback', 'state', state)
|
|
5570
|
+
const localVarPath = `/oauth/twitter/callback`;
|
|
5571
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5572
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5573
|
+
let baseOptions;
|
|
5574
|
+
if (configuration) {
|
|
5575
|
+
baseOptions = configuration.baseOptions;
|
|
5576
|
+
}
|
|
5577
|
+
|
|
5578
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
5579
|
+
const localVarHeaderParameter = {} as any;
|
|
5580
|
+
const localVarQueryParameter = {} as any;
|
|
5581
|
+
|
|
5582
|
+
if (state !== undefined) {
|
|
5583
|
+
localVarQueryParameter['state'] = state;
|
|
5584
|
+
}
|
|
5585
|
+
|
|
5586
|
+
if (code !== undefined) {
|
|
5587
|
+
localVarQueryParameter['code'] = code;
|
|
5588
|
+
}
|
|
5589
|
+
|
|
5590
|
+
if (error !== undefined) {
|
|
5591
|
+
localVarQueryParameter['error'] = error;
|
|
5592
|
+
}
|
|
5593
|
+
|
|
5594
|
+
|
|
5595
|
+
|
|
5596
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5597
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5598
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5599
|
+
|
|
5600
|
+
return {
|
|
5601
|
+
url: toPathString(localVarUrlObj),
|
|
5602
|
+
options: localVarRequestOptions,
|
|
5603
|
+
};
|
|
5604
|
+
},
|
|
5605
|
+
/**
|
|
5606
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
5607
|
+
* @summary Unlink Twitter Endpoint
|
|
5608
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
5609
|
+
* @param {*} [options] Override http request option.
|
|
5610
|
+
* @throws {RequiredError}
|
|
5611
|
+
*/
|
|
5612
|
+
unlinkTwitter: async (agentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5613
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
5614
|
+
assertParamExists('unlinkTwitter', 'agentId', agentId)
|
|
5615
|
+
const localVarPath = `/oauth/twitter/unlink`;
|
|
5616
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5617
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5618
|
+
let baseOptions;
|
|
5619
|
+
if (configuration) {
|
|
5620
|
+
baseOptions = configuration.baseOptions;
|
|
5621
|
+
}
|
|
5622
|
+
|
|
5623
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
|
|
5624
|
+
const localVarHeaderParameter = {} as any;
|
|
5625
|
+
const localVarQueryParameter = {} as any;
|
|
5626
|
+
|
|
5627
|
+
// authentication HTTPBearer required
|
|
5628
|
+
// http bearer authentication required
|
|
5629
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5630
|
+
|
|
5631
|
+
if (agentId !== undefined) {
|
|
5632
|
+
localVarQueryParameter['agent_id'] = agentId;
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
|
|
5636
|
+
|
|
5637
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5638
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5639
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5640
|
+
|
|
5641
|
+
return {
|
|
5642
|
+
url: toPathString(localVarUrlObj),
|
|
5643
|
+
options: localVarRequestOptions,
|
|
5644
|
+
};
|
|
5645
|
+
},
|
|
5646
|
+
}
|
|
5647
|
+
};
|
|
5648
|
+
|
|
5649
|
+
/**
|
|
5650
|
+
* OAuthApi - functional programming interface
|
|
5651
|
+
* @export
|
|
5652
|
+
*/
|
|
5653
|
+
export const OAuthApiFp = function(configuration?: Configuration) {
|
|
5654
|
+
const localVarAxiosParamCreator = OAuthApiAxiosParamCreator(configuration)
|
|
5655
|
+
return {
|
|
5656
|
+
/**
|
|
5657
|
+
* Get Twitter OAuth2 authorization URL. **Query Parameters:** * `agent_id` - ID of the agent to authenticate * `redirect_uri` - DApp URI to redirect to after authorization from agentkit to DApp **Returns:** * Object containing agent_id and authorization URL
|
|
5658
|
+
* @summary Get Twitter Auth Url
|
|
5659
|
+
* @param {string} agentId
|
|
5660
|
+
* @param {string} redirectUri
|
|
5661
|
+
* @param {*} [options] Override http request option.
|
|
5662
|
+
* @throws {RequiredError}
|
|
5663
|
+
*/
|
|
5664
|
+
async getTwitterAuthUrl(agentId: string, redirectUri: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TwitterAuthResponse>> {
|
|
5665
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getTwitterAuthUrl(agentId, redirectUri, options);
|
|
5666
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5667
|
+
const localVarOperationServerBasePath = operationServerMap['OAuthApi.getTwitterAuthUrl']?.[localVarOperationServerIndex]?.url;
|
|
5668
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5669
|
+
},
|
|
5670
|
+
/**
|
|
5671
|
+
* Handle Twitter OAuth2 callback. This endpoint is called by Twitter after the user authorizes the application. It exchanges the authorization code for access and refresh tokens, then stores them in the database. **Query Parameters:** * `state` - URL-encoded state containing agent_id and redirect_uri * `code` - Authorization code from Twitter * `error` - Error message from Twitter (optional) **Returns:** * JSONResponse or RedirectResponse depending on redirect_uri
|
|
5672
|
+
* @summary Twitter Oauth Callback
|
|
5673
|
+
* @param {string} state
|
|
5674
|
+
* @param {string | null} [code]
|
|
5675
|
+
* @param {string | null} [error]
|
|
5676
|
+
* @param {*} [options] Override http request option.
|
|
5677
|
+
* @throws {RequiredError}
|
|
5678
|
+
*/
|
|
5679
|
+
async twitterOauthCallback(state: string, code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
|
5680
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.twitterOauthCallback(state, code, error, options);
|
|
5681
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5682
|
+
const localVarOperationServerBasePath = operationServerMap['OAuthApi.twitterOauthCallback']?.[localVarOperationServerIndex]?.url;
|
|
5683
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5684
|
+
},
|
|
5685
|
+
/**
|
|
5686
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
5687
|
+
* @summary Unlink Twitter Endpoint
|
|
5688
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
5689
|
+
* @param {*} [options] Override http request option.
|
|
5690
|
+
* @throws {RequiredError}
|
|
5691
|
+
*/
|
|
5692
|
+
async unlinkTwitter(agentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
5693
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.unlinkTwitter(agentId, options);
|
|
5694
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
5695
|
+
const localVarOperationServerBasePath = operationServerMap['OAuthApi.unlinkTwitter']?.[localVarOperationServerIndex]?.url;
|
|
5696
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
5697
|
+
},
|
|
5698
|
+
}
|
|
5699
|
+
};
|
|
5700
|
+
|
|
5701
|
+
/**
|
|
5702
|
+
* OAuthApi - factory interface
|
|
5703
|
+
* @export
|
|
5704
|
+
*/
|
|
5705
|
+
export const OAuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
5706
|
+
const localVarFp = OAuthApiFp(configuration)
|
|
5707
|
+
return {
|
|
5708
|
+
/**
|
|
5709
|
+
* Get Twitter OAuth2 authorization URL. **Query Parameters:** * `agent_id` - ID of the agent to authenticate * `redirect_uri` - DApp URI to redirect to after authorization from agentkit to DApp **Returns:** * Object containing agent_id and authorization URL
|
|
5710
|
+
* @summary Get Twitter Auth Url
|
|
5711
|
+
* @param {string} agentId
|
|
5712
|
+
* @param {string} redirectUri
|
|
5713
|
+
* @param {*} [options] Override http request option.
|
|
5714
|
+
* @throws {RequiredError}
|
|
5715
|
+
*/
|
|
5716
|
+
getTwitterAuthUrl(agentId: string, redirectUri: string, options?: RawAxiosRequestConfig): AxiosPromise<TwitterAuthResponse> {
|
|
5717
|
+
return localVarFp.getTwitterAuthUrl(agentId, redirectUri, options).then((request) => request(axios, basePath));
|
|
5718
|
+
},
|
|
5719
|
+
/**
|
|
5720
|
+
* Handle Twitter OAuth2 callback. This endpoint is called by Twitter after the user authorizes the application. It exchanges the authorization code for access and refresh tokens, then stores them in the database. **Query Parameters:** * `state` - URL-encoded state containing agent_id and redirect_uri * `code` - Authorization code from Twitter * `error` - Error message from Twitter (optional) **Returns:** * JSONResponse or RedirectResponse depending on redirect_uri
|
|
5721
|
+
* @summary Twitter Oauth Callback
|
|
5722
|
+
* @param {string} state
|
|
5723
|
+
* @param {string | null} [code]
|
|
5724
|
+
* @param {string | null} [error]
|
|
5725
|
+
* @param {*} [options] Override http request option.
|
|
5726
|
+
* @throws {RequiredError}
|
|
5727
|
+
*/
|
|
5728
|
+
twitterOauthCallback(state: string, code?: string | null, error?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
|
5729
|
+
return localVarFp.twitterOauthCallback(state, code, error, options).then((request) => request(axios, basePath));
|
|
5730
|
+
},
|
|
5731
|
+
/**
|
|
5732
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
5733
|
+
* @summary Unlink Twitter Endpoint
|
|
5734
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
5735
|
+
* @param {*} [options] Override http request option.
|
|
5736
|
+
* @throws {RequiredError}
|
|
5737
|
+
*/
|
|
5738
|
+
unlinkTwitter(agentId: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
|
5739
|
+
return localVarFp.unlinkTwitter(agentId, options).then((request) => request(axios, basePath));
|
|
5740
|
+
},
|
|
5741
|
+
};
|
|
5742
|
+
};
|
|
5743
|
+
|
|
5744
|
+
/**
|
|
5745
|
+
* OAuthApi - object-oriented interface
|
|
5746
|
+
* @export
|
|
5747
|
+
* @class OAuthApi
|
|
5748
|
+
* @extends {BaseAPI}
|
|
5749
|
+
*/
|
|
5750
|
+
export class OAuthApi extends BaseAPI {
|
|
5751
|
+
/**
|
|
5752
|
+
* Get Twitter OAuth2 authorization URL. **Query Parameters:** * `agent_id` - ID of the agent to authenticate * `redirect_uri` - DApp URI to redirect to after authorization from agentkit to DApp **Returns:** * Object containing agent_id and authorization URL
|
|
5753
|
+
* @summary Get Twitter Auth Url
|
|
5754
|
+
* @param {string} agentId
|
|
5755
|
+
* @param {string} redirectUri
|
|
5756
|
+
* @param {*} [options] Override http request option.
|
|
5757
|
+
* @throws {RequiredError}
|
|
5758
|
+
* @memberof OAuthApi
|
|
5759
|
+
*/
|
|
5760
|
+
public getTwitterAuthUrl(agentId: string, redirectUri: string, options?: RawAxiosRequestConfig) {
|
|
5761
|
+
return OAuthApiFp(this.configuration).getTwitterAuthUrl(agentId, redirectUri, options).then((request) => request(this.axios, this.basePath));
|
|
5762
|
+
}
|
|
5763
|
+
|
|
5764
|
+
/**
|
|
5765
|
+
* Handle Twitter OAuth2 callback. This endpoint is called by Twitter after the user authorizes the application. It exchanges the authorization code for access and refresh tokens, then stores them in the database. **Query Parameters:** * `state` - URL-encoded state containing agent_id and redirect_uri * `code` - Authorization code from Twitter * `error` - Error message from Twitter (optional) **Returns:** * JSONResponse or RedirectResponse depending on redirect_uri
|
|
5766
|
+
* @summary Twitter Oauth Callback
|
|
5767
|
+
* @param {string} state
|
|
5768
|
+
* @param {string | null} [code]
|
|
5769
|
+
* @param {string | null} [error]
|
|
5770
|
+
* @param {*} [options] Override http request option.
|
|
5771
|
+
* @throws {RequiredError}
|
|
5772
|
+
* @memberof OAuthApi
|
|
5773
|
+
*/
|
|
5774
|
+
public twitterOauthCallback(state: string, code?: string | null, error?: string | null, options?: RawAxiosRequestConfig) {
|
|
5775
|
+
return OAuthApiFp(this.configuration).twitterOauthCallback(state, code, error, options).then((request) => request(this.axios, this.basePath));
|
|
5776
|
+
}
|
|
5777
|
+
|
|
5778
|
+
/**
|
|
5779
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
5780
|
+
* @summary Unlink Twitter Endpoint
|
|
5781
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
5782
|
+
* @param {*} [options] Override http request option.
|
|
5783
|
+
* @throws {RequiredError}
|
|
5784
|
+
* @memberof OAuthApi
|
|
5785
|
+
*/
|
|
5786
|
+
public unlinkTwitter(agentId: string, options?: RawAxiosRequestConfig) {
|
|
5787
|
+
return OAuthApiFp(this.configuration).unlinkTwitter(agentId, options).then((request) => request(this.axios, this.basePath));
|
|
5788
|
+
}
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5791
|
+
|
|
5792
|
+
|
|
5485
5793
|
/**
|
|
5486
5794
|
* UserApi - axios parameter creator
|
|
5487
5795
|
* @export
|