@super_studio/ecforce-ai-agent-server 0.2.0-canary.5 → 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.
Files changed (64) hide show
  1. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.cjs +14 -0
  2. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.mjs +14 -0
  3. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectSpread2.cjs +27 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectSpread2.mjs +27 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutProperties.cjs +15 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutProperties.mjs +15 -0
  7. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutPropertiesLoose.cjs +14 -0
  8. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/objectWithoutPropertiesLoose.mjs +13 -0
  9. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.cjs +16 -0
  10. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.mjs +16 -0
  11. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.cjs +11 -0
  12. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.mjs +11 -0
  13. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.cjs +18 -0
  14. package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.mjs +12 -0
  15. package/dist/index.cjs +7 -0
  16. package/dist/index.d.cts +3 -0
  17. package/dist/index.d.mts +3 -0
  18. package/dist/index.mjs +3 -1056
  19. package/dist/lib/constants.cjs +6 -0
  20. package/dist/lib/constants.mjs +6 -0
  21. package/dist/lib/constants.mjs.map +1 -0
  22. package/dist/lib/jwt.cjs +64 -0
  23. package/dist/lib/jwt.mjs +64 -0
  24. package/dist/lib/jwt.mjs.map +1 -0
  25. package/dist/mcp-auth.cjs +52 -0
  26. package/dist/mcp-auth.d.cts +38 -0
  27. package/dist/mcp-auth.d.cts.map +1 -0
  28. package/dist/mcp-auth.d.mts +38 -0
  29. package/dist/mcp-auth.d.mts.map +1 -0
  30. package/dist/mcp-auth.mjs +44 -129
  31. package/dist/mcp-auth.mjs.map +1 -0
  32. package/dist/sdk/__generated__/index.cjs +524 -0
  33. package/dist/sdk/__generated__/index.d.cts +1648 -0
  34. package/dist/sdk/__generated__/index.d.cts.map +1 -0
  35. package/dist/sdk/__generated__/index.d.mts +1648 -0
  36. package/dist/sdk/__generated__/index.d.mts.map +1 -0
  37. package/dist/sdk/__generated__/index.mjs +523 -0
  38. package/dist/sdk/__generated__/index.mjs.map +1 -0
  39. package/dist/sdk/index.cjs +21 -0
  40. package/dist/sdk/index.d.cts +22 -0
  41. package/dist/sdk/index.d.cts.map +1 -0
  42. package/dist/sdk/index.d.mts +22 -0
  43. package/dist/sdk/index.d.mts.map +1 -0
  44. package/dist/sdk/index.mjs +22 -0
  45. package/dist/sdk/index.mjs.map +1 -0
  46. package/package.json +14 -20
  47. package/dist/chunk-FWCSY2DS.mjs +0 -37
  48. package/dist/chunk-ORMEWXMH.js +0 -37
  49. package/dist/index.d.ts +0 -2
  50. package/dist/index.d.ts.map +0 -1
  51. package/dist/index.js +0 -1057
  52. package/dist/lib/constants.d.ts +0 -2
  53. package/dist/lib/constants.d.ts.map +0 -1
  54. package/dist/lib/jwt.d.ts +0 -37
  55. package/dist/lib/jwt.d.ts.map +0 -1
  56. package/dist/mcp-auth.d.ts +0 -35
  57. package/dist/mcp-auth.d.ts.map +0 -1
  58. package/dist/mcp-auth.js +0 -136
  59. package/dist/sdk/__generated__/index.d.ts +0 -1636
  60. package/dist/sdk/__generated__/index.d.ts.map +0 -1
  61. package/dist/sdk/generate.d.ts +0 -2
  62. package/dist/sdk/generate.d.ts.map +0 -1
  63. package/dist/sdk/index.d.ts +0 -19
  64. package/dist/sdk/index.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,1057 +1,4 @@
