// This file is auto-generated by @hey-api/openapi-ts import { oc } from '@orpc/contract' import * as z from 'zod' import { zGetSetupResponse, zPostSetupBody, zPostSetupResponse } from './zod.gen' /** * Get system setup status. * * NOTE: This endpoint is unauthenticated by design. * * During first-time bootstrap there is no admin account yet, so frontend initialization must be * able to query setup progress before any login flow exists. * * Only bootstrap-safe status information should be returned by this endpoint. * */ export const get = oc .route({ inputStructure: 'detailed', method: 'GET', operationId: 'getSetup', path: '/setup', summary: 'Get system setup status.\n\n NOTE: This endpoint is unauthenticated by design.\n\n During first-time bootstrap there is no admin account yet, so frontend initialization must be\n able to query setup progress before any login flow exists.\n\n Only bootstrap-safe status information should be returned by this endpoint.\n ', tags: ['console'], }) .output(zGetSetupResponse) /** * Initialize system setup with admin account. * * NOTE: This endpoint is unauthenticated by design for first-time bootstrap. * Access is restricted by deployment mode (`SELF_HOSTED`), one-time setup guards, * and init-password validation rather than user session authentication. * */ export const post = oc .route({ inputStructure: 'detailed', method: 'POST', operationId: 'postSetup', path: '/setup', successStatus: 201, summary: 'Initialize system setup with admin account.\n\n NOTE: This endpoint is unauthenticated by design for first-time bootstrap.\n Access is restricted by deployment mode (`SELF_HOSTED`), one-time setup guards,\n and init-password validation rather than user session authentication.\n ', tags: ['console'], }) .input(z.object({ body: zPostSetupBody })) .output(zPostSetupResponse) export const setup = { get, post, } export const contract = { setup, }