15 lines
423 B
TypeScript
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)
|
|
}
|
|
}
|