@adshift/react-native-plugin 3.0.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 (176) hide show
  1. package/AdShiftReactNativePlugin.podspec +20 -4
  2. package/CHANGELOG.md +30 -17
  3. package/README.md +55 -47
  4. package/android/build.gradle +2 -3
  5. package/android/consumer-rules.pro +2 -21
  6. package/android/src/main/AndroidManifest.xml +1 -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 +83 -157
  9. package/android/src/test/java/com/adshift/reactnativeplugin/ConsentSnapshotTest.kt +0 -20
  10. package/android/src/test/java/com/adshift/reactnativeplugin/DeepLinkDeliveryTest.kt +0 -4
  11. package/android/src/test/java/com/adshift/reactnativeplugin/InitializeOrderingTest.kt +37 -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 +7 -26
  14. package/android/src/test/java/com/adshift/reactnativeplugin/LaunchLinkRecordTest.kt +420 -0
  15. package/android/src/test/java/com/adshift/reactnativeplugin/ModuleTestSupport.kt +93 -34
  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 +2 -14
  19. package/ios/AdShiftReactNativePluginHelper.swift +14 -73
  20. package/ios/Core/BridgeRules.swift +24 -29
  21. package/lib/commonjs/Adshift.js +78 -285
  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.map +1 -1
  26. package/lib/commonjs/jest/index.js +4 -18
  27. package/lib/commonjs/jest/index.js.map +1 -1
  28. package/lib/commonjs/nativeSdkVersions.js +4 -6
  29. package/lib/commonjs/nativeSdkVersions.js.map +1 -1
  30. package/lib/commonjs/types/AdshiftAdRevenue.js +0 -24
  31. package/lib/commonjs/types/AdshiftAdRevenue.js.map +1 -1
  32. package/lib/commonjs/types/AdshiftConfig.js +3 -24
  33. package/lib/commonjs/types/AdshiftConfig.js.map +1 -1
  34. package/lib/commonjs/types/AdshiftConsent.js +9 -45
  35. package/lib/commonjs/types/AdshiftConsent.js.map +1 -1
  36. package/lib/commonjs/types/AdshiftConsentSnapshot.js +5 -24
  37. package/lib/commonjs/types/AdshiftConsentSnapshot.js.map +1 -1
  38. package/lib/commonjs/types/AdshiftDeepLink.js +3 -30
  39. package/lib/commonjs/types/AdshiftDeepLink.js.map +1 -1
  40. package/lib/commonjs/types/AdshiftError.js +7 -27
  41. package/lib/commonjs/types/AdshiftError.js.map +1 -1
  42. package/lib/commonjs/types/AdshiftEventParam.js +4 -38
  43. package/lib/commonjs/types/AdshiftEventParam.js.map +1 -1
  44. package/lib/commonjs/types/AdshiftEventType.js +1 -39
  45. package/lib/commonjs/types/AdshiftEventType.js.map +1 -1
  46. package/lib/commonjs/types/AdshiftThirdPartySharing.js +7 -38
  47. package/lib/commonjs/types/AdshiftThirdPartySharing.js.map +1 -1
  48. package/lib/commonjs/version.js +1 -1
  49. package/lib/module/Adshift.js +78 -285
  50. package/lib/module/Adshift.js.map +1 -1
  51. package/lib/module/NativeAdShiftReactNativePlugin.js +2 -12
  52. package/lib/module/NativeAdShiftReactNativePlugin.js.map +1 -1
  53. package/lib/module/index.js +1 -46
  54. package/lib/module/index.js.map +1 -1
  55. package/lib/module/jest/index.js +4 -18
  56. package/lib/module/jest/index.js.map +1 -1
  57. package/lib/module/nativeSdkVersions.js +4 -6
  58. package/lib/module/nativeSdkVersions.js.map +1 -1
  59. package/lib/module/types/AdshiftAdRevenue.js +0 -24
  60. package/lib/module/types/AdshiftAdRevenue.js.map +1 -1
  61. package/lib/module/types/AdshiftConfig.js +3 -24
  62. package/lib/module/types/AdshiftConfig.js.map +1 -1
  63. package/lib/module/types/AdshiftConsent.js +9 -45
  64. package/lib/module/types/AdshiftConsent.js.map +1 -1
  65. package/lib/module/types/AdshiftConsentSnapshot.js +5 -24
  66. package/lib/module/types/AdshiftConsentSnapshot.js.map +1 -1
  67. package/lib/module/types/AdshiftDeepLink.js +3 -31
  68. package/lib/module/types/AdshiftDeepLink.js.map +1 -1
  69. package/lib/module/types/AdshiftError.js +7 -28
  70. package/lib/module/types/AdshiftError.js.map +1 -1
  71. package/lib/module/types/AdshiftEventParam.js +4 -38
  72. package/lib/module/types/AdshiftEventParam.js.map +1 -1
  73. package/lib/module/types/AdshiftEventType.js +1 -39
  74. package/lib/module/types/AdshiftEventType.js.map +1 -1
  75. package/lib/module/types/AdshiftThirdPartySharing.js +7 -38
  76. package/lib/module/types/AdshiftThirdPartySharing.js.map +1 -1
  77. package/lib/module/version.js +1 -1
  78. package/lib/typescript/commonjs/src/Adshift.d.ts +61 -185
  79. package/lib/typescript/commonjs/src/Adshift.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts +10 -36
  81. package/lib/typescript/commonjs/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/src/index.d.ts +0 -32
  83. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/src/jest/index.d.ts +6 -20
  85. package/lib/typescript/commonjs/src/jest/index.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts +4 -6
  87. package/lib/typescript/commonjs/src/nativeSdkVersions.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/src/types/AdshiftAdRevenue.d.ts +0 -24
  89. package/lib/typescript/commonjs/src/types/AdshiftAdRevenue.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts +10 -37
  91. package/lib/typescript/commonjs/src/types/AdshiftConfig.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/src/types/AdshiftConsent.d.ts +9 -49
  93. package/lib/typescript/commonjs/src/types/AdshiftConsent.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/src/types/AdshiftConsentSnapshot.d.ts +10 -28
  95. package/lib/typescript/commonjs/src/types/AdshiftConsentSnapshot.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts +6 -34
  97. package/lib/typescript/commonjs/src/types/AdshiftDeepLink.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/src/types/AdshiftError.d.ts +7 -26
  99. package/lib/typescript/commonjs/src/types/AdshiftError.d.ts.map +1 -1
  100. package/lib/typescript/commonjs/src/types/AdshiftEventParam.d.ts +3 -19
  101. package/lib/typescript/commonjs/src/types/AdshiftEventParam.d.ts.map +1 -1
  102. package/lib/typescript/commonjs/src/types/AdshiftEventType.d.ts +1 -23
  103. package/lib/typescript/commonjs/src/types/AdshiftEventType.d.ts.map +1 -1
  104. package/lib/typescript/commonjs/src/types/AdshiftThirdPartySharing.d.ts +7 -38
  105. package/lib/typescript/commonjs/src/types/AdshiftThirdPartySharing.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  107. package/lib/typescript/module/src/Adshift.d.ts +61 -185
  108. package/lib/typescript/module/src/Adshift.d.ts.map +1 -1
  109. package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts +10 -36
  110. package/lib/typescript/module/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -1
  111. package/lib/typescript/module/src/index.d.ts +0 -32
  112. package/lib/typescript/module/src/index.d.ts.map +1 -1
  113. package/lib/typescript/module/src/jest/index.d.ts +6 -20
  114. package/lib/typescript/module/src/jest/index.d.ts.map +1 -1
  115. package/lib/typescript/module/src/nativeSdkVersions.d.ts +4 -6
  116. package/lib/typescript/module/src/nativeSdkVersions.d.ts.map +1 -1
  117. package/lib/typescript/module/src/types/AdshiftAdRevenue.d.ts +0 -24
  118. package/lib/typescript/module/src/types/AdshiftAdRevenue.d.ts.map +1 -1
  119. package/lib/typescript/module/src/types/AdshiftConfig.d.ts +10 -37
  120. package/lib/typescript/module/src/types/AdshiftConfig.d.ts.map +1 -1
  121. package/lib/typescript/module/src/types/AdshiftConsent.d.ts +9 -49
  122. package/lib/typescript/module/src/types/AdshiftConsent.d.ts.map +1 -1
  123. package/lib/typescript/module/src/types/AdshiftConsentSnapshot.d.ts +10 -28
  124. package/lib/typescript/module/src/types/AdshiftConsentSnapshot.d.ts.map +1 -1
  125. package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts +6 -34
  126. package/lib/typescript/module/src/types/AdshiftDeepLink.d.ts.map +1 -1
  127. package/lib/typescript/module/src/types/AdshiftError.d.ts +7 -26
  128. package/lib/typescript/module/src/types/AdshiftError.d.ts.map +1 -1
  129. package/lib/typescript/module/src/types/AdshiftEventParam.d.ts +3 -19
  130. package/lib/typescript/module/src/types/AdshiftEventParam.d.ts.map +1 -1
  131. package/lib/typescript/module/src/types/AdshiftEventType.d.ts +1 -23
  132. package/lib/typescript/module/src/types/AdshiftEventType.d.ts.map +1 -1
  133. package/lib/typescript/module/src/types/AdshiftThirdPartySharing.d.ts +7 -38
  134. package/lib/typescript/module/src/types/AdshiftThirdPartySharing.d.ts.map +1 -1
  135. package/lib/typescript/module/src/version.d.ts +1 -1
  136. package/package.json +11 -1
  137. package/src/Adshift.ts +82 -286
  138. package/src/NativeAdShiftReactNativePlugin.ts +10 -48
  139. package/src/index.tsx +1 -44
  140. package/src/jest/index.ts +6 -20
  141. package/src/nativeSdkVersions.ts +4 -6
  142. package/src/types/AdshiftAdRevenue.ts +0 -24
  143. package/src/types/AdshiftConfig.ts +11 -54
  144. package/src/types/AdshiftConsent.ts +9 -49
  145. package/src/types/AdshiftConsentSnapshot.ts +11 -38
  146. package/src/types/AdshiftDeepLink.ts +6 -34
  147. package/src/types/AdshiftError.ts +7 -26
  148. package/src/types/AdshiftEventParam.ts +4 -38
  149. package/src/types/AdshiftEventType.ts +1 -39
  150. package/src/types/AdshiftThirdPartySharing.ts +7 -38
  151. package/src/version.ts +1 -1
  152. package/vendor/ios/AdshiftSDK.files.json +30 -0
  153. package/vendor/ios/AdshiftSDK.xcframework/Info.plist +44 -0
  154. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/AdshiftSDK +0 -0
  155. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Headers/AdshiftSDK-Swift.h +315 -0
  156. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Info.plist +0 -0
  157. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.abi.json +18729 -0
  158. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +414 -0
  159. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  160. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios.swiftinterface +414 -0
  161. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/Modules/module.modulemap +4 -0
  162. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64/AdshiftSDK.framework/PrivacyInfo.xcprivacy +132 -0
  163. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/AdshiftSDK +0 -0
  164. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Headers/AdshiftSDK-Swift.h +626 -0
  165. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Info.plist +0 -0
  166. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +18729 -0
  167. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +414 -0
  168. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  169. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +414 -0
  170. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +18729 -0
  171. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +414 -0
  172. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  173. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/AdshiftSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +414 -0
  174. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/Modules/module.modulemap +4 -0
  175. package/vendor/ios/AdshiftSDK.xcframework/ios-arm64_x86_64-simulator/AdshiftSDK.framework/PrivacyInfo.xcprivacy +132 -0
  176. package/android/src/main/java/com/adshift/reactnativeplugin/RestoredIntents.kt +0 -64
