mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:32:01 +08:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WH-2099 <wh2099@pm.me>
91 lines
2.6 KiB
TypeScript
91 lines
2.6 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,
|
|
zPostFormHumanInputByFormTokenBody,
|
|
zPostFormHumanInputByFormTokenPath,
|
|
zPostFormHumanInputByFormTokenResponse,
|
|
} from './zod.gen'
|
|
|
|
/**
|
|
* Get human input form definition by form token
|
|
*
|
|
* GET /console/api/form/human_input/<form_token>
|
|
*
|
|
* Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
|
|
*
|
|
* @deprecated
|
|
*/
|
|
export const get = oc
|
|
.route({
|
|
deprecated: true,
|
|
description:
|
|
'GET /console/api/form/human_input/<form_token>\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
|
|
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"
|
|
* }
|
|
*
|
|
* Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
|
|
*
|
|
* @deprecated
|
|
*/
|
|
export const post = oc
|
|
.route({
|
|
deprecated: true,
|
|
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}\n\nGenerated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
|
|
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({
|
|
body: zPostFormHumanInputByFormTokenBody,
|
|
params: zPostFormHumanInputByFormTokenPath,
|
|
}),
|
|
)
|
|
.output(zPostFormHumanInputByFormTokenResponse)
|
|
|
|
export const byFormToken = {
|
|
get,
|
|
post,
|
|
}
|
|
|
|
export const humanInput = {
|
|
byFormToken,
|
|
}
|
|
|
|
export const form = {
|
|
humanInput,
|
|
}
|
|
|
|
export const contract = {
|
|
form,
|
|
}
|