UNPKG

@coretext-ai/qa-google-contacts-a58500d5-8331-4ce9-a140-d204a9fae815

Version:
51 lines 1.25 kB
export interface OAuth2Tokens { access_token?: string | null; refresh_token?: string | null; expiry_date?: number | null; scope?: string | null; token_type?: string | null; } export declare class GoogleOAuthClient { private oauth2Client; private tokenManager; private credentialLoader; private scopes; constructor(); /** * Initialize OAuth client */ initialize(): Promise<void>; /** * Ensure we have a valid access token */ getValidAccessToken(): Promise<string>; /** * Start OAuth authorization flow */ private authorize; /** * Exchange authorization code for tokens */ private exchangeCodeForTokens; /** * Refresh expired access token */ private refreshTokens; /** * Check if token is expired (with 5-minute buffer) */ private isTokenExpired; /** * Start a local HTTP server to handle OAuth callback */ private startCallbackServer; /** * Revoke tokens and clear stored credentials */ revokeTokens(): Promise<void>; /** * Check if user has valid authentication */ isAuthenticated(): Promise<boolean>; } //# sourceMappingURL=google-oauth-client.d.ts.map