UNPKG

@brontosaurus/db

Version:
34 lines (33 loc) 3.58 kB
import { ObjectID } from "bson"; import { ApplicationOthersConfig, IApplication } from "../interface/application"; import { IApplicationModel } from "../model/application"; export declare const createUnsavedApplication: (name: string, key: string, expire: number, others: ApplicationOthersConfig) => IApplicationModel; export declare const getApplicationById: (id: ObjectID | string) => Promise<IApplicationModel | null>; export declare const getApplicationsByIds: (ids: Array<ObjectID | string>) => Promise<IApplicationModel[]>; export declare const getAllApplications: () => Promise<IApplicationModel[]>; export declare const getAllApplicationsLean: () => Promise<IApplication[]>; export declare const getApplicationByKey: (key: string) => Promise<IApplicationModel | null>; export declare const getApplicationByKeyLean: (key: string) => Promise<IApplication | null>; export declare const isApplicationDuplicatedByKey: (key: string) => Promise<boolean>; export declare const getTotalApplicationPages: (limit: number) => Promise<number>; export declare const getSelectedApplicationPages: (limit: number, keyword?: string | undefined) => Promise<number>; export declare const getSelectedActiveApplicationPages: (limit: number, keyword?: string | undefined) => Promise<number>; export declare const getTotalActiveApplicationPages: (limit: number) => Promise<number>; export declare const getActiveApplicationPagesByKeyword: (limit: number, keyword: string) => Promise<number>; export declare const getApplicationPagesByKeyword: (limit: number, keyword: string) => Promise<number>; export declare const getSelectedActiveApplicationsByPage: (limit: number, page: number, keyword?: string | undefined) => Promise<IApplicationModel[]>; export declare const getSelectedActiveApplicationsByPageLean: (limit: number, page: number, keyword?: string | undefined) => Promise<IApplication[]>; export declare const getSelectedApplicationsByPage: (limit: number, page: number, keyword?: string | undefined) => Promise<IApplicationModel[]>; export declare const getSelectedApplicationsByPageLean: (limit: number, page: number, keyword?: string | undefined) => Promise<IApplication[]>; export declare const getActiveApplicationsByPage: (keyword: string, limit: number, page: number) => Promise<IApplicationModel[]>; export declare const getActiveApplicationsByPageLean: (keyword: string, limit: number, page: number) => Promise<IApplication[]>; export declare const getApplicationsByPage: (keyword: string, limit: number, page: number) => Promise<IApplicationModel[]>; export declare const getApplicationsByPageLean: (keyword: string, limit: number, page: number) => Promise<IApplication[]>; export declare const getAllActiveApplicationsByPage: (limit: number, page: number) => Promise<IApplicationModel[]>; export declare const getAllActiveApplicationsByPageLean: (limit: number, page: number) => Promise<IApplication[]>; export declare const getAllApplicationsByPage: (limit: number, page: number) => Promise<IApplicationModel[]>; export declare const getAllApplicationsByPageLean: (limit: number, page: number) => Promise<IApplication[]>; export declare const checkGreenApplicationMatch: (applicationKey: string, green: string) => Promise<boolean>; export declare const refreshGreen: (applicationKey: string) => Promise<IApplicationModel | null>; export declare const getApplicationsByQuery: (query: Record<string, any>) => Promise<IApplicationModel[]>; export declare const getApplicationsByQueryLean: (query: Record<string, any>) => Promise<IApplication[]>;