@brontosaurus/db
Version:
:ocean: Schema for brontosaurus
13 lines (12 loc) • 1.1 kB
TypeScript
import { ObjectID } from "bson";
import { IAttempt, IAttemptConfig } from "../interface/attempt";
import { IAttemptModel } from "../model/attempt";
export declare const createUnsavedAttempt: (config: IAttemptConfig) => IAttemptModel;
export declare const getAttemptById: (attemptId: ObjectID | string) => Promise<IAttemptModel | null>;
export declare const getAttemptByAttemptIdentifier: (identifier: string) => Promise<IAttemptModel | null>;
export declare const getAttemptsByAccount: (account: ObjectID | string) => Promise<IAttemptModel[]>;
export declare const getAttemptsByAccountAndPage: (account: ObjectID | string, limit: number, page: number) => Promise<IAttemptModel[]>;
export declare const getAttemptCountByAccount: (account: ObjectID | string) => Promise<number>;
export declare const getSelectedAccountAttemptPages: (account: ObjectID | string, limit: number) => Promise<number>;
export declare const getAttemptsByQuery: (query: Record<string, any>) => Promise<IAttemptModel[]>;
export declare const getAttemptsByQueryLean: (query: Record<string, any>) => Promise<IAttempt[]>;