import { AptlyAppJWT } from '@aptly-as/types'; export interface AptlyApiOAuth2Response { token_type: 'bearer'; access_token: string; expires_in: number; refresh_token: string; organization: string; } export declare class AptlyApi { private url; private client_id; private client_secret; private busy; private refresh_token; private access_token; private appJWT; constructor(url: string, client_id: string, client_secret: string); init(refresh_token: string): void; set accessToken(token: string); get(path: string, init?: Omit): Promise; post(path: string, body: object, init?: Omit): Promise; patch(path: string, body: object, init?: Omit): Promise; delete(path: string, init?: Omit): Promise; postAppWebhook(body: object): Promise; downloadDocumentWithToken(downloadToken: string): Promise<{ buffer: Buffer; filename: string; contentType: string; }>; downloadDocument(path: string): Promise<{ buffer: Buffer; filename: string; contentType: string; }>; fetchJSON(path: string, init?: RequestInit): Promise; fetch(path: string, init?: RequestInit): Promise; getAccessToken(refresh_token?: string): Promise; private basicAuth; private getJSONHeaders; private parseJWT; private validateJWT; }