unified-video-framework 1.4.21 → 1.4.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,60 +0,0 @@
1
- import { PaywallConfig } from '@unified-video/core';
2
- export type EmailAuthControllerOptions = {
3
- getOverlayContainer: () => HTMLElement | null;
4
- onAuthSuccess: (userId: string, sessionToken: string, accessData?: any) => void;
5
- onAuthCancel: () => void;
6
- onShow?: () => void;
7
- onClose?: () => void;
8
- };
9
- export type AuthResponse = {
10
- success: boolean;
11
- message?: string;
12
- data?: {
13
- sessionToken?: string;
14
- refreshToken?: string;
15
- userId?: string;
16
- expiresIn?: number;
17
- };
18
- error?: string;
19
- };
20
- export type AuthStep = 'email' | 'otp' | 'loading' | 'error' | 'success';
21
- export declare class EmailAuthController {
22
- private config;
23
- private opts;
24
- private overlayEl;
25
- private currentStep;
26
- private currentEmail;
27
- private resendTimer;
28
- private resendCooldown;
29
- private otpAttempts;
30
- private requestStartTime;
31
- constructor(config: PaywallConfig | null, opts: EmailAuthControllerOptions);
32
- updateConfig(config: PaywallConfig | null): void;
33
- isAuthenticated(): boolean;
34
- getAuthenticatedUserId(): string | null;
35
- openAuthModal(): void;
36
- closeAuthModal(): void;
37
- private ensureOverlay;
38
- private createHeader;
39
- private setStep;
40
- private renderEmailStep;
41
- private renderOtpStep;
42
- private renderLoadingStep;
43
- private renderErrorStep;
44
- private renderSuccessStep;
45
- private requestOtp;
46
- private verifyOtp;
47
- private storeSessionToken;
48
- private getStoredSessionToken;
49
- private storeAuthTokens;
50
- private startResendCooldown;
51
- private clearResendTimer;
52
- private handleCancel;
53
- private showInputError;
54
- private showSuccessMessage;
55
- private showErrorMessage;
56
- private isValidEmail;
57
- logout(): Promise<void>;
58
- destroy(): void;
59
- }
60
- //# sourceMappingURL=EmailAuthController.d.ts.map