UNPKG

@sudowealth/schwab-api

Version:

TypeScript client for Charles Schwab API with OAuth support, market data, trading functionality, and complete type safety

19 lines (18 loc) 917 B
import { type TokenData, type ITokenLifecycleManager, type RefreshOptions } from './types'; /** * Function to determine if an object implements ITokenLifecycleManager * @param obj Object to check * @returns True if the object implements ITokenLifecycleManager */ export declare function isTokenLifecycleManager(obj: unknown): obj is ITokenLifecycleManager; /** * Forcibly refreshes the tokens managed by a token lifecycle manager. * This is useful when you need to explicitly trigger a refresh regardless of token expiration. * * @param manager The token lifecycle manager to refresh tokens for * @param options Optional refresh options * @returns The refreshed token data * @throws Error if the manager doesn't support refresh */ export declare function forceRefreshTokens(manager: ITokenLifecycleManager, options?: RefreshOptions): Promise<TokenData>; export type { TokenData, ITokenLifecycleManager };