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

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

import {
  zGetExploreAppsByAppIdPath,
  zGetExploreAppsByAppIdResponse,
  zGetExploreAppsQuery,
  zGetExploreAppsResponse,
  zGetExploreBannersResponse,
} from './zod.gen'

/**
 * 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:
      '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: 'getExploreAppsByAppId',
    path: '/explore/apps/{app_id}',
    tags: ['console'],
  })
  .input(z.object({ params: zGetExploreAppsByAppIdPath }))
  .output(zGetExploreAppsByAppIdResponse)

export const byAppId = {
  get,
}

export const get2 = oc
  .route({
    inputStructure: 'detailed',
    method: 'GET',
    operationId: 'getExploreApps',
    path: '/explore/apps',
    tags: ['console'],
  })
  .input(z.object({ query: zGetExploreAppsQuery.optional() }))
  .output(zGetExploreAppsResponse)

export const apps = {
  get: get2,
  byAppId,
}

/**
 * Get banner list
 *
 * 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 get3 = 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: 'getExploreBanners',
    path: '/explore/banners',
    summary: 'Get banner list',
    tags: ['default'],
  })
  .output(zGetExploreBannersResponse)

export const banners = {
  get: get3,
}

export const explore = {
  apps,
  banners,
}

export const contract = {
  explore,
}
