@adshift/react-native-plugin 2.1.0 → 3.1.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.
Files changed (185) hide show
  1. package/AdShiftReactNativePlugin.podspec +20 -4
  2. package/CHANGELOG.md +57 -8
  3. package/README.md +131 -74
  4. package/android/build.gradle +3 -2
  5. package/android/consumer-rules.pro +2 -21
  6. package/android/src/main/AndroidManifest.xml +14 -1
  7. package/android/src/main/java/com/adshift/reactnativeplugin/ActivityIntents.kt +307 -0
  8. package/android/src/main/java/com/adshift/reactnativeplugin/AdShiftReactNativePluginModule.kt +90 -153
  9. package/android/src/test/java/com/adshift/reactnativeplugin/ConsentSnapshotTest.kt +0 -20
  10. package/android/src/test/java/com/adshift/reactnativeplugin/DeepLinkDeliveryTest.kt +40 -7
  11. package/android/src/test/java/com/adshift/reactnativeplugin/InitializeOrderingTest.kt +51 -5
  12. package/android/src/test/java/com/adshift/reactnativeplugin/IntentLinkDedupTest.kt +0 -5
  13. package/android/src/test/java/com/adshift/reactnativeplugin/LaunchIntentForwardingTest.kt +21 -11
  14. package/android/src/test/java/com/adshift/reactnativeplugin/LaunchLinkRecordTest.kt +420 -0
  15. package/android/src/test/java/com/adshift/reactnativeplugin/ModuleTestSupport.kt +97 -25
  16. package/android/src/test/java/com/adshift/reactnativeplugin/StartVerdictTest.kt +0 -4
  17. package/ios/AdShiftReactNativePlugin.h +0 -12
  18. package/ios/AdShiftReactNativePlugin.mm +7 -14
  19. package/ios/AdShiftReactNativePluginHelper.swift +38 -73
  20. package/ios/Core/BridgeRules.swift +42 -30
  21. package/lib/commonjs/Adshift.js +100 -284
  22. package/lib/commonjs/Adshift.js.map +1 -1
  23. package/lib/commonjs/NativeAdShiftReactNativePlugin.js +2 -11
  24. package/lib/commonjs/NativeAdShiftReactNativePlugin.js.map +1 -1
  25. package/lib/commonjs/index.js +6 -0
  26. package/lib/commonjs/index.js.map +1 -1
  27. package/lib/commonjs/jest/index.js +6 -18
  28. package/lib/commonjs/jest/index.js.map +1 -1
  29. package/lib/commonjs/nativeSdkVersions.js +4 -6
  30. package/lib/commonjs/nativeSdkVersions.js.map +1 -1
  31. package/lib/commonjs/types/AdshiftAdRevenue.js +0 -24
  32. package/lib/commonjs/types/AdshiftAdRevenue.js.map +1 -1
  33. package/lib/commonjs/types/AdshiftConfig.js +11 -23
  34. package/lib/commonjs/types/AdshiftConfig.js.map +1 -1
  35. package/lib/commonjs/types/AdshiftConsent.js +9 -45
  36. package/lib/commonjs/types/AdshiftConsent.js.map +1 -1
  37. package/lib/commonjs/types/AdshiftConsentSnapshot.js +5 -24
  38. package/lib/commonjs/types/AdshiftConsentSnapshot.js.map +1 -1
  39. package/lib/commonjs/types/AdshiftDeepLink.js +50 -33
  40. package/lib/commonjs/types/AdshiftDeepLink.js.map +1 -1
  41. package/lib/commonjs/types/AdshiftError.js +7 -27
  42. package/lib/commonjs/types/AdshiftError.js.map +1 -1
  43. package/lib/commonjs/types/AdshiftEventParam.js +4 -38
  44. package/lib/commonjs/types/AdshiftEventParam.js.map +1 -1
  45. package/lib/commonjs/types/AdshiftEventType.js +1 -39
  46. package/lib/commonjs/types/AdshiftEventType.js.map +1 -1
  47. package/lib/commonjs/types/AdshiftThirdPartySharing.js +7 -38
  48. package/lib/commonjs/types/AdshiftThirdPartySharing.js.map +1 -1
  49. package/lib/commonjs/types/index.js +12 -0
  50. package/lib/commonjs/types/index.js.map +1 -1
  51. package/lib/commonjs/version.js +1 -1
  52. package/lib/module/Adshift.js +101 -285
  53. package/lib/module/Adshift.js.map +1 -1
  54. package/lib/module/NativeAdShiftReactNativePlugin.js +2 -12
  55. package/lib/module/NativeAdShiftReactNativePlugin.js.map +1 -1
  56. package/lib/module/index.js +2 -47
  57. package/lib/module/index.js.map +1 -1
  58. package/lib/module/jest/index.js +7 -19
  59. package/lib/module/jest/index.js.map +1 -1
  60. package/lib/module/nativeSdkVersions.js +4 -6
  61. package/lib/module/nativeSdkVersions.js.map +1 -1
  62. package/lib/module/types/AdshiftAdRevenue.js +0 -24
  63. package/lib/module/types/AdshiftAdRevenue.js.map +1 -1
  64. package/lib/module/types/AdshiftConfig.js +10 -23
  65. package/lib/module/types/AdshiftConfig.js.map +1 -1
  66. package/lib/module/types/AdshiftConsent.js +9 -45
  67. package/lib/module/types/AdshiftConsent.js.map +1 -1
  68. package/lib/module/types/AdshiftConsentSnapshot.js +5 -24
  69. package/lib/module/types/AdshiftConsentSnapshot.js.map +1 -1
  70. package/lib/module/types/AdshiftDeepLink.js +49 -32
  71. package/lib/module/types/AdshiftDeepLink.js.map +1 -1
  72. package/lib/module/types/AdshiftError.js +7 -28
  73. package/lib/module/types/AdshiftError.js.map +1 -1
  74. package/lib/module/types/AdshiftEventParam.js +4 -38
  75. package/lib/module/types/AdshiftEventParam.js.map +1 -1
  76. package/lib/module/types/AdshiftEventType.js +1 -39
  77. package/lib/module/types/AdshiftEventType.js.map +1 -1
  78. package/lib/module/types/AdshiftThirdPartySharing.js +7 -38
  79. package/lib/module/types/AdshiftThirdPartySharing.js.map +1 -1
  80. package/lib/module/types/index.js +2 -2
  81. package/lib/module/types/index.js.map +1 -1
  82. package/lib/module/version.js +1 -1
  83. package/lib/typescript/commonjs/src/Adshift.d.ts +68 -184
  84. package/lib/typescript/commonjs/src/Adshift.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts +18 -35
  86. package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/src/index.d.ts +2 -34
  88. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/src/jest/index.d.ts +9 -21
  90. package/lib/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts +4 -6
  92. package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/src/types/AdshiftAdRevenue.d.ts +0 -24
  94. package/lib/typescript/commonjs/src/types/AdshiftAdRevenue.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts +35 -39
  96. package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts.map +1 -1
  97. package/lib/typescript/commonjs/src/types/AdshiftConsent.d.ts +9 -49
  98. package/lib/typescript/commonjs/src/types/AdshiftConsent.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/src/types/AdshiftConsentSnapshot.d.ts +10 -28
  100. package/lib/typescript/commonjs/src/types/AdshiftConsentSnapshot.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts +55 -39
  102. package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts.map +1 -1
  103. package/lib/typescript/commonjs/src/types/AdshiftError.d.ts +7 -26
  104. package/lib/typescript/commonjs/src/types/AdshiftError.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/src/types/AdshiftEventParam.d.ts +3 -19
  106. package/lib/typescript/commonjs/src/types/AdshiftEventParam.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/src/types/AdshiftEventType.d.ts +1 -23
  108. package/lib/typescript/commonjs/src/types/AdshiftEventType.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/src/types/AdshiftThirdPartySharing.d.ts +7 -38
  110. package/lib/typescript/commonjs/src/types/AdshiftThirdPartySharing.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/src/types/index.d.ts +3 -3
  112. package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  114. package/lib/typescript/module/src/Adshift.d.ts +68 -184
  115. package/lib/typescript/module/src/Adshift.d.ts.map +1 -1
  116. package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts +18 -35
  117. package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -1
  118. package/lib/typescript/module/src/index.d.ts +2 -34
  119. package/lib/typescript/module/src/index.d.ts.map +1 -1
  120. package/lib/typescript/module/src/jest/index.d.ts +9 -21
  121. package/lib/typescript/module/src/jest/index.d.ts.map +1 -1
  122. package/lib/typescript/module/src/nativeSdkVersions.d.ts +4 -6
  123. package/lib/typescript/module/src/nativeSdkVersions.d.ts.map +1 -1
  124. package/lib/typescript/module/src/types/AdshiftAdRevenue.d.ts +0 -24
  125. package/lib/typescript/module/src/types/AdshiftAdRevenue.d.ts.map +1 -1
  126. package/lib/typescript/module/src/types/AdshiftConfig.d.ts +35 -39
  127. package/lib/typescript/module/src/types/AdshiftConfig.d.ts.map +1 -1
  128. package/lib/typescript/module/src/types/AdshiftConsent.d.ts +9 -49
  129. package/lib/typescript/module/src/types/AdshiftConsent.d.ts.map +1 -1
  130. package/lib/typescript/module/src/types/AdshiftConsentSnapshot.d.ts +10 -28
  131. package/lib/typescript/module/src/types/AdshiftConsentSnapshot.d.ts.map +1 -1
  132. package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts +55 -39
  133. package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts.map +1 -1
  134. package/lib/typescript/module/src/types/AdshiftError.d.ts +7 -26
  135. package/lib/typescript/module/src/types/AdshiftError.d.ts.map +1 -1
  136. package/lib/typescript/module/src/types/AdshiftEventParam.d.ts +3 -19
  137. package/lib/typescript/module/src/types/AdshiftEventParam.d.ts.map +1 -1
  138. package/lib/typescript/module/src/types/AdshiftEventType.d.ts +1 -23
  139. package/lib/typescript/module/src/types/AdshiftEventType.d.ts.map +1 -1
  140. package/lib/typescript/module/src/types/AdshiftThirdPartySharing.d.ts +7 -38
  141. package/lib/typescript/module/src/types/AdshiftThirdPartySharing.d.ts.map +1 -1
  142. package/lib/typescript/module/src/types/index.d.ts +3 -3
  143. package/lib/typescript/module/src/types/index.d.ts.map +1 -1
  144. package/lib/typescript/module/src/version.d.ts +1 -1
  145. package/package.json +11 -1
  146. package/src/Adshift.ts +118 -285
  147. package/src/NativeAdShiftReactNativePlugin.ts +19 -47
  148. package/src/index.tsx +7 -46
  149. package/src/jest/index.ts +11 -20
  150. package/src/nativeSdkVersions.ts +4 -6
  151. package/src/types/AdshiftAdRevenue.ts +0 -24
  152. package/src/types/AdshiftConfig.ts +48 -55
  153. package/src/types/AdshiftConsent.ts +9 -49
  154. package/src/types/AdshiftConsentSnapshot.ts +11 -38
  155. package/src/types/AdshiftDeepLink.ts +87 -39
  156. package/src/types/AdshiftError.ts +7 -26
  157. package/src/types/AdshiftEventParam.ts +4 -38
  158. package/src/types/AdshiftEventType.ts +1 -39
  159. package/src/types/AdshiftThirdPartySharing.ts +7 -38
  160. package/src/types/index.ts +9 -2
  161. package/src/version.ts +1 -1
  162. package/vendor/ios/AdshiftSDK.files.json +30 -0
  163. package/vendor/ios/AdshiftSDK.xcframework/Info.plist +44 -0
  164. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/AdshiftSDK +0 -0
  165. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Headers/AdshiftSDK-Swift.h +315 -0
  166. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Info.plist +0 -0
  167. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.abi.json +18729 -0
  168. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +414 -0
  169. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  170. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.swiftinterface +414 -0
  171. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/module.modulemap +4 -0
  172. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/PrivacyInfo.xcprivacy +132 -0
  173. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/AdshiftSDK +0 -0
  174. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Headers/AdshiftSDK-Swift.h +626 -0
  175. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Info.plist +0 -0
  176. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +18729 -0
  177. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +414 -0
  178. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  179. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +414 -0
  180. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +18729 -0
  181. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +414 -0
  182. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  183. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +414 -0
  184. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/module.modulemap +4 -0
  185. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/PrivacyInfo.xcprivacy +132 -0
