@tryheliumai/paywall-sdk-react-native 0.2.22 → 3.0.5
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/PaywallSdkReactNative.podspec +2 -2
- package/ios/HeliumSwiftInterface.swift +163 -76
- package/ios/RCTHeliumBridge.m +5 -0
- package/lib/commonjs/handlers/revenuecat.js +7 -3
- package/lib/commonjs/handlers/revenuecat.js.map +1 -1
- package/lib/commonjs/index.js +2 -14
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-interface.js +133 -182
- package/lib/commonjs/native-interface.js.map +1 -1
- package/lib/commonjs/types.js +4 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/handlers/revenuecat.js +8 -3
- package/lib/module/handlers/revenuecat.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-interface.js +132 -178
- package/lib/module/native-interface.js.map +1 -1
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/commonjs/src/handlers/revenuecat.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/native-interface.d.ts +3 -21
- package/lib/typescript/commonjs/src/native-interface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types.d.ts +107 -6
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
- package/lib/typescript/module/src/handlers/revenuecat.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/native-interface.d.ts +3 -21
- package/lib/typescript/module/src/native-interface.d.ts.map +1 -1
- package/lib/typescript/module/src/types.d.ts +107 -6
- package/lib/typescript/module/src/types.d.ts.map +1 -1
- package/package.json +1 -9
- package/src/handlers/revenuecat.ts +7 -3
- package/src/index.ts +10 -3
- package/src/native-interface.tsx +172 -191
- package/src/types.ts +147 -9
|
@@ -8,23 +8,124 @@ export type HeliumDownloadStatus = 'success' | 'failed' | 'inProgress' | 'notSta
|
|
|
8
8
|
export interface HeliumPurchaseConfig {
|
|
9
9
|
makePurchase: (productId: string) => Promise<HeliumPurchaseResult>;
|
|
10
10
|
restorePurchases: () => Promise<boolean>;
|
|
11
|
-
/** Optional RevenueCat API Key. If not provided, RevenueCat must be configured elsewhere. */
|
|
12
|
-
apiKey?: string;
|
|
13
11
|
}
|
|
14
12
|
export declare function createCustomPurchaseConfig(callbacks: {
|
|
15
13
|
makePurchase: (productId: string) => Promise<HeliumPurchaseResult>;
|
|
16
14
|
restorePurchases: () => Promise<boolean>;
|
|
17
15
|
}): HeliumPurchaseConfig;
|
|
16
|
+
export type TriggerLoadingConfig = {
|
|
17
|
+
/** Whether to show loading state for this trigger. Set to nil to use the global `useLoadingState` setting. */
|
|
18
|
+
useLoadingState?: boolean;
|
|
19
|
+
/** Maximum seconds to show loading for this trigger. Set to nil to use the global `loadingBudget` setting. */
|
|
20
|
+
loadingBudget?: number;
|
|
21
|
+
};
|
|
22
|
+
export type HeliumPaywallLoadingConfig = {
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show a loading state while fetching paywall configuration.
|
|
25
|
+
* When true, shows a loading view for up to `loadingBudget` seconds before falling back.
|
|
26
|
+
* Default: true
|
|
27
|
+
*/
|
|
28
|
+
useLoadingState?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum time (in seconds) to show the loading state before displaying fallback.
|
|
31
|
+
* After this timeout, the fallback view will be shown even if the paywall is still downloading.
|
|
32
|
+
* Default: 2.0 seconds
|
|
33
|
+
*/
|
|
34
|
+
loadingBudget?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Optional per-trigger loading configuration overrides.
|
|
37
|
+
* Use this to customize loading behavior for specific triggers.
|
|
38
|
+
* Keys are trigger names, values are TriggerLoadingConfig instances.
|
|
39
|
+
* Example: Disable loading for "onboarding" trigger while keeping it for others.
|
|
40
|
+
*/
|
|
41
|
+
perTriggerLoadingConfig?: Record<string, TriggerLoadingConfig>;
|
|
42
|
+
};
|
|
43
|
+
export interface PaywallEventHandlers {
|
|
44
|
+
onOpen?: (event: PaywallOpenEvent) => void;
|
|
45
|
+
onClose?: (event: PaywallCloseEvent) => void;
|
|
46
|
+
onDismissed?: (event: PaywallDismissedEvent) => void;
|
|
47
|
+
onPurchaseSucceeded?: (event: PurchaseSucceededEvent) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface PaywallOpenEvent {
|
|
50
|
+
type: 'paywallOpen';
|
|
51
|
+
triggerName: string;
|
|
52
|
+
paywallName: string;
|
|
53
|
+
isSecondTry: boolean;
|
|
54
|
+
viewType?: 'presented' | 'embedded' | 'triggered';
|
|
55
|
+
}
|
|
56
|
+
export interface PaywallCloseEvent {
|
|
57
|
+
type: 'paywallClose';
|
|
58
|
+
triggerName: string;
|
|
59
|
+
paywallName: string;
|
|
60
|
+
isSecondTry: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface PaywallDismissedEvent {
|
|
63
|
+
type: 'paywallDismissed';
|
|
64
|
+
triggerName: string;
|
|
65
|
+
paywallName: string;
|
|
66
|
+
isSecondTry: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface PurchaseSucceededEvent {
|
|
69
|
+
type: 'purchaseSucceeded';
|
|
70
|
+
productId: string;
|
|
71
|
+
triggerName: string;
|
|
72
|
+
paywallName: string;
|
|
73
|
+
isSecondTry: boolean;
|
|
74
|
+
}
|
|
75
|
+
export type HeliumPaywallEvent = {
|
|
76
|
+
type: 'paywallOpen' | 'paywallClose' | 'paywallDismissed' | 'paywallOpenFailed' | 'paywallSkipped' | 'paywallButtonPressed' | 'productSelected' | 'purchasePressed' | 'purchaseSucceeded' | 'purchaseCancelled' | 'purchaseFailed' | 'purchaseRestored' | 'purchaseRestoreFailed' | 'purchasePending' | 'initializeStart' | 'paywallsDownloadSuccess' | 'paywallsDownloadError' | 'paywallWebViewRendered';
|
|
77
|
+
triggerName?: string;
|
|
78
|
+
paywallName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `paywallName` instead.
|
|
81
|
+
*/
|
|
82
|
+
paywallTemplateName?: string;
|
|
83
|
+
productId?: string;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated Use `productId` instead.
|
|
86
|
+
*/
|
|
87
|
+
productKey?: string;
|
|
88
|
+
buttonName?: string;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated Use `buttonName` instead.
|
|
91
|
+
*/
|
|
92
|
+
ctaName?: string;
|
|
93
|
+
paywallDownloadTimeTakenMS?: number;
|
|
94
|
+
templateDownloadTimeTakenMS?: number;
|
|
95
|
+
imagesDownloadTimeTakenMS?: number;
|
|
96
|
+
stylesDownloadTimeTakenMS?: number;
|
|
97
|
+
fontsDownloadTimeTakenMS?: number;
|
|
98
|
+
bundleDownloadTimeMS?: number;
|
|
99
|
+
dismissAll?: boolean;
|
|
100
|
+
isSecondTry?: boolean;
|
|
101
|
+
error?: string;
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated Use `error` instead.
|
|
104
|
+
*/
|
|
105
|
+
errorDescription?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Unix timestamp in seconds
|
|
108
|
+
*/
|
|
109
|
+
timestamp?: number;
|
|
110
|
+
};
|
|
111
|
+
export type PresentUpsellParams = {
|
|
112
|
+
triggerName: string;
|
|
113
|
+
/** Optional. This will be called when paywall fails to show due to an unsuccessful paywall download or if an invalid trigger is provided. */
|
|
114
|
+
onFallback?: () => void;
|
|
115
|
+
eventHandlers?: PaywallEventHandlers;
|
|
116
|
+
customPaywallTraits?: Record<string, any>;
|
|
117
|
+
};
|
|
18
118
|
export interface HeliumConfig {
|
|
19
119
|
/** Your Helium API Key */
|
|
20
120
|
apiKey: string;
|
|
21
121
|
/** Configuration for handling purchases. Can be custom functions or a pre-built handler config. */
|
|
22
|
-
purchaseConfig
|
|
122
|
+
purchaseConfig?: HeliumPurchaseConfig;
|
|
23
123
|
/** Callback for receiving all Helium paywall events. */
|
|
24
|
-
onHeliumPaywallEvent: (event:
|
|
25
|
-
|
|
124
|
+
onHeliumPaywallEvent: (event: HeliumPaywallEvent) => void;
|
|
125
|
+
/** Fallback bundle in the rare situation that paywall is not ready to be shown. Highly recommended. See docs at https://docs.tryhelium.com/guides/fallback-bundle#react-native */
|
|
26
126
|
fallbackBundle?: object;
|
|
27
|
-
|
|
127
|
+
/** Configure loading behavior for paywalls that are mid-download. */
|
|
128
|
+
paywallLoadingConfig?: HeliumPaywallLoadingConfig;
|
|
28
129
|
customUserId?: string;
|
|
29
130
|
customAPIEndpoint?: string;
|
|
30
131
|
customUserTraits?: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,QAAQ,GACR,WAAW,GACX,SAAS,GACT,UAAU,CAAC;AACf,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,YAAY,CAAC;AAIjB,8DAA8D;AAE9D,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACnE,gBAAgB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAC1C;AAGD,wBAAgB,0BAA0B,CAAC,SAAS,EAAE;IACpD,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC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M,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,6IAA6I;IAC7I,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC3C,CAAC;AAGF,MAAM,WAAW,YAAY;IAC3B,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,mGAAmG;IACnG,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,wDAAwD;IACxD,oBAAoB,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAG1D,kLAAkL;IAClL,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAID,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED,MAAM,WAAW,WAAW;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revenuecat.d.ts","sourceRoot":"","sources":["../../../../../src/handlers/revenuecat.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"revenuecat.d.ts","sourceRoot":"","sources":["../../../../../src/handlers/revenuecat.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAW3E,wBAAgB,8BAA8B,CAAC,MAAM,CAAC,EAAE;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,oBAAoB,CAMvB;AAED,qBAAa,uBAAuB;IAChC,OAAO,CAAC,yBAAyB,CAAwC;IACzE,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,OAAO,CAAC,qBAAqB,CAA8B;IAE3D,OAAO,CAAC,yBAAyB,CAA6C;gBAElE,MAAM,CAAC,EAAE,MAAM;YAOb,wBAAwB;YA4BxB,wBAAwB;IAQhC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiFpE,OAAO,CAAC,eAAe;IAMjB,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC;CAS7C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { createCustomPurchaseConfig } from './types';
|
|
2
|
-
export {
|
|
3
|
-
export type { HeliumTransactionStatus, HeliumConfig, HeliumUpsellViewProps, } from './types';
|
|
2
|
+
export { initialize, presentUpsell, hideUpsell, hideAllUpsells, getPaywallInfo, handleDeepLink, setRevenueCatAppUserId, HELIUM_CTA_NAMES, NativeHeliumUpsellView, } from './native-interface';
|
|
3
|
+
export type { HeliumTransactionStatus, HeliumConfig, HeliumUpsellViewProps, HeliumPaywallLoadingConfig, TriggerLoadingConfig, PaywallEventHandlers, PaywallOpenEvent, PaywallCloseEvent, PaywallDismissedEvent, PurchaseSucceededEvent, HeliumPaywallEvent, PresentUpsellParams, } from './types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,EACL,UAAU,EACV,aAAa,EACb,UAAU,EACV,cAAc,EACd,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,uBAAuB,EACvB,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,EAC1B,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,SAAS,CAAC"}
|
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { HeliumConfig, HeliumUpsellViewProps, HeliumDownloadStatus, PaywallInfo } from './types';
|
|
1
|
+
import type { HeliumConfig, HeliumUpsellViewProps, HeliumDownloadStatus, PaywallInfo, PresentUpsellParams } from './types';
|
|
3
2
|
export declare const NativeHeliumUpsellView: import("react-native").HostComponent<HeliumUpsellViewProps>;
|
|
4
3
|
export declare const getDownloadStatus: () => HeliumDownloadStatus;
|
|
5
|
-
interface HeliumContextType {
|
|
6
|
-
downloadStatus: HeliumDownloadStatus;
|
|
7
|
-
setDownloadStatus: (status: HeliumDownloadStatus) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const useHelium: () => HeliumContextType;
|
|
10
|
-
interface HeliumProviderProps {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
fallbackView?: React.ComponentType;
|
|
13
|
-
}
|
|
14
|
-
export declare const HeliumProvider: ({ children, fallbackView }: HeliumProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
4
|
export declare const initialize: (config: HeliumConfig) => Promise<void>;
|
|
16
|
-
export declare const presentUpsell: ({ triggerName, onFallback, }:
|
|
17
|
-
triggerName: string;
|
|
18
|
-
onFallback?: () => void;
|
|
19
|
-
}) => void;
|
|
5
|
+
export declare const presentUpsell: ({ triggerName, onFallback, eventHandlers, customPaywallTraits, }: PresentUpsellParams) => void;
|
|
20
6
|
export declare const hideUpsell: () => void;
|
|
21
7
|
export declare const hideAllUpsells: () => void;
|
|
22
8
|
export declare const getPaywallInfo: (trigger: string) => Promise<PaywallInfo | undefined>;
|
|
23
9
|
export declare const handleDeepLink: (url: string | null) => Promise<boolean>;
|
|
24
|
-
export declare const
|
|
25
|
-
fallbackViewProps?: Record<string, any>;
|
|
26
|
-
fallbackViewWrapperStyles?: Record<string, any>;
|
|
27
|
-
}>;
|
|
10
|
+
export declare const setRevenueCatAppUserId: (rcAppUserId: string) => void;
|
|
28
11
|
export declare const HELIUM_CTA_NAMES: {
|
|
29
12
|
SCHEDULE_CALL: string;
|
|
30
13
|
SUBSCRIBE_BUTTON: string;
|
|
31
14
|
};
|
|
32
|
-
export {};
|
|
33
15
|
//# sourceMappingURL=native-interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-interface.d.ts","sourceRoot":"","sources":["../../../../src/native-interface.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native-interface.d.ts","sourceRoot":"","sources":["../../../../src/native-interface.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EAGpB,MAAM,SAAS,CAAC;AAMjB,eAAO,MAAM,sBAAsB,6DACgC,CAAC;AAMpE,eAAO,MAAM,iBAAiB,4BAA6B,CAAC;AAM5D,eAAO,MAAM,UAAU,WAAkB,YAAY,kBA0HpD,CAAC;AAIF,eAAO,MAAM,aAAa,qEAKvB,mBAAmB,SA6BrB,CAAC;AA+DF,eAAO,MAAM,UAAU,YAEtB,CAAC;AAEF,eAAO,MAAM,cAAc,YAE1B,CAAC;AAEF,eAAO,MAAM,cAAc,YAChB,MAAM,KACd,OAAO,CAAC,WAAW,GAAG,SAAS,CAiBjC,CAAC;AAEF,eAAO,MAAM,cAAc,QAAe,MAAM,GAAG,IAAI,KAAG,OAAO,CAAC,OAAO,CAWxE,CAAC;AAEF,eAAO,MAAM,sBAAsB,gBAAiB,MAAM,SAEzD,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC"}
|
|
@@ -8,23 +8,124 @@ export type HeliumDownloadStatus = 'success' | 'failed' | 'inProgress' | 'notSta
|
|
|
8
8
|
export interface HeliumPurchaseConfig {
|
|
9
9
|
makePurchase: (productId: string) => Promise<HeliumPurchaseResult>;
|
|
10
10
|
restorePurchases: () => Promise<boolean>;
|
|
11
|
-
/** Optional RevenueCat API Key. If not provided, RevenueCat must be configured elsewhere. */
|
|
12
|
-
apiKey?: string;
|
|
13
11
|
}
|
|
14
12
|
export declare function createCustomPurchaseConfig(callbacks: {
|
|
15
13
|
makePurchase: (productId: string) => Promise<HeliumPurchaseResult>;
|
|
16
14
|
restorePurchases: () => Promise<boolean>;
|
|
17
15
|
}): HeliumPurchaseConfig;
|
|
16
|
+
export type TriggerLoadingConfig = {
|
|
17
|
+
/** Whether to show loading state for this trigger. Set to nil to use the global `useLoadingState` setting. */
|
|
18
|
+
useLoadingState?: boolean;
|
|
19
|
+
/** Maximum seconds to show loading for this trigger. Set to nil to use the global `loadingBudget` setting. */
|
|
20
|
+
loadingBudget?: number;
|
|
21
|
+
};
|
|
22
|
+
export type HeliumPaywallLoadingConfig = {
|
|
23
|
+
/**
|
|
24
|
+
* Whether to show a loading state while fetching paywall configuration.
|
|
25
|
+
* When true, shows a loading view for up to `loadingBudget` seconds before falling back.
|
|
26
|
+
* Default: true
|
|
27
|
+
*/
|
|
28
|
+
useLoadingState?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum time (in seconds) to show the loading state before displaying fallback.
|
|
31
|
+
* After this timeout, the fallback view will be shown even if the paywall is still downloading.
|
|
32
|
+
* Default: 2.0 seconds
|
|
33
|
+
*/
|
|
34
|
+
loadingBudget?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Optional per-trigger loading configuration overrides.
|
|
37
|
+
* Use this to customize loading behavior for specific triggers.
|
|
38
|
+
* Keys are trigger names, values are TriggerLoadingConfig instances.
|
|
39
|
+
* Example: Disable loading for "onboarding" trigger while keeping it for others.
|
|
40
|
+
*/
|
|
41
|
+
perTriggerLoadingConfig?: Record<string, TriggerLoadingConfig>;
|
|
42
|
+
};
|
|
43
|
+
export interface PaywallEventHandlers {
|
|
44
|
+
onOpen?: (event: PaywallOpenEvent) => void;
|
|
45
|
+
onClose?: (event: PaywallCloseEvent) => void;
|
|
46
|
+
onDismissed?: (event: PaywallDismissedEvent) => void;
|
|
47
|
+
onPurchaseSucceeded?: (event: PurchaseSucceededEvent) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface PaywallOpenEvent {
|
|
50
|
+
type: 'paywallOpen';
|
|
51
|
+
triggerName: string;
|
|
52
|
+
paywallName: string;
|
|
53
|
+
isSecondTry: boolean;
|
|
54
|
+
viewType?: 'presented' | 'embedded' | 'triggered';
|
|
55
|
+
}
|
|
56
|
+
export interface PaywallCloseEvent {
|
|
57
|
+
type: 'paywallClose';
|
|
58
|
+
triggerName: string;
|
|
59
|
+
paywallName: string;
|
|
60
|
+
isSecondTry: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface PaywallDismissedEvent {
|
|
63
|
+
type: 'paywallDismissed';
|
|
64
|
+
triggerName: string;
|
|
65
|
+
paywallName: string;
|
|
66
|
+
isSecondTry: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface PurchaseSucceededEvent {
|
|
69
|
+
type: 'purchaseSucceeded';
|
|
70
|
+
productId: string;
|
|
71
|
+
triggerName: string;
|
|
72
|
+
paywallName: string;
|
|
73
|
+
isSecondTry: boolean;
|
|
74
|
+
}
|
|
75
|
+
export type HeliumPaywallEvent = {
|
|
76
|
+
type: 'paywallOpen' | 'paywallClose' | 'paywallDismissed' | 'paywallOpenFailed' | 'paywallSkipped' | 'paywallButtonPressed' | 'productSelected' | 'purchasePressed' | 'purchaseSucceeded' | 'purchaseCancelled' | 'purchaseFailed' | 'purchaseRestored' | 'purchaseRestoreFailed' | 'purchasePending' | 'initializeStart' | 'paywallsDownloadSuccess' | 'paywallsDownloadError' | 'paywallWebViewRendered';
|
|
77
|
+
triggerName?: string;
|
|
78
|
+
paywallName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Use `paywallName` instead.
|
|
81
|
+
*/
|
|
82
|
+
paywallTemplateName?: string;
|
|
83
|
+
productId?: string;
|
|
84
|
+
/**
|
|
85
|
+
* @deprecated Use `productId` instead.
|
|
86
|
+
*/
|
|
87
|
+
productKey?: string;
|
|
88
|
+
buttonName?: string;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated Use `buttonName` instead.
|
|
91
|
+
*/
|
|
92
|
+
ctaName?: string;
|
|
93
|
+
paywallDownloadTimeTakenMS?: number;
|
|
94
|
+
templateDownloadTimeTakenMS?: number;
|
|
95
|
+
imagesDownloadTimeTakenMS?: number;
|
|
96
|
+
stylesDownloadTimeTakenMS?: number;
|
|
97
|
+
fontsDownloadTimeTakenMS?: number;
|
|
98
|
+
bundleDownloadTimeMS?: number;
|
|
99
|
+
dismissAll?: boolean;
|
|
100
|
+
isSecondTry?: boolean;
|
|
101
|
+
error?: string;
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated Use `error` instead.
|
|
104
|
+
*/
|
|
105
|
+
errorDescription?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Unix timestamp in seconds
|
|
108
|
+
*/
|
|
109
|
+
timestamp?: number;
|
|
110
|
+
};
|
|
111
|
+
export type PresentUpsellParams = {
|
|
112
|
+
triggerName: string;
|
|
113
|
+
/** Optional. This will be called when paywall fails to show due to an unsuccessful paywall download or if an invalid trigger is provided. */
|
|
114
|
+
onFallback?: () => void;
|
|
115
|
+
eventHandlers?: PaywallEventHandlers;
|
|
116
|
+
customPaywallTraits?: Record<string, any>;
|
|
117
|
+
};
|
|
18
118
|
export interface HeliumConfig {
|
|
19
119
|
/** Your Helium API Key */
|
|
20
120
|
apiKey: string;
|
|
21
121
|
/** Configuration for handling purchases. Can be custom functions or a pre-built handler config. */
|
|
22
|
-
purchaseConfig
|
|
122
|
+
purchaseConfig?: HeliumPurchaseConfig;
|
|
23
123
|
/** Callback for receiving all Helium paywall events. */
|
|
24
|
-
onHeliumPaywallEvent: (event:
|
|
25
|
-
|
|
124
|
+
onHeliumPaywallEvent: (event: HeliumPaywallEvent) => void;
|
|
125
|
+
/** Fallback bundle in the rare situation that paywall is not ready to be shown. Highly recommended. See docs at https://docs.tryhelium.com/guides/fallback-bundle#react-native */
|
|
26
126
|
fallbackBundle?: object;
|
|
27
|
-
|
|
127
|
+
/** Configure loading behavior for paywalls that are mid-download. */
|
|
128
|
+
paywallLoadingConfig?: HeliumPaywallLoadingConfig;
|
|
28
129
|
customUserId?: string;
|
|
29
130
|
customAPIEndpoint?: string;
|
|
30
131
|
customUserTraits?: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,uBAAuB,GAC/B,WAAW,GACX,QAAQ,GACR,WAAW,GACX,SAAS,GACT,UAAU,CAAC;AACf,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,YAAY,CAAC;AAIjB,8DAA8D;AAE9D,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,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O,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryheliumai/paywall-sdk-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Paywall SDK Helium",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -72,13 +72,10 @@
|
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@commitlint/config-conventional": "^17.0.2",
|
|
76
|
-
"@evilmartians/lefthook": "^1.5.0",
|
|
77
75
|
"@react-native/eslint-config": "^0.73.1",
|
|
78
76
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
79
77
|
"@types/jest": "^29.5.5",
|
|
80
78
|
"@types/react": "^18.2.44",
|
|
81
|
-
"commitlint": "^17.0.2",
|
|
82
79
|
"del-cli": "^5.1.0",
|
|
83
80
|
"eslint": "^8.51.0",
|
|
84
81
|
"eslint-config-prettier": "^9.0.0",
|
|
@@ -121,11 +118,6 @@
|
|
|
121
118
|
"<rootDir>/lib/"
|
|
122
119
|
]
|
|
123
120
|
},
|
|
124
|
-
"commitlint": {
|
|
125
|
-
"extends": [
|
|
126
|
-
"@commitlint/config-conventional"
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
121
|
"eslintConfig": {
|
|
130
122
|
"root": true,
|
|
131
123
|
"extends": [
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
CustomerInfo,
|
|
11
11
|
PurchasesEntitlementInfo,
|
|
12
12
|
} from 'react-native-purchases';
|
|
13
|
+
import { setRevenueCatAppUserId } from '@tryheliumai/paywall-sdk-react-native';
|
|
13
14
|
|
|
14
15
|
// Rename the factory function
|
|
15
16
|
export function createRevenueCatPurchaseConfig(config?: {
|
|
@@ -17,7 +18,6 @@ export function createRevenueCatPurchaseConfig(config?: {
|
|
|
17
18
|
}): HeliumPurchaseConfig {
|
|
18
19
|
const rcHandler = new RevenueCatHeliumHandler(config?.apiKey);
|
|
19
20
|
return {
|
|
20
|
-
apiKey: config?.apiKey,
|
|
21
21
|
makePurchase: rcHandler.makePurchase.bind(rcHandler),
|
|
22
22
|
restorePurchases: rcHandler.restorePurchases.bind(rcHandler),
|
|
23
23
|
};
|
|
@@ -33,9 +33,8 @@ export class RevenueCatHeliumHandler {
|
|
|
33
33
|
constructor(apiKey?: string) {
|
|
34
34
|
if (apiKey) {
|
|
35
35
|
Purchases.configure({ apiKey });
|
|
36
|
-
} else {
|
|
37
36
|
}
|
|
38
|
-
this.initializePackageMapping();
|
|
37
|
+
void this.initializePackageMapping();
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
private async initializePackageMapping(): Promise<void> {
|
|
@@ -44,6 +43,9 @@ export class RevenueCatHeliumHandler {
|
|
|
44
43
|
}
|
|
45
44
|
this.initializationPromise = (async () => {
|
|
46
45
|
try {
|
|
46
|
+
// Keep this value as up-to-date as possible
|
|
47
|
+
setRevenueCatAppUserId(await Purchases.getAppUserID());
|
|
48
|
+
|
|
47
49
|
const offerings = await Purchases.getOfferings();
|
|
48
50
|
const allOfferings = offerings.all;
|
|
49
51
|
for (const offering of Object.values(allOfferings)) {
|
|
@@ -73,6 +75,8 @@ export class RevenueCatHeliumHandler {
|
|
|
73
75
|
|
|
74
76
|
async makePurchase(productId: string): Promise<HeliumPurchaseResult> {
|
|
75
77
|
await this.ensureMappingInitialized();
|
|
78
|
+
// Keep this value as up-to-date as possible
|
|
79
|
+
setRevenueCatAppUserId(await Purchases.getAppUserID());
|
|
76
80
|
|
|
77
81
|
const pkg: PurchasesPackage | undefined = this.productIdToPackageMapping[productId];
|
|
78
82
|
let rcProduct: PurchasesStoreProduct | undefined;
|
package/src/index.ts
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
export { createCustomPurchaseConfig } from './types';
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
HeliumProvider,
|
|
5
4
|
initialize,
|
|
6
5
|
presentUpsell,
|
|
7
6
|
hideUpsell,
|
|
8
7
|
hideAllUpsells,
|
|
9
8
|
getPaywallInfo,
|
|
10
9
|
handleDeepLink,
|
|
11
|
-
|
|
10
|
+
setRevenueCatAppUserId,
|
|
12
11
|
HELIUM_CTA_NAMES,
|
|
13
|
-
useHelium,
|
|
14
12
|
NativeHeliumUpsellView,
|
|
15
13
|
} from './native-interface';
|
|
16
14
|
|
|
@@ -18,4 +16,13 @@ export type {
|
|
|
18
16
|
HeliumTransactionStatus,
|
|
19
17
|
HeliumConfig,
|
|
20
18
|
HeliumUpsellViewProps,
|
|
19
|
+
HeliumPaywallLoadingConfig,
|
|
20
|
+
TriggerLoadingConfig,
|
|
21
|
+
PaywallEventHandlers,
|
|
22
|
+
PaywallOpenEvent,
|
|
23
|
+
PaywallCloseEvent,
|
|
24
|
+
PaywallDismissedEvent,
|
|
25
|
+
PurchaseSucceededEvent,
|
|
26
|
+
HeliumPaywallEvent,
|
|
27
|
+
PresentUpsellParams,
|
|
21
28
|
} from './types';
|