@super_studio/ecforce-ai-agent-server 0.2.0-canary.4 → 1.0.0-canary.7
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/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.cjs +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.mjs +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectSpread2.cjs +27 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectSpread2.mjs +27 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutProperties.cjs +15 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutProperties.mjs +15 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutPropertiesLoose.cjs +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutPropertiesLoose.mjs +13 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.cjs +16 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.mjs +16 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.cjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.mjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.cjs +18 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.mjs +12 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +3 -531
- package/dist/lib/constants.cjs +6 -0
- package/dist/lib/constants.mjs +6 -0
- package/dist/lib/constants.mjs.map +1 -0
- package/dist/lib/jwt.cjs +64 -0
- package/dist/lib/jwt.mjs +64 -0
- package/dist/lib/jwt.mjs.map +1 -0
- package/dist/mcp-auth.cjs +52 -0
- package/dist/mcp-auth.d.cts +38 -0
- package/dist/mcp-auth.d.cts.map +1 -0
- package/dist/mcp-auth.d.mts +38 -0
- package/dist/mcp-auth.d.mts.map +1 -0
- package/dist/mcp-auth.mjs +44 -129
- package/dist/mcp-auth.mjs.map +1 -0
- package/dist/sdk/__generated__/index.cjs +524 -0
- package/dist/sdk/__generated__/index.d.cts +1648 -0
- package/dist/sdk/__generated__/index.d.cts.map +1 -0
- package/dist/sdk/__generated__/index.d.mts +1648 -0
- package/dist/sdk/__generated__/index.d.mts.map +1 -0
- package/dist/sdk/__generated__/index.mjs +523 -0
- package/dist/sdk/__generated__/index.mjs.map +1 -0
- package/dist/sdk/index.cjs +21 -0
- package/dist/sdk/index.d.cts +22 -0
- package/dist/sdk/index.d.cts.map +1 -0
- package/dist/sdk/index.d.mts +22 -0
- package/dist/sdk/index.d.mts.map +1 -0
- package/dist/sdk/index.mjs +22 -0
- package/dist/sdk/index.mjs.map +1 -0
- package/package.json +14 -20
- package/src/sdk/__generated__/index.ts +2194 -532
- package/src/sdk/generate.ts +21 -1
- package/dist/chunk-FWCSY2DS.mjs +0 -37
- package/dist/chunk-ORMEWXMH.js +0 -37
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -532
- package/dist/lib/constants.d.ts +0 -2
- package/dist/lib/constants.d.ts.map +0 -1
- package/dist/lib/jwt.d.ts +0 -37
- package/dist/lib/jwt.d.ts.map +0 -1
- package/dist/mcp-auth.d.ts +0 -35
- package/dist/mcp-auth.d.ts.map +0 -1
- package/dist/mcp-auth.js +0 -136
- package/dist/sdk/__generated__/index.d.ts +0 -637
- package/dist/sdk/__generated__/index.d.ts.map +0 -1
- package/dist/sdk/generate.d.ts +0 -2
- package/dist/sdk/generate.d.ts.map +0 -1
- package/dist/sdk/index.d.ts +0 -19
- package/dist/sdk/index.d.ts.map +0 -1
- package/src/.tmp/test-script.ts +0 -18
package/src/sdk/generate.ts
CHANGED
|
@@ -8,7 +8,7 @@ const SCRIPT_DIR = path.dirname(new URL(import.meta.url).pathname);
|
|
|
8
8
|
/**
|
|
9
9
|
* こちらのスクリプトは以下のコマンドで実行してください
|
|
10
10
|
*
|
|
11
|
-
* `pnpm --filter
|
|
11
|
+
* `pnpm --filter @super_studio/ecforce-ai-agent-server generate`
|
|
12
12
|
*/
|
|
13
13
|
void (async () => {
|
|
14
14
|
await updateApiSchema();
|
|
@@ -20,6 +20,26 @@ void (async () => {
|
|
|
20
20
|
moduleNameIndex: 1,
|
|
21
21
|
unwrapResponseData: true,
|
|
22
22
|
hooks: {
|
|
23
|
+
onCreateRoute(routeData) {
|
|
24
|
+
// internalルートの場合、次のパス部分と結合してモジュール名を設定
|
|
25
|
+
// 例: /v1/internal/account/{projectId} -> internalAccount
|
|
26
|
+
// 例: /v1/internal/chat/create-session -> internalChat
|
|
27
|
+
const route = routeData.raw.route;
|
|
28
|
+
const routeParts = route.split("/").filter(Boolean);
|
|
29
|
+
const internalIndex = routeParts.indexOf("internal");
|
|
30
|
+
if (internalIndex >= 0) {
|
|
31
|
+
const subRouter = routeParts[internalIndex + 1];
|
|
32
|
+
if (subRouter) {
|
|
33
|
+
// ケバブケースをキャメルケースに変換
|
|
34
|
+
const camelCase = subRouter
|
|
35
|
+
.split("-")
|
|
36
|
+
.map((part) => part.charAt(0).toUpperCase() + part.slice(1))
|
|
37
|
+
.join("");
|
|
38
|
+
routeData.namespace = `internal${camelCase}`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return routeData;
|
|
42
|
+
},
|
|
23
43
|
onFormatRouteName(routeInfo) {
|
|
24
44
|
const { method, route, summary } = routeInfo;
|
|
25
45
|
|
package/dist/chunk-FWCSY2DS.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
__spreadValues,
|
|
35
|
-
__spreadProps,
|
|
36
|
-
__objRest
|
|
37
|
-
};
|
package/dist/chunk-ORMEWXMH.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __objRest = (source, exclude) => {
|
|
21
|
-
var target = {};
|
|
22
|
-
for (var prop in source)
|
|
23
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
-
target[prop] = source[prop];
|
|
25
|
-
if (source != null && __getOwnPropSymbols)
|
|
26
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
}
|
|
30
|
-
return target;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__objRest = __objRest;
|
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,532 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunkORMEWXMHjs = require('./chunk-ORMEWXMH.js');
|
|
6
|
-
|
|
7
|
-
// src/lib/constants.ts
|
|
8
|
-
var API_ENDPOINT = "http://localhost:4043";
|
|
9
|
-
|
|
10
|
-
// src/sdk/__generated__/index.ts
|
|
11
|
-
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
12
|
-
ContentType2["Json"] = "application/json";
|
|
13
|
-
ContentType2["JsonApi"] = "application/vnd.api+json";
|
|
14
|
-
ContentType2["FormData"] = "multipart/form-data";
|
|
15
|
-
ContentType2["UrlEncoded"] = "application/x-www-form-urlencoded";
|
|
16
|
-
ContentType2["Text"] = "text/plain";
|
|
17
|
-
return ContentType2;
|
|
18
|
-
})(ContentType || {});
|
|
19
|
-
var HttpClient = class {
|
|
20
|
-
constructor(apiConfig = {}) {
|
|
21
|
-
this.baseUrl = "/api";
|
|
22
|
-
this.securityData = null;
|
|
23
|
-
this.abortControllers = /* @__PURE__ */ new Map();
|
|
24
|
-
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
25
|
-
this.baseApiParams = {
|
|
26
|
-
credentials: "same-origin",
|
|
27
|
-
headers: {},
|
|
28
|
-
redirect: "follow",
|
|
29
|
-
referrerPolicy: "no-referrer"
|
|
30
|
-
};
|
|
31
|
-
this.setSecurityData = (data) => {
|
|
32
|
-
this.securityData = data;
|
|
33
|
-
};
|
|
34
|
-
this.contentFormatters = {
|
|
35
|
-
["application/json" /* Json */]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
|
|
36
|
-
["application/vnd.api+json" /* JsonApi */]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
|
|
37
|
-
["text/plain" /* Text */]: (input) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input,
|
|
38
|
-
["multipart/form-data" /* FormData */]: (input) => {
|
|
39
|
-
if (input instanceof FormData) {
|
|
40
|
-
return input;
|
|
41
|
-
}
|
|
42
|
-
return Object.keys(input || {}).reduce((formData, key) => {
|
|
43
|
-
const property = input[key];
|
|
44
|
-
formData.append(
|
|
45
|
-
key,
|
|
46
|
-
property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`
|
|
47
|
-
);
|
|
48
|
-
return formData;
|
|
49
|
-
}, new FormData());
|
|
50
|
-
},
|
|
51
|
-
["application/x-www-form-urlencoded" /* UrlEncoded */]: (input) => this.toQueryString(input)
|
|
52
|
-
};
|
|
53
|
-
this.createAbortSignal = (cancelToken) => {
|
|
54
|
-
if (this.abortControllers.has(cancelToken)) {
|
|
55
|
-
const abortController2 = this.abortControllers.get(cancelToken);
|
|
56
|
-
if (abortController2) {
|
|
57
|
-
return abortController2.signal;
|
|
58
|
-
}
|
|
59
|
-
return void 0;
|
|
60
|
-
}
|
|
61
|
-
const abortController = new AbortController();
|
|
62
|
-
this.abortControllers.set(cancelToken, abortController);
|
|
63
|
-
return abortController.signal;
|
|
64
|
-
};
|
|
65
|
-
this.abortRequest = (cancelToken) => {
|
|
66
|
-
const abortController = this.abortControllers.get(cancelToken);
|
|
67
|
-
if (abortController) {
|
|
68
|
-
abortController.abort();
|
|
69
|
-
this.abortControllers.delete(cancelToken);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
this.request = async (_a) => {
|
|
73
|
-
var _b = _a, {
|
|
74
|
-
body,
|
|
75
|
-
secure,
|
|
76
|
-
path,
|
|
77
|
-
type,
|
|
78
|
-
query,
|
|
79
|
-
format,
|
|
80
|
-
baseUrl,
|
|
81
|
-
cancelToken
|
|
82
|
-
} = _b, params = _chunkORMEWXMHjs.__objRest.call(void 0, _b, [
|
|
83
|
-
"body",
|
|
84
|
-
"secure",
|
|
85
|
-
"path",
|
|
86
|
-
"type",
|
|
87
|
-
"query",
|
|
88
|
-
"format",
|
|
89
|
-
"baseUrl",
|
|
90
|
-
"cancelToken"
|
|
91
|
-
]);
|
|
92
|
-
const secureParams = (typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
|
|
93
|
-
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
94
|
-
const queryString = query && this.toQueryString(query);
|
|
95
|
-
const payloadFormatter = this.contentFormatters[type || "application/json" /* Json */];
|
|
96
|
-
const responseFormat = format || requestParams.format;
|
|
97
|
-
return this.customFetch(
|
|
98
|
-
`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
|
|
99
|
-
_chunkORMEWXMHjs.__spreadProps.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, {}, requestParams), {
|
|
100
|
-
headers: _chunkORMEWXMHjs.__spreadValues.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, {}, requestParams.headers || {}), type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}),
|
|
101
|
-
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
|
|
102
|
-
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body)
|
|
103
|
-
})
|
|
104
|
-
).then(async (response) => {
|
|
105
|
-
const r = response;
|
|
106
|
-
r.data = null;
|
|
107
|
-
r.error = null;
|
|
108
|
-
const data = !responseFormat ? r : await response[responseFormat]().then((data2) => {
|
|
109
|
-
if (r.ok) {
|
|
110
|
-
r.data = data2;
|
|
111
|
-
} else {
|
|
112
|
-
r.error = data2;
|
|
113
|
-
}
|
|
114
|
-
return r;
|
|
115
|
-
}).catch((e) => {
|
|
116
|
-
r.error = e;
|
|
117
|
-
return r;
|
|
118
|
-
});
|
|
119
|
-
if (cancelToken) {
|
|
120
|
-
this.abortControllers.delete(cancelToken);
|
|
121
|
-
}
|
|
122
|
-
if (!response.ok) throw data;
|
|
123
|
-
return data.data;
|
|
124
|
-
});
|
|
125
|
-
};
|
|
126
|
-
Object.assign(this, apiConfig);
|
|
127
|
-
}
|
|
128
|
-
encodeQueryParam(key, value) {
|
|
129
|
-
const encodedKey = encodeURIComponent(key);
|
|
130
|
-
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
131
|
-
}
|
|
132
|
-
addQueryParam(query, key) {
|
|
133
|
-
return this.encodeQueryParam(key, query[key]);
|
|
134
|
-
}
|
|
135
|
-
addArrayQueryParam(query, key) {
|
|
136
|
-
const value = query[key];
|
|
137
|
-
return value.map((v) => this.encodeQueryParam(key, v)).join("&");
|
|
138
|
-
}
|
|
139
|
-
toQueryString(rawQuery) {
|
|
140
|
-
const query = rawQuery || {};
|
|
141
|
-
const keys = Object.keys(query).filter(
|
|
142
|
-
(key) => "undefined" !== typeof query[key]
|
|
143
|
-
);
|
|
144
|
-
return keys.map(
|
|
145
|
-
(key) => Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)
|
|
146
|
-
).join("&");
|
|
147
|
-
}
|
|
148
|
-
addQueryParams(rawQuery) {
|
|
149
|
-
const queryString = this.toQueryString(rawQuery);
|
|
150
|
-
return queryString ? `?${queryString}` : "";
|
|
151
|
-
}
|
|
152
|
-
mergeRequestParams(params1, params2) {
|
|
153
|
-
return _chunkORMEWXMHjs.__spreadProps.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, {}, this.baseApiParams), params1), params2 || {}), {
|
|
154
|
-
headers: _chunkORMEWXMHjs.__spreadValues.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, _chunkORMEWXMHjs.__spreadValues.call(void 0, {}, this.baseApiParams.headers || {}), params1.headers || {}), params2 && params2.headers || {})
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
var Api = class extends HttpClient {
|
|
159
|
-
constructor() {
|
|
160
|
-
super(...arguments);
|
|
161
|
-
this.version = {
|
|
162
|
-
/**
|
|
163
|
-
* @description バージョンを取得する
|
|
164
|
-
*
|
|
165
|
-
* @tags meta
|
|
166
|
-
* @name GetVersion
|
|
167
|
-
* @summary getVersion
|
|
168
|
-
* @request GET:/v1/version
|
|
169
|
-
* @secure
|
|
170
|
-
*/
|
|
171
|
-
getVersion: (params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
172
|
-
path: `/v1/version`,
|
|
173
|
-
method: "GET",
|
|
174
|
-
secure: true,
|
|
175
|
-
format: "json"
|
|
176
|
-
}, params))
|
|
177
|
-
};
|
|
178
|
-
this.internal = {
|
|
179
|
-
/**
|
|
180
|
-
* @description ユーザーのセッションを作成してトークンを返す
|
|
181
|
-
*
|
|
182
|
-
* @tags internal
|
|
183
|
-
* @name CreateSession
|
|
184
|
-
* @summary createSession
|
|
185
|
-
* @request POST:/v1/internal/create-session
|
|
186
|
-
* @secure
|
|
187
|
-
*/
|
|
188
|
-
createSession: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
189
|
-
path: `/v1/internal/create-session`,
|
|
190
|
-
method: "POST",
|
|
191
|
-
body: data,
|
|
192
|
-
secure: true,
|
|
193
|
-
type: "application/json" /* Json */,
|
|
194
|
-
format: "json"
|
|
195
|
-
}, params))
|
|
196
|
-
};
|
|
197
|
-
this.agent = {
|
|
198
|
-
/**
|
|
199
|
-
* @description エージェント一覧を取得する
|
|
200
|
-
*
|
|
201
|
-
* @tags agent
|
|
202
|
-
* @name List
|
|
203
|
-
* @summary list
|
|
204
|
-
* @request GET:/v1/agent
|
|
205
|
-
* @secure
|
|
206
|
-
*/
|
|
207
|
-
list: (params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
208
|
-
path: `/v1/agent`,
|
|
209
|
-
method: "GET",
|
|
210
|
-
secure: true,
|
|
211
|
-
format: "json"
|
|
212
|
-
}, params)),
|
|
213
|
-
/**
|
|
214
|
-
* @description エージェントを作成する
|
|
215
|
-
*
|
|
216
|
-
* @tags agent
|
|
217
|
-
* @name Create
|
|
218
|
-
* @summary create
|
|
219
|
-
* @request POST:/v1/agent
|
|
220
|
-
* @secure
|
|
221
|
-
*/
|
|
222
|
-
create: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
223
|
-
path: `/v1/agent`,
|
|
224
|
-
method: "POST",
|
|
225
|
-
body: data,
|
|
226
|
-
secure: true,
|
|
227
|
-
type: "application/json" /* Json */,
|
|
228
|
-
format: "json"
|
|
229
|
-
}, params)),
|
|
230
|
-
/**
|
|
231
|
-
* @description エージェント詳細を取得する
|
|
232
|
-
*
|
|
233
|
-
* @tags agent
|
|
234
|
-
* @name Get
|
|
235
|
-
* @summary get
|
|
236
|
-
* @request GET:/v1/agent/{id}
|
|
237
|
-
* @secure
|
|
238
|
-
*/
|
|
239
|
-
get: (id, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
240
|
-
path: `/v1/agent/${id}`,
|
|
241
|
-
method: "GET",
|
|
242
|
-
secure: true,
|
|
243
|
-
format: "json"
|
|
244
|
-
}, params)),
|
|
245
|
-
/**
|
|
246
|
-
* @description エージェントを更新する
|
|
247
|
-
*
|
|
248
|
-
* @tags agent
|
|
249
|
-
* @name Update
|
|
250
|
-
* @summary update
|
|
251
|
-
* @request PUT:/v1/agent/{id}
|
|
252
|
-
* @secure
|
|
253
|
-
*/
|
|
254
|
-
update: (id, data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
255
|
-
path: `/v1/agent/${id}`,
|
|
256
|
-
method: "PUT",
|
|
257
|
-
body: data,
|
|
258
|
-
secure: true,
|
|
259
|
-
type: "application/json" /* Json */,
|
|
260
|
-
format: "json"
|
|
261
|
-
}, params)),
|
|
262
|
-
/**
|
|
263
|
-
* @description エージェントを削除する
|
|
264
|
-
*
|
|
265
|
-
* @tags agent
|
|
266
|
-
* @name Delete
|
|
267
|
-
* @summary delete
|
|
268
|
-
* @request DELETE:/v1/agent/{id}
|
|
269
|
-
* @secure
|
|
270
|
-
*/
|
|
271
|
-
delete: (id, data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
272
|
-
path: `/v1/agent/${id}`,
|
|
273
|
-
method: "DELETE",
|
|
274
|
-
body: data,
|
|
275
|
-
secure: true,
|
|
276
|
-
type: "application/json" /* Json */,
|
|
277
|
-
format: "json"
|
|
278
|
-
}, params)),
|
|
279
|
-
/**
|
|
280
|
-
* @description エージェントのUI機能設定を取得する(公開)
|
|
281
|
-
*
|
|
282
|
-
* @tags agent
|
|
283
|
-
* @name GetInterfaceFeatures
|
|
284
|
-
* @summary getInterfaceFeatures
|
|
285
|
-
* @request GET:/v1/agent/{id}/interface-features
|
|
286
|
-
* @secure
|
|
287
|
-
*/
|
|
288
|
-
getInterfaceFeatures: (id, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
289
|
-
path: `/v1/agent/${id}/interface-features`,
|
|
290
|
-
method: "GET",
|
|
291
|
-
secure: true,
|
|
292
|
-
format: "json"
|
|
293
|
-
}, params)),
|
|
294
|
-
/**
|
|
295
|
-
* @description エージェントのツール設定を取得する(公開)
|
|
296
|
-
*
|
|
297
|
-
* @tags agent
|
|
298
|
-
* @name GetToolSettings
|
|
299
|
-
* @summary getToolSettings
|
|
300
|
-
* @request POST:/v1/agent/tool-settings
|
|
301
|
-
* @secure
|
|
302
|
-
*/
|
|
303
|
-
getToolSettings: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
304
|
-
path: `/v1/agent/tool-settings`,
|
|
305
|
-
method: "POST",
|
|
306
|
-
body: data,
|
|
307
|
-
secure: true,
|
|
308
|
-
type: "application/json" /* Json */,
|
|
309
|
-
format: "json"
|
|
310
|
-
}, params))
|
|
311
|
-
};
|
|
312
|
-
this.account = {
|
|
313
|
-
/**
|
|
314
|
-
* @description 所属するアカウント一覧を取得する
|
|
315
|
-
*
|
|
316
|
-
* @tags account
|
|
317
|
-
* @name List
|
|
318
|
-
* @summary list
|
|
319
|
-
* @request GET:/v1/account
|
|
320
|
-
* @secure
|
|
321
|
-
*/
|
|
322
|
-
list: (params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
323
|
-
path: `/v1/account`,
|
|
324
|
-
method: "GET",
|
|
325
|
-
secure: true,
|
|
326
|
-
format: "json"
|
|
327
|
-
}, params)),
|
|
328
|
-
/**
|
|
329
|
-
* @description アカウント詳細を取得する
|
|
330
|
-
*
|
|
331
|
-
* @tags account
|
|
332
|
-
* @name Get
|
|
333
|
-
* @summary get
|
|
334
|
-
* @request GET:/v1/account/{projectId}
|
|
335
|
-
* @secure
|
|
336
|
-
*/
|
|
337
|
-
get: (projectId, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
338
|
-
path: `/v1/account/${projectId}`,
|
|
339
|
-
method: "GET",
|
|
340
|
-
secure: true,
|
|
341
|
-
format: "json"
|
|
342
|
-
}, params))
|
|
343
|
-
};
|
|
344
|
-
this.apiKeys = {
|
|
345
|
-
/**
|
|
346
|
-
* @description APIキー一覧を取得する
|
|
347
|
-
*
|
|
348
|
-
* @tags apiKey
|
|
349
|
-
* @name List
|
|
350
|
-
* @summary list
|
|
351
|
-
* @request GET:/v1/api-keys/{type}
|
|
352
|
-
* @secure
|
|
353
|
-
*/
|
|
354
|
-
list: (type, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
355
|
-
path: `/v1/api-keys/${type}`,
|
|
356
|
-
method: "GET",
|
|
357
|
-
secure: true,
|
|
358
|
-
format: "json"
|
|
359
|
-
}, params)),
|
|
360
|
-
/**
|
|
361
|
-
* @description APIキーを作成する
|
|
362
|
-
*
|
|
363
|
-
* @tags apiKey
|
|
364
|
-
* @name Create
|
|
365
|
-
* @summary create
|
|
366
|
-
* @request POST:/v1/api-keys
|
|
367
|
-
* @secure
|
|
368
|
-
*/
|
|
369
|
-
create: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
370
|
-
path: `/v1/api-keys`,
|
|
371
|
-
method: "POST",
|
|
372
|
-
body: data,
|
|
373
|
-
secure: true,
|
|
374
|
-
type: "application/json" /* Json */,
|
|
375
|
-
format: "json"
|
|
376
|
-
}, params)),
|
|
377
|
-
/**
|
|
378
|
-
* @description APIキーを更新する
|
|
379
|
-
*
|
|
380
|
-
* @tags apiKey
|
|
381
|
-
* @name Update
|
|
382
|
-
* @summary update
|
|
383
|
-
* @request PATCH:/v1/api-keys/{id}
|
|
384
|
-
* @secure
|
|
385
|
-
*/
|
|
386
|
-
update: (id, data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
387
|
-
path: `/v1/api-keys/${id}`,
|
|
388
|
-
method: "PATCH",
|
|
389
|
-
body: data,
|
|
390
|
-
secure: true,
|
|
391
|
-
type: "application/json" /* Json */,
|
|
392
|
-
format: "json"
|
|
393
|
-
}, params)),
|
|
394
|
-
/**
|
|
395
|
-
* @description APIキーを削除する
|
|
396
|
-
*
|
|
397
|
-
* @tags apiKey
|
|
398
|
-
* @name Delete
|
|
399
|
-
* @summary delete
|
|
400
|
-
* @request DELETE:/v1/api-keys/{id}
|
|
401
|
-
* @secure
|
|
402
|
-
*/
|
|
403
|
-
delete: (id, data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
404
|
-
path: `/v1/api-keys/${id}`,
|
|
405
|
-
method: "DELETE",
|
|
406
|
-
body: data,
|
|
407
|
-
secure: true,
|
|
408
|
-
type: "application/json" /* Json */,
|
|
409
|
-
format: "json"
|
|
410
|
-
}, params))
|
|
411
|
-
};
|
|
412
|
-
this.chat = {
|
|
413
|
-
/**
|
|
414
|
-
* @description ユーザーのチャットメッセージ一覧を返す
|
|
415
|
-
*
|
|
416
|
-
* @tags chat
|
|
417
|
-
* @name ListMessages
|
|
418
|
-
* @summary listMessages
|
|
419
|
-
* @request POST:/v1/chat/list-messages
|
|
420
|
-
* @secure
|
|
421
|
-
*/
|
|
422
|
-
listMessages: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
423
|
-
path: `/v1/chat/list-messages`,
|
|
424
|
-
method: "POST",
|
|
425
|
-
body: data,
|
|
426
|
-
secure: true,
|
|
427
|
-
type: "application/json" /* Json */,
|
|
428
|
-
format: "json"
|
|
429
|
-
}, params)),
|
|
430
|
-
/**
|
|
431
|
-
* @description ユーザーのチャット一覧を返す
|
|
432
|
-
*
|
|
433
|
-
* @tags chat
|
|
434
|
-
* @name MyList
|
|
435
|
-
* @summary myList
|
|
436
|
-
* @request POST:/v1/chat/my-list
|
|
437
|
-
* @secure
|
|
438
|
-
*/
|
|
439
|
-
myList: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
440
|
-
path: `/v1/chat/my-list`,
|
|
441
|
-
method: "POST",
|
|
442
|
-
body: data,
|
|
443
|
-
secure: true,
|
|
444
|
-
type: "application/json" /* Json */,
|
|
445
|
-
format: "json"
|
|
446
|
-
}, params)),
|
|
447
|
-
/**
|
|
448
|
-
* @description ユーザーのチャットのタイトルを返す
|
|
449
|
-
*
|
|
450
|
-
* @tags chat
|
|
451
|
-
* @name GetTitle
|
|
452
|
-
* @summary getTitle
|
|
453
|
-
* @request POST:/v1/chat/get-title
|
|
454
|
-
* @secure
|
|
455
|
-
*/
|
|
456
|
-
getTitle: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
457
|
-
path: `/v1/chat/get-title`,
|
|
458
|
-
method: "POST",
|
|
459
|
-
body: data,
|
|
460
|
-
secure: true,
|
|
461
|
-
type: "application/json" /* Json */,
|
|
462
|
-
format: "json"
|
|
463
|
-
}, params)),
|
|
464
|
-
/**
|
|
465
|
-
* @description メッセージに対する評価を送信する
|
|
466
|
-
*
|
|
467
|
-
* @tags chat
|
|
468
|
-
* @name SubmitFeedback
|
|
469
|
-
* @summary submitFeedback
|
|
470
|
-
* @request POST:/v1/chat/submit-feedback
|
|
471
|
-
* @secure
|
|
472
|
-
*/
|
|
473
|
-
submitFeedback: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
474
|
-
path: `/v1/chat/submit-feedback`,
|
|
475
|
-
method: "POST",
|
|
476
|
-
body: data,
|
|
477
|
-
secure: true,
|
|
478
|
-
type: "application/json" /* Json */,
|
|
479
|
-
format: "json"
|
|
480
|
-
}, params)),
|
|
481
|
-
/**
|
|
482
|
-
* @description メッセージの評価を削除する
|
|
483
|
-
*
|
|
484
|
-
* @tags chat
|
|
485
|
-
* @name DeleteFeedback
|
|
486
|
-
* @summary deleteFeedback
|
|
487
|
-
* @request POST:/v1/chat/delete-feedback
|
|
488
|
-
* @secure
|
|
489
|
-
*/
|
|
490
|
-
deleteFeedback: (data, params = {}) => this.request(_chunkORMEWXMHjs.__spreadValues.call(void 0, {
|
|
491
|
-
path: `/v1/chat/delete-feedback`,
|
|
492
|
-
method: "POST",
|
|
493
|
-
body: data,
|
|
494
|
-
secure: true,
|
|
495
|
-
type: "application/json" /* Json */,
|
|
496
|
-
format: "json"
|
|
497
|
-
}, params))
|
|
498
|
-
};
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
// src/sdk/index.ts
|
|
503
|
-
function createClient(params) {
|
|
504
|
-
var _a, _b, _c;
|
|
505
|
-
const baseUrl = `${(_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT}/api`;
|
|
506
|
-
const apiKey = (_c = params == null ? void 0 : params.apiKey) != null ? _c : process.env.AI_AGENT_API_KEY;
|
|
507
|
-
if (!apiKey) {
|
|
508
|
-
throw new Error("API\u30AD\u30FC\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
|
|
509
|
-
}
|
|
510
|
-
if (!baseUrl) {
|
|
511
|
-
throw new Error("API\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
|
|
512
|
-
}
|
|
513
|
-
return new Api({
|
|
514
|
-
baseUrl,
|
|
515
|
-
baseApiParams: {
|
|
516
|
-
secure: true
|
|
517
|
-
},
|
|
518
|
-
async securityWorker() {
|
|
519
|
-
return {
|
|
520
|
-
headers: {
|
|
521
|
-
Authorization: `Bearer ${apiKey}`
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
exports.Api = Api; exports.ContentType = ContentType; exports.HttpClient = HttpClient; exports.createClient = createClient;
|
package/dist/lib/constants.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,0BAA0B,CAAC"}
|
package/dist/lib/jwt.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* このロジックは最新(@auth/core@0.37.2)のAuth.jsのjwt.tsからコピーされました。
|
|
3
|
-
*/
|
|
4
|
-
/** Issues a JWT. By default, the JWT is encrypted using "A256CBC-HS512". */
|
|
5
|
-
export declare function encode<Payload = object>(params: JWTEncodeParams<Payload>): Promise<string>;
|
|
6
|
-
/** Decodes an Auth.js issued JWT. */
|
|
7
|
-
export declare function decode<Payload = object>(params: JWTDecodeParams): Promise<Payload | null>;
|
|
8
|
-
export interface JWTEncodeParams<Payload = object> {
|
|
9
|
-
/**
|
|
10
|
-
* The maximum age of the Auth.js issued JWT in seconds.
|
|
11
|
-
*
|
|
12
|
-
* @default 30 * 24 * 60 * 60 // 30 days
|
|
13
|
-
*/
|
|
14
|
-
maxAge?: number;
|
|
15
|
-
/** Used in combination with `secret`, to derive the encryption secret for JWTs. */
|
|
16
|
-
salt: string;
|
|
17
|
-
/** Used in combination with `salt`, to derive the encryption secret for JWTs. */
|
|
18
|
-
secret: string | string[];
|
|
19
|
-
/** The JWT payload. */
|
|
20
|
-
token?: Payload;
|
|
21
|
-
}
|
|
22
|
-
export interface JWTDecodeParams {
|
|
23
|
-
/** Used in combination with `secret`, to derive the encryption secret for JWTs. */
|
|
24
|
-
salt: string;
|
|
25
|
-
/**
|
|
26
|
-
* Used in combination with `salt`, to derive the encryption secret for JWTs.
|
|
27
|
-
*
|
|
28
|
-
* @note
|
|
29
|
-
* You can also pass an array of secrets, in which case the first secret that successfully
|
|
30
|
-
* decrypts the JWT will be used. This is useful for rotating secrets without invalidating existing sessions.
|
|
31
|
-
* The newer secret should be added to the start of the array, which will be used for all new sessions.
|
|
32
|
-
*/
|
|
33
|
-
secret: string | string[];
|
|
34
|
-
/** The Auth.js issued JWT to be decoded */
|
|
35
|
-
token?: string;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=jwt.d.ts.map
|