ソースを参照

chore: generate

opencode-agent[bot] 3 ヶ月 前
コミット
cff441909a

+ 1 - 2
packages/opencode/test/server/httpapi-account-error-mapping.test.ts

@@ -23,8 +23,7 @@ const failingAccountLayer = Layer.succeed(
     active: () => Effect.succeed(Option.none()),
     activeOrg: () => Effect.succeed(Option.none()),
     list: () => Effect.succeed([]),
-    orgsByAccount: () =>
-      Effect.fail(new ORIG.AccountServiceError({ message: "simulated upstream failure" })),
+    orgsByAccount: () => Effect.fail(new ORIG.AccountServiceError({ message: "simulated upstream failure" })),
     remove: () => Effect.void,
     use: () => Effect.void,
     orgs: () => Effect.succeed([]),

+ 12 - 2
packages/sdk/js/src/v2/gen/sdk.gen.ts

@@ -24,7 +24,9 @@ import type {
   EventTuiPromptAppend2,
   EventTuiSessionSelect2,
   EventTuiToastShow2,
+  ExperimentalConsoleGetErrors,
   ExperimentalConsoleGetResponses,
+  ExperimentalConsoleListOrgsErrors,
   ExperimentalConsoleListOrgsResponses,
   ExperimentalConsoleSwitchOrgResponses,
   ExperimentalResourceListResponses,
@@ -687,7 +689,11 @@ export class Console extends HeyApiClient {
         },
       ],
     )
-    return (options?.client ?? this.client).get<ExperimentalConsoleGetResponses, unknown, ThrowOnError>({
+    return (options?.client ?? this.client).get<
+      ExperimentalConsoleGetResponses,
+      ExperimentalConsoleGetErrors,
+      ThrowOnError
+    >({
       url: "/experimental/console",
       ...options,
       ...params,
@@ -717,7 +723,11 @@ export class Console extends HeyApiClient {
         },
       ],
     )
-    return (options?.client ?? this.client).get<ExperimentalConsoleListOrgsResponses, unknown, ThrowOnError>({
+    return (options?.client ?? this.client).get<
+      ExperimentalConsoleListOrgsResponses,
+      ExperimentalConsoleListOrgsErrors,
+      ThrowOnError
+    >({
       url: "/experimental/console/orgs",
       ...options,
       ...params,

+ 23 - 0
packages/sdk/js/src/v2/gen/types.gen.ts

@@ -1361,6 +1361,10 @@ export type ConsoleState = {
   switchableOrgCount: number
 }
 
+export type EffectHttpApiErrorInternalServerError = {
+  _tag: "InternalServerError"
+}
+
 export type ToolListItem = {
   id: string
   description: string
@@ -3612,6 +3616,15 @@ export type ExperimentalConsoleGetData = {
   url: "/experimental/console"
 }
 
+export type ExperimentalConsoleGetErrors = {
+  /**
+   * InternalServerError
+   */
+  500: EffectHttpApiErrorInternalServerError
+}
+
+export type ExperimentalConsoleGetError = ExperimentalConsoleGetErrors[keyof ExperimentalConsoleGetErrors]
+
 export type ExperimentalConsoleGetResponses = {
   /**
    * Active Console provider metadata
@@ -3631,6 +3644,16 @@ export type ExperimentalConsoleListOrgsData = {
   url: "/experimental/console/orgs"
 }
 
+export type ExperimentalConsoleListOrgsErrors = {
+  /**
+   * InternalServerError
+   */
+  500: EffectHttpApiErrorInternalServerError
+}
+
+export type ExperimentalConsoleListOrgsError =
+  ExperimentalConsoleListOrgsErrors[keyof ExperimentalConsoleListOrgsErrors]
+
 export type ExperimentalConsoleListOrgsResponses = {
   /**
    * Switchable Console orgs

+ 31 - 0
packages/sdk/openapi.json

@@ -680,6 +680,16 @@
                 }
               }
             }
+          },
+          "500": {
+            "description": "InternalServerError",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
+                }
+              }
+            }
           }
         },
         "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
@@ -757,6 +767,16 @@
                 }
               }
             }
+          },
+          "500": {
+            "description": "InternalServerError",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
+                }
+              }
+            }
           }
         },
         "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
@@ -12521,6 +12541,17 @@
         "required": ["consoleManagedProviders", "switchableOrgCount"],
         "additionalProperties": false
       },
+      "effect_HttpApiError_InternalServerError": {
+        "type": "object",
+        "properties": {
+          "_tag": {
+            "type": "string",
+            "enum": ["InternalServerError"]
+          }
+        },
+        "required": ["_tag"],
+        "additionalProperties": false
+      },
       "ToolListItem": {
         "type": "object",
         "properties": {