// This file is auto-generated by @hey-api/openapi-ts

import { oc } from '@orpc/contract'
import * as z from 'zod'

import {
  zGetWebsiteCrawlStatusByJobIdPath,
  zGetWebsiteCrawlStatusByJobIdQuery,
  zGetWebsiteCrawlStatusByJobIdResponse,
  zPostWebsiteCrawlBody,
  zPostWebsiteCrawlResponse,
} from './zod.gen'

/**
 * Get website crawl status
 *
 * 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 get = oc
  .route({
    deprecated: true,
    description:
      'Get website crawl status\n\nGenerated 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: 'getWebsiteCrawlStatusByJobId',
    path: '/website/crawl/status/{job_id}',
    tags: ['console'],
  })
  .input(
    z.object({
      params: zGetWebsiteCrawlStatusByJobIdPath,
      query: zGetWebsiteCrawlStatusByJobIdQuery,
    }),
  )
  .output(zGetWebsiteCrawlStatusByJobIdResponse)

export const byJobId = {
  get,
}

export const status = {
  byJobId,
}

/**
 * Crawl website content
 *
 * 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:
      'Crawl website content\n\nGenerated 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: 'postWebsiteCrawl',
    path: '/website/crawl',
    tags: ['console'],
  })
  .input(z.object({ body: zPostWebsiteCrawlBody }))
  .output(zPostWebsiteCrawlResponse)

export const crawl = {
  post,
  status,
}

export const website = {
  crawl,
}

export const contract = {
  website,
}
