@super_studio/ecforce-ai-agent-server 1.2.0 → 1.3.0-canary.0

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.
@@ -309,6 +309,7 @@ export class Api<
309
309
  list: (
310
310
  query?: {
311
311
  q?: string;
312
+ plan?: "free" | "pro";
312
313
  /**
313
314
  * @min 1
314
315
  * @max 9007199254740991
@@ -425,6 +426,8 @@ export class Api<
425
426
  plan?: any;
426
427
  creditLimit: number;
427
428
  agentLimit: number;
429
+ upgradedAt: string | null;
430
+ downgradedAt: string | null;
428
431
  /** @format date-time */
429
432
  createdAt: string;
430
433
  /** @format date-time */
@@ -763,8 +766,10 @@ export class Api<
763
766
  {
764
767
  overrides: Record<
765
768
  | "adminSettings"
769
+ | "accountManagement"
766
770
  | "featureOverrides"
767
771
  | "accountSettings"
772
+ | "spstBillingExclusion"
768
773
  | "reactScan"
769
774
  | "chatDevTool"
770
775
  | "advancedAnalytics"
@@ -800,8 +805,10 @@ export class Api<
800
805
  data: {
801
806
  featureKey:
802
807
  | "adminSettings"
808
+ | "accountManagement"
803
809
  | "featureOverrides"
804
810
  | "accountSettings"
811
+ | "spstBillingExclusion"
805
812
  | "reactScan"
806
813
  | "chatDevTool"
807
814
  | "advancedAnalytics"
@@ -868,8 +875,10 @@ export class Api<
868
875
  data: {
869
876
  featureKey:
870
877
  | "adminSettings"
878
+ | "accountManagement"
871
879
  | "featureOverrides"
872
880
  | "accountSettings"
881
+ | "spstBillingExclusion"
873
882
  | "reactScan"
874
883
  | "chatDevTool"
875
884
  | "advancedAnalytics"
@@ -925,8 +934,10 @@ export class Api<
925
934
  data: {
926
935
  featureKey:
927
936
  | "adminSettings"
937
+ | "accountManagement"
928
938
  | "featureOverrides"
929
939
  | "accountSettings"
940
+ | "spstBillingExclusion"
930
941
  | "reactScan"
931
942
  | "chatDevTool"
932
943
  | "advancedAnalytics"
@@ -968,7 +979,7 @@ export class Api<
968
979
  this.request<
969
980
  {
970
981
  userGroups: {
971
- key: "developers" | "testers";
982
+ key: "developers" | "operations" | "testers";
972
983
  name: string;
973
984
  description: string;
974
985
  members: {
@@ -1006,7 +1017,7 @@ export class Api<
1006
1017
  data:
1007
1018
  | {
1008
1019
  type: "user";
1009
- groupKey: "developers" | "testers";
1020
+ groupKey: "developers" | "operations" | "testers";
1010
1021
  /** @minItems 1 */
1011
1022
  userIds: string[];
1012
1023
  }
@@ -1047,7 +1058,7 @@ export class Api<
1047
1058
  data:
1048
1059
  | {
1049
1060
  type: "user";
1050
- groupKey: "developers" | "testers";
1061
+ groupKey: "developers" | "operations" | "testers";
1051
1062
  /** @minItems 1 */
1052
1063
  userIds: string[];
1053
1064
  }
@@ -1260,25 +1271,26 @@ export class Api<
1260
1271
  description?: string;
1261
1272
  configJson: {
1262
1273
  defaultModel:
1263
- | "gpt-4.1-mini"
1264
- | "gpt-4.1-nano"
1265
- | "o3-mini"
1266
- | "o4-mini"
1267
- | "gpt-5"
1268
- | "gpt-5-mini"
1269
- | "gpt-5-nano"
1274
+ | "gpt-5.2-high"
1275
+ | "gpt-5.2"
1270
1276
  | "gpt-5.1-high"
1271
1277
  | "gpt-5.1"
1272
- | "gemini-2.0-flash"
1273
- | "gemini-2.5-flash"
1278
+ | "gpt-4.1-mini"
1279
+ | "gpt-4.1-nano"
1280
+ | "gemini-3.1-pro"
1274
1281
  | "gemini-3-flash"
1275
- | "gemini-3-pro"
1276
- | "claude-sonnet-4-5"
1282
+ | "gemini-2.5-pro"
1283
+ | "gemini-2.5-flash"
1284
+ | "claude-opus-4-6-thinking"
1285
+ | "claude-opus-4-6"
1286
+ | "claude-opus-4-5-thinking"
1287
+ | "claude-opus-4-5"
1288
+ | "claude-sonnet-4-6-thinking"
1289
+ | "claude-sonnet-4-6"
1277
1290
  | "claude-sonnet-4-5-thinking"
1278
- | "claude-haiku-4-5"
1291
+ | "claude-sonnet-4-5"
1279
1292
  | "claude-haiku-4-5-thinking"
1280
- | "claude-opus-4-5"
1281
- | "claude-opus-4-5-thinking";
1293
+ | "claude-haiku-4-5";
1282
1294
  /** @maxLength 50000 */
1283
1295
  systemPrompt: string;
1284
1296
  nativeTools: {
@@ -1443,25 +1455,26 @@ export class Api<
1443
1455
  description?: string;
1444
1456
  configJson?: {
1445
1457
  defaultModel:
1446
- | "gpt-4.1-mini"
1447
- | "gpt-4.1-nano"
1448
- | "o3-mini"
1449
- | "o4-mini"
1450
- | "gpt-5"
1451
- | "gpt-5-mini"
1452
- | "gpt-5-nano"
1458
+ | "gpt-5.2-high"
1459
+ | "gpt-5.2"
1453
1460
  | "gpt-5.1-high"
1454
1461
  | "gpt-5.1"
1455
- | "gemini-2.0-flash"
1456
- | "gemini-2.5-flash"
1462
+ | "gpt-4.1-mini"
1463
+ | "gpt-4.1-nano"
1464
+ | "gemini-3.1-pro"
1457
1465
  | "gemini-3-flash"
1458
- | "gemini-3-pro"
1459
- | "claude-sonnet-4-5"
1466
+ | "gemini-2.5-pro"
1467
+ | "gemini-2.5-flash"
1468
+ | "claude-opus-4-6-thinking"
1469
+ | "claude-opus-4-6"
1470
+ | "claude-opus-4-5-thinking"
1471
+ | "claude-opus-4-5"
1472
+ | "claude-sonnet-4-6-thinking"
1473
+ | "claude-sonnet-4-6"
1460
1474
  | "claude-sonnet-4-5-thinking"
1461
- | "claude-haiku-4-5"
1475
+ | "claude-sonnet-4-5"
1462
1476
  | "claude-haiku-4-5-thinking"
1463
- | "claude-opus-4-5"
1464
- | "claude-opus-4-5-thinking";
1477
+ | "claude-haiku-4-5";
1465
1478
  /** @maxLength 50000 */
1466
1479
  systemPrompt: string;
1467
1480
  nativeTools: {
@@ -1900,6 +1913,42 @@ export class Api<
1900
1913
  ...params,
1901
1914
  }),
1902
1915
  };
1916
+ internalUsage = {
1917
+ /**
1918
+ * @description 任意プロジェクトの使用量サマリーを取得する
1919
+ *
1920
+ * @tags internal, usage
1921
+ * @name GetUsageSummary
1922
+ * @summary getUsageSummary
1923
+ * @request GET:/v1/internal/usage/summary
1924
+ * @secure
1925
+ */
1926
+ getUsageSummary: (
1927
+ query: {
1928
+ /** @minLength 1 */
1929
+ projectId: string;
1930
+ period?: string;
1931
+ },
1932
+ params: RequestParams = {},
1933
+ ) =>
1934
+ this.request<
1935
+ {
1936
+ plan: string;
1937
+ totalUsedCredits: number;
1938
+ creditLimit: number;
1939
+ remainingCredits: number | null;
1940
+ billingPeriod: string;
1941
+ },
1942
+ any
1943
+ >({
1944
+ path: `/v1/internal/usage/summary`,
1945
+ method: "GET",
1946
+ query: query,
1947
+ secure: true,
1948
+ format: "json",
1949
+ ...params,
1950
+ }),
1951
+ };
1903
1952
  feature = {
1904
1953
  /**
1905
1954
  * @description 現在のユーザーのフィーチャーステータスを取得
@@ -2068,25 +2117,26 @@ export class Api<
2068
2117
  description?: string;
2069
2118
  configJson: {
2070
2119
  defaultModel:
2071
- | "gpt-4.1-mini"
2072
- | "gpt-4.1-nano"
2073
- | "o3-mini"
2074
- | "o4-mini"
2075
- | "gpt-5"
2076
- | "gpt-5-mini"
2077
- | "gpt-5-nano"
2120
+ | "gpt-5.2-high"
2121
+ | "gpt-5.2"
2078
2122
  | "gpt-5.1-high"
2079
2123
  | "gpt-5.1"
2080
- | "gemini-2.0-flash"
2081
- | "gemini-2.5-flash"
2124
+ | "gpt-4.1-mini"
2125
+ | "gpt-4.1-nano"
2126
+ | "gemini-3.1-pro"
2082
2127
  | "gemini-3-flash"
2083
- | "gemini-3-pro"
2084
- | "claude-sonnet-4-5"
2128
+ | "gemini-2.5-pro"
2129
+ | "gemini-2.5-flash"
2130
+ | "claude-opus-4-6-thinking"
2131
+ | "claude-opus-4-6"
2132
+ | "claude-opus-4-5-thinking"
2133
+ | "claude-opus-4-5"
2134
+ | "claude-sonnet-4-6-thinking"
2135
+ | "claude-sonnet-4-6"
2085
2136
  | "claude-sonnet-4-5-thinking"
2086
- | "claude-haiku-4-5"
2137
+ | "claude-sonnet-4-5"
2087
2138
  | "claude-haiku-4-5-thinking"
2088
- | "claude-opus-4-5"
2089
- | "claude-opus-4-5-thinking";
2139
+ | "claude-haiku-4-5";
2090
2140
  /** @maxLength 50000 */
2091
2141
  systemPrompt: string;
2092
2142
  nativeTools: {
@@ -2251,25 +2301,26 @@ export class Api<
2251
2301
  description?: string;
2252
2302
  configJson?: {
2253
2303
  defaultModel:
2254
- | "gpt-4.1-mini"
2255
- | "gpt-4.1-nano"
2256
- | "o3-mini"
2257
- | "o4-mini"
2258
- | "gpt-5"
2259
- | "gpt-5-mini"
2260
- | "gpt-5-nano"
2304
+ | "gpt-5.2-high"
2305
+ | "gpt-5.2"
2261
2306
  | "gpt-5.1-high"
2262
2307
  | "gpt-5.1"
2263
- | "gemini-2.0-flash"
2264
- | "gemini-2.5-flash"
2308
+ | "gpt-4.1-mini"
2309
+ | "gpt-4.1-nano"
2310
+ | "gemini-3.1-pro"
2265
2311
  | "gemini-3-flash"
2266
- | "gemini-3-pro"
2267
- | "claude-sonnet-4-5"
2312
+ | "gemini-2.5-pro"
2313
+ | "gemini-2.5-flash"
2314
+ | "claude-opus-4-6-thinking"
2315
+ | "claude-opus-4-6"
2316
+ | "claude-opus-4-5-thinking"
2317
+ | "claude-opus-4-5"
2318
+ | "claude-sonnet-4-6-thinking"
2319
+ | "claude-sonnet-4-6"
2268
2320
  | "claude-sonnet-4-5-thinking"
2269
- | "claude-haiku-4-5"
2321
+ | "claude-sonnet-4-5"
2270
2322
  | "claude-haiku-4-5-thinking"
2271
- | "claude-opus-4-5"
2272
- | "claude-opus-4-5-thinking";
2323
+ | "claude-haiku-4-5";
2273
2324
  /** @maxLength 50000 */
2274
2325
  systemPrompt: string;
2275
2326
  nativeTools: {
@@ -2400,25 +2451,26 @@ export class Api<
2400
2451
  attachments?: boolean;
2401
2452
  };
2402
2453
  defaultModel:
2403
- | "gpt-4.1-mini"
2404
- | "gpt-4.1-nano"
2405
- | "o3-mini"
2406
- | "o4-mini"
2407
- | "gpt-5"
2408
- | "gpt-5-mini"
2409
- | "gpt-5-nano"
2454
+ | "gpt-5.2-high"
2455
+ | "gpt-5.2"
2410
2456
  | "gpt-5.1-high"
2411
2457
  | "gpt-5.1"
2412
- | "gemini-2.0-flash"
2413
- | "gemini-2.5-flash"
2458
+ | "gpt-4.1-mini"
2459
+ | "gpt-4.1-nano"
2460
+ | "gemini-3.1-pro"
2414
2461
  | "gemini-3-flash"
2415
- | "gemini-3-pro"
2416
- | "claude-sonnet-4-5"
2462
+ | "gemini-2.5-pro"
2463
+ | "gemini-2.5-flash"
2464
+ | "claude-opus-4-6-thinking"
2465
+ | "claude-opus-4-6"
2466
+ | "claude-opus-4-5-thinking"
2467
+ | "claude-opus-4-5"
2468
+ | "claude-sonnet-4-6-thinking"
2469
+ | "claude-sonnet-4-6"
2417
2470
  | "claude-sonnet-4-5-thinking"
2418
- | "claude-haiku-4-5"
2471
+ | "claude-sonnet-4-5"
2419
2472
  | "claude-haiku-4-5-thinking"
2420
- | "claude-opus-4-5"
2421
- | "claude-opus-4-5-thinking";
2473
+ | "claude-haiku-4-5";
2422
2474
  },
2423
2475
  any
2424
2476
  >({
@@ -2452,6 +2504,9 @@ export class Api<
2452
2504
  displayName: string;
2453
2505
  requireConfirmation: boolean;
2454
2506
  description?: string;
2507
+ type?: "native" | "mcp" | "client";
2508
+ group?: string;
2509
+ summary?: string;
2455
2510
  }
2456
2511
  >,
2457
2512
  any
@@ -2487,6 +2542,9 @@ export class Api<
2487
2542
  displayName: string;
2488
2543
  requireConfirmation: boolean;
2489
2544
  description?: string;
2545
+ type?: "native" | "mcp" | "client";
2546
+ group?: string;
2547
+ summary?: string;
2490
2548
  }
2491
2549
  >,
2492
2550
  any
@@ -2692,6 +2750,7 @@ export class Api<
2692
2750
  this.request<
2693
2751
  {
2694
2752
  activeStreamId: string | null;
2753
+ isAgentDeleted: boolean;
2695
2754
  messages: {
2696
2755
  /** @maxLength 30 */
2697
2756
  id: string;
@@ -2771,6 +2830,7 @@ export class Api<
2771
2830
  deletedBy: string | null;
2772
2831
  isGlobalAgent: boolean;
2773
2832
  isPinned: boolean;
2833
+ isAgentDeleted: boolean;
2774
2834
  }[],
2775
2835
  any
2776
2836
  >({
@@ -3136,8 +3196,9 @@ export class Api<
3136
3196
  messages: number;
3137
3197
  }[];
3138
3198
  usageByAgent: {
3139
- agentId: string;
3199
+ agentId: string | null;
3140
3200
  agentName: string | null;
3201
+ callerApp: string | null;
3141
3202
  credits: number;
3142
3203
  messages: number;
3143
3204
  }[];
@@ -3241,10 +3302,11 @@ export class Api<
3241
3302
  {
3242
3303
  items: {
3243
3304
  id: string;
3244
- chatId: string;
3245
- messageId: string;
3246
- agentId: string;
3305
+ chatId: string | null;
3306
+ messageId: string | null;
3307
+ agentId: string | null;
3247
3308
  agentName: string | null;
3309
+ callerApp: string | null;
3248
3310
  model: string;
3249
3311
  usedCredits: number;
3250
3312
  billingPeriod: string;
@@ -3380,6 +3442,7 @@ export class Api<
3380
3442
  */
3381
3443
  list: (
3382
3444
  query?: {
3445
+ ids?: string[];
3383
3446
  q?: string;
3384
3447
  /**
3385
3448
  * @min 1
@@ -3859,6 +3922,66 @@ export class Api<
3859
3922
  ...params,
3860
3923
  }),
3861
3924
  };
3925
+ session = {
3926
+ /**
3927
+ * @description 現在のセッション情報を取得
3928
+ *
3929
+ * @tags session
3930
+ * @name Me
3931
+ * @summary me
3932
+ * @request GET:/v1/session/me
3933
+ * @secure
3934
+ */
3935
+ me: (params: RequestParams = {}) =>
3936
+ this.request<
3937
+ {
3938
+ authenticated: boolean;
3939
+ authType: "cookie" | "api-key" | "jwt" | "unknown";
3940
+ expires: string | null;
3941
+ user: {
3942
+ id: string;
3943
+ email: string;
3944
+ name: string;
3945
+ projectId: string;
3946
+ plan: "free" | "pro";
3947
+ role: "owner" | "member";
3948
+ isSuperUser: boolean;
3949
+ isDevAuth0: boolean;
3950
+ termsAcceptedAt: string | null;
3951
+ } | null;
3952
+ },
3953
+ any
3954
+ >({
3955
+ path: `/v1/session/me`,
3956
+ method: "GET",
3957
+ secure: true,
3958
+ format: "json",
3959
+ ...params,
3960
+ }),
3961
+
3962
+ /**
3963
+ * @description 利用規約に同意
3964
+ *
3965
+ * @tags session
3966
+ * @name AcceptTerms
3967
+ * @summary acceptTerms
3968
+ * @request POST:/v1/session/accept-terms
3969
+ * @secure
3970
+ */
3971
+ acceptTerms: (params: RequestParams = {}) =>
3972
+ this.request<
3973
+ {
3974
+ acceptedAt: string;
3975
+ },
3976
+ any
3977
+ >({
3978
+ path: `/v1/session/accept-terms`,
3979
+ method: "POST",
3980
+ secure: true,
3981
+ format: "json",
3982
+ ...params,
3983
+ }),
3984
+ };
3862
3985
  usage = {
3863
3986
  /**
3864
3987
  * @description プロジェクトの使用量サマリーを取得する
@@ -3952,8 +4075,9 @@ export class Api<
3952
4075
  {
3953
4076
  billingPeriod: string;
3954
4077
  data: {
3955
- agentId: string;
4078
+ agentId: string | null;
3956
4079
  agentName: string | null;
4080
+ callerApp: string | null;
3957
4081
  usedCredits: number;
3958
4082
  messageCount: number;
3959
4083
  }[];
@@ -4001,5 +4125,39 @@ export class Api<
4001
4125
  format: "json",
4002
4126
  ...params,
4003
4127
  }),
4128
+
4129
+ /**
4130
+ * @description 利用金額の上限を設定する
4131
+ *
4132
+ * @tags usage
4133
+ * @name UpdateCreditLimit
4134
+ * @summary updateCreditLimit
4135
+ * @request PATCH:/v1/usage/credit-limit
4136
+ * @secure
4137
+ */
4138
+ updateCreditLimit: (
4139
+ data: {
4140
+ /**
4141
+ * @min -9007199254740991
4142
+ * @max 9007199254740991
4143
+ */
4144
+ creditLimit: number;
4145
+ },
4146
+ params: RequestParams = {},
4147
+ ) =>
4148
+ this.request<
4149
+ {
4150
+ creditLimit: number;
4151
+ },
4152
+ any
4153
+ >({
4154
+ path: `/v1/usage/credit-limit`,
4155
+ method: "PATCH",
4156
+ body: data,
4157
+ secure: true,
4158
+ type: ContentType.Json,
4159
+ format: "json",
4160
+ ...params,
4161
+ }),
4004
4162
  };
4005
4163
  }
@@ -1,7 +1,6 @@
1
1
  import fs from "fs";
2
2
  import path from "path";
3
3
  import { generateApi } from "swagger-typescript-api";
4
- import { API_ENDPOINT } from "@/lib/constants";
5
4
 
6
5
  const SCRIPT_DIR = path.dirname(new URL(import.meta.url).pathname);
7
6
 
@@ -74,7 +73,7 @@ function getFallbackMethodName(method: string, route: string) {
74
73
 
75
74
  async function updateApiSchema() {
76
75
  // スキーマを取得
77
- const res = await fetch(`${API_ENDPOINT}/api/openapi.json`);
76
+ const res = await fetch("http://localhost:4043/api/openapi.json");
78
77
  const json = (await res.json()) as unknown;
79
78
  // フォルダが存在しない場合は作成
80
79
  fs.mkdirSync(path.resolve(SCRIPT_DIR, "./schema"), { recursive: true });