import * as z from 'zod'; import { SatelliteEnvSchema } from '../schemas/satellite.env'; import { type Collections } from './schemas/collections'; import { type RunFunction } from './schemas/context'; import { type OnDeleteDocContext, type OnDeleteFilteredDocsContext, type OnDeleteManyDocsContext, type OnSetDocContext, type OnSetManyDocsContext } from './schemas/db/context'; import { type OnDeleteAssetContext, type OnDeleteFilteredAssetsContext, type OnDeleteManyAssetsContext, type OnUploadAssetContext } from './schemas/storage/context'; /** * A generic schema for defining hooks related to collections. * * @template T - The type of context passed to the hook when triggered. */ export type OnHook = Collections & { /** * A function that runs when the hook is triggered for the specified collections. * * @param {T} context - Contains information about the affected document(s). * @returns {Promise} Resolves when the operation completes. */ run: RunFunction; }; /** * @see OnSetDoc */ export declare const OnSetDocSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: 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>; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: 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>; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when a document is created or updated. */ export type OnSetDoc = OnHook; /** * @see OnSetManyDocs */ export declare const OnSetManyDocsSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray, 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>; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray, 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>; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when multiple documents are created or updated. */ export type OnSetManyDocs = OnHook; /** * @see OnDeleteDoc */ export declare const OnDeleteDocSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: z.ZodOptional, 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>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: z.ZodOptional, 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>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when a single document is deleted. */ export type OnDeleteDoc = OnHook; /** * @see OnDeleteManyDocs */ export declare const OnDeleteManyDocsSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray, 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>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray, 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>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when multiple documents are deleted. */ export type OnDeleteManyDocs = OnHook; /** * @see OnDeleteFilteredDocs */ export declare const OnDeleteFilteredDocsSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray, 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>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray, 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>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when a filtered set of documents is deleted based on query conditions. */ export type OnDeleteFilteredDocs = OnHook; /** * @see OnUploadAsset */ export declare const OnUploadAssetSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodObject<{ key: z.ZodObject<{ name: z.ZodString; full_path: z.ZodString; token: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodObject<{ key: z.ZodObject<{ name: z.ZodString; full_path: z.ZodString; token: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when a single asset is uploaded. */ export type OnUploadAsset = OnHook; /** * @see OnDeleteAsset */ export declare const OnDeleteAssetSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when a single asset is potentially deleted. */ export type OnDeleteAsset = OnHook; /** * @see OnDeleteManyAssets */ export declare const OnDeleteManyAssetsSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when multiple assets are potentially deleted. */ export type OnDeleteManyAssets = OnHook; /** * @see OnDeleteFilteredAssets */ export declare const OnDeleteFilteredAssetsSchema: z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>; /** * A hook that runs when a filtered set of assets is deleted based on query conditions. */ export type OnDeleteFilteredAssets = OnHook; /** * @see Hook */ export declare const HookSchema: z.ZodUnion>; run: z.ZodCustom, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: 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>; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: 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>; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>, z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray, 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>; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray, 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>; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>, z.ZodObject<{ caller: z.ZodCustom, Uint8Array>; data: z.ZodObject<{ collection: z.ZodString; key: z.ZodString; data: z.ZodOptional, 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>; }, z.core.$strict>, z.ZodObject<{ caller: z.ZodCustom, Uint8Array>; data: z.ZodArray, 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>>; }, z.core.$strict>, z.ZodObject<{ caller: z.ZodCustom, Uint8Array>; data: z.ZodArray, 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>>; }, z.core.$strict>, z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodObject<{ key: z.ZodObject<{ name: z.ZodString; full_path: z.ZodString; token: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodObject<{ key: z.ZodObject<{ name: z.ZodString; full_path: z.ZodString; token: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>, z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodOptional; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>, z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>, z.ZodObject<{ collections: z.ZodReadonly>; run: z.ZodCustom, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>, z.core.$InferInnerFunctionType, Uint8Array>; data: z.ZodArray; collection: z.ZodString; owner: z.ZodCustom, Uint8Array>; description: z.ZodOptional; }, z.core.$strict>; headers: z.ZodArray>; encodings: z.ZodArray, z.ZodObject<{ modified: z.ZodBigInt; content_chunks: z.ZodArray, Uint8Array>>; total_length: z.ZodBigInt; sha256: z.ZodCustom, Uint8Array>; }, z.core.$strip>], null>>; created_at: z.ZodBigInt; updated_at: z.ZodBigInt; version: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>], null>, z.ZodUnion<[z.ZodPromise, z.ZodVoid]>>>; }, z.core.$strict>]>; /** * All hooks definitions. */ export type Hook = OnSetDoc | OnSetManyDocs | OnDeleteDoc | OnDeleteManyDocs | OnDeleteFilteredDocs | OnUploadAsset | OnDeleteAsset | OnDeleteManyAssets | OnDeleteFilteredAssets; export declare const HookFnSchema: (hookSchema: T) => z.ZodFunction], null>, T>; export type HookFn = (hook: z.infer) => T; export declare const HookFnOrObjectSchema: (hookSchema: T) => z.ZodUnion], null>, T>, z.core.$InferInnerFunctionType], null>, T>>]>; export type HookFnOrObject = T | HookFn; export declare function defineHook(hook: T): T; export declare function defineHook(hook: HookFn): HookFn; export declare function defineHook(hook: HookFnOrObject): HookFnOrObject;