mirror of
https://github.com/langgenius/dify.git
synced 2026-02-22 19:15:47 +08:00
refactor(contract): restructure console contracts with nested billing module (#30999)
This commit is contained in:
25
web/contract/console/billing.ts
Normal file
25
web/contract/console/billing.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { type } from '@orpc/contract'
|
||||
import { base } from '../base'
|
||||
|
||||
export const invoicesContract = base
|
||||
.route({
|
||||
path: '/billing/invoices',
|
||||
method: 'GET',
|
||||
})
|
||||
.input(type<unknown>())
|
||||
.output(type<{ url: string }>())
|
||||
|
||||
export const bindPartnerStackContract = base
|
||||
.route({
|
||||
path: '/billing/partners/{partnerKey}/tenants',
|
||||
method: 'PUT',
|
||||
})
|
||||
.input(type<{
|
||||
params: {
|
||||
partnerKey: string
|
||||
}
|
||||
body: {
|
||||
click_id: string
|
||||
}
|
||||
}>())
|
||||
.output(type<unknown>())
|
||||
11
web/contract/console/system.ts
Normal file
11
web/contract/console/system.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import type { SystemFeatures } from '@/types/feature'
|
||||
import { type } from '@orpc/contract'
|
||||
import { base } from '../base'
|
||||
|
||||
export const systemFeaturesContract = base
|
||||
.route({
|
||||
path: '/system-features',
|
||||
method: 'GET',
|
||||
})
|
||||
.input(type<unknown>())
|
||||
.output(type<SystemFeatures>())
|
||||
Reference in New Issue
Block a user