@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/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.1.
|
|
8
|
+
* The version of the OpenAPI document: 0.1.31
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -84,8 +84,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
84
84
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
85
|
};
|
|
86
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
-
exports.
|
|
88
|
-
exports.UserApi = void 0;
|
|
87
|
+
exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.GeneratorApi = exports.GeneratorApiFactory = exports.GeneratorApiFp = exports.GeneratorApiAxiosParamCreator = exports.CreditApi = exports.CreditApiFactory = exports.CreditApiFp = exports.CreditApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AgentApi = exports.AgentApiFactory = exports.AgentApiFp = exports.AgentApiAxiosParamCreator = exports.UpstreamType = exports.TransactionType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUpdateCdpNetworkIdEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateModeEnum = exports.AgentSortOption = exports.AgentResponseWalletProviderEnum = exports.AgentResponseModeEnum = exports.AgentCdpNetworkIdEnum = exports.AgentNetworkIdEnum = exports.AgentWalletProviderEnum = exports.AgentShortTermMemoryStrategyEnum = exports.AgentModeEnum = void 0;
|
|
88
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.OAuthApi = void 0;
|
|
89
89
|
var axios_1 = require("axios");
|
|
90
90
|
// Some imports not used depending on template conditions
|
|
91
91
|
// @ts-ignore
|
|
@@ -318,7 +318,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
318
318
|
var _this = this;
|
|
319
319
|
return {
|
|
320
320
|
/**
|
|
321
|
-
* 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
|
|
321
|
+
* 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
|
|
322
322
|
* @summary Create Agent
|
|
323
323
|
* @param {AgentUpdate} [agentUpdate]
|
|
324
324
|
* @param {*} [options] Override http request option.
|
|
@@ -586,7 +586,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
586
586
|
});
|
|
587
587
|
},
|
|
588
588
|
/**
|
|
589
|
-
* 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
|
|
589
|
+
* 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
|
|
590
590
|
* @summary Override Agent
|
|
591
591
|
* @param {string} agentId ID of the agent to update
|
|
592
592
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -686,7 +686,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
686
686
|
});
|
|
687
687
|
},
|
|
688
688
|
/**
|
|
689
|
-
* 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
|
|
689
|
+
* 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
|
|
690
690
|
* @summary Validate Agent Create
|
|
691
691
|
* @param {AgentUpdate} [agentUpdate]
|
|
692
692
|
* @param {*} [options] Override http request option.
|
|
@@ -792,7 +792,7 @@ var AgentApiFp = function (configuration) {
|
|
|
792
792
|
var localVarAxiosParamCreator = (0, exports.AgentApiAxiosParamCreator)(configuration);
|
|
793
793
|
return {
|
|
794
794
|
/**
|
|
795
|
-
* 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
|
|
795
|
+
* 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
|
|
796
796
|
* @summary Create Agent
|
|
797
797
|
* @param {AgentUpdate} [agentUpdate]
|
|
798
798
|
* @param {*} [options] Override http request option.
|
|
@@ -933,7 +933,7 @@ var AgentApiFp = function (configuration) {
|
|
|
933
933
|
});
|
|
934
934
|
},
|
|
935
935
|
/**
|
|
936
|
-
* 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
|
|
936
|
+
* 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
|
|
937
937
|
* @summary Override Agent
|
|
938
938
|
* @param {string} agentId ID of the agent to update
|
|
939
939
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -981,7 +981,7 @@ var AgentApiFp = function (configuration) {
|
|
|
981
981
|
});
|
|
982
982
|
},
|
|
983
983
|
/**
|
|
984
|
-
* 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
|
|
984
|
+
* 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
|
|
985
985
|
* @summary Validate Agent Create
|
|
986
986
|
* @param {AgentUpdate} [agentUpdate]
|
|
987
987
|
* @param {*} [options] Override http request option.
|
|
@@ -1038,7 +1038,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1038
1038
|
var localVarFp = (0, exports.AgentApiFp)(configuration);
|
|
1039
1039
|
return {
|
|
1040
1040
|
/**
|
|
1041
|
-
* 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
|
|
1041
|
+
* 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
|
|
1042
1042
|
* @summary Create Agent
|
|
1043
1043
|
* @param {AgentUpdate} [agentUpdate]
|
|
1044
1044
|
* @param {*} [options] Override http request option.
|
|
@@ -1101,7 +1101,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1101
1101
|
return localVarFp.importAgent(agentId, file, options).then(function (request) { return request(axios, basePath); });
|
|
1102
1102
|
},
|
|
1103
1103
|
/**
|
|
1104
|
-
* 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
|
|
1104
|
+
* 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
|
|
1105
1105
|
* @summary Override Agent
|
|
1106
1106
|
* @param {string} agentId ID of the agent to update
|
|
1107
1107
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -1123,7 +1123,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1123
1123
|
return localVarFp.updateAgent(agentId, agentUpdate, options).then(function (request) { return request(axios, basePath); });
|
|
1124
1124
|
},
|
|
1125
1125
|
/**
|
|
1126
|
-
* 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
|
|
1126
|
+
* 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
|
|
1127
1127
|
* @summary Validate Agent Create
|
|
1128
1128
|
* @param {AgentUpdate} [agentUpdate]
|
|
1129
1129
|
* @param {*} [options] Override http request option.
|
|
@@ -1158,7 +1158,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1158
1158
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
1159
1159
|
}
|
|
1160
1160
|
/**
|
|
1161
|
-
* 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
|
|
1161
|
+
* 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
|
|
1162
1162
|
* @summary Create Agent
|
|
1163
1163
|
* @param {AgentUpdate} [agentUpdate]
|
|
1164
1164
|
* @param {*} [options] Override http request option.
|
|
@@ -1233,7 +1233,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1233
1233
|
return (0, exports.AgentApiFp)(this.configuration).importAgent(agentId, file, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1234
1234
|
};
|
|
1235
1235
|
/**
|
|
1236
|
-
* 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
|
|
1236
|
+
* 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
|
|
1237
1237
|
* @summary Override Agent
|
|
1238
1238
|
* @param {string} agentId ID of the agent to update
|
|
1239
1239
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -1259,7 +1259,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1259
1259
|
return (0, exports.AgentApiFp)(this.configuration).updateAgent(agentId, agentUpdate, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1260
1260
|
};
|
|
1261
1261
|
/**
|
|
1262
|
-
* 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
|
|
1262
|
+
* 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
|
|
1263
1263
|
* @summary Validate Agent Create
|
|
1264
1264
|
* @param {AgentUpdate} [agentUpdate]
|
|
1265
1265
|
* @param {*} [options] Override http request option.
|
|
@@ -2797,7 +2797,7 @@ var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
|
2797
2797
|
* @param {*} [options] Override http request option.
|
|
2798
2798
|
* @throws {RequiredError}
|
|
2799
2799
|
*/
|
|
2800
|
-
|
|
2800
|
+
generateAgent: function (agentGenerateRequest_1) {
|
|
2801
2801
|
var args_1 = [];
|
|
2802
2802
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2803
2803
|
args_1[_i - 1] = arguments[_i];
|
|
@@ -2809,7 +2809,7 @@ var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
|
2809
2809
|
switch (_a.label) {
|
|
2810
2810
|
case 0:
|
|
2811
2811
|
// verify required parameter 'agentGenerateRequest' is not null or undefined
|
|
2812
|
-
(0, common_1.assertParamExists)('
|
|
2812
|
+
(0, common_1.assertParamExists)('generateAgent', 'agentGenerateRequest', agentGenerateRequest);
|
|
2813
2813
|
localVarPath = "/generator/agent/generate";
|
|
2814
2814
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2815
2815
|
if (configuration) {
|
|
@@ -2845,7 +2845,7 @@ var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
|
2845
2845
|
* @param {*} [options] Override http request option.
|
|
2846
2846
|
* @throws {RequiredError}
|
|
2847
2847
|
*/
|
|
2848
|
-
|
|
2848
|
+
getGenerationHistory: function (projectId_1) {
|
|
2849
2849
|
var args_1 = [];
|
|
2850
2850
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2851
2851
|
args_1[_i - 1] = arguments[_i];
|
|
@@ -2857,7 +2857,7 @@ var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
|
2857
2857
|
switch (_a.label) {
|
|
2858
2858
|
case 0:
|
|
2859
2859
|
// verify required parameter 'projectId' is not null or undefined
|
|
2860
|
-
(0, common_1.assertParamExists)('
|
|
2860
|
+
(0, common_1.assertParamExists)('getGenerationHistory', 'projectId', projectId);
|
|
2861
2861
|
localVarPath = "/generator/agent/generations/{project_id}"
|
|
2862
2862
|
.replace("{".concat("project_id", "}"), encodeURIComponent(String(projectId)));
|
|
2863
2863
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2892,7 +2892,7 @@ var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
|
2892
2892
|
* @param {*} [options] Override http request option.
|
|
2893
2893
|
* @throws {RequiredError}
|
|
2894
2894
|
*/
|
|
2895
|
-
|
|
2895
|
+
getGenerations: function (limit_1) {
|
|
2896
2896
|
var args_1 = [];
|
|
2897
2897
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2898
2898
|
args_1[_i - 1] = arguments[_i];
|
|
@@ -2949,17 +2949,17 @@ var GeneratorApiFp = function (configuration) {
|
|
|
2949
2949
|
* @param {*} [options] Override http request option.
|
|
2950
2950
|
* @throws {RequiredError}
|
|
2951
2951
|
*/
|
|
2952
|
-
|
|
2952
|
+
generateAgent: function (agentGenerateRequest, options) {
|
|
2953
2953
|
return __awaiter(this, void 0, void 0, function () {
|
|
2954
2954
|
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2955
2955
|
var _a, _b, _c;
|
|
2956
2956
|
return __generator(this, function (_d) {
|
|
2957
2957
|
switch (_d.label) {
|
|
2958
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.
|
|
2958
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.generateAgent(agentGenerateRequest, options)];
|
|
2959
2959
|
case 1:
|
|
2960
2960
|
localVarAxiosArgs = _d.sent();
|
|
2961
2961
|
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2962
|
-
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.
|
|
2962
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.generateAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2963
2963
|
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2964
2964
|
}
|
|
2965
2965
|
});
|
|
@@ -2972,17 +2972,17 @@ var GeneratorApiFp = function (configuration) {
|
|
|
2972
2972
|
* @param {*} [options] Override http request option.
|
|
2973
2973
|
* @throws {RequiredError}
|
|
2974
2974
|
*/
|
|
2975
|
-
|
|
2975
|
+
getGenerationHistory: function (projectId, options) {
|
|
2976
2976
|
return __awaiter(this, void 0, void 0, function () {
|
|
2977
2977
|
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2978
2978
|
var _a, _b, _c;
|
|
2979
2979
|
return __generator(this, function (_d) {
|
|
2980
2980
|
switch (_d.label) {
|
|
2981
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.
|
|
2981
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGenerationHistory(projectId, options)];
|
|
2982
2982
|
case 1:
|
|
2983
2983
|
localVarAxiosArgs = _d.sent();
|
|
2984
2984
|
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2985
|
-
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.
|
|
2985
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.getGenerationHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2986
2986
|
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2987
2987
|
}
|
|
2988
2988
|
});
|
|
@@ -2995,17 +2995,17 @@ var GeneratorApiFp = function (configuration) {
|
|
|
2995
2995
|
* @param {*} [options] Override http request option.
|
|
2996
2996
|
* @throws {RequiredError}
|
|
2997
2997
|
*/
|
|
2998
|
-
|
|
2998
|
+
getGenerations: function (limit, options) {
|
|
2999
2999
|
return __awaiter(this, void 0, void 0, function () {
|
|
3000
3000
|
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3001
3001
|
var _a, _b, _c;
|
|
3002
3002
|
return __generator(this, function (_d) {
|
|
3003
3003
|
switch (_d.label) {
|
|
3004
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.
|
|
3004
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGenerations(limit, options)];
|
|
3005
3005
|
case 1:
|
|
3006
3006
|
localVarAxiosArgs = _d.sent();
|
|
3007
3007
|
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3008
|
-
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.
|
|
3008
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.getGenerations']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3009
3009
|
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3010
3010
|
}
|
|
3011
3011
|
});
|
|
@@ -3028,8 +3028,8 @@ var GeneratorApiFactory = function (configuration, basePath, axios) {
|
|
|
3028
3028
|
* @param {*} [options] Override http request option.
|
|
3029
3029
|
* @throws {RequiredError}
|
|
3030
3030
|
*/
|
|
3031
|
-
|
|
3032
|
-
return localVarFp.
|
|
3031
|
+
generateAgent: function (agentGenerateRequest, options) {
|
|
3032
|
+
return localVarFp.generateAgent(agentGenerateRequest, options).then(function (request) { return request(axios, basePath); });
|
|
3033
3033
|
},
|
|
3034
3034
|
/**
|
|
3035
3035
|
* 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
|
|
@@ -3038,8 +3038,8 @@ var GeneratorApiFactory = function (configuration, basePath, axios) {
|
|
|
3038
3038
|
* @param {*} [options] Override http request option.
|
|
3039
3039
|
* @throws {RequiredError}
|
|
3040
3040
|
*/
|
|
3041
|
-
|
|
3042
|
-
return localVarFp.
|
|
3041
|
+
getGenerationHistory: function (projectId, options) {
|
|
3042
|
+
return localVarFp.getGenerationHistory(projectId, options).then(function (request) { return request(axios, basePath); });
|
|
3043
3043
|
},
|
|
3044
3044
|
/**
|
|
3045
3045
|
* 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
|
|
@@ -3048,8 +3048,8 @@ var GeneratorApiFactory = function (configuration, basePath, axios) {
|
|
|
3048
3048
|
* @param {*} [options] Override http request option.
|
|
3049
3049
|
* @throws {RequiredError}
|
|
3050
3050
|
*/
|
|
3051
|
-
|
|
3052
|
-
return localVarFp.
|
|
3051
|
+
getGenerations: function (limit, options) {
|
|
3052
|
+
return localVarFp.getGenerations(limit, options).then(function (request) { return request(axios, basePath); });
|
|
3053
3053
|
},
|
|
3054
3054
|
};
|
|
3055
3055
|
};
|
|
@@ -3073,9 +3073,9 @@ var GeneratorApi = /** @class */ (function (_super) {
|
|
|
3073
3073
|
* @throws {RequiredError}
|
|
3074
3074
|
* @memberof GeneratorApi
|
|
3075
3075
|
*/
|
|
3076
|
-
GeneratorApi.prototype.
|
|
3076
|
+
GeneratorApi.prototype.generateAgent = function (agentGenerateRequest, options) {
|
|
3077
3077
|
var _this = this;
|
|
3078
|
-
return (0, exports.GeneratorApiFp)(this.configuration).
|
|
3078
|
+
return (0, exports.GeneratorApiFp)(this.configuration).generateAgent(agentGenerateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3079
3079
|
};
|
|
3080
3080
|
/**
|
|
3081
3081
|
* 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
|
|
@@ -3085,9 +3085,9 @@ var GeneratorApi = /** @class */ (function (_super) {
|
|
|
3085
3085
|
* @throws {RequiredError}
|
|
3086
3086
|
* @memberof GeneratorApi
|
|
3087
3087
|
*/
|
|
3088
|
-
GeneratorApi.prototype.
|
|
3088
|
+
GeneratorApi.prototype.getGenerationHistory = function (projectId, options) {
|
|
3089
3089
|
var _this = this;
|
|
3090
|
-
return (0, exports.GeneratorApiFp)(this.configuration).
|
|
3090
|
+
return (0, exports.GeneratorApiFp)(this.configuration).getGenerationHistory(projectId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3091
3091
|
};
|
|
3092
3092
|
/**
|
|
3093
3093
|
* 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
|
|
@@ -3097,9 +3097,9 @@ var GeneratorApi = /** @class */ (function (_super) {
|
|
|
3097
3097
|
* @throws {RequiredError}
|
|
3098
3098
|
* @memberof GeneratorApi
|
|
3099
3099
|
*/
|
|
3100
|
-
GeneratorApi.prototype.
|
|
3100
|
+
GeneratorApi.prototype.getGenerations = function (limit, options) {
|
|
3101
3101
|
var _this = this;
|
|
3102
|
-
return (0, exports.GeneratorApiFp)(this.configuration).
|
|
3102
|
+
return (0, exports.GeneratorApiFp)(this.configuration).getGenerations(limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3103
3103
|
};
|
|
3104
3104
|
return GeneratorApi;
|
|
3105
3105
|
}(base_1.BaseAPI));
|
|
@@ -3670,6 +3670,345 @@ var MetadataApi = /** @class */ (function (_super) {
|
|
|
3670
3670
|
return MetadataApi;
|
|
3671
3671
|
}(base_1.BaseAPI));
|
|
3672
3672
|
exports.MetadataApi = MetadataApi;
|
|
3673
|
+
/**
|
|
3674
|
+
* OAuthApi - axios parameter creator
|
|
3675
|
+
* @export
|
|
3676
|
+
*/
|
|
3677
|
+
var OAuthApiAxiosParamCreator = function (configuration) {
|
|
3678
|
+
var _this = this;
|
|
3679
|
+
return {
|
|
3680
|
+
/**
|
|
3681
|
+
* 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
|
|
3682
|
+
* @summary Get Twitter Auth Url
|
|
3683
|
+
* @param {string} agentId
|
|
3684
|
+
* @param {string} redirectUri
|
|
3685
|
+
* @param {*} [options] Override http request option.
|
|
3686
|
+
* @throws {RequiredError}
|
|
3687
|
+
*/
|
|
3688
|
+
getTwitterAuthUrl: function (agentId_1, redirectUri_1) {
|
|
3689
|
+
var args_1 = [];
|
|
3690
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
3691
|
+
args_1[_i - 2] = arguments[_i];
|
|
3692
|
+
}
|
|
3693
|
+
return __awaiter(_this, __spreadArray([agentId_1, redirectUri_1], args_1, true), void 0, function (agentId, redirectUri, options) {
|
|
3694
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
3695
|
+
if (options === void 0) { options = {}; }
|
|
3696
|
+
return __generator(this, function (_a) {
|
|
3697
|
+
switch (_a.label) {
|
|
3698
|
+
case 0:
|
|
3699
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
3700
|
+
(0, common_1.assertParamExists)('getTwitterAuthUrl', 'agentId', agentId);
|
|
3701
|
+
// verify required parameter 'redirectUri' is not null or undefined
|
|
3702
|
+
(0, common_1.assertParamExists)('getTwitterAuthUrl', 'redirectUri', redirectUri);
|
|
3703
|
+
localVarPath = "/oauth/twitter";
|
|
3704
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3705
|
+
if (configuration) {
|
|
3706
|
+
baseOptions = configuration.baseOptions;
|
|
3707
|
+
}
|
|
3708
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
3709
|
+
localVarHeaderParameter = {};
|
|
3710
|
+
localVarQueryParameter = {};
|
|
3711
|
+
// authentication HTTPBearer required
|
|
3712
|
+
// http bearer authentication required
|
|
3713
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
3714
|
+
case 1:
|
|
3715
|
+
// authentication HTTPBearer required
|
|
3716
|
+
// http bearer authentication required
|
|
3717
|
+
_a.sent();
|
|
3718
|
+
if (agentId !== undefined) {
|
|
3719
|
+
localVarQueryParameter['agent_id'] = agentId;
|
|
3720
|
+
}
|
|
3721
|
+
if (redirectUri !== undefined) {
|
|
3722
|
+
localVarQueryParameter['redirect_uri'] = redirectUri;
|
|
3723
|
+
}
|
|
3724
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3725
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3726
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3727
|
+
return [2 /*return*/, {
|
|
3728
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3729
|
+
options: localVarRequestOptions,
|
|
3730
|
+
}];
|
|
3731
|
+
}
|
|
3732
|
+
});
|
|
3733
|
+
});
|
|
3734
|
+
},
|
|
3735
|
+
/**
|
|
3736
|
+
* 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
|
|
3737
|
+
* @summary Twitter Oauth Callback
|
|
3738
|
+
* @param {string} state
|
|
3739
|
+
* @param {string | null} [code]
|
|
3740
|
+
* @param {string | null} [error]
|
|
3741
|
+
* @param {*} [options] Override http request option.
|
|
3742
|
+
* @throws {RequiredError}
|
|
3743
|
+
*/
|
|
3744
|
+
twitterOauthCallback: function (state_1, code_1, error_1) {
|
|
3745
|
+
var args_1 = [];
|
|
3746
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
3747
|
+
args_1[_i - 3] = arguments[_i];
|
|
3748
|
+
}
|
|
3749
|
+
return __awaiter(_this, __spreadArray([state_1, code_1, error_1], args_1, true), void 0, function (state, code, error, options) {
|
|
3750
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
3751
|
+
if (options === void 0) { options = {}; }
|
|
3752
|
+
return __generator(this, function (_a) {
|
|
3753
|
+
// verify required parameter 'state' is not null or undefined
|
|
3754
|
+
(0, common_1.assertParamExists)('twitterOauthCallback', 'state', state);
|
|
3755
|
+
localVarPath = "/oauth/twitter/callback";
|
|
3756
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3757
|
+
if (configuration) {
|
|
3758
|
+
baseOptions = configuration.baseOptions;
|
|
3759
|
+
}
|
|
3760
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
3761
|
+
localVarHeaderParameter = {};
|
|
3762
|
+
localVarQueryParameter = {};
|
|
3763
|
+
if (state !== undefined) {
|
|
3764
|
+
localVarQueryParameter['state'] = state;
|
|
3765
|
+
}
|
|
3766
|
+
if (code !== undefined) {
|
|
3767
|
+
localVarQueryParameter['code'] = code;
|
|
3768
|
+
}
|
|
3769
|
+
if (error !== undefined) {
|
|
3770
|
+
localVarQueryParameter['error'] = error;
|
|
3771
|
+
}
|
|
3772
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3773
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3774
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3775
|
+
return [2 /*return*/, {
|
|
3776
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3777
|
+
options: localVarRequestOptions,
|
|
3778
|
+
}];
|
|
3779
|
+
});
|
|
3780
|
+
});
|
|
3781
|
+
},
|
|
3782
|
+
/**
|
|
3783
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
3784
|
+
* @summary Unlink Twitter Endpoint
|
|
3785
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
3786
|
+
* @param {*} [options] Override http request option.
|
|
3787
|
+
* @throws {RequiredError}
|
|
3788
|
+
*/
|
|
3789
|
+
unlinkTwitter: function (agentId_1) {
|
|
3790
|
+
var args_1 = [];
|
|
3791
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
3792
|
+
args_1[_i - 1] = arguments[_i];
|
|
3793
|
+
}
|
|
3794
|
+
return __awaiter(_this, __spreadArray([agentId_1], args_1, true), void 0, function (agentId, options) {
|
|
3795
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
3796
|
+
if (options === void 0) { options = {}; }
|
|
3797
|
+
return __generator(this, function (_a) {
|
|
3798
|
+
switch (_a.label) {
|
|
3799
|
+
case 0:
|
|
3800
|
+
// verify required parameter 'agentId' is not null or undefined
|
|
3801
|
+
(0, common_1.assertParamExists)('unlinkTwitter', 'agentId', agentId);
|
|
3802
|
+
localVarPath = "/oauth/twitter/unlink";
|
|
3803
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3804
|
+
if (configuration) {
|
|
3805
|
+
baseOptions = configuration.baseOptions;
|
|
3806
|
+
}
|
|
3807
|
+
localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
|
|
3808
|
+
localVarHeaderParameter = {};
|
|
3809
|
+
localVarQueryParameter = {};
|
|
3810
|
+
// authentication HTTPBearer required
|
|
3811
|
+
// http bearer authentication required
|
|
3812
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
3813
|
+
case 1:
|
|
3814
|
+
// authentication HTTPBearer required
|
|
3815
|
+
// http bearer authentication required
|
|
3816
|
+
_a.sent();
|
|
3817
|
+
if (agentId !== undefined) {
|
|
3818
|
+
localVarQueryParameter['agent_id'] = agentId;
|
|
3819
|
+
}
|
|
3820
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3821
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3822
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3823
|
+
return [2 /*return*/, {
|
|
3824
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3825
|
+
options: localVarRequestOptions,
|
|
3826
|
+
}];
|
|
3827
|
+
}
|
|
3828
|
+
});
|
|
3829
|
+
});
|
|
3830
|
+
},
|
|
3831
|
+
};
|
|
3832
|
+
};
|
|
3833
|
+
exports.OAuthApiAxiosParamCreator = OAuthApiAxiosParamCreator;
|
|
3834
|
+
/**
|
|
3835
|
+
* OAuthApi - functional programming interface
|
|
3836
|
+
* @export
|
|
3837
|
+
*/
|
|
3838
|
+
var OAuthApiFp = function (configuration) {
|
|
3839
|
+
var localVarAxiosParamCreator = (0, exports.OAuthApiAxiosParamCreator)(configuration);
|
|
3840
|
+
return {
|
|
3841
|
+
/**
|
|
3842
|
+
* 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
|
|
3843
|
+
* @summary Get Twitter Auth Url
|
|
3844
|
+
* @param {string} agentId
|
|
3845
|
+
* @param {string} redirectUri
|
|
3846
|
+
* @param {*} [options] Override http request option.
|
|
3847
|
+
* @throws {RequiredError}
|
|
3848
|
+
*/
|
|
3849
|
+
getTwitterAuthUrl: function (agentId, redirectUri, options) {
|
|
3850
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3851
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3852
|
+
var _a, _b, _c;
|
|
3853
|
+
return __generator(this, function (_d) {
|
|
3854
|
+
switch (_d.label) {
|
|
3855
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getTwitterAuthUrl(agentId, redirectUri, options)];
|
|
3856
|
+
case 1:
|
|
3857
|
+
localVarAxiosArgs = _d.sent();
|
|
3858
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3859
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OAuthApi.getTwitterAuthUrl']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3860
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3861
|
+
}
|
|
3862
|
+
});
|
|
3863
|
+
});
|
|
3864
|
+
},
|
|
3865
|
+
/**
|
|
3866
|
+
* 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
|
|
3867
|
+
* @summary Twitter Oauth Callback
|
|
3868
|
+
* @param {string} state
|
|
3869
|
+
* @param {string | null} [code]
|
|
3870
|
+
* @param {string | null} [error]
|
|
3871
|
+
* @param {*} [options] Override http request option.
|
|
3872
|
+
* @throws {RequiredError}
|
|
3873
|
+
*/
|
|
3874
|
+
twitterOauthCallback: function (state, code, error, options) {
|
|
3875
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3876
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3877
|
+
var _a, _b, _c;
|
|
3878
|
+
return __generator(this, function (_d) {
|
|
3879
|
+
switch (_d.label) {
|
|
3880
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.twitterOauthCallback(state, code, error, options)];
|
|
3881
|
+
case 1:
|
|
3882
|
+
localVarAxiosArgs = _d.sent();
|
|
3883
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3884
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OAuthApi.twitterOauthCallback']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3885
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3886
|
+
}
|
|
3887
|
+
});
|
|
3888
|
+
});
|
|
3889
|
+
},
|
|
3890
|
+
/**
|
|
3891
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
3892
|
+
* @summary Unlink Twitter Endpoint
|
|
3893
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
3894
|
+
* @param {*} [options] Override http request option.
|
|
3895
|
+
* @throws {RequiredError}
|
|
3896
|
+
*/
|
|
3897
|
+
unlinkTwitter: function (agentId, options) {
|
|
3898
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3899
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3900
|
+
var _a, _b, _c;
|
|
3901
|
+
return __generator(this, function (_d) {
|
|
3902
|
+
switch (_d.label) {
|
|
3903
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.unlinkTwitter(agentId, options)];
|
|
3904
|
+
case 1:
|
|
3905
|
+
localVarAxiosArgs = _d.sent();
|
|
3906
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3907
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OAuthApi.unlinkTwitter']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3908
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3909
|
+
}
|
|
3910
|
+
});
|
|
3911
|
+
});
|
|
3912
|
+
},
|
|
3913
|
+
};
|
|
3914
|
+
};
|
|
3915
|
+
exports.OAuthApiFp = OAuthApiFp;
|
|
3916
|
+
/**
|
|
3917
|
+
* OAuthApi - factory interface
|
|
3918
|
+
* @export
|
|
3919
|
+
*/
|
|
3920
|
+
var OAuthApiFactory = function (configuration, basePath, axios) {
|
|
3921
|
+
var localVarFp = (0, exports.OAuthApiFp)(configuration);
|
|
3922
|
+
return {
|
|
3923
|
+
/**
|
|
3924
|
+
* 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
|
|
3925
|
+
* @summary Get Twitter Auth Url
|
|
3926
|
+
* @param {string} agentId
|
|
3927
|
+
* @param {string} redirectUri
|
|
3928
|
+
* @param {*} [options] Override http request option.
|
|
3929
|
+
* @throws {RequiredError}
|
|
3930
|
+
*/
|
|
3931
|
+
getTwitterAuthUrl: function (agentId, redirectUri, options) {
|
|
3932
|
+
return localVarFp.getTwitterAuthUrl(agentId, redirectUri, options).then(function (request) { return request(axios, basePath); });
|
|
3933
|
+
},
|
|
3934
|
+
/**
|
|
3935
|
+
* 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
|
|
3936
|
+
* @summary Twitter Oauth Callback
|
|
3937
|
+
* @param {string} state
|
|
3938
|
+
* @param {string | null} [code]
|
|
3939
|
+
* @param {string | null} [error]
|
|
3940
|
+
* @param {*} [options] Override http request option.
|
|
3941
|
+
* @throws {RequiredError}
|
|
3942
|
+
*/
|
|
3943
|
+
twitterOauthCallback: function (state, code, error, options) {
|
|
3944
|
+
return localVarFp.twitterOauthCallback(state, code, error, options).then(function (request) { return request(axios, basePath); });
|
|
3945
|
+
},
|
|
3946
|
+
/**
|
|
3947
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
3948
|
+
* @summary Unlink Twitter Endpoint
|
|
3949
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
3950
|
+
* @param {*} [options] Override http request option.
|
|
3951
|
+
* @throws {RequiredError}
|
|
3952
|
+
*/
|
|
3953
|
+
unlinkTwitter: function (agentId, options) {
|
|
3954
|
+
return localVarFp.unlinkTwitter(agentId, options).then(function (request) { return request(axios, basePath); });
|
|
3955
|
+
},
|
|
3956
|
+
};
|
|
3957
|
+
};
|
|
3958
|
+
exports.OAuthApiFactory = OAuthApiFactory;
|
|
3959
|
+
/**
|
|
3960
|
+
* OAuthApi - object-oriented interface
|
|
3961
|
+
* @export
|
|
3962
|
+
* @class OAuthApi
|
|
3963
|
+
* @extends {BaseAPI}
|
|
3964
|
+
*/
|
|
3965
|
+
var OAuthApi = /** @class */ (function (_super) {
|
|
3966
|
+
__extends(OAuthApi, _super);
|
|
3967
|
+
function OAuthApi() {
|
|
3968
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3969
|
+
}
|
|
3970
|
+
/**
|
|
3971
|
+
* 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
|
|
3972
|
+
* @summary Get Twitter Auth Url
|
|
3973
|
+
* @param {string} agentId
|
|
3974
|
+
* @param {string} redirectUri
|
|
3975
|
+
* @param {*} [options] Override http request option.
|
|
3976
|
+
* @throws {RequiredError}
|
|
3977
|
+
* @memberof OAuthApi
|
|
3978
|
+
*/
|
|
3979
|
+
OAuthApi.prototype.getTwitterAuthUrl = function (agentId, redirectUri, options) {
|
|
3980
|
+
var _this = this;
|
|
3981
|
+
return (0, exports.OAuthApiFp)(this.configuration).getTwitterAuthUrl(agentId, redirectUri, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3982
|
+
};
|
|
3983
|
+
/**
|
|
3984
|
+
* 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
|
|
3985
|
+
* @summary Twitter Oauth Callback
|
|
3986
|
+
* @param {string} state
|
|
3987
|
+
* @param {string | null} [code]
|
|
3988
|
+
* @param {string | null} [error]
|
|
3989
|
+
* @param {*} [options] Override http request option.
|
|
3990
|
+
* @throws {RequiredError}
|
|
3991
|
+
* @memberof OAuthApi
|
|
3992
|
+
*/
|
|
3993
|
+
OAuthApi.prototype.twitterOauthCallback = function (state, code, error, options) {
|
|
3994
|
+
var _this = this;
|
|
3995
|
+
return (0, exports.OAuthApiFp)(this.configuration).twitterOauthCallback(state, code, error, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3996
|
+
};
|
|
3997
|
+
/**
|
|
3998
|
+
* Unlink X from an agent. **Path Parameters:** * `agent_id` - ID of the agent to unlink from X **Raises:** * `HTTPException`: - 404: Agent not found
|
|
3999
|
+
* @summary Unlink Twitter Endpoint
|
|
4000
|
+
* @param {string} agentId ID of the agent to unlink from X
|
|
4001
|
+
* @param {*} [options] Override http request option.
|
|
4002
|
+
* @throws {RequiredError}
|
|
4003
|
+
* @memberof OAuthApi
|
|
4004
|
+
*/
|
|
4005
|
+
OAuthApi.prototype.unlinkTwitter = function (agentId, options) {
|
|
4006
|
+
var _this = this;
|
|
4007
|
+
return (0, exports.OAuthApiFp)(this.configuration).unlinkTwitter(agentId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
4008
|
+
};
|
|
4009
|
+
return OAuthApi;
|
|
4010
|
+
}(base_1.BaseAPI));
|
|
4011
|
+
exports.OAuthApi = OAuthApi;
|
|
3673
4012
|
/**
|
|
3674
4013
|
* UserApi - axios parameter creator
|
|
3675
4014
|
* @export
|