@@ -1,8 +1,5 @@
1
1
  "use strict";
2
2
 
3
- /**
4
- * Status of a deep link result.
5
- */
6
3
  export let AdshiftDeepLinkStatus = /*#__PURE__*/function (AdshiftDeepLinkStatus) {
7
4
  /** A RightLink link, or a deferred deep link with a value. Navigate on this. */
8
5
  AdshiftDeepLinkStatus["Found"] = "found";
@@ -12,10 +9,6 @@ export let AdshiftDeepLinkStatus = /*#__PURE__*/function (AdshiftDeepLinkStatus)
12
9
  AdshiftDeepLinkStatus["Error"] = "error";
13
10
  return AdshiftDeepLinkStatus;
14
11
  }({});
15
-
16
- /**
17
- * How the link of a result reached the app.
18
- */
19
12
  export let AdshiftDeepLinkSource = /*#__PURE__*/function (AdshiftDeepLinkSource) {
20
13
  /** A Universal Link, or a link the app passed in itself. iOS. */
21
14
  AdshiftDeepLinkSource["UniversalLink"] = "ul";
@@ -39,28 +32,15 @@ export let AdshiftDeepLinkSource = /*#__PURE__*/function (AdshiftDeepLinkSource)
39
32
  }({});
40
33
 
41
34
  /**
42
- * Deep link delivered through `Adshift.onDeepLink()`.
43
- *
44
35
  * Navigate only on `status: 'found'`, and validate `deepLinkValue` first:
45
36
  * anyone can write a link. Any other URL comes back `notFound` with the URL
46
37
  * in `deepLink`. Treat `error` as "not yet".
47
- *
48
- * @example
49
- * ```typescript
50
- * Adshift.onDeepLink((deepLink) => {
51
- * if (deepLink.status === AdshiftDeepLinkStatus.Found) {
52
- * const productId = deepLink.params?.product_id;
53
- * }
54
- * });
55
- * ```
56
38
  */
57
39
 
58
40
  const SOURCES = new Set(Object.values(AdshiftDeepLinkSource));
59
41
  const SUB_KEYS = ['deepLinkSub1', 'deepLinkSub2', 'deepLinkSub3', 'deepLinkSub4', 'deepLinkSub5'];