@@ -1,43 +1,11 @@
1
- /**
2
- * AdShift React Native Plugin
3
- *
4
- * Mobile attribution, event tracking, SKAdNetwork, deep linking and
5
- * GDPR/TCF 2.2 consent.
6
- *
7
- * @example
8
- * ```typescript
9
- * import {
10
- * Adshift,
11
- * AdshiftEventParam,
12
- * AdshiftEventType,
13
- * AdshiftConsent,
14
- * AdshiftDeepLinkStatus,
15
- * } from '@adshift/react-native-plugin';
16
- *
17
- * Adshift.onDeepLink((deepLink) => {
18
- * if (deepLink.status === AdshiftDeepLinkStatus.Found) {
19
- * // route on deepLink.deepLinkValue / deepLink.params
20
- * }
21
- * });
22
- *
23
- * Adshift.initialize({ apiKey: 'your-api-key', isDebug: __DEV__ });
24
- * await Adshift.start();
25
- * await Adshift.trackEvent(AdshiftEventType.Purchase, {
26
- * [AdshiftEventParam.Revenue]: 9.99,
27
- * [AdshiftEventParam.Currency]: 'USD',
28
- * });
29
- * ```
30
- *
31
- * @packageDocumentation
32
- */
33
1
  export { Adshift, default } from './Adshift';
