UNPKG

@nestbox-ai/cli

Version:

The cli tools that helps developers to build agents

9 lines (8 loc) 349 B
/** * Enhanced 401 error handler with automatic token refresh */ export declare function handle401Error(error: any, retryCallback?: () => Promise<any>): Promise<any>; /** * Wrapper function to make API calls with automatic retry on 401 */ export declare function withTokenRefresh<T>(apiCall: () => Promise<T>, onRetry?: () => void): Promise<T>;