Skip to content

armgit / dify

Public Imported from GitHub
0

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

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

import { oc } from '@orpc/contract'
import * as z from 'zod'
import { zDatasetAccessDeniedError } from './zod.gen.ts'
import {
  zGetNotionPagesByPageIdByPageTypePreviewPath,
  zGetNotionPagesByPageIdByPageTypePreviewQuery,
  zGetNotionPagesByPageIdByPageTypePreviewResponse,
  zGetNotionPreImportPagesQuery,
  zGetNotionPreImportPagesResponse,
} from './zod.gen.ts'

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,
      query: zGetNotionPagesByPageIdByPageTypePreviewQuery,
    }),
  )
  .output(zGetNotionPagesByPageIdByPageTypePreviewResponse)

export const preview = {
  get,
}

export const byPageType = {
  preview,
}

export const byPageId = {
  byPageType,
}

export const pages = {
  byPageId,
}

export const get2 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getNotionPreImportPages',
    path: '/notion/pre-import/pages',
    tags: ['console'],
  })
  .input(z.object({ query: zGetNotionPreImportPagesQuery }))
  .output(zGetNotionPreImportPagesResponse)
  .errors({ dataset_access_denied: { status: 403, data: zDatasetAccessDeniedError } })

export const pages2 = {
  get: get2,
}

export const preImport = {
  pages: pages2,
}

export const notion = {
  pages,
  preImport,
}

export const contract = {
  notion,
}