34
2
  export type { StartResult, EventValues, PurchaseParams, DeepLinkSubscription, DeepLinkCallback, NativeSdkVersions, AdshiftInfo, } from './Adshift';
35
- export type { AdshiftConfig } from './types';
3
+ export type { AdshiftConfig, AdshiftDeferredDeepLinkClipboard } from './types';
36
4
  export { AdshiftConsent } from './types';
37
5
  export type { AdshiftConsent as AdshiftConsentType, ConsentFlag, ConsentSnapshot, ConsentSource, } from './types';
38
6
  export { AdshiftThirdPartySharing } from './types';
39
7
  export type { AdshiftThirdPartySharing as AdshiftThirdPartySharingType } from './types';
40
- export { AdshiftDeepLinkStatus, AdshiftDeepLink } from './types';
8
+ export { AdshiftDeepLinkStatus, AdshiftDeepLinkSource, AdshiftDeepLink, } from './types';
41
9
  export type { AdshiftDeepLink as AdshiftDeepLinkType } from './types';
42
10
  export { AdshiftEventType, getAllEventTypes } from './types';
43
11
  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;AAI7C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,YAAY,EACV,cAAc,IAAI,kBAAkB,EACpC,WAAW,EACX,eAAe,EACf,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AACnD,YAAY,EAAE,wBAAwB,IAAI,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAIxF,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACjE,YAAY,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGtE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC/D,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAGtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAClD,YA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C;AAClD,YAAY,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC3D,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
@@ -1,18 +1,8 @@
1
1
  /**
2
- * Jest support for apps that use `@adshift/react-native-plugin`.
3
- *
4
- * The plugin resolves its native module at import time, which fails in a
5
- * plain Jest environment. Register this mock in your Jest setup file:
6
- *
7
- * ```js
8
- * // jest.setup.js
9
- * jest.mock('@adshift/react-native-plugin', () =>
10
- * require('@adshift/react-native-plugin/jest').createAdshiftMock()
11
- * );
12
- * ```
13
- *
14
- * Every method is a `jest.fn()` with a resolved default so tests can assert
15
- * calls or override behaviour per test.
2
+ * Jest mock of the package, whose native module fails to load in plain Jest.
3
+ * In your Jest setup file: `jest.mock('@adshift/react-native-plugin', () =>
4
+ * require('@adshift/react-native-plugin/jest').createAdshiftMock());`
5
+ * Every method is a `jest.fn()` with a default answer.
16
6
  */
