mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
Merge remote-tracking branch 'myori/main' into feat/collaboration2
This commit is contained in:
56
web/contract/console/try-app.ts
Normal file
56
web/contract/console/try-app.ts
Normal file
@ -0,0 +1,56 @@
|
||||
import type { ChatConfig } from '@/app/components/base/chat/types'
|
||||
import type { DataSetListResponse } from '@/models/datasets'
|
||||
import type { TryAppFlowPreview, TryAppInfo } from '@/models/try-app'
|
||||
import { type } from '@orpc/contract'
|
||||
import { base } from '../base'
|
||||
|
||||
export const trialAppInfoContract = base
|
||||
.route({
|
||||
path: '/trial-apps/{appId}',
|
||||
method: 'GET',
|
||||
})
|
||||
.input(type<{
|
||||
params: {
|
||||
appId: string
|
||||
}
|
||||
}>())
|
||||
.output(type<TryAppInfo>())
|
||||
|
||||
export const trialAppDatasetsContract = base
|
||||
.route({
|
||||
path: '/trial-apps/{appId}/datasets',
|
||||
method: 'GET',
|
||||
})
|
||||
.input(type<{
|
||||
params: {
|
||||
appId: string
|
||||
}
|
||||
query: {
|
||||
ids: string[]
|
||||
}
|
||||
}>())
|
||||
.output(type<DataSetListResponse>())
|
||||
|
||||
export const trialAppWorkflowsContract = base
|
||||
.route({
|
||||
path: '/trial-apps/{appId}/workflows',
|
||||
method: 'GET',
|
||||
})
|
||||
.input(type<{
|
||||
params: {
|
||||
appId: string
|
||||
}
|
||||
}>())
|
||||
.output(type<TryAppFlowPreview>())
|
||||
|
||||
export const trialAppParametersContract = base
|
||||
.route({
|
||||
path: '/trial-apps/{appId}/parameters',
|
||||
method: 'GET',
|
||||
})
|
||||
.input(type<{
|
||||
params: {
|
||||
appId: string
|
||||
}
|
||||
}>())
|
||||
.output(type<ChatConfig>())
|
||||
@ -3,6 +3,7 @@ import { accountAvatarContract } from './console/account'
|
||||
import { workflowOnlineUsersContract } from './console/apps'
|
||||
import { bindPartnerStackContract, invoicesContract } from './console/billing'
|
||||
import { systemFeaturesContract } from './console/system'
|
||||
import { trialAppDatasetsContract, trialAppInfoContract, trialAppParametersContract, trialAppWorkflowsContract } from './console/try-app'
|
||||
import {
|
||||
workflowDraftEnvironmentVariablesContract,
|
||||
workflowDraftUpdateConversationVariablesContract,
|
||||
@ -25,6 +26,12 @@ export const consoleRouterContract = {
|
||||
avatar: accountAvatarContract,
|
||||
},
|
||||
systemFeatures: systemFeaturesContract,
|
||||
trialApps: {
|
||||
info: trialAppInfoContract,
|
||||
datasets: trialAppDatasetsContract,
|
||||
parameters: trialAppParametersContract,
|
||||
workflows: trialAppWorkflowsContract,
|
||||
},
|
||||
billing: {
|
||||
invoices: invoicesContract,
|
||||
bindPartnerStack: bindPartnerStackContract,
|
||||
|
||||
Reference in New Issue
Block a user