chore: generate
This commit is contained in:
@@ -119,7 +119,10 @@ export interface Interface {
|
|||||||
questions: ReadonlyArray<Info>
|
questions: ReadonlyArray<Info>
|
||||||
tool?: Tool
|
tool?: Tool
|
||||||
}) => Effect.Effect<ReadonlyArray<Answer>, RejectedError>
|
}) => 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 reject: (requestID: QuestionID) => Effect.Effect<void, NotFoundError>
|
||||||
readonly list: () => Effect.Effect<ReadonlyArray<Request>>
|
readonly list: () => Effect.Effect<ReadonlyArray<Request>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,9 +161,9 @@ describe("PublicApi OpenAPI v2 errors", () => {
|
|||||||
test("documents permission and question not-found errors", () => {
|
test("documents permission and question not-found errors", () => {
|
||||||
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
|
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
|
||||||
|
|
||||||
expect(componentName(responseRef(spec.paths["/permission/{requestID}/reply"]?.post?.responses?.["404"]) ?? "")).toBe(
|
expect(
|
||||||
"PermissionNotFoundError",
|
componentName(responseRef(spec.paths["/permission/{requestID}/reply"]?.post?.responses?.["404"]) ?? ""),
|
||||||
)
|
).toBe("PermissionNotFoundError")
|
||||||
for (const route of [
|
for (const route of [
|
||||||
["post", "/question/{requestID}/reply"],
|
["post", "/question/{requestID}/reply"],
|
||||||
["post", "/question/{requestID}/reject"],
|
["post", "/question/{requestID}/reject"],
|
||||||
|
|||||||
@@ -1704,6 +1704,18 @@ export type EffectHttpApiErrorForbidden = {
|
|||||||
_tag: "Forbidden"
|
_tag: "Forbidden"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type QuestionNotFoundError = {
|
||||||
|
_tag: "QuestionNotFoundError"
|
||||||
|
requestID: string
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PermissionNotFoundError = {
|
||||||
|
_tag: "PermissionNotFoundError"
|
||||||
|
requestID: string
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
|
||||||
export type ProviderAuthMethod = {
|
export type ProviderAuthMethod = {
|
||||||
type: "oauth" | "api"
|
type: "oauth" | "api"
|
||||||
label: string
|
label: string
|
||||||
@@ -5717,9 +5729,9 @@ export type QuestionReplyErrors = {
|
|||||||
*/
|
*/
|
||||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||||
/**
|
/**
|
||||||
* Not found
|
* QuestionNotFoundError
|
||||||
*/
|
*/
|
||||||
404: NotFoundError
|
404: QuestionNotFoundError
|
||||||
}
|
}
|
||||||
|
|
||||||
export type QuestionReplyError = QuestionReplyErrors[keyof QuestionReplyErrors]
|
export type QuestionReplyError = QuestionReplyErrors[keyof QuestionReplyErrors]
|
||||||
@@ -5751,9 +5763,9 @@ export type QuestionRejectErrors = {
|
|||||||
*/
|
*/
|
||||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||||
/**
|
/**
|
||||||
* Not found
|
* QuestionNotFoundError
|
||||||
*/
|
*/
|
||||||
404: NotFoundError
|
404: QuestionNotFoundError
|
||||||
}
|
}
|
||||||
|
|
||||||
export type QuestionRejectError = QuestionRejectErrors[keyof QuestionRejectErrors]
|
export type QuestionRejectError = QuestionRejectErrors[keyof QuestionRejectErrors]
|
||||||
@@ -5816,9 +5828,9 @@ export type PermissionReplyErrors = {
|
|||||||
*/
|
*/
|
||||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||||
/**
|
/**
|
||||||
* Not found
|
* PermissionNotFoundError
|
||||||
*/
|
*/
|
||||||
404: NotFoundError
|
404: PermissionNotFoundError
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors]
|
export type PermissionReplyError = PermissionReplyErrors[keyof PermissionReplyErrors]
|
||||||
@@ -6916,9 +6928,9 @@ export type PermissionRespondErrors = {
|
|||||||
*/
|
*/
|
||||||
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
400: EffectHttpApiErrorBadRequest | InvalidRequestError
|
||||||
/**
|
/**
|
||||||
* NotFoundError
|
* NotFoundError | PermissionNotFoundError
|
||||||
*/
|
*/
|
||||||
404: NotFoundError
|
404: NotFoundError | PermissionNotFoundError
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors]
|
export type PermissionRespondError = PermissionRespondErrors[keyof PermissionRespondErrors]
|
||||||
|
|||||||
@@ -4348,11 +4348,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not found",
|
"description": "QuestionNotFoundError",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/NotFoundError"
|
"$ref": "#/components/schemas/QuestionNotFoundError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4449,11 +4449,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not found",
|
"description": "QuestionNotFoundError",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/NotFoundError"
|
"$ref": "#/components/schemas/QuestionNotFoundError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4588,11 +4588,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "Not found",
|
"description": "PermissionNotFoundError",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/NotFoundError"
|
"$ref": "#/components/schemas/PermissionNotFoundError"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7462,11 +7462,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"404": {
|
"404": {
|
||||||
"description": "NotFoundError",
|
"description": "NotFoundError | PermissionNotFoundError",
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/NotFoundError"
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/NotFoundError"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/PermissionNotFoundError"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15400,6 +15407,40 @@
|
|||||||
"required": ["_tag"],
|
"required": ["_tag"],
|
||||||
"additionalProperties": false
|
"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": {
|
"ProviderAuthMethod": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
Reference in New Issue
Block a user