/* eslint-disable */ /* generated by scripts/generate-api.mjs — do not edit */ import { request } from "./client"; export type CreateItemRequest = { description?: string | null; name: string; }; export type ErrorBody = { error: ErrorDetail; }; export type ErrorDetail = { code: string; message: string; status: number; trace_id?: string | null; }; export type HealthResponse = { service: string; status: string; }; export type ItemPage = { items: Array; page: number; per_page: number; total: number; }; export type ItemResponse = { created_at: string; description?: string | null; id: string; name: string; updated_at: string; }; export type ReadyResponse = { database: string; status: string; }; export type UpdateItemRequest = { description?: string | null; name?: string | null; }; export function listItems(args: { query?: { page?: number; per_page?: number; } }): Promise { return request({ method: "GET", path: "/api/v1/items", query: args.query, expectedStatus: 200, }); } export function createItem(args: { body: CreateItemRequest }): Promise { return request({ method: "POST", path: "/api/v1/items", body: args.body, expectedStatus: 201, }); } export function getItem(args: { path: { id: string; } }): Promise { return request({ method: "GET", path: "/api/v1/items/" + encodeURIComponent(String(args.path.id)), expectedStatus: 200, }); } export function deleteItem(args: { path: { id: string; } }): Promise { return request({ method: "DELETE", path: "/api/v1/items/" + encodeURIComponent(String(args.path.id)), expectedStatus: 204, }); } export function updateItem(args: { path: { id: string; }; body: UpdateItemRequest }): Promise { return request({ method: "PATCH", path: "/api/v1/items/" + encodeURIComponent(String(args.path.id)), body: args.body, expectedStatus: 200, }); } export function live(): Promise { return request({ method: "GET", path: "/health/live", expectedStatus: 200, }); } export function ready(): Promise { return request({ method: "GET", path: "/health/ready", expectedStatus: 200, }); }