import { CreateManyParams, DeepPartial, DeleteManyParams, FiltersMap, OptimisticActions, ToastConfig, UpdateAllParams, UpdateManyParams } from '@wix/bex-core'; import { NestedTableNodeState } from './NestedTableNodeState'; import { NestedTableNodeStatePublicAPI } from './NestedTableNodeStatePublicAPI'; export interface NestedDeleteManyParams extends DeleteManyParams { } export interface NestedUpdateManyParams extends UpdateManyParams { /** * Indicates whether to propagate the update to child nodes. */ propagate?: boolean; /** * Partial data to patch the items with. */ patch?: DeepPartial; } export interface NestedTableNodeStateOptimisticActionsPublicAPI extends OptimisticActions { /** * Updates multiple items * @param items - The items to update. * @param params - Additional parameters for the update operation. * @param params.propagate - Indicates whether to propagate the update children nodes * @param params.patch - Partial data to patch the items with. */ updateMany(items: T[], params: NestedUpdateManyParams): void; /** * Updates one item * @param item - The items to update. * @param params - Additional parameters for the update operation. * @param params.propagate - Indicates whether to propagate the update children nodes * @param params.patch - Partial data to patch the items with. */ updateOne(item: T, params: NestedUpdateManyParams): void; /** * Deletes multiple items and their descendants * @param items - An array of items to delete. * @param params - Additional parameters for the delete operation. */ deleteMany(items: T[], params: NestedDeleteManyParams): void; /** * Deletes one item and its descendants * @param item - An array of items to delete. * @param params - Additional parameters for the delete operation. */ deleteOne(item: T, params: NestedDeleteManyParams): void; } interface BaseActionParams { submit: (...args: any) => any; successToast?: ToastConfig | string; errorToast?: (err: unknown, params: { retry: () => void; }) => ToastConfig | string; } export declare class NestedTableNodeStateOptimisticActions implements NestedTableNodeStateOptimisticActionsPublicAPI { readonly node: NestedTableNodeState; constructor(node: NestedTableNodeState); _getActionsParams(params: A): { primaryActionParams: A & { submit: (...args: any) => any; }; secondaryActionParams: A & { successToast: undefined; errorToast: undefined; submit: (...args: any) => any; }; }; _runAction(action: (optimisticActions: OptimisticActions, params: A) => void, params: A): void; _propagate(items: T[], action: (nodes: NestedTableNodeStatePublicAPI, subItems: T[]) => void): void; createOne(item: T, params: CreateManyParams): void; createMany(items: T[], params: CreateManyParams): void; updateAll(patchOrFn: (item: T) => Partial, params: UpdateAllParams): void; deleteMany(items: T[], params: NestedDeleteManyParams): void; deleteOne(item: T, params: NestedDeleteManyParams): void; deleteAll(params: UpdateAllParams): void; updateMany(items: T[], params: NestedUpdateManyParams): void; updateOne(item: T, params: NestedUpdateManyParams): void; } export {}; //# sourceMappingURL=NestedTableNodeStateOptimisticActions.d.ts.map