Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

1.6 KB
Raw Blame
// This file is auto-generated by @hey-api/openapi-ts

import * as z from 'zod'

/**
 * EventStreamResponse
 */
export const zEventStreamResponse = z.string()

/**
 * ErrorResponse
 *
 * Documented non-2xx body emitted by ``register_external_error_handlers``.
 *
 * ``params`` and ``details`` appear only on the errors that set them. The schema
 * stays open because ``HTTPException.data`` may carry extra keys.
 */
export const zErrorResponse = z.object({
  code: z.string(),
  details: z.record(z.string(), z.unknown()).optional(),
  message: z.string(),
  params: z.string().optional(),
  status: z.int(),
})

/**
 * HumanInputPauseTypeResponse
 */
export const zHumanInputPauseTypeResponse = z.object({
  backstage_input_url: z.string().nullish(),
  form_id: z.string(),
  form_version: z.enum(['1', '2']).optional().default('1'),
  type: z.literal('human_input'),
})

/**
 * PausedNodeResponse
 */
export const zPausedNodeResponse = z.object({
  node_id: z.string(),
  node_title: z.string(),
  pause_type: zHumanInputPauseTypeResponse,
})

/**
 * WorkflowPauseDetailsResponse
 */
export const zWorkflowPauseDetailsResponse = z.object({
  paused_at: z.string().nullish(),
  paused_nodes: z.array(zPausedNodeResponse),
})

export const zGetWorkflowByWorkflowRunIdEventsPath = z.object({
  workflow_run_id: z.string(),
})

/**
 * SSE event stream
 */
export const zGetWorkflowByWorkflowRunIdEventsResponse = zEventStreamResponse

export const zGetWorkflowByWorkflowRunIdPauseDetailsPath = z.object({
  workflow_run_id: z.string(),
})

/**
 * Workflow pause details retrieved successfully
 */
export const zGetWorkflowByWorkflowRunIdPauseDetailsResponse = zWorkflowPauseDetailsResponse