import type { RouteModelInput } from "./route/client" import type { ModelID, ModelRef, ProviderID } from "./schema" export type ModelOptions = Omit export type ModelFactory = ( id: string | ModelID, options?: Options, ) => ModelRef type AnyModelFactory = (...args: never[]) => ModelRef export interface Definition { readonly id: ProviderID readonly model: Factory readonly apis?: Record } type DefinitionShape = { readonly id: ProviderID readonly model: (...args: never[]) => ModelRef readonly apis?: Record ModelRef> } type NoExtraFields = Input & Record, never> export const make = ( definition: NoExtraFields, ) => definition export * as Provider from "./provider"