interface TokenManagerConfig { clientId: string; clientSecret: string; baseUrl: string; crid?: string; masterMid?: string; labelMid?: string; epaAccount?: string; } /** * Manages OAuth 2.0 and Payment Authorization tokens for USPS v3 API. * * OAuth tokens use client_credentials grant and last 8 hours (28800s). * Payment tokens are required only for label creation and also last 8 hours. * Both are refreshed proactively 30 minutes before expiry. */ export declare class TokenManager { private config; private oauthCache; private paymentCache; private oauthPromise; private paymentPromise; constructor(config: TokenManagerConfig); /** Get a valid OAuth bearer token, refreshing if needed */ getOAuthToken(): Promise; /** Get a valid Payment Authorization token, refreshing if needed */ getPaymentToken(): Promise; /** Get both tokens (for label creation) */ getBothTokens(): Promise<{ accessToken: string; paymentToken: string; }>; /** Force refresh both tokens */ forceRefresh(): Promise; /** Current token status */ get status(): { hasOAuthToken: boolean; oauthExpiresIn?: number; hasPaymentToken: boolean; paymentExpiresIn?: number; }; /** Clear cached tokens */ clear(): void; private refreshOAuth; private refreshPayment; } export {}; //# sourceMappingURL=auth.d.ts.map