import { WriteOptions, MongoModel, MongoOptions } from "../src/types/types"; import { Connection } from "mongoose"; declare module "ark.db" { export class Database { private readonly dbFilePath: string; private cache: Record; public constructor(filePath: string); public get: (key: string) => any; public fetch: (key: string) => any; public has: (key: string) => boolean; public set: (key: string, value: any, options?: WriteOptions) => any; private write: (options?: WriteOptions) => void; public delete: (key: string, options?: WriteOptions) => boolean; public add: (key: string, count: number, options: WriteOptions) => any; public subtract: ( key: string, count: number, options: WriteOptions ) => any; public push: (key: string, el: any, options: WriteOptions) => any; public pull: (key: string, el: any, options: WriteOptions) => boolean; public all: () => Record; public clear: () => boolean; private read: () => Record; private get _get(): number; private get _set(): number; private get ping(): Record; } export class MongoDB { public schema: MongoModel; public constructor( mongoConnectURL: string, name: string, options: MongoOptions ); public get: (key: string) => Promise; public fetch: (key: string) => Promise; public has: (key: string) => Promise; public set: (key: string, value: any) => Promise; public delete: (key: string) => Promise; public add: (key: string, count: number) => Promise; public subtract: (key: string, count: number) => Promise; public push: (key: string, el: any) => Promise; public pull: (key: string, el: any) => Promise; public all: () => Promise; public clear: () => Promise; public uptime: () => number; public connect: (url: string) => Connection; public disconnect: () => Promise; public updateModel: (name: string) => Promise; public createModel: (name: string) => MongoDB; public createSchema: (name: string) => MongoDB; public createDatabase: (dbName: string) => Promise; public createCollection: (dbName: string) => Promise; public dropDatabase: () => Promise; public dropCollection: () => Promise; } }