garage-erp/packages/api/src/clients/auto-generate.ts
2026-04-07 06:32:40 +03:00

15 lines
423 B
TypeScript

import type { ApiPath } from "../infra/types"
import { ApiClient } from "../infra/client"
export const AUTO_GENERATE_ROUTES = {
BY_TABLE: "/api/auto-generate/{table}",
} as const satisfies Record<string, ApiPath>
export class AutoGenerateClient extends ApiClient {
async generate(table: string) {
return this.get(AUTO_GENERATE_ROUTES.BY_TABLE, {
params: { table },
} as never)
}
}