@adshift/react-native-plugin 2.0.0 → 3.0.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/AdShiftReactNativePlugin.podspec +1 -1
- package/CHANGELOG.md +53 -1
- package/README.md +106 -50
- package/android/build.gradle +3 -1
- package/android/src/main/AndroidManifest.xml +14 -1
- package/android/src/main/java/com/adshift/reactnativeplugin/AdShiftReactNativePluginModule.kt +12 -1
- package/android/src/main/java/com/adshift/reactnativeplugin/RestoredIntents.kt +64 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/DeepLinkDeliveryTest.kt +40 -3
- package/android/src/test/java/com/adshift/reactnativeplugin/InitializeOrderingTest.kt +14 -0
- package/android/src/test/java/com/adshift/reactnativeplugin/LaunchIntentForwardingTest.kt +30 -1
- package/android/src/test/java/com/adshift/reactnativeplugin/ModuleTestSupport.kt +13 -0
- package/ios/AdShiftReactNativePlugin.mm +5 -0
- package/ios/AdShiftReactNativePluginHelper.swift +25 -1
- package/ios/Core/BridgeRules.swift +18 -1
- package/lib/commonjs/Adshift.js +31 -5
- package/lib/commonjs/Adshift.js.map +1 -1
- package/lib/commonjs/NativeAdShiftReactNativePlugin.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/jest/index.js +2 -0
- package/lib/commonjs/jest/index.js.map +1 -1
- package/lib/commonjs/nativeSdkVersions.js +2 -2
- package/lib/commonjs/types/AdshiftConfig.js +10 -1
- package/lib/commonjs/types/AdshiftConfig.js.map +1 -1
- package/lib/commonjs/types/AdshiftDeepLink.js +50 -6
- package/lib/commonjs/types/AdshiftDeepLink.js.map +1 -1
- package/lib/commonjs/types/index.js +12 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/Adshift.js +32 -6
- package/lib/module/Adshift.js.map +1 -1
- package/lib/module/NativeAdShiftReactNativePlugin.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/jest/index.js +3 -1
- package/lib/module/jest/index.js.map +1 -1
- package/lib/module/nativeSdkVersions.js +2 -2
- package/lib/module/types/AdshiftConfig.js +9 -1
- package/lib/module/types/AdshiftConfig.js.map +1 -1
- package/lib/module/types/AdshiftDeepLink.js +50 -5
- package/lib/module/types/AdshiftDeepLink.js.map +1 -1
- package/lib/module/types/index.js +2 -2
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/Adshift.d.ts +18 -7
- package/lib/typescript/commonjs/src/Adshift.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts +13 -4
- package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.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/jest/index.d.ts +3 -1
- package/lib/typescript/commonjs/src/jest/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts +25 -2
- package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts +55 -11
- package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/index.d.ts +3 -3
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/Adshift.d.ts +18 -7
- package/lib/typescript/module/src/Adshift.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts +13 -4
- package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.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/jest/index.d.ts +3 -1
- package/lib/typescript/module/src/jest/index.d.ts.map +1 -1
- package/lib/typescript/module/src/nativeSdkVersions.d.ts +2 -2
- package/lib/typescript/module/src/types/AdshiftConfig.d.ts +25 -2
- package/lib/typescript/module/src/types/AdshiftConfig.d.ts.map +1 -1
- package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts +55 -11
- package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/types/index.d.ts +3 -3
- package/lib/typescript/module/src/types/index.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/Adshift.ts +48 -8
- package/src/NativeAdShiftReactNativePlugin.ts +14 -4
- package/src/index.tsx +6 -2
- package/src/jest/index.ts +5 -0
- package/src/nativeSdkVersions.ts +2 -2
- package/src/types/AdshiftConfig.ts +38 -2
- package/src/types/AdshiftDeepLink.ts +87 -11
- package/src/types/index.ts +9 -2
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Adshift.d.ts","sourceRoot":"","sources":["../../../../src/Adshift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EAEf,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Adshift.d.ts","sourceRoot":"","sources":["../../../../src/Adshift.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EAEf,qBAAqB,EACrB,wBAAwB,EACxB,eAAe,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,gBA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;;;;OAMG;qDACmC,MAAM,EAAE,KAAG,IAAI;IAgBrD;;;;;;;OAOG;+CAEQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC/B,OAAO,CAAC,OAAO,CAAC;IAkBnB;;;;;;;OAOG;oCACkB,gBAAgB,KAAG,oBAAoB;4BAsBjD,WAAW;CAOd,CAAC;AAIX,eAAe,OAAO,CAAC"}
|
|
@@ -20,6 +20,9 @@ export type NativeDeepLinkPayload = {
|
|
|
20
20
|
deepLinkSub4?: string;
|
|
21
21
|
deepLinkSub5?: string;
|
|
22
22
|
isFirstSession?: boolean;
|
|
23
|
+
source?: string;
|
|
24
|
+
clickId?: string;
|
|
25
|
+
matchGuaranteed?: boolean;
|
|
23
26
|
};
|
|
24
27
|
/**
|
|
25
28
|
* TurboModule contract between JavaScript and native code.
|
|
@@ -33,10 +36,11 @@ export interface Spec extends TurboModule {
|
|
|
33
36
|
* Initializes the SDK.
|
|
34
37
|
*
|
|
35
38
|
* Config keys (all optional except `apiKey`): `apiKey`, `isDebug`,
|
|
36
|
-
* `appOpenDebounceMs`, `brandedDomains: string[]`, `
|
|
37
|
-
* `pushDeepLinkPaths: string[][]`,
|
|
38
|
-
* `disableSKAN` / `waitForATTBeforeStart` /
|
|
39
|
-
* `
|
|
39
|
+
* `appOpenDebounceMs`, `brandedDomains: string[]`, `testMode`,
|
|
40
|
+
* `metaAppId` (Android), `pushDeepLinkPaths: string[][]`,
|
|
41
|
+
* `autoHandleDeepLinks`, `disableSKAN` / `waitForATTBeforeStart` /
|
|
42
|
+
* `attTimeoutMs` / `deferredDeepLinkClipboard` (iOS), `collectOaid`
|
|
43
|
+
* (Android). Keys that are absent leave SDK defaults untouched.
|
|
40
44
|
*/
|
|
41
45
|
initialize(config: Object): void;
|
|
42
46
|
/**
|
|
@@ -91,6 +95,11 @@ export interface Spec extends TurboModule {
|
|
|
91
95
|
* while a genuine second tap on the same link is still forwarded.
|
|
92
96
|
*/
|
|
93
97
|
handleDeepLink(url: string, fromLaunch: boolean): Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Passes what the user pasted with `UIPasteControl`, or null when they
|
|
100
|
+
* skipped it. iOS only; no-op on Android.
|
|
101
|
+
*/
|
|
102
|
+
handlePastedDeepLink(url: string | null): void;
|
|
94
103
|
/** Registers a push payload key path that carries a deep link. */
|
|
95
104
|
addPushNotificationDeepLinkPath(path: string[]): void;
|
|
96
105
|
/** Resolves to true when the payload was recognised as an AdShift push. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeAdShiftReactNativePlugin.d.ts","sourceRoot":"","sources":["../../../../src/NativeAdShiftReactNativePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeAdShiftReactNativePlugin.d.ts","sourceRoot":"","sources":["../../../../src/NativeAdShiftReactNativePlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG9D;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,GAA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BAEE"}
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
*/
|
|
33
33
|
export { Adshift, default } from './Adshift';
|
|
34
34
|
export type { StartResult, EventValues, PurchaseParams, DeepLinkSubscription, DeepLinkCallback, NativeSdkVersions, AdshiftInfo, } from './Adshift';
|
|
35
|
-
export type { AdshiftConfig } from './types';
|
|
35
|
+
export type { AdshiftConfig, AdshiftDeferredDeepLinkClipboard } from './types';
|
|
36
36
|
export { AdshiftConsent } from './types';
|
|
37
37
|
export type { AdshiftConsent as AdshiftConsentType, ConsentFlag, ConsentSnapshot, ConsentSource, } from './types';
|
|
38
38
|
export { AdshiftThirdPartySharing } from './types';
|
|
39
39
|
export type { AdshiftThirdPartySharing as AdshiftThirdPartySharingType } from './types';
|
|
40
|
-
export { AdshiftDeepLinkStatus, AdshiftDeepLink } from './types';
|
|
40
|
+
export { AdshiftDeepLinkStatus, AdshiftDeepLinkSource, AdshiftDeepLink, } from './types';
|
|
41
41
|
export type { AdshiftDeepLink as AdshiftDeepLinkType } from './types';
|
|
42
42
|
export { AdshiftEventType, getAllEventTypes } from './types';
|
|
43
43
|
export type { AdshiftEventTypeValue } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE7C,YAAY,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACZ,MAAM,WAAW,CAAC;AAGnB,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AA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
|
20
20
|
import type { AdshiftThirdPartySharing as AdshiftThirdPartySharingType } from '../types/AdshiftThirdPartySharing';
|
|
21
21
|
import { AdshiftThirdPartySharing } from '../types/AdshiftThirdPartySharing';
|
|
22
22
|
import type { AdshiftDeepLink as AdshiftDeepLinkType } from '../types/AdshiftDeepLink';
|
|
23
|
-
import { AdshiftDeepLink, AdshiftDeepLinkStatus } from '../types/AdshiftDeepLink';
|
|
23
|
+
import { AdshiftDeepLink, AdshiftDeepLinkSource, AdshiftDeepLinkStatus } from '../types/AdshiftDeepLink';
|
|
24
24
|
import { AdshiftEventType, getAllEventTypes } from '../types/AdshiftEventType';
|
|
25
25
|
import { AdshiftEventParam, getAllEventParams } from '../types/AdshiftEventParam';
|
|
26
26
|
import { AdshiftMediationNetwork } from '../types/AdshiftAdRevenue';
|
|
@@ -54,6 +54,7 @@ export interface AdshiftMock {
|
|
|
54
54
|
logAdRevenue: MockFn<(params: Record<string, unknown>) => Promise<void>>;
|
|
55
55
|
getAdShiftDeviceId: MockFn<() => Promise<string | null>>;
|
|
56
56
|
handleDeepLink: MockFn<(url: string) => Promise<void>>;
|
|
57
|
+
handlePastedDeepLink: MockFn<(url: string | null) => void>;
|
|
57
58
|
addPushNotificationDeepLinkPath: MockFn<(path: string[]) => void>;
|
|
58
59
|
handlePushNotification: MockFn<(payload: Record<string, unknown>) => Promise<boolean>>;
|
|
59
60
|
onDeepLink: MockFn<(callback: Listener) => {
|
|
@@ -86,6 +87,7 @@ export interface AdshiftModuleMock {
|
|
|
86
87
|
AdshiftThirdPartySharing: typeof AdshiftThirdPartySharing;
|
|
87
88
|
AdshiftDeepLink: typeof AdshiftDeepLink;
|
|
88
89
|
AdshiftDeepLinkStatus: typeof AdshiftDeepLinkStatus;
|
|
90
|
+
AdshiftDeepLinkSource: typeof AdshiftDeepLinkSource;
|
|
89
91
|
AdshiftEventType: typeof AdshiftEventType;
|
|
90
92
|
getAllEventTypes: typeof getAllEventTypes;
|
|
91
93
|
AdshiftEventParam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AC;CACxB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,iBAAiB,CAoGrD;AAED,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { AdshiftError } from './AdshiftError';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the first launch on iOS reads the deferred deep link a RightLink
|
|
4
|
+
* page copied to the clipboard.
|
|
5
|
+
*/
|
|
6
|
+
export type AdshiftDeferredDeepLinkClipboard = 'disabled' | 'prompt' | 'pasteControl';
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const DEFERRED_DEEP_LINK_CLIPBOARD_MODES: ReadonlySet<string>;
|
|
2
9
|
/**
|
|
3
10
|
* Configuration for initializing the AdShift SDK.
|
|
4
11
|
*
|
|
@@ -30,10 +37,16 @@ export interface AdshiftConfig {
|
|
|
30
37
|
*/
|
|
31
38
|
appOpenDebounceMs?: number;
|
|
32
39
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
40
|
+
* Your own link domains, e.g. `links.example.com`. Without this a link on
|
|
41
|
+
* such a domain comes back `notFound` and is not counted as a click.
|
|
35
42
|
*/
|
|
36
43
|
brandedDomains?: string[];
|
|
44
|
+
/**
|
|
45
|
+
* Mark every click and event as test traffic, which is kept out of
|
|
46
|
+
* reports, postbacks and billing. A debug build does not turn it on.
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
testMode?: boolean;
|
|
37
50
|
/**
|
|
38
51
|
* Meta app id used to parse Meta App Links.
|
|
39
52
|
* @platform android
|
|
@@ -75,6 +88,16 @@ export interface AdshiftConfig {
|
|
|
75
88
|
* @platform ios
|
|
76
89
|
*/
|
|
77
90
|
attTimeoutMs?: number;
|
|
91
|
+
/**
|
|
92
|
+
* Read the deferred deep link from the clipboard on the first launch, for
|
|
93
|
+
* RightLink templates with the clipboard option. `prompt`: iOS asks the
|
|
94
|
+
* user to allow the paste, once per install. `pasteControl`: your
|
|
95
|
+
* onboarding shows `UIPasteControl` and passes the result to
|
|
96
|
+
* `Adshift.handlePastedDeepLink()`.
|
|
97
|
+
* @default 'disabled'
|
|
98
|
+
* @platform ios
|
|
99
|
+
*/
|
|
100
|
+
deferredDeepLinkClipboard?: AdshiftDeferredDeepLinkClipboard;
|
|
78
101
|
/**
|
|
79
102
|
* Enable OAID collection on devices without Google Play services.
|
|
80
103
|
* @default true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdshiftConfig.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAE/B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAI9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"AdshiftConfig.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,gCAAgC,GACxC,UAAU,GACV,QAAQ,GACR,cAAc,CAAC;AAEnB,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,WAAW,CAAC,MAAM,CAIjE,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAE/B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAI9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;;;;OAQG;IACH,yBAAyB,CAAC,EAAE,gCAAgC,CAAC;IAI7D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAItB;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC;AA6BD,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAS1E"}
|
|
@@ -2,18 +2,42 @@
|
|
|
2
2
|
* Status of a deep link result.
|
|
3
3
|
*/
|
|
4
4
|
export declare enum AdshiftDeepLinkStatus {
|
|
5
|
-
/**
|
|
5
|
+
/** A RightLink link, or a deferred deep link with a value. Navigate on this. */
|
|
6
6
|
Found = "found",
|
|
7
|
-
/**
|
|
7
|
+
/** Not a RightLink link, a deleted one, or no deferred deep link. */
|
|
8
8
|
NotFound = "notFound",
|
|
9
|
-
/**
|
|
9
|
+
/** Not resolved yet; the same link can still arrive as `found`. */
|
|
10
10
|
Error = "error"
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* How the link of a result reached the app.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum AdshiftDeepLinkSource {
|
|
16
|
+
/** A Universal Link, or a link the app passed in itself. iOS. */
|
|
17
|
+
UniversalLink = "ul",
|
|
18
|
+
/** An App Link, or a link the app passed in itself. Android. */
|
|
19
|
+
AppLink = "app_link",
|
|
20
|
+
/** The app's own scheme; `found` only when it wraps a RightLink link in `as_rl`. */
|
|
21
|
+
Scheme = "scheme",
|
|
22
|
+
/** The open-in-app button of a RightLink page. */
|
|
23
|
+
Cta = "cta",
|
|
24
|
+
/** A push notification. */
|
|
25
|
+
Push = "push",
|
|
26
|
+
/** An AdAttributionKit re-engagement open. iOS. */
|
|
27
|
+
AdAttributionKit = "aak",
|
|
28
|
+
/** A link opened by a Meta app that is not a RightLink link. Android. */
|
|
29
|
+
MetaAppLink = "meta_applink",
|
|
30
|
+
/** The lookup on the first launch after install. */
|
|
31
|
+
Deferred = "deferred",
|
|
32
|
+
/** A web link that is not a RightLink link. */
|
|
33
|
+
Foreign = "foreign"
|
|
34
|
+
}
|
|
12
35
|
/**
|
|
13
36
|
* Deep link delivered through `Adshift.onDeepLink()`.
|
|
14
37
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
38
|
+
* Navigate only on `status: 'found'`, and validate `deepLinkValue` first:
|
|
39
|
+
* anyone can write a link. Any other URL comes back `notFound` with the URL
|
|
40
|
+
* in `deepLink`. Treat `error` as "not yet".
|
|
17
41
|
*
|
|
18
42
|
* @example
|
|
19
43
|
* ```typescript
|
|
@@ -25,23 +49,40 @@ export declare enum AdshiftDeepLinkStatus {
|
|
|
25
49
|
* ```
|
|
26
50
|
*/
|
|
27
51
|
export interface AdshiftDeepLink {
|
|
52
|
+
/**
|
|
53
|
+
* The link as opened, a short link expanded. On iOS a deferred result has
|
|
54
|
+
* none: route on `deepLinkValue`.
|
|
55
|
+
*/
|
|
28
56
|
deepLink?: string;
|
|
29
57
|
/** Standardized routing value (`deep_link_value`). */
|
|
30
58
|
deepLinkValue?: string;
|
|
31
59
|
/**
|
|
32
|
-
* Query parameters of
|
|
33
|
-
*
|
|
34
|
-
* below, which both platforms fill.
|
|
60
|
+
* Query parameters of a RightLink link, your own keys included. Absent for
|
|
61
|
+
* any other URL.
|
|
35
62
|
*/
|
|
36
63
|
params?: Record<string, string>;
|
|
37
64
|
/** Whether this result comes from deferred deep linking (first launch). */
|
|
38
65
|
isDeferred: boolean;
|
|
39
66
|
status: AdshiftDeepLinkStatus;
|
|
40
|
-
/** Error message when `status` is `error
|
|
67
|
+
/** Error message when `status` is `error`; wording differs per platform. */
|
|
41
68
|
errorMessage?: string;
|
|
69
|
+
/** How the link reached the app. */
|
|
70
|
+
source?: AdshiftDeepLinkSource;
|
|
71
|
+
/**
|
|
72
|
+
* Id of the click this open was attributed to. Absent for a deferred result
|
|
73
|
+
* and when no click was recorded.
|
|
74
|
+
*/
|
|
75
|
+
clickId?: string;
|
|
76
|
+
/**
|
|
77
|
+
* `false` for a deferred result matched without a clipboard token or an
|
|
78
|
+
* advertising identifier: route the user, but do not sign them in or grant
|
|
79
|
+
* a reward because of it.
|
|
80
|
+
* @platform ios
|
|
81
|
+
*/
|
|
82
|
+
matchGuaranteed?: boolean;
|
|
42
83
|
/**
|
|
43
|
-
* Whether the result
|
|
44
|
-
*
|
|
84
|
+
* Whether the result came in the first session after install. `isDeferred`
|
|
85
|
+
* alone does not mean a new user.
|
|
45
86
|
*/
|
|
46
87
|
isFirstSession?: boolean;
|
|
47
88
|
/** Custom sub-parameter 1 (`deep_link_sub1`). */
|
|
@@ -65,6 +106,9 @@ export declare const AdshiftDeepLink: {
|
|
|
65
106
|
params?: Record<string, string>;
|
|
66
107
|
isDeferred?: boolean;
|
|
67
108
|
isFirstSession?: boolean;
|
|
109
|
+
source?: AdshiftDeepLinkSource;
|
|
110
|
+
clickId?: string;
|
|
111
|
+
matchGuaranteed?: boolean;
|
|
68
112
|
deepLinkSub1?: string;
|
|
69
113
|
deepLinkSub2?: string;
|
|
70
114
|
deepLinkSub3?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdshiftDeepLink.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftDeepLink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,
|
|
1
|
+
{"version":3,"file":"AdshiftDeepLink.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftDeepLink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,gFAAgF;IAChF,KAAK,UAAU;IAEf,qEAAqE;IACrE,QAAQ,aAAa;IAErB,mEAAmE;IACnE,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,iEAAiE;IACjE,aAAa,OAAO;IAEpB,gEAAgE;IAChE,OAAO,aAAa;IAEpB,oFAAoF;IACpF,MAAM,WAAW;IAEjB,kDAAkD;IAClD,GAAG,QAAQ;IAEX,2BAA2B;IAC3B,IAAI,SAAS;IAEb,mDAAmD;IACnD,gBAAgB,QAAQ;IAExB,yEAAyE;IACzE,WAAW,iBAAiB;IAE5B,oDAAoD;IACpD,QAAQ,aAAa;IAErB,+CAA+C;IAC/C,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,C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;iBACU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe;CAuCvD,CAAC;AA2BF;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type { AdshiftConfig } from './AdshiftConfig';
|
|
2
|
-
export { configToMap } from './AdshiftConfig';
|
|
1
|
+
export type { AdshiftConfig, AdshiftDeferredDeepLinkClipboard, } from './AdshiftConfig';
|
|
2
|
+
export { configToMap, DEFERRED_DEEP_LINK_CLIPBOARD_MODES, } from './AdshiftConfig';
|
|
3
3
|
export type { ConsentFlag } from './AdshiftConsent';
|
|
4
4
|
export { AdshiftConsent, consentToMap } from './AdshiftConsent';
|
|
5
5
|
export type { ConsentSnapshot, ConsentSource } from './AdshiftConsentSnapshot';
|
|
6
6
|
export { consentSnapshotFromMap } from './AdshiftConsentSnapshot';
|
|
7
7
|
export { AdshiftThirdPartySharing, thirdPartySharingToMap, } from './AdshiftThirdPartySharing';
|
|
8
|
-
export { AdshiftDeepLinkStatus, AdshiftDeepLink, deepLinkToMap, } from './AdshiftDeepLink';
|
|
8
|
+
export { AdshiftDeepLinkStatus, AdshiftDeepLinkSource, AdshiftDeepLink, deepLinkToMap, } from './AdshiftDeepLink';
|
|
9
9
|
export { AdshiftEventType, getAllEventTypes } from './AdshiftEventType';
|
|
10
10
|
export type { AdshiftEventTypeValue } from './AdshiftEventType';
|
|
11
11
|
export { AdshiftEventParam, getAllEventParams } from './AdshiftEventParam';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,gCAAgC,GACjC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,WAAW,EACX,kCAAkC,GACnC,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,YAAY,EACV,4BAA4B,EAC5B,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "
|
|
1
|
+
export declare const PLUGIN_VERSION = "3.0.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adshift/react-native-plugin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "AdShift SDK for React Native - Mobile Attribution, Event Tracking, SKAdNetwork 4.0+, Deep Linking and GDPR/TCF 2.2 Compliance",
|
|
5
5
|
"main": "./lib/commonjs/index.js",
|
|
6
6
|
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"bugs": {
|
|
92
92
|
"url": "https://github.com/AdShift/react_native_plugin/issues"
|
|
93
93
|
},
|
|
94
|
-
"homepage": "https://dev.adshift.com/docs/react-native-
|
|
94
|
+
"homepage": "https://dev.adshift.com/docs/react-native-plugin",
|
|
95
95
|
"publishConfig": {
|
|
96
96
|
"registry": "https://registry.npmjs.org/"
|
|
97
97
|
},
|
package/src/Adshift.ts
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
AdshiftEventParam,
|
|
52
52
|
AdshiftMediationNetwork,
|
|
53
53
|
configToMap,
|
|
54
|
+
DEFERRED_DEEP_LINK_CLIPBOARD_MODES,
|
|
54
55
|
getAllEventParams,
|
|
55
56
|
consentSnapshotFromMap,
|
|
56
57
|
consentToMap,
|
|
@@ -65,16 +66,19 @@ import { PLUGIN_VERSION } from './version';
|
|
|
65
66
|
/**
|
|
66
67
|
* Result of `Adshift.start()`.
|
|
67
68
|
*
|
|
68
|
-
* `success` reports whether the SDK started locally.
|
|
69
|
-
* the
|
|
70
|
-
* `config.onError`
|
|
69
|
+
* `success` reports whether the SDK started locally. The API key is checked
|
|
70
|
+
* with the backend in the background: `apiKeyValidationStatus` is the verdict
|
|
71
|
+
* at the time `start()` resolved, and `config.onError` reports
|
|
72
|
+
* `INVALID_API_KEY` when that verdict is `invalid`. On iOS the verdict usually
|
|
73
|
+
* arrives after `start()` resolved and is reported by the next `start()`; on
|
|
74
|
+
* Android `start()` waits up to 5 s for it.
|
|
71
75
|
*/
|
|
72
76
|
export interface StartResult {
|
|
73
77
|
success: boolean;
|
|
74
78
|
/**
|
|
75
|
-
* Outcome of the API key check at the time `start()` resolved
|
|
76
|
-
*
|
|
77
|
-
*
|
|
79
|
+
* Outcome of the API key check at the time `start()` resolved; `pending`
|
|
80
|
+
* means the answer had not arrived yet. It changes nothing you have to do:
|
|
81
|
+
* events tracked meanwhile stay queued on the device by the native SDK.
|
|
78
82
|
*/
|
|
79
83
|
apiKeyValidationStatus?: ApiKeyValidationStatus;
|
|
80
84
|
/** Platform error number behind `errorCode`, for support requests. */
|
|
@@ -147,6 +151,7 @@ const AUTO_FORWARD_DEDUP_MS = 2000;
|
|
|
147
151
|
/**
|
|
148
152
|
* Mirrors a limit the SDK applies, so the warning below can name it. Raising it
|
|
149
153
|
* there without raising it here makes the warning wrong, not the behaviour.
|
|
154
|
+
* Android compares the amount as given; iOS converts it to USD first.
|
|
150
155
|
*/
|
|
151
156
|
const MAX_AD_REVENUE_PER_IMPRESSION = 10;
|
|
152
157
|
const MEDIATION_NETWORKS: ReadonlySet<string> = new Set(
|
|
@@ -817,6 +822,15 @@ export const Adshift = {
|
|
|
817
822
|
);
|
|
818
823
|
return;
|
|
819
824
|
}
|
|
825
|
+
if (
|
|
826
|
+
config.deferredDeepLinkClipboard !== undefined &&
|
|
827
|
+
!DEFERRED_DEEP_LINK_CLIPBOARD_MODES.has(config.deferredDeepLinkClipboard)
|
|
828
|
+
) {
|
|
829
|
+
refuse(
|
|
830
|
+
"AdShift SDK: deferredDeepLinkClipboard must be 'disabled', 'prompt' or 'pasteControl'"
|
|
831
|
+
);
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
820
834
|
|
|
821
835
|
configError = null;
|
|
822
836
|
frozenConfig = Object.freeze(withPendingSettings(config));
|
|
@@ -1284,7 +1298,10 @@ export const Adshift = {
|
|
|
1284
1298
|
invalidArgument('AdShift SDK: revenue must be a positive number')
|
|
1285
1299
|
);
|
|
1286
1300
|
}
|
|
1287
|
-
if (
|
|
1301
|
+
if (
|
|
1302
|
+
revenue > MAX_AD_REVENUE_PER_IMPRESSION &&
|
|
1303
|
+
(Platform.OS === 'android' || currency.toUpperCase() === 'USD')
|
|
1304
|
+
) {
|
|
1288
1305
|
devWarn(
|
|
1289
1306
|
`logAdRevenue: revenue above ${MAX_AD_REVENUE_PER_IMPRESSION} is not recorded. ` +
|
|
1290
1307
|
'Pass the revenue of a single impression, not an aggregate.'
|
|
@@ -1376,6 +1393,28 @@ export const Adshift = {
|
|
|
1376
1393
|
}
|
|
1377
1394
|
},
|
|
1378
1395
|
|
|
1396
|
+
/**
|
|
1397
|
+
* With `deferredDeepLinkClipboard: 'pasteControl'`, passes what the user
|
|
1398
|
+
* pasted with `UIPasteControl`, or `null` when they skipped it. Call it on
|
|
1399
|
+
* every way out of onboarding: the first launch's deferred deep link waits
|
|
1400
|
+
* for it. No-op on Android.
|
|
1401
|
+
*/
|
|
1402
|
+
handlePastedDeepLink(url: string | null): void {
|
|
1403
|
+
if (url !== null && typeof url !== 'string') {
|
|
1404
|
+
reportDeclined(
|
|
1405
|
+
invalidArgument('AdShift SDK: url must be a string or null')
|
|
1406
|
+
);
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
if (state === 'uninitialized') {
|
|
1410
|
+
reportDeclined(notInitializedError());
|
|
1411
|
+
return;
|
|
1412
|
+
}
|
|
1413
|
+
NativeAdShiftReactNativePlugin.handlePastedDeepLink(
|
|
1414
|
+
isNonEmptyString(url) ? url : null
|
|
1415
|
+
);
|
|
1416
|
+
},
|
|
1417
|
+
|
|
1379
1418
|
/**
|
|
1380
1419
|
* Adds a key path inside push payloads that carries an AdShift deep link.
|
|
1381
1420
|
*
|
|
@@ -1432,7 +1471,8 @@ export const Adshift = {
|
|
|
1432
1471
|
*
|
|
1433
1472
|
* Safe to call before `initialize()`. Results that arrive while no
|
|
1434
1473
|
* listener is registered are buffered and delivered to the first listener.
|
|
1435
|
-
* Every link that reaches the SDK (direct, deferred, push) is delivered
|
|
1474
|
+
* Every link that reaches the SDK (direct, deferred, push) is delivered,
|
|
1475
|
+
* each result once.
|
|
1436
1476
|
*/
|
|
1437
1477
|
onDeepLink(callback: DeepLinkCallback): DeepLinkSubscription {
|
|
1438
1478
|
if (typeof callback !== 'function') {
|
|
@@ -20,6 +20,9 @@ export type NativeDeepLinkPayload = {
|
|
|
20
20
|
deepLinkSub4?: string;
|
|
21
21
|
deepLinkSub5?: string;
|
|
22
22
|
isFirstSession?: boolean;
|
|
23
|
+
source?: string;
|
|
24
|
+
clickId?: string;
|
|
25
|
+
matchGuaranteed?: boolean;
|
|
23
26
|
};
|
|
24
27
|
|
|
25
28
|
/**
|
|
@@ -36,10 +39,11 @@ export interface Spec extends TurboModule {
|
|
|
36
39
|
* Initializes the SDK.
|
|
37
40
|
*
|
|
38
41
|
* Config keys (all optional except `apiKey`): `apiKey`, `isDebug`,
|
|
39
|
-
* `appOpenDebounceMs`, `brandedDomains: string[]`, `
|
|
40
|
-
* `pushDeepLinkPaths: string[][]`,
|
|
41
|
-
* `disableSKAN` / `waitForATTBeforeStart` /
|
|
42
|
-
* `
|
|
42
|
+
* `appOpenDebounceMs`, `brandedDomains: string[]`, `testMode`,
|
|
43
|
+
* `metaAppId` (Android), `pushDeepLinkPaths: string[][]`,
|
|
44
|
+
* `autoHandleDeepLinks`, `disableSKAN` / `waitForATTBeforeStart` /
|
|
45
|
+
* `attTimeoutMs` / `deferredDeepLinkClipboard` (iOS), `collectOaid`
|
|
46
|
+
* (Android). Keys that are absent leave SDK defaults untouched.
|
|
43
47
|
*/
|
|
44
48
|
initialize(config: Object): void;
|
|
45
49
|
|
|
@@ -129,6 +133,12 @@ export interface Spec extends TurboModule {
|
|
|
129
133
|
*/
|
|
130
134
|
handleDeepLink(url: string, fromLaunch: boolean): Promise<void>;
|
|
131
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Passes what the user pasted with `UIPasteControl`, or null when they
|
|
138
|
+
* skipped it. iOS only; no-op on Android.
|
|
139
|
+
*/
|
|
140
|
+
handlePastedDeepLink(url: string | null): void;
|
|
141
|
+
|
|
132
142
|
/** Registers a push payload key path that carries a deep link. */
|
|
133
143
|
addPushNotificationDeepLinkPath(path: string[]): void;
|
|
134
144
|
|
package/src/index.tsx
CHANGED
|
@@ -45,7 +45,7 @@ export type {
|
|
|
45
45
|
} from './Adshift';
|
|
46
46
|
|
|
47
47
|
// ============ Config ============
|
|
48
|
-
export type { AdshiftConfig } from './types';
|
|
48
|
+
export type { AdshiftConfig, AdshiftDeferredDeepLinkClipboard } from './types';
|
|
49
49
|
|
|
50
50
|
// ============ Consent ============
|
|
51
51
|
// AdshiftConsent is both a type (interface) and a value (helper object).
|
|
@@ -62,7 +62,11 @@ export type { AdshiftThirdPartySharing as AdshiftThirdPartySharingType } from '.
|
|
|
62
62
|
|
|
63
63
|
// ============ Deep Link ============
|
|
64
64
|
// AdshiftDeepLink is both a type (interface) and a value (helper object).
|
|
65
|
-
export {
|
|
65
|
+
export {
|
|
66
|
+
AdshiftDeepLinkStatus,
|
|
67
|
+
AdshiftDeepLinkSource,
|
|
68
|
+
AdshiftDeepLink,
|
|
69
|
+
} from './types';
|
|
66
70
|
export type { AdshiftDeepLink as AdshiftDeepLinkType } from './types';
|
|
67
71
|
|
|
68
72
|
// ============ Events ============
|
package/src/jest/index.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { AdshiftThirdPartySharing } from '../types/AdshiftThirdPartySharing';
|
|
|
25
25
|
import type { AdshiftDeepLink as AdshiftDeepLinkType } from '../types/AdshiftDeepLink';
|
|
26
26
|
import {
|
|
27
27
|
AdshiftDeepLink,
|
|
28
|
+
AdshiftDeepLinkSource,
|
|
28
29
|
AdshiftDeepLinkStatus,
|
|
29
30
|
} from '../types/AdshiftDeepLink';
|
|
30
31
|
import { AdshiftEventType, getAllEventTypes } from '../types/AdshiftEventType';
|
|
@@ -75,6 +76,7 @@ export interface AdshiftMock {
|
|
|
75
76
|
logAdRevenue: MockFn<(params: Record<string, unknown>) => Promise<void>>;
|
|
76
77
|
getAdShiftDeviceId: MockFn<() => Promise<string | null>>;
|
|
77
78
|
handleDeepLink: MockFn<(url: string) => Promise<void>>;
|
|
79
|
+
handlePastedDeepLink: MockFn<(url: string | null) => void>;
|
|
78
80
|
addPushNotificationDeepLinkPath: MockFn<(path: string[]) => void>;
|
|
79
81
|
handlePushNotification: MockFn<
|
|
80
82
|
(payload: Record<string, unknown>) => Promise<boolean>
|
|
@@ -108,6 +110,7 @@ export interface AdshiftModuleMock {
|
|
|
108
110
|
AdshiftThirdPartySharing: typeof AdshiftThirdPartySharing;
|
|
109
111
|
AdshiftDeepLink: typeof AdshiftDeepLink;
|
|
110
112
|
AdshiftDeepLinkStatus: typeof AdshiftDeepLinkStatus;
|
|
113
|
+
AdshiftDeepLinkSource: typeof AdshiftDeepLinkSource;
|
|
111
114
|
AdshiftEventType: typeof AdshiftEventType;
|
|
112
115
|
getAllEventTypes: typeof getAllEventTypes;
|
|
113
116
|
AdshiftEventParam: typeof AdshiftEventParam;
|
|
@@ -158,6 +161,7 @@ export function createAdshiftMock(): AdshiftModuleMock {
|
|
|
158
161
|
logAdRevenue: jest.fn(async () => undefined),
|
|
159
162
|
getAdShiftDeviceId: jest.fn(async () => 'mock-device-id'),
|
|
160
163
|
handleDeepLink: jest.fn(async () => undefined),
|
|
164
|
+
handlePastedDeepLink: jest.fn(),
|
|
161
165
|
addPushNotificationDeepLinkPath: jest.fn(),
|
|
162
166
|
handlePushNotification: jest.fn(async () => false),
|
|
163
167
|
onDeepLink: jest.fn((callback: Listener) => {
|
|
@@ -210,6 +214,7 @@ export function createAdshiftMock(): AdshiftModuleMock {
|
|
|
210
214
|
AdshiftThirdPartySharing,
|
|
211
215
|
AdshiftDeepLink,
|
|
212
216
|
AdshiftDeepLinkStatus,
|
|
217
|
+
AdshiftDeepLinkSource,
|
|
213
218
|
AdshiftEventType,
|
|
214
219
|
getAllEventTypes,
|
|
215
220
|
AdshiftEventParam,
|
package/src/nativeSdkVersions.ts
CHANGED