17
7
  import type { AdshiftConfig } from '../types/AdshiftConfig';
18
8
  import type { AdshiftConsent as AdshiftConsentType } from '../types/AdshiftConsent';
@@ -20,16 +10,13 @@ import { AdshiftConsent } from '../types/AdshiftConsent';
20
10
  import type { AdshiftThirdPartySharing as AdshiftThirdPartySharingType } from '../types/AdshiftThirdPartySharing';
21
11
  import { AdshiftThirdPartySharing } from '../types/AdshiftThirdPartySharing';
22
12
  import type { AdshiftDeepLink as AdshiftDeepLinkType } from '../types/AdshiftDeepLink';
23
- import { AdshiftDeepLink, AdshiftDeepLinkStatus } from '../types/AdshiftDeepLink';
13
+ import { AdshiftDeepLink, AdshiftDeepLinkSource, AdshiftDeepLinkStatus } from '../types/AdshiftDeepLink';
24
14
  import { AdshiftEventType, getAllEventTypes } from '../types/AdshiftEventType';
25
15
  import { AdshiftEventParam, getAllEventParams } from '../types/AdshiftEventParam';
26
16
  import { AdshiftMediationNetwork } from '../types/AdshiftAdRevenue';
27
17
  import { AdshiftErrorCode, createAdshiftError, isAdshiftError } from '../types/AdshiftError';
28
18
  type MockFn<T extends (...args: never[]) => unknown> = jest.Mock<ReturnType<T>, Parameters<T>>;
29
19
  type Listener = (deepLink: AdshiftDeepLinkType) => void;
