import { CDN } from './CDN.js'; import { DeleteRoutes, GetRoutes, PatchRoutes, PostRoutes, PutRoutes } from './types/routes.js'; export interface RESTOptions { app: string; api: string; cdn: string; timeout: number; retries: number; } export interface APIRequest { path: string; method: 'GET' | 'POST' | 'DELETE' | 'PATCH' | 'PUT'; body?: unknown; query?: Record; retries: number; } declare type Count = Str extends `${infer _}${SubStr}${infer After}` ? Count : Matches['length']; declare type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; } : T; export declare class REST { #private; readonly cdn: CDN; protected readonly options: RESTOptions; debug(_msg: string): void; constructor(options?: DeepPartial); private get headers(); setToken(token: string | null, bot?: boolean): this; private request; private generateRequest; get; method: 'GET'; }>>(path: Path, options?: Partial): Promise; post; method: 'POST'; }>>(path: Path, options?: Partial): Promise; delete; method: 'DELETE'; }>>(path: Path, options?: Partial): Promise; put; method: 'PUT'; }>>(path: Path, options?: Partial): Promise; patch; method: 'PATCH'; }>>(path: Path, options?: Partial): Promise; } export {};