import { ObjectId } from 'bson'; import { IRequestOption, TQueryOperator, TQueryOption } from '../../constants/Interfaces/IBaseApi'; export type BaseObject = T & { _id?: string | ObjectId; }; export declare const apiUrl: string; export default abstract class BaseAPI { static create: (obj: BaseObject, endpoint: string, token?: string) => Promise; static update: (obj: Partial>, endpoint: string, token?: string) => Promise; static get: (endpoint: string, id: string, options?: IRequestOption, token?: string) => Promise; static getMany: (endpoint: string, options?: IRequestOption, token?: string) => Promise; static delete: (id: string, endpoint: string, token?: string) => Promise; static getOperator: (operator: TQueryOption) => TQueryOperator; static getRequestUrl: (endpoint: string, id?: string, options?: IRequestOption) => string; static parseQuery: (queryElements?: string | string[]) => { $match: any; }[]; }