Refactor content generation to simplify field schema generation

This commit is contained in:
2025-10-06 22:21:54 +02:00
parent ea672a9d91
commit e5e728705c
5 changed files with 93 additions and 134 deletions

View File

@@ -1,7 +1,8 @@
import type { default as Pocketbase, SendOptions } from "pocketbase";
import { fullListOptionsFrom, optionsFrom } from "./options.js";
import type { AnyZodRecord, RecordFullListOpts, RecordIdRef, RecordRef, RecordSlugRef } from "./types.ts";
import { AnyRecordsList, type RecordsList } from "./schemas.ts";
import { AnyRecordsList } from "./schemas.ts";
import type { RecordsList } from "./schemas.ts";
export function helpersFrom({ fetch, pocketbase }: HelpersFromOpts) {
async function getRecord<C extends string, S extends AnyZodRecord>(ref: RecordSlugRef<C>, opts: GetRecordOpts<S>): Promise<S["_output"]>;