dify/packages/contracts/generated/api/console/notion/orpc.gen.ts
Stephen Zhou b04b4449db
chore(api): annotate simple contract responses (#36331)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-05-19 06:13:20 +00:00

101 lines
2.6 KiB
TypeScript

// This file is auto-generated by @hey-api/openapi-ts
import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
zGetNotionPagesByPageIdByPageTypePreviewPath,
zGetNotionPagesByPageIdByPageTypePreviewResponse,
zGetNotionPreImportPagesResponse,
zPostNotionPagesByPageIdByPageTypePreviewBody,
zPostNotionPagesByPageIdByPageTypePreviewPath,
zPostNotionPagesByPageIdByPageTypePreviewResponse,
} from './zod.gen'
export const get = oc
.route({
inputStructure: 'detailed',
method: 'GET',
operationId: 'getNotionPagesByPageIdByPageTypePreview',
path: '/notion/pages/{page_id}/{page_type}/preview',
tags: ['console'],
})
.input(z.object({ params: zGetNotionPagesByPageIdByPageTypePreviewPath }))
.output(zGetNotionPagesByPageIdByPageTypePreviewResponse)
/**
* Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
*
* @deprecated
*/
export const post = oc
.route({
deprecated: true,
description:
'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
inputStructure: 'detailed',
method: 'POST',
operationId: 'postNotionPagesByPageIdByPageTypePreview',
path: '/notion/pages/{page_id}/{page_type}/preview',
tags: ['console'],
})
.input(
z.object({
body: zPostNotionPagesByPageIdByPageTypePreviewBody,
params: zPostNotionPagesByPageIdByPageTypePreviewPath,
}),
)
.output(zPostNotionPagesByPageIdByPageTypePreviewResponse)
export const preview = {
get,
post,
}
export const byPageType = {
preview,
}
export const byPageId = {
byPageType,
}
export const pages = {
byPageId,
}
/**
* Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.
*
* @deprecated
*/
export const get2 = oc
.route({
deprecated: true,
description:
'Generated contract types may be inaccurate because backend OpenAPI annotations are incomplete. Do not migrate callers until the generated contract is accurate.',
inputStructure: 'detailed',
method: 'GET',
operationId: 'getNotionPreImportPages',
path: '/notion/pre-import/pages',
tags: ['console'],
})
.output(zGetNotionPreImportPagesResponse)
export const pages2 = {
get: get2,
}
export const preImport = {
pages: pages2,
}
export const notion = {
pages,
preImport,
}
export const contract = {
notion,
}