mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28: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>())
|
||||
Reference in New Issue
Block a user