// 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,
}
