@lineai/bluebeam-api
Version:
Your unofficial library for Bluebeam API for human and AI developers. Provides TypeScript support, entity classes, and developer-friendly features. Perfect for AI coders, construction professionals, and document management tasks. Includes comprehensive JS
22 lines (21 loc) • 915 B
TypeScript
import { TokenStorage } from '../types/auth';
import { ClientConfig } from '../types/common';
import { OAuthClient } from './auth';
import { HttpClient, HttpResponse } from './http-client';
/**
* Interceptor that handles automatic token refresh on 401 errors
* Implements the same interface as HttpClient for compatibility
*/
export declare class AuthInterceptor implements HttpClient {
private config;
private auth;
private storage;
private autoRefresh;
private httpClient;
constructor(config: ClientConfig, auth: OAuthClient, storage: TokenStorage, autoRefresh: boolean);
get<T>(endpoint: string): Promise<HttpResponse<T>>;
post<T>(endpoint: string, data?: unknown, isFormData?: boolean): Promise<HttpResponse<T>>;
put<T>(endpoint: string, data?: unknown): Promise<HttpResponse<T>>;
delete<T>(endpoint: string): Promise<HttpResponse<T>>;
private executeWithRetry;
}