@virex-tech/paywallo-sdk 2.2.6 → 2.2.7

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.
package/dist/index.d.mts CHANGED
@@ -314,6 +314,14 @@ interface PaywalloConfig {
314
314
  * or `DeviceInfo.getVersion()` (bare RN) here.
315
315
  */
316
316
  appVersion?: string;
317
+ /**
318
+ * Placements de paywall a serem pré-carregados (config + produtos) em
319
+ * background logo após o init. Quando `presentPaywall` é chamado com
320
+ * um placement preloadado, a apresentação pula o round-trip de
321
+ * `getPaywall` + `loadProducts` e fica quase instantânea.
322
+ * TTL: 5 minutos em memória, com stale-while-revalidate.
323
+ */
324
+ preloadPaywalls?: string[];
317
325
  }
318
326
  interface UserProperties {
319
327
  [key: string]: string | number | boolean | null;
@@ -1090,6 +1098,10 @@ interface PreloadCampaignResult {
1090
1098
  success: boolean;
1091
1099
  error?: Error;
1092
1100
  }
1101
+ interface PreloadPaywallResult {
1102
+ success: boolean;
1103
+ error?: Error;
1104
+ }
1093
1105
  interface PaywallErrorStrings {
1094
1106
  title?: string;
1095
1107
  retry?: string;
@@ -1133,6 +1145,9 @@ interface IPaywalloClient {
1133
1145
  gateContentWithCampaign<T>(content: () => T | Promise<T>, placement: string, context?: Record<string, unknown>): Promise<T | null>;
1134
1146
  preloadCampaign(placement: string, context?: Record<string, unknown>): Promise<PreloadCampaignResult>;
1135
1147
  getPreloadedCampaign(placement: string): CampaignResponse | null;
1148
+ preloadPaywall(placement: string): Promise<PreloadPaywallResult>;
1149
+ preloadPaywalls(placements: string[]): Promise<void>;
1150
+ isPaywallPreloaded(placement: string): boolean;
1136
1151
  reset(): Promise<void>;
1137
1152
  fullReset(): Promise<void>;
1138
1153
  requestPushPermission(options?: {
package/dist/index.d.ts CHANGED
@@ -314,6 +314,14 @@ interface PaywalloConfig {
314
314
  * or `DeviceInfo.getVersion()` (bare RN) here.
315
315
  */
316
316
  appVersion?: string;
317
+ /**
318
+ * Placements de paywall a serem pré-carregados (config + produtos) em
319
+ * background logo após o init. Quando `presentPaywall` é chamado com
320
+ * um placement preloadado, a apresentação pula o round-trip de
321
+ * `getPaywall` + `loadProducts` e fica quase instantânea.
322
+ * TTL: 5 minutos em memória, com stale-while-revalidate.
323
+ */
324
+ preloadPaywalls?: string[];
317
325
  }
318
326
  interface UserProperties {
319
327
  [key: string]: string | number | boolean | null;
@@ -1090,6 +1098,10 @@ interface PreloadCampaignResult {
1090
1098
  success: boolean;
1091
1099
  error?: Error;
1092
1100
  }
1101
+ interface PreloadPaywallResult {
1102
+ success: boolean;
1103
+ error?: Error;
1104
+ }
1093
1105
  interface PaywallErrorStrings {
1094
1106
  title?: string;
1095
1107
  retry?: string;
@@ -1133,6 +1145,9 @@ interface IPaywalloClient {
1133
1145
  gateContentWithCampaign<T>(content: () => T | Promise<T>, placement: string, context?: Record<string, unknown>): Promise<T | null>;
1134
1146
  preloadCampaign(placement: string, context?: Record<string, unknown>): Promise<PreloadCampaignResult>;
1135
1147
  getPreloadedCampaign(placement: string): CampaignResponse | null;
1148
+ preloadPaywall(placement: string): Promise<PreloadPaywallResult>;
1149
+ preloadPaywalls(placements: string[]): Promise<void>;
1150
+ isPaywallPreloaded(placement: string): boolean;
1136
1151
  reset(): Promise<void>;
1137
1152
  fullReset(): Promise<void>;
1138
1153
  requestPushPermission(options?: {