1
- import {
2
- __objRest,
3
- __spreadProps,
4
- __spreadValues
5
- } from "./chunk-FWCSY2DS.mjs";
1
+ import { Api, ContentType, HttpClient } from "./sdk/__generated__/index.mjs";
2
+ import { createClient } from "./sdk/index.mjs";
6
3
 
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 = __objRest(_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
- __spreadProps(__spreadValues({}, requestParams), {
100
- headers: __spreadValues(__spreadValues({}, 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 __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, this.baseApiParams), params1), params2 || {}), {
154
- headers: __spreadValues(__spreadValues(__spreadValues({}, 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(__spreadValues({
172
- path: `/v1/version`,
173
- method: "GET",
174
- secure: true,
175
- format: "json"
176
- }, params))
177
- };
178
- this.internalAccount = {
179
- /**
180
- * @description アカウント一覧
181
- *
182
- * @tags internal, account
183
- * @name List
184
- * @summary list
185
- * @request GET:/v1/internal/account
186
- * @secure
187
- */
188
- list: (query, params = {}) => this.request(__spreadValues({
189
- path: `/v1/internal/account`,
190
- method: "GET",
191
- query,
192
- secure: true,
193
- format: "json"
194
- }, params)),
195
- /**
196
- * @description 新規アカウントを作成する
197
- *
198
- * @tags internal, account
199
- * @name Create
200
- * @summary create
201
- * @request POST:/v1/internal/account
202
- * @secure
203
- */
204
- create: (data, params = {}) => this.request(__spreadValues({
205
- path: `/v1/internal/account`,
206
- method: "POST",
207
- body: data,
208
- secure: true,
209
- type: "application/json" /* Json */,
210
- format: "json"
211
- }, params)),
212
- /**
213
- * @description アカウント詳細を取得する(オプション含む)
214
- *
215
- * @tags internal, account
216
- * @name Get
217
- * @summary get
218
- * @request GET:/v1/internal/account/{projectId}
219
- * @secure
220
- */
221
- get: (projectId, params = {}) => this.request(__spreadValues({
222
- path: `/v1/internal/account/${projectId}`,
223
- method: "GET",
224
- secure: true,
225
- format: "json"
226
- }, params)),
227
- /**
228
- * @description アカウント設定を更新する(プラン、クレジット上限、オプション)
229
- *
230
- * @tags internal, account
231
- * @name Update
232
- * @summary update
233
- * @request PUT:/v1/internal/account/{projectId}
234
- * @secure
235
- */
236
- update: (projectId, data, params = {}) => this.request(__spreadValues({
237
- path: `/v1/internal/account/${projectId}`,
238
- method: "PUT",
239
- body: data,
240
- secure: true,
241
- type: "application/json" /* Json */,
242
- format: "json"
243
- }, params)),
244
- /**
245
- * @description アカウントのメンバー一覧を取得する(管理者用)
246
- *
247
- * @tags internal, account
248
- * @name ListMembers
249
- * @summary listMembers
250
- * @request GET:/v1/internal/account/{projectId}/members
251
- * @secure
252
- */
253
- listMembers: (projectId, query, params = {}) => this.request(__spreadValues({
254
- path: `/v1/internal/account/${projectId}/members`,
255
- method: "GET",
256
- query,
257
- secure: true,
258
- format: "json"
259
- }, params)),
260
- /**
261
- * @description 複数アカウントのクレジット情報を取得
262
- *
263
- * @tags internal, account
264
- * @name BatchCredits
265
- * @summary batchCredits
266
- * @request POST:/v1/internal/account/batch-credits
267
- * @secure
268
- */
269
- batchCredits: (data, params = {}) => this.request(__spreadValues({
270
- path: `/v1/internal/account/batch-credits`,
271
- method: "POST",
272
- body: data,
273
- secure: true,
274
- type: "application/json" /* Json */,
275
- format: "json"
276
- }, params))
277
- };
278
- this.internalFeature = {
279
- /**
280
- * @description ユーザーのすべてのフィーチャーとその現在のステータスを一覧表示
281
- *
282
- * @tags internal, feature
283
- * @name List
284
- * @summary list
285
- * @request GET:/v1/internal/feature
286
- * @originalName list
287
- * @duplicate
288
- * @secure
289
- */
290
- list: (params = {}) => this.request(__spreadValues({
291
- path: `/v1/internal/feature`,
292
- method: "GET",
293
- secure: true,
294
- format: "json"
295
- }, params)),
296
- /**
297
- * @description 現在のユーザーのフィーチャー上書きを取得
298
- *
299
- * @tags internal, feature
300
- * @name GetOverrides
301
- * @summary getOverrides
302
- * @request GET:/v1/internal/feature/overrides
303
- * @secure
304
- */
305
- getOverrides: (params = {}) => this.request(__spreadValues({
306
- path: `/v1/internal/feature/overrides`,
307
- method: "GET",
308
- secure: true,
309
- format: "json"
310
- }, params)),
311
- /**
312
- * @description 現在のユーザーのフィーチャー上書きを設定または解除
313
- *
314
- * @tags internal, feature
315
- * @name SetOverride
316
- * @summary setOverride
317
- * @request POST:/v1/internal/feature/override
318
- * @secure
319
- */
320
- setOverride: (data, params = {}) => this.request(__spreadValues({
321
- path: `/v1/internal/feature/override`,
322
- method: "POST",
323
- body: data,
324
- secure: true,
325
- type: "application/json" /* Json */,
326
- format: "json"
327
- }, params)),
328
- /**
329
- * @description 現在のユーザーのすべてのフィーチャー上書きを解除
330
- *
331
- * @tags internal, feature
332
- * @name ClearAllOverrides
333
- * @summary clearAllOverrides
334
- * @request POST:/v1/internal/feature/override/clear-all
335
- * @secure
336
- */
337
- clearAllOverrides: (params = {}) => this.request(__spreadValues({
338
- path: `/v1/internal/feature/override/clear-all`,
339
- method: "POST",
340
- secure: true,
341
- format: "json"
342
- }, params)),
343
- /**
344
- * @description フィーチャーの条件を更新
345
- *
346
- * @tags internal, feature
347
- * @name UpdateConditions
348
- * @summary updateConditions
349
- * @request POST:/v1/internal/feature/conditions
350
- * @secure
351
- */
352
- updateConditions: (data, params = {}) => this.request(__spreadValues({
353
- path: `/v1/internal/feature/conditions`,
354
- method: "POST",
355
- body: data,
356
- secure: true,
357
- type: "application/json" /* Json */,
358
- format: "json"
359
- }, params)),
360
- /**
361
- * @description フィーチャーの条件をコードのデフォルトにリセット
362
- *
363
- * @tags internal, feature
364
- * @name ResetConditions
365
- * @summary resetConditions
366
- * @request POST:/v1/internal/feature/conditions/reset
367
- * @secure
368
- */
369
- resetConditions: (data, params = {}) => this.request(__spreadValues({
370
- path: `/v1/internal/feature/conditions/reset`,
371
- method: "POST",
372
- body: data,
373
- secure: true,
374
- type: "application/json" /* Json */,
375
- format: "json"
376
- }, params)),
377
- /**
378
- * @description すべてのグループとそのメンバーを一覧表示
379
- *
380
- * @tags internal, feature
381
- * @name ListGroups
382
- * @summary listGroups
383
- * @request GET:/v1/internal/feature/groups
384
- * @secure
385
- */
386
- listGroups: (params = {}) => this.request(__spreadValues({
387
- path: `/v1/internal/feature/groups`,
388
- method: "GET",
389
- secure: true,
390
- format: "json"
391
- }, params)),
392
- /**
393
- * @description 全ユーザー一覧を取得
394
- *
395
- * @tags internal, feature
396
- * @name ListUsers
397
- * @summary listUsers
398
- * @request GET:/v1/internal/feature/users
399
- * @secure
400
- */
401
- listUsers: (params = {}) => this.request(__spreadValues({
402
- path: `/v1/internal/feature/users`,
403
- method: "GET",
404
- secure: true,
405
- format: "json"
406
- }, params)),
407
- /**
408
- * @description 全アカウント一覧を取得
409
- *
410
- * @tags internal, feature
411
- * @name ListAccounts
412
- * @summary listAccounts
413
- * @request GET:/v1/internal/feature/accounts
414
- * @secure
415
- */
416
- listAccounts: (params = {}) => this.request(__spreadValues({
417
- path: `/v1/internal/feature/accounts`,
418
- method: "GET",
419
- secure: true,
420
- format: "json"
421
- }, params)),
422
- /**
423
- * @description グループにメンバーを追加
424
- *
425
- * @tags internal, feature
426
- * @name AddGroupMember
427
- * @summary addGroupMember
428
- * @request POST:/v1/internal/feature/group/member
429
- * @secure
430
- */
431
- addGroupMember: (data, params = {}) => this.request(__spreadValues({
432
- path: `/v1/internal/feature/group/member`,
433
- method: "POST",
434
- body: data,
435
- secure: true,
436
- type: "application/json" /* Json */,
437
- format: "json"
438
- }, params)),
439
- /**
440
- * @description グループからメンバーを削除
441
- *
442
- * @tags internal, feature
443
- * @name RemoveGroupMember
444
- * @summary removeGroupMember
445
- * @request POST:/v1/internal/feature/group/member/remove
446
- * @secure
447
- */
448
- removeGroupMember: (data, params = {}) => this.request(__spreadValues({
449
- path: `/v1/internal/feature/group/member/remove`,
450
- method: "POST",
451
- body: data,
452
- secure: true,
453
- type: "application/json" /* Json */,
454
- format: "json"
455
- }, params))
456
- };
457
- this.internalGlobalAgent = {
458
- /**
459
- * @description グローバルエージェント一覧を取得する
460
- *
461
- * @tags internal, globalAgent
462
- * @name ListGlobalAgents
463
- * @summary listGlobalAgents
464
- * @request GET:/v1/internal/global-agent
465
- * @secure
466
- */
467
- listGlobalAgents: (params = {}) => this.request(__spreadValues({
468
- path: `/v1/internal/global-agent`,
469
- method: "GET",
470
- secure: true,
471
- format: "json"
472
- }, params)),
473
- /**
474
- * @description グローバルエージェントを作成する
475
- *
476
- * @tags internal, globalAgent
477
- * @name CreateGlobalAgent
478
- * @summary createGlobalAgent
479
- * @request POST:/v1/internal/global-agent
480
- * @secure
481
- */
482
- createGlobalAgent: (data, params = {}) => this.request(__spreadValues({
483
- path: `/v1/internal/global-agent`,
484
- method: "POST",
485
- body: data,
486
- secure: true,
487
- type: "application/json" /* Json */,
488
- format: "json"
489
- }, params)),
490
- /**
491
- * @description グローバルエージェント詳細を取得する
492
- *
493
- * @tags internal, globalAgent
494
- * @name GetGlobalAgent
495
- * @summary getGlobalAgent
496
- * @request GET:/v1/internal/global-agent/{id}
497
- * @secure
498
- */
499
- getGlobalAgent: (id, params = {}) => this.request(__spreadValues({
500
- path: `/v1/internal/global-agent/${id}`,
501
- method: "GET",
502
- secure: true,
503
- format: "json"
504
- }, params)),
505
- /**
506
- * @description グローバルエージェントを更新する
507
- *
508
- * @tags internal, globalAgent
509
- * @name UpdateGlobalAgent
510
- * @summary updateGlobalAgent
511
- * @request PUT:/v1/internal/global-agent/{id}
512
- * @secure
513
- */
514
- updateGlobalAgent: (id, data, params = {}) => this.request(__spreadValues({
515
- path: `/v1/internal/global-agent/${id}`,
516
- method: "PUT",
517
- body: data,
518
- secure: true,
519
- type: "application/json" /* Json */,
520
- format: "json"
521
- }, params)),
522
- /**
523
- * @description グローバルエージェントを削除する
524
- *
525
- * @tags internal, globalAgent
526
- * @name DeleteGlobalAgent
527
- * @summary deleteGlobalAgent
528
- * @request DELETE:/v1/internal/global-agent/{id}
529
- * @secure
530
- */
531
- deleteGlobalAgent: (id, data, params = {}) => this.request(__spreadValues({
532
- path: `/v1/internal/global-agent/${id}`,
533
- method: "DELETE",
534
- body: data,
535
- secure: true,
536
- type: "application/json" /* Json */,
537
- format: "json"
538
- }, params))
539
- };
540
- this.internalChat = {
541
- /**
542
- * @description ユーザーのセッションを作成してトークンを返す
543
- *
544
- * @tags internal, chat
545
- * @name CreateSession
546
- * @summary createSession
547
- * @request POST:/v1/internal/chat/create-session
548
- * @secure
549
- */
550
- createSession: (data, params = {}) => this.request(__spreadValues({
551
- path: `/v1/internal/chat/create-session`,
552
- method: "POST",
553
- body: data,
554
- secure: true,
555
- type: "application/json" /* Json */,
556
- format: "json"
557
- }, params))
558
- };
559
- this.agent = {
560
- /**
561
- * @description エージェント一覧を取得する
562
- *
563
- * @tags agent
564
- * @name List
565
- * @summary list
566
- * @request GET:/v1/agent
567
- * @secure
568
- */
569
- list: (params = {}) => this.request(__spreadValues({
570
- path: `/v1/agent`,
571
- method: "GET",
572
- secure: true,
573
- format: "json"
574
- }, params)),
575
- /**
576
- * @description エージェントを作成する
577
- *
578
- * @tags agent
579
- * @name Create
580
- * @summary create
581
- * @request POST:/v1/agent
582
- * @secure
583
- */
584
- create: (data, params = {}) => this.request(__spreadValues({
585
- path: `/v1/agent`,
586
- method: "POST",
587
- body: data,
588
- secure: true,
589
- type: "application/json" /* Json */,
590
- format: "json"
591
- }, params)),
592
- /**
593
- * @description エージェント詳細を取得する
594
- *
595
- * @tags agent
596
- * @name Get
597
- * @summary get
598
- * @request GET:/v1/agent/{id}
599
- * @secure
600
- */
601
- get: (id, params = {}) => this.request(__spreadValues({
602
- path: `/v1/agent/${id}`,
603
- method: "GET",
604
- secure: true,
605
- format: "json"
606
- }, params)),
607
- /**
608
- * @description エージェントを更新する
609
- *
610
- * @tags agent
611
- * @name Update
612
- * @summary update
613
- * @request PUT:/v1/agent/{id}
614
- * @secure
615
- */
616
- update: (id, data, params = {}) => this.request(__spreadValues({
617
- path: `/v1/agent/${id}`,
618
- method: "PUT",
619
- body: data,
620
- secure: true,
621
- type: "application/json" /* Json */,
622
- format: "json"
623
- }, params)),
624
- /**
625
- * @description エージェントを削除する
626
- *
627
- * @tags agent
628
- * @name Delete
629
- * @summary delete
630
- * @request DELETE:/v1/agent/{id}
631
- * @secure
632
- */
633
- delete: (id, data, params = {}) => this.request(__spreadValues({
634
- path: `/v1/agent/${id}`,
635
- method: "DELETE",
636
- body: data,
637
- secure: true,
638
- type: "application/json" /* Json */,
639
- format: "json"
640
- }, params)),
641
- /**
642
- * @description エージェントのUI機能設定を取得する(公開)
643
- *
644
- * @tags agent
645
- * @name GetInterfaceFeatures
646
- * @summary getInterfaceFeatures
647
- * @request GET:/v1/agent/interface-features
648
- * @secure
649
- */
650
- getInterfaceFeatures: (query, params = {}) => this.request(__spreadValues({
651
- path: `/v1/agent/interface-features`,
652
- method: "GET",
653
- query,
654
- secure: true,
655
- format: "json"
656
- }, params)),
657
- /**
658
- * @description エージェントのツール設定を取得する(公開)
659
- *
660
- * @tags agent
661
- * @name GetToolSettings
662
- * @summary getToolSettings
663
- * @request POST:/v1/agent/tool-settings
664
- * @secure
665
- */
666
- getToolSettings: (data, params = {}) => this.request(__spreadValues({
667
- path: `/v1/agent/tool-settings`,
668
- method: "POST",
669
- body: data,
670
- secure: true,
671
- type: "application/json" /* Json */,
672
- format: "json"
673
- }, params))
674
- };
675
- this.apiKeys = {
676
- /**
677
- * @description APIキー一覧を取得する
678
- *
679
- * @tags apiKey
680
- * @name List
681
- * @summary list
682
- * @request GET:/v1/api-keys/{type}
683
- * @secure
684
- */
685
- list: (type, params = {}) => this.request(__spreadValues({
686
- path: `/v1/api-keys/${type}`,
687
- method: "GET",
688
- secure: true,
689
- format: "json"
690
- }, params)),
691
- /**
692
- * @description APIキーを作成する
693
- *
694
- * @tags apiKey
695
- * @name Create
696
- * @summary create
697
- * @request POST:/v1/api-keys
698
- * @secure
699
- */
700
- create: (data, params = {}) => this.request(__spreadValues({
701
- path: `/v1/api-keys`,
702
- method: "POST",
703
- body: data,
704
- secure: true,
705
- type: "application/json" /* Json */,
706
- format: "json"
707
- }, params)),
708
- /**
709
- * @description APIキーを更新する
710
- *
711
- * @tags apiKey
712
- * @name Update
713
- * @summary update
714
- * @request PATCH:/v1/api-keys/{id}
715
- * @secure
716
- */
717
- update: (id, data, params = {}) => this.request(__spreadValues({
718
- path: `/v1/api-keys/${id}`,
719
- method: "PATCH",
720
- body: data,
721
- secure: true,
722
- type: "application/json" /* Json */,
723
- format: "json"
724
- }, params)),
725
- /**
726
- * @description APIキーを削除する
727
- *
728
- * @tags apiKey
729
- * @name Delete
730
- * @summary delete
731
- * @request DELETE:/v1/api-keys/{id}
732
- * @secure
733
- */
734
- delete: (id, data, params = {}) => this.request(__spreadValues({
735
- path: `/v1/api-keys/${id}`,
736
- method: "DELETE",
737
- body: data,
738
- secure: true,
739
- type: "application/json" /* Json */,
740
- format: "json"
741
- }, params))
742
- };
743
- this.chat = {
744
- /**
745
- * @description ユーザーのチャットメッセージ一覧を返す
746
- *
747
- * @tags chat
748
- * @name ListMessages
749
- * @summary listMessages
750
- * @request POST:/v1/chat/list-messages
751
- * @secure
752
- */
753
- listMessages: (data, params = {}) => this.request(__spreadValues({
754
- path: `/v1/chat/list-messages`,
755
- method: "POST",
756
- body: data,
757
- secure: true,
758
- type: "application/json" /* Json */,
759
- format: "json"
760
- }, params)),
761
- /**
762
- * @description ユーザーのチャット一覧を返す
763
- *
764
- * @tags chat
765
- * @name MyList
766
- * @summary myList
767
- * @request POST:/v1/chat/my-list
768
- * @secure
769
- */
770
- myList: (params = {}) => this.request(__spreadValues({
771
- path: `/v1/chat/my-list`,
772
- method: "POST",
773
- secure: true,
774
- format: "json"
775
- }, params)),
776
- /**
777
- * @description ユーザーのチャットのタイトルを返す
778
- *
779
- * @tags chat
780
- * @name GetTitle
781
- * @summary getTitle
782
- * @request POST:/v1/chat/get-title
783
- * @secure
784
- */
785
- getTitle: (data, params = {}) => this.request(__spreadValues({
786
- path: `/v1/chat/get-title`,
787
- method: "POST",
788
- body: data,
789
- secure: true,
790
- type: "application/json" /* Json */,
791
- format: "json"
792
- }, params)),
793
- /**
794
- * @description メッセージに対する評価を送信する
795
- *
796
- * @tags chat
797
- * @name SubmitFeedback
798
- * @summary submitFeedback
799
- * @request POST:/v1/chat/submit-feedback
800
- * @secure
801
- */
802
- submitFeedback: (data, params = {}) => this.request(__spreadValues({
803
- path: `/v1/chat/submit-feedback`,
804
- method: "POST",
805
- body: data,
806
- secure: true,
807
- type: "application/json" /* Json */,
808
- format: "json"
809
- }, params)),
810
- /**
811
- * @description メッセージの評価を削除する
812
- *
813
- * @tags chat
814
- * @name DeleteFeedback
815
- * @summary deleteFeedback
816
- * @request POST:/v1/chat/delete-feedback
817
- * @secure
818
- */
819
- deleteFeedback: (data, params = {}) => this.request(__spreadValues({
820
- path: `/v1/chat/delete-feedback`,
821
- method: "POST",
822
- body: data,
823
- secure: true,
824
- type: "application/json" /* Json */,
825
- format: "json"
826
- }, params))
827
- };
828
- this.members = {
829
- /**
830
- * @description メンバー一覧を取得する
831
- *
832
- * @tags member
833
- * @name List
834
- * @summary list
835
- * @request GET:/v1/members
836
- * @secure
837
- */
838
- list: (query, params = {}) => this.request(__spreadValues({
839
- path: `/v1/members`,
840
- method: "GET",
841
- query,
842
- secure: true,
843
- format: "json"
844
- }, params)),
845
- /**
846
- * @description メンバー詳細を取得する
847
- *
848
- * @tags member
849
- * @name Get
850
- * @summary get
851
- * @request GET:/v1/members/{memberId}
852
- * @secure
853
- */
854
- get: (memberId, params = {}) => this.request(__spreadValues({
855
- path: `/v1/members/${memberId}`,
856
- method: "GET",
857
- secure: true,
858
- format: "json"
859
- }, params)),
860
- /**
861
- * @description メンバーのロールを更新する
862
- *
863
- * @tags member
864
- * @name Update
865
- * @summary update
866
- * @request PUT:/v1/members/{memberId}
867
- * @secure
868
- */
869
- update: (memberId, data, params = {}) => this.request(__spreadValues({
870
- path: `/v1/members/${memberId}`,
871
- method: "PUT",
872
- body: data,
873
- secure: true,
874
- type: "application/json" /* Json */,
875
- format: "json"
876
- }, params)),
877
- /**
878
- * @description メンバーの使用統計を取得する
879
- *
880
- * @tags member
881
- * @name Usage
882
- * @summary usage
883
- * @request GET:/v1/members/{memberId}/usage
884
- * @secure
885
- */
886
- usage: (memberId, params = {}) => this.request(__spreadValues({
887
- path: `/v1/members/${memberId}/usage`,
888
- method: "GET",
889
- secure: true,
890
- format: "json"
891
- }, params)),
892
- /**
893
- * @description メンバーのチャット履歴を取得する
894
- *
895
- * @tags member
896
- * @name Chats
897
- * @summary chats
898
- * @request GET:/v1/members/{memberId}/chats
899
- * @secure
900
- */
901
- chats: (memberId, query, params = {}) => this.request(__spreadValues({
902
- path: `/v1/members/${memberId}/chats`,
903
- method: "GET",
904
- query,
905
- secure: true,
906
- format: "json"
907
- }, params)),
908
- /**
909
- * @description メンバーの使用イベント履歴を取得する
910
- *
911
- * @tags member
912
- * @name Events
913
- * @summary events
914
- * @request GET:/v1/members/{memberId}/events
915
- * @secure
916
- */
917
- events: (memberId, query, params = {}) => this.request(__spreadValues({
918
- path: `/v1/members/${memberId}/events`,
919
- method: "GET",
920
- query,
921
- secure: true,
922
- format: "json"
923
- }, params)),
924
- /**
925
- * @description メンバーのフィードバック履歴を取得する
926
- *
927
- * @tags member
928
- * @name Feedback
929
- * @summary feedback
930
- * @request GET:/v1/members/{memberId}/feedback
931
- * @secure
932
- */
933
- feedback: (memberId, query, params = {}) => this.request(__spreadValues({
934
- path: `/v1/members/${memberId}/feedback`,
935
- method: "GET",
936
- query,
937
- secure: true,
938
- format: "json"
939
- }, params)),
940
- /**
941
- * @description 複数メンバーのクレジット使用量を取得
942
- *
943
- * @tags member
944
- * @name BatchCredits
945
- * @summary batchCredits
946
- * @request POST:/v1/members/batch-credits
947
- * @secure
948
- */
949
- batchCredits: (data, params = {}) => this.request(__spreadValues({
950
- path: `/v1/members/batch-credits`,
951
- method: "POST",
952
- body: data,
953
- secure: true,
954
- type: "application/json" /* Json */,
955
- format: "json"
956
- }, params))
957
- };
958
- this.usage = {
959
- /**
960
- * @description プロジェクトの使用量サマリーを取得する
961
- *
962
- * @tags usage
963
- * @name Summary
964
- * @summary summary
965
- * @request GET:/v1/usage/summary
966
- * @secure
967
- */
968
- summary: (query, params = {}) => this.request(__spreadValues({
969
- path: `/v1/usage/summary`,
970
- method: "GET",
971
- query,
972
- secure: true,
973
- format: "json"
974
- }, params)),
975
- /**
976
- * @description ユーザー別の使用量を取得する
977
- *
978
- * @tags usage
979
- * @name ByUser
980
- * @summary byUser
981
- * @request GET:/v1/usage/by-user
982
- * @secure
983
- */
984
- byUser: (query, params = {}) => this.request(__spreadValues({
985
- path: `/v1/usage/by-user`,
986
- method: "GET",
987
- query,
988
- secure: true,
989
- format: "json"
990
- }, params)),
991
- /**
992
- * @description エージェント別の使用量を取得する
993
- *
994
- * @tags usage
995
- * @name ByAgent
996
- * @summary byAgent
997
- * @request GET:/v1/usage/by-agent
998
- * @secure
999
- */
1000
- byAgent: (query, params = {}) => this.request(__spreadValues({
1001
- path: `/v1/usage/by-agent`,
1002
- method: "GET",
1003
- query,
1004
- secure: true,
1005
- format: "json"
1006
- }, params)),
1007
- /**
1008
- * @description モデル別の使用量を取得する
1009
- *
1010
- * @tags usage
1011
- * @name ByModel
1012
- * @summary byModel
1013
- * @request GET:/v1/usage/by-model
1014
- * @secure
1015
- */
1016
- byModel: (query, params = {}) => this.request(__spreadValues({
1017
- path: `/v1/usage/by-model`,
1018
- method: "GET",
1019
- query,
1020
- secure: true,
1021
- format: "json"
1022
- }, params))
1023
- };
1024
- }
1025
- };
1026
-
1027
- // src/sdk/index.ts
1028
- function createClient(params) {
1029
- var _a, _b, _c;
1030
- const baseUrl = `${(_b = (_a = params == null ? void 0 : params.baseUrl) != null ? _a : process.env.AI_AGENT_API_ENDPOINT) != null ? _b : API_ENDPOINT}/api`;
1031
- const apiKey = (_c = params == null ? void 0 : params.apiKey) != null ? _c : process.env.AI_AGENT_API_KEY;
1032
- if (!apiKey) {
1033
- throw new Error("API\u30AD\u30FC\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
1034
- }
1035
- if (!baseUrl) {
1036
- throw new Error("API\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");
1037
- }
1038
- return new Api({
1039
- baseUrl,
1040
- baseApiParams: {
1041
- secure: true
1042
- },
1043
- async securityWorker() {
1044
- return {
1045
- headers: {
1046
- Authorization: `Bearer ${apiKey}`
1047
- }
1048
- };
1049
- }
1050
- });
1051
- }
1052
- export {
1053
- Api,
1054
- ContentType,
1055
- HttpClient,
1056
- createClient
1057
- };
4
+ export { Api, ContentType, HttpClient, createClient };