fix(web): use generated account-profile contracts (#36927)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
yyh
2026-06-02 07:28:05 +00:00
committed by GitHub
co-authored by autofix-ci[bot]
parent 3cd0da303a
commit dea4e66456
34 changed files with 268 additions and 151 deletions
-37
View File
@@ -1,37 +0,0 @@
import { type } from '@orpc/contract'
import { base } from '../base'
export type AccountProfileResponse = {
id: string
name: string
email: string
avatar: string
avatar_url: string | null
is_password_set: boolean
interface_language?: string
interface_theme?: string
timezone?: string
last_login_at?: string
last_active_at?: string
last_login_ip?: string
created_at?: string
}
export const accountProfileContract = base
.route({
path: '/account/profile',
method: 'GET',
})
.output(type<AccountProfileResponse>())
export const accountAvatarContract = base
.route({
path: '/account/avatar',
method: 'GET',
})
.input(type<{
query: {
avatar: string
}
}>())
.output(type<{ avatar_url: string }>())
-9
View File
@@ -1,7 +1,6 @@
import type { InferContractRouterInputs } from '@orpc/contract'
import { contract as communityContract } from '@dify/contracts/api/console/orpc.gen'
import { contract as enterpriseContract } from '@dify/contracts/enterprise/orpc.gen'
import { accountAvatarContract, accountProfileContract } from './console/account'
import { appDeleteContract, appListContract, workflowOnlineUsersContract } from './console/apps'
import { bindPartnerStackContract, invoicesContract } from './console/billing'
import {
@@ -71,14 +70,6 @@ export type MarketPlaceInputs = InferContractRouterInputs<typeof marketplaceRout
export const consoleRouterContract = {
enterprise: enterpriseContract,
...communityContract,
account: {
...communityContract.account,
avatar: accountAvatarContract,
profile: {
...communityContract.account.profile,
get: accountProfileContract,
},
},
apps: {
...communityContract.apps,
list: appListContract,