/** * Operations "resources" admin routes — the operated-resource registry plus its * pooling, requirement/allocation, slot-assignment, and closeout surfaces. The * router is mounted on the legacy `/v1/operations/*` surface (operator React * clients hit those paths) AND, for the published OpenAPI admin contract, on the * staff surface at `/v1/admin/operations/*` (see `operations/routes.ts`). * * Migrated to `@hono/zod-openapi` for the OpenAPI admin backfill (voyant#2114 — * the final operations sub-batch). Request schemas reuse the exported * `validation.ts` insert/update/list-query schemas the handlers already parse; * response row schemas are authored here from the Drizzle `$inferSelect` shapes * (§17 dates/timestamps → strings). The list services do plain * `db.select().from(...)` with no joins, so list rows equal the single-entity * rows (no `.extend({...})` needed). Each resource is its own small * `OpenAPIHono` sub-chain composed onto `resourcesRoutes` via `.route("/")` so * the `.openapi()` operations propagate up through the parent registries while * keeping type-inference cost bounded (one flat chain has O(n²) inference cost). * * agent-quality: file-size exception — intentional: a mechanically-repetitive * CRUD + batch bundle over seven resource surfaces (45 legs), each with a * `createRoute` def + co-located handler per the established admin route pattern * (mirrors availability's `routes-core.ts`). Splitting per resource would * fragment the single mounted instance without aiding review. See voyant#2114. */ import { OpenAPIHono } from "@hono/zod-openapi"; import type { PostgresJsDatabase } from "drizzle-orm/postgres-js"; type Env = { Variables: { db: PostgresJsDatabase; userId?: string; }; }; /** * Compose the per-resource sub-chains onto a single `OpenAPIHono` so the * `.openapi()` operations propagate up through the parent operations registries * (`OpenAPIHono.route` copies the sub-app's registered routes). */ export declare const resourcesRoutes: OpenAPIHono & import("hono/types").MergeSchemaPath<{ "/slot-assignments": { $get: { input: { query: { limit?: unknown; offset?: unknown; slotId?: string | undefined; poolId?: string | undefined; resourceId?: string | undefined; bookingId?: string | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; }; }; output: { data: { id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: string; assignedBy: string | null; releasedAt: string | null; notes: string | null; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/slot-assignments": { $post: { input: { json: { slotId: string; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { slotId: string; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { json: { slotId: string; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; }; }; output: { data: { id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: string; assignedBy: string | null; releasedAt: string | null; notes: string | null; }; }; outputFormat: "json"; status: 201; }; }; } & { "/slot-assignments/batch-update": { $post: { input: { json: { ids: string[]; patch: { slotId?: string | undefined; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; }; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; patch: { slotId?: string | undefined; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; }; }; }; output: { data: { id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: string; assignedBy: string | null; releasedAt: string | null; notes: string | null; }[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/slot-assignments/batch-delete": { $post: { input: { json: { ids: string[]; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; }; }; output: { deletedIds: string[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/slot-assignments/:id": { $get: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { data: { id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: string; assignedBy: string | null; releasedAt: string | null; notes: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/slot-assignments/:id": { $patch: { input: { param: { id: string; }; } & { json: { slotId?: string | undefined; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { slotId?: string | undefined; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { slotId?: string | undefined; poolId?: string | null | undefined; resourceId?: string | null | undefined; bookingId?: string | null | undefined; status?: "cancelled" | "completed" | "assigned" | "reserved" | "released" | undefined; assignedAt?: string | undefined; assignedBy?: string | null | undefined; releasedAt?: string | null | undefined; notes?: string | null | undefined; }; }; output: { data: { id: string; slotId: string; poolId: string | null; resourceId: string | null; bookingId: string | null; status: "cancelled" | "completed" | "assigned" | "reserved" | "released"; assignedAt: string; assignedBy: string | null; releasedAt: string | null; notes: string | null; }; }; outputFormat: "json"; status: 200; }; }; } & { "/slot-assignments/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; }; }; }, "/"> & import("hono/types").MergeSchemaPath<{ "/allocations": { $get: { input: { query: { limit?: unknown; offset?: unknown; poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | undefined; startTimeId?: string | undefined; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/allocations": { $post: { input: { json: { poolId: string; productId: string; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { poolId: string; productId: string; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { json: { poolId: string; productId: string; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 201; }; }; } & { "/allocations/batch-update": { $post: { input: { json: { ids: string[]; patch: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; patch: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/allocations/batch-delete": { $post: { input: { json: { ids: string[]; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; }; }; output: { deletedIds: string[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/allocations/:id": { $get: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/allocations/:id": { $patch: { input: { param: { id: string; }; } & { json: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/allocations/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; }; }; }, "/"> & import("hono/types").MergeSchemaPath<{ "/requirements": { $get: { input: { query: { limit?: unknown; offset?: unknown; poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | undefined; startTimeId?: string | undefined; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/requirements": { $post: { input: { json: { poolId: string; productId: string; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { poolId: string; productId: string; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { json: { poolId: string; productId: string; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 201; }; }; } & { "/requirements/batch-update": { $post: { input: { json: { ids: string[]; patch: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; patch: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/requirements/batch-delete": { $post: { input: { json: { ids: string[]; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; }; }; output: { deletedIds: string[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/requirements/:id": { $get: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/requirements/:id": { $patch: { input: { param: { id: string; }; } & { json: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { poolId?: string | undefined; productId?: string | undefined; availabilityRuleId?: string | null | undefined; startTimeId?: string | null | undefined; quantityRequired?: number | undefined; allocationMode?: "shared" | "exclusive" | undefined; priority?: number | undefined; }; }; output: { data: { id: string; poolId: string; productId: string; availabilityRuleId: string | null; startTimeId: string | null; quantityRequired: number; allocationMode: "shared" | "exclusive"; priority: number; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/requirements/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; }; }; }, "/"> & import("hono/types").MergeSchemaPath<{ "/pool-members": { $get: { input: { query: { limit?: unknown; offset?: unknown; poolId?: string | undefined; resourceId?: string | undefined; }; }; output: { data: { id: string; poolId: string; resourceId: string; createdAt: string; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/pool-members": { $post: { input: { json: { poolId: string; resourceId: string; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { poolId: string; resourceId: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { json: { poolId: string; resourceId: string; }; }; output: { data: { id: string; poolId: string; resourceId: string; createdAt: string; }; }; outputFormat: "json"; status: 201; } | { input: { json: { poolId: string; resourceId: string; }; }; output: { error: string; }; outputFormat: "json"; status: 409; }; }; } & { "/pool-members/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; }; }; }, "/"> & import("hono/types").MergeSchemaPath<{ "/pools": { $get: { input: { query: { limit?: unknown; offset?: unknown; productId?: string | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; active?: "0" | "1" | "true" | "false" | undefined; }; }; output: { data: { id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/pools": { $post: { input: { json: { kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; productId?: string | null | undefined; sharedCapacity?: number | null | undefined; notes?: string | null | undefined; active?: boolean | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; productId?: string | null | undefined; sharedCapacity?: number | null | undefined; notes?: string | null | undefined; active?: boolean | undefined; }; }; output: { data: { id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 201; }; }; } & { "/pools/batch-update": { $post: { input: { json: { ids: string[]; patch: { productId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; sharedCapacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; patch: { productId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; sharedCapacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; }; output: { data: { id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/pools/batch-delete": { $post: { input: { json: { ids: string[]; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; }; }; output: { deletedIds: string[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/pools/:id": { $get: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { data: { id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/pools/:id": { $patch: { input: { param: { id: string; }; } & { json: { productId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; sharedCapacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { productId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; sharedCapacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { productId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; sharedCapacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; output: { data: { id: string; productId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; sharedCapacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/pools/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; }; }; }, "/"> & import("hono/types").MergeSchemaPath<{ "/resources": { $get: { input: { query: { limit?: unknown; offset?: unknown; supplierId?: string | undefined; facilityId?: string | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; active?: "0" | "1" | "true" | "false" | undefined; }; }; output: { data: { id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }[]; total: number; limit: number; offset: number; }; outputFormat: "json"; status: 200; }; }; } & { "/resources": { $post: { input: { json: { kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; supplierId?: string | null | undefined; facilityId?: string | null | undefined; code?: string | null | undefined; capacity?: number | null | undefined; notes?: string | null | undefined; active?: boolean | undefined; }; }; output: { data: { id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 201; } | { input: { json: { kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; supplierId?: string | null | undefined; facilityId?: string | null | undefined; code?: string | null | undefined; capacity?: number | null | undefined; notes?: string | null | undefined; active?: boolean | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; }; }; } & { "/resources/batch-update": { $post: { input: { json: { ids: string[]; patch: { supplierId?: string | null | undefined; facilityId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; code?: string | null | undefined; capacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; patch: { supplierId?: string | null | undefined; facilityId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; code?: string | null | undefined; capacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; }; output: { data: { id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/resources/batch-delete": { $post: { input: { json: { ids: string[]; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { json: { ids: string[]; }; }; output: { deletedIds: string[]; total: number; succeeded: number; failed: { id: string; error: string; }[]; }; outputFormat: "json"; status: 200; }; }; } & { "/resources/:id": { $get: { input: { param: { id: string; }; }; output: { data: { id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; } | { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; }; }; } & { "/resources/:id": { $patch: { input: { param: { id: string; }; } & { json: { supplierId?: string | null | undefined; facilityId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; code?: string | null | undefined; capacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 400; } | { input: { param: { id: string; }; } & { json: { supplierId?: string | null | undefined; facilityId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; code?: string | null | undefined; capacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; } & { json: { supplierId?: string | null | undefined; facilityId?: string | null | undefined; kind?: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment" | undefined; name?: string | undefined; code?: string | null | undefined; capacity?: number | null | undefined; active?: boolean | undefined; notes?: string | null | undefined; }; }; output: { data: { id: string; supplierId: string | null; facilityId: string | null; kind: "room" | "vehicle" | "other" | "boat" | "guide" | "equipment"; name: string; code: string | null; capacity: number | null; active: boolean; notes: string | null; createdAt: string; updatedAt: string; }; }; outputFormat: "json"; status: 200; }; }; } & { "/resources/:id": { $delete: { input: { param: { id: string; }; }; output: { error: string; }; outputFormat: "json"; status: 404; } | { input: { param: { id: string; }; }; output: { success: true; }; outputFormat: "json"; status: 200; }; }; }, "/">, "/">; export type ResourcesRoutes = typeof resourcesRoutes; export {};