/** * License Validation Service * Handles license validation for the jaak-stamps webcomponent */ export type Environment = 'dev' | 'qa' | 'sandbox' | 'prod'; export interface LicenseValidationRequest { license: string; origin: string; app_id?: string; product?: string; product_version?: string; metadata?: { [key: string]: any; }; } export interface LicenseValidationResponse { access_token: string; token_type: string; expires_at: string; session_id: string; jti: string; step: number; license: string; traceId?: string; } export interface LicenseValidationError { error: string; error_description?: string; status_code?: number; } export declare class LicenseValidationService { private apiEndpoint; private baseUrl; private static readonly ENVIRONMENT_URLS; constructor(environment?: Environment); /** * Validate license with the API * @param license License key to validate * @param traceId Optional trace ID from W3C Trace Context * @param appId Optional application ID * @param metadata Optional additional metadata * @returns Promise */ validateLicense(license: string, traceId?: string, appId?: string): Promise; /** * Generate a random trace ID for W3C Trace Context (32 hex characters) */ private generateTraceId; /** * Generate a random span ID for W3C Trace Context (16 hex characters) */ private generateSpanId; /** * Extract trace ID from license field * License format: "L<32-hex-chars>" * Example: "Ld79223833a2fd91971e4c14a33298904" -> "d79223833a2fd91971e4c14a33298904" */ static extractTraceIdFromLicense(license: string): string | null; }