import * as z from 'zod'; import { type DelDoc, type Doc, type SetDoc } from '../../../schemas/db'; /** * @see DocUpsert */ export declare const DocUpsertSchema: z.ZodObject<{ before: z.ZodOptional, Uint8Array>; data: z.ZodCustom, Uint8Array>; description: z.ZodOptional; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; after: z.ZodObject<{ owner: z.ZodCustom, Uint8Array>; data: z.ZodCustom, Uint8Array>; description: z.ZodOptional; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>; /** * Represents a document update operation. * * This is used in hooks where a document is either being created or updated. */ export interface DocUpsert { /** * The previous version of the document before the update. * Undefined if this is a new document. */ before?: Doc; /** * The new version of the document after the update. */ after: Doc; } /** * @see DocAssertSet */ export declare const DocAssertSetSchema: z.ZodObject<{ current: z.ZodOptional, Uint8Array>; data: z.ZodCustom, Uint8Array>; description: z.ZodOptional; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; proposed: z.ZodObject<{ data: z.ZodCustom, Uint8Array>; description: z.ZodOptional; version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>; /** * Represents a validation check before setting a document. * * The developer can compare the `current` and `proposed` versions and * throw an error if their validation fails. */ export interface DocAssertSet { /** * The current version of the document before the operation. * Undefined if this is a new document. */ current?: Doc; /** * The proposed version of the document. * This can be validated before allowing the operation. */ proposed: SetDoc; } /** * @see DocAssertDelete */ export declare const DocAssertDeleteSchema: z.ZodObject<{ current: z.ZodOptional, Uint8Array>; data: z.ZodCustom, Uint8Array>; description: z.ZodOptional; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; proposed: z.ZodObject<{ version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>; /** * Represents a validation check before deleting a document. * * The developer can compare the `current` and `proposed` versions and * throw an error if their validation fails. */ export interface DocAssertDelete { /** * The current version of the document before the operation. * Undefined if the document does not exist. */ current?: Doc; /** * The proposed version of the document. * This can be validated before allowing the operation. */ proposed: DelDoc; }