dify/packages/contracts/generated/api/console/workflow-generate/orpc.gen.ts
Crazywoola 8809cc036d
feat(workflow-generator): enhance the AI auto-creation flow end-to-end (#38175)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-07-01 02:28:58 +00:00

77 lines
1.9 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zPostWorkflowGenerateBody,
zPostWorkflowGenerateResponse,
zPostWorkflowGenerateStreamBody,
zPostWorkflowGenerateStreamResponse,
zPostWorkflowGenerateSuggestionsBody,
zPostWorkflowGenerateSuggestionsResponse,
} from './zod.gen'
/**
* Stream a Dify workflow graph (plan then result) via SSE
*/
export const post = oc
.route({
description: 'Stream a Dify workflow graph (plan then result) via SSE',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postWorkflowGenerateStream',
path: '/workflow-generate/stream',
tags: ['console'],
})
.input(z.object({ body: zPostWorkflowGenerateStreamBody }))
.output(zPostWorkflowGenerateStreamResponse)
export const stream = {
post,
}
/**
* Suggest example workflow-generator instructions for the tenant
*/
export const post2 = oc
.route({
description: 'Suggest example workflow-generator instructions for the tenant',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postWorkflowGenerateSuggestions',
path: '/workflow-generate/suggestions',
tags: ['console'],
})
.input(z.object({ body: zPostWorkflowGenerateSuggestionsBody }))
.output(zPostWorkflowGenerateSuggestionsResponse)
export const suggestions = {
post: post2,
}
/**
* Generate a Dify workflow graph from natural language
*/
export const post3 = oc
.route({
description: 'Generate a Dify workflow graph from natural language',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postWorkflowGenerate',
path: '/workflow-generate',
tags: ['console'],
})
.input(z.object({ body: zPostWorkflowGenerateBody }))
.output(zPostWorkflowGenerateResponse)
export const workflowGenerate = {
post: post3,
stream,
suggestions,
}
export const contract = {
workflowGenerate,
}