Files
dify/packages/contracts/generated/api/console/activate/errors.gen.ts
T
Stephen Zhouandautofix-ci[bot] 226110d611 feat(web): set up @dify/openapi-content-mapper foundations (#44627)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-10-26 05:06:34 +00:00

51 lines
1.4 KiB
TypeScript
Generated

// This file is auto-generated by scripts/add-orpc-error-maps.ts
import * as z from 'zod'
const zErrorResponse = /* @__PURE__ */ (() =>
z.object({
code: z.string(),
details: z.record(z.string(), z.unknown()).optional(),
message: z.string(),
params: z.string().optional(),
status: z.int(),
}))()
const zAccountInFreezeError = /* @__PURE__ */ (() =>
zErrorResponse.and(
z.object({
code: z.literal('account_in_freeze'),
status: z.literal(400),
}),
))()
const zEmailDomainSuspendedError = /* @__PURE__ */ (() =>
zErrorResponse.and(
z.object({
code: z.literal('email_domain_suspended'),
status: z.literal(400),
}),
))()
const zAlreadyActivateError = /* @__PURE__ */ (() =>
zErrorResponse.and(
z.object({
code: z.literal('already_activate'),
status: z.literal(403),
}),
))()
const zInvitationAccountMismatchError = /* @__PURE__ */ (() =>
zErrorResponse.and(
z.object({
code: z.literal('invitation_account_mismatch'),
status: z.literal(403),
}),
))()
export const postErrors = {
account_in_freeze: { status: 400, data: zAccountInFreezeError },
already_activate: { status: 403, data: zAlreadyActivateError },
email_domain_suspended: { status: 400, data: zEmailDomainSuspendedError },
invitation_account_mismatch: { status: 403, data: zInvitationAccountMismatchError },
}