mirror of
https://github.com/langgenius/dify.git
synced 2026-05-07 06:01:13 -04:00
74 lines
1.8 KiB
TypeScript
74 lines
1.8 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import { oc } from '@orpc/contract'
|
|
import * as z from 'zod'
|
|
|
|
import {
|
|
zGetFormHumanInputByFormTokenPath,
|
|
zGetFormHumanInputByFormTokenResponse,
|
|
zPostFormHumanInputByFormTokenPath,
|
|
zPostFormHumanInputByFormTokenResponse,
|
|
} from './zod.gen'
|
|
|
|
/**
|
|
* Get human input form definition by form token
|
|
*
|
|
* GET /console/api/form/human_input/<form_token>
|
|
*/
|
|
export const get = oc
|
|
.route({
|
|
description: 'GET /console/api/form/human_input/<form_token>',
|
|
inputStructure: 'detailed',
|
|
method: 'GET',
|
|
operationId: 'getFormHumanInputByFormToken',
|
|
path: '/form/human_input/{form_token}',
|
|
summary: 'Get human input form definition by form token',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ params: zGetFormHumanInputByFormTokenPath }))
|
|
.output(zGetFormHumanInputByFormTokenResponse)
|
|
|
|
/**
|
|
* Submit human input form by form token
|
|
*
|
|
* POST /console/api/form/human_input/<form_token>
|
|
*
|
|
* Request body:
|
|
* {
|
|
* "inputs": {
|
|
* "content": "User input content"
|
|
* },
|
|
* "action": "Approve"
|
|
* }
|
|
*/
|
|
export const post = oc
|
|
.route({
|
|
description:
|
|
'POST /console/api/form/human_input/<form_token>\n\nRequest body:\n{\n "inputs": {\n "content": "User input content"\n },\n "action": "Approve"\n}',
|
|
inputStructure: 'detailed',
|
|
method: 'POST',
|
|
operationId: 'postFormHumanInputByFormToken',
|
|
path: '/form/human_input/{form_token}',
|
|
summary: 'Submit human input form by form token',
|
|
tags: ['console'],
|
|
})
|
|
.input(z.object({ params: zPostFormHumanInputByFormTokenPath }))
|
|
.output(zPostFormHumanInputByFormTokenResponse)
|
|
|
|
export const byFormToken = {
|
|
get,
|
|
post,
|
|
}
|
|
|
|
export const humanInput = {
|
|
byFormToken,
|
|
}
|
|
|
|
export const form = {
|
|
humanInput,
|
|
}
|
|
|
|
export const contract = {
|
|
form,
|
|
}
|