export declare const FeedBackOperation: { readonly UPDATE: "update"; readonly DELETE: "delete"; readonly MOVE: "move"; readonly COPY: "copy"; readonly EXPORT: "export"; readonly RECYCLE: "recycle"; readonly RESTORE: "restore"; readonly VALIDATE: "validate"; }; export type FeedBackOperationType = `${(typeof FeedBackOperation)[keyof typeof FeedBackOperation]}`; export type ItemOpFeedbackResult = { [FeedBackOperation.UPDATE]: { [itemId: string]: T; }; [FeedBackOperation.DELETE]: { [itemId: string]: T; }; [FeedBackOperation.MOVE]: { items: T[]; moved: T[]; }; [FeedBackOperation.COPY]: { items: T[]; copies: T[]; }; [FeedBackOperation.EXPORT]: { [itemId: string]: T; }; [FeedBackOperation.RECYCLE]: T[]; [FeedBackOperation.RESTORE]: { [itemId: string]: T; }; [FeedBackOperation.VALIDATE]: { [itemId: string]: T; }; }; /** * Events from asynchronous background operations on given items */ export interface ItemOpFeedbackEvent { kind: 'feedback'; op: OP; resource: T['id'][]; result?: ItemOpFeedbackResult[OP]; errors: Error[]; } export declare const isOperationEvent: (event: ItemOpFeedbackEvent, type: OP) => event is ItemOpFeedbackEvent;