UNPKG

mya-cli

Version:

MYA - AI-Powered Stock & Options Analysis CLI Tool

37 lines (36 loc) 1.1 kB
/** * File-based token storage implementation * Compatible with both Node.js and Cloudflare Workers environments */ import { TokenStorage, TokenData } from '../interfaces/storage-interfaces.js'; /** * Implements token storage using the file system * Single responsibility: manage auth tokens in the file system */ export declare class FileTokenStorage implements TokenStorage { private static instance; private tokenFilePath; /** * Get the singleton instance of FileTokenStorage * @param configDir Optional custom config directory * @returns The singleton FileTokenStorage instance */ static getInstance(configDir?: string): FileTokenStorage; /** * Create a new file token storage * @param configDir Optional custom config directory */ constructor(configDir?: string); /** * Save token data to file or memory */ saveToken(data: TokenData): void; /** * Get token data from file or memory if valid */ getToken(): TokenData | null; /** * Clear stored token data */ clearToken(): void; }