/** * Utility functions for the Iaptic library * @internal */ export declare class Utils { /** * Base64 encode a string with fallbacks for different environments * @param str - String to encode * @returns Base64 encoded string * @remarks * Handles non-ASCII characters and provides fallbacks for older browsers * and Node.js environments */ static base64Encode(str: string): string; /** * Get and parse a JSON item from localStorage * @param key - Storage key * @returns Parsed value or null if not found/invalid * @internal */ static storageGetJson(key: string): T | null; /** * Get a string item from localStorage * @param key - Storage key * @returns String value or null if not found * @internal */ static storageGetString(key: string): string | null; /** * Store a JSON-serializable value in localStorage * @param key - Storage key * @param value - Value to store * @returns true if successful, false if storage failed * @internal */ static storageSetJson(key: string, value: any): boolean; /** * Store a string value in localStorage * @param key - Storage key * @param value - String to store * @returns true if successful, false if storage failed * @internal */ static storageSetString(key: string, value: string): boolean; /** * Remove an item from localStorage * @param key - Storage key * @returns true if successful, false if removal failed * @internal */ static storageRemove(key: string): boolean; /** * Build a URL with query parameters * @param baseUrl - Base URL without query parameters * @param params - Object containing query parameters * @returns Complete URL with encoded query parameters * @remarks * Handles URL encoding and removes undefined/null parameters * @internal */ static buildUrl(baseUrl: string, params: Record): string; /** * Format a currency amount from micros with proper localization * @param amountMicros - Amount in micros (1/1,000,000 of currency unit) * @param currency - ISO 4217 currency code (e.g., 'USD', 'EUR') * @returns Formatted currency string * @example * ```ts * Utils.formatCurrency(1990000, 'USD') // Returns "$1.99" * Utils.formatCurrency(1000000, 'EUR') // Returns "€1" * ``` */ static formatCurrency(amountMicros: number, currency: string): string; /** * Format an ISO 8601 period string into human-readable English * @param period - ISO 8601 duration string * @returns Human-readable period string * @example * ```ts * Utils.formatBillingPeriodEN('P1M') // Returns "Monthly" * Utils.formatBillingPeriodEN('P3M') // Returns "Every 3 months" * Utils.formatBillingPeriodEN('P1Y') // Returns "Yearly" * ``` */ static formatBillingPeriodEN(period: string): string; } //# sourceMappingURL=utils.d.ts.map