think/packages/domains/lib/services/ICollectorService.d.ts

38 lines
855 B
TypeScript
Raw Normal View History

2022-03-11 05:57:55 +00:00
import { IUser, IWiki, IDocument, CollectType } from "../models";
export declare type ICollectDto = {
targetId: IWiki["id"] | IDocument["id"];
type: CollectType;
};
export declare abstract class ICollectorService {
/**
*
*/
wikis = [];
getWikisLoading = false;
getWikisError = null;
/**
*
*/
documents = [];
getDocumentsLoading = false;
getDocumentsError = null;
/**
*
*/
toggleLoading = false;
toggleError = null;
/**
*
*/
checkLoading = false;
checkError = null;
abstract toggleCollect(data: ICollectDto, user?: IUser): Promise<void>;
abstract checkCollect(data: ICollectDto): Promise<boolean>;
abstract getCollectWikis(user?: IUser): Promise<IWiki[]>;
abstract getCollectDocuments(user?: IUser): Promise<IDocument[]>;
}