/** * Framework-agnostic, schema-typed mutations. The React `useMutation`, Vue * `useMutation`, and Svelte mutation helper all delegate here so create/update * payloads are checked against the schema in exactly one place. * * @module trellis/schema */ import type { TrellisDb } from '../client/sdk.js'; import type { AnyType, InferType } from './define.js'; export interface EntityMutations { /** Create an entity of this type. Returns the new id. */ create(attrs: Omit): Promise; /** Patch an entity's attributes. */ update(id: string, attrs: Partial>): Promise; /** Delete an entity by id. */ remove(id: string): Promise; } /** Bind create/update/remove for a schema to a client. */ export declare function entityMutations(client: TrellisDb, schema: S): EntityMutations>; //# sourceMappingURL=mutations.d.ts.map