/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { type SixthUserInfo } from './sixthAuth.js'; export interface SubscriptionStatus { isSubscriber: boolean; hasExceededLimit: boolean; shouldBlock: boolean; totalTokensUsed: number; remainingTokens: number; usagePercentage: number; userInfo: SixthUserInfo | null; } export declare class SubscriptionManager { /** * Cache JWT token for re-authentication */ static cacheJWT(token: string, expiresInHours?: number): Promise; /** * Get cached JWT token */ static getCachedJWT(): Promise; /** * Clear cached JWT */ static clearJWT(): Promise; /** * Refresh user info from API using cached JWT */ static refreshUserInfo(): Promise; /** * Get complete subscription status */ static getSubscriptionStatus(): Promise; /** * Add token usage and check if user should be blocked */ static addTokenUsageAndCheck(tokens: number): Promise; /** * Open pricing page in browser */ static openPricingPage(): Promise; /** * Handle subscription upgrade flow */ static handleSubscriptionUpgrade(): Promise; /** * Check if user needs to be warned about approaching limit */ static shouldWarnUser(): Promise; /** * Get warning message for approaching limit */ static getWarningMessage(): Promise; }