@virex-tech/paywallo-sdk 1.4.1 → 1.5.0

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.
@@ -148,7 +148,7 @@ class PaywalloStoreKitModule(private val reactContext: ReactApplicationContext)
148
148
  }
149
149
 
150
150
  @ReactMethod
151
- fun purchase(productId: String, promise: Promise) {
151
+ fun purchase(productId: String, appAccountToken: String?, promise: Promise) {
152
152
  scope.launch {
153
153
  try {
154
154
  if (!connectBilling()) {
@@ -190,6 +190,10 @@ class PaywalloStoreKitModule(private val reactContext: ReactApplicationContext)
190
190
  listOf(productDetailsParams.build())
191
191
  )
192
192
 
193
+ if (!appAccountToken.isNullOrBlank()) {
194
+ flowParamsBuilder.setObfuscatedAccountId(appAccountToken)
195
+ }
196
+
193
197
  client.launchBillingFlow(activity, flowParamsBuilder.build())
194
198
  } catch (e: Exception) {
195
199
  purchasePromise = null
@@ -206,12 +210,18 @@ class PaywalloStoreKitModule(private val reactContext: ReactApplicationContext)
206
210
  BillingClient.BillingResponseCode.OK -> {
207
211
  val purchase = purchases?.firstOrNull()
208
212
  if (purchase != null) {
209
- val map = WritableNativeMap()
210
- map.putString("transactionId", purchase.orderId ?: purchase.purchaseToken)
211
- map.putString("productId", purchase.products.firstOrNull() ?: "")
212
- map.putString("receipt", purchase.purchaseToken)
213
- map.putDouble("transactionDate", purchase.purchaseTime.toDouble())
214
- promise.resolve(map)
213
+ if (purchase.purchaseState == Purchase.PurchaseState.PENDING) {
214
+ val map = WritableNativeMap()
215
+ map.putBoolean("pending", true)
216
+ promise.resolve(map)
217
+ } else {
218
+ val map = WritableNativeMap()
219
+ map.putString("transactionId", purchase.orderId ?: purchase.purchaseToken)
220
+ map.putString("productId", purchase.products.firstOrNull() ?: "")
221
+ map.putString("receipt", purchase.purchaseToken)
222
+ map.putDouble("transactionDate", purchase.purchaseTime.toDouble())
223
+ promise.resolve(map)
224
+ }
215
225
  } else {
216
226
  promise.resolve(null)
217
227
  }
package/dist/index.d.mts CHANGED
@@ -51,7 +51,7 @@ interface TapBehavior {
51
51
  targetStepId?: string;
52
52
  placementName?: string;
53
53
  }
54
- type BlockType = "page" | "stack" | "text" | "button" | "image" | "icon" | "video" | "divider" | "spacer" | "lottie" | "carousel" | "navigation" | "tabs" | "fixed-footer" | "feature-card" | "bullet-item" | "timeline-item" | "simple-link" | "comparison-table" | "countdown" | "review" | "badge" | "popup" | "progress" | "social-proof" | "testimonial" | "accolades" | "sticker" | "product-card" | "toggle-option" | "delayed-close" | "close-button" | "back-button" | "trial-toggle" | "period-picker" | "product-list" | "exit-offer" | "spin-wheel";
54
+ type BlockType = "page" | "stack" | "container" | "text" | "button" | "purchase-button" | "restore-button" | "image" | "icon" | "video" | "divider" | "spacer" | "lottie" | "carousel" | "navigation" | "tabs" | "fixed-footer" | "feature-card" | "bullet-item" | "timeline-item" | "simple-link" | "comparison-table" | "countdown" | "review" | "badge" | "popup" | "progress" | "social-proof" | "testimonial" | "accolades" | "sticker" | "product-card" | "product-cards" | "toggle-option" | "delayed-close" | "close-button" | "back-button" | "trial-toggle" | "period-picker" | "product-list" | "exit-offer" | "spin-wheel" | "form-input" | "rating-input" | "chart" | "gif" | "scroll-list" | "shared-block-ref";
55
55
 
56
56
  /**
57
57
  * Layout block props — page, stack, fixed-footer, popup.
@@ -116,7 +116,7 @@ interface ServerProductInfo {
116
116
  }
117
117
  interface CampaignResponse {
118
118
  campaignId: string;
119
- placement?: string;
119
+ placement: string;
120
120
  variantKey: string;
121
121
  paywall: {
122
122
  id: string;
@@ -264,6 +264,7 @@ interface Subscription {
264
264
  interface SubscriptionStatusResponse$1 {
265
265
  hasActiveSubscription: boolean;
266
266
  subscription: Subscription | null;
267
+ entitlements: string[];
267
268
  }
268
269
  interface RestoreResult {
269
270
  success: boolean;
@@ -316,31 +317,6 @@ interface ConditionalFlagContext {
316
317
  country?: string;
317
318
  distinctId?: string;
318
319
  }
319
- interface AffiliateCoupon {
320
- code: string;
321
- status: string;
322
- createdAt: Date;
323
- }
324
- interface AffiliateCommission {
325
- id: string;
326
- referredDistinctId: string;
327
- purchaseAmount: number;
328
- commissionAmount: number;
329
- status: "pending" | "eligible" | "ineligible" | "withdrawn";
330
- createdAt: Date;
331
- }
332
- interface AffiliateBalance {
333
- total: number;
334
- pending: number;
335
- available: number;
336
- withdrawn: number;
337
- }
338
- interface WithdrawalRequest {
339
- id: string;
340
- amount: number;
341
- status: "pending" | "approved" | "rejected" | "paid";
342
- createdAt: Date;
343
- }
344
320
 
345
321
  interface PaywallModalProps {
346
322
  placement: string;
@@ -487,6 +463,10 @@ declare class ApiClient {
487
463
  private offlineQueueEnabled;
488
464
  private httpClient;
489
465
  private readonly cache;
466
+ private eventBatch;
467
+ private batchTimer;
468
+ private readonly BATCH_MAX_SIZE;
469
+ private readonly BATCH_FLUSH_MS;
490
470
  constructor(appKey: string, apiUrl: string, debug?: boolean, environment?: Environment, offlineQueueEnabled?: boolean, timeout?: number);
491
471
  getHttpClient(): HttpClient;
492
472
  getBaseUrl(): string;
@@ -502,8 +482,9 @@ declare class ApiClient {
502
482
  post<T>(path: string, body: unknown, skipRetry?: boolean): Promise<HttpResponse<T>>;
503
483
  reportError(errorType: string, message: string, context?: Record<string, unknown>): Promise<void>;
504
484
  trackEvent(eventName: string, distinctId: string, properties?: UserProperties, timestamp?: number): Promise<void>;
485
+ flushEventBatch(): Promise<void>;
505
486
  identify(distinctId: string, properties?: UserProperties, email?: string, deviceId?: string): Promise<void>;
506
- startSession(distinctId: string, sessionId: string, platform?: string): Promise<{
487
+ startSession(distinctId: string, sessionId: string, platform?: string, appVersion?: string, deviceModel?: string, osVersion?: string): Promise<{
507
488
  success: boolean;
508
489
  }>;
509
490
  endSession(sessionId: string, durationSeconds: number): Promise<{
@@ -526,84 +507,6 @@ declare class ApiClient {
526
507
  private log;
527
508
  }
528
509
 
529
- declare class AffiliateManager {
530
- private apiClient;
531
- private debug;
532
- initialize(apiClient: ApiClient, debug?: boolean): void;
533
- registerCoupon(code: string): Promise<{
534
- success: boolean;
535
- coupon?: AffiliateCoupon;
536
- error?: string;
537
- }>;
538
- applyCoupon(code: string): Promise<{
539
- success: boolean;
540
- applied?: boolean;
541
- error?: string;
542
- }>;
543
- getMyCoupon(): Promise<{
544
- coupon: AffiliateCoupon | null;
545
- }>;
546
- getAppliedCoupon(): Promise<{
547
- coupon: {
548
- code: string;
549
- } | null;
550
- }>;
551
- getBalance(): Promise<AffiliateBalance>;
552
- getCommissions(): Promise<AffiliateCommission[]>;
553
- requestWithdrawal(amount: number): Promise<{
554
- success: boolean;
555
- withdrawal?: WithdrawalRequest;
556
- error?: string;
557
- }>;
558
- getWithdrawals(): Promise<WithdrawalRequest[]>;
559
- private get;
560
- private post;
561
- private ensureInitialized;
562
- private log;
563
- }
564
- declare const affiliateManager: AffiliateManager;
565
-
566
- declare const PaywalloAffiliate: {
567
- registerCoupon: (code: string) => Promise<{
568
- success: boolean;
569
- coupon?: AffiliateCoupon;
570
- error?: string;
571
- }>;
572
- applyCoupon: (code: string) => Promise<{
573
- success: boolean;
574
- applied?: boolean;
575
- error?: string;
576
- }>;
577
- getMyCoupon: () => Promise<{
578
- coupon: AffiliateCoupon | null;
579
- }>;
580
- getAppliedCoupon: () => Promise<{
581
- coupon: {
582
- code: string;
583
- } | null;
584
- }>;
585
- getBalance: () => Promise<AffiliateBalance>;
586
- getCommissions: () => Promise<AffiliateCommission[]>;
587
- requestWithdrawal: (amount: number) => Promise<{
588
- success: boolean;
589
- withdrawal?: WithdrawalRequest;
590
- error?: string;
591
- }>;
592
- getWithdrawals: () => Promise<WithdrawalRequest[]>;
593
- };
594
-
595
- declare class AffiliateError extends PaywalloError {
596
- constructor(code: string, message: string);
597
- }
598
- declare const AFFILIATE_ERROR_CODES: {
599
- readonly NOT_INITIALIZED: "AFFILIATE_NOT_INITIALIZED";
600
- readonly COUPON_REGISTER_FAILED: "AFFILIATE_COUPON_REGISTER_FAILED";
601
- readonly COUPON_APPLY_FAILED: "AFFILIATE_COUPON_APPLY_FAILED";
602
- readonly BALANCE_FETCH_FAILED: "AFFILIATE_BALANCE_FETCH_FAILED";
603
- readonly WITHDRAWAL_FAILED: "AFFILIATE_WITHDRAWAL_FAILED";
604
- readonly NETWORK_ERROR: "AFFILIATE_NETWORK_ERROR";
605
- };
606
-
607
510
  declare class IAPService {
608
511
  private productsCache;
609
512
  private apiClient;
@@ -881,6 +784,7 @@ interface IPaywalloClient {
881
784
  registerActiveChecker(checker: () => Promise<boolean>): void;
882
785
  registerRestoreHandler(handler: () => Promise<RestoreResult>): void;
883
786
  registerEmergencyPaywallHandler(handler: EmergencyPaywallHandler): void;
787
+ getEmergencyPaywall(): Promise<EmergencyPaywallResponse>;
884
788
  getSessionFlag(key: string): string | null;
885
789
  isOnline(): boolean;
886
790
  getOfflineQueueSize(): number;
@@ -983,6 +887,7 @@ declare class QueueProcessorClass {
983
887
  processed: number;
984
888
  failed: number;
985
889
  }>;
890
+ private processEventBatches;
986
891
  private processItem;
987
892
  enqueueIfOffline(method: "POST" | "PUT", url: string, body: unknown, headers?: Record<string, string>): Promise<{
988
893
  queued: boolean;
@@ -1180,4 +1085,4 @@ declare function hasVariables(text: string): boolean;
1180
1085
 
1181
1086
  declare const Paywallo: IPaywalloClient;
1182
1087
 
1183
- export { AFFILIATE_ERROR_CODES, ANALYTICS_ERROR_CODES, type AffiliateBalance, type AffiliateCommission, type AffiliateCoupon, AffiliateError, AffiliateManager, AnalyticsError, ApiClient, type ApiClientConfig, type BlockType, type BoxSpacing, CAMPAIGN_ERROR_CODES, type CachedSubscription, CampaignError, type CampaignPresentOptions, type CampaignResponse, type CampaignResult, type ConditionalFlagContext, type ConditionalFlagResult, PURCHASE_ERROR_CODES as ERROR_CODES, type Environment, type FlagVariant, HttpClient, type HttpClientConfig, type HttpResponse, type IAPProduct, type IAPPurchase, IAPService, IDENTITY_ERROR_CODES, type IPaywalloClient, type IdentifyOptions, IdentityError, IdentityManager, type IdentityState, type LocalizedText, MetaBridge, type NetworkListener, type NetworkMonitorConfig, type NetworkState, type OfflineQueueConfig, PAYWALL_ERROR_CODES, PURCHASE_ERROR_CODES, type PaywallBlockConfig, type PaywallConfig, PaywallContext, PaywallError, type PaywallErrorStrings$1 as PaywallErrorStrings, PaywallModal, type PaywallNode, type PaywallPresentOptions, type PaywallResult, type PaywallState, Paywallo, PaywalloAffiliate, PaywalloClient, type PaywalloConfig, PaywalloContext, PaywalloError, type PaywalloInitConfig, PaywalloProvider, type PaywalloProviderProps, type PreloadCampaignResult, type PreloadResult, type Product, type ProductPriceInfo, type Purchase, type PurchaseControllerConfig, PurchaseError, type PurchaseResult, type PurchaseState, type QueueEvent, type QueueItem, type QueueListener, type QueueProcessorConfig, type RequestOptions, type RestoreResult, type RetryConfig, SESSION_ERROR_CODES, type SessionConfig, SessionError, SessionManager, type SessionState, type Subscription, SubscriptionCache, type SubscriptionInfo, type SubscriptionManagerConfig, type SubscriptionPlatform, type SubscriptionStatus$1 as SubscriptionStatus, type SubscriptionStatusResponse$1 as SubscriptionStatusResponse, type TapBehavior, type TrackEventOptions, type UserProperties, type ValidatePurchaseResponse, type VariableContext, type WithdrawalRequest, affiliateManager, createPurchaseError, Paywallo as default, detectDeviceLanguage, getCurrentLanguage, getDefaultLanguage, getIAPService, getLocalizedString, hasVariables, identityManager, initLocalization, metaBridge, nativeStoreKit, networkMonitor, offlineQueue, parseVariables, queueProcessor, resolveText, sessionManager, setCurrentLanguage, setDefaultLanguage, subscriptionManager, usePaywallContext, usePaywallo, useProducts, usePurchase, useSubscription };
1088
+ export { ANALYTICS_ERROR_CODES, AnalyticsError, ApiClient, type ApiClientConfig, type BlockType, type BoxSpacing, CAMPAIGN_ERROR_CODES, type CachedSubscription, CampaignError, type CampaignPresentOptions, type CampaignResponse, type CampaignResult, type ConditionalFlagContext, type ConditionalFlagResult, PURCHASE_ERROR_CODES as ERROR_CODES, type EmergencyPaywallResponse, type Environment, type FlagVariant, HttpClient, type HttpClientConfig, type HttpResponse, type IAPProduct, type IAPPurchase, IAPService, IDENTITY_ERROR_CODES, type IPaywalloClient, type IdentifyOptions, IdentityError, IdentityManager, type IdentityState, type LocalizedText, MetaBridge, type NetworkListener, type NetworkMonitorConfig, type NetworkState, type OfflineQueueConfig, PAYWALL_ERROR_CODES, PURCHASE_ERROR_CODES, type PaywallBlockConfig, type PaywallConfig, PaywallContext, PaywallError, type PaywallErrorStrings$1 as PaywallErrorStrings, PaywallModal, type PaywallNode, type PaywallPresentOptions, type PaywallResult, type PaywallState, Paywallo, PaywalloClient, type PaywalloConfig, PaywalloContext, PaywalloError, type PaywalloInitConfig, PaywalloProvider, type PaywalloProviderProps, type PreloadCampaignResult, type PreloadResult, type Product, type ProductPriceInfo, type Purchase, type PurchaseControllerConfig, PurchaseError, type PurchaseResult, type PurchaseState, type QueueEvent, type QueueItem, type QueueListener, type QueueProcessorConfig, type RequestOptions, type RestoreResult, type RetryConfig, SESSION_ERROR_CODES, type SessionConfig, SessionError, SessionManager, type SessionState, type Subscription, SubscriptionCache, type SubscriptionInfo, type SubscriptionManagerConfig, type SubscriptionPlatform, type SubscriptionStatus$1 as SubscriptionStatus, type SubscriptionStatusResponse$1 as SubscriptionStatusResponse, type TapBehavior, type TrackEventOptions, type UserProperties, type ValidatePurchaseResponse, type VariableContext, createPurchaseError, Paywallo as default, detectDeviceLanguage, getCurrentLanguage, getDefaultLanguage, getIAPService, getLocalizedString, hasVariables, identityManager, initLocalization, metaBridge, nativeStoreKit, networkMonitor, offlineQueue, parseVariables, queueProcessor, resolveText, sessionManager, setCurrentLanguage, setDefaultLanguage, subscriptionManager, usePaywallContext, usePaywallo, useProducts, usePurchase, useSubscription };
package/dist/index.d.ts CHANGED
@@ -51,7 +51,7 @@ interface TapBehavior {
51
51
  targetStepId?: string;
52
52
  placementName?: string;
53
53
  }
54
- type BlockType = "page" | "stack" | "text" | "button" | "image" | "icon" | "video" | "divider" | "spacer" | "lottie" | "carousel" | "navigation" | "tabs" | "fixed-footer" | "feature-card" | "bullet-item" | "timeline-item" | "simple-link" | "comparison-table" | "countdown" | "review" | "badge" | "popup" | "progress" | "social-proof" | "testimonial" | "accolades" | "sticker" | "product-card" | "toggle-option" | "delayed-close" | "close-button" | "back-button" | "trial-toggle" | "period-picker" | "product-list" | "exit-offer" | "spin-wheel";
54
+ type BlockType = "page" | "stack" | "container" | "text" | "button" | "purchase-button" | "restore-button" | "image" | "icon" | "video" | "divider" | "spacer" | "lottie" | "carousel" | "navigation" | "tabs" | "fixed-footer" | "feature-card" | "bullet-item" | "timeline-item" | "simple-link" | "comparison-table" | "countdown" | "review" | "badge" | "popup" | "progress" | "social-proof" | "testimonial" | "accolades" | "sticker" | "product-card" | "product-cards" | "toggle-option" | "delayed-close" | "close-button" | "back-button" | "trial-toggle" | "period-picker" | "product-list" | "exit-offer" | "spin-wheel" | "form-input" | "rating-input" | "chart" | "gif" | "scroll-list" | "shared-block-ref";
55
55
 
56
56
  /**
57
57
  * Layout block props — page, stack, fixed-footer, popup.
@@ -116,7 +116,7 @@ interface ServerProductInfo {
116
116
  }
117
117
  interface CampaignResponse {
118
118
  campaignId: string;
119
- placement?: string;
119
+ placement: string;
120
120
  variantKey: string;
121
121
  paywall: {
122
122
  id: string;
@@ -264,6 +264,7 @@ interface Subscription {
264
264
  interface SubscriptionStatusResponse$1 {
265
265
  hasActiveSubscription: boolean;
266
266
  subscription: Subscription | null;
267
+ entitlements: string[];
267
268
  }
268
269
  interface RestoreResult {
269
270
  success: boolean;
@@ -316,31 +317,6 @@ interface ConditionalFlagContext {
316
317
  country?: string;
317
318
  distinctId?: string;
318
319
  }
319
- interface AffiliateCoupon {
320
- code: string;
321
- status: string;
322
- createdAt: Date;
323
- }
324
- interface AffiliateCommission {
325
- id: string;
326
- referredDistinctId: string;
327
- purchaseAmount: number;
328
- commissionAmount: number;
329
- status: "pending" | "eligible" | "ineligible" | "withdrawn";
330
- createdAt: Date;
331
- }
332
- interface AffiliateBalance {
333
- total: number;
334
- pending: number;
335
- available: number;
336
- withdrawn: number;
337
- }
338
- interface WithdrawalRequest {
339
- id: string;
340
- amount: number;
341
- status: "pending" | "approved" | "rejected" | "paid";
342
- createdAt: Date;
343
- }
344
320
 
345
321
  interface PaywallModalProps {
346
322
  placement: string;
@@ -487,6 +463,10 @@ declare class ApiClient {
487
463
  private offlineQueueEnabled;
488
464
  private httpClient;
489
465
  private readonly cache;
466
+ private eventBatch;
467
+ private batchTimer;
468
+ private readonly BATCH_MAX_SIZE;
469
+ private readonly BATCH_FLUSH_MS;
490
470
  constructor(appKey: string, apiUrl: string, debug?: boolean, environment?: Environment, offlineQueueEnabled?: boolean, timeout?: number);
491
471
  getHttpClient(): HttpClient;
492
472
  getBaseUrl(): string;
@@ -502,8 +482,9 @@ declare class ApiClient {
502
482
  post<T>(path: string, body: unknown, skipRetry?: boolean): Promise<HttpResponse<T>>;
503
483
  reportError(errorType: string, message: string, context?: Record<string, unknown>): Promise<void>;
504
484
  trackEvent(eventName: string, distinctId: string, properties?: UserProperties, timestamp?: number): Promise<void>;
485
+ flushEventBatch(): Promise<void>;
505
486
  identify(distinctId: string, properties?: UserProperties, email?: string, deviceId?: string): Promise<void>;
506
- startSession(distinctId: string, sessionId: string, platform?: string): Promise<{
487
+ startSession(distinctId: string, sessionId: string, platform?: string, appVersion?: string, deviceModel?: string, osVersion?: string): Promise<{
507
488
  success: boolean;
508
489
  }>;
509
490
  endSession(sessionId: string, durationSeconds: number): Promise<{
@@ -526,84 +507,6 @@ declare class ApiClient {
526
507
  private log;
527
508
  }
528
509
 
529
- declare class AffiliateManager {
530
- private apiClient;
531
- private debug;
532
- initialize(apiClient: ApiClient, debug?: boolean): void;
533
- registerCoupon(code: string): Promise<{
534
- success: boolean;
535
- coupon?: AffiliateCoupon;
536
- error?: string;
537
- }>;
538
- applyCoupon(code: string): Promise<{
539
- success: boolean;
540
- applied?: boolean;
541
- error?: string;
542
- }>;
543
- getMyCoupon(): Promise<{
544
- coupon: AffiliateCoupon | null;
545
- }>;
546
- getAppliedCoupon(): Promise<{
547
- coupon: {
548
- code: string;
549
- } | null;
550
- }>;
551
- getBalance(): Promise<AffiliateBalance>;
552
- getCommissions(): Promise<AffiliateCommission[]>;
553
- requestWithdrawal(amount: number): Promise<{
554
- success: boolean;
555
- withdrawal?: WithdrawalRequest;
556
- error?: string;
557
- }>;
558
- getWithdrawals(): Promise<WithdrawalRequest[]>;
559
- private get;
560
- private post;
561
- private ensureInitialized;
562
- private log;
563
- }
564
- declare const affiliateManager: AffiliateManager;
565
-
566
- declare const PaywalloAffiliate: {
567
- registerCoupon: (code: string) => Promise<{
568
- success: boolean;
569
- coupon?: AffiliateCoupon;
570
- error?: string;
571
- }>;
572
- applyCoupon: (code: string) => Promise<{
573
- success: boolean;
574
- applied?: boolean;
575
- error?: string;
576
- }>;
577
- getMyCoupon: () => Promise<{
578
- coupon: AffiliateCoupon | null;
579
- }>;
580
- getAppliedCoupon: () => Promise<{
581
- coupon: {
582
- code: string;
583
- } | null;
584
- }>;
585
- getBalance: () => Promise<AffiliateBalance>;
586
- getCommissions: () => Promise<AffiliateCommission[]>;
587
- requestWithdrawal: (amount: number) => Promise<{
588
- success: boolean;
589
- withdrawal?: WithdrawalRequest;
590
- error?: string;
591
- }>;
592
- getWithdrawals: () => Promise<WithdrawalRequest[]>;
593
- };
594
-
595
- declare class AffiliateError extends PaywalloError {
596
- constructor(code: string, message: string);
597
- }
598
- declare const AFFILIATE_ERROR_CODES: {
599
- readonly NOT_INITIALIZED: "AFFILIATE_NOT_INITIALIZED";
600
- readonly COUPON_REGISTER_FAILED: "AFFILIATE_COUPON_REGISTER_FAILED";
601
- readonly COUPON_APPLY_FAILED: "AFFILIATE_COUPON_APPLY_FAILED";
602
- readonly BALANCE_FETCH_FAILED: "AFFILIATE_BALANCE_FETCH_FAILED";
603
- readonly WITHDRAWAL_FAILED: "AFFILIATE_WITHDRAWAL_FAILED";
604
- readonly NETWORK_ERROR: "AFFILIATE_NETWORK_ERROR";
605
- };
606
-
607
510
  declare class IAPService {
608
511
  private productsCache;
609
512
  private apiClient;
@@ -881,6 +784,7 @@ interface IPaywalloClient {
881
784
  registerActiveChecker(checker: () => Promise<boolean>): void;
882
785
  registerRestoreHandler(handler: () => Promise<RestoreResult>): void;
883
786
  registerEmergencyPaywallHandler(handler: EmergencyPaywallHandler): void;
787
+ getEmergencyPaywall(): Promise<EmergencyPaywallResponse>;
884
788
  getSessionFlag(key: string): string | null;
885
789
  isOnline(): boolean;
886
790
  getOfflineQueueSize(): number;
@@ -983,6 +887,7 @@ declare class QueueProcessorClass {
983
887
  processed: number;
984
888
  failed: number;
985
889
  }>;
890
+ private processEventBatches;
986
891
  private processItem;
987
892
  enqueueIfOffline(method: "POST" | "PUT", url: string, body: unknown, headers?: Record<string, string>): Promise<{
988
893
  queued: boolean;
@@ -1180,4 +1085,4 @@ declare function hasVariables(text: string): boolean;
1180
1085
 
1181
1086
  declare const Paywallo: IPaywalloClient;
1182
1087
 
1183
- export { AFFILIATE_ERROR_CODES, ANALYTICS_ERROR_CODES, type AffiliateBalance, type AffiliateCommission, type AffiliateCoupon, AffiliateError, AffiliateManager, AnalyticsError, ApiClient, type ApiClientConfig, type BlockType, type BoxSpacing, CAMPAIGN_ERROR_CODES, type CachedSubscription, CampaignError, type CampaignPresentOptions, type CampaignResponse, type CampaignResult, type ConditionalFlagContext, type ConditionalFlagResult, PURCHASE_ERROR_CODES as ERROR_CODES, type Environment, type FlagVariant, HttpClient, type HttpClientConfig, type HttpResponse, type IAPProduct, type IAPPurchase, IAPService, IDENTITY_ERROR_CODES, type IPaywalloClient, type IdentifyOptions, IdentityError, IdentityManager, type IdentityState, type LocalizedText, MetaBridge, type NetworkListener, type NetworkMonitorConfig, type NetworkState, type OfflineQueueConfig, PAYWALL_ERROR_CODES, PURCHASE_ERROR_CODES, type PaywallBlockConfig, type PaywallConfig, PaywallContext, PaywallError, type PaywallErrorStrings$1 as PaywallErrorStrings, PaywallModal, type PaywallNode, type PaywallPresentOptions, type PaywallResult, type PaywallState, Paywallo, PaywalloAffiliate, PaywalloClient, type PaywalloConfig, PaywalloContext, PaywalloError, type PaywalloInitConfig, PaywalloProvider, type PaywalloProviderProps, type PreloadCampaignResult, type PreloadResult, type Product, type ProductPriceInfo, type Purchase, type PurchaseControllerConfig, PurchaseError, type PurchaseResult, type PurchaseState, type QueueEvent, type QueueItem, type QueueListener, type QueueProcessorConfig, type RequestOptions, type RestoreResult, type RetryConfig, SESSION_ERROR_CODES, type SessionConfig, SessionError, SessionManager, type SessionState, type Subscription, SubscriptionCache, type SubscriptionInfo, type SubscriptionManagerConfig, type SubscriptionPlatform, type SubscriptionStatus$1 as SubscriptionStatus, type SubscriptionStatusResponse$1 as SubscriptionStatusResponse, type TapBehavior, type TrackEventOptions, type UserProperties, type ValidatePurchaseResponse, type VariableContext, type WithdrawalRequest, affiliateManager, createPurchaseError, Paywallo as default, detectDeviceLanguage, getCurrentLanguage, getDefaultLanguage, getIAPService, getLocalizedString, hasVariables, identityManager, initLocalization, metaBridge, nativeStoreKit, networkMonitor, offlineQueue, parseVariables, queueProcessor, resolveText, sessionManager, setCurrentLanguage, setDefaultLanguage, subscriptionManager, usePaywallContext, usePaywallo, useProducts, usePurchase, useSubscription };
1088
+ export { ANALYTICS_ERROR_CODES, AnalyticsError, ApiClient, type ApiClientConfig, type BlockType, type BoxSpacing, CAMPAIGN_ERROR_CODES, type CachedSubscription, CampaignError, type CampaignPresentOptions, type CampaignResponse, type CampaignResult, type ConditionalFlagContext, type ConditionalFlagResult, PURCHASE_ERROR_CODES as ERROR_CODES, type EmergencyPaywallResponse, type Environment, type FlagVariant, HttpClient, type HttpClientConfig, type HttpResponse, type IAPProduct, type IAPPurchase, IAPService, IDENTITY_ERROR_CODES, type IPaywalloClient, type IdentifyOptions, IdentityError, IdentityManager, type IdentityState, type LocalizedText, MetaBridge, type NetworkListener, type NetworkMonitorConfig, type NetworkState, type OfflineQueueConfig, PAYWALL_ERROR_CODES, PURCHASE_ERROR_CODES, type PaywallBlockConfig, type PaywallConfig, PaywallContext, PaywallError, type PaywallErrorStrings$1 as PaywallErrorStrings, PaywallModal, type PaywallNode, type PaywallPresentOptions, type PaywallResult, type PaywallState, Paywallo, PaywalloClient, type PaywalloConfig, PaywalloContext, PaywalloError, type PaywalloInitConfig, PaywalloProvider, type PaywalloProviderProps, type PreloadCampaignResult, type PreloadResult, type Product, type ProductPriceInfo, type Purchase, type PurchaseControllerConfig, PurchaseError, type PurchaseResult, type PurchaseState, type QueueEvent, type QueueItem, type QueueListener, type QueueProcessorConfig, type RequestOptions, type RestoreResult, type RetryConfig, SESSION_ERROR_CODES, type SessionConfig, SessionError, SessionManager, type SessionState, type Subscription, SubscriptionCache, type SubscriptionInfo, type SubscriptionManagerConfig, type SubscriptionPlatform, type SubscriptionStatus$1 as SubscriptionStatus, type SubscriptionStatusResponse$1 as SubscriptionStatusResponse, type TapBehavior, type TrackEventOptions, type UserProperties, type ValidatePurchaseResponse, type VariableContext, createPurchaseError, Paywallo as default, detectDeviceLanguage, getCurrentLanguage, getDefaultLanguage, getIAPService, getLocalizedString, hasVariables, identityManager, initLocalization, metaBridge, nativeStoreKit, networkMonitor, offlineQueue, parseVariables, queueProcessor, resolveText, sessionManager, setCurrentLanguage, setDefaultLanguage, subscriptionManager, usePaywallContext, usePaywallo, useProducts, usePurchase, useSubscription };