60
42
 
61
- /**
62
- * Helper functions for creating `AdshiftDeepLink` objects.
63
- */
43
+ /** Builds `AdshiftDeepLink` values. */
64
44
  export const AdshiftDeepLink = {
65
45
  found(options) {
66
46
  const result = {
@@ -107,11 +87,7 @@ export const AdshiftDeepLink = {
107
87
  errorMessage: message
108
88
  };
109
89
  },
110
- /**
111
- * Creates a deep link from a native bridge object.
112
- *
113
- * @internal
114
- */
90
+ /** @internal */
115
91
  fromMap(map) {
116
92
  const params = readParams(map.params);
117
93
  const result = {
@@ -176,11 +152,7 @@ function readParams(value) {
176
152
  return count > 0 ? out : undefined;
177
153
  }
178
154
 
179
- /**
180
- * Converts `AdshiftDeepLink` to a plain object.
181
- *
182
- * @internal
183
- */
155
+ /** @internal */
184
156
  export function deepLinkToMap(deepLink) {
185
157
  const map = {
186
158
  isDeferred: deepLink.isDeferred,
@@ -1 +1 @@
1
- {"version":3,"names":["AdshiftDeepLinkStatus","AdshiftDeepLinkSource","SOURCES","Set","Object","values","SUB_KEYS","AdshiftDeepLink","found","options","result","deepLink","isDeferred","status","Found","deepLinkValue","undefined","params","isFirstSession","source","clickId","matchGuaranteed","key","value","notFound","NotFound","error","message","Error","errorMessage","fromMap","map","readParams","readStatus","deep_link_value","has","length","forEach","index","sub","out","count","raw","entries","String","deepLinkToMap"],"sourceRoot":"../../../src","sources":["types/AdshiftDeepLink.ts"],"mappings":";;AAAA;AACA;AACA;AACA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAC/B;EADUA,qBAAqB;EAI/B;EAJUA,qBAAqB;EAO/B;EAPUA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;;AAWjC;AACA;AACA;AACA,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAC/B;EADUA,qBAAqB;EAI/B;EAJUA,qBAAqB;EAO/B;EAPUA,qBAAqB;EAU/B;EAVUA,qBAAqB;EAa/B;EAbUA,qBAAqB;EAgB/B;EAhBUA,qBAAqB;EAmB/B;EAnBUA,qBAAqB;EAsB/B;EAtBUA,qBAAqB;EAyB/B;EAzBUA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;;AA6BjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgEA,MAAMC,OAAO,GAAG,IAAIC,GAAG,CAASC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EAAE;IACzE,IAAImB,GAAG,KAAK,IAAI,IAAIA,GAAG,KAAK1B,SAAS,EAAE;IACvCwB,GAAG,CAAClB,GAAG,CAAC,GAAG,OAAOoB,GAAG,KAAK,QAAQ,GAAGA,GAAG,GAAGE,MAAM,CAACF,GAAG,CAAC;IACtDD,KAAK,EAAE;EACT;EACA,OAAOA,KAAK,GAAG,CAAC,GAAGD,GAAG,GAAGxB,SAAS;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS6B,aAAaA,CAC3BlC,QAAyB,EACA;EACzB,MAAMoB,GAA4B,GAAG;IACnCnB,UAAU,EAAED,QAAQ,CAACC,UAAU;IAC/BC,MAAM,EAAEF,QAAQ,CAACE;EACnB,CAAC;EACD,KAAK,MAAM,CAACS,GAAG,EAAEC,KAAK,CAAC,IAAInB,MAAM,CAACuC,OAAO,CAAChC,QAAQ,CAAC,EAAE;IACnD,IAAIY,KAAK,KAAKP,SAAS,IAAI,EAAEM,GAAG,IAAIS,GAAG,CAAC,EAAE;MACxCA,GAAG,CAACT,GAAG,CAAC,GAAGC,KAAK;IAClB;EACF;EACA,OAAOQ,GAAG;AACZ","ignoreList":[]}
1
+ {"version":3,"names":["AdshiftDeepLinkStatus","AdshiftDeepLinkSource","SOURCES","Set","Object","values","SUB_KEYS","AdshiftDeepLink","found","options","result","deepLink","isDeferred","status","Found","deepLinkValue","undefined","params","isFirstSession","source","clickId","matchGuaranteed","key","value","notFound","NotFound","error","message","Error","errorMessage","fromMap","map","readParams","readStatus","deep_link_value","has","length","forEach","index","sub","out","count","raw","entries","String","deepLinkToMap"],"sourceRoot":"../../../src","sources":["types/AdshiftDeepLink.ts"],"mappings":";;AAAA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAC/B;EADUA,qBAAqB;EAI/B;EAJUA,qBAAqB;EAO/B;EAPUA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAWjC,WAAYC,qBAAqB,0BAArBA,qBAAqB;EAC/B;EADUA,q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c,EAAsC;EACtE,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,EAAE;IAC/C,OAAOP,SAAS;EAClB;EACA,MAAMwB,GAA2B,GAAG,CAAC,CAAC;EACtC,IAAIC,KAAK,GAAG,CAAC;EACb,KAAK,MAAM,CAACnB,GAAG,EAAEoB,GAAG,CAAC,IAAItC,MAAM,CAACuC,OAAO,CAACpB,KAAgC,CAAC,EAAE;IACzE,IAAImB,GAAG,KAAK,IAAI,IAAIA,GAAG,KAAK1B,SAAS,EAAE;IACvCwB,GAAG,CAAClB,GAAG,CAAC,GAAG,OAAOoB,GAAG,KAAK,QAAQ,GAAGA,GAAG,GAAGE,MAAM,CAACF,GAAG,CAAC;IACtDD,KAAK,EAAE;EACT;EACA,OAAOA,KAAK,GAAG,CAAC,GAAGD,GAAG,GAAGxB,SAAS;AACpC;;AAEA;AACA,OAAO,SAAS6B,aAAaA,CAC3BlC,QAAyB,EACA;EACzB,MAAMoB,GAA4B,GAAG;IACnCnB,UAAU,EAAED,QAAQ,CAACC,UAAU;IAC/BC,MAAM,EAAEF,QAAQ,CAACE;EACnB,CAAC;EACD,KAAK,MAAM,CAACS,GAAG,EAAEC,KAAK,CAAC,IAAInB,MAAM,CAACuC,OAAO,CAAChC,QAAQ,CAAC,EAAE;IACnD,IAAIY,KAAK,KAAKP,SAAS,IAAI,EAAEM,GAAG,IAAIS,GAAG,CAAC,EAAE;MACxCA,GAAG,CAACT,GAAG,CAAC,GAAGC,KAAK;IAClB;EACF;EACA,OAAOQ,GAAG;AACZ","ignoreList":[]}
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
2
 
3
- /**
4
- * Platform-neutral error codes used by every rejected promise and by
5
- * `StartResult.errorCode`.
6
- */
3
+ /** Codes of every rejected promise and of `StartResult.errorCode`. */
7
4
  export let AdshiftErrorCode = /*#__PURE__*/function (AdshiftErrorCode) {
8
5
  /** `Adshift.initialize()` has not been called. */
9
6
  AdshiftErrorCode["NotInitialized"] = "NOT_INITIALIZED";
@@ -11,9 +8,9 @@ export let AdshiftErrorCode = /*#__PURE__*/function (AdshiftErrorCode) {
11
8
  AdshiftErrorCode["NotStarted"] = "NOT_STARTED";
12
9
  /** The API key was rejected by the AdShift backend. */
13
10
  AdshiftErrorCode["InvalidApiKey"] = "INVALID_API_KEY";
14
- /** Tracking is disabled for this app on the AdShift side. */
11
+ /** Tracking is turned off for this device. */
15
12
  AdshiftErrorCode["OptedOut"] = "OPTED_OUT";
16
- /** The event queue is full; the call was not accepted. */
13
+ /** Too many calls are queued; this one was not accepted. */
17
14
  AdshiftErrorCode["QueueFull"] = "QUEUE_FULL";
18
15
  /** A parameter failed validation. */
19
16
  AdshiftErrorCode["InvalidArgument"] = "INVALID_ARGUMENT";
@@ -22,31 +19,14 @@ export let AdshiftErrorCode = /*#__PURE__*/function (AdshiftErrorCode) {
22
19
  return AdshiftErrorCode;
23
20
  }({});
24
21
 
25
- /**
26
- * Platform-specific details attached to an `AdshiftError`.
27
- */
28
-
29
- /**
30
- * Error thrown or rejected by the AdShift plugin.
31
- *
32
- * `code` is always one of `AdshiftErrorCode`; the original native code, when
33
- * there is one, is available in `userInfo.nativeCode`.
34
- */
22
+ /** `code` is always an `AdshiftErrorCode`; a native code is in `userInfo`. */
35
23
 
36
24
  const CODES = new Set(Object.values(AdshiftErrorCode));
37
-
38
- /**
39
- * Type guard for errors produced by the plugin.
40
- */
41
25
  export function isAdshiftError(error) {
42
26
  return typeof error === 'object' && error !== null && typeof error.code === 'string' && CODES.has(error.code);
43
27
  }
44
28
 
45
- /**
46
- * Builds an `AdshiftError` from a code and message.
47
- *
48
- * @internal
49
- */
29
+ /** @internal */
50
30
  export function createAdshiftError(code, message, userInfo = {}) {
51
31
  const error = new Error(message);
52
32
  error.name = 'AdshiftError';
@@ -56,9 +36,8 @@ export function createAdshiftError(code, message, userInfo = {}) {
56
36
  }
57
37
 
58
38
  /**
59
- * Normalises a promise rejection coming from the native module into an
60
- * `AdshiftError`. Native modules reject with `{ code, message, userInfo }`.
61
- *
39
+ * Native modules reject with `{ code, message, userInfo }`; a code outside
40
+ * `AdshiftErrorCode` becomes `UNKNOWN`, kept as `nativeCode`.
62
41
  * @internal
63
42
  */
64
43
  export function toAdshiftError(error) {
@@ -1 +1 @@
1
- {"version":3,"names":["AdshiftErrorCode","CODES","Set","Object","values","isAdshiftError","error","code","has","createAdshiftError","message","userInfo","Error","name","toAdshiftError","raw","info","nativeCode","nativeDomain","undefined","Unknown"],"sourceRoot":"../../../src","sources":["types/AdshiftError.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,WAAYA,gBAAgB,0BAAhBA,gBAAgB;EAC1B;EADUA,gBAAgB;EAG1B;EAHUA,gBAAgB;EAK1B;EALUA,gBAAgB;EAO1B;EAPUA,gBAAgB;EAS1B;EATUA,gBAAgB;EAW1B;EAXUA,gBAAgB;EAa1B;EAbUA,gBAAgB;EAAA,OAAhBA,gBAAgB;AAAA;;AAiB5B;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA;;AAMA,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAASC,MAAM,CAACC,MAAM,CAACJ,gBAAgB,CAAC,CAAC;;AAE9D;AACA;AACA;AACA,OAAO,SAASK,cAAcA,CAACC,KAAc,EAAyB;EACpE,OACE,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,KAAK,IAAI,IACd,OAAQA,KAAK,CAAwBC,IAAI,KAAK,QAAQ,IACtDN,KAAK,CAACO,GAAG,CAAEF,KAAK,CAAsBC,IAAI,CAAC;AAE/C;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,kBAAkBA,CAChCF,IAAsB,EACtBG,OAAe,EACfC,QAA0B,GAAG,CAAC,CAAC,EACjB;EACd,MAAML,KAAK,GAAG,IAAIM,KAAK,CAACF,OAAO,CAAiB;EAChDJ,KAAK,CAACO,IAAI,GAAG,cAAc;EAC3BP,KAAK,CAACC,IAAI,GAAGA,IAAI;EACjBD,KAAK,CAACK,QAAQ,GAAGA,QAAQ;EACzB,OAAOL,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASQ,cAAcA,CAACR,KAAc,EAAgB;EAC3D,IAAID,cAAc,CAACC,KAAK,CAAC,EAAE;IACzB,IAAI,CAACA,KAAK,CAACK,QAAQ,EAAE;MACnBL,KAAK,CAACK,QAAQ,GAAG,CAAC,CAAC;IACrB;IACA,OAAOL,KAAK;EACd;EACA,MAAMS,GAAG,GAAGT,KAIJ;EACR,MAAMI,OAAO,GACX,OAAOK,GAAG,EAAEL,OAAO,KAAK,QAAQ,GAAGK,GAAG,CAACL,OAAO,GAAG,eAAe;EAClE,MAAMM,IAAsB,GAAG,CAAC,CAAC;EACjC,MAAMC,UAAU,GAAGF,GAAG,EAAEJ,QAAQ,EAAEM,UAAU;EAC5C,IAAI,OAAOA,UAAU,KAAK,QAAQ,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACpED,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC9B;EACA,MAAMC,YAAY,GAAGH,GAAG,EAAEJ,QAAQ,EAAEO,YAAY;EAChD,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;IACpCF,IAAI,CAACE,YAAY,GAAGA,YAAY;EAClC;EACA,IAAIF,IAAI,CAACC,UAAU,KAAKE,SAAS,IAAI,OAAOJ,GAAG,EAAER,IAAI,KAAK,QAAQ,EAAE;IAClES,IAAI,CAACC,UAAU,GAAGF,GAAG,CAACR,IAAI;EAC5B;EACA,OAAOE,kBAAkB,CAACT,gBAAgB,CAACoB,OAAO,EAAEV,OAAO,EAAEM,IAAI,CAAC;AACpE","ignoreList":[]}
1
+ {"version":3,"names":["AdshiftErrorCode","CODES","Set","Object","values","isAdshiftError","error","code","has","createAdshiftError","message","userInfo","Error","name","toAdshiftError","raw","info","nativeCode","nativeDomain","undefined","Unknown"],"sourceRoot":"../../../src","sources":["types/AdshiftError.ts"],"mappings":";;AAAA;AACA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C,CAAC;EACjC,MAAMC,UAAU,GAAGF,GAAG,EAAEJ,QAAQ,EAAEM,UAAU;EAC5C,IAAI,OAAOA,UAAU,KAAK,QAAQ,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACpED,IAAI,CAACC,UAAU,GAAGA,UAAU;EAC9B;EACA,MAAMC,YAAY,GAAGH,GAAG,EAAEJ,QAAQ,EAAEO,YAAY;EAChD,IAAI,OAAOA,YAAY,KAAK,QAAQ,EAAE;IACpCF,IAAI,CAACE,YAAY,GAAGA,YAAY;EAClC;EACA,IAAIF,IAAI,CAACC,UAAU,KAAKE,SAAS,IAAI,OAAOJ,GAAG,EAAER,IAAI,KAAK,QAAQ,EAAE;IAClES,IAAI,CAACC,UAAU,GAAGF,GAAG,CAACR,IAAI;EAC5B;EACA,OAAOE,kBAAkB,CAACT,gBAAgB,CAACoB,OAAO,EAAEV,OAAO,EAAEM,IAAI,CAAC;AACpE","ignoreList":[]}
@@ -1,26 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * Standard parameter names for the `values` passed to `Adshift.trackEvent()`.
5
- *
6
- * Reports aggregate these names. Any other key is kept with the event as a
7
- * custom parameter, so a misspelled or invented name is stored but never
8
- * counted — use the constants for anything a report has to add up, revenue
9
- * above all.
10
- *
11
- * @example
12
- * ```typescript
13
- * await Adshift.trackEvent(AdshiftEventType.Purchase, {
14
- * [AdshiftEventParam.Revenue]: 9.99,
15
- * [AdshiftEventParam.Currency]: 'USD',
16
- * [AdshiftEventParam.ContentId]: 'SKU123',
17
- * size: 'XL', // custom parameters are fine alongside them
18
- * });
19
- * ```
4
+ * Standard names for `trackEvent()` values. Reports add up only these; any
5
+ * other key is kept as a custom parameter and never counted, so use the
6
+ * constants for revenue above all.
20
7
  */
21
8
  export const AdshiftEventParam = {
22
- // ============ Commerce ============
23
-
24
9
  Price: 'as_price',
25
10
  /** The number reports read as revenue. Always pair it with `Currency`. */
26
11
  Revenue: 'as_revenue',
@@ -35,8 +20,6 @@ export const AdshiftEventParam = {
35
20
  CouponCode: 'as_coupon_code',
36
21
  PaymentInfoAvailable: 'as_payment_info_available',
37
22
  Validated: 'as_validated',
38
- // ============ Content ============
39
-
40
23
  ContentType: 'as_content_type',
41
24
  ContentId: 'as_content_id',
42
25
  ContentList: 'as_content_list',
@@ -44,13 +27,9 @@ export const AdshiftEventParam = {
44
27
  Class: 'as_class',
45
28
  Description: 'as_description',
46
29
  SearchString: 'as_search_string',
47
- // ============ Ratings and reviews ============
48
-
49
30
  RatingValue: 'as_rating_value',
50
31
  MaxRatingValue: 'as_max_rating_value',
51
32
  ReviewText: 'as_review_text',
52
- // ============ User and progress ============
53
-
54
33
  CustomerUserId: 'as_customer_user_id',
55
34
  RegistrationMethod: 'as_registration_method',
56
35
  Level: 'as_level',
@@ -59,15 +38,11 @@ export const AdshiftEventParam = {
59
38
  TutorialId: 'as_tutorial_id',
60
39
  AchievementId: 'as_achievement_id',
61
40
  VirtualCurrencyName: 'as_virtual_currency_name',
62
- // ============ App and links ============
63
-
64
41
  DeepLink: 'as_deep_link',
65
42
  OldVersion: 'as_old_version',
66
43
  NewVersion: 'as_new_version',
67
44
  Channel: 'as_channel',
68
45
  TouchObj: 'as_touch_obj',
69
- // ============ Dates and places ============
70
-
71
46
  DateA: 'as_date_a',
72
47
  DateB: 'as_date_b',
73
48
  EventStart: 'as_event_start',
@@ -80,8 +55,6 @@ export const AdshiftEventParam = {
80
55
  DestinationA: 'as_destination_a',
81
56
  DestinationB: 'as_destination_b',
82
57
  DestinationList: 'as_destination_list',
83
- // ============ Travel ============
84
-
85
58
  DepartingDepartureDate: 'as_departing_departure_date',
86
59
  ReturningDepartureDate: 'as_returning_departure_date',
87
60
  DepartingArrivalDate: 'as_departing_arrival_date',
@@ -100,8 +73,6 @@ export const AdshiftEventParam = {
100
73
  PreferredPriceRange: 'as_preferred_price_range',
101
74
  PreferredNeighborhoods: 'as_preferred_neighborhoods',
102
75
  PreferredNumStops: 'as_preferred_num_stops',
103
- // ============ Free-form slots ============
104
-
105
76
  Param1: 'as_param_1',
106
77
  Param2: 'as_param_2',
107
78
  Param3: 'as_param_3',
@@ -112,10 +83,8 @@ export const AdshiftEventParam = {
112
83
  Param8: 'as_param_8',
113
84
  Param9: 'as_param_9',
114
85
  Param10: 'as_param_10',
115
- // ============ Ad revenue ============
116
86
  // `logAdRevenue()` fills Revenue, Currency, AdRevenueSource and
117
- // AdRevenueNetworkName from its own arguments and drops them from
118
- // `additionalParameters`. The rest below are yours to pass.
87
+ // AdRevenueNetworkName itself and drops them from `additionalParameters`.
119
88
 
120
89
  AdRevenueSource: 'as_adrev_source',
121
90
  AdRevenueNetworkName: 'as_adrev_network_name',
@@ -126,9 +95,6 @@ export const AdshiftEventParam = {
126
95
  AdRevenueAdUnitId: 'as_adrev_ad_unit_id',
127
96
  AdRevenuePrecision: 'as_adrev_precision'
128
97
  };
129
- /**
130
- * Returns all standard parameter names as an array.
131
- */
132
98
  export function getAllEventParams() {
133
99
  return Object.values(AdshiftEventParam);
134
100
  }
@@ -1 +1 @@
1
- {"version":3,"names":["AdshiftEventParam","Price","Revenue","ProjectedRevenue","Currency","Quantity","ReceiptId","OrderId","CouponCode","PaymentInfoAvailable","Validated","ContentType","ContentId","ContentList","Content","Class","Description","SearchString","RatingValue","MaxRatingValue","ReviewText","CustomerUserId","RegistrationMethod","Level","Score","Success","TutorialId","AchievementId","VirtualCurrencyName","DeepLink","OldVersion","NewVersion","Channel","TouchObj","DateA","DateB","EventStart","EventEnd","Latitude","Longitude","City","Region","Country","DestinationA","DestinationB","DestinationList","DepartingDepartureDate","ReturningDepartureDate","DepartingArrivalDate","ReturningArrivalDate","TravelStart","TravelEnd","SuggestedDestinations","SuggestedHotels","NumAdults","NumChildren","NumInfants","UserScore","HotelScore","PurchaseCurrency","PreferredStarRatings","PreferredPriceRange","PreferredNeighborhoods","PreferredNumStops","Param1","Param2","Param3","Param4","Param5","Param6","Param7","Param8","Param9","Param10","AdRevenueSource","AdRevenueNetworkName","AdRevenueMediatedNetworkName","AdRevenueAdType","AdRevenueAdSize","AdRevenuePlacementId","AdRevenueAdUnitId","AdRevenuePrecision","getAllEventParams","Object","values"],"sourceRoot":"../../../src","sources":["types/AdshiftEventParam.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAG;EAC/B;;EAEAC,KAAK,EAAE,UAAU;EAEjB;EACAC,OAAO,EAAE,YAAY;EAErB;EACAC,gBAAgB,EAAE,sBAAsB;EAExC;EACAC,QAAQ,EAAE,aAAa;EAEvBC,QAAQ,EAAE,aAAa;EAEvBC,SAAS,EAAE,eAAe;EAE1B;EACAC,OAAO,EAAE,aAAa;EAEtBC,UAAU,EAAE,gBAAgB;EAE5BC,oBAAoB,EAAE,2BAA2B;EAEjDC,SAAS,EAAE,cAAc;EAEzB;;EAEAC,WAAW,EAAE,iBAAiB;EAE9BC,SAAS,EAAE,eAAe;EAE1BC,WAAW,EAAE,iBAAiB;EAE9BC,OAAO,EAAE,YAAY;EAErBC,KAAK,EAAE,UAAU;EAEjBC,WAAW,EAAE,gBAAgB;EAE7BC,YAAY,EAAE,kBAAkB;EAEhC;;EAEAC,WAAW,EAAE,iBAAiB;EAE9BC,cAAc,EAAE,qBAAqB;EAErCC,UAAU,EAAE,gBAAgB;EAE5B;;EAEAC,cAAc,EAAE,qBAAqB;EAErCC,kBAAkB,EAAE,wBAAwB;EAE5CC,KAAK,EAAE,UAAU;EAEjBC,KAAK,EAAE,UAAU;EAEjBC,OAAO,EAAE,YAAY;EAErBC,UAAU,EAAE,gBAAgB;EAE5BC,aAAa,EAAE,mBAAmB;EAElCC,mBAAmB,EAAE,0BAA0B;EAE/C;;EAEAC,QAAQ,EAAE,cAAc;EAExBC,UAAU,EAAE,gBAAgB;EAE5BC,UAAU,EAAE,gBAAgB;EAE5BC,OAAO,EAAE,YAAY;EAErBC,Q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BAAuB;EAE7CC,4BAA4B,EAAE,gCAAgC;EAE9DC,eAAe,EAAE,kBAAkB;EAEnCC,eAAe,EAAE,kBAAkB;EAEnCC,oBAAoB,EAAE,uBAAuB;EAE7CC,iBAAiB,EAAE,qBAAqB;EAExCC,kBAAkB,EAAE;AACtB,CAAU;AAKV;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAA,EAA6B;EAC5D,OAAOC,MAAM,CAACC,MAAM,CAACpF,iBAAiB,CAAC;AACzC","ignoreList":[]}
1
+ {"version":3,"names":["AdshiftEventParam","Price","Revenue","ProjectedRevenue","Currency","Quantity","ReceiptId","OrderId","CouponCode","PaymentInfoAvailable","Validated","ContentType","ContentId","ContentList","Content","Class","Description","SearchString","RatingValue","MaxRatingValue","ReviewText","CustomerUserId","RegistrationMethod","Level","Score","Success","TutorialId","AchievementId","VirtualCurrencyName","DeepLink","OldVersion","NewVersion","Channel","TouchObj","DateA","DateB","EventStart","EventEnd","Latitude","Longitude","City","Region","Country","DestinationA","DestinationB","DestinationList","DepartingDepartureDate","ReturningDepartureDate","DepartingArrivalDate","ReturningArrivalDate","TravelStart","TravelEnd","SuggestedDestinations","SuggestedHotels","NumAdults","NumChildren","NumInfants","UserScore","HotelScore","PurchaseCurrency","PreferredStarRatings","PreferredPriceRange","PreferredNeighborhoods","PreferredNumStops","Param1","Param2","Param3","Param4","Param5","Param6","Param7","Param8","Param9","Param10","AdRevenueSource","AdRevenueNetworkName","AdRevenueMediatedNetworkName","AdRevenueAdType","AdRevenueAdSize","AdRevenuePlacementId","AdRevenueAdUnitId","AdRevenuePrecision","getAllEventParams","Object","values"],"sourceRoot":"../../../src","sources":["types/AdshiftEventParam.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,iBAAiB,GAAG;EAC/BC,KAAK,EAAE,UAAU;EAEjB;EACAC,OAAO,EAAE,YAAY;EAErB;EACAC,gBAAgB,EAAE,sBAAsB;EAExC;EACAC,QAAQ,EAAE,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;EAEjDC,oBAAoB,EAAE,2BAA2B;EAEjDC,WAAW,EAAE,iBAAiB;EAE9BC,SAAS,EAAE,eAAe;EAE1BC,qBAAqB,EAAE,2BAA2B;EAElDC,eAAe,EAAE,qBAAqB;EAEtCC,SAAS,EAAE,eAAe;EAE1BC,WAAW,EAAE,iBAAiB;EAE9BC,UAAU,EAAE,gBAAgB;EAE5BC,SAAS,EAAE,eAAe;EAE1BC,UAAU,EAAE,gBAAgB;EAE5BC,gBAAgB,EAAE,sBAAsB;EAExCC,oBAAoB,EAAE,2BAA2B;EAEjDC,mBAAmB,EAAE,0BAA0B;EAE/CC,sBAAsB,EAAE,4BAA4B;EAEpDC,iBAAiB,EAAE,wBAAwB;EAE3CC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,MAAM,EAAE,YAAY;EAEpBC,OAAO,EAAE,aAAa;EAEtB;EACA;;EAEAC,eAAe,EAAE,iBAAiB;EAElCC,oBAAoB,EAAE,uBAAuB;EAE7CC,4BAA4B,EAAE,gCAAgC;EAE9DC,eAAe,EAAE,kBAAkB;EAEnCC,eAAe,EAAE,kBAAkB;EAEnCC,oBAAoB,EAAE,uBAAuB;EAE7CC,iBAAiB,EAAE,qBAAqB;EAExCC,kBAAkB,EAAE;AACtB,CAAU;AAKV,OAAO,SAASC,iBAAiBA,CAAA,EAA6B;EAC5D,OAAOC,MAAM,CAACC,MAAM,CAACpF,iBAAiB,CAAC;AACzC","ignoreList":[]}
@@ -1,28 +1,7 @@
1
1
  "use strict";
2
2
 
3
- /**
4
- * Predefined event types for AdShift SDK.
5
- *
6
- * Use these constants for consistent event naming across your app.
7
- *
8
- * Pair them with `AdshiftEventParam` for the values.
9
- *
10
- * @example
11
- * ```typescript
12
- * await Adshift.trackEvent(AdshiftEventType.AddToCart, {
13
- * [AdshiftEventParam.ContentId]: 'SKU123',
14
- * [AdshiftEventParam.Price]: 29.99,
15
- * });
16
- * ```
17
- *
18
- * You can also use custom event names as strings:
19
- * ```typescript
20
- * await Adshift.trackEvent('custom_event_name');
21
- * ```
22
- */
3
+ /** Standard event names; any other name is tracked as a custom event. */
23
4
  export const AdshiftEventType = {
24
- // ============ E-commerce Events ============
25
-
26
5
  AddToCart: 'as_add_to_cart',
27
6
  AddToWishList: 'as_add_to_wishlist',
28
7
  AddPaymentInfo: 'as_add_payment_info',
@@ -31,52 +10,35 @@ export const AdshiftEventType = {
31
10
  ContentView: 'as_content_view',
32
11
  ListView: 'as_list_view',
33
12
  Search: 'as_search',
34
- // ============ User Lifecycle Events ============
35
-
36
13
  CompleteRegistration: 'as_complete_registration',
37
14
  Login: 'as_login',
38
15
  TutorialCompletion: 'as_tutorial_completion',
39
16
  Subscribe: 'as_subscribe',
40
17
  StartTrial: 'as_start_trial',
41
- // ============ Gaming Events ============
42
-
43
18
  LevelAchieved: 'as_level_achieved',
44
19
  AchievementUnlocked: 'as_achievement_unlocked',
45
20
  /** Note the plural in the value; the key is singular for compatibility. */
46
21
  SpentCredit: 'as_spent_credits',
47
- // ============ Engagement Events ============
48
-
49
22
  Rate: 'as_rate',
50
23
  Share: 'as_share',
51
24
  Invite: 'as_invite',
52
25
  ReEngage: 'as_re_engage',
53
26
  Update: 'as_update',
54
27
  OpenedFromPushNotification: 'as_opened_from_push_notification',
55
- // ============ Travel Events ============
56
-
57
28
  TravelBooking: 'as_travel_booking',
58
- // ============ Ad Events ============
59
-
60
29
  AdClick: 'as_ad_click',
61
30
  AdView: 'as_ad_view',
62
31
  /** Ad revenue impression. Prefer `Adshift.logAdRevenue()`. */
63
32
  AdRevenue: 'as_ad_revenue',
64
- // ============ Location Events ============
65
-
66
33
  /** Region or place the user moved to, as your own values. */
67
34
  LocationChanged: 'as_location_changed',
68
35
  /** Latitude and longitude. Send only what your privacy notice covers. */
69
36
  LocationCoordinates: 'as_location_coordinates',
70
- // ============ Other Events ============
71
-
72
37
  /** Your order identifier, for matching purchases with your own records. */
73
38
  OrderId: 'as_order_id',
74
39
  /** Segment the user belongs to, for audience reporting. */
75
40
  CustomerSegment: 'as_customer_segment'
76
41
  };
77
- /**
78
- * Returns all predefined event types as an array.
79
- */
80
42
  export function getAllEventTypes() {
81
43
  return Object.values(AdshiftEventType);
82
44
  }
@@ -1 +1 @@
1
- {"version":3,"names":["AdshiftEventType","AddToCart","AddToWishList","AddPaymentInfo","InitiatedCheckout","Purchase","ContentView","ListView","Search","CompleteRegistration","Login","TutorialCompletion","Subscribe","StartTrial","LevelAchieved","AchievementUnlocked","SpentCredit","Rate","Share","Invite","ReEngage","Update","OpenedFromPushNotification","TravelBooking","AdClick","AdView","AdRevenue","LocationChanged","LocationCoordinates","OrderId","CustomerSegment","getAllEventTypes","Object","values"],"sourceRoot":"../../../src","sources":["types/AdshiftEventType.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC9B;;EAEAC,SAAS,EAAE,gBAAgB;EAE3BC,aAAa,EAAE,oBAAoB;EAEnCC,cAAc,EAAE,qBAAqB;EAErCC,iBAAiB,EAAE,uBAAuB;EAE1CC,QAAQ,EAAE,aAAa;EAEvBC,WAAW,EAAE,iBAAiB;EAE9BC,QAAQ,EAAE,cAAc;EAExBC,MAAM,EAAE,WAAW;EAEnB;;EAEAC,oBAAoB,EAAE,0BAA0B;EAEhDC,KAAK,EAAE,UAAU;EAEjBC,kBAAkB,EAAE,wBAAwB;EAE5CC,SAAS,EAAE,cAAc;EAEzBC,UAAU,EAAE,gBAAgB;EAE5B;;EAEAC,aAAa,EAAE,mBAAmB;EAElCC,mBAAmB,EAAE,yBAAyB;EAE9C;EACAC,WAAW,EAAE,kBAAkB;EAE/B;;EAEAC,IAAI,EAAE,SAAS;EAEfC,KAAK,EAAE,UAAU;EAEjBC,MAAM,EAAE,WAAW;EAEnBC,QAAQ,EAAE,cAAc;EAExBC,MAAM,EAAE,WAAW;EAEnBC,0BAA0B,EAAE,kCAAkC;EAE9D;;EAEAC,aAAa,EAAE,mBAAmB;EAElC;;EAEAC,OAAO,EAAE,aAAa;EAEtBC,MAAM,EAAE,YAAY;EAEpB;EACAC,SAAS,EAAE,eAAe;EAE1B;;EAEA;EACAC,eAAe,EAAE,qBAAqB;EAEtC;EACAC,mBAAmB,EAAE,yBAAyB;EAE9C;;EAEA;EACAC,OAAO,EAAE,aAAa;EAEtB;EACAC,eAAe,EAAE;AACnB,CAAU;AAKV;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAA,EAA4B;EAC1D,OAAOC,MAAM,CAACC,MAAM,CAACjC,gBAAgB,CAAC;AACxC","ignoreList":[]}
1
+ {"version":3,"names":["AdshiftEventType","AddToCart","AddToWishList","AddPaymentInfo","InitiatedCheckout","Purchase","ContentView","ListView","Search","CompleteRegistration","Login","TutorialCompletion","Subscribe","StartTrial","LevelAchieved","AchievementUnlocked","SpentCredit","Rate","Share","Invite","ReEngage","Update","OpenedFromPushNotification","TravelBooking","AdClick","AdView","AdRevenue","LocationChanged","LocationCoordinates","OrderId","CustomerSegment","getAllEventTypes","Object","values"],"sourceRoot":"../../../src","sources":["types/AdshiftEventType.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC9BC,SAAS,EAAE,gBAAgB;EAE3BC,aAAa,EAAE,oBAAoB;EAEnCC,cAAc,EAAE,qBAAqB;EAErCC,iBAAiB,EAAE,uBAAuB;EAE1CC,QAAQ,EAAE,aAAa;EAEvBC,WAAW,EAAE,iBAAiB;EAE9BC,QAAQ,EAAE,cAAc;EAExBC,MAAM,EAAE,WAAW;EAEnBC,oBAAoB,EAAE,0BAA0B;EAEhDC,KAAK,EAAE,UAAU;EAEjBC,kBAAkB,EAAE,wBAAwB;EAE5CC,SAAS,EAAE,cAAc;EAEzBC,UAAU,EAAE,gBAAgB;EAE5BC,aAAa,EAAE,mBAAmB;EAElCC,mBAAmB,EAAE,yBAAyB;EAE9C;EACAC,WAAW,EAAE,kBAAkB;EAE/BC,IAAI,EAAE,SAAS;EAEfC,KAAK,EAAE,UAAU;EAEjBC,MAAM,EAAE,WAAW;EAEnBC,QAAQ,EAAE,cAAc;EAExBC,MAAM,EAAE,WAAW;EAEnBC,0BAA0B,EAAE,kCAAkC;EAE9DC,aAAa,EAAE,mBAAmB;EAElCC,OAAO,EAAE,aAAa;EAEtBC,MAAM,EAAE,YAAY;EAEpB;EACAC,SAAS,EAAE,eAAe;EAE1B;EACAC,eAAe,EAAE,qBAAqB;EAEtC;EACAC,mBAAmB,EAAE,yBAAyB;EAE9C;EACAC,OAAO,EAAE,aAAa;EAEtB;EACAC,eAAe,EAAE;AACnB,CAAU;AAKV,OAAO,SAASC,gBAAgBA,CAAA,EAA4B;EAC1D,OAAOC,MAAM,CAACC,MAAM,CAACjC,gBAAgB,CAAC;AACxC","ignoreList":[]}
@@ -1,35 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  /**
4
- * What the app says about passing this user's data on to someone else.
5
- *
6
- * A separate question from {@link AdshiftConsent}, and one with the opposite
7
- * default. Consent under GDPR must be affirmative, so a flag nobody set counts
8
- * as no consent. Here nothing said means sharing is allowed — which is why this
9
- * is not a fourth flag on the consent object: folding the two together would
10
- * make one of them wrong.
11
- *
12
- * The three states live in the calls rather than in a nullable field. Never
13
- * calling `Adshift.setThirdPartySharing()` leaves the question unanswered,
14
- * `Adshift.clearThirdPartySharing()` returns to unanswered, and the value here
15
- * is the answer itself.
16
- *
17
- * An object rather than a bare `boolean` so a field can be added later without
18
- * breaking callers.
19
- *
20
- * @example
21
- * ```typescript
22
- * // The user asked not to have their data passed on
23
- * Adshift.setThirdPartySharing(AdshiftThirdPartySharing.optedOut());
24
- *
25
- * // The user was asked and did not opt out
26
- * Adshift.setThirdPartySharing(AdshiftThirdPartySharing.allowed());
27
- * ```
4
+ * The user's answer on passing their data on to advertising partners. Unlike
5
+ * consent, no answer means allowed. Until `Adshift.setThirdPartySharing()` is
6
+ * called, or after `clearThirdPartySharing()`, the question is unanswered.
28
7
  */
29
8
 
30
- /**
31
- * Helper functions for creating `AdshiftThirdPartySharing` objects.
32
- */
9
+ /** Builds `AdshiftThirdPartySharing` values. */
33
10
  export const AdshiftThirdPartySharing = {
34
11
  /** The user asked not to have their data passed on. */
35
12
  optedOut() {
@@ -38,12 +15,8 @@ export const AdshiftThirdPartySharing = {
38
15
  };
39
16
  },
40
17
  /**
41
- * The user did not ask to be excluded.
42
- *
43
- * Only worth sending when the app has actually asked. Setting this at startup
44
- * as a default is the one mistake to avoid here: a CMP answer arriving later
45
- * cannot be undone for events already sent, and the declaration is recorded
46
- * as the app's own rather than as the absence of one.
18
+ * The user was asked and did not opt out. Not a default for startup: a later
19
+ * answer cannot correct events already sent.
47
20
  */
48
21
  allowed() {
49
22
  return {
@@ -52,11 +25,7 @@ export const AdshiftThirdPartySharing = {
52
25
  }
53
26
  };
54
27
 
55
- /**
56
- * Converts `AdshiftThirdPartySharing` to a plain object for the native bridge.
57
- *
58
- * @internal
59
- */
28
+ /** @internal */
60
29
  export function thirdPartySharingToMap(sharing) {
61
30
  return {
62
31
  optOut: sharing.optOut === true
@@ -1 +1 @@
1
- {"version":3,"names":["AdshiftThirdPartySharing","optedOut","optOut","allowed","thirdPartySharingToMap","sharing"],"sourceRoot":"../../../src","sources":["types/AdshiftThirdPartySharing.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAG;EACtC;EACAC,QAAQA,CAAA,EAA6B;IACnC,OAAO;MAAEC,MAAM,EAAE;IAAK,CAAC;EACzB,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,OAAOA,CAAA,EAA6B;IAClC,OAAO;MAAED,MAAM,EAAE;IAAM,CAAC;EAC1B;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,sBAAsBA,CACpCC,OAAiC,EACR;EACzB,OAAO;IAAEH,MAAM,EAAEG,OAAO,CAACH,MAAM,KAAK;EAAK,CAAC;AAC5C","ignoreList":[]}
1
+ {"version":3,"names":["AdshiftThirdPartySharing","optedOut","optOut","allowed","thirdPartySharingToMap","sharing"],"sourceRoot":"../../../src","sources":["types/AdshiftThirdPartySharing.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAMA;AACA,OAAO,MAAMA,wBAAwB,GAAG;EACtC;EACAC,QAAQA,CAAA,EAA6B;IACnC,OAAO;MAAEC,MAAM,EAAE;IAAK,CAAC;EACzB,CAAC;EAED;AACF;AACA;AACA;EACEC,OAAOA,CAAA,EAA6B;IAClC,OAAO;MAAED,MAAM,EAAE;IAAM,CAAC;EAC1B;AACF,CAAC;;AAED;AACA,OAAO,SAASE,sBAAsBA,CACpCC,OAAiC,EACR;EACzB,OAAO;IAAEH,MAAM,EAAEG,OAAO,CAACH,MAAM,KAAK;EAAK,CAAC;AAC5C","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  // Generated by scripts/write-version.js from package.json. Do not edit.
4
- export const PLUGIN_VERSION = '3.0.0';
4
+ export const PLUGIN_VERSION = '3.1.0';
5
5
  //# sourceMappingURL=version.js.map