UNPKG

@brontosaurus/db

Version:
51 lines (50 loc) 4.96 kB
import { ObjectID } from "bson"; import { INamespace } from "../interface/namespace"; import { INamespaceModel } from "../model/namespace"; export declare const getBrontosaurusDefaultNamespace: () => Promise<INamespaceModel>; export declare const getBrontosaurusAdminNamespace: () => Promise<INamespaceModel>; export declare const getNamespaceById: (id: ObjectID | string) => Promise<INamespaceModel | null>; export declare const getONamespaceByIdLean: (id: ObjectID | string) => Promise<INamespace | null>; export declare const getNamespacesByIds: (ids: Array<ObjectID | string>) => Promise<INamespaceModel[]>; export declare const getNamespacesByIdsLean: (ids: Array<ObjectID | string>) => Promise<INamespace[]>; export declare const getNamespaceByNamespace: (namespace: string) => Promise<INamespaceModel | null>; export declare const getNamespaceByNamespaceLean: (namespace: string) => Promise<INamespace | null>; export declare const getNamespacesByNamespaces: (namespaces: string[]) => Promise<INamespaceModel[]>; export declare const getNamespacesByNamespacesLean: (namespaces: string[]) => Promise<INamespace[]>; export declare const getNamespaceByDomain: (domain: string) => Promise<INamespaceModel | null>; export declare const getNamespaceByDomainLean: (domain: string) => Promise<INamespace | null>; export declare const getNamespacesByDomains: (domains: string[]) => Promise<INamespaceModel[]>; export declare const getNamespacesByDomainsLean: (domains: string[]) => Promise<INamespace[]>; export declare const createUnsavedNamespaceByDomain: (domain: string) => INamespaceModel; export declare const createUnsavedNamespaceByNamespace: (namespace: string) => INamespaceModel; export declare const isNamespaceDuplicatedByDomain: (domain: string) => Promise<boolean>; export declare const isNamespaceDuplicatedByNamespace: (namespace: string) => Promise<boolean>; export declare const isNamespaceDuplicatedById: (id: ObjectID) => Promise<boolean>; export declare const getSelectedActiveNamespacePages: (limit: number, keyword?: string | undefined) => Promise<number>; export declare const getSelectedNamespacePages: (limit: number, keyword?: string | undefined) => Promise<number>; export declare const getAllNamespaces: () => Promise<INamespaceModel[]>; export declare const getAllNamespacesLean: () => Promise<INamespace[]>; export declare const getTotalNamespacePages: (limit: number) => Promise<number>; export declare const getTotalActiveNamespacePages: (limit: number) => Promise<number>; export declare const getActiveNamespacePagesByKeyword: (limit: number, keyword: string) => Promise<number>; export declare const getNamespacePagesByKeyword: (limit: number, keyword: string) => Promise<number>; export declare const getSelectedActiveNamespacesByPage: (limit: number, page: number, keyword?: string | undefined) => Promise<INamespaceModel[]>; export declare const getSelectedActiveNamespacesByPageLean: (limit: number, page: number, keyword?: string | undefined) => Promise<INamespace[]>; export declare const getSelectedNamespacesByPage: (limit: number, page: number, keyword?: string | undefined) => Promise<INamespaceModel[]>; export declare const getSelectedNamespacesByPageLean: (limit: number, page: number, keyword?: string | undefined) => Promise<INamespace[]>; export declare const getActiveNamespacesByPage: (keyword: string, limit: number, page: number) => Promise<INamespaceModel[]>; export declare const getActiveNamespacesByPageLean: (keyword: string, limit: number, page: number) => Promise<INamespace[]>; export declare const getNamespacesByPage: (keyword: string, limit: number, page: number) => Promise<INamespaceModel[]>; export declare const getNamespacesByPageLean: (keyword: string, limit: number, page: number) => Promise<INamespace[]>; export declare const getAllActiveNamespacesByPage: (limit: number, page: number) => Promise<INamespaceModel[]>; export declare const getAllActiveNamespacesByPageLean: (limit: number, page: number) => Promise<INamespace[]>; export declare const getAllNamespacesByPage: (limit: number, page: number) => Promise<INamespaceModel[]>; export declare const getAllNamespacesByPageLean: (limit: number, page: number) => Promise<INamespace[]>; export declare const getAllNamespaceNamespace: () => Promise<string[]>; export declare const getAllActiveNamespaceNamespace: () => Promise<string[]>; export declare const getAllNamespaceDomain: () => Promise<string[]>; export declare const getAllActiveNamespaceDomain: () => Promise<string[]>; export declare const getNamespacesIdsByNamespaces: (namespaces: string[]) => Promise<ObjectID[]>; export declare const getNamespacesIdsByDomains: (domains: string[]) => Promise<ObjectID[]>; export declare const getNamespacesByQuery: (query: Record<string, any>) => Promise<INamespaceModel[]>; export declare const getOrganizationsByQueryLean: (query: Record<string, any>) => Promise<INamespace[]>;