import { Action } from '@ngrx/store'; import { WithoutMetaButAllowId, WithoutMeta, FireStoreDocument, DxDocument } from '@digitaix/types'; export declare enum DocumentActionTypes { Load = "[Document] Load", Subscribe = "[Documnet] Subscribe", Create = "[Document] Create", CreateMany = "[Document] Create Many", Delete = "[Document] Delete", Update = "[Document] Update", Get = "[Document] Get", GetMany = "[Document] Get Many", CreateOrUpdate = "[Document] Create Or Update", Clear = "[Document] Clear", ClearAll = "[Document] Clear All", Archive = "[Document] Archive", Restore = "[Document] Restore", RequestDelete = "[Document] Request Delete", OpenDeleteDialog = "[Document] Open Delete Dialog", Created = "[Document] Created", Deleted = "[Document] Deleted", Updated = "[Document] Updated", AddMany = "[Document] Add Many", Added = "[Document] Added", Removed = "[Document] Removed", Modified = "[Document] Modified", Export = "[Document] Export", Import = "[Document] Import", Draft = "[Document] Draft", Template = "[Document] Template" } export declare class CreateFailed implements Action { collectionPath: string; document: WithoutMeta; error: any; tracer?: string; stack?: string[]; static TYPE: string; readonly type: string; constructor(collectionPath: string, document: WithoutMeta, error: any, tracer?: string, stack?: string[]); } export declare class UpdateFailed implements Action { collectionPath: string; documentId: string; document: Partial>; error: any; tracer?: string; stack?: string[]; static TYPE: string; readonly type: string; constructor(collectionPath: string, documentId: string, document: Partial>, error: any, tracer?: string, stack?: string[]); } export declare class DeleteFailed implements Action { collectionPath: string; documentId: string; error: any; tracer?: string; stack?: string[]; static TYPE: string; readonly type: string; constructor(collectionPath: string, documentId: string, error: any, tracer?: string, stack?: string[]); } export declare class OpenDeleteDialog implements Action { message: string; collectionPath: string; documentId: string; tracer: string; stack: string[]; readonly type = DocumentActionTypes.OpenDeleteDialog; constructor(message: string, collectionPath: string, documentId: string, tracer: string, stack: string[]); } export declare class ExportDocuments implements Action { payload?: { include?: string[]; exclude?: string[]; }; readonly type = DocumentActionTypes.Export; constructor(payload?: { include?: string[]; exclude?: string[]; }); } export declare class ImportDocuments implements Action { readonly type = DocumentActionTypes.Import; constructor(); } export declare class Clear implements Action { collectionPath: string; readonly type = DocumentActionTypes.Clear; constructor(collectionPath: string); } export declare class ClearAll implements Action { withOut?: string[]; navigate: boolean; readonly type = DocumentActionTypes.ClearAll; constructor(withOut?: string[], navigate?: boolean); } export declare class ArchiveDocument implements Action { collectionPath: string; documentId: any; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Archive; constructor(collectionPath: string, documentId: any, tracer?: string, stack?: string[]); } export declare class SetDocumentAsDraft implements Action { collectionPath: string; documentId: any; draft?: boolean; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Draft; constructor(collectionPath: string, documentId: any, draft?: boolean, tracer?: string, stack?: string[]); } export declare class SetDocumentAsTemplate implements Action { collectionPath: string; documentId: any; template?: boolean; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Template; constructor(collectionPath: string, documentId: any, template?: boolean, tracer?: string, stack?: string[]); } export declare class RestoreDocument implements Action { collectionPath: string; documentId: any; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Restore; constructor(collectionPath: string, documentId: any, tracer?: string, stack?: string[]); } export declare class DocumentCreated implements Action { document: D | null; collectionPath: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Created; constructor(document: D | null, collectionPath: string, tracer?: string, stack?: string[]); } export declare class DocumentDeleted implements Action { id: string; collectionPath: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Deleted; /** * @deprecated use id property instead */ documentId: string; constructor(id: string, collectionPath: string, tracer?: string, stack?: string[]); } export declare class DocumentUpdated implements Action { document: D | null; collectionPath: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Updated; constructor(document: D | null, collectionPath: string, tracer?: string, stack?: string[]); } export declare class LoadDocuments implements Action { collectionPath: string; query?: Query; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Load; constructor(collectionPath: string, query?: Query, tracer?: string, stack?: string[]); } export declare class SubscribeDocuments implements Action { collectionPath: string; query?: Query; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Subscribe; constructor(collectionPath: string, query?: Query, tracer?: string, stack?: string[]); } export declare class CreateDocument implements Action { collectionPath: string; document: WithoutMeta; id?: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Create; constructor(collectionPath: string, document: WithoutMeta, id?: string, tracer?: string, stack?: string[]); } export declare class CreateOrUpdateDocument implements Action { collectionPath: string; document: WithoutMetaButAllowId; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.CreateOrUpdate; constructor(collectionPath: string, document: WithoutMetaButAllowId, tracer?: string, stack?: string[]); } export declare class DeleteDocument implements Action { collectionPath: string; id: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Delete; constructor(collectionPath: string, id: string, tracer?: string, stack?: string[]); } export declare class RequestDeleteDocument implements Action { collectionPath: string; id: string; tracer?: string; stack?: string[]; message: string; readonly type = DocumentActionTypes.RequestDelete; constructor(collectionPath: string, id: string, tracer?: string, stack?: string[], message?: string); } export declare class UpdateDocument implements Action { collectionPath: string; id: string; document: Partial>; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Update; constructor(collectionPath: string, id: string, document: Partial>, tracer?: string, stack?: string[]); } export declare class CreateManyDocuments implements Action { collectionPath: string; documents: Array>; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.CreateMany; constructor(collectionPath: string, documents: Array>, tracer?: string, stack?: string[]); } export declare class GetDocument implements Action { collectionPath: string; id: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Get; constructor(collectionPath: string, id: string, tracer?: string, stack?: string[]); } export declare class GetManyDocument implements Action { collectionPath: string; ids: string[]; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.GetMany; constructor(collectionPath: string, ids: string[], tracer?: string, stack?: string[]); } export interface DocumentStateChangeAction extends Action { collectionPath: string; } export declare class AddManyDocuments implements DocumentStateChangeAction { collectionPath: string; documents: T[]; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.AddMany; constructor(collectionPath: string, documents: T[], tracer?: string, stack?: string[]); } export declare class DocumentAdded implements DocumentStateChangeAction { collectionPath: string; document: T; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Added; constructor(collectionPath: string, document: T, tracer?: string, stack?: string[]); } export declare class DocumentRemoved implements DocumentStateChangeAction { collectionPath: string; id: string; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Removed; constructor(collectionPath: string, id: string, tracer?: string, stack?: string[]); } export declare class DocumentModified implements DocumentStateChangeAction { collectionPath: string; document: T; tracer?: string; stack?: string[]; readonly type = DocumentActionTypes.Modified; constructor(collectionPath: string, document: T, tracer?: string, stack?: string[]); } export declare type DocumentActions = LoadDocuments | SubscribeDocuments | CreateDocument | CreateOrUpdateDocument | DeleteDocument | UpdateDocument | GetDocument | RestoreDocument | ArchiveDocument | GetManyDocument | RequestDeleteDocument | DocumentCreated | DocumentDeleted | Clear | ClearAll | DocumentUpdated | DocumentAdded | AddManyDocuments | DocumentModified | DocumentRemoved;