import { authenticateWithToken } from './auth.js'; import { callWithAuth } from './api.js'; import { checkEntitlement } from './entitlement.js'; import { closePaywall } from './paywall.js'; import { createPaywallUrl } from './paywall.js'; declare namespace Lightswitch { export { init }; export { getInitialized }; export { getVersion }; export function getConfig(): any; export function getEndpoints(): any; export function getAuthState(): any; export function isAuthenticated(): boolean; export function getUser(): any; export function getAuthToken(): string; export function authenticateWithToken(token: any): Promise; export function login(redirectUrl: any): void; export function signup(redirectUrl: any): void; export function logout(): Promise; export function onAuthChange(listener: any): Function; export function setSupabaseSession(accessToken: any, refreshToken: any, expiresAt: any): Promise; export function initAuth(): Promise; export function fetchWithAuth(url: any, options: any): Promise; export function callWithAuth(callFunction: any, options: any): Promise; export namespace api { function get(url: any, options: any): Promise; function post(url: any, data: any, options: any): Promise; function put(url: any, data: any, options: any): Promise; } export function checkEntitlement(feature: any, options: any): Promise; export function showPaywall(options: any): Promise; export function closePaywall(): void; export function isPaywallOpen(): boolean; export function getCurrentPaywall(): any; export function onPaywallEvent(listener: any): Function; export function createPaywallUrl(paywallConfigId: any, token: any): string; export function trackEvent(eventType: any, params: any, options: any): Promise; } import { fetchWithAuth } from './api.js'; import { get } from './api.js'; import { getAuthState } from './auth.js'; import { getAuthToken } from './auth.js'; import { getConfig } from './config.js'; import { getCurrentPaywall } from './paywall.js'; import { getEndpoints } from './config.js'; /** * Check if SDK is initialized * @returns {boolean} True if initialized */ export function getInitialized(): boolean; import { getUser } from './auth.js'; /** * Get current SDK version * @returns {string} SDK version */ export function getVersion(): string; /** * Initialize the Lightswitch SDK * @param {Object} config - Configuration object * @param {string} config.publishableKey - The publishable key for API requests * @param {string} [config.appSlug='default'] - The app slug for endpoint generation * @param {boolean} [config.autoAuth=true] - Whether to automatically check for auth tokens * @param {Object} [config.supabaseClient] - Optional Supabase client instance * @returns {Promise} */ export function init(_ref: any): Promise; import { initAuth } from './auth.js'; import { isAuthenticated } from './auth.js'; import { isPaywallOpen } from './paywall.js'; import { login } from './auth.js'; import { logout } from './auth.js'; import { onAuthChange } from './auth.js'; import { onPaywallEvent } from './paywall.js'; import { post } from './api.js'; import { put } from './api.js'; import { setSupabaseSession } from './auth.js'; import { showPaywall } from './paywall.js'; import { signup } from './auth.js'; import { trackEvent } from './tracking.js'; export { authenticateWithToken, callWithAuth, checkEntitlement, closePaywall, createPaywallUrl, Lightswitch as default, fetchWithAuth, get, getAuthState, getAuthToken, getConfig, getCurrentPaywall, getEndpoints, getUser, initAuth, isAuthenticated, isPaywallOpen, login, logout, onAuthChange, onPaywallEvent, post, put, setSupabaseSession, showPaywall, signup, trackEvent };