dify/packages/contracts/generated/api/console/account/orpc.gen.ts
2026-04-30 11:34:27 +00:00

379 lines
8.4 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetAccountAvatarQuery,
zGetAccountAvatarResponse,
zGetAccountDeleteVerifyResponse,
zGetAccountEducationAutocompleteQuery,
zGetAccountEducationAutocompleteResponse,
zGetAccountEducationResponse,
zGetAccountEducationVerifyResponse,
zGetAccountIntegratesResponse,
zGetAccountProfileResponse,
zPostAccountAvatarBody,
zPostAccountAvatarResponse,
zPostAccountChangeEmailBody,
zPostAccountChangeEmailCheckEmailUniqueBody,
zPostAccountChangeEmailCheckEmailUniqueResponse,
zPostAccountChangeEmailResetBody,
zPostAccountChangeEmailResetResponse,
zPostAccountChangeEmailResponse,
zPostAccountChangeEmailValidityBody,
zPostAccountChangeEmailValidityResponse,
zPostAccountDeleteBody,
zPostAccountDeleteFeedbackBody,
zPostAccountDeleteFeedbackResponse,
zPostAccountDeleteResponse,
zPostAccountEducationBody,
zPostAccountEducationResponse,
zPostAccountInitBody,
zPostAccountInitResponse,
zPostAccountInterfaceLanguageBody,
zPostAccountInterfaceLanguageResponse,
zPostAccountInterfaceThemeBody,
zPostAccountInterfaceThemeResponse,
zPostAccountNameBody,
zPostAccountNameResponse,
zPostAccountPasswordBody,
zPostAccountPasswordResponse,
zPostAccountTimezoneBody,
zPostAccountTimezoneResponse,
} from './zod.gen'
/**
* Get account avatar url
*/
export const get = oc
.route({
description: 'Get account avatar url',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountAvatar',
path: '/account/avatar',
tags: ['console'],
})
.input(z.object({ query: zGetAccountAvatarQuery }))
.output(zGetAccountAvatarResponse)
export const post = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountAvatar',
path: '/account/avatar',
tags: ['console'],
})
.input(z.object({ body: zPostAccountAvatarBody }))
.output(zPostAccountAvatarResponse)
export const avatar = {
get,
post,
}
export const post2 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmailCheckEmailUnique',
path: '/account/change-email/check-email-unique',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailCheckEmailUniqueBody }))
.output(zPostAccountChangeEmailCheckEmailUniqueResponse)
export const checkEmailUnique = {
post: post2,
}
export const post3 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmailReset',
path: '/account/change-email/reset',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailResetBody }))
.output(zPostAccountChangeEmailResetResponse)
export const reset = {
post: post3,
}
export const post4 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmailValidity',
path: '/account/change-email/validity',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailValidityBody }))
.output(zPostAccountChangeEmailValidityResponse)
export const validity = {
post: post4,
}
export const post5 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountChangeEmail',
path: '/account/change-email',
tags: ['console'],
})
.input(z.object({ body: zPostAccountChangeEmailBody }))
.output(zPostAccountChangeEmailResponse)
export const changeEmail = {
post: post5,
checkEmailUnique,
reset,
validity,
}
export const post6 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountDeleteFeedback',
path: '/account/delete/feedback',
tags: ['console'],
})
.input(z.object({ body: zPostAccountDeleteFeedbackBody }))
.output(zPostAccountDeleteFeedbackResponse)
export const feedback = {
post: post6,
}
export const get2 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountDeleteVerify',
path: '/account/delete/verify',
tags: ['console'],
})
.output(zGetAccountDeleteVerifyResponse)
export const verify = {
get: get2,
}
export const post7 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountDelete',
path: '/account/delete',
tags: ['console'],
})
.input(z.object({ body: zPostAccountDeleteBody }))
.output(zPostAccountDeleteResponse)
export const delete_ = {
post: post7,
feedback,
verify,
}
export const get3 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountEducationAutocomplete',
path: '/account/education/autocomplete',
tags: ['console'],
})
.input(z.object({ query: zGetAccountEducationAutocompleteQuery }))
.output(zGetAccountEducationAutocompleteResponse)
export const autocomplete = {
get: get3,
}
export const get4 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountEducationVerify',
path: '/account/education/verify',
tags: ['console'],
})
.output(zGetAccountEducationVerifyResponse)
export const verify2 = {
get: get4,
}
export const get5 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountEducation',
path: '/account/education',
tags: ['console'],
})
.output(zGetAccountEducationResponse)
export const post8 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountEducation',
path: '/account/education',
tags: ['console'],
})
.input(z.object({ body: zPostAccountEducationBody }))
.output(zPostAccountEducationResponse)
export const education = {
get: get5,
post: post8,
autocomplete,
verify: verify2,
}
export const post9 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountInit',
path: '/account/init',
tags: ['console'],
})
.input(z.object({ body: zPostAccountInitBody }))
.output(zPostAccountInitResponse)
export const init = {
post: post9,
}
export const get6 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountIntegrates',
path: '/account/integrates',
tags: ['console'],
})
.output(zGetAccountIntegratesResponse)
export const integrates = {
get: get6,
}
export const post10 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountInterfaceLanguage',
path: '/account/interface-language',
tags: ['console'],
})
.input(z.object({ body: zPostAccountInterfaceLanguageBody }))
.output(zPostAccountInterfaceLanguageResponse)
export const interfaceLanguage = {
post: post10,
}
export const post11 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountInterfaceTheme',
path: '/account/interface-theme',
tags: ['console'],
})
.input(z.object({ body: zPostAccountInterfaceThemeBody }))
.output(zPostAccountInterfaceThemeResponse)
export const interfaceTheme = {
post: post11,
}
export const post12 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountName',
path: '/account/name',
tags: ['console'],
})
.input(z.object({ body: zPostAccountNameBody }))
.output(zPostAccountNameResponse)
export const name = {
post: post12,
}
export const post13 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountPassword',
path: '/account/password',
tags: ['console'],
})
.input(z.object({ body: zPostAccountPasswordBody }))
.output(zPostAccountPasswordResponse)
export const password = {
post: post13,
}
export const get7 = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getAccountProfile',
path: '/account/profile',
tags: ['console'],
})
.output(zGetAccountProfileResponse)
export const profile = {
get: get7,
}
export const post14 = oc
.route({
inputStructure: 'detailed',
method: 'POST',
operationId: 'postAccountTimezone',
path: '/account/timezone',
tags: ['console'],
})
.input(z.object({ body: zPostAccountTimezoneBody }))
.output(zPostAccountTimezoneResponse)
export const timezone = {
post: post14,
}
export const account = {
avatar,
changeEmail,
delete: delete_,
education,
init,
integrates,
interfaceLanguage,
interfaceTheme,
name,
password,
profile,
timezone,
}
export const contract = {
account,
}