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

import { oc } from '@orpc/contract'
import * as z from 'zod'
import {
  zGetFilesByFileIdPreviewPath,
  zGetFilesByFileIdPreviewResponse,
  zGetFilesSupportTypeResponse,
  zGetFilesUploadResponse,
  zPostFilesUploadBody,
  zPostFilesUploadResponse,
} from './zod.gen'

export const get = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getFilesSupportType',
    path: '/files/support-type',
    tags: ['console'],
  })
  .output(zGetFilesSupportTypeResponse)

export const supportType = {
  get,
}

export const get2 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getFilesUpload',
    path: '/files/upload',
    tags: ['console'],
  })
  .output(zGetFilesUploadResponse)

export const post = oc
  .route({
    inputStructure: 'detailed',
    method: 'POST',
    operationId: 'postFilesUpload',
    path: '/files/upload',
    successStatus: 201,
    tags: ['console'],
  })
  .input(z.object({ body: zPostFilesUploadBody }))
  .output(zPostFilesUploadResponse)

export const upload = {
  get: get2,
  post,
}

export const get3 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getFilesByFileIdPreview',
    path: '/files/{file_id}/preview',
    tags: ['console'],
  })
  .input(z.object({ params: zGetFilesByFileIdPreviewPath }))
  .output(zGetFilesByFileIdPreviewResponse)

export const preview = {
  get: get3,
}

export const byFileId = {
  preview,
}

export const files = {
  supportType,
  upload,
  byFileId,
}

export const contract = {
  files,
}
