import { CollectionImpl } from './index.js'; import { StandardSchemaV1 } from '@standard-schema/spec'; import { CollectionConfig, InsertConfig, OperationConfig, Transaction as TransactionType, UtilsRecord, WritableDeep } from '../types.js'; import { CollectionLifecycleManager } from './lifecycle.js'; import { CollectionStateManager } from './state.js'; export declare class CollectionMutationsManager, TKey extends string | number = string | number, TUtils extends UtilsRecord = {}, TSchema extends StandardSchemaV1 = StandardSchemaV1, TInput extends object = TOutput> { private lifecycle; private state; private collection; private config; private id; constructor(config: CollectionConfig, id: string); setDeps(deps: { lifecycle: CollectionLifecycleManager; state: CollectionStateManager; collection: CollectionImpl; }): void; private ensureStandardSchema; validateData(data: unknown, type: `insert` | `update`, key?: TKey): TOutput | never; generateGlobalKey(key: any, item: any): string; private markPendingLocalOrigins; /** * Inserts one or more items into the collection */ insert: (data: TInput | Array, config?: InsertConfig) => TransactionType>; /** * Updates one or more items in the collection using a callback function */ update(keys: (TKey | unknown) | Array, configOrCallback: ((draft: WritableDeep) => void) | ((drafts: Array>) => void) | OperationConfig, maybeCallback?: ((draft: WritableDeep) => void) | ((drafts: Array>) => void)): TransactionType>; /** * Deletes one or more items from the collection */ delete: (keys: Array | TKey, config?: OperationConfig) => TransactionType; }