mirror of
https://github.com/langgenius/dify.git
synced 2026-11-13 14:51:39 +08:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
110 lines
2.5 KiB
TypeScript
Generated
110 lines
2.5 KiB
TypeScript
Generated
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* ErrorResponse
|
|
*
|
|
* Documented non-2xx body emitted by ``register_external_error_handlers``.
|
|
*
|
|
* ``params`` and ``details`` appear only on the errors that set them. The schema
|
|
* stays open because ``HTTPException.data`` may carry extra keys.
|
|
*/
|
|
export const zErrorResponse = z.object({
|
|
code: z.string(),
|
|
details: z.record(z.string(), z.unknown()).optional(),
|
|
message: z.string(),
|
|
params: z.string().optional(),
|
|
status: z.int(),
|
|
})
|
|
|
|
/**
|
|
* SimpleResultResponse
|
|
*/
|
|
export const zSimpleResultResponse = z.object({
|
|
result: z.string(),
|
|
})
|
|
|
|
/**
|
|
* InvalidActionError
|
|
*
|
|
* Invalid action.
|
|
*/
|
|
export const zInvalidActionError = zErrorResponse.and(
|
|
z.object({
|
|
code: z.literal('invalid_action'),
|
|
status: z.literal(400),
|
|
}),
|
|
)
|
|
|
|
/**
|
|
* DataSourceIntegrateIconResponse
|
|
*/
|
|
export const zDataSourceIntegrateIconResponse = z.object({
|
|
emoji: z.string().nullish(),
|
|
type: z.string().nullish(),
|
|
url: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* NotionPageType
|
|
*/
|
|
export const zNotionPageType = z.enum(['database', 'page'])
|
|
|
|
/**
|
|
* DataSourceIntegratePageResponse
|
|
*/
|
|
export const zDataSourceIntegratePageResponse = z.object({
|
|
page_icon: zDataSourceIntegrateIconResponse.nullable(),
|
|
page_id: z.string(),
|
|
page_name: z.string(),
|
|
parent_id: z.string(),
|
|
type: zNotionPageType,
|
|
})
|
|
|
|
/**
|
|
* DataSourceIntegrateWorkspaceResponse
|
|
*/
|
|
export const zDataSourceIntegrateWorkspaceResponse = z.object({
|
|
pages: z.array(zDataSourceIntegratePageResponse),
|
|
total: z.int(),
|
|
workspace_icon: z.string().nullable(),
|
|
workspace_id: z.string().nullable(),
|
|
workspace_name: z.string().nullable(),
|
|
})
|
|
|
|
/**
|
|
* DataSourceIntegrateResponse
|
|
*/
|
|
export const zDataSourceIntegrateResponse = z.object({
|
|
created_at: z.int().nullable(),
|
|
disabled: z.boolean().nullable(),
|
|
id: z.string().nullable(),
|
|
is_bound: z.boolean(),
|
|
link: z.string(),
|
|
provider: z.string(),
|
|
source_info: zDataSourceIntegrateWorkspaceResponse.nullable(),
|
|
})
|
|
|
|
/**
|
|
* DataSourceIntegrateListResponse
|
|
*/
|
|
export const zDataSourceIntegrateListResponse = z.object({
|
|
data: z.array(zDataSourceIntegrateResponse),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zGetDataSourceIntegratesResponse = zDataSourceIntegrateListResponse
|
|
|
|
export const zPatchDataSourceIntegratesByBindingIdByActionPath = z.object({
|
|
action: z.string(),
|
|
binding_id: z.uuid(),
|
|
})
|
|
|
|
/**
|
|
* Success
|
|
*/
|
|
export const zPatchDataSourceIntegratesByBindingIdByActionResponse = zSimpleResultResponse
|