@crestal/nation-sdk 0.8.56 → 0.8.58
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 +0 -1
- package/README.md +2 -3
- package/api.ts +58 -71
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +45 -63
- package/dist/api.js +41 -39
- 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 +10 -10
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/docs/X402Api.md +4 -8
- package/index.ts +1 -1
- package/package.json +1 -1
- package/docs/X402MessageRequest.md +0 -31
package/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.58
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -330,7 +330,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
330
330
|
/**
|
|
331
331
|
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Agent limit reached, invalid agent ID format, or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
332
332
|
* @summary Create Agent
|
|
333
|
-
* @param {AgentUpdate}
|
|
333
|
+
* @param {AgentUpdate} agentUpdate
|
|
334
334
|
* @param {*} [options] Override http request option.
|
|
335
335
|
* @throws {RequiredError}
|
|
336
336
|
*/
|
|
@@ -345,6 +345,8 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
345
345
|
return __generator(this, function (_a) {
|
|
346
346
|
switch (_a.label) {
|
|
347
347
|
case 0:
|
|
348
|
+
// verify required parameter 'agentUpdate' is not null or undefined
|
|
349
|
+
(0, common_1.assertParamExists)('createAgent', 'agentUpdate', agentUpdate);
|
|
348
350
|
localVarPath = "/agents";
|
|
349
351
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
350
352
|
if (configuration) {
|
|
@@ -817,7 +819,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
817
819
|
* 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:** * `data` - 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
|
|
818
820
|
* @summary Override Agent
|
|
819
821
|
* @param {string} agentId ID of the agent to update
|
|
820
|
-
* @param {AgentUpdate}
|
|
822
|
+
* @param {AgentUpdate} agentUpdate
|
|
821
823
|
* @param {*} [options] Override http request option.
|
|
822
824
|
* @throws {RequiredError}
|
|
823
825
|
*/
|
|
@@ -834,6 +836,8 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
834
836
|
case 0:
|
|
835
837
|
// verify required parameter 'agentId' is not null or undefined
|
|
836
838
|
(0, common_1.assertParamExists)('overrideAgent', 'agentId', agentId);
|
|
839
|
+
// verify required parameter 'agentUpdate' is not null or undefined
|
|
840
|
+
(0, common_1.assertParamExists)('overrideAgent', 'agentUpdate', agentUpdate);
|
|
837
841
|
localVarPath = "/agents/{agent_id}"
|
|
838
842
|
.replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
|
|
839
843
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -867,7 +871,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
867
871
|
* Override agent public information with the provided values.
|
|
868
872
|
* @summary Override Agent Public Information
|
|
869
873
|
* @param {string} agentId ID of the agent to update
|
|
870
|
-
* @param {AgentPublicInfo}
|
|
874
|
+
* @param {AgentPublicInfo} agentPublicInfo
|
|
871
875
|
* @param {*} [options] Override http request option.
|
|
872
876
|
* @throws {RequiredError}
|
|
873
877
|
*/
|
|
@@ -884,6 +888,8 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
884
888
|
case 0:
|
|
885
889
|
// verify required parameter 'agentId' is not null or undefined
|
|
886
890
|
(0, common_1.assertParamExists)('overrideAgentPublicInfo', 'agentId', agentId);
|
|
891
|
+
// verify required parameter 'agentPublicInfo' is not null or undefined
|
|
892
|
+
(0, common_1.assertParamExists)('overrideAgentPublicInfo', 'agentPublicInfo', agentPublicInfo);
|
|
887
893
|
localVarPath = "/agents/{agent_id}/public-info"
|
|
888
894
|
.replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
|
|
889
895
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -1057,7 +1063,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
1057
1063
|
/**
|
|
1058
1064
|
* 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
|
|
1059
1065
|
* @summary Validate Agent Create
|
|
1060
|
-
* @param {AgentUpdate}
|
|
1066
|
+
* @param {AgentUpdate} agentUpdate
|
|
1061
1067
|
* @param {*} [options] Override http request option.
|
|
1062
1068
|
* @throws {RequiredError}
|
|
1063
1069
|
*/
|
|
@@ -1072,6 +1078,8 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
1072
1078
|
return __generator(this, function (_a) {
|
|
1073
1079
|
switch (_a.label) {
|
|
1074
1080
|
case 0:
|
|
1081
|
+
// verify required parameter 'agentUpdate' is not null or undefined
|
|
1082
|
+
(0, common_1.assertParamExists)('validateAgentCreate', 'agentUpdate', agentUpdate);
|
|
1075
1083
|
localVarPath = "/agent/validate";
|
|
1076
1084
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1077
1085
|
if (configuration) {
|
|
@@ -1104,7 +1112,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
1104
1112
|
* 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
|
|
1105
1113
|
* @summary Validate Agent Update
|
|
1106
1114
|
* @param {string} agentId Agent ID
|
|
1107
|
-
* @param {AgentUpdate}
|
|
1115
|
+
* @param {AgentUpdate} agentUpdate
|
|
1108
1116
|
* @param {*} [options] Override http request option.
|
|
1109
1117
|
* @throws {RequiredError}
|
|
1110
1118
|
*/
|
|
@@ -1121,6 +1129,8 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
1121
1129
|
case 0:
|
|
1122
1130
|
// verify required parameter 'agentId' is not null or undefined
|
|
1123
1131
|
(0, common_1.assertParamExists)('validateAgentUpdate', 'agentId', agentId);
|
|
1132
|
+
// verify required parameter 'agentUpdate' is not null or undefined
|
|
1133
|
+
(0, common_1.assertParamExists)('validateAgentUpdate', 'agentUpdate', agentUpdate);
|
|
1124
1134
|
localVarPath = "/agents/{agent_id}/validate"
|
|
1125
1135
|
.replace("{".concat("agent_id", "}"), encodeURIComponent(String(agentId)));
|
|
1126
1136
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -1162,7 +1172,7 @@ var AgentApiFp = function (configuration) {
|
|
|
1162
1172
|
/**
|
|
1163
1173
|
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Agent limit reached, invalid agent ID format, or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
1164
1174
|
* @summary Create Agent
|
|
1165
|
-
* @param {AgentUpdate}
|
|
1175
|
+
* @param {AgentUpdate} agentUpdate
|
|
1166
1176
|
* @param {*} [options] Override http request option.
|
|
1167
1177
|
* @throws {RequiredError}
|
|
1168
1178
|
*/
|
|
@@ -1401,7 +1411,7 @@ var AgentApiFp = function (configuration) {
|
|
|
1401
1411
|
* 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:** * `data` - 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
|
|
1402
1412
|
* @summary Override Agent
|
|
1403
1413
|
* @param {string} agentId ID of the agent to update
|
|
1404
|
-
* @param {AgentUpdate}
|
|
1414
|
+
* @param {AgentUpdate} agentUpdate
|
|
1405
1415
|
* @param {*} [options] Override http request option.
|
|
1406
1416
|
* @throws {RequiredError}
|
|
1407
1417
|
*/
|
|
@@ -1425,7 +1435,7 @@ var AgentApiFp = function (configuration) {
|
|
|
1425
1435
|
* Override agent public information with the provided values.
|
|
1426
1436
|
* @summary Override Agent Public Information
|
|
1427
1437
|
* @param {string} agentId ID of the agent to update
|
|
1428
|
-
* @param {AgentPublicInfo}
|
|
1438
|
+
* @param {AgentPublicInfo} agentPublicInfo
|
|
1429
1439
|
* @param {*} [options] Override http request option.
|
|
1430
1440
|
* @throws {RequiredError}
|
|
1431
1441
|
*/
|
|
@@ -1517,7 +1527,7 @@ var AgentApiFp = function (configuration) {
|
|
|
1517
1527
|
/**
|
|
1518
1528
|
* 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
|
|
1519
1529
|
* @summary Validate Agent Create
|
|
1520
|
-
* @param {AgentUpdate}
|
|
1530
|
+
* @param {AgentUpdate} agentUpdate
|
|
1521
1531
|
* @param {*} [options] Override http request option.
|
|
1522
1532
|
* @throws {RequiredError}
|
|
1523
1533
|
*/
|
|
@@ -1541,7 +1551,7 @@ var AgentApiFp = function (configuration) {
|
|
|
1541
1551
|
* 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
|
|
1542
1552
|
* @summary Validate Agent Update
|
|
1543
1553
|
* @param {string} agentId Agent ID
|
|
1544
|
-
* @param {AgentUpdate}
|
|
1554
|
+
* @param {AgentUpdate} agentUpdate
|
|
1545
1555
|
* @param {*} [options] Override http request option.
|
|
1546
1556
|
* @throws {RequiredError}
|
|
1547
1557
|
*/
|
|
@@ -1573,7 +1583,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1573
1583
|
/**
|
|
1574
1584
|
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Agent limit reached, invalid agent ID format, or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
1575
1585
|
* @summary Create Agent
|
|
1576
|
-
* @param {AgentUpdate}
|
|
1586
|
+
* @param {AgentUpdate} agentUpdate
|
|
1577
1587
|
* @param {*} [options] Override http request option.
|
|
1578
1588
|
* @throws {RequiredError}
|
|
1579
1589
|
*/
|
|
@@ -1682,7 +1692,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1682
1692
|
* 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:** * `data` - 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
|
|
1683
1693
|
* @summary Override Agent
|
|
1684
1694
|
* @param {string} agentId ID of the agent to update
|
|
1685
|
-
* @param {AgentUpdate}
|
|
1695
|
+
* @param {AgentUpdate} agentUpdate
|
|
1686
1696
|
* @param {*} [options] Override http request option.
|
|
1687
1697
|
* @throws {RequiredError}
|
|
1688
1698
|
*/
|
|
@@ -1693,7 +1703,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1693
1703
|
* Override agent public information with the provided values.
|
|
1694
1704
|
* @summary Override Agent Public Information
|
|
1695
1705
|
* @param {string} agentId ID of the agent to update
|
|
1696
|
-
* @param {AgentPublicInfo}
|
|
1706
|
+
* @param {AgentPublicInfo} agentPublicInfo
|
|
1697
1707
|
* @param {*} [options] Override http request option.
|
|
1698
1708
|
* @throws {RequiredError}
|
|
1699
1709
|
*/
|
|
@@ -1733,7 +1743,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1733
1743
|
/**
|
|
1734
1744
|
* 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
|
|
1735
1745
|
* @summary Validate Agent Create
|
|
1736
|
-
* @param {AgentUpdate}
|
|
1746
|
+
* @param {AgentUpdate} agentUpdate
|
|
1737
1747
|
* @param {*} [options] Override http request option.
|
|
1738
1748
|
* @throws {RequiredError}
|
|
1739
1749
|
*/
|
|
@@ -1744,7 +1754,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1744
1754
|
* 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
|
|
1745
1755
|
* @summary Validate Agent Update
|
|
1746
1756
|
* @param {string} agentId Agent ID
|
|
1747
|
-
* @param {AgentUpdate}
|
|
1757
|
+
* @param {AgentUpdate} agentUpdate
|
|
1748
1758
|
* @param {*} [options] Override http request option.
|
|
1749
1759
|
* @throws {RequiredError}
|
|
1750
1760
|
*/
|
|
@@ -1765,7 +1775,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1765
1775
|
/**
|
|
1766
1776
|
* Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Agent limit reached, invalid agent ID format, or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
1767
1777
|
* @summary Create Agent
|
|
1768
|
-
* @param {AgentUpdate}
|
|
1778
|
+
* @param {AgentUpdate} agentUpdate
|
|
1769
1779
|
* @param {*} [options] Override http request option.
|
|
1770
1780
|
* @throws {RequiredError}
|
|
1771
1781
|
*/
|
|
@@ -1884,7 +1894,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1884
1894
|
* 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:** * `data` - 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
|
|
1885
1895
|
* @summary Override Agent
|
|
1886
1896
|
* @param {string} agentId ID of the agent to update
|
|
1887
|
-
* @param {AgentUpdate}
|
|
1897
|
+
* @param {AgentUpdate} agentUpdate
|
|
1888
1898
|
* @param {*} [options] Override http request option.
|
|
1889
1899
|
* @throws {RequiredError}
|
|
1890
1900
|
*/
|
|
@@ -1896,7 +1906,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1896
1906
|
* Override agent public information with the provided values.
|
|
1897
1907
|
* @summary Override Agent Public Information
|
|
1898
1908
|
* @param {string} agentId ID of the agent to update
|
|
1899
|
-
* @param {AgentPublicInfo}
|
|
1909
|
+
* @param {AgentPublicInfo} agentPublicInfo
|
|
1900
1910
|
* @param {*} [options] Override http request option.
|
|
1901
1911
|
* @throws {RequiredError}
|
|
1902
1912
|
*/
|
|
@@ -1940,7 +1950,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1940
1950
|
/**
|
|
1941
1951
|
* 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
|
|
1942
1952
|
* @summary Validate Agent Create
|
|
1943
|
-
* @param {AgentUpdate}
|
|
1953
|
+
* @param {AgentUpdate} agentUpdate
|
|
1944
1954
|
* @param {*} [options] Override http request option.
|
|
1945
1955
|
* @throws {RequiredError}
|
|
1946
1956
|
*/
|
|
@@ -1952,7 +1962,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1952
1962
|
* 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
|
|
1953
1963
|
* @summary Validate Agent Update
|
|
1954
1964
|
* @param {string} agentId Agent ID
|
|
1955
|
-
* @param {AgentUpdate}
|
|
1965
|
+
* @param {AgentUpdate} agentUpdate
|
|
1956
1966
|
* @param {*} [options] Override http request option.
|
|
1957
1967
|
* @throws {RequiredError}
|
|
1958
1968
|
*/
|
|
@@ -6508,23 +6518,20 @@ var X402ApiAxiosParamCreator = function (configuration) {
|
|
|
6508
6518
|
* Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. The last message is the agent\'s final response.
|
|
6509
6519
|
* @summary Chat by x402
|
|
6510
6520
|
* @param {string} aid Agent ID
|
|
6511
|
-
* @param {X402MessageRequest} x402MessageRequest
|
|
6512
6521
|
* @param {*} [options] Override http request option.
|
|
6513
6522
|
* @throws {RequiredError}
|
|
6514
6523
|
*/
|
|
6515
|
-
chatByX402: function (aid_1
|
|
6524
|
+
chatByX402: function (aid_1) {
|
|
6516
6525
|
var args_1 = [];
|
|
6517
|
-
for (var _i =
|
|
6518
|
-
args_1[_i -
|
|
6526
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
6527
|
+
args_1[_i - 1] = arguments[_i];
|
|
6519
6528
|
}
|
|
6520
|
-
return __awaiter(_this, __spreadArray([aid_1
|
|
6529
|
+
return __awaiter(_this, __spreadArray([aid_1], args_1, true), void 0, function (aid, options) {
|
|
6521
6530
|
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
6522
6531
|
if (options === void 0) { options = {}; }
|
|
6523
6532
|
return __generator(this, function (_a) {
|
|
6524
6533
|
// verify required parameter 'aid' is not null or undefined
|
|
6525
6534
|
(0, common_1.assertParamExists)('chatByX402', 'aid', aid);
|
|
6526
|
-
// verify required parameter 'x402MessageRequest' is not null or undefined
|
|
6527
|
-
(0, common_1.assertParamExists)('chatByX402', 'x402MessageRequest', x402MessageRequest);
|
|
6528
6535
|
localVarPath = "/x/{aid}"
|
|
6529
6536
|
.replace("{".concat("aid", "}"), encodeURIComponent(String(aid)));
|
|
6530
6537
|
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -6534,11 +6541,9 @@ var X402ApiAxiosParamCreator = function (configuration) {
|
|
|
6534
6541
|
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
6535
6542
|
localVarHeaderParameter = {};
|
|
6536
6543
|
localVarQueryParameter = {};
|
|
6537
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
6538
6544
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
6539
6545
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
6540
6546
|
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
6541
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(x402MessageRequest, localVarRequestOptions, configuration);
|
|
6542
6547
|
return [2 /*return*/, {
|
|
6543
6548
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
6544
6549
|
options: localVarRequestOptions,
|
|
@@ -6559,17 +6564,16 @@ var X402ApiFp = function (configuration) {
|
|
|
6559
6564
|
* Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. The last message is the agent\'s final response.
|
|
6560
6565
|
* @summary Chat by x402
|
|
6561
6566
|
* @param {string} aid Agent ID
|
|
6562
|
-
* @param {X402MessageRequest} x402MessageRequest
|
|
6563
6567
|
* @param {*} [options] Override http request option.
|
|
6564
6568
|
* @throws {RequiredError}
|
|
6565
6569
|
*/
|
|
6566
|
-
chatByX402: function (aid,
|
|
6570
|
+
chatByX402: function (aid, options) {
|
|
6567
6571
|
return __awaiter(this, void 0, void 0, function () {
|
|
6568
6572
|
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
6569
6573
|
var _a, _b, _c;
|
|
6570
6574
|
return __generator(this, function (_d) {
|
|
6571
6575
|
switch (_d.label) {
|
|
6572
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.chatByX402(aid,
|
|
6576
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.chatByX402(aid, options)];
|
|
6573
6577
|
case 1:
|
|
6574
6578
|
localVarAxiosArgs = _d.sent();
|
|
6575
6579
|
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
@@ -6592,12 +6596,11 @@ var X402ApiFactory = function (configuration, basePath, axios) {
|
|
|
6592
6596
|
* Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. The last message is the agent\'s final response.
|
|
6593
6597
|
* @summary Chat by x402
|
|
6594
6598
|
* @param {string} aid Agent ID
|
|
6595
|
-
* @param {X402MessageRequest} x402MessageRequest
|
|
6596
6599
|
* @param {*} [options] Override http request option.
|
|
6597
6600
|
* @throws {RequiredError}
|
|
6598
6601
|
*/
|
|
6599
|
-
chatByX402: function (aid,
|
|
6600
|
-
return localVarFp.chatByX402(aid,
|
|
6602
|
+
chatByX402: function (aid, options) {
|
|
6603
|
+
return localVarFp.chatByX402(aid, options).then(function (request) { return request(axios, basePath); });
|
|
6601
6604
|
},
|
|
6602
6605
|
};
|
|
6603
6606
|
};
|
|
@@ -6614,13 +6617,12 @@ var X402Api = /** @class */ (function (_super) {
|
|
|
6614
6617
|
* Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. The last message is the agent\'s final response.
|
|
6615
6618
|
* @summary Chat by x402
|
|
6616
6619
|
* @param {string} aid Agent ID
|
|
6617
|
-
* @param {X402MessageRequest} x402MessageRequest
|
|
6618
6620
|
* @param {*} [options] Override http request option.
|
|
6619
6621
|
* @throws {RequiredError}
|
|
6620
6622
|
*/
|
|
6621
|
-
X402Api.prototype.chatByX402 = function (aid,
|
|
6623
|
+
X402Api.prototype.chatByX402 = function (aid, options) {
|
|
6622
6624
|
var _this = this;
|
|
6623
|
-
return (0, exports.X402ApiFp)(this.configuration).chatByX402(aid,
|
|
6625
|
+
return (0, exports.X402ApiFp)(this.configuration).chatByX402(aid, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
6624
6626
|
};
|
|
6625
6627
|
return X402Api;
|
|
6626
6628
|
}(base_1.BaseAPI));
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.58
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.58
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.58
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/docs/AgentApi.md
CHANGED
|
@@ -23,7 +23,7 @@ All URIs are relative to *http://localhost*
|
|
|
23
23
|
|[**validateAgentUpdate**](#validateagentupdate) | **POST** /agents/{agent_id}/validate | Validate Agent Update|
|
|
24
24
|
|
|
25
25
|
# **createAgent**
|
|
26
|
-
> AgentResponse createAgent()
|
|
26
|
+
> AgentResponse createAgent(agentUpdate)
|
|
27
27
|
|
|
28
28
|
Create a new agent. **Request Body:** * `agent` - Agent configuration **Returns:** * `AgentResponse` - Created agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Agent limit reached, invalid agent ID format, or agent ID already exists - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
29
29
|
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
const configuration = new Configuration();
|
|
40
40
|
const apiInstance = new AgentApi(configuration);
|
|
41
41
|
|
|
42
|
-
let agentUpdate: AgentUpdate; //
|
|
42
|
+
let agentUpdate: AgentUpdate; //
|
|
43
43
|
|
|
44
44
|
const { status, data } = await apiInstance.createAgent(
|
|
45
45
|
agentUpdate
|
|
@@ -574,7 +574,7 @@ const { status, data } = await apiInstance.importAgent(
|
|
|
574
574
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
575
575
|
|
|
576
576
|
# **overrideAgent**
|
|
577
|
-
> AgentResponse overrideAgent()
|
|
577
|
+
> AgentResponse overrideAgent(agentUpdate)
|
|
578
578
|
|
|
579
579
|
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:** * `data` - 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
|
|
580
580
|
|
|
@@ -591,7 +591,7 @@ const configuration = new Configuration();
|
|
|
591
591
|
const apiInstance = new AgentApi(configuration);
|
|
592
592
|
|
|
593
593
|
let agentId: string; //ID of the agent to update (default to undefined)
|
|
594
|
-
let agentUpdate: AgentUpdate; //
|
|
594
|
+
let agentUpdate: AgentUpdate; //
|
|
595
595
|
|
|
596
596
|
const { status, data } = await apiInstance.overrideAgent(
|
|
597
597
|
agentId,
|
|
@@ -630,7 +630,7 @@ const { status, data } = await apiInstance.overrideAgent(
|
|
|
630
630
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
631
631
|
|
|
632
632
|
# **overrideAgentPublicInfo**
|
|
633
|
-
> Agent overrideAgentPublicInfo()
|
|
633
|
+
> Agent overrideAgentPublicInfo(agentPublicInfo)
|
|
634
634
|
|
|
635
635
|
Override agent public information with the provided values.
|
|
636
636
|
|
|
@@ -647,7 +647,7 @@ const configuration = new Configuration();
|
|
|
647
647
|
const apiInstance = new AgentApi(configuration);
|
|
648
648
|
|
|
649
649
|
let agentId: string; //ID of the agent to update (default to undefined)
|
|
650
|
-
let agentPublicInfo: AgentPublicInfo; //
|
|
650
|
+
let agentPublicInfo: AgentPublicInfo; //
|
|
651
651
|
|
|
652
652
|
const { status, data } = await apiInstance.overrideAgentPublicInfo(
|
|
653
653
|
agentId,
|
|
@@ -845,7 +845,7 @@ const { status, data } = await apiInstance.unpublishAgent(
|
|
|
845
845
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
846
846
|
|
|
847
847
|
# **validateAgentCreate**
|
|
848
|
-
> validateAgentCreate()
|
|
848
|
+
> validateAgentCreate(agentUpdate)
|
|
849
849
|
|
|
850
850
|
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
|
|
851
851
|
|
|
@@ -861,7 +861,7 @@ import {
|
|
|
861
861
|
const configuration = new Configuration();
|
|
862
862
|
const apiInstance = new AgentApi(configuration);
|
|
863
863
|
|
|
864
|
-
let agentUpdate: AgentUpdate; //
|
|
864
|
+
let agentUpdate: AgentUpdate; //
|
|
865
865
|
|
|
866
866
|
const { status, data } = await apiInstance.validateAgentCreate(
|
|
867
867
|
agentUpdate
|
|
@@ -898,7 +898,7 @@ void (empty response body)
|
|
|
898
898
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
899
899
|
|
|
900
900
|
# **validateAgentUpdate**
|
|
901
|
-
> validateAgentUpdate()
|
|
901
|
+
> validateAgentUpdate(agentUpdate)
|
|
902
902
|
|
|
903
903
|
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
|
|
904
904
|
|
|
@@ -915,7 +915,7 @@ const configuration = new Configuration();
|
|
|
915
915
|
const apiInstance = new AgentApi(configuration);
|
|
916
916
|
|
|
917
917
|
let agentId: string; //Agent ID (default to undefined)
|
|
918
|
-
let agentUpdate: AgentUpdate; //
|
|
918
|
+
let agentUpdate: AgentUpdate; //
|
|
919
919
|
|
|
920
920
|
const { status, data } = await apiInstance.validateAgentUpdate(
|
|
921
921
|
agentId,
|
|
@@ -27,8 +27,8 @@ Name | Type | Description | Notes
|
|
|
27
27
|
**supports_presence_penalty** | **boolean** | | [optional] [default to true]
|
|
28
28
|
**api_base** | **string** | | [optional] [default to undefined]
|
|
29
29
|
**timeout** | **number** | | [optional] [default to 180]
|
|
30
|
-
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-11-
|
|
31
|
-
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-11-
|
|
30
|
+
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-11-06T13:16:14.973+00:00]
|
|
31
|
+
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-11-06T13:16:14.973+00:00]
|
|
32
32
|
**provider_name** | **string** | | [default to undefined]
|
|
33
33
|
|
|
34
34
|
## Example
|
package/docs/X402Api.md
CHANGED
|
@@ -7,7 +7,7 @@ All URIs are relative to *http://localhost*
|
|
|
7
7
|
|[**chatByX402**](#chatbyx402) | **POST** /x/{aid} | Chat by x402|
|
|
8
8
|
|
|
9
9
|
# **chatByX402**
|
|
10
|
-
> Array<ChatMessage> chatByX402(
|
|
10
|
+
> Array<ChatMessage> chatByX402()
|
|
11
11
|
|
|
12
12
|
Send a new message to a specific chat thread. The response is a list of messages generated by the agent. The response does not include the original user message. It could be skill calls, agent messages, or system error messages. The last message is the agent\'s final response.
|
|
13
13
|
|
|
@@ -16,19 +16,16 @@ Send a new message to a specific chat thread. The response is a list of messages
|
|
|
16
16
|
```typescript
|
|
17
17
|
import {
|
|
18
18
|
X402Api,
|
|
19
|
-
Configuration
|
|
20
|
-
X402MessageRequest
|
|
19
|
+
Configuration
|
|
21
20
|
} from '@crestal/nation-sdk';
|
|
22
21
|
|
|
23
22
|
const configuration = new Configuration();
|
|
24
23
|
const apiInstance = new X402Api(configuration);
|
|
25
24
|
|
|
26
25
|
let aid: string; //Agent ID (default to undefined)
|
|
27
|
-
let x402MessageRequest: X402MessageRequest; //
|
|
28
26
|
|
|
29
27
|
const { status, data } = await apiInstance.chatByX402(
|
|
30
|
-
aid
|
|
31
|
-
x402MessageRequest
|
|
28
|
+
aid
|
|
32
29
|
);
|
|
33
30
|
```
|
|
34
31
|
|
|
@@ -36,7 +33,6 @@ const { status, data } = await apiInstance.chatByX402(
|
|
|
36
33
|
|
|
37
34
|
|Name | Type | Description | Notes|
|
|
38
35
|
|------------- | ------------- | ------------- | -------------|
|
|
39
|
-
| **x402MessageRequest** | **X402MessageRequest**| | |
|
|
40
36
|
| **aid** | [**string**] | Agent ID | defaults to undefined|
|
|
41
37
|
|
|
42
38
|
|
|
@@ -50,7 +46,7 @@ No authorization required
|
|
|
50
46
|
|
|
51
47
|
### HTTP request headers
|
|
52
48
|
|
|
53
|
-
- **Content-Type**:
|
|
49
|
+
- **Content-Type**: Not defined
|
|
54
50
|
- **Accept**: application/json
|
|
55
51
|
|
|
56
52
|
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# X402MessageRequest
|
|
2
|
-
|
|
3
|
-
Request agent for chat response.
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type | Description | Notes
|
|
8
|
-
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**chat_id** | **string** | | [optional] [default to undefined]
|
|
10
|
-
**app_id** | **string** | | [optional] [default to undefined]
|
|
11
|
-
**message** | **string** | Content of the message | [default to undefined]
|
|
12
|
-
**search_mode** | **boolean** | | [optional] [default to undefined]
|
|
13
|
-
**super_mode** | **boolean** | | [optional] [default to undefined]
|
|
14
|
-
**attachments** | [**Array<ChatMessageAttachment>**](ChatMessageAttachment.md) | | [optional] [default to undefined]
|
|
15
|
-
|
|
16
|
-
## Example
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import { X402MessageRequest } from '@crestal/nation-sdk';
|
|
20
|
-
|
|
21
|
-
const instance: X402MessageRequest = {
|
|
22
|
-
chat_id,
|
|
23
|
-
app_id,
|
|
24
|
-
message,
|
|
25
|
-
search_mode,
|
|
26
|
-
super_mode,
|
|
27
|
-
attachments,
|
|
28
|
-
};
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|