opencode-agent[bot] пре 3 месеци
родитељ
комит
d488e3fd2a
2 измењених фајлова са 40 додато и 10 уклоњено
  1. 1 6
      packages/opencode/src/provider/auth.ts
  2. 39 4
      packages/sdk/openapi.json

+ 1 - 6
packages/opencode/src/provider/auth.ts

@@ -81,12 +81,7 @@ export class ValidationFailed extends Schema.TaggedErrorClass<ValidationFailed>(
   message: Schema.String,
   message: Schema.String,
 }) {}
 }) {}
 
 
-export type Error =
-  | Auth.AuthError
-  | OauthMissing
-  | OauthCodeMissing
-  | OauthCallbackFailed
-  | ValidationFailed
+export type Error = Auth.AuthError | OauthMissing | OauthCodeMissing | OauthCallbackFailed | ValidationFailed
 
 
 type Hook = NonNullable<Hooks["auth"]>
 type Hook = NonNullable<Hooks["auth"]>
 
 

+ 39 - 4
packages/sdk/openapi.json

@@ -4217,11 +4217,11 @@
             }
             }
           },
           },
           "400": {
           "400": {
-            "description": "Bad request",
+            "description": "ProviderAuthError",
             "content": {
             "content": {
               "application/json": {
               "application/json": {
                 "schema": {
                 "schema": {
-                  "$ref": "#/components/schemas/BadRequestError"
+                  "$ref": "#/components/schemas/ProviderAuthError1"
                 }
                 }
               }
               }
             }
             }
@@ -4303,11 +4303,11 @@
             }
             }
           },
           },
           "400": {
           "400": {
-            "description": "Bad request",
+            "description": "ProviderAuthError",
             "content": {
             "content": {
               "application/json": {
               "application/json": {
                 "schema": {
                 "schema": {
-                  "$ref": "#/components/schemas/BadRequestError"
+                  "$ref": "#/components/schemas/ProviderAuthError1"
                 }
                 }
               }
               }
             }
             }
@@ -13785,6 +13785,41 @@
         "required": ["url", "method", "instructions"],
         "required": ["url", "method", "instructions"],
         "additionalProperties": false
         "additionalProperties": false
       },
       },
+      "ProviderAuthError1": {
+        "type": "object",
+        "properties": {
+          "name": {
+            "type": "string",
+            "enum": [
+              "BadRequest",
+              "ProviderAuthOauthMissing",
+              "ProviderAuthOauthCodeMissing",
+              "ProviderAuthOauthCallbackFailed",
+              "ProviderAuthValidationFailed"
+            ]
+          },
+          "data": {
+            "type": "object",
+            "properties": {
+              "providerID": {
+                "type": "string"
+              },
+              "field": {
+                "type": "string"
+              },
+              "message": {
+                "type": "string"
+              },
+              "kind": {
+                "type": "string"
+              }
+            },
+            "additionalProperties": false
+          }
+        },
+        "required": ["name", "data"],
+        "additionalProperties": false
+      },
       "TextPartInput": {
       "TextPartInput": {
         "type": "object",
         "type": "object",
         "properties": {
         "properties": {