mirror of
https://github.com/langgenius/dify.git
synced 2026-06-07 16:32:01 +08:00
3963 lines
98 KiB
TypeScript
3963 lines
98 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* AppImportPayload
|
|
*/
|
|
export const zAppImportPayload = z.object({
|
|
app_id: z.string().nullish(),
|
|
description: z.string().nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: z.string().nullish(),
|
|
mode: z.string(),
|
|
name: z.string().nullish(),
|
|
yaml_content: z.string().nullish(),
|
|
yaml_url: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowOnlineUsersPayload
|
|
*/
|
|
export const zWorkflowOnlineUsersPayload = z.object({
|
|
app_ids: z.array(z.string()).optional(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunCountResponse
|
|
*/
|
|
export const zWorkflowRunCountResponse = z.object({
|
|
failed: z.int(),
|
|
partial_succeeded: z.int(),
|
|
running: z.int(),
|
|
stopped: z.int(),
|
|
succeeded: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* HumanInputFormPreviewPayload
|
|
*/
|
|
export const zHumanInputFormPreviewPayload = z.object({
|
|
inputs: z.record(z.string(), z.unknown()).optional(),
|
|
})
|
|
|
|
/**
|
|
* HumanInputFormSubmitPayload
|
|
*/
|
|
export const zHumanInputFormSubmitPayload = z.object({
|
|
action: z.string(),
|
|
form_inputs: z.record(z.string(), z.unknown()),
|
|
inputs: z.record(z.string(), z.unknown()),
|
|
})
|
|
|
|
/**
|
|
* IterationNodeRunPayload
|
|
*/
|
|
export const zIterationNodeRunPayload = z.object({
|
|
inputs: z.record(z.string(), z.unknown()).nullish(),
|
|
})
|
|
|
|
/**
|
|
* LoopNodeRunPayload
|
|
*/
|
|
export const zLoopNodeRunPayload = z.object({
|
|
inputs: z.record(z.string(), z.unknown()).nullish(),
|
|
})
|
|
|
|
/**
|
|
* AdvancedChatWorkflowRunPayload
|
|
*/
|
|
export const zAdvancedChatWorkflowRunPayload = z.object({
|
|
conversation_id: z.string().nullish(),
|
|
files: z.array(z.record(z.string(), z.unknown())).nullish(),
|
|
inputs: z.record(z.string(), z.unknown()).nullish(),
|
|
parent_message_id: z.string().nullish(),
|
|
query: z.string().optional().default(''),
|
|
})
|
|
|
|
/**
|
|
* AnnotationReplyPayload
|
|
*/
|
|
export const zAnnotationReplyPayload = z.object({
|
|
embedding_model_name: z.string(),
|
|
embedding_provider_name: z.string(),
|
|
score_threshold: z.number(),
|
|
})
|
|
|
|
/**
|
|
* AnnotationSettingUpdatePayload
|
|
*/
|
|
export const zAnnotationSettingUpdatePayload = z.object({
|
|
score_threshold: z.number(),
|
|
})
|
|
|
|
/**
|
|
* CreateAnnotationPayload
|
|
*/
|
|
export const zCreateAnnotationPayload = z.object({
|
|
annotation_reply: z.record(z.string(), z.unknown()).nullish(),
|
|
answer: z.string().nullish(),
|
|
content: z.string().nullish(),
|
|
message_id: z.string().nullish(),
|
|
question: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Annotation
|
|
*/
|
|
export const zAnnotation = z.object({
|
|
content: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
hit_count: z.int().nullish(),
|
|
id: z.string(),
|
|
question: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AnnotationCountResponse
|
|
*/
|
|
export const zAnnotationCountResponse = z.object({
|
|
count: z.int(),
|
|
})
|
|
|
|
/**
|
|
* AnnotationExportList
|
|
*/
|
|
export const zAnnotationExportList = z.object({
|
|
data: z.array(zAnnotation),
|
|
})
|
|
|
|
/**
|
|
* UpdateAnnotationPayload
|
|
*/
|
|
export const zUpdateAnnotationPayload = z.object({
|
|
annotation_reply: z.record(z.string(), z.unknown()).nullish(),
|
|
answer: z.string().nullish(),
|
|
content: z.string().nullish(),
|
|
question: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppApiStatusPayload
|
|
*/
|
|
export const zAppApiStatusPayload = z.object({
|
|
enable_api: z.boolean(),
|
|
})
|
|
|
|
/**
|
|
* AudioTranscriptResponse
|
|
*/
|
|
export const zAudioTranscriptResponse = z.object({
|
|
text: z.string(),
|
|
})
|
|
|
|
/**
|
|
* SuggestedQuestionsResponse
|
|
*/
|
|
export const zSuggestedQuestionsResponse = z.object({
|
|
data: z.array(z.string()),
|
|
})
|
|
|
|
/**
|
|
* SimpleResultResponse
|
|
*/
|
|
export const zSimpleResultResponse = z.object({
|
|
result: z.string(),
|
|
})
|
|
|
|
/**
|
|
* CompletionMessagePayload
|
|
*/
|
|
export const zCompletionMessagePayload = z.object({
|
|
files: z.array(z.unknown()).nullish(),
|
|
inputs: z.record(z.string(), z.unknown()),
|
|
model_config: z.record(z.string(), z.unknown()),
|
|
query: z.string().optional().default(''),
|
|
response_mode: z.enum(['blocking', 'streaming']).optional().default('blocking'),
|
|
retriever_from: z.string().optional().default('dev'),
|
|
})
|
|
|
|
/**
|
|
* ConvertToWorkflowPayload
|
|
*/
|
|
export const zConvertToWorkflowPayload = z.object({
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: z.string().nullish(),
|
|
name: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* NewAppResponse
|
|
*/
|
|
export const zNewAppResponse = z.object({
|
|
new_app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* AppExportResponse
|
|
*/
|
|
export const zAppExportResponse = z.object({
|
|
data: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MessageFeedbackPayload
|
|
*/
|
|
export const zMessageFeedbackPayload = z.object({
|
|
content: z.string().nullish(),
|
|
message_id: z.string(),
|
|
rating: z.enum(['dislike', 'like']).nullish(),
|
|
})
|
|
|
|
/**
|
|
* ModelConfigRequest
|
|
*/
|
|
export const zModelConfigRequest = z.object({
|
|
agent_mode: z.record(z.string(), z.unknown()).nullish(),
|
|
configs: z.record(z.string(), z.unknown()).nullish(),
|
|
dataset_configs: z.record(z.string(), z.unknown()).nullish(),
|
|
model: z.string().nullish(),
|
|
more_like_this: z.record(z.string(), z.unknown()).nullish(),
|
|
opening_statement: z.string().nullish(),
|
|
provider: z.string().nullish(),
|
|
retrieval_model: z.record(z.string(), z.unknown()).nullish(),
|
|
speech_to_text: z.record(z.string(), z.unknown()).nullish(),
|
|
suggested_questions: z.array(z.string()).nullish(),
|
|
text_to_speech: z.record(z.string(), z.unknown()).nullish(),
|
|
tools: z.array(z.record(z.string(), z.unknown())).nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppNamePayload
|
|
*/
|
|
export const zAppNamePayload = z.object({
|
|
name: z.string().min(1),
|
|
})
|
|
|
|
/**
|
|
* RedirectUrlResponse
|
|
*/
|
|
export const zRedirectUrlResponse = z.object({
|
|
redirect_url: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MCPServerCreatePayload
|
|
*/
|
|
export const zMcpServerCreatePayload = z.object({
|
|
description: z.string().nullish(),
|
|
parameters: z.record(z.string(), z.unknown()),
|
|
})
|
|
|
|
/**
|
|
* MCPServerUpdatePayload
|
|
*/
|
|
export const zMcpServerUpdatePayload = z.object({
|
|
description: z.string().nullish(),
|
|
id: z.string(),
|
|
parameters: z.record(z.string(), z.unknown()),
|
|
status: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppSiteUpdatePayload
|
|
*/
|
|
export const zAppSiteUpdatePayload = z.object({
|
|
chat_color_theme: z.string().nullish(),
|
|
chat_color_theme_inverted: z.boolean().nullish(),
|
|
copyright: z.string().nullish(),
|
|
custom_disclaimer: z.string().nullish(),
|
|
customize_domain: z.string().nullish(),
|
|
customize_token_strategy: z.enum(['allow', 'must', 'not_allow']).nullish(),
|
|
default_language: z.string().nullish(),
|
|
description: z.string().nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: z.string().nullish(),
|
|
privacy_policy: z.string().nullish(),
|
|
prompt_public: z.boolean().nullish(),
|
|
show_workflow_steps: z.boolean().nullish(),
|
|
title: z.string().nullish(),
|
|
use_icon_as_answer_icon: z.boolean().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppSiteResponse
|
|
*/
|
|
export const zAppSiteResponse = z.object({
|
|
app_id: z.string(),
|
|
code: z.string().nullish(),
|
|
copyright: z.string().nullish(),
|
|
custom_disclaimer: z.string().nullish(),
|
|
customize_domain: z.string().nullish(),
|
|
customize_token_strategy: z.string(),
|
|
default_language: z.string(),
|
|
description: z.string().nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
privacy_policy: z.string().nullish(),
|
|
prompt_public: z.boolean(),
|
|
show_workflow_steps: z.boolean(),
|
|
title: z.string(),
|
|
use_icon_as_answer_icon: z.boolean(),
|
|
})
|
|
|
|
/**
|
|
* AppSiteStatusPayload
|
|
*/
|
|
export const zAppSiteStatusPayload = z.object({
|
|
enable_site: z.boolean(),
|
|
})
|
|
|
|
/**
|
|
* TextToSpeechPayload
|
|
*/
|
|
export const zTextToSpeechPayload = z.object({
|
|
message_id: z.string().nullish(),
|
|
streaming: z.boolean().nullish(),
|
|
text: z.string(),
|
|
voice: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppTracePayload
|
|
*/
|
|
export const zAppTracePayload = z.object({
|
|
enabled: z.boolean(),
|
|
tracing_provider: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* TraceProviderQuery
|
|
*/
|
|
export const zTraceProviderQuery = z.object({
|
|
tracing_provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* TraceConfigPayload
|
|
*/
|
|
export const zTraceConfigPayload = z.object({
|
|
tracing_config: z.record(z.string(), z.unknown()),
|
|
tracing_provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* ParserEnable
|
|
*/
|
|
export const zParserEnable = z.object({
|
|
enable_trigger: z.boolean(),
|
|
trigger_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowTriggerResponse
|
|
*/
|
|
export const zWorkflowTriggerResponse = z.object({
|
|
created_at: z.iso.datetime().nullish(),
|
|
icon: z.string(),
|
|
id: z.string(),
|
|
node_id: z.string(),
|
|
provider_name: z.string(),
|
|
status: z.string(),
|
|
title: z.string(),
|
|
trigger_type: z.string(),
|
|
updated_at: z.iso.datetime().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowTriggerListResponse
|
|
*/
|
|
export const zWorkflowTriggerListResponse = z.object({
|
|
data: z.array(zWorkflowTriggerResponse),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunExportResponse
|
|
*/
|
|
export const zWorkflowRunExportResponse = z.object({
|
|
presigned_url: z.string().nullish(),
|
|
presigned_url_expires_at: z.string().nullish(),
|
|
status: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentCreatePayload
|
|
*/
|
|
export const zWorkflowCommentCreatePayload = z.object({
|
|
content: z.string(),
|
|
mentioned_user_ids: z.array(z.string()).optional(),
|
|
position_x: z.number(),
|
|
position_y: z.number(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentCreate
|
|
*/
|
|
export const zWorkflowCommentCreate = z.object({
|
|
created_at: z.int().nullish(),
|
|
id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentUpdatePayload
|
|
*/
|
|
export const zWorkflowCommentUpdatePayload = z.object({
|
|
content: z.string(),
|
|
mentioned_user_ids: z.array(z.string()).nullish(),
|
|
position_x: z.number().nullish(),
|
|
position_y: z.number().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentUpdate
|
|
*/
|
|
export const zWorkflowCommentUpdate = z.object({
|
|
id: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentReplyPayload
|
|
*/
|
|
export const zWorkflowCommentReplyPayload = z.object({
|
|
content: z.string(),
|
|
mentioned_user_ids: z.array(z.string()).optional(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentReplyCreate
|
|
*/
|
|
export const zWorkflowCommentReplyCreate = z.object({
|
|
created_at: z.int().nullish(),
|
|
id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentReplyUpdate
|
|
*/
|
|
export const zWorkflowCommentReplyUpdate = z.object({
|
|
id: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentResolve
|
|
*/
|
|
export const zWorkflowCommentResolve = z.object({
|
|
id: z.string(),
|
|
resolved: z.boolean(),
|
|
resolved_at: z.int().nullish(),
|
|
resolved_by: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* SyncDraftWorkflowPayload
|
|
*/
|
|
export const zSyncDraftWorkflowPayload = z.object({
|
|
conversation_variables: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
environment_variables: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
features: z.record(z.string(), z.unknown()),
|
|
graph: z.record(z.string(), z.unknown()),
|
|
hash: z.string().nullish(),
|
|
})
|
|
|
|
export const zSyncDraftWorkflowResponse = z.object({
|
|
hash: z.string().optional(),
|
|
result: z.string().optional(),
|
|
updated_at: z.string().optional(),
|
|
})
|
|
|
|
/**
|
|
* ConversationVariableUpdatePayload
|
|
*/
|
|
export const zConversationVariableUpdatePayload = z.object({
|
|
conversation_variables: z.array(z.record(z.string(), z.unknown())),
|
|
})
|
|
|
|
/**
|
|
* EnvironmentVariableUpdatePayload
|
|
*/
|
|
export const zEnvironmentVariableUpdatePayload = z.object({
|
|
environment_variables: z.array(z.record(z.string(), z.unknown())),
|
|
})
|
|
|
|
/**
|
|
* WorkflowFeaturesPayload
|
|
*/
|
|
export const zWorkflowFeaturesPayload = z.object({
|
|
features: z.record(z.string(), z.unknown()),
|
|
})
|
|
|
|
/**
|
|
* HumanInputDeliveryTestPayload
|
|
*/
|
|
export const zHumanInputDeliveryTestPayload = z.object({
|
|
delivery_method_id: z.string(),
|
|
inputs: z.record(z.string(), z.unknown()).optional(),
|
|
})
|
|
|
|
/**
|
|
* DraftWorkflowNodeRunPayload
|
|
*/
|
|
export const zDraftWorkflowNodeRunPayload = z.object({
|
|
files: z.array(z.record(z.string(), z.unknown())).nullish(),
|
|
inputs: z.record(z.string(), z.unknown()),
|
|
query: z.string().optional().default(''),
|
|
})
|
|
|
|
/**
|
|
* DraftWorkflowRunPayload
|
|
*/
|
|
export const zDraftWorkflowRunPayload = z.object({
|
|
datasource_info_list: z.array(z.record(z.string(), z.unknown())),
|
|
datasource_type: z.string(),
|
|
inputs: z.record(z.string(), z.unknown()),
|
|
start_node_id: z.string(),
|
|
})
|
|
|
|
export const zDraftWorkflowTriggerRunRequest = z.object({
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* DraftWorkflowTriggerRunAllPayload
|
|
*/
|
|
export const zDraftWorkflowTriggerRunAllPayload = z.object({
|
|
node_ids: z.array(z.string()),
|
|
})
|
|
|
|
export const zWorkflowDraftVariable = z.object({
|
|
description: z.string().optional(),
|
|
edited: z.boolean().optional(),
|
|
full_content: z.record(z.string(), z.unknown()).optional(),
|
|
id: z.string().optional(),
|
|
is_truncated: z.boolean().optional(),
|
|
name: z.string().optional(),
|
|
selector: z.array(z.string()).optional(),
|
|
type: z.string().optional(),
|
|
value: z.record(z.string(), z.unknown()).optional(),
|
|
value_type: z.string().optional(),
|
|
visible: z.boolean().optional(),
|
|
})
|
|
|
|
export const zWorkflowDraftVariableList = z.object({
|
|
items: z.array(zWorkflowDraftVariable).optional(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowDraftVariableUpdatePayload
|
|
*/
|
|
export const zWorkflowDraftVariableUpdatePayload = z.object({
|
|
name: z.string().nullish(),
|
|
value: z.unknown().optional(),
|
|
})
|
|
|
|
/**
|
|
* PublishWorkflowPayload
|
|
*/
|
|
export const zPublishWorkflowPayload = z.object({
|
|
marked_comment: z.string().max(100).nullish(),
|
|
marked_name: z.string().max(20).nullish(),
|
|
})
|
|
|
|
/**
|
|
* WebhookTriggerResponse
|
|
*/
|
|
export const zWebhookTriggerResponse = z.object({
|
|
created_at: z.iso.datetime().nullish(),
|
|
id: z.string(),
|
|
node_id: z.string(),
|
|
webhook_debug_url: z.string(),
|
|
webhook_id: z.string(),
|
|
webhook_url: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowUpdatePayload
|
|
*/
|
|
export const zWorkflowUpdatePayload = z.object({
|
|
marked_comment: z.string().max(100).nullish(),
|
|
marked_name: z.string().max(20).nullish(),
|
|
})
|
|
|
|
/**
|
|
* ApiKeyItem
|
|
*/
|
|
export const zApiKeyItem = z.object({
|
|
created_at: z.int().nullish(),
|
|
id: z.string(),
|
|
last_used_at: z.int().nullish(),
|
|
token: z.string(),
|
|
type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* ApiKeyList
|
|
*/
|
|
export const zApiKeyList = z.object({
|
|
data: z.array(zApiKeyItem),
|
|
})
|
|
|
|
/**
|
|
* IconType
|
|
*/
|
|
export const zIconType = z.enum(['emoji', 'image', 'link'])
|
|
|
|
/**
|
|
* CreateAppPayload
|
|
*/
|
|
export const zCreateAppPayload = z.object({
|
|
description: z.string().max(400).nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: zIconType.optional(),
|
|
mode: z.enum(['advanced-chat', 'agent-chat', 'chat', 'completion', 'workflow']),
|
|
name: z.string().min(1),
|
|
})
|
|
|
|
/**
|
|
* UpdateAppPayload
|
|
*/
|
|
export const zUpdateAppPayload = z.object({
|
|
description: z.string().max(400).nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: zIconType.optional(),
|
|
max_active_requests: z.int().nullish(),
|
|
name: z.string().min(1),
|
|
use_icon_as_answer_icon: z.boolean().nullish(),
|
|
})
|
|
|
|
/**
|
|
* CopyAppPayload
|
|
*/
|
|
export const zCopyAppPayload = z.object({
|
|
description: z.string().max(400).nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: zIconType.optional(),
|
|
name: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppIconPayload
|
|
*/
|
|
export const zAppIconPayload = z.object({
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: zIconType.optional(),
|
|
})
|
|
|
|
/**
|
|
* Tag
|
|
*/
|
|
export const zTag = z.object({
|
|
id: z.string(),
|
|
name: z.string(),
|
|
type: z.string(),
|
|
})
|
|
|
|
export const zJsonValue = z.unknown()
|
|
|
|
/**
|
|
* WorkflowPartial
|
|
*/
|
|
export const zWorkflowPartial = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
id: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
updated_by: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* ImportStatus
|
|
*/
|
|
export const zImportStatus = z.enum(['completed', 'completed-with-warnings', 'failed', 'pending'])
|
|
|
|
/**
|
|
* Import
|
|
*/
|
|
export const zImport = z.object({
|
|
app_id: z.string().nullish(),
|
|
app_mode: z.string().nullish(),
|
|
current_dsl_version: z.string().optional().default('0.6.0'),
|
|
error: z.string().optional().default(''),
|
|
id: z.string(),
|
|
imported_dsl_version: z.string().optional().default(''),
|
|
status: zImportStatus,
|
|
})
|
|
|
|
/**
|
|
* DeletedTool
|
|
*/
|
|
export const zDeletedTool = z.object({
|
|
provider_id: z.string(),
|
|
tool_name: z.string(),
|
|
type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Site
|
|
*/
|
|
export const zSite = z.object({
|
|
app_base_url: z.string().nullish(),
|
|
chat_color_theme: z.string().nullish(),
|
|
chat_color_theme_inverted: z.boolean().nullish(),
|
|
code: z.string().nullish(),
|
|
copyright: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
custom_disclaimer: z.string().nullish(),
|
|
customize_domain: z.string().nullish(),
|
|
customize_token_strategy: z.string().nullish(),
|
|
default_language: z.string().nullish(),
|
|
description: z.string().nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: z.unknown().optional(),
|
|
privacy_policy: z.string().nullish(),
|
|
prompt_public: z.boolean().nullish(),
|
|
show_workflow_steps: z.boolean().nullish(),
|
|
title: z.string().nullish(),
|
|
updated_at: z.int().nullish(),
|
|
updated_by: z.string().nullish(),
|
|
use_icon_as_answer_icon: z.boolean().nullish(),
|
|
})
|
|
|
|
/**
|
|
* ComposerBindingPayload
|
|
*/
|
|
export const zComposerBindingPayload = z.object({
|
|
agent_id: z.string().nullish(),
|
|
binding_type: z.enum(['inline_agent', 'roster_agent']),
|
|
current_snapshot_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* ComposerSaveStrategy
|
|
*/
|
|
export const zComposerSaveStrategy = z.enum([
|
|
'node_job_only',
|
|
'save_as_new_agent',
|
|
'save_as_new_version',
|
|
'save_to_current_version',
|
|
'save_to_roster',
|
|
])
|
|
|
|
/**
|
|
* ComposerSoulLockPayload
|
|
*/
|
|
export const zComposerSoulLockPayload = z.object({
|
|
locked: z.boolean().optional().default(true),
|
|
unlocked_from_version_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* ComposerVariant
|
|
*/
|
|
export const zComposerVariant = z.enum(['agent_app', 'workflow'])
|
|
|
|
/**
|
|
* AnnotationHitHistory
|
|
*/
|
|
export const zAnnotationHitHistory = z.object({
|
|
annotation_content: z.string().nullish(),
|
|
annotation_question: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
id: z.string(),
|
|
question: z.string().nullish(),
|
|
score: z.number().nullish(),
|
|
source: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AnnotationHitHistoryList
|
|
*/
|
|
export const zAnnotationHitHistoryList = z.object({
|
|
data: z.array(zAnnotationHitHistory),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* FeedbackStat
|
|
*/
|
|
export const zFeedbackStat = z.object({
|
|
dislike: z.int(),
|
|
like: z.int(),
|
|
})
|
|
|
|
/**
|
|
* ConversationVariableResponse
|
|
*/
|
|
export const zConversationVariableResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
description: z.string().nullish(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
value: z.string().nullish(),
|
|
value_type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* PaginatedConversationVariableResponse
|
|
*/
|
|
export const zPaginatedConversationVariableResponse = z.object({
|
|
data: z.array(zConversationVariableResponse),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* AgentThought
|
|
*/
|
|
export const zAgentThought = z.object({
|
|
chain_id: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
files: z.array(z.string()),
|
|
id: z.string(),
|
|
message_chain_id: z.string().nullish(),
|
|
message_id: z.string(),
|
|
observation: z.string().nullish(),
|
|
position: z.int(),
|
|
thought: z.string().nullish(),
|
|
tool: z.string().nullish(),
|
|
tool_input: z.string().nullish(),
|
|
tool_labels: zJsonValue,
|
|
})
|
|
|
|
/**
|
|
* MessageFile
|
|
*/
|
|
export const zMessageFile = z.object({
|
|
belongs_to: z.string().nullish(),
|
|
filename: z.string(),
|
|
id: z.string(),
|
|
mime_type: z.string().nullish(),
|
|
size: z.int().nullish(),
|
|
transfer_method: z.string(),
|
|
type: z.string(),
|
|
upload_file_id: z.string().nullish(),
|
|
url: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppMCPServerStatus
|
|
*
|
|
* AppMCPServer Status Enum
|
|
*/
|
|
export const zAppMcpServerStatus = z.enum(['active', 'inactive', 'normal'])
|
|
|
|
/**
|
|
* AppMCPServerResponse
|
|
*/
|
|
export const zAppMcpServerResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
description: z.string(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
parameters: z.unknown(),
|
|
server_code: z.string(),
|
|
status: zAppMcpServerStatus,
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* SimpleAccount
|
|
*/
|
|
export const zSimpleAccount = z.object({
|
|
email: z.string(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
})
|
|
|
|
/**
|
|
* AdvancedChatWorkflowRunForListResponse
|
|
*/
|
|
export const zAdvancedChatWorkflowRunForListResponse = z.object({
|
|
conversation_id: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
created_by_account: zSimpleAccount.optional(),
|
|
elapsed_time: z.number().nullish(),
|
|
exceptions_count: z.int().nullish(),
|
|
finished_at: z.int().nullish(),
|
|
id: z.string(),
|
|
message_id: z.string().nullish(),
|
|
retry_index: z.int().nullish(),
|
|
status: z.string().nullish(),
|
|
total_steps: z.int().nullish(),
|
|
total_tokens: z.int().nullish(),
|
|
version: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AdvancedChatWorkflowRunPaginationResponse
|
|
*/
|
|
export const zAdvancedChatWorkflowRunPaginationResponse = z.object({
|
|
data: z.array(zAdvancedChatWorkflowRunForListResponse),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
})
|
|
|
|
/**
|
|
* ConversationAnnotation
|
|
*/
|
|
export const zConversationAnnotation = z.object({
|
|
account: zSimpleAccount.optional(),
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
id: z.string(),
|
|
question: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* ConversationAnnotationHitHistory
|
|
*/
|
|
export const zConversationAnnotationHitHistory = z.object({
|
|
annotation_create_account: zSimpleAccount.optional(),
|
|
created_at: z.int().nullish(),
|
|
id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Feedback
|
|
*/
|
|
export const zFeedback = z.object({
|
|
content: z.string().nullish(),
|
|
from_account: zSimpleAccount.optional(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
rating: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MessageDetail
|
|
*/
|
|
export const zMessageDetail = z.object({
|
|
agent_thoughts: z.array(zAgentThought),
|
|
annotation: zConversationAnnotation.optional(),
|
|
annotation_hit_history: zConversationAnnotationHitHistory.optional(),
|
|
answer_tokens: z.int(),
|
|
conversation_id: z.string(),
|
|
created_at: z.int().nullish(),
|
|
error: z.string().nullish(),
|
|
feedbacks: z.array(zFeedback),
|
|
from_account_id: z.string().nullish(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
id: z.string(),
|
|
inputs: z.record(z.string(), zJsonValue),
|
|
message: zJsonValue,
|
|
message_files: z.array(zMessageFile),
|
|
message_metadata_dict: zJsonValue,
|
|
message_tokens: z.int(),
|
|
parent_message_id: z.string().nullish(),
|
|
provider_response_latency: z.number(),
|
|
query: z.string(),
|
|
re_sign_file_url_answer: z.string(),
|
|
status: z.string(),
|
|
workflow_run_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunForListResponse
|
|
*/
|
|
export const zWorkflowRunForListResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by_account: zSimpleAccount.optional(),
|
|
elapsed_time: z.number().nullish(),
|
|
exceptions_count: z.int().nullish(),
|
|
finished_at: z.int().nullish(),
|
|
id: z.string(),
|
|
retry_index: z.int().nullish(),
|
|
status: z.string().nullish(),
|
|
total_steps: z.int().nullish(),
|
|
total_tokens: z.int().nullish(),
|
|
version: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunPaginationResponse
|
|
*/
|
|
export const zWorkflowRunPaginationResponse = z.object({
|
|
data: z.array(zWorkflowRunForListResponse),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
})
|
|
|
|
/**
|
|
* SimpleEndUser
|
|
*/
|
|
export const zSimpleEndUser = z.object({
|
|
id: z.string(),
|
|
is_anonymous: z.boolean(),
|
|
session_id: z.string().nullish(),
|
|
type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunDetailResponse
|
|
*/
|
|
export const zWorkflowRunDetailResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by_account: zSimpleAccount.optional(),
|
|
created_by_end_user: zSimpleEndUser.optional(),
|
|
created_by_role: z.string().nullish(),
|
|
elapsed_time: z.number().nullish(),
|
|
error: z.string().nullish(),
|
|
exceptions_count: z.int().nullish(),
|
|
finished_at: z.int().nullish(),
|
|
graph: z.unknown(),
|
|
id: z.string(),
|
|
inputs: z.unknown(),
|
|
outputs: z.unknown(),
|
|
status: z.string().nullish(),
|
|
total_steps: z.int().nullish(),
|
|
total_tokens: z.int().nullish(),
|
|
version: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunNodeExecutionResponse
|
|
*/
|
|
export const zWorkflowRunNodeExecutionResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by_account: zSimpleAccount.optional(),
|
|
created_by_end_user: zSimpleEndUser.optional(),
|
|
created_by_role: z.string().nullish(),
|
|
elapsed_time: z.number().nullish(),
|
|
error: z.string().nullish(),
|
|
execution_metadata: z.unknown().optional(),
|
|
extras: z.unknown().optional(),
|
|
finished_at: z.int().nullish(),
|
|
id: z.string(),
|
|
index: z.int().nullish(),
|
|
inputs: z.unknown().optional(),
|
|
inputs_truncated: z.boolean().nullish(),
|
|
node_id: z.string().nullish(),
|
|
node_type: z.string().nullish(),
|
|
outputs: z.unknown().optional(),
|
|
outputs_truncated: z.boolean().nullish(),
|
|
predecessor_node_id: z.string().nullish(),
|
|
process_data: z.unknown().optional(),
|
|
process_data_truncated: z.boolean().nullish(),
|
|
status: z.string().nullish(),
|
|
title: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunNodeExecutionListResponse
|
|
*/
|
|
export const zWorkflowRunNodeExecutionListResponse = z.object({
|
|
data: z.array(zWorkflowRunNodeExecutionResponse),
|
|
})
|
|
|
|
/**
|
|
* AccountWithRole
|
|
*/
|
|
export const zAccountWithRole = z.object({
|
|
avatar: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
email: z.string(),
|
|
id: z.string(),
|
|
last_active_at: z.int().nullish(),
|
|
last_login_at: z.int().nullish(),
|
|
name: z.string(),
|
|
role: z.string(),
|
|
status: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentMentionUsersPayload
|
|
*/
|
|
export const zWorkflowCommentMentionUsersPayload = z.object({
|
|
users: z.array(zAccountWithRole),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentAccount
|
|
*/
|
|
export const zWorkflowCommentAccount = z.object({
|
|
avatar_url: z.string().readonly().nullable(),
|
|
email: z.string(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentBasic
|
|
*/
|
|
export const zWorkflowCommentBasic = z.object({
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string(),
|
|
created_by_account: zWorkflowCommentAccount.optional(),
|
|
id: z.string(),
|
|
mention_count: z.int(),
|
|
participants: z.array(zWorkflowCommentAccount),
|
|
position_x: z.number(),
|
|
position_y: z.number(),
|
|
reply_count: z.int(),
|
|
resolved: z.boolean(),
|
|
resolved_at: z.int().nullish(),
|
|
resolved_by: z.string().nullish(),
|
|
resolved_by_account: zWorkflowCommentAccount.optional(),
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentBasicList
|
|
*/
|
|
export const zWorkflowCommentBasicList = z.object({
|
|
data: z.array(zWorkflowCommentBasic),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentMention
|
|
*/
|
|
export const zWorkflowCommentMention = z.object({
|
|
mentioned_user_account: zWorkflowCommentAccount.optional(),
|
|
mentioned_user_id: z.string(),
|
|
reply_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentReply
|
|
*/
|
|
export const zWorkflowCommentReply = z.object({
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string(),
|
|
created_by_account: zWorkflowCommentAccount.optional(),
|
|
id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentDetail
|
|
*/
|
|
export const zWorkflowCommentDetail = z.object({
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string(),
|
|
created_by_account: zWorkflowCommentAccount.optional(),
|
|
id: z.string(),
|
|
mentions: z.array(zWorkflowCommentMention),
|
|
position_x: z.number(),
|
|
position_y: z.number(),
|
|
replies: z.array(zWorkflowCommentReply),
|
|
resolved: z.boolean(),
|
|
resolved_at: z.int().nullish(),
|
|
resolved_by: z.string().nullish(),
|
|
resolved_by_account: zWorkflowCommentAccount.optional(),
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowConversationVariableResponse
|
|
*/
|
|
export const zWorkflowConversationVariableResponse = z.object({
|
|
description: z.string(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
value: z.record(z.string(), z.unknown()),
|
|
value_type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowEnvironmentVariableResponse
|
|
*/
|
|
export const zWorkflowEnvironmentVariableResponse = z.object({
|
|
description: z.string(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
value: z.record(z.string(), z.unknown()),
|
|
value_type: z.string(),
|
|
})
|
|
|
|
/**
|
|
* PipelineVariableResponse
|
|
*/
|
|
export const zPipelineVariableResponse = z.object({
|
|
allowed_file_extensions: z.array(z.string()).nullish(),
|
|
allowed_file_types: z.array(z.string()).nullish(),
|
|
allowed_file_upload_methods: z.array(z.string()).nullish(),
|
|
belong_to_node_id: z.string(),
|
|
default_value: z.record(z.string(), z.unknown()).optional(),
|
|
label: z.string(),
|
|
max_length: z.int().nullish(),
|
|
options: z.array(z.string()).nullish(),
|
|
placeholder: z.string().nullish(),
|
|
required: z.boolean(),
|
|
tooltips: z.string().nullish(),
|
|
type: z.string(),
|
|
unit: z.string().nullish(),
|
|
variable: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowResponse
|
|
*/
|
|
export const zWorkflowResponse = z.object({
|
|
conversation_variables: z.array(zWorkflowConversationVariableResponse),
|
|
created_at: z.int(),
|
|
created_by: zSimpleAccount.optional(),
|
|
environment_variables: z.array(zWorkflowEnvironmentVariableResponse),
|
|
features: z.record(z.string(), z.unknown()),
|
|
graph: z.record(z.string(), z.unknown()),
|
|
hash: z.string(),
|
|
id: z.string(),
|
|
marked_comment: z.string(),
|
|
marked_name: z.string(),
|
|
rag_pipeline_variables: z.array(zPipelineVariableResponse),
|
|
tool_published: z.boolean(),
|
|
updated_at: z.int(),
|
|
updated_by: zSimpleAccount.optional(),
|
|
version: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowPaginationResponse
|
|
*/
|
|
export const zWorkflowPaginationResponse = z.object({
|
|
has_more: z.boolean(),
|
|
items: z.array(zWorkflowResponse),
|
|
limit: z.int(),
|
|
page: z.int(),
|
|
})
|
|
|
|
export const zWorkflowDraftVariableWithoutValue = z.object({
|
|
description: z.string().optional(),
|
|
edited: z.boolean().optional(),
|
|
id: z.string().optional(),
|
|
is_truncated: z.boolean().optional(),
|
|
name: z.string().optional(),
|
|
selector: z.array(z.string()).optional(),
|
|
type: z.string().optional(),
|
|
value_type: z.string().optional(),
|
|
visible: z.boolean().optional(),
|
|
})
|
|
|
|
export const zWorkflowDraftVariableListWithoutValue = z.object({
|
|
items: z.array(zWorkflowDraftVariableWithoutValue).optional(),
|
|
total: z.record(z.string(), z.unknown()).optional(),
|
|
})
|
|
|
|
/**
|
|
* ModelConfigPartial
|
|
*/
|
|
export const zModelConfigPartial = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
model_dict: zJsonValue.optional(),
|
|
pre_prompt: z.string().nullish(),
|
|
updated_at: z.int().nullish(),
|
|
updated_by: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AppPartial
|
|
*/
|
|
export const zAppPartial = z.object({
|
|
access_mode: z.string().nullish(),
|
|
app_model_config: zModelConfigPartial.optional(),
|
|
author_name: z.string().nullish(),
|
|
create_user_name: z.string().nullish(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
desc_or_prompt: z.string().nullish(),
|
|
has_draft_trigger: z.boolean().nullish(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: z.string().nullish(),
|
|
id: z.string(),
|
|
max_active_requests: z.int().nullish(),
|
|
mode_compatible_with_agent: z.string(),
|
|
name: z.string(),
|
|
tags: z.array(zTag).optional(),
|
|
updated_at: z.int().nullish(),
|
|
updated_by: z.string().nullish(),
|
|
use_icon_as_answer_icon: z.boolean().nullish(),
|
|
workflow: zWorkflowPartial.optional(),
|
|
})
|
|
|
|
/**
|
|
* AppPagination
|
|
*/
|
|
export const zAppPagination = z.object({
|
|
has_next: z.boolean(),
|
|
items: z.array(zAppPartial),
|
|
page: z.int(),
|
|
per_page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* LLMMode
|
|
*
|
|
* Enum class for large language model mode.
|
|
*/
|
|
export const zLlmMode = z.enum(['chat', 'completion'])
|
|
|
|
/**
|
|
* ModelConfig
|
|
*/
|
|
export const zModelConfig = z.object({
|
|
completion_params: z.record(z.string(), z.unknown()).optional(),
|
|
mode: zLlmMode,
|
|
name: z.string(),
|
|
provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* AppDetail
|
|
*/
|
|
export const zAppDetail = z.object({
|
|
access_mode: z.string().nullish(),
|
|
app_model_config: zModelConfig.optional(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
description: z.string().nullish(),
|
|
enable_api: z.boolean(),
|
|
enable_site: z.boolean(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
id: z.string(),
|
|
mode_compatible_with_agent: z.string(),
|
|
name: z.string(),
|
|
tags: z.array(zTag).optional(),
|
|
tracing: zJsonValue.optional(),
|
|
updated_at: z.int().nullish(),
|
|
updated_by: z.string().nullish(),
|
|
use_icon_as_answer_icon: z.boolean().nullish(),
|
|
workflow: zWorkflowPartial.optional(),
|
|
})
|
|
|
|
/**
|
|
* AppDetailWithSite
|
|
*/
|
|
export const zAppDetailWithSite = z.object({
|
|
access_mode: z.string().nullish(),
|
|
api_base_url: z.string().nullish(),
|
|
app_model_config: zModelConfig.optional(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string().nullish(),
|
|
deleted_tools: z.array(zDeletedTool).optional(),
|
|
description: z.string().nullish(),
|
|
enable_api: z.boolean(),
|
|
enable_site: z.boolean(),
|
|
icon: z.string().nullish(),
|
|
icon_background: z.string().nullish(),
|
|
icon_type: z.string().nullish(),
|
|
id: z.string(),
|
|
max_active_requests: z.int().nullish(),
|
|
mode_compatible_with_agent: z.string(),
|
|
name: z.string(),
|
|
site: zSite.optional(),
|
|
tags: z.array(zTag).optional(),
|
|
tracing: zJsonValue.optional(),
|
|
updated_at: z.int().nullish(),
|
|
updated_by: z.string().nullish(),
|
|
use_icon_as_answer_icon: z.boolean().nullish(),
|
|
workflow: zWorkflowPartial.optional(),
|
|
})
|
|
|
|
/**
|
|
* ConversationDetail
|
|
*/
|
|
export const zConversationDetail = z.object({
|
|
admin_feedback_stats: zFeedbackStat.optional(),
|
|
annotated: z.boolean(),
|
|
created_at: z.int().nullish(),
|
|
from_account_id: z.string().nullish(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
id: z.string(),
|
|
introduction: z.string().nullish(),
|
|
message_count: z.int(),
|
|
model_config: zModelConfig.optional(),
|
|
status: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
user_feedback_stats: zFeedbackStat.optional(),
|
|
})
|
|
|
|
/**
|
|
* ConversationMessageDetail
|
|
*/
|
|
export const zConversationMessageDetail = z.object({
|
|
created_at: z.int().nullish(),
|
|
first_message: zMessageDetail.optional(),
|
|
from_account_id: z.string().nullish(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
id: z.string(),
|
|
model_config: zModelConfig.optional(),
|
|
status: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Type
|
|
*/
|
|
export const zType = z.enum(['github', 'marketplace', 'package'])
|
|
|
|
/**
|
|
* PluginDependency
|
|
*/
|
|
export const zPluginDependency = z.object({
|
|
current_identifier: z.string().nullish(),
|
|
type: zType,
|
|
value: z.unknown(),
|
|
})
|
|
|
|
/**
|
|
* CheckDependenciesResult
|
|
*/
|
|
export const zCheckDependenciesResult = z.object({
|
|
leaked_dependencies: z.array(zPluginDependency).optional(),
|
|
})
|
|
|
|
/**
|
|
* Github
|
|
*/
|
|
export const zGithub = z.object({
|
|
github_plugin_unique_identifier: z.string(),
|
|
package: z.string(),
|
|
repo: z.string(),
|
|
version: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Marketplace
|
|
*/
|
|
export const zMarketplace = z.object({
|
|
marketplace_plugin_unique_identifier: z.string(),
|
|
version: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Package
|
|
*/
|
|
export const zPackage = z.object({
|
|
plugin_unique_identifier: z.string(),
|
|
version: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowOnlineUser
|
|
*/
|
|
export const zWorkflowOnlineUser = z.object({
|
|
avatar: z.string().nullish(),
|
|
user_id: z.string(),
|
|
username: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowOnlineUsersByApp
|
|
*/
|
|
export const zWorkflowOnlineUsersByApp = z.object({
|
|
app_id: z.string(),
|
|
users: z.array(zWorkflowOnlineUser),
|
|
})
|
|
|
|
/**
|
|
* WorkflowOnlineUsersResponse
|
|
*/
|
|
export const zWorkflowOnlineUsersResponse = z.object({
|
|
data: z.array(zWorkflowOnlineUsersByApp),
|
|
})
|
|
|
|
/**
|
|
* AppVariableConfig
|
|
*/
|
|
export const zAppVariableConfig = z.object({
|
|
default: z.unknown().optional(),
|
|
name: z.string().min(1).max(255),
|
|
required: z.boolean().optional().default(false),
|
|
type: z.string().min(1).max(64),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulEnvConfig
|
|
*/
|
|
export const zAgentSoulEnvConfig = z.object({
|
|
secret_refs: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
variables: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulHumanConfig
|
|
*/
|
|
export const zAgentSoulHumanConfig = z.object({
|
|
contacts: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
tools: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulMemoryConfig
|
|
*/
|
|
export const zAgentSoulMemoryConfig = z.object({
|
|
artifacts: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
budget: z.string().nullish(),
|
|
scope: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulPromptConfig
|
|
*/
|
|
export const zAgentSoulPromptConfig = z.object({
|
|
system_prompt: z.string().optional().default(''),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulSandboxConfig
|
|
*/
|
|
export const zAgentSoulSandboxConfig = z.object({
|
|
config: z.record(z.string(), z.unknown()).optional(),
|
|
provider: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulSkillsFilesConfig
|
|
*/
|
|
export const zAgentSoulSkillsFilesConfig = z.object({
|
|
files: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
skills: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulToolsConfig
|
|
*/
|
|
export const zAgentSoulToolsConfig = z.object({
|
|
cli_tools: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
dify_tools: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowNodeJobMode
|
|
*/
|
|
export const zWorkflowNodeJobMode = z.enum(['let_agent_figure_it_out', 'tell_agent_what_to_do'])
|
|
|
|
/**
|
|
* SimpleModelConfig
|
|
*/
|
|
export const zSimpleModelConfig = z.object({
|
|
model_dict: zJsonValue.optional(),
|
|
pre_prompt: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* StatusCount
|
|
*/
|
|
export const zStatusCount = z.object({
|
|
failed: z.int(),
|
|
partial_success: z.int(),
|
|
paused: z.int(),
|
|
success: z.int(),
|
|
})
|
|
|
|
/**
|
|
* ConversationWithSummary
|
|
*/
|
|
export const zConversationWithSummary = z.object({
|
|
admin_feedback_stats: zFeedbackStat.optional(),
|
|
annotated: z.boolean(),
|
|
created_at: z.int().nullish(),
|
|
from_account_id: z.string().nullish(),
|
|
from_account_name: z.string().nullish(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_end_user_session_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
id: z.string(),
|
|
message_count: z.int(),
|
|
model_config: zSimpleModelConfig.optional(),
|
|
name: z.string(),
|
|
read_at: z.int().nullish(),
|
|
status: z.string(),
|
|
status_count: zStatusCount.optional(),
|
|
summary_or_query: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
user_feedback_stats: zFeedbackStat.optional(),
|
|
})
|
|
|
|
/**
|
|
* ConversationWithSummaryPagination
|
|
*/
|
|
export const zConversationWithSummaryPagination = z.object({
|
|
has_next: z.boolean(),
|
|
items: z.array(zConversationWithSummary),
|
|
page: z.int(),
|
|
per_page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* SimpleMessageDetail
|
|
*/
|
|
export const zSimpleMessageDetail = z.object({
|
|
answer: z.string(),
|
|
inputs: z.record(z.string(), zJsonValue),
|
|
message: z.string(),
|
|
query: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Conversation
|
|
*/
|
|
export const zConversation = z.object({
|
|
admin_feedback_stats: zFeedbackStat.optional(),
|
|
annotation: zConversationAnnotation.optional(),
|
|
created_at: z.int().nullish(),
|
|
first_message: zSimpleMessageDetail.optional(),
|
|
from_account_id: z.string().nullish(),
|
|
from_account_name: z.string().nullish(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_end_user_session_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
id: z.string(),
|
|
model_config: zSimpleModelConfig.optional(),
|
|
read_at: z.int().nullish(),
|
|
status: z.string(),
|
|
updated_at: z.int().nullish(),
|
|
user_feedback_stats: zFeedbackStat.optional(),
|
|
})
|
|
|
|
/**
|
|
* ConversationPagination
|
|
*/
|
|
export const zConversationPagination = z.object({
|
|
has_next: z.boolean(),
|
|
items: z.array(zConversation),
|
|
page: z.int(),
|
|
per_page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* HumanInputFormSubmissionData
|
|
*/
|
|
export const zHumanInputFormSubmissionData = z.object({
|
|
action_id: z.string(),
|
|
action_text: z.string(),
|
|
node_id: z.string(),
|
|
node_title: z.string(),
|
|
rendered_content: z.string(),
|
|
})
|
|
|
|
/**
|
|
* ExecutionContentType
|
|
*/
|
|
export const zExecutionContentType = z.enum(['human_input'])
|
|
|
|
/**
|
|
* WorkflowRunForLogResponse
|
|
*/
|
|
export const zWorkflowRunForLogResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
elapsed_time: z.number().nullish(),
|
|
error: z.string().nullish(),
|
|
exceptions_count: z.int().nullish(),
|
|
finished_at: z.int().nullish(),
|
|
id: z.string(),
|
|
status: z.string().nullish(),
|
|
total_steps: z.int().nullish(),
|
|
total_tokens: z.int().nullish(),
|
|
triggered_from: z.string().nullish(),
|
|
version: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowAppLogPartialResponse
|
|
*/
|
|
export const zWorkflowAppLogPartialResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by_account: zSimpleAccount.optional(),
|
|
created_by_end_user: zSimpleEndUser.optional(),
|
|
created_by_role: z.string().nullish(),
|
|
created_from: z.string().nullish(),
|
|
details: z.unknown().optional(),
|
|
id: z.string(),
|
|
workflow_run: zWorkflowRunForLogResponse.optional(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowAppLogPaginationResponse
|
|
*/
|
|
export const zWorkflowAppLogPaginationResponse = z.object({
|
|
data: z.array(zWorkflowAppLogPartialResponse),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowRunForArchivedLogResponse
|
|
*/
|
|
export const zWorkflowRunForArchivedLogResponse = z.object({
|
|
elapsed_time: z.number().nullish(),
|
|
id: z.string(),
|
|
status: z.string().nullish(),
|
|
total_tokens: z.int().nullish(),
|
|
triggered_from: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowArchivedLogPartialResponse
|
|
*/
|
|
export const zWorkflowArchivedLogPartialResponse = z.object({
|
|
created_at: z.int().nullish(),
|
|
created_by_account: zSimpleAccount.optional(),
|
|
created_by_end_user: zSimpleEndUser.optional(),
|
|
id: z.string(),
|
|
trigger_metadata: z.unknown().optional(),
|
|
workflow_run: zWorkflowRunForArchivedLogResponse.optional(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowArchivedLogPaginationResponse
|
|
*/
|
|
export const zWorkflowArchivedLogPaginationResponse = z.object({
|
|
data: z.array(zWorkflowArchivedLogPartialResponse),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
page: z.int(),
|
|
total: z.int(),
|
|
})
|
|
|
|
/**
|
|
* AgentKnowledgeQueryMode
|
|
*/
|
|
export const zAgentKnowledgeQueryMode = z.enum(['generated_query', 'user_query'])
|
|
|
|
/**
|
|
* AgentSoulKnowledgeConfig
|
|
*/
|
|
export const zAgentSoulKnowledgeConfig = z.object({
|
|
datasets: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
query_config: z.record(z.string(), z.unknown()).optional(),
|
|
query_mode: zAgentKnowledgeQueryMode.optional(),
|
|
})
|
|
|
|
/**
|
|
* AgentSoulConfig
|
|
*/
|
|
export const zAgentSoulConfig = z.object({
|
|
app_features: z.record(z.string(), z.unknown()).optional(),
|
|
app_variables: z.array(zAppVariableConfig).optional(),
|
|
env: zAgentSoulEnvConfig.optional(),
|
|
human: zAgentSoulHumanConfig.optional(),
|
|
knowledge: zAgentSoulKnowledgeConfig.optional(),
|
|
memory: zAgentSoulMemoryConfig.optional(),
|
|
misc_legacy: z.record(z.string(), z.unknown()).optional(),
|
|
prompt: zAgentSoulPromptConfig.optional(),
|
|
sandbox: zAgentSoulSandboxConfig.optional(),
|
|
schema_version: z.int().optional().default(1),
|
|
skills_files: zAgentSoulSkillsFilesConfig.optional(),
|
|
tools: zAgentSoulToolsConfig.optional(),
|
|
})
|
|
|
|
/**
|
|
* DeclaredOutputCheckConfig
|
|
*/
|
|
export const zDeclaredOutputCheckConfig = z.object({
|
|
benchmark_file_ref: z.record(z.string(), z.unknown()).nullish(),
|
|
prompt: z.string().nullish(),
|
|
type: z.string().min(1).max(64),
|
|
})
|
|
|
|
/**
|
|
* DeclaredOutputFailureStrategy
|
|
*/
|
|
export const zDeclaredOutputFailureStrategy = z.object({
|
|
max_retries: z.int().gte(0).lte(10).optional().default(0),
|
|
on_output_check_failed: z.string().nullish(),
|
|
on_type_check_failed: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* DeclaredOutputFileConfig
|
|
*/
|
|
export const zDeclaredOutputFileConfig = z.object({
|
|
extensions: z.array(z.string()).optional(),
|
|
mime_types: z.array(z.string()).optional(),
|
|
})
|
|
|
|
/**
|
|
* DeclaredOutputType
|
|
*/
|
|
export const zDeclaredOutputType = z.enum([
|
|
'array',
|
|
'boolean',
|
|
'file',
|
|
'number',
|
|
'object',
|
|
'string',
|
|
])
|
|
|
|
/**
|
|
* DeclaredOutputConfig
|
|
*/
|
|
export const zDeclaredOutputConfig = z.object({
|
|
checks: z.array(zDeclaredOutputCheckConfig).optional(),
|
|
description: z.string().nullish(),
|
|
failure_strategy: zDeclaredOutputFailureStrategy.optional(),
|
|
file: zDeclaredOutputFileConfig.optional(),
|
|
id: z.string().nullish(),
|
|
name: z.string().min(1).max(255),
|
|
required: z.boolean().optional().default(true),
|
|
type: zDeclaredOutputType,
|
|
})
|
|
|
|
/**
|
|
* WorkflowNodeJobConfig
|
|
*/
|
|
export const zWorkflowNodeJobConfig = z.object({
|
|
declared_outputs: z.array(zDeclaredOutputConfig).optional(),
|
|
human_contacts: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
mode: zWorkflowNodeJobMode.optional(),
|
|
previous_node_output_refs: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
schema_version: z.int().optional().default(1),
|
|
workflow_prompt: z.string().optional().default(''),
|
|
})
|
|
|
|
/**
|
|
* ComposerSavePayload
|
|
*/
|
|
export const zComposerSavePayload = z.object({
|
|
agent_soul: zAgentSoulConfig.optional(),
|
|
binding: zComposerBindingPayload.optional(),
|
|
client_revision_id: z.string().nullish(),
|
|
idempotency_key: z.string().nullish(),
|
|
new_agent_name: z.string().min(1).max(255).nullish(),
|
|
node_job: zWorkflowNodeJobConfig.optional(),
|
|
save_strategy: zComposerSaveStrategy,
|
|
soul_lock: zComposerSoulLockPayload.optional(),
|
|
variant: zComposerVariant,
|
|
version_note: z.string().nullish(),
|
|
})
|
|
|
|
export const zFormInputConfig = z.unknown()
|
|
|
|
/**
|
|
* ButtonStyle
|
|
*
|
|
* Button styles for user actions.
|
|
*/
|
|
export const zButtonStyle = z.enum(['accent', 'default', 'ghost', 'primary'])
|
|
|
|
/**
|
|
* UserActionConfig
|
|
*
|
|
* User action configuration.
|
|
*/
|
|
export const zUserActionConfig = z.object({
|
|
button_style: zButtonStyle.optional(),
|
|
id: z.string().max(20),
|
|
title: z.string().max(100),
|
|
})
|
|
|
|
/**
|
|
* HumanInputFormDefinition
|
|
*/
|
|
export const zHumanInputFormDefinition = z.object({
|
|
actions: z.array(zUserActionConfig).optional(),
|
|
display_in_ui: z.boolean().optional().default(false),
|
|
expiration_time: z.int(),
|
|
form_content: z.string(),
|
|
form_id: z.string(),
|
|
form_token: z.string().nullish(),
|
|
inputs: z.array(zFormInputConfig).optional(),
|
|
node_id: z.string(),
|
|
node_title: z.string(),
|
|
resolved_default_values: z.record(z.string(), z.unknown()).optional(),
|
|
})
|
|
|
|
/**
|
|
* HumanInputContent
|
|
*/
|
|
export const zHumanInputContent = z.object({
|
|
form_definition: zHumanInputFormDefinition.optional(),
|
|
form_submission_data: zHumanInputFormSubmissionData.optional(),
|
|
submitted: z.boolean(),
|
|
type: zExecutionContentType.optional(),
|
|
workflow_run_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MessageDetailResponse
|
|
*/
|
|
export const zMessageDetailResponse = z.object({
|
|
agent_thoughts: z.array(zAgentThought).optional(),
|
|
annotation: zConversationAnnotation.optional(),
|
|
annotation_hit_history: zConversationAnnotationHitHistory.optional(),
|
|
answer_tokens: z.int().nullish(),
|
|
conversation_id: z.string(),
|
|
created_at: z.int().nullish(),
|
|
error: z.string().nullish(),
|
|
extra_contents: z.array(zHumanInputContent).optional(),
|
|
feedbacks: z.array(zFeedback).optional(),
|
|
from_account_id: z.string().nullish(),
|
|
from_end_user_id: z.string().nullish(),
|
|
from_source: z.string(),
|
|
id: z.string(),
|
|
inputs: z.record(z.string(), zJsonValue),
|
|
message: zJsonValue.optional(),
|
|
message_files: z.array(zMessageFile).optional(),
|
|
message_metadata_dict: zJsonValue.optional(),
|
|
message_tokens: z.int().nullish(),
|
|
parent_message_id: z.string().nullish(),
|
|
provider_response_latency: z.number().nullish(),
|
|
query: z.string(),
|
|
re_sign_file_url_answer: z.string(),
|
|
status: z.string(),
|
|
workflow_run_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* MessageInfiniteScrollPaginationResponse
|
|
*/
|
|
export const zMessageInfiniteScrollPaginationResponse = z.object({
|
|
data: z.array(zMessageDetailResponse),
|
|
has_more: z.boolean(),
|
|
limit: z.int(),
|
|
})
|
|
|
|
/**
|
|
* FileType
|
|
*/
|
|
export const zFileType = z.enum(['audio', 'custom', 'document', 'image', 'video'])
|
|
|
|
/**
|
|
* FileTransferMethod
|
|
*/
|
|
export const zFileTransferMethod = z.enum([
|
|
'datasource_file',
|
|
'local_file',
|
|
'remote_url',
|
|
'tool_file',
|
|
])
|
|
|
|
/**
|
|
* FileInputConfig
|
|
*/
|
|
export const zFileInputConfig = z.object({
|
|
allowed_file_extensions: z.array(z.string()).optional(),
|
|
allowed_file_types: z.array(zFileType).optional(),
|
|
allowed_file_upload_methods: z.array(zFileTransferMethod).optional(),
|
|
output_variable_name: z.string(),
|
|
type: z.string().optional().default('file'),
|
|
})
|
|
|
|
/**
|
|
* FileListInputConfig
|
|
*/
|
|
export const zFileListInputConfig = z.object({
|
|
allowed_file_extensions: z.array(z.string()).optional(),
|
|
allowed_file_types: z.array(zFileType).optional(),
|
|
allowed_file_upload_methods: z.array(zFileTransferMethod).optional(),
|
|
number_limits: z.int().gte(0).optional().default(0),
|
|
output_variable_name: z.string(),
|
|
type: z.string().optional().default('file-list'),
|
|
})
|
|
|
|
/**
|
|
* ValueSourceType
|
|
*
|
|
* ValueSourceType records whether the value comes from a static setting
|
|
* in form definiton, or a variable while the workflow is running.
|
|
*/
|
|
export const zValueSourceType = z.enum(['constant', 'variable'])
|
|
|
|
/**
|
|
* StringSource
|
|
*
|
|
* Default configuration for form inputs.
|
|
*/
|
|
export const zStringSource = z.object({
|
|
selector: z.array(z.string()).optional(),
|
|
type: zValueSourceType,
|
|
value: z.string().optional().default(''),
|
|
})
|
|
|
|
/**
|
|
* ParagraphInputConfig
|
|
*
|
|
* Form input definition.
|
|
*/
|
|
export const zParagraphInputConfig = z.object({
|
|
default: zStringSource.optional(),
|
|
output_variable_name: z.string(),
|
|
type: z.string().optional().default('paragraph'),
|
|
})
|
|
|
|
/**
|
|
* StringListSource
|
|
*/
|
|
export const zStringListSource = z.object({
|
|
selector: z.array(z.string()).optional(),
|
|
type: zValueSourceType,
|
|
value: z.array(z.string()).optional(),
|
|
})
|
|
|
|
/**
|
|
* SelectInputConfig
|
|
*/
|
|
export const zSelectInputConfig = z.object({
|
|
option_source: zStringListSource,
|
|
output_variable_name: z.string(),
|
|
type: z.string().optional().default('select'),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentAccount
|
|
*/
|
|
export const zWorkflowCommentAccountWritable = z.object({
|
|
email: z.string(),
|
|
id: z.string(),
|
|
name: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentBasic
|
|
*/
|
|
export const zWorkflowCommentBasicWritable = z.object({
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string(),
|
|
created_by_account: zWorkflowCommentAccountWritable.optional(),
|
|
id: z.string(),
|
|
mention_count: z.int(),
|
|
participants: z.array(zWorkflowCommentAccountWritable),
|
|
position_x: z.number(),
|
|
position_y: z.number(),
|
|
reply_count: z.int(),
|
|
resolved: z.boolean(),
|
|
resolved_at: z.int().nullish(),
|
|
resolved_by: z.string().nullish(),
|
|
resolved_by_account: zWorkflowCommentAccountWritable.optional(),
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentBasicList
|
|
*/
|
|
export const zWorkflowCommentBasicListWritable = z.object({
|
|
data: z.array(zWorkflowCommentBasicWritable),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentMention
|
|
*/
|
|
export const zWorkflowCommentMentionWritable = z.object({
|
|
mentioned_user_account: zWorkflowCommentAccountWritable.optional(),
|
|
mentioned_user_id: z.string(),
|
|
reply_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentReply
|
|
*/
|
|
export const zWorkflowCommentReplyWritable = z.object({
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string(),
|
|
created_by_account: zWorkflowCommentAccountWritable.optional(),
|
|
id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* WorkflowCommentDetail
|
|
*/
|
|
export const zWorkflowCommentDetailWritable = z.object({
|
|
content: z.string(),
|
|
created_at: z.int().nullish(),
|
|
created_by: z.string(),
|
|
created_by_account: zWorkflowCommentAccountWritable.optional(),
|
|
id: z.string(),
|
|
mentions: z.array(zWorkflowCommentMentionWritable),
|
|
position_x: z.number(),
|
|
position_y: z.number(),
|
|
replies: z.array(zWorkflowCommentReplyWritable),
|
|
resolved: z.boolean(),
|
|
resolved_at: z.int().nullish(),
|
|
resolved_by: z.string().nullish(),
|
|
resolved_by_account: zWorkflowCommentAccountWritable.optional(),
|
|
updated_at: z.int().nullish(),
|
|
})
|
|
|
|
export const zGetAppsQuery = z.object({
|
|
is_created_by_me: z.boolean().nullish(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
mode: z
|
|
.enum(['advanced-chat', 'agent-chat', 'all', 'channel', 'chat', 'completion', 'workflow'])
|
|
.optional()
|
|
.default('all'),
|
|
name: z.string().nullish(),
|
|
page: z.int().gte(1).lte(99999).optional().default(1),
|
|
tag_ids: z.array(z.string()).nullish(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsResponse = zAppPagination
|
|
|
|
export const zPostAppsBody = zCreateAppPayload
|
|
|
|
/**
|
|
* App created successfully
|
|
*/
|
|
export const zPostAppsResponse = zAppDetail
|
|
|
|
export const zPostAppsImportsBody = zAppImportPayload
|
|
|
|
/**
|
|
* Import completed
|
|
*/
|
|
export const zPostAppsImportsResponse = zImport
|
|
|
|
export const zGetAppsImportsByAppIdCheckDependenciesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Dependencies checked
|
|
*/
|
|
export const zGetAppsImportsByAppIdCheckDependenciesResponse = zCheckDependenciesResult
|
|
|
|
export const zPostAppsImportsByImportIdConfirmPath = z.object({
|
|
import_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Import confirmed
|
|
*/
|
|
export const zPostAppsImportsByImportIdConfirmResponse = zImport
|
|
|
|
export const zPostAppsWorkflowsOnlineUsersBody = zWorkflowOnlineUsersPayload
|
|
|
|
/**
|
|
* Workflow online users retrieved successfully
|
|
*/
|
|
export const zPostAppsWorkflowsOnlineUsersResponse = zWorkflowOnlineUsersResponse
|
|
|
|
export const zDeleteAppsByAppIdPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* App deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdResponse = z.record(z.string(), z.never())
|
|
|
|
export const zGetAppsByAppIdPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdResponse = zAppDetailWithSite
|
|
|
|
export const zPutAppsByAppIdBody = zUpdateAppPayload
|
|
|
|
export const zPutAppsByAppIdPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* App updated successfully
|
|
*/
|
|
export const zPutAppsByAppIdResponse = zAppDetailWithSite
|
|
|
|
export const zGetAppsByAppIdAdvancedChatWorkflowRunsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdAdvancedChatWorkflowRunsQuery = z.object({
|
|
last_id: z.string().optional(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
status: z.enum(['failed', 'partial-succeeded', 'running', 'stopped', 'succeeded']).optional(),
|
|
triggered_from: z.enum(['app-run', 'debugging']).optional(),
|
|
})
|
|
|
|
/**
|
|
* Workflow runs retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAdvancedChatWorkflowRunsResponse
|
|
= zAdvancedChatWorkflowRunPaginationResponse
|
|
|
|
export const zGetAppsByAppIdAdvancedChatWorkflowRunsCountPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdAdvancedChatWorkflowRunsCountQuery = z.object({
|
|
status: z.enum(['failed', 'partial-succeeded', 'running', 'stopped', 'succeeded']).optional(),
|
|
time_range: z.string().optional(),
|
|
triggered_from: z.enum(['app-run', 'debugging']).optional(),
|
|
})
|
|
|
|
/**
|
|
* Workflow runs count retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAdvancedChatWorkflowRunsCountResponse = zWorkflowRunCountResponse
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody
|
|
= zHumanInputFormPreviewPayload
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath
|
|
= z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse
|
|
= z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunBody
|
|
= zHumanInputFormSubmitPayload
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunPath
|
|
= z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse
|
|
= z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunBody
|
|
= zIterationNodeRunPayload
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Iteration node run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftIterationNodesByNodeIdRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunBody
|
|
= zLoopNodeRunPayload
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Loop node run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftLoopNodesByNodeIdRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftRunBody = zAdvancedChatWorkflowRunPayload
|
|
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftRunPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdAdvancedChatWorkflowsDraftRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdAgentComposerPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdAgentComposerResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPutAppsByAppIdAgentComposerBody = zComposerSavePayload
|
|
|
|
export const zPutAppsByAppIdAgentComposerPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPutAppsByAppIdAgentComposerResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdAgentComposerCandidatesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdAgentComposerCandidatesResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdAgentComposerValidateBody = zComposerSavePayload
|
|
|
|
export const zPostAppsByAppIdAgentComposerValidatePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdAgentComposerValidateResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdAgentLogsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdAgentLogsQuery = z.object({
|
|
conversation_id: z.string(),
|
|
message_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Agent logs retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAgentLogsResponse = z.array(z.record(z.string(), z.unknown()))
|
|
|
|
export const zPostAppsByAppIdAnnotationReplyByActionBody = zAnnotationReplyPayload
|
|
|
|
export const zPostAppsByAppIdAnnotationReplyByActionPath = z.object({
|
|
action: z.string(),
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Action completed successfully
|
|
*/
|
|
export const zPostAppsByAppIdAnnotationReplyByActionResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdPath = z.object({
|
|
action: z.string(),
|
|
app_id: z.string(),
|
|
job_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Job status retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationReplyByActionStatusByJobIdResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdAnnotationSettingPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Annotation settings retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationSettingResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdBody
|
|
= zAnnotationSettingUpdatePayload
|
|
|
|
export const zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdPath = z.object({
|
|
annotation_setting_id: z.string(),
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Settings updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdAnnotationSettingsByAnnotationSettingIdResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zDeleteAppsByAppIdAnnotationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zDeleteAppsByAppIdAnnotationsResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdAnnotationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdAnnotationsQuery = z.object({
|
|
keyword: z.string().optional().default(''),
|
|
limit: z.int().gte(1).optional().default(20),
|
|
page: z.int().gte(1).optional().default(1),
|
|
})
|
|
|
|
/**
|
|
* Annotations retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationsResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdAnnotationsBody = zCreateAnnotationPayload
|
|
|
|
export const zPostAppsByAppIdAnnotationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Annotation created successfully
|
|
*/
|
|
export const zPostAppsByAppIdAnnotationsResponse = zAnnotation
|
|
|
|
export const zPostAppsByAppIdAnnotationsBatchImportPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Batch import started successfully
|
|
*/
|
|
export const zPostAppsByAppIdAnnotationsBatchImportResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdPath = z.object({
|
|
app_id: z.string(),
|
|
job_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Job status retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationsBatchImportStatusByJobIdResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdAnnotationsCountPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Annotation count retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationsCountResponse = zAnnotationCountResponse
|
|
|
|
export const zGetAppsByAppIdAnnotationsExportPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Annotations exported successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationsExportResponse = zAnnotationExportList
|
|
|
|
export const zDeleteAppsByAppIdAnnotationsByAnnotationIdPath = z.object({
|
|
annotation_id: z.string(),
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zDeleteAppsByAppIdAnnotationsByAnnotationIdResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdAnnotationsByAnnotationIdBody = zUpdateAnnotationPayload
|
|
|
|
export const zPostAppsByAppIdAnnotationsByAnnotationIdPath = z.object({
|
|
annotation_id: z.string(),
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zPostAppsByAppIdAnnotationsByAnnotationIdResponse = z.union([
|
|
zAnnotation,
|
|
z.record(z.string(), z.never()),
|
|
])
|
|
|
|
export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesPath = z.object({
|
|
annotation_id: z.string(),
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesQuery = z.object({
|
|
limit: z.int().optional().default(20),
|
|
page: z.int().optional().default(1),
|
|
})
|
|
|
|
/**
|
|
* Hit histories retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdAnnotationsByAnnotationIdHitHistoriesResponse
|
|
= zAnnotationHitHistoryList
|
|
|
|
export const zPostAppsByAppIdApiEnableBody = zAppApiStatusPayload
|
|
|
|
export const zPostAppsByAppIdApiEnablePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* API status updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdApiEnableResponse = zAppDetail
|
|
|
|
export const zPostAppsByAppIdAudioToTextPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Audio transcription successful
|
|
*/
|
|
export const zPostAppsByAppIdAudioToTextResponse = zAudioTranscriptResponse
|
|
|
|
export const zGetAppsByAppIdChatConversationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdChatConversationsQuery = z.object({
|
|
annotation_status: z.enum(['all', 'annotated', 'not_annotated']).optional().default('all'),
|
|
end: z.string().nullish(),
|
|
keyword: z.string().nullish(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
page: z.int().gte(1).lte(99999).optional().default(1),
|
|
sort_by: z
|
|
.enum(['-created_at', '-updated_at', 'created_at', 'updated_at'])
|
|
.optional()
|
|
.default('-updated_at'),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdChatConversationsResponse = zConversationWithSummaryPagination
|
|
|
|
export const zDeleteAppsByAppIdChatConversationsByConversationIdPath = z.object({
|
|
app_id: z.string(),
|
|
conversation_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Conversation deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdChatConversationsByConversationIdResponse = z.record(
|
|
z.string(),
|
|
z.never(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdChatConversationsByConversationIdPath = z.object({
|
|
app_id: z.string(),
|
|
conversation_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdChatConversationsByConversationIdResponse = zConversationDetail
|
|
|
|
export const zGetAppsByAppIdChatMessagesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdChatMessagesQuery = z.object({
|
|
conversation_id: z.string(),
|
|
first_id: z.string().nullish(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdChatMessagesResponse = zMessageInfiniteScrollPaginationResponse
|
|
|
|
export const zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsPath = z.object({
|
|
app_id: z.string(),
|
|
message_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Suggested questions retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdChatMessagesByMessageIdSuggestedQuestionsResponse
|
|
= zSuggestedQuestionsResponse
|
|
|
|
export const zPostAppsByAppIdChatMessagesByTaskIdStopPath = z.object({
|
|
app_id: z.string(),
|
|
task_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Task stopped successfully
|
|
*/
|
|
export const zPostAppsByAppIdChatMessagesByTaskIdStopResponse = zSimpleResultResponse
|
|
|
|
export const zGetAppsByAppIdCompletionConversationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdCompletionConversationsQuery = z.object({
|
|
annotation_status: z.enum(['all', 'annotated', 'not_annotated']).optional().default('all'),
|
|
end: z.string().nullish(),
|
|
keyword: z.string().nullish(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
page: z.int().gte(1).lte(99999).optional().default(1),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdCompletionConversationsResponse = zConversationPagination
|
|
|
|
export const zDeleteAppsByAppIdCompletionConversationsByConversationIdPath = z.object({
|
|
app_id: z.string(),
|
|
conversation_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Conversation deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdCompletionConversationsByConversationIdResponse = z.record(
|
|
z.string(),
|
|
z.never(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdCompletionConversationsByConversationIdPath = z.object({
|
|
app_id: z.string(),
|
|
conversation_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdCompletionConversationsByConversationIdResponse
|
|
= zConversationMessageDetail
|
|
|
|
export const zPostAppsByAppIdCompletionMessagesBody = zCompletionMessagePayload
|
|
|
|
export const zPostAppsByAppIdCompletionMessagesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Completion generated successfully
|
|
*/
|
|
export const zPostAppsByAppIdCompletionMessagesResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdCompletionMessagesByTaskIdStopPath = z.object({
|
|
app_id: z.string(),
|
|
task_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Task stopped successfully
|
|
*/
|
|
export const zPostAppsByAppIdCompletionMessagesByTaskIdStopResponse = zSimpleResultResponse
|
|
|
|
export const zGetAppsByAppIdConversationVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdConversationVariablesQuery = z.object({
|
|
conversation_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Conversation variables retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdConversationVariablesResponse = zPaginatedConversationVariableResponse
|
|
|
|
export const zPostAppsByAppIdConvertToWorkflowBody = zConvertToWorkflowPayload
|
|
|
|
export const zPostAppsByAppIdConvertToWorkflowPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Application converted to workflow successfully
|
|
*/
|
|
export const zPostAppsByAppIdConvertToWorkflowResponse = zNewAppResponse
|
|
|
|
export const zPostAppsByAppIdCopyBody = zCopyAppPayload
|
|
|
|
export const zPostAppsByAppIdCopyPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* App copied successfully
|
|
*/
|
|
export const zPostAppsByAppIdCopyResponse = zAppDetailWithSite
|
|
|
|
export const zGetAppsByAppIdExportPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdExportQuery = z.object({
|
|
include_secret: z.boolean().optional().default(false),
|
|
workflow_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* App exported successfully
|
|
*/
|
|
export const zGetAppsByAppIdExportResponse = zAppExportResponse
|
|
|
|
export const zPostAppsByAppIdFeedbacksBody = zMessageFeedbackPayload
|
|
|
|
export const zPostAppsByAppIdFeedbacksPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Feedback updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdFeedbacksResponse = zSimpleResultResponse
|
|
|
|
export const zGetAppsByAppIdFeedbacksExportPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdFeedbacksExportQuery = z.object({
|
|
end_date: z.string().nullish(),
|
|
format: z.enum(['csv', 'json']).optional().default('csv'),
|
|
from_source: z.enum(['admin', 'user']).nullish(),
|
|
has_comment: z.boolean().nullish(),
|
|
rating: z.enum(['dislike', 'like']).nullish(),
|
|
start_date: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Feedback data exported successfully
|
|
*/
|
|
export const zGetAppsByAppIdFeedbacksExportResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdIconBody = zAppIconPayload
|
|
|
|
export const zPostAppsByAppIdIconPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Icon updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdIconResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdMessagesByMessageIdPath = z.object({
|
|
app_id: z.string(),
|
|
message_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Message retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdMessagesByMessageIdResponse = zMessageDetailResponse
|
|
|
|
export const zPostAppsByAppIdModelConfigBody = zModelConfigRequest
|
|
|
|
export const zPostAppsByAppIdModelConfigPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Model configuration updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdModelConfigResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdNameBody = zAppNamePayload
|
|
|
|
export const zPostAppsByAppIdNamePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Name availability checked
|
|
*/
|
|
export const zPostAppsByAppIdNameResponse = zAppDetail
|
|
|
|
export const zPostAppsByAppIdPublishToCreatorsPlatformPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdPublishToCreatorsPlatformResponse = zRedirectUrlResponse
|
|
|
|
export const zGetAppsByAppIdServerPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MCP server configuration retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdServerResponse = zAppMcpServerResponse
|
|
|
|
export const zPostAppsByAppIdServerBody = zMcpServerCreatePayload
|
|
|
|
export const zPostAppsByAppIdServerPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MCP server configuration created successfully
|
|
*/
|
|
export const zPostAppsByAppIdServerResponse = zAppMcpServerResponse
|
|
|
|
export const zPutAppsByAppIdServerBody = zMcpServerUpdatePayload
|
|
|
|
export const zPutAppsByAppIdServerPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MCP server configuration updated successfully
|
|
*/
|
|
export const zPutAppsByAppIdServerResponse = zAppMcpServerResponse
|
|
|
|
export const zPostAppsByAppIdSiteBody = zAppSiteUpdatePayload
|
|
|
|
export const zPostAppsByAppIdSitePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Site configuration updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdSiteResponse = zAppSiteResponse
|
|
|
|
export const zPostAppsByAppIdSiteEnableBody = zAppSiteStatusPayload
|
|
|
|
export const zPostAppsByAppIdSiteEnablePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Site status updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdSiteEnableResponse = zAppDetail
|
|
|
|
export const zPostAppsByAppIdSiteAccessTokenResetPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Access token reset successfully
|
|
*/
|
|
export const zPostAppsByAppIdSiteAccessTokenResetResponse = zAppSiteResponse
|
|
|
|
export const zGetAppsByAppIdStatisticsAverageResponseTimePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsAverageResponseTimeQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Average response time statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsAverageResponseTimeResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsAverageSessionInteractionsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsAverageSessionInteractionsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Average session interaction statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsAverageSessionInteractionsResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsDailyConversationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsDailyConversationsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily conversation statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsDailyConversationsResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsDailyEndUsersPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsDailyEndUsersQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily terminal statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsDailyEndUsersResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsDailyMessagesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsDailyMessagesQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily message statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsDailyMessagesResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsTokenCostsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsTokenCostsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily token cost statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsTokenCostsResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsTokensPerSecondPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsTokensPerSecondQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Tokens per second statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsTokensPerSecondResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zGetAppsByAppIdStatisticsUserSatisfactionRatePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdStatisticsUserSatisfactionRateQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* User satisfaction rate statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdStatisticsUserSatisfactionRateResponse = z.array(
|
|
z.record(z.string(), z.unknown()),
|
|
)
|
|
|
|
export const zPostAppsByAppIdTextToAudioBody = zTextToSpeechPayload
|
|
|
|
export const zPostAppsByAppIdTextToAudioPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Text to speech conversion successful
|
|
*/
|
|
export const zPostAppsByAppIdTextToAudioResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdTextToAudioVoicesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdTextToAudioVoicesQuery = z.object({
|
|
language: z.string(),
|
|
})
|
|
|
|
/**
|
|
* TTS voices retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdTextToAudioVoicesResponse = z.array(z.record(z.string(), z.unknown()))
|
|
|
|
export const zGetAppsByAppIdTracePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Trace configuration retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdTraceResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdTraceBody = zAppTracePayload
|
|
|
|
export const zPostAppsByAppIdTracePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Trace configuration updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdTraceResponse = zSimpleResultResponse
|
|
|
|
export const zDeleteAppsByAppIdTraceConfigBody = zTraceProviderQuery
|
|
|
|
export const zDeleteAppsByAppIdTraceConfigPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Tracing configuration deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdTraceConfigResponse = z.record(z.string(), z.never())
|
|
|
|
export const zGetAppsByAppIdTraceConfigPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdTraceConfigQuery = z.object({
|
|
tracing_provider: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Tracing configuration data
|
|
*/
|
|
export const zGetAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPatchAppsByAppIdTraceConfigBody = zTraceConfigPayload
|
|
|
|
export const zPatchAppsByAppIdTraceConfigPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success response
|
|
*/
|
|
export const zPatchAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdTraceConfigBody = zTraceConfigPayload
|
|
|
|
export const zPostAppsByAppIdTraceConfigPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Created configuration data
|
|
*/
|
|
export const zPostAppsByAppIdTraceConfigResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdTriggerEnableBody = zParserEnable
|
|
|
|
export const zPostAppsByAppIdTriggerEnablePath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdTriggerEnableResponse = zWorkflowTriggerResponse
|
|
|
|
export const zGetAppsByAppIdTriggersPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdTriggersResponse = zWorkflowTriggerListResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowAppLogsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowAppLogsQuery = z.object({
|
|
created_at__after: z.iso.datetime().nullish(),
|
|
created_at__before: z.iso.datetime().nullish(),
|
|
created_by_account: z.string().nullish(),
|
|
created_by_end_user_session_id: z.string().nullish(),
|
|
detail: z.boolean().optional().default(false),
|
|
keyword: z.string().nullish(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
page: z.int().gte(1).lte(99999).optional().default(1),
|
|
status: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Workflow app logs retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowAppLogsResponse = zWorkflowAppLogPaginationResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowArchivedLogsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowArchivedLogsQuery = z.object({
|
|
created_at__after: z.iso.datetime().nullish(),
|
|
created_at__before: z.iso.datetime().nullish(),
|
|
created_by_account: z.string().nullish(),
|
|
created_by_end_user_session_id: z.string().nullish(),
|
|
detail: z.boolean().optional().default(false),
|
|
keyword: z.string().nullish(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
page: z.int().gte(1).lte(99999).optional().default(1),
|
|
status: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Workflow archived logs retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowArchivedLogsResponse = zWorkflowArchivedLogPaginationResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsQuery = z.object({
|
|
last_id: z.string().optional(),
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
status: z.enum(['failed', 'partial-succeeded', 'running', 'stopped', 'succeeded']).optional(),
|
|
triggered_from: z.enum(['app-run', 'debugging']).optional(),
|
|
})
|
|
|
|
/**
|
|
* Workflow runs retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowRunsResponse = zWorkflowRunPaginationResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsCountPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsCountQuery = z.object({
|
|
status: z.enum(['failed', 'partial-succeeded', 'running', 'stopped', 'succeeded']).optional(),
|
|
time_range: z.string().optional(),
|
|
triggered_from: z.enum(['app-run', 'debugging']).optional(),
|
|
})
|
|
|
|
/**
|
|
* Workflow runs count retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowRunsCountResponse = zWorkflowRunCountResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopPath = z.object({
|
|
app_id: z.string(),
|
|
task_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Task stopped successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowRunsTasksByTaskIdStopResponse = zSimpleResultResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsByRunIdPath = z.object({
|
|
app_id: z.string(),
|
|
run_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow run detail retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowRunsByRunIdResponse = zWorkflowRunDetailResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsByRunIdExportPath = z.object({
|
|
app_id: z.string(),
|
|
run_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Export URL generated
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowRunsByRunIdExportResponse = zWorkflowRunExportResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsPath = z.object({
|
|
app_id: z.string(),
|
|
run_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Node executions retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowRunsByRunIdNodeExecutionsResponse
|
|
= zWorkflowRunNodeExecutionListResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowCommentsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Comments retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowCommentsResponse = zWorkflowCommentBasicList
|
|
|
|
export const zPostAppsByAppIdWorkflowCommentsBody = zWorkflowCommentCreatePayload
|
|
|
|
export const zPostAppsByAppIdWorkflowCommentsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Comment created successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowCommentsResponse = zWorkflowCommentCreate
|
|
|
|
export const zGetAppsByAppIdWorkflowCommentsMentionUsersPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Mentionable users retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowCommentsMentionUsersResponse
|
|
= zWorkflowCommentMentionUsersPayload
|
|
|
|
export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Comment deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdResponse = z.record(z.string(), z.never())
|
|
|
|
export const zGetAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Comment retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowCommentsByCommentIdResponse = zWorkflowCommentDetail
|
|
|
|
export const zPutAppsByAppIdWorkflowCommentsByCommentIdBody = zWorkflowCommentUpdatePayload
|
|
|
|
export const zPutAppsByAppIdWorkflowCommentsByCommentIdPath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Comment updated successfully
|
|
*/
|
|
export const zPutAppsByAppIdWorkflowCommentsByCommentIdResponse = zWorkflowCommentUpdate
|
|
|
|
export const zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesBody = zWorkflowCommentReplyPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesPath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Reply created successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowCommentsByCommentIdRepliesResponse
|
|
= zWorkflowCommentReplyCreate
|
|
|
|
export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
reply_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Reply deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse = z.record(
|
|
z.string(),
|
|
z.never(),
|
|
)
|
|
|
|
export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdBody
|
|
= zWorkflowCommentReplyPayload
|
|
|
|
export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdPath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
reply_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Reply updated successfully
|
|
*/
|
|
export const zPutAppsByAppIdWorkflowCommentsByCommentIdRepliesByReplyIdResponse
|
|
= zWorkflowCommentReplyUpdate
|
|
|
|
export const zPostAppsByAppIdWorkflowCommentsByCommentIdResolvePath = z.object({
|
|
app_id: z.string(),
|
|
comment_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Comment resolved successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowCommentsByCommentIdResolveResponse = zWorkflowCommentResolve
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Average app interaction statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowStatisticsAverageAppInteractionsResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsDailyConversationsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsDailyConversationsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily runs statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowStatisticsDailyConversationsResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsDailyTerminalsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsDailyTerminalsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily terminals statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowStatisticsDailyTerminalsResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsTokenCostsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowStatisticsTokenCostsQuery = z.object({
|
|
end: z.string().nullish(),
|
|
start: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Daily token cost statistics retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowStatisticsTokenCostsResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdWorkflowsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowsQuery = z.object({
|
|
limit: z.int().gte(1).lte(100).optional().default(10),
|
|
named_only: z.boolean().optional().default(false),
|
|
page: z.int().gte(1).lte(99999).optional().default(1),
|
|
user_id: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Published workflows retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsResponse = zWorkflowPaginationResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Default block configurations retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypePath = z.object({
|
|
app_id: z.string(),
|
|
block_type: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeQuery = z.object({
|
|
q: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* Default block configuration retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDefaultWorkflowBlockConfigsByBlockTypeResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Draft workflow retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftResponse = zWorkflowResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftBody = zSyncDraftWorkflowPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Draft workflow synced successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftResponse = zSyncDraftWorkflowResponse
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftConversationVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Conversation variables retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftConversationVariablesResponse = zWorkflowDraftVariableList
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftConversationVariablesBody
|
|
= zConversationVariableUpdatePayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftConversationVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Conversation variables updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftConversationVariablesResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Environment variables retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesBody
|
|
= zEnvironmentVariableUpdatePayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Environment variables updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftEnvironmentVariablesResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftFeaturesBody = zWorkflowFeaturesPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftFeaturesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow features updated successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftFeaturesResponse = zSimpleResultResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestBody
|
|
= zHumanInputDeliveryTestPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdDeliveryTestResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewBody
|
|
= zHumanInputFormPreviewPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormPreviewResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunBody
|
|
= zHumanInputFormSubmitPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftHumanInputNodesByNodeIdFormRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunBody = zIterationNodeRunPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow iteration node run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftIterationNodesByNodeIdRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunBody = zLoopNodeRunPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow loop node run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftLoopNodesByNodeIdRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerBody = zComposerSavePayload
|
|
|
|
export const zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPutAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerCandidatesResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerImpactResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterBody
|
|
= zComposerSavePayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerSaveToRosterResponse
|
|
= z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateBody
|
|
= zComposerSavePayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidatePath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdAgentComposerValidateResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Node last run retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdLastRunResponse
|
|
= zWorkflowRunNodeExecutionResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunBody = zDraftWorkflowNodeRunPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Node run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdRunResponse
|
|
= zWorkflowRunNodeExecutionResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Trigger event received and node executed successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftNodesByNodeIdTriggerRunResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Node variables deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse = z.record(
|
|
z.string(),
|
|
z.never(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
node_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Node variables retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftNodesByNodeIdVariablesResponse
|
|
= zWorkflowDraftVariableList
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftRunBody = zDraftWorkflowRunPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftRunPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Draft workflow run started successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftRunResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftSystemVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* System variables retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftSystemVariablesResponse = zWorkflowDraftVariableList
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftTriggerRunBody = zDraftWorkflowTriggerRunRequest
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftTriggerRunPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Trigger event received and workflow executed successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftTriggerRunResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftTriggerRunAllBody = zDraftWorkflowTriggerRunAllPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsDraftTriggerRunAllPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow executed successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsDraftTriggerRunAllResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zDeleteAppsByAppIdWorkflowsDraftVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow variables deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdWorkflowsDraftVariablesResponse = z.record(z.string(), z.never())
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftVariablesPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftVariablesQuery = z.object({
|
|
limit: z.int().gte(1).lte(100).optional().default(20),
|
|
page: z.int().gte(1).lte(100000).optional().default(1),
|
|
})
|
|
|
|
/**
|
|
* Workflow variables retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftVariablesResponse = zWorkflowDraftVariableListWithoutValue
|
|
|
|
export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
|
|
app_id: z.string(),
|
|
variable_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Variable deleted successfully
|
|
*/
|
|
export const zDeleteAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = z.record(
|
|
z.string(),
|
|
z.never(),
|
|
)
|
|
|
|
export const zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
|
|
app_id: z.string(),
|
|
variable_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Variable retrieved successfully
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = zWorkflowDraftVariable
|
|
|
|
export const zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdBody
|
|
= zWorkflowDraftVariableUpdatePayload
|
|
|
|
export const zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdPath = z.object({
|
|
app_id: z.string(),
|
|
variable_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Variable updated successfully
|
|
*/
|
|
export const zPatchAppsByAppIdWorkflowsDraftVariablesByVariableIdResponse = zWorkflowDraftVariable
|
|
|
|
export const zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetPath = z.object({
|
|
app_id: z.string(),
|
|
variable_id: z.string(),
|
|
})
|
|
|
|
export const zPutAppsByAppIdWorkflowsDraftVariablesByVariableIdResetResponse = z.union([
|
|
zWorkflowDraftVariable,
|
|
z.record(z.string(), z.never()),
|
|
])
|
|
|
|
export const zGetAppsByAppIdWorkflowsPublishPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Published workflow retrieved successfully, or null if not found
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsPublishResponse = zWorkflowResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowsPublishBody = zPublishWorkflowPayload
|
|
|
|
export const zPostAppsByAppIdWorkflowsPublishPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsPublishResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zGetAppsByAppIdWorkflowsTriggersWebhookPath = z.object({
|
|
app_id: z.string(),
|
|
})
|
|
|
|
export const zGetAppsByAppIdWorkflowsTriggersWebhookQuery = z.object({
|
|
credential_id: z.string().nullish(),
|
|
datasource_type: z.string(),
|
|
inputs: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetAppsByAppIdWorkflowsTriggersWebhookResponse = zWebhookTriggerResponse
|
|
|
|
export const zDeleteAppsByAppIdWorkflowsByWorkflowIdPath = z.object({
|
|
app_id: z.string(),
|
|
workflow_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zDeleteAppsByAppIdWorkflowsByWorkflowIdResponse = z.record(z.string(), z.unknown())
|
|
|
|
export const zPatchAppsByAppIdWorkflowsByWorkflowIdBody = zWorkflowUpdatePayload
|
|
|
|
export const zPatchAppsByAppIdWorkflowsByWorkflowIdPath = z.object({
|
|
app_id: z.string(),
|
|
workflow_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow updated successfully
|
|
*/
|
|
export const zPatchAppsByAppIdWorkflowsByWorkflowIdResponse = zWorkflowResponse
|
|
|
|
export const zPostAppsByAppIdWorkflowsByWorkflowIdRestorePath = z.object({
|
|
app_id: z.string(),
|
|
workflow_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* Workflow restored successfully
|
|
*/
|
|
export const zPostAppsByAppIdWorkflowsByWorkflowIdRestoreResponse = z.record(
|
|
z.string(),
|
|
z.unknown(),
|
|
)
|
|
|
|
export const zGetAppsByResourceIdApiKeysPath = z.object({
|
|
resource_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* API keys retrieved successfully
|
|
*/
|
|
export const zGetAppsByResourceIdApiKeysResponse = zApiKeyList
|
|
|
|
export const zPostAppsByResourceIdApiKeysPath = z.object({
|
|
resource_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* API key created successfully
|
|
*/
|
|
export const zPostAppsByResourceIdApiKeysResponse = zApiKeyItem
|
|
|
|
export const zDeleteAppsByResourceIdApiKeysByApiKeyIdPath = z.object({
|
|
api_key_id: z.string(),
|
|
resource_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* API key deleted successfully
|
|
*/
|
|
export const zDeleteAppsByResourceIdApiKeysByApiKeyIdResponse = z.record(z.string(), z.never())
|
|
|
|
export const zGetAppsByServerIdServerRefreshPath = z.object({
|
|
server_id: z.string(),
|
|
})
|
|
|
|
/**
|
|
* MCP server refreshed successfully
|
|
*/
|
|
export const zGetAppsByServerIdServerRefreshResponse = zAppMcpServerResponse
|