pulse-updates 1.2.4 → 1.3.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.
- package/README.md +55 -4
- package/android/build.gradle +1 -0
- package/android/consumer-rules.pro +21 -0
- package/android/src/main/java/app/pulse/updates/PulseUpdatesPackage.kt +5 -1
- package/android/src/main/java/app/pulse/updates/attribution/DeferredHandoffReferrerParser.kt +47 -0
- package/android/src/main/java/app/pulse/updates/attribution/InstallReferrerReflection.kt +155 -0
- package/android/src/main/java/app/pulse/updates/attribution/PulseAttributionModule.kt +229 -0
- package/ios/PulseAttribution/PulseAttribution.m +29 -0
- package/ios/PulseAttribution/PulseDeferredLinkPasteButtonComponentView.h +13 -0
- package/ios/PulseAttribution/PulseDeferredLinkPasteButtonComponentView.mm +81 -0
- package/ios/PulseAttribution/PulseDeferredLinkPasteButtonManager.m +28 -0
- package/ios/PulseAttribution/PulseDeferredLinkPasteView.h +21 -0
- package/ios/PulseAttribution/PulseDeferredLinkPasteView.m +231 -0
- package/lib/commonjs/DeferredLinkPasteButton.js +64 -0
- package/lib/commonjs/DeferredLinkPasteButton.js.map +1 -0
- package/lib/commonjs/NativePulseAttribution.js +13 -0
- package/lib/commonjs/NativePulseAttribution.js.map +1 -0
- package/lib/commonjs/PulseDeferredLinkPasteButtonNativeComponent.js +13 -0
- package/lib/commonjs/PulseDeferredLinkPasteButtonNativeComponent.js.map +1 -0
- package/lib/commonjs/decisions.js +5 -0
- package/lib/commonjs/decisions.js.map +1 -1
- package/lib/commonjs/index.js +33 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/links.js +944 -0
- package/lib/commonjs/links.js.map +1 -0
- package/lib/commonjs/nativeAttribution.js +29 -0
- package/lib/commonjs/nativeAttribution.js.map +1 -0
- package/lib/module/DeferredLinkPasteButton.js +56 -0
- package/lib/module/DeferredLinkPasteButton.js.map +1 -0
- package/lib/module/NativePulseAttribution.js +9 -0
- package/lib/module/NativePulseAttribution.js.map +1 -0
- package/lib/module/PulseDeferredLinkPasteButtonNativeComponent.js +7 -0
- package/lib/module/PulseDeferredLinkPasteButtonNativeComponent.js.map +1 -0
- package/lib/module/decisions.js +5 -0
- package/lib/module/decisions.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/links.js +933 -0
- package/lib/module/links.js.map +1 -0
- package/lib/module/nativeAttribution.js +21 -0
- package/lib/module/nativeAttribution.js.map +1 -0
- package/lib/typescript/DeferredLinkPasteButton.d.ts +22 -0
- package/lib/typescript/DeferredLinkPasteButton.d.ts.map +1 -0
- package/lib/typescript/NativePulseAttribution.d.ts +11 -0
- package/lib/typescript/NativePulseAttribution.d.ts.map +1 -0
- package/lib/typescript/PulseDeferredLinkPasteButtonNativeComponent.d.ts +16 -0
- package/lib/typescript/PulseDeferredLinkPasteButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/decisions.d.ts +6 -0
- package/lib/typescript/decisions.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/links.d.ts +142 -0
- package/lib/typescript/links.d.ts.map +1 -0
- package/lib/typescript/nativeAttribution.d.ts +9 -0
- package/lib/typescript/nativeAttribution.d.ts.map +1 -0
- package/package.json +17 -2
- package/pulse-updates.podspec +8 -2
- package/scripts/publish.mjs +5 -0
- package/src/DeferredLinkPasteButton.tsx +98 -0
- package/src/NativePulseAttribution.ts +12 -0
- package/src/PulseDeferredLinkPasteButtonNativeComponent.ts +18 -0
- package/src/decisions.ts +12 -0
- package/src/index.ts +4 -0
- package/src/links.ts +1232 -0
- package/src/nativeAttribution.ts +25 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import NativePulseAttribution from './NativePulseAttribution';
|
|
2
|
+
import type {
|
|
3
|
+
AndroidInstallReferrerBridge,
|
|
4
|
+
AndroidInstallReferrerResult,
|
|
5
|
+
DeferredLinkClient,
|
|
6
|
+
} from './links';
|
|
7
|
+
|
|
8
|
+
/** Returns null when the installed binary predates Pulse Links. Never use getEnforcing here. */
|
|
9
|
+
export function getPulseAttributionBridge(): AndroidInstallReferrerBridge | null {
|
|
10
|
+
return NativePulseAttribution;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Reads Play Install Referrer through the optional native bridge and captures a valid handoff.
|
|
15
|
+
* The native module returns FEATURE_NOT_SUPPORTED when the store-specific Google library is absent.
|
|
16
|
+
*/
|
|
17
|
+
export async function recoverAndroidInstallReferrer(
|
|
18
|
+
client: DeferredLinkClient,
|
|
19
|
+
bridge: AndroidInstallReferrerBridge | null = getPulseAttributionBridge(),
|
|
20
|
+
): Promise<AndroidInstallReferrerResult> {
|
|
21
|
+
if (!bridge) {
|
|
22
|
+
return { status: 'FEATURE_NOT_SUPPORTED', retryable: false, attempts: 0 };
|
|
23
|
+
}
|
|
24
|
+
return client.captureAndroidInstallReferrer(bridge);
|
|
25
|
+
}
|