30
- /**
31
- * Mocked `Adshift` object with test helpers.
32
- */
33
20
  export interface AdshiftMock {
34
21
  initialize: MockFn<(config: AdshiftConfig) => void>;
35
22
  start: MockFn<() => Promise<{
@@ -54,6 +41,7 @@ export interface AdshiftMock {
54
41
  logAdRevenue: MockFn<(params: Record<string, unknown>) => Promise<void>>;
55
42
  getAdShiftDeviceId: MockFn<() => Promise<string | null>>;
56
43
  handleDeepLink: MockFn<(url: string) => Promise<void>>;
44
+ handlePastedDeepLink: MockFn<(url: string | null) => void>;
57
45
  addPushNotificationDeepLinkPath: MockFn<(path: string[]) => void>;
58
46
  handlePushNotification: MockFn<(payload: Record<string, unknown>) => Promise<boolean>>;
59
47
  onDeepLink: MockFn<(callback: Listener) => {
@@ -70,9 +58,8 @@ export interface AdshiftMock {
70
58
  /** Test helper: delivers a deep link to every registered listener. */
71
59
  __emitDeepLink(deepLink: AdshiftDeepLinkType): void;
72
60
  /**
73
- * Test helper: returns the mock to the state it had when it was created —
74
- * listeners gone, started flag down, recorded calls and any per-test
75
- * behaviour dropped, default answers back in place.
61
+ * Test helper: returns the mock to its state at creation: no listeners, not
62
+ * started, recorded calls and per-test overrides dropped, defaults restored.
76
63
  */
77
64
  __reset(): void;
78
65
  }
@@ -86,6 +73,7 @@ export interface AdshiftModuleMock {
86
73
  AdshiftThirdPartySharing: typeof AdshiftThirdPartySharing;
87
74
  AdshiftDeepLink: typeof AdshiftDeepLink;
88
75
  AdshiftDeepLinkStatus: typeof AdshiftDeepLinkStatus;
76
+ AdshiftDeepLinkSource: typeof AdshiftDeepLinkSource;
89
77
  AdshiftEventType: typeof AdshiftEventType;
90
78
  getAllEventTypes: typeof getAllEventTypes;
91
79
  AdshiftEventParam: typeof AdshiftEventParam;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/jest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,wBAAwB,IAAI,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAClH,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EACL,eAAe,EACf,qBAAqB,EACtB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAG/B,KAAK,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,CAC9D,UAAU,CAAC,CAAC,CAAC,EACb,UAAU,CAAC,CAAC,CAAC,CACd,CAAC;AAEF,KAAK,QAAQ,GAAG,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC,CAAC,MAAM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AE,OAAO,gBAAgB,CAAC;IAC1C,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,iBAAiB,CAoGrD;AAED,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,CAAC"}
@@ -1,11 +1,9 @@
1
1
  /**
2
- * Native SDK versions this plugin is pinned to.
3
- *
4
- * Kept in its own module so the Jest mock can report the same values without
5
- * loading the native module, and so a release bumps them in one place.
2
+ * Native SDK versions this plugin is pinned to; a module of their own so the
3
+ * Jest mock can report them without loading the native module.
6
4
  */
7
5
  export declare const NATIVE_SDK_VERSIONS: Readonly<{
8
- android: "3.2.0";
9
- ios: "2.4.0";
6
+ android: "4.2.0";
7
+ ios: "3.1.0";
10
8
  }>;
11
9
  //# sourceMappingURL=nativeSdkVersions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nativeSdkVersions.d.ts","sourceRoot":"","sources":["../../../../src/nativeSdkVersions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC"}
1
+ {"version":3,"file":"nativeSdkVersions.d.ts","sourceRoot":"","sources":["../../../../src/nativeSdkVersions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;EAG9B,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * Mediation platform that reported the ad impression.
3
- *
4
- * Values are the identifiers used on the wire by the native SDKs.
5
- */
6
1
  export declare const AdshiftMediationNetwork: {
7
2
  readonly AppLovinMAX: "applovin_max";
8
3
  readonly GoogleAdMob: "google_admob";
@@ -19,24 +14,7 @@ export declare const AdshiftMediationNetwork: {
19
14
  readonly DirectMonetization: "direct_monetization_network";
20
15
  readonly Other: "other";
21
16
  };
22
- /**
23
- * Type of all mediation network values.
24
- */
25
17
  export type AdshiftMediationNetworkValue = (typeof AdshiftMediationNetwork)[keyof typeof AdshiftMediationNetwork];
26
- /**
27
- * Parameters for `Adshift.logAdRevenue()`.
28
- *
29
- * @example
30
- * ```typescript
31
- * await Adshift.logAdRevenue({
32
- * monetizationNetwork: 'admob',
33
- * mediationNetwork: AdshiftMediationNetwork.GoogleAdMob,
34
- * currency: 'USD',
35
- * revenue: 0.0125,
36
- * adUnitId: 'ca-app-pub-1234/5678',
37
- * });
38
- * ```
39
- */
40
18
  export interface AdRevenueParams {
41
19
  /** Ad network that served the impression, e.g. `admob`, `meta`. */
42
20
  monetizationNetwork: string;
@@ -46,11 +24,9 @@ export interface AdRevenueParams {
46
24
  currency: string;
47
25
  /** Revenue of the single impression in `currency`. Must be positive. */
48
26
  revenue: number;
49
- /** Ad unit identifier, when available. */
50
27
  adUnitId?: string;
51
28
  /** Revenue precision reported by the network, e.g. `exact`, `estimated`. */
52
29
  precision?: string;
53
- /** Extra parameters attached to the event. */
54
30
  additionalParameters?: Record<string, string | number | boolean>;
55
31
  }
56
32
  //# sourceMappingURL=AdshiftAdRevenue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdshiftAdRevenue.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftAdRevenue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAe1B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,gBAAgB,EAAE,4BAA4B,CAAC;IAC/C,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CAClE"}
1
+ {"version":3,"file":"AdshiftAdRevenue.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftAdRevenue.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;CAe1B,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,OAAO,uBAAuB,CAAC,CAAC;AAEzE,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uDAAuD;IACvD,gBAAgB,EAAE,4BAA4B,CAAC;IAC/C,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CAClE"}
@@ -1,26 +1,20 @@
1
1
  import type { AdshiftError } from './AdshiftError';
2
2
  /**
3
- * Configuration for initializing the AdShift SDK.
4
- *
5
- * Every option other than `apiKey` is optional; omitted options keep the
6
- * native SDK defaults. All options must be set before `Adshift.start()`.
7
- *
8
- * @example
9
- * ```typescript
10
- * Adshift.initialize({
11
- * apiKey: 'your-api-key',
12
- * isDebug: __DEV__,
13
- * brandedDomains: ['links.example.com'],
14
- * });
15
- * ```
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>;
9
+ /**
10
+ * Options for `Adshift.initialize()`; an omitted option keeps the native SDK
11
+ * default.
16
12
  */
17
13
  export interface AdshiftConfig {
18
- /**
19
- * API key from the AdShift dashboard. Required.
20
- */
14
+ /** API key from the AdShift dashboard. */
21
15
  apiKey: string;
22
16
  /**
23
- * Enable verbose SDK logging.
17
+ * Verbose SDK logging.
24
18
  * @default false
25
19
  */
26
20
  isDebug?: boolean;
@@ -30,10 +24,16 @@ export interface AdshiftConfig {
30
24
  */
31
25
  appOpenDebounceMs?: number;
32
26
  /**
33
- * Branded (custom) attribution domains, e.g. `links.example.com`.
34
- * Links on these hosts are treated as attribution links.
27
+ * Your own link domains, e.g. `links.example.com`. Without this a link on
28
+ * such a domain comes back `notFound` and is not counted as a click.
35
29
  */
36
30
  brandedDomains?: string[];
31
+ /**
32
+ * Mark every click and event as test traffic, which is kept out of
33
+ * reports, postbacks and billing. A debug build does not turn it on.
34
+ * @default false
35
+ */
36
+ testMode?: boolean;
37
37
  /**
38
38
  * Meta app id used to parse Meta App Links.
39
39
  * @platform android
@@ -47,11 +47,9 @@ export interface AdshiftConfig {
47
47
  */
48
48
  pushDeepLinkPaths?: string[][];
49
49
  /**
50
- * Forward every URL that opens the app to the SDK automatically.
51
- *
52
- * Android: the plugin reads the launch Intent and every new Intent.
53
- * iOS: the plugin uses `Linking` (`getInitialURL` and the `url` event).
54
- * Set to `false` to call `Adshift.handleDeepLink()` yourself.
50
+ * Forward every URL that opens the app to the SDK: on Android from the
51
+ * Activity's Intents, on iOS through React Native `Linking`. Set to `false`
52
+ * to call `Adshift.handleDeepLink()` yourself.
55
53
  * @default true
56
54
  */
57
55
  autoHandleDeepLinks?: boolean;
@@ -75,6 +73,16 @@ export interface AdshiftConfig {
75
73
  * @platform ios
76
74
  */
77
75
  attTimeoutMs?: number;
76
+ /**
77
+ * Read the deferred deep link from the clipboard on the first launch, for
78
+ * RightLink templates with the clipboard option. `prompt`: iOS asks the
79
+ * user to allow the paste, once per install. `pasteControl`: your
80
+ * onboarding shows `UIPasteControl` and passes the result to
81
+ * `Adshift.handlePastedDeepLink()`.
82
+ * @default 'disabled'
83
+ * @platform ios
84
+ */
85
+ deferredDeepLinkClipboard?: AdshiftDeferredDeepLinkClipboard;
78
86
  /**
79
87
  * Enable OAID collection on devices without Google Play services.
80
88
  * @default true
@@ -82,21 +90,9 @@ export interface AdshiftConfig {
82
90
  */
83
91
  collectOaid?: boolean;
84
92
  /**
85
- * Called when the SDK declines a call it cannot make: an invalid argument,
86
- * an unusable config, or an API key the backend rejected.
87
- *
88
- * Methods that return nothing cannot answer the caller, and the SDK never
89
- * raises into your code, so this is how those failures become visible. In
90
- * development they are also written to the console. Wire it to your own
91
- * reporting to catch integration mistakes in release builds.
92
- *
93
- * @example
94
- * ```typescript
95
- * Adshift.initialize({
96
- * apiKey: 'your-api-key',
97
- * onError: (error) => Sentry.captureMessage(`AdShift: ${error.code}`),
98
- * });
99
- * ```
93
+ * Called when the SDK declines a call: an invalid argument, an unusable
94
+ * config, or an API key the backend rejected. Methods that return nothing
95
+ * report their failures only here (and to the console in development).
100
96
  */
101
97
  onError?: (error: AdshiftError) => void;
102
98
  }
@@ -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,C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,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IAE/B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;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;IAE7D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CACzC;AAmBD,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAS1E"}
@@ -1,75 +1,35 @@
1
- /**
2
- * A single consent decision.
3
- *
4
- * `true` = granted, `false` = denied, `null` = not decided yet.
5
- * Undecided flags are not sent to the backend.
6
- */
1
+ /** `true` granted, `false` denied, `null` not decided yet. */
7
2
  export type ConsentFlag = boolean | null;
8
3
  /**
9
- * User consent data for GDPR/DMA compliance.
10
- *
11
- * @example
12
- * ```typescript
13
- * // GDPR user who accepted everything
14
- * Adshift.setConsentData(
15
- * AdshiftConsent.forGDPRUser({
16
- * hasConsentForDataUsage: true,
17
- * hasConsentForAdsPersonalization: true,
18
- * hasConsentForAdStorage: true,
19
- * })
20
- * );
21
- *
22
- * // Non-GDPR user
23
- * Adshift.setConsentData(AdshiftConsent.forNonGDPRUser());
24
- * ```
4
+ * GDPR/DMA consent; build it with `AdshiftConsent.forGDPRUser()` or
5
+ * `forNonGDPRUser()`. The flags are ignored unless `isUserSubjectToGDPR`.
25
6
  */
26
7
  export interface AdshiftConsent {
27
- /** Whether the user is subject to GDPR. */
28
8
  isUserSubjectToGDPR: boolean;
29
- /** Consent to data usage. Ignored when `isUserSubjectToGDPR` is false. */
30
9
  hasConsentForDataUsage?: ConsentFlag;
31
- /** Consent to ads personalization. Ignored when `isUserSubjectToGDPR` is false. */
32
10
  hasConsentForAdsPersonalization?: ConsentFlag;
33
- /** Consent to ad storage. Ignored when `isUserSubjectToGDPR` is false. */
34
11
  hasConsentForAdStorage?: ConsentFlag;
35
12
  }
36
- /**
37
- * Helper functions for creating `AdshiftConsent` objects.
38
- */
13
+ /** Builds `AdshiftConsent` values. */
39
14
  export declare const AdshiftConsent: {
40
- /**
41
- * Creates consent for a user subject to GDPR.
42
- *
43
- * Flags that are omitted or `null` are treated as not decided.
44
- */
15
+ /** An omitted flag counts as not decided. */
45
16
  forGDPRUser(options: {
46
17
  hasConsentForDataUsage?: ConsentFlag;
47
18
  hasConsentForAdsPersonalization?: ConsentFlag;
48
19
  hasConsentForAdStorage?: ConsentFlag;
49
20
  }): AdshiftConsent;
50
- /**
51
- * Creates consent for a user NOT subject to GDPR.
52
- *
53
- * All processing is treated as permitted; individual flags are not sent.
54
- */
21
+ /** All processing counts as permitted. */
55
22
  forNonGDPRUser(): AdshiftConsent;
56
23
  /**
57
- * Whether consent is granted for tracking, following the SDK rule:
58
- * non-GDPR users are always granted; GDPR users need explicit consent to
59
- * both data usage and ad storage.
24
+ * Non-GDPR users are always granted; GDPR users need consent to both data
25
+ * usage and ad storage.
60
26
  */
61
27
  isConsentGranted(consent: AdshiftConsent): boolean;
62
- /**
63
- * Creates consent from a plain object.
64
- *
65
- * @internal
66
- */
28
+ /** @internal */
67
29
  fromMap(map: Record<string, unknown>): AdshiftConsent;
68
30
  };
69
31
  /**
70
- * Converts `AdshiftConsent` to a plain object for the native bridge.
71
32
  * Undecided flags are sent as `null`.
72
- *
73
33
  * @internal
74
34
  */
75
35
  export declare function consentToMap(consent: AdshiftConsent): Record<string, boolean | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"AdshiftConsent.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftConsent.ts"],"names":[],"mapp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;QACnB,sBAAsB,CAAC,EAAE,WAAW,CAAC;QACrC,+BAA+B,CAAC,EAAE,WAAW,CAAC;QAC9C,sBAAsB,CAAC,EAAE,WAAW,CAAC;KACtC,GAAG,cAAc;IAUlB,0CAA0C;sBACxB,cAAc;IAIhC;;;OAGG;8BACuB,cAAc,GAAG,OAAO;IAQlD,gBAAgB;iBACH,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc;CActD,CAAC;AAMF;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,cAAc,GACtB,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC,CAWhC"}
@@ -1,15 +1,9 @@
1
1
  /**
2
- * Where the current consent state comes from.
3
- *
4
- * - `manual`: set through `Adshift.setConsentData()`
5
- * - `tcf`: read from an IAB TCF v2.2 CMP
6
- * - `gpp`: read from an IAB GPP string written by the CMP
7
- * - `none`: no consent information available
2
+ * `manual`: from `Adshift.setConsentData()`; `tcf`: an IAB TCF v2.2 CMP;
3
+ * `gpp`: an IAB GPP string written by the CMP; `none`: no consent information.
8
4
  */
9
5
  export type ConsentSource = 'manual' | 'tcf' | 'gpp' | 'none';
10
- /**
11
- * Consent state as seen by the SDK, returned by `Adshift.refreshConsent()`.
12
- */
6
+ /** Consent as the SDK applies it. */
13
7
  export interface ConsentSnapshot {
14
8
  source: ConsentSource;
15
9
  /** IAB `gdprApplies` value when known (0 or 1). */
@@ -19,14 +13,9 @@ export interface ConsentSnapshot {
19
13
  /** Whether a GPP string is present on the device. */
20
14
  gppPresent?: boolean;
21
15
  /**
22
- * Whether a CMP has run on this device, judged by the keys a CMP writes when
23
- * it starts rather than by a consent payload being readable.
24
- *
25
- * This is the field that separates the two cases the flags above cannot: a CMP
26
- * installed but not yet answered looks identical to no CMP at all, and the two
27
- * are fixed by opposite actions. `false` while you expect a CMP means it never
28
- * ran or was never wired up; `true` with `source: 'none'` means it ran and the
29
- * user has not answered yet, which resolves itself once they do.
16
+ * Whether a CMP has run on this device. `false` while you expect one: it
17
+ * never ran or is not wired up. `true` with `source: 'none'`: it ran and the
18
+ * user has not answered yet.
30
19
  */
31
20
  cmpDetected: boolean;
32
21
  /** Ad user data flag, when decided. */
@@ -38,19 +27,12 @@ export interface ConsentSnapshot {
38
27
  /** When the snapshot was applied, in milliseconds since epoch. */
39
28
  appliedAtMillis: number;
40
29
  /**
41
- * Whether consent lets the SDK attach the platform advertising identifier
42
- * (GAID or OAID on Android, IDFA on iOS) to what it reports. The
43
- * `adshift_device_id` is never affected.
44
- *
45
- * Each platform answers with the rule it applies to the flags above, and
46
- * those rules differ, so read this instead of comparing the flags yourself.
30
+ * Whether consent lets the SDK attach the advertising id (GAID or OAID on
31
+ * Android, IDFA on iOS); `adshift_device_id` is never affected. The platforms
32
+ * judge the flags by different rules, so read this, not the flags.
47
33
  */
48
34
  adIdentifiersAllowed: boolean;
49
35
  }
50
- /**
51
- * Builds a `ConsentSnapshot` from a native bridge object.
52
- *
53
- * @internal
54
- */
36
+ /** @internal */
55
37
  export declare function consentSnapshotFromMap(map: Record<string, unknown>): ConsentSnapshot;
56
38
  //# sourceMappingURL=AdshiftConsentSnapshot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdshiftConsentSnapshot.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftConsentSnapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,aAAa,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,eAAe,EAAE,OAAO,CAAC;IACzB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;;;;OASG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6CAA6C;IAC7C,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AAkBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,eAAe,CA4BjB"}
1
+ {"version":3,"file":"AdshiftConsentSnapshot.d.ts","sourceRoot":"","sources":["../../../../../src/types/AdshiftConsentSnapshot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AAE9D,qCAAqC;AACrC,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,aAAa,CAAC;IACtB,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,eAAe,EAAE,OAAO,CAAC;IACzB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,6CAA6C;IAC7C,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,oBAAoB,EAAE,OAAO,CAAC;CAC/B;AASD,gBAAgB;AAChB,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,eAAe,CA4BjB"}
@@ -1,47 +1,70 @@
1
- /**
2
- * Status of a deep link result.
3
- */
4
1
  export declare enum AdshiftDeepLinkStatus {
5
- /** The link was processed and delivered. */
2
+ /** A RightLink link, or a deferred deep link with a value. Navigate on this. */
6
3
  Found = "found",
7
- /** No deep link was found (e.g. organic install, deferred lookup empty). */
4
+ /** Not a RightLink link, a deleted one, or no deferred deep link. */
8
5
  NotFound = "notFound",
9
- /** An error occurred while resolving the deep link. */
6
+ /** Not resolved yet; the same link can still arrive as `found`. */
10
7
  Error = "error"
11
8
  }
9
+ export declare enum AdshiftDeepLinkSource {
10
+ /** A Universal Link, or a link the app passed in itself. iOS. */
11
+ UniversalLink = "ul",
12
+ /** An App Link, or a link the app passed in itself. Android. */
13
+ AppLink = "app_link",
14
+ /** The app's own scheme; `found` only when it wraps a RightLink link in `as_rl`. */
15
+ Scheme = "scheme",
16
+ /** The open-in-app button of a RightLink page. */
17
+ Cta = "cta",
18
+ /** A push notification. */
19
+ Push = "push",
20
+ /** An AdAttributionKit re-engagement open. iOS. */
21
+ AdAttributionKit = "aak",
22
+ /** A link opened by a Meta app that is not a RightLink link. Android. */
23
+ MetaAppLink = "meta_applink",
24
+ /** The lookup on the first launch after install. */
25
+ Deferred = "deferred",
26
+ /** A web link that is not a RightLink link. */
27
+ Foreign = "foreign"
28
+ }
12
29
  /**
13
- * Deep link delivered through `Adshift.onDeepLink()`.
14
- *
15
- * Every link that enters the app and reaches the SDK produces a result with
16
- * `status: 'found'`. Route on `deepLinkValue`, `params` or the URL itself.
17
- *
18
- * @example
19
- * ```typescript
20
- * Adshift.onDeepLink((deepLink) => {
21
- * if (deepLink.status === AdshiftDeepLinkStatus.Found) {
22
- * const productId = deepLink.params?.product_id;
23
- * }
24
- * });
25
- * ```
30
+ * Navigate only on `status: 'found'`, and validate `deepLinkValue` first:
31
+ * anyone can write a link. Any other URL comes back `notFound` with the URL
32
+ * in `deepLink`. Treat `error` as "not yet".
26
33
  */
27
34
  export interface AdshiftDeepLink {
35
+ /**
36
+ * The link as opened, a short link expanded. On iOS a deferred result has
37
+ * none: route on `deepLinkValue`.
38
+ */
28
39
  deepLink?: string;
29
- /** Standardized routing value (`deep_link_value`). */
40
+ /** Routing value, `deep_link_value`. */
30
41
  deepLinkValue?: string;
31
42
  /**
32
- * Query parameters of the link. On Android `deep_link_sub1` … `sub5` also
33
- * appear here; on iOS they are only available as the `deepLinkSubN` fields
34
- * below, which both platforms fill.
43
+ * Query parameters of a RightLink link, your own keys included. Absent for
44
+ * any other URL.
35
45
  */
36
46
  params?: Record<string, string>;
37
47
  /** Whether this result comes from deferred deep linking (first launch). */
38
48
  isDeferred: boolean;
39
49
  status: AdshiftDeepLinkStatus;
40
- /** Error message when `status` is `error`. */
50
+ /** Error message when `status` is `error`; wording differs per platform. */
41
51
  errorMessage?: string;
52
+ /** How the link reached the app. */
53
+ source?: AdshiftDeepLinkSource;
54
+ /**
55
+ * Id of the click this open was attributed to. Absent for a deferred result
56
+ * and when no click was recorded.
57
+ */
58
+ clickId?: string;
42
59
  /**
43
- * Whether the result belongs to the first session after install. Android
44
- * reports it for every result, deferred or not; undefined on iOS.
60
+ * `false` when a deferred result is not certain to belong to this user: route
61
+ * them, but do not sign them in or grant a reward because of it.
62
+ * @platform ios
63
+ */
64
+ matchGuaranteed?: boolean;
65
+ /**
66
+ * Whether the result came in the first session after install. `isDeferred`
67
+ * alone does not mean a new user.
45
68
  */
46
69
  isFirstSession?: boolean;
47
70
  /** Custom sub-parameter 1 (`deep_link_sub1`). */
@@ -55,9 +78,7 @@ export interface AdshiftDeepLink {
55
78
  /** Custom sub-parameter 5 (`deep_link_sub5`). */
56
79
  deepLinkSub5?: string;
57
80
  }
58
- /**
59
- * Helper functions for creating `AdshiftDeepLink` objects.
60
- */
81
+ /** Builds `AdshiftDeepLink` values. */
61
82
  export declare const AdshiftDeepLink: {
62
83
  found(options: {
63
84
  deepLink: string;
@@ -65,6 +86,9 @@ export declare const AdshiftDeepLink: {
65
86
  params?: Record<string, string>;
66
87
  isDeferred?: boolean;
67
88
  isFirstSession?: boolean;
89
+ source?: AdshiftDeepLinkSource;
90
+ clickId?: string;
91
+ matchGuaranteed?: boolean;
68
92
  deepLinkSub1?: string;
69
93
  deepLinkSub2?: string;
70
94
  deepLinkSub3?: string;
@@ -73,17 +97,9 @@ export declare const AdshiftDeepLink: {
73
97
  }): AdshiftDeepLink;
74
98
  notFound(): AdshiftDeepLink;
75
99
  error(message: string): AdshiftDeepLink;
76
- /**
77
- * Creates a deep link from a native bridge object.
78
- *
79
- * @internal
80
- */
100
+ /** @internal */
81
101
  fromMap(map: Record<string, unknown>): AdshiftDeepLink;
82
102
  };
83
- /**
84
- * Converts `AdshiftDeepLink` to a plain object.
85
- *
86
- * @internal
87
- */
103
+ /** @internal */
88
104
  export declare function deepLinkToMap(deepLink: AdshiftDeepLink): Record<string, unknown>;
89
105
  //# sourceMappingURL=AdshiftDeepLink.d.ts.map