@brontosaurus/db
Version:
:ocean: Schema for brontosaurus
41 lines (40 loc) • 3.75 kB
TypeScript
import { ObjectID } from "bson";
import { IGroup } from "../interface/group";
import { IGroupModel } from "../model/group";
export declare const createUnsavedGroup: (name: string, description?: string | undefined) => IGroupModel;
export declare const getGroupById: (id: ObjectID | string) => Promise<IGroupModel | null>;
export declare const getGroupByIdLean: (id: ObjectID | string) => Promise<IGroup | null>;
export declare const getGroupsByIds: (ids: Array<ObjectID | string>) => Promise<IGroupModel[]>;
export declare const getGroupsByIdsLean: (ids: Array<ObjectID | string>) => Promise<IGroup[]>;
export declare const getGroupByName: (name: string) => Promise<IGroupModel | null>;
export declare const getGroupByNameLean: (name: string) => Promise<IGroup | null>;
export declare const getGroupIdByName: (name: string) => Promise<ObjectID | null>;
export declare const getGroupIdsByNames: (names: string[]) => Promise<ObjectID[]>;
export declare const getGroupByNames: (names: string[]) => Promise<IGroupModel[]>;
export declare const getGroupByNamesLean: (names: string[]) => Promise<IGroup[]>;
export declare const isGroupDuplicatedByName: (name: string) => Promise<boolean>;
export declare const isGroupDuplicatedById: (id: ObjectID) => Promise<boolean>;
export declare const getSelectedGroupPages: (limit: number, keyword?: string | undefined) => Promise<number>;
export declare const getSelectedActiveGroupPages: (limit: number, keyword?: string | undefined) => Promise<number>;
export declare const getTotalGroupPages: (limit: number) => Promise<number>;
export declare const getTotalActiveGroupPages: (limit: number) => Promise<number>;
export declare const getActiveGroupPagesByKeyword: (limit: number, keyword: string) => Promise<number>;
export declare const getGroupPagesByKeyword: (limit: number, keyword: string) => Promise<number>;
export declare const getSelectedActiveGroupsByPage: (limit: number, page: number, keyword?: string | undefined) => Promise<IGroupModel[]>;
export declare const getSelectedActiveGroupsByPageLean: (limit: number, page: number, keyword?: string | undefined) => Promise<IGroup[]>;
export declare const getSelectedGroupsByPage: (limit: number, page: number, keyword?: string | undefined) => Promise<IGroupModel[]>;
export declare const getSelectedGroupsByPageLean: (limit: number, page: number, keyword?: string | undefined) => Promise<IGroup[]>;
export declare const getAllActiveGroups: () => Promise<IGroupModel[]>;
export declare const getAllActiveGroupsLean: () => Promise<IGroup[]>;
export declare const getAllGroups: () => Promise<IGroupModel[]>;
export declare const getAllGroupsLean: () => Promise<IGroup[]>;
export declare const getActiveGroupsByPage: (keyword: string, limit: number, page: number) => Promise<IGroupModel[]>;
export declare const getActiveGroupsByPageLean: (keyword: string, limit: number, page: number) => Promise<IGroup[]>;
export declare const getGroupsByPage: (keyword: string, limit: number, page: number) => Promise<IGroupModel[]>;
export declare const getGroupsByPageLean: (keyword: string, limit: number, page: number) => Promise<IGroup[]>;
export declare const getAllActiveGroupsByPage: (limit: number, page: number) => Promise<IGroupModel[]>;
export declare const getAllActiveGroupsByPageLean: (limit: number, page: number) => Promise<IGroup[]>;
export declare const getAllGroupsByPage: (limit: number, page: number) => Promise<IGroupModel[]>;
export declare const getAllGroupsByPageLean: (limit: number, page: number) => Promise<IGroup[]>;
export declare const getGroupsByQuery: (query: Record<string, any>) => Promise<IGroupModel[]>;
export declare const getGroupsByQueryLean: (query: Record<string, any>) => Promise<IGroup[]>;