mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-22 11:25:15 +00:00
chore: generate
Some checks are pending
deploy / deploy (push) Waiting to run
generate / generate (push) Waiting to run
nix-eval / nix-eval (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Waiting to run
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Waiting to run
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Waiting to run
nix-hashes / update-hashes (push) Blocked by required conditions
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / version (push) Waiting to run
storybook / storybook build (push) Waiting to run
test / unit (linux) (push) Waiting to run
test / unit (windows) (push) Waiting to run
test / e2e (linux) (push) Waiting to run
test / e2e (windows) (push) Waiting to run
typecheck / typecheck (push) Waiting to run
Some checks are pending
deploy / deploy (push) Waiting to run
generate / generate (push) Waiting to run
nix-eval / nix-eval (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Waiting to run
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Waiting to run
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Waiting to run
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Waiting to run
nix-hashes / update-hashes (push) Blocked by required conditions
publish / build-cli (push) Blocked by required conditions
publish / sign-cli-windows (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Blocked by required conditions
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Blocked by required conditions
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Blocked by required conditions
publish / publish (push) Blocked by required conditions
publish / version (push) Waiting to run
storybook / storybook build (push) Waiting to run
test / unit (linux) (push) Waiting to run
test / unit (windows) (push) Waiting to run
test / e2e (linux) (push) Waiting to run
test / e2e (windows) (push) Waiting to run
typecheck / typecheck (push) Waiting to run
This commit is contained in:
parent
4ce247eaba
commit
2663ecd39d
4 changed files with 76 additions and 20 deletions
|
|
@ -119,7 +119,10 @@ export interface Interface {
|
|||
questions: ReadonlyArray<Info>
|
||||
tool?: Tool
|
||||
}) => Effect.Effect<ReadonlyArray<Answer>, RejectedError>
|
||||
readonly reply: (input: { requestID: QuestionID; answers: ReadonlyArray<Answer> }) => Effect.Effect<void, NotFoundError>
|
||||
readonly reply: (input: {
|
||||
requestID: QuestionID
|
||||
answers: ReadonlyArray<Answer>
|
||||
}) => Effect.Effect<void, NotFoundError>
|
||||
readonly reject: (requestID: QuestionID) => Effect.Effect<void, NotFoundError>
|
||||
readonly list: () => Effect.Effect<ReadonlyArray<Request>>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,9 +161,9 @@ describe("PublicApi OpenAPI v2 errors", () => {
|
|||
test("documents permission and question not-found errors", () => {
|
||||
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
|
||||
|
||||
expect(componentName(responseRef(spec.paths["/permission/{requestID}/reply"]?.post?.responses?.["404"]) ?? "")).toBe(
|
||||
"PermissionNotFoundError",
|
||||
)
|
||||
expect(
|
||||
componentName(responseRef(spec.paths["/permission/{requestID}/reply"]?.post?.responses?.["404"]) ?? ""),
|
||||
).toBe("PermissionNotFoundError")
|
||||
for (const route of [
|
||||
["post", "/question/{requestID}/reply"],
|
||||
["post", "/question/{requestID}/reject"],
|
||||
|
|
|
|||
|
|
@ -1704,6 +1704,18 @@ export type EffectHttpApiErrorForbidden = {
|
|||
_tag: "Forbidden"
|
||||
}
|
||||
|
||||
export type QuestionNotFoundError = {
|
||||
_tag: "QuestionNotFoundError"
|
||||
requestID: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export type PermissionNotFoundError = {
|
||||
_tag: "PermissionNotFoundError"
|
||||
requestID: string
|
||||
message: string
|
||||
}
|
||||
|
||||
export type ProviderAuthMethod = {
|
||||
type: "oauth" | "api"
|
||||
label: string
|
||||
|
|
@ -5717,9 +5729,9 @@ export type QuestionReplyErrors = {
|
|||
*/
|
||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||
/**
|
||||
* Not found
|
||||
* QuestionNotFoundError
|
||||
*/
|
||||
404: NotFoundError
|
||||
404: QuestionNotFoundError
|
||||
}
|
||||
|
||||
export type QuestionReplyError = QuestionReplyErrors[keyof QuestionReplyErrors]
|
||||
|
|
@ -5751,9 +5763,9 @@ export type QuestionRejectErrors = {
|
|||
*/
|
||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||
/**
|
||||
* Not found
|
||||
* QuestionNotFoundError
|
||||
*/
|
||||
404: NotFoundError
|
||||
404: QuestionNotFoundError
|
||||
}
|
||||
|
||||
export type QuestionRejectError = QuestionRejectErrors[keyof QuestionRejectErrors]
|
||||
|
|
@ -5816,9 +5828,9 @@ export type PermissionReplyErrors = {
|
|||
*/
|
||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||
/**
|
||||
* Not found
|
||||
* PermissionNotFoundError
|
||||
*/
|
||||
404: NotFoundError
|
||||
404: PermissionNotFoundError
|
||||
}
|
||||
|
||||
export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors]
|
||||
|
|
@ -6916,9 +6928,9 @@ export type PermissionRespondErrors = {
|
|||
*/
|
||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||
/**
|
||||
* NotFoundError
|
||||
* NotFoundError | PermissionNotFoundError
|
||||
*/
|
||||
404: NotFoundError
|
||||
404: NotFoundError | PermissionNotFoundError
|
||||
}
|
||||
|
||||
export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors]
|
||||
|
|
|
|||
|
|
@ -4348,11 +4348,11 @@
|
|||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found",
|
||||
"description": "QuestionNotFoundError",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NotFoundError"
|
||||
"$ref": "#/components/schemas/QuestionNotFoundError"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4449,11 +4449,11 @@
|
|||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found",
|
||||
"description": "QuestionNotFoundError",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NotFoundError"
|
||||
"$ref": "#/components/schemas/QuestionNotFoundError"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4588,11 +4588,11 @@
|
|||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not found",
|
||||
"description": "PermissionNotFoundError",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NotFoundError"
|
||||
"$ref": "#/components/schemas/PermissionNotFoundError"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -7462,11 +7462,18 @@
|
|||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "NotFoundError",
|
||||
"description": "NotFoundError | PermissionNotFoundError",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/NotFoundError"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/NotFoundError"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/PermissionNotFoundError"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -15400,6 +15407,40 @@
|
|||
"required": ["_tag"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"QuestionNotFoundError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_tag": {
|
||||
"type": "string",
|
||||
"enum": ["QuestionNotFoundError"]
|
||||
},
|
||||
"requestID": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["_tag", "requestID", "message"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"PermissionNotFoundError": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"_tag": {
|
||||
"type": "string",
|
||||
"enum": ["PermissionNotFoundError"]
|
||||
},
|
||||
"requestID": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["_tag", "requestID", "message"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"ProviderAuthMethod": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue