// 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)

export const post = oc
  .route({
    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,
}

export const get2 = oc
  .route({
    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,
}
