@tyrads.com/tyrads-sdk 3.3.4 → 4.0.0-beta.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 (429) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +161 -19
  3. package/ios/Tyrads/AcmoConfig.swift +1 -1
  4. package/ios/Tyrads/InitModel.swift +29 -15
  5. package/ios/Tyrads/Tyrads.swift +332 -274
  6. package/ios/Tyrads/WebViewController.swift +10 -17
  7. package/ios/Tyrads/core/models/TyradsUserInfo.swift +2 -0
  8. package/ios/Tyrads/core/utils/AcmoKeyNames.swift +1 -0
  9. package/ios/Tyrads/helpers/device_details.swift +122 -2
  10. package/ios/Tyrads/pushNotifications/APNsAppDelegateProxy.swift +37 -0
  11. package/ios/Tyrads/pushNotifications/APNsNotificationListener.swift +14 -0
  12. package/ios/Tyrads/pushNotifications/APNsNotificationManager.swift +68 -0
  13. package/ios/Tyrads/pushNotifications/APNsNotificationReceiver.swift +77 -0
  14. package/ios/Tyrads/pushNotifications/TyradsAPNsSwizzler.mm +179 -0
  15. package/ios/TyradsSdk-Bridging-Header.h +3 -0
  16. package/ios/TyradsSdk.mm +12 -1
  17. package/ios/TyradsSdk.swift +121 -4
  18. package/lib/commonjs/acmo/core/components/countdown-timer.js +48 -0
  19. package/lib/commonjs/acmo/core/components/countdown-timer.js.map +1 -0
  20. package/lib/commonjs/acmo/core/components/snap-carousel.js +86 -0
  21. package/lib/commonjs/acmo/core/components/snap-carousel.js.map +1 -0
  22. package/lib/commonjs/acmo/core/constants/api-endpoints.js +18 -0
  23. package/lib/commonjs/acmo/core/constants/api-endpoints.js.map +1 -0
  24. package/lib/commonjs/acmo/core/helpers/colors.js +20 -0
  25. package/lib/commonjs/acmo/core/helpers/colors.js.map +1 -0
  26. package/lib/commonjs/acmo/core/helpers/logger.js +18 -0
  27. package/lib/commonjs/acmo/core/helpers/logger.js.map +1 -0
  28. package/lib/commonjs/acmo/core/helpers/patches.js +7 -0
  29. package/lib/commonjs/acmo/core/helpers/patches.js.map +1 -0
  30. package/lib/commonjs/acmo/core/network/http-client.js +91 -0
  31. package/lib/commonjs/acmo/core/network/http-client.js.map +1 -0
  32. package/lib/commonjs/acmo/core/network/network-common.js +111 -0
  33. package/lib/commonjs/acmo/core/network/network-common.js.map +1 -0
  34. package/lib/commonjs/acmo/core/services/localization_service.js +7 -13
  35. package/lib/commonjs/acmo/core/services/localization_service.js.map +1 -1
  36. package/lib/commonjs/acmo/core/types/activated-campaings.d.js +2 -0
  37. package/lib/commonjs/acmo/core/types/activated-campaings.d.js.map +1 -0
  38. package/lib/commonjs/acmo/core/tyrads-sdk-core.js +203 -0
  39. package/lib/commonjs/acmo/core/tyrads-sdk-core.js.map +1 -0
  40. package/lib/commonjs/acmo/modules/inapp-notifications/components/gradient_card.js +98 -0
  41. package/lib/commonjs/acmo/modules/inapp-notifications/components/gradient_card.js.map +1 -0
  42. package/lib/commonjs/acmo/modules/inapp-notifications/components/modal-wrapper.js +55 -0
  43. package/lib/commonjs/acmo/modules/inapp-notifications/components/modal-wrapper.js.map +1 -0
  44. package/lib/commonjs/acmo/modules/inapp-notifications/controller.js +141 -0
  45. package/lib/commonjs/acmo/modules/inapp-notifications/controller.js.map +1 -0
  46. package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js +183 -0
  47. package/lib/commonjs/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map +1 -0
  48. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-host.js +37 -0
  49. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-host.js.map +1 -0
  50. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-manager.js +39 -0
  51. package/lib/commonjs/acmo/modules/inapp-notifications/inapp-notification-manager.js.map +1 -0
  52. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js +206 -0
  53. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js.map +1 -0
  54. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js +155 -0
  55. package/lib/commonjs/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js.map +1 -0
  56. package/lib/commonjs/acmo/modules/inapp-notifications/repository.js +52 -0
  57. package/lib/commonjs/acmo/modules/inapp-notifications/repository.js.map +1 -0
  58. package/lib/commonjs/acmo/modules/inapp-notifications/tyrads-global-host.js +37 -0
  59. package/lib/commonjs/acmo/modules/inapp-notifications/tyrads-global-host.js.map +1 -0
  60. package/lib/commonjs/acmo/modules/premium-widgets/components/active_offers_button.js.map +1 -0
  61. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_card.js +1 -2
  62. package/lib/commonjs/acmo/modules/premium-widgets/components/custom_card.js.map +1 -0
  63. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.js +20 -11
  64. package/lib/commonjs/acmo/modules/premium-widgets/components/custom_scroller.js.map +1 -0
  65. package/lib/commonjs/acmo/modules/premium-widgets/components/custom_shimmer.js.map +1 -0
  66. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/offer_card.js +12 -12
  67. package/lib/commonjs/acmo/modules/premium-widgets/components/offer_card.js.map +1 -0
  68. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.js +3 -3
  69. package/lib/commonjs/acmo/modules/premium-widgets/components/offer_list_item.js.map +1 -0
  70. package/lib/commonjs/acmo/modules/premium-widgets/components/premium_empty_widget.js.map +1 -0
  71. package/lib/commonjs/acmo/modules/premium-widgets/components/premium_header.js.map +1 -0
  72. package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.js +3 -3
  73. package/lib/commonjs/acmo/modules/premium-widgets/components/premium_loading.js.map +1 -0
  74. package/lib/commonjs/acmo/modules/premium-widgets/controller.js +30 -0
  75. package/lib/commonjs/acmo/modules/premium-widgets/controller.js.map +1 -0
  76. package/lib/commonjs/acmo/modules/{dashboard/top_offers.js → premium-widgets/premium_offers_widget.js} +67 -30
  77. package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget.js.map +1 -0
  78. package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js +49 -0
  79. package/lib/commonjs/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js.map +1 -0
  80. package/lib/commonjs/acmo/modules/premium-widgets/repository.js +103 -0
  81. package/lib/commonjs/acmo/modules/premium-widgets/repository.js.map +1 -0
  82. package/lib/commonjs/acmo/modules/push-notifications/apns-manager.js +227 -0
  83. package/lib/commonjs/acmo/modules/push-notifications/apns-manager.js.map +1 -0
  84. package/lib/commonjs/acmo/modules/push-notifications/fcm-manager.js +148 -0
  85. package/lib/commonjs/acmo/modules/push-notifications/fcm-manager.js.map +1 -0
  86. package/lib/commonjs/acmo_config.js +6 -5
  87. package/lib/commonjs/acmo_config.js.map +1 -1
  88. package/lib/commonjs/assets/images/alarm-clock.png +0 -0
  89. package/lib/commonjs/assets/images/circle-x.png +0 -0
  90. package/lib/commonjs/assets/images/coin.png +0 -0
  91. package/lib/commonjs/index.js +33 -106
  92. package/lib/commonjs/index.js.map +1 -1
  93. package/lib/module/acmo/core/components/countdown-timer.js +42 -0
  94. package/lib/module/acmo/core/components/countdown-timer.js.map +1 -0
  95. package/lib/module/acmo/core/components/snap-carousel.js +81 -0
  96. package/lib/module/acmo/core/components/snap-carousel.js.map +1 -0
  97. package/lib/module/acmo/core/constants/api-endpoints.js +14 -0
  98. package/lib/module/acmo/core/constants/api-endpoints.js.map +1 -0
  99. package/lib/module/acmo/core/helpers/colors.js +15 -0
  100. package/lib/module/acmo/core/helpers/colors.js.map +1 -0
  101. package/lib/module/acmo/core/helpers/logger.js +14 -0
  102. package/lib/module/acmo/core/helpers/logger.js.map +1 -0
  103. package/lib/module/acmo/core/helpers/patches.js +7 -0
  104. package/lib/module/acmo/core/helpers/patches.js.map +1 -0
  105. package/lib/module/acmo/core/network/http-client.js +86 -0
  106. package/lib/module/acmo/core/network/http-client.js.map +1 -0
  107. package/lib/module/acmo/core/network/network-common.js +106 -0
  108. package/lib/module/acmo/core/network/network-common.js.map +1 -0
  109. package/lib/module/acmo/core/services/localization_service.js +7 -13
  110. package/lib/module/acmo/core/services/localization_service.js.map +1 -1
  111. package/lib/module/acmo/core/types/activated-campaings.d.js +2 -0
  112. package/lib/module/acmo/core/types/activated-campaings.d.js.map +1 -0
  113. package/lib/module/acmo/core/tyrads-sdk-core.js +197 -0
  114. package/lib/module/acmo/core/tyrads-sdk-core.js.map +1 -0
  115. package/lib/module/acmo/modules/inapp-notifications/components/gradient_card.js +92 -0
  116. package/lib/module/acmo/modules/inapp-notifications/components/gradient_card.js.map +1 -0
  117. package/lib/module/acmo/modules/inapp-notifications/components/modal-wrapper.js +49 -0
  118. package/lib/module/acmo/modules/inapp-notifications/components/modal-wrapper.js.map +1 -0
  119. package/lib/module/acmo/modules/inapp-notifications/controller.js +136 -0
  120. package/lib/module/acmo/modules/inapp-notifications/controller.js.map +1 -0
  121. package/lib/module/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js +176 -0
  122. package/lib/module/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.js.map +1 -0
  123. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-host.js +32 -0
  124. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-host.js.map +1 -0
  125. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-manager.js +35 -0
  126. package/lib/module/acmo/modules/inapp-notifications/inapp-notification-manager.js.map +1 -0
  127. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js +200 -0
  128. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.js.map +1 -0
  129. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js +149 -0
  130. package/lib/module/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.js.map +1 -0
  131. package/lib/module/acmo/modules/inapp-notifications/repository.js +47 -0
  132. package/lib/module/acmo/modules/inapp-notifications/repository.js.map +1 -0
  133. package/lib/module/acmo/modules/inapp-notifications/tyrads-global-host.js +32 -0
  134. package/lib/module/acmo/modules/inapp-notifications/tyrads-global-host.js.map +1 -0
  135. package/lib/module/acmo/modules/premium-widgets/components/active_offers_button.js.map +1 -0
  136. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_card.js +1 -2
  137. package/lib/module/acmo/modules/premium-widgets/components/custom_card.js.map +1 -0
  138. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.js +20 -11
  139. package/lib/module/acmo/modules/premium-widgets/components/custom_scroller.js.map +1 -0
  140. package/lib/module/acmo/modules/premium-widgets/components/custom_shimmer.js.map +1 -0
  141. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/offer_card.js +12 -12
  142. package/lib/module/acmo/modules/premium-widgets/components/offer_card.js.map +1 -0
  143. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.js +3 -3
  144. package/lib/module/acmo/modules/premium-widgets/components/offer_list_item.js.map +1 -0
  145. package/lib/module/acmo/modules/premium-widgets/components/premium_empty_widget.js.map +1 -0
  146. package/lib/module/acmo/modules/premium-widgets/components/premium_header.js.map +1 -0
  147. package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.js +1 -1
  148. package/lib/module/acmo/modules/premium-widgets/components/premium_loading.js.map +1 -0
  149. package/lib/module/acmo/modules/premium-widgets/controller.js +25 -0
  150. package/lib/module/acmo/modules/premium-widgets/controller.js.map +1 -0
  151. package/lib/module/acmo/modules/{dashboard/top_offers.js → premium-widgets/premium_offers_widget.js} +69 -32
  152. package/lib/module/acmo/modules/premium-widgets/premium_offers_widget.js.map +1 -0
  153. package/lib/module/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js +41 -0
  154. package/lib/module/acmo/modules/premium-widgets/premium_offers_widget_wrapper.js.map +1 -0
  155. package/lib/module/acmo/modules/premium-widgets/repository.js +98 -0
  156. package/lib/module/acmo/modules/premium-widgets/repository.js.map +1 -0
  157. package/lib/module/acmo/modules/push-notifications/apns-manager.js +222 -0
  158. package/lib/module/acmo/modules/push-notifications/apns-manager.js.map +1 -0
  159. package/lib/module/acmo/modules/push-notifications/fcm-manager.js +143 -0
  160. package/lib/module/acmo/modules/push-notifications/fcm-manager.js.map +1 -0
  161. package/lib/module/acmo_config.js +6 -5
  162. package/lib/module/acmo_config.js.map +1 -1
  163. package/lib/module/assets/images/alarm-clock.png +0 -0
  164. package/lib/module/assets/images/circle-x.png +0 -0
  165. package/lib/module/assets/images/coin.png +0 -0
  166. package/lib/module/index.js +16 -106
  167. package/lib/module/index.js.map +1 -1
  168. package/lib/typescript/commonjs/src/acmo/core/components/countdown-timer.d.ts +8 -0
  169. package/lib/typescript/commonjs/src/acmo/core/components/countdown-timer.d.ts.map +1 -0
  170. package/lib/typescript/commonjs/src/acmo/core/components/snap-carousel.d.ts +26 -0
  171. package/lib/typescript/commonjs/src/acmo/core/components/snap-carousel.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/acmo/core/constants/api-endpoints.d.ts +12 -0
  173. package/lib/typescript/commonjs/src/acmo/core/constants/api-endpoints.d.ts.map +1 -0
  174. package/lib/typescript/commonjs/src/acmo/core/helpers/colors.d.ts +2 -0
  175. package/lib/typescript/commonjs/src/acmo/core/helpers/colors.d.ts.map +1 -0
  176. package/lib/typescript/commonjs/src/acmo/core/helpers/logger.d.ts +6 -0
  177. package/lib/typescript/commonjs/src/acmo/core/helpers/logger.d.ts.map +1 -0
  178. package/lib/typescript/commonjs/src/acmo/core/network/http-client.d.ts +28 -0
  179. package/lib/typescript/commonjs/src/acmo/core/network/http-client.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/src/acmo/core/network/network-common.d.ts +13 -0
  181. package/lib/typescript/commonjs/src/acmo/core/network/network-common.d.ts.map +1 -0
  182. package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts +0 -1
  183. package/lib/typescript/commonjs/src/acmo/core/services/localization_service.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/src/acmo/core/types/external_types.d.ts +5 -0
  185. package/lib/typescript/commonjs/src/acmo/core/types/external_types.d.ts.map +1 -1
  186. package/lib/typescript/commonjs/src/acmo/core/tyrads-sdk-core.d.ts +46 -0
  187. package/lib/typescript/commonjs/src/acmo/core/tyrads-sdk-core.d.ts.map +1 -0
  188. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts +17 -0
  189. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts.map +1 -0
  190. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts +10 -0
  191. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts.map +1 -0
  192. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/controller.d.ts +22 -0
  193. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/controller.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts +6 -0
  195. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts.map +1 -0
  196. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts +7 -0
  197. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts.map +1 -0
  198. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts +14 -0
  199. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts.map +1 -0
  200. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts +4 -0
  201. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts +7 -0
  203. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/repository.d.ts +8 -0
  205. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/repository.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts +6 -0
  207. package/lib/typescript/commonjs/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/active_offers_button.d.ts.map +1 -0
  209. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_card.d.ts.map +1 -0
  210. package/lib/typescript/{module/src/acmo/modules/dashboard → commonjs/src/acmo/modules/premium-widgets}/components/custom_scroller.d.ts +3 -0
  211. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_scroller.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/custom_shimmer.d.ts.map +1 -0
  213. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/offer_card.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/offer_list_item.d.ts.map +1 -0
  215. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_empty_widget.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_header.d.ts.map +1 -0
  217. package/lib/typescript/{module/src/acmo/modules/dashboard → commonjs/src/acmo/modules/premium-widgets}/components/premium_loading.d.ts +1 -1
  218. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/components/premium_loading.d.ts.map +1 -0
  219. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/controller.d.ts +14 -0
  220. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/controller.d.ts.map +1 -0
  221. package/lib/typescript/commonjs/src/acmo/modules/{dashboard/top_offers.d.ts → premium-widgets/premium_offers_widget.d.ts} +3 -3
  222. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts +9 -0
  224. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/repository.d.ts +13 -0
  226. package/lib/typescript/commonjs/src/acmo/modules/premium-widgets/repository.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/apns-manager.d.ts +40 -0
  228. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/apns-manager.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/fcm-manager.d.ts +32 -0
  230. package/lib/typescript/commonjs/src/acmo/modules/push-notifications/fcm-manager.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/src/acmo_config.d.ts +1 -0
  232. package/lib/typescript/commonjs/src/acmo_config.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/src/index.d.ts +5 -11
  234. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  235. package/lib/typescript/module/src/acmo/core/components/countdown-timer.d.ts +8 -0
  236. package/lib/typescript/module/src/acmo/core/components/countdown-timer.d.ts.map +1 -0
  237. package/lib/typescript/module/src/acmo/core/components/snap-carousel.d.ts +26 -0
  238. package/lib/typescript/module/src/acmo/core/components/snap-carousel.d.ts.map +1 -0
  239. package/lib/typescript/module/src/acmo/core/constants/api-endpoints.d.ts +12 -0
  240. package/lib/typescript/module/src/acmo/core/constants/api-endpoints.d.ts.map +1 -0
  241. package/lib/typescript/module/src/acmo/core/helpers/colors.d.ts +2 -0
  242. package/lib/typescript/module/src/acmo/core/helpers/colors.d.ts.map +1 -0
  243. package/lib/typescript/module/src/acmo/core/helpers/logger.d.ts +6 -0
  244. package/lib/typescript/module/src/acmo/core/helpers/logger.d.ts.map +1 -0
  245. package/lib/typescript/module/src/acmo/core/network/http-client.d.ts +28 -0
  246. package/lib/typescript/module/src/acmo/core/network/http-client.d.ts.map +1 -0
  247. package/lib/typescript/module/src/acmo/core/network/network-common.d.ts +13 -0
  248. package/lib/typescript/module/src/acmo/core/network/network-common.d.ts.map +1 -0
  249. package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts +0 -1
  250. package/lib/typescript/module/src/acmo/core/services/localization_service.d.ts.map +1 -1
  251. package/lib/typescript/module/src/acmo/core/types/external_types.d.ts +5 -0
  252. package/lib/typescript/module/src/acmo/core/types/external_types.d.ts.map +1 -1
  253. package/lib/typescript/module/src/acmo/core/tyrads-sdk-core.d.ts +46 -0
  254. package/lib/typescript/module/src/acmo/core/tyrads-sdk-core.d.ts.map +1 -0
  255. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts +17 -0
  256. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/gradient_card.d.ts.map +1 -0
  257. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts +10 -0
  258. package/lib/typescript/module/src/acmo/modules/inapp-notifications/components/modal-wrapper.d.ts.map +1 -0
  259. package/lib/typescript/module/src/acmo/modules/inapp-notifications/controller.d.ts +22 -0
  260. package/lib/typescript/module/src/acmo/modules/inapp-notifications/controller.d.ts.map +1 -0
  261. package/lib/typescript/module/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts +6 -0
  262. package/lib/typescript/module/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.d.ts.map +1 -0
  263. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts +7 -0
  264. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-host.d.ts.map +1 -0
  265. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts +14 -0
  266. package/lib/typescript/module/src/acmo/modules/inapp-notifications/inapp-notification-manager.d.ts.map +1 -0
  267. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts +4 -0
  268. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.d.ts.map +1 -0
  269. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts +7 -0
  270. package/lib/typescript/module/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.d.ts.map +1 -0
  271. package/lib/typescript/module/src/acmo/modules/inapp-notifications/repository.d.ts +8 -0
  272. package/lib/typescript/module/src/acmo/modules/inapp-notifications/repository.d.ts.map +1 -0
  273. package/lib/typescript/module/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts +6 -0
  274. package/lib/typescript/module/src/acmo/modules/inapp-notifications/tyrads-global-host.d.ts.map +1 -0
  275. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/active_offers_button.d.ts.map +1 -0
  276. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_card.d.ts.map +1 -0
  277. package/lib/typescript/{commonjs/src/acmo/modules/dashboard → module/src/acmo/modules/premium-widgets}/components/custom_scroller.d.ts +3 -0
  278. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_scroller.d.ts.map +1 -0
  279. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/custom_shimmer.d.ts.map +1 -0
  280. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/offer_card.d.ts.map +1 -0
  281. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/offer_list_item.d.ts.map +1 -0
  282. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_empty_widget.d.ts.map +1 -0
  283. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_header.d.ts.map +1 -0
  284. package/lib/typescript/{commonjs/src/acmo/modules/dashboard → module/src/acmo/modules/premium-widgets}/components/premium_loading.d.ts +1 -1
  285. package/lib/typescript/module/src/acmo/modules/premium-widgets/components/premium_loading.d.ts.map +1 -0
  286. package/lib/typescript/module/src/acmo/modules/premium-widgets/controller.d.ts +14 -0
  287. package/lib/typescript/module/src/acmo/modules/premium-widgets/controller.d.ts.map +1 -0
  288. package/lib/typescript/module/src/acmo/modules/{dashboard/top_offers.d.ts → premium-widgets/premium_offers_widget.d.ts} +3 -3
  289. package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget.d.ts.map +1 -0
  290. package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts +9 -0
  291. package/lib/typescript/module/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.d.ts.map +1 -0
  292. package/lib/typescript/module/src/acmo/modules/premium-widgets/repository.d.ts +13 -0
  293. package/lib/typescript/module/src/acmo/modules/premium-widgets/repository.d.ts.map +1 -0
  294. package/lib/typescript/module/src/acmo/modules/push-notifications/apns-manager.d.ts +40 -0
  295. package/lib/typescript/module/src/acmo/modules/push-notifications/apns-manager.d.ts.map +1 -0
  296. package/lib/typescript/module/src/acmo/modules/push-notifications/fcm-manager.d.ts +32 -0
  297. package/lib/typescript/module/src/acmo/modules/push-notifications/fcm-manager.d.ts.map +1 -0
  298. package/lib/typescript/module/src/acmo_config.d.ts +1 -0
  299. package/lib/typescript/module/src/acmo_config.d.ts.map +1 -1
  300. package/lib/typescript/module/src/index.d.ts +5 -11
  301. package/lib/typescript/module/src/index.d.ts.map +1 -1
  302. package/package.json +5 -3
  303. package/readme.md +27 -14
  304. package/src/acmo/core/components/countdown-timer.tsx +52 -0
  305. package/src/acmo/core/components/snap-carousel.tsx +106 -0
  306. package/src/acmo/core/constants/api-endpoints.ts +12 -0
  307. package/src/acmo/core/helpers/colors.ts +16 -0
  308. package/src/acmo/core/helpers/logger.ts +11 -0
  309. package/src/acmo/core/helpers/patches.js +6 -0
  310. package/src/acmo/core/network/http-client.ts +89 -0
  311. package/src/acmo/core/network/network-common.ts +128 -0
  312. package/src/acmo/core/services/localization_service.ts +7 -14
  313. package/src/acmo/core/types/activated-campaings.d.ts +101 -0
  314. package/src/acmo/core/types/external_types.ts +7 -1
  315. package/src/acmo/core/types/types.d.ts +112 -76
  316. package/src/acmo/core/tyrads-sdk-core.tsx +256 -0
  317. package/src/acmo/modules/inapp-notifications/components/gradient_card.tsx +87 -0
  318. package/src/acmo/modules/inapp-notifications/components/modal-wrapper.tsx +59 -0
  319. package/src/acmo/modules/inapp-notifications/controller.ts +183 -0
  320. package/src/acmo/modules/inapp-notifications/currency-sales/currency-sales-notif.tsx +164 -0
  321. package/src/acmo/modules/inapp-notifications/inapp-notification-host.tsx +32 -0
  322. package/src/acmo/modules/inapp-notifications/inapp-notification-manager.ts +40 -0
  323. package/src/acmo/modules/inapp-notifications/limited-time-offer/components/limited-time-offer-card.tsx +188 -0
  324. package/src/acmo/modules/inapp-notifications/limited-time-offer/limited-time-notif.tsx +149 -0
  325. package/src/acmo/modules/inapp-notifications/repository.ts +49 -0
  326. package/src/acmo/modules/inapp-notifications/tyrads-global-host.tsx +25 -0
  327. package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.tsx +1 -2
  328. package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_scroller.tsx +24 -10
  329. package/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.tsx +11 -11
  330. package/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.tsx +3 -3
  331. package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_loading.tsx +1 -1
  332. package/src/acmo/modules/premium-widgets/controller.ts +39 -0
  333. package/src/acmo/modules/{dashboard/top_offers.tsx → premium-widgets/premium_offers_widget.tsx} +67 -45
  334. package/src/acmo/modules/premium-widgets/premium_offers_widget_wrapper.tsx +39 -0
  335. package/src/acmo/modules/premium-widgets/repository.ts +107 -0
  336. package/src/acmo/modules/push-notifications/apns-manager.ts +254 -0
  337. package/src/acmo/modules/push-notifications/fcm-manager.ts +162 -0
  338. package/src/acmo_config.ts +6 -5
  339. package/src/assets/images/alarm-clock.png +0 -0
  340. package/src/assets/images/circle-x.png +0 -0
  341. package/src/assets/images/coin.png +0 -0
  342. package/src/index.tsx +19 -127
  343. package/ios/Tyrads/user/AcmoUserUpdatePage.swift +0 -302
  344. package/ios/Tyrads/user/AcmoUsersUpdateController.swift +0 -26
  345. package/ios/Tyrads/user/Repository.swift +0 -89
  346. package/lib/commonjs/acmo/core/helpers/native_methods.js +0 -48
  347. package/lib/commonjs/acmo/core/helpers/native_methods.js.map +0 -1
  348. package/lib/commonjs/acmo/modules/dashboard/components/active_offers_button.js.map +0 -1
  349. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +0 -1
  350. package/lib/commonjs/acmo/modules/dashboard/components/custom_scroller.js.map +0 -1
  351. package/lib/commonjs/acmo/modules/dashboard/components/custom_shimmer.js.map +0 -1
  352. package/lib/commonjs/acmo/modules/dashboard/components/offer_card.js.map +0 -1
  353. package/lib/commonjs/acmo/modules/dashboard/components/offer_list_item.js.map +0 -1
  354. package/lib/commonjs/acmo/modules/dashboard/components/premium_empty_widget.js.map +0 -1
  355. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +0 -1
  356. package/lib/commonjs/acmo/modules/dashboard/components/premium_loading.js.map +0 -1
  357. package/lib/commonjs/acmo/modules/dashboard/repository.js +0 -147
  358. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +0 -1
  359. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +0 -1
  360. package/lib/module/acmo/core/helpers/native_methods.js +0 -44
  361. package/lib/module/acmo/core/helpers/native_methods.js.map +0 -1
  362. package/lib/module/acmo/modules/dashboard/components/active_offers_button.js.map +0 -1
  363. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +0 -1
  364. package/lib/module/acmo/modules/dashboard/components/custom_scroller.js.map +0 -1
  365. package/lib/module/acmo/modules/dashboard/components/custom_shimmer.js.map +0 -1
  366. package/lib/module/acmo/modules/dashboard/components/offer_card.js.map +0 -1
  367. package/lib/module/acmo/modules/dashboard/components/offer_list_item.js.map +0 -1
  368. package/lib/module/acmo/modules/dashboard/components/premium_empty_widget.js.map +0 -1
  369. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +0 -1
  370. package/lib/module/acmo/modules/dashboard/components/premium_loading.js.map +0 -1
  371. package/lib/module/acmo/modules/dashboard/repository.js +0 -140
  372. package/lib/module/acmo/modules/dashboard/repository.js.map +0 -1
  373. package/lib/module/acmo/modules/dashboard/top_offers.js.map +0 -1
  374. package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts +0 -10
  375. package/lib/typescript/commonjs/src/acmo/core/helpers/native_methods.d.ts.map +0 -1
  376. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +0 -1
  377. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +0 -1
  378. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +0 -1
  379. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +0 -1
  380. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_card.d.ts.map +0 -1
  381. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +0 -1
  382. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +0 -1
  383. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +0 -1
  384. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +0 -1
  385. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +0 -3
  386. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +0 -1
  387. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +0 -1
  388. package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts +0 -10
  389. package/lib/typescript/module/src/acmo/core/helpers/native_methods.d.ts.map +0 -1
  390. package/lib/typescript/module/src/acmo/modules/dashboard/components/active_offers_button.d.ts.map +0 -1
  391. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +0 -1
  392. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_scroller.d.ts.map +0 -1
  393. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_shimmer.d.ts.map +0 -1
  394. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_card.d.ts.map +0 -1
  395. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_list_item.d.ts.map +0 -1
  396. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_empty_widget.d.ts.map +0 -1
  397. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +0 -1
  398. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_loading.d.ts.map +0 -1
  399. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +0 -3
  400. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +0 -1
  401. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +0 -1
  402. package/src/acmo/core/helpers/native_methods.ts +0 -59
  403. package/src/acmo/modules/dashboard/repository.ts +0 -170
  404. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.js +0 -0
  405. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.js +0 -0
  406. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.js +0 -0
  407. /package/lib/commonjs/acmo/modules/{dashboard → premium-widgets}/components/premium_header.js +0 -0
  408. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.js +0 -0
  409. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.js +0 -0
  410. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.js +0 -0
  411. /package/lib/module/acmo/modules/{dashboard → premium-widgets}/components/premium_header.js +0 -0
  412. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.d.ts +0 -0
  413. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.d.ts +0 -0
  414. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.d.ts +0 -0
  415. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.d.ts +0 -0
  416. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.d.ts +0 -0
  417. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.d.ts +0 -0
  418. /package/lib/typescript/commonjs/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.d.ts +0 -0
  419. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.d.ts +0 -0
  420. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/custom_card.d.ts +0 -0
  421. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.d.ts +0 -0
  422. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/offer_card.d.ts +0 -0
  423. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/offer_list_item.d.ts +0 -0
  424. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.d.ts +0 -0
  425. /package/lib/typescript/module/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.d.ts +0 -0
  426. /package/src/acmo/modules/{dashboard → premium-widgets}/components/active_offers_button.tsx +0 -0
  427. /package/src/acmo/modules/{dashboard → premium-widgets}/components/custom_shimmer.tsx +0 -0
  428. /package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_empty_widget.tsx +0 -0
  429. /package/src/acmo/modules/{dashboard → premium-widgets}/components/premium_header.tsx +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_controller","_interopRequireDefault","_premium_header","_custom_card","_active_offers_button","_offer_list_item","_offer_card","_premium_empty_widget","_premium_loading","_tyradsSdkCore","_snapCarousel","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PremiumWidgetStyles","exports","SCREEN_WIDTH","Dimensions","width","PremiumOffersWidget","widgetStyle","list","onNavigate","campaigns","setCampaigns","useState","isLoading","setIsLoading","error","setError","premiumColor","setPremiumColor","currencySale","setCurrencySale","activeCount","setActiveCount","loadingIndex","setLoadingIndex","fetchPremiumOffers","data","controller","getPremiums","currencySales","TyradsSdkCore","summary","message","useEffect","handleShowOffers","handleCampaignPress","campaignId","handleActiveOffersPress","route","handleButtonPress","campaign","isReady","isPrivacyAccepted","result","checkOnboardingProcess","console","log","err","openOffer","jsx","Fragment","children","View","style","styles","errorContainer","jsxs","Text","errorText","length","colorPremium","onContinue","flex","onShowOffers","headerSpacer","map","item","index","AcmoOfferListItem","onPress","offer","onButtonTap","sliderCards","renderItem","paddingHorizontal","onButtonClick","currencySaleModel","onTap","sliderWidth","itemWidth","dotStyle","marginVertical","backgroundColor","paginationContainerStyle","marginBottom","marginTop","paddingVertical","loop","autoplay","gameListSpacer","StyleSheet","create","itemContainer","flexDirection","justifyContent","alignItems","loadingContainer","padding","color","noCampaignContainer","height","_default"],"sourceRoot":"../../../../../src","sources":["acmo/modules/premium-widgets/premium_offers_widget.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,WAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,eAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,YAAA,GAAAF,sBAAA,CA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AE,QAAQ;IACpBrB,iBAAiB,EAAE,EAAE;IACrBY,eAAe,EAAE;EACnB,CAAC;EACDU,gBAAgB,EAAE;IAChBlC,IAAI,EAAE,CAAC;IACPgC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDxC,cAAc,EAAE;IACd0C,OAAO,EAAE;EACX,CAAC;EACDvC,SAAS,EAAE;IACTwC,KAAK,EAAE;EACT,CAAC;EACDC,mBAAmB,EAAE;IACnBF,OAAO,EAAE;EACX,CAAC;EACDjC,YAAY,EAAE;IACZoC,MAAM,EAAE;EACV,CAAC;EACDX,cAAc,EAAE;IACdW,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAnG,OAAA,CAAAlB,OAAA,GAEYsB,mBAAmB","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PremiumOffersWidgetLoading = exports.PremiumOffersWidget = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _localization_context = require("../localization/localization_context.js");
9
+ var _tyradsSdkCore = _interopRequireDefault(require("../../core/tyrads-sdk-core.js"));
10
+ var _premium_offers_widget = _interopRequireWildcard(require("./premium_offers_widget.js"));
11
+ var _premium_loading = _interopRequireDefault(require("./components/premium_loading.js"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ const PremiumOffersWidget = ({
16
+ widgetStyle = _premium_offers_widget.PremiumWidgetStyles.list,
17
+ launchMode = 2
18
+ }) => {
19
+ const handleNavigation = (route, campaignID) => {
20
+ _tyradsSdkCore.default.showOffers({
21
+ route: route,
22
+ campaignID: campaignID,
23
+ launchMode: launchMode
24
+ });
25
+ };
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_localization_context.LocalizationProvider, {
27
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
28
+ style: {
29
+ flex: 1,
30
+ justifyContent: 'center',
31
+ alignItems: 'center'
32
+ },
33
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_premium_offers_widget.default, {
34
+ widgetStyle: widgetStyle,
35
+ onNavigate: handleNavigation
36
+ })
37
+ })
38
+ });
39
+ };
40
+ exports.PremiumOffersWidget = PremiumOffersWidget;
41
+ const PremiumOffersWidgetLoading = ({
42
+ widgetStyle = _premium_offers_widget.PremiumWidgetStyles.list
43
+ }) => {
44
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_premium_loading.default, {
45
+ widgetStyle: widgetStyle
46
+ });
47
+ };
48
+ exports.PremiumOffersWidgetLoading = PremiumOffersWidgetLoading;
49
+ //# sourceMappingURL=premium_offers_widget_wrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_localization_context","_tyradsSdkCore","_interopRequireDefault","_premium_offers_widget","_interopRequireWildcard","_premium_loading","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PremiumOffersWidget","widgetStyle","PremiumWidgetStyles","list","launchMode","handleNavigation","route","campaignID","TyradsSdkCore","showOffers","jsx","LocalizationProvider","children","View","style","flex","justifyContent","alignItems","onNavigate","exports","PremiumOffersWidgetLoading"],"sourceRoot":"../../../../../src","sources":["acmo/modules/prem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
+ });
6
+ exports.default = void 0;
7
+ var _httpClient = require("../../core/network/http-client.js");
8
+ var _launcher = require("../../core/helpers/launcher.js");
9
+ var _apiEndpoints = _interopRequireDefault(require("../../core/constants/api-endpoints.js"));
10
+ var _tyradsSdkCore = _interopRequireDefault(require("../../core/tyrads-sdk-core.js"));
11
+ var _logger = require("../../core/helpers/logger.js");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ class PremiumWidgetsRepository {
14
+ constructor() {}
15
+ static getInstance() {
16
+ if (!PremiumWidgetsRepository.instance) {
17
+ PremiumWidgetsRepository.instance = new PremiumWidgetsRepository();
18
+ }
19
+ return PremiumWidgetsRepository.instance;
20
+ }
21
+ async fetchTargetedCampaigns() {
22
+ const language = _tyradsSdkCore.default.currentLanguage;
23
+ const {
24
+ status,
25
+ data
26
+ } = await _httpClient.http.get(`${_apiEndpoints.default.TARGETED_CAMPAIGNS}?lang=${language}`);
27
+ if (status !== 200) {
28
+ throw new Error('Failed to fetch targeted campaigns');
29
+ }
30
+ const campaigns = data.data;
31
+ const hotOffers = campaigns.sort((a, b) => {
32
+ if (a.campaignPremium && !b.campaignPremium) return -1;
33
+ if (!a.campaignPremium && b.campaignPremium) return 1;
34
+ return 0;
35
+ }).slice(0, 5);
36
+ return hotOffers;
37
+ }
38
+ async fetchCurrencySales() {
39
+ const language = _tyradsSdkCore.default.currentLanguage;
40
+ const {
41
+ status,
42
+ data
43
+ } = await _httpClient.http.get(`${_apiEndpoints.default.ENGAGEMENT}?lang=${language}`);
44
+ if (status !== 200) {
45
+ throw new Error('Failed to fetch currency sales');
46
+ }
47
+ return data.data.CurrencySales;
48
+ }
49
+ async fetchSummary() {
50
+ const language = _tyradsSdkCore.default.currentLanguage;
51
+ const {
52
+ status,
53
+ data
54
+ } = await _httpClient.http.get(`${_apiEndpoints.default.SUMMARY}?lang=${language}`);
55
+ if (status !== 200) {
56
+ throw new Error('Failed to fetch summary');
57
+ }
58
+ return data.data.activeCampaignCount;
59
+ }
60
+ async track(activity) {
61
+ const {
62
+ status
63
+ } = await _httpClient.http.post(_apiEndpoints.default.USER_ACTIVITIES, {
64
+ activity
65
+ });
66
+ if (status !== 200) {
67
+ throw new Error('Failed to track activity');
68
+ }
69
+ }
70
+ async openOffer(campaign) {
71
+ const campaignId = campaign.campaignId;
72
+ const clickUrl = campaign.tracking.clickUrl;
73
+ const isRetryDownload = campaign.validity.isRetryDownload;
74
+ const isInstalled = campaign.validity.isInstalled;
75
+ const previewUrl = campaign.app.previewUrl;
76
+ const s2sClickUrl = campaign.tracking.s2sClickUrl;
77
+ try {
78
+ let url = clickUrl || "";
79
+ if (isInstalled) {
80
+ url = previewUrl;
81
+ } else {
82
+ if (isRetryDownload) {
83
+ await this.track("CampaignActivatedRetry");
84
+ } else {
85
+ await this.track("CampaignActivated");
86
+ }
87
+ await _httpClient.http.post(_apiEndpoints.default.ACTIVATE_CAMPAIGN(campaignId), {}, {});
88
+ }
89
+ if (s2sClickUrl != null) {
90
+ const res = await _httpClient.http.get(s2sClickUrl);
91
+ if (res.status == 200) {
92
+ // url = res.data.url;
93
+ return;
94
+ }
95
+ }
96
+ await (0, _launcher.acmoLaunchURLForce)(url);
97
+ } catch (error) {
98
+ _logger.Logger.error(error);
99
+ }
100
+ }
101
+ }
102
+ var _default = exports.default = PremiumWidgetsRepository.getInstance();
103
+ //# sourceMappingURL=repository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_httpClient","require","_launcher","_apiEndpoints","_interopRequireDefault","_tyradsSdkCore","_logger","e","__esModule","default","PremiumWidgetsRepository","constructor","getInstance","instance","fetchTargetedCampaigns","language","TyradsSdkCore","currentLanguage","status","data","http","get","AcmoAPIEndpoints","TARGETED_CAMPAIGNS","Error","campaigns","hotOffers","sort","a","b","campaignPremium","slice","fetchCurrencySales","ENGAGEMENT","CurrencySales","fetchSummary","SUMMARY","activeCampaignCount","track","activity","post","USER_ACTIVITIES","openOffer","campaign","campaignId","clickUrl","tracking","isRetryDownload","validity","isInstalled","previewUrl","app","s2sClickUrl","url","ACTIVATE_CAMPAIGN","res","acmoLaunchURLForce","error","Logger","_default","exports"],"sourceRoot":"../../../../../src","sources":["acmo/modules/premium-widgets/repository.ts"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAAmD,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEnD,MAAMG,wBAAwB,CAAC;EAErBC,WAAWA,CAAA,EAAG,CAAE;EACxB,OAAOC,WAAWA,CAAA,EAAG;IACnB,IAAI,CAACF,wBAAwB,CAACG,QAAQ,EAAE;MACtCH,wBAAwB,CAACG,QAAQ,GAAG,IAAIH,wBAAwB,CAAC,CAAC;IACpE;IACA,OAAOA,wBAAwB,CAACG,QAAQ;EAC1C;EAEA,MAAaC,sBAAsBA,CAAA,EAAwB;IACzD,MAAMC,QAAQ,GAAGC,sBAAa,CAACC,eAAe;IAE9C,MAAM;MAAEC,MAAM;MAAEC;IAAK,CAAC,GAAG,MAAMC,gBAAI,CAACC,GAAG,CAAC,GAAGC,qBAAgB,CAACC,kBAAkB,SAASR,QAAQ,EAAE,CAAC;IAElG,IAAIG,MAAM,KAAK,GAAG,EAAE;MAClB,MAAM,IAAIM,KAAK,CAAC,oCAAoC,CAAC;IACvD;IAEA,MAAMC,SAAS,GAAGN,IAAI,CAACA,IAAkB;IAEzC,MAAMO,SAAS,GAAGD,SAAS,CACxBE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAK;MACd,IAAID,CAAC,CAACE,eAAe,IAAI,CAACD,CAAC,CAACC,eAAe,EAAE,OAAO,CAAC,CAAC;MACtD,IAA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,CAACC,UAAU;IACtC,MAAMC,QAAQ,GAAGF,QAAQ,CAACG,QAAQ,CAACD,QAAQ;IAC3C,MAAME,eAAe,GAAGJ,QAAQ,CAACK,QAAQ,CAACD,eAAe;IACzD,MAAME,WAAW,GAAGN,QAAQ,CAACK,QAAQ,CAACC,WAAW;IACjD,MAAMC,UAAU,GAAGP,QAAQ,CAACQ,GAAG,CAACD,UAAU;IAC1C,MAAME,WAAW,GAAGT,QAAQ,CAACG,QAAQ,CAACM,WAAW;IAEjD,IAAI;MACF,IAAIC,GAAW,GAAGR,QAAQ,IAAI,EAAE;MAChC,IAAII,WAAW,EAAE;QACfI,GAAG,GAAGH,UAAU;MAClB,CAAC,MAAM;QACL,IAAIH,eAAe,EAAE;UACnB,MAAM,IAAI,CAACT,KAAK,CAAC,wBAAwB,CAAC;QAC5C,CAAC,MAAM;UACL,MAAM,IAAI,CAACA,KAAK,CAAC,mBAAmB,CAAC;QACvC;QACA,MAAMlB,gBAAI,CAACoB,IAAI,CAAClB,qBAAgB,CAACgC,iBAAiB,CAACV,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;MACzE;MACA,IAAIQ,WAAW,IAAI,IAAI,EAAE;QACvB,MAAMG,GAAG,GAAG,MAAMnC,gBAAI,CAACC,GAAG,CAAC+B,WAAW,CAAC;QACvC,IAAIG,GAAG,CAACrC,MAAM,IAAI,GAAG,EAAE;UACrB;UACA;QACF;MACF;MACA,MAAM,IAAAsC,4BAAkB,EAACH,GAAG,CAAC;IAC/B,CAAC,CAAC,OAAOI,KAAK,EAAE;MACdC,cAAM,CAACD,KAAK,CAACA,KAAK,CAAC;IACrB;EACF;AACF;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAnD,OAAA,GAEcC,wBAAwB,CAACE,WAAW,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.ApnsManager = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _tyradsSdkCore = _interopRequireDefault(require("../../core/tyrads-sdk-core.js"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ class ApnsManager {
11
+ tokenFetched = false;
12
+ pushEventSubscriptions = [];
13
+ initialized = false;
14
+ isLoggedIn = false;
15
+ pendingEvent = null;
16
+ constructor() {}
17
+ static getInstance() {
18
+ if (!ApnsManager.instance) {
19
+ ApnsManager.instance = new ApnsManager();
20
+ }
21
+ return ApnsManager.instance;
22
+ }
23
+ setLoggedIn(status) {
24
+ this.isLoggedIn = status;
25
+ if (this.isLoggedIn && this.pendingEvent) {
26
+ const {
27
+ identifier,
28
+ userInfo
29
+ } = this.pendingEvent;
30
+ this.pendingEvent = null;
31
+ this._onNotificationClicked(identifier, userInfo);
32
+ }
33
+ }
34
+ async init() {
35
+ if (_reactNative.Platform.OS !== 'ios') {
36
+ console.log('APNs is only available on iOS');
37
+ return;
38
+ }
39
+ if (this.initialized) {
40
+ return;
41
+ }
42
+ try {
43
+ this._requestPushPermission();
44
+ this._fetchTokenSafely();
45
+ this._setupPushEventListeners();
46
+ this.initialized = true;
47
+ } catch (error) {
48
+ console.error('Failed to initialize APNs manager:', error);
49
+ }
50
+ }
51
+ async _fetchTokenSafely() {
52
+ if (this.tokenFetched) {
53
+ return;
54
+ }
55
+ try {
56
+ const token = await this._fetchTokenWithRetry(3);
57
+ if (token) {
58
+ console.log('APNs token:', token);
59
+ this.tokenFetched = true;
60
+ this.emit('tokenFetched', token);
61
+ } else {
62
+ console.log('APNs token not available after retries');
63
+ }
64
+ } catch (error) {
65
+ console.log('APNs token fetch failed:', error);
66
+ }
67
+ }
68
+ async _fetchTokenWithRetry(maxRetries) {
69
+ for (let attempt = 1; attempt <= maxRetries; attempt++) {
70
+ try {
71
+ console.log(`Fetching APNs token (attempt ${attempt}/${maxRetries})...`);
72
+ const token = await _tyradsSdkCore.default.getApnsToken();
73
+ if (token && typeof token === 'string' && token.length > 0) {
74
+ return token;
75
+ }
76
+ if (attempt < maxRetries) {
77
+ await new Promise(resolve => setTimeout(resolve, 3000));
78
+ }
79
+ } catch (error) {
80
+ console.log(`Attempt ${attempt} failed:`, error);
81
+ if (attempt < maxRetries) {
82
+ await new Promise(resolve => setTimeout(resolve, 3000));
83
+ }
84
+ }
85
+ }
86
+ return null;
87
+ }
88
+ async _requestPushPermission() {
89
+ try {
90
+ const granted = await _tyradsSdkCore.default.requestPushPermission();
91
+ console.log('Push permission granted:', granted);
92
+ } catch (error) {
93
+ console.error('Error requesting push permission:', error);
94
+ }
95
+ }
96
+ _setupPushEventListeners() {
97
+ const subscription = _tyradsSdkCore.default.addPushNotificationListener(event => {
98
+ console.log('Push event:', event);
99
+ const eventParsed = typeof event === 'string' ? JSON.parse(event) : event;
100
+ this._handlePushEvent(eventParsed);
101
+ });
102
+ this.pushEventSubscriptions.push(subscription);
103
+ }
104
+ _handlePushEvent(event) {
105
+ switch (event.type) {
106
+ case 'received':
107
+ this._onNotificationReceived(event.data);
108
+ break;
109
+ case 'clicked':
110
+ this._onNotificationClicked(event.id, event.data);
111
+ break;
112
+ case 'dismissed':
113
+ this._onNotificationDismissed(event.id);
114
+ break;
115
+ }
116
+ }
117
+ _onNotificationReceived(userInfo) {
118
+ console.log('Notification received:', userInfo);
119
+ this.emit('notificationReceived', userInfo);
120
+ }
121
+ async _onNotificationClicked(identifier, userInfo) {
122
+ console.log('Notification clicked:', identifier, userInfo);
123
+ const deepLink = userInfo['deepLink'];
124
+ if (!this.isLoggedIn && deepLink) {
125
+ console.log('Notification clicked (iOS) but user not logged in. Queueing navigation.');
126
+ this.pendingEvent = {
127
+ identifier,
128
+ userInfo
129
+ };
130
+ this.emit('notificationClicked', {
131
+ identifier,
132
+ userInfo
133
+ });
134
+ return;
135
+ }
136
+ this.emit('notificationClicked', {
137
+ identifier,
138
+ userInfo
139
+ });
140
+ if (deepLink != null && deepLink != '') {
141
+ setTimeout(() => {
142
+ _tyradsSdkCore.default.showOffers({
143
+ route: deepLink,
144
+ launchMode: 2
145
+ }).catch(err => {
146
+ console.error('Failed to show offers from notification click (iOS):', err);
147
+ });
148
+ }, 500);
149
+ }
150
+ }
151
+ _onNotificationDismissed(identifier) {
152
+ console.log('Notification dismissed:', identifier);
153
+ this.emit('notificationDismissed', identifier);
154
+ }
155
+ listeners = new Map();
156
+ on(event, callback) {
157
+ if (!this.listeners.has(event)) {
158
+ this.listeners.set(event, []);
159
+ }
160
+ this.listeners.get(event).push(callback);
161
+ }
162
+ off(event, callback) {
163
+ const callbacks = this.listeners.get(event);
164
+ if (callbacks) {
165
+ const index = callbacks.indexOf(callback);
166
+ if (index > -1) {
167
+ callbacks.splice(index, 1);
168
+ }
169
+ }
170
+ }
171
+ emit(event, data) {
172
+ const callbacks = this.listeners.get(event);
173
+ if (callbacks) {
174
+ callbacks.forEach(callback => {
175
+ try {
176
+ callback(data);
177
+ } catch (error) {
178
+ console.error(`Error in ${event} listener:`, error);
179
+ }
180
+ });
181
+ }
182
+ }
183
+ async fetchToken() {
184
+ try {
185
+ const token = await _tyradsSdkCore.default.getApnsToken();
186
+ if (token) {
187
+ this.tokenFetched = true;
188
+ console.log('Manually fetched APNs token:', token);
189
+ }
190
+ return token;
191
+ } catch (error) {
192
+ console.error('Error fetching token:', error);
193
+ return null;
194
+ }
195
+ }
196
+ async requestPermission() {
197
+ try {
198
+ return await _tyradsSdkCore.default.requestPushPermission();
199
+ } catch (error) {
200
+ console.error('Error requesting permission:', error);
201
+ return false;
202
+ }
203
+ }
204
+ addPushEventHandler(callback) {
205
+ return _tyradsSdkCore.default.addPushNotificationListener(callback);
206
+ }
207
+ dispose() {
208
+ this.pushEventSubscriptions.forEach(subscription => {
209
+ subscription.remove();
210
+ });
211
+ this.pushEventSubscriptions = [];
212
+ this.listeners.clear();
213
+ this.initialized = false;
214
+ }
215
+ isTokenFetched() {
216
+ return this.tokenFetched;
217
+ }
218
+ async getCurrentToken() {
219
+ if (!this.tokenFetched) {
220
+ return await this.fetchToken();
221
+ }
222
+ return await _tyradsSdkCore.default.getApnsToken();
223
+ }
224
+ }
225
+ exports.ApnsManager = ApnsManager;
226
+ var _default = exports.default = ApnsManager.getInstance();
227
+ //# sourceMappingURL=apns-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_tyradsSdkCore","_interopRequireDefault","e","__esModule","default","ApnsManager","tokenFetched","pushEventSubscriptions","initialized","isLoggedIn","pendingEvent","constructor","getInstance","instance","setLoggedIn","status","identifier","userInfo","_onNotificationClicked","init","Platform","OS","console","log","_requestPushPermission","_fetchTokenSafely","_setupPushEventListeners","error","token","_fetchTokenWithRetry","emit","maxRetries","attempt","TyradsSdkCoreMethods","getApnsToken","length","Promise","resolve","setTimeout","granted","requestPushPermission","subscription","addPushNotificationListener","event","eventParsed","JSON","parse","_handlePushEvent","push","type","_onNotificationReceived","data","id","_onNotificationDismissed","deepLink","showOffers","route","launchMode","catch","err","listeners","Map","on","callback","has","set","get","off","callbacks","index","indexOf","splice","forEach","fetchToken","requestPermission","addPushEventHandler","dispose","remove","clear","isTokenFetched","getCurrentToken","exports","_default"],"sourceRoot":"../../../../../src","sources":["acmo/modules/push-notifications/apns-manager.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8D,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU9D,MAAMG,WAAW,CAAC;EAERC,YAAY,GAAY,KAAK;EAC7BC,sBAAsB,GAAU,EAAE;EAElCC,WAAW,GAAG,KAAK;EACnBC,UAAU,GAAG,KAAK;EAClBC,YAAY,GAAiD,IAAI;EAEjEC,WAAWA,CAAA,EAAG,CAAE;EAExB,OAAOC,WAAWA,CAAA,EAAgB;IAChC,IAAI,CAACP,WAAW,CAACQ,QAA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BAA2B,CAACqB,QAAQ,CAAC;EACnE;EAEAa,OAAOA,CAAA,EAAS;IACd,IAAI,CAACrE,sBAAsB,CAACiE,OAAO,CAAC/B,YAAY,IAAI;MAClDA,YAAY,CAACoC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC;IACF,IAAI,CAACtE,sBAAsB,GAAG,EAAE;IAChC,IAAI,CAACqD,SAAS,CAACkB,KAAK,CAAC,CAAC;IACtB,IAAI,CAACtE,WAAW,GAAG,KAAK;EAC1B;EAEAuE,cAAcA,CAAA,EAAY;IACxB,OAAO,IAAI,CAACzE,YAAY;EAC1B;EAEA,MAAM0E,eAAeA,CAAA,EAA2B;IAC9C,IAAI,CAAC,IAAI,CAAC1E,YAAY,EAAE;MACtB,OAAO,MAAM,IAAI,CAACmE,UAAU,CAAC,CAAC;IAChC;IACA,OAAO,MAAMxC,sBAAoB,CAACC,YAAY,CAAC,CAAC;EAClD;AACF;AAAC+C,OAAA,CAAA5E,WAAA,GAAAA,WAAA;AAAA,IAAA6E,QAAA,GAAAD,OAAA,CAAA7E,OAAA,GAEcC,WAAW,CAACO,WAAW,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.FcmManager = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _tyradsSdkCore = _interopRequireDefault(require("../../core/tyrads-sdk-core.js"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ class FcmManager {
11
+ pushEventSubscriptions = [];
12
+ initialized = false;
13
+ isLoggedIn = false;
14
+ pendingEvent = null;
15
+ constructor() {}
16
+ static getInstance() {
17
+ if (!FcmManager.instance) {
18
+ FcmManager.instance = new FcmManager();
19
+ }
20
+ return FcmManager.instance;
21
+ }
22
+ setLoggedIn(status) {
23
+ this.isLoggedIn = status;
24
+ if (this.isLoggedIn && this.pendingEvent) {
25
+ const {
26
+ identifier,
27
+ userInfo
28
+ } = this.pendingEvent;
29
+ this.pendingEvent = null;
30
+ this._onNotificationClicked(identifier, userInfo);
31
+ }
32
+ }
33
+ async init() {
34
+ if (_reactNative.Platform.OS !== 'android') {
35
+ console.log('FCM is only available on Android');
36
+ return;
37
+ }
38
+ if (this.initialized) {
39
+ return;
40
+ }
41
+ try {
42
+ this._setupPushEventListeners();
43
+ this.initialized = true;
44
+ } catch (error) {
45
+ console.error('Failed to initialize FCM manager:', error);
46
+ }
47
+ }
48
+ _setupPushEventListeners() {
49
+ const subscription = _tyradsSdkCore.default.addPushNotificationListener(event => {
50
+ console.log('Push event:', event);
51
+ const eventParsed = typeof event === 'string' ? JSON.parse(event) : event;
52
+ this._handlePushEvent(eventParsed);
53
+ });
54
+ this.pushEventSubscriptions.push(subscription);
55
+ }
56
+ _handlePushEvent(event) {
57
+ switch (event.type) {
58
+ case 'received':
59
+ this._onNotificationReceived(event.data);
60
+ break;
61
+ case 'clicked':
62
+ this._onNotificationClicked(event.id, event.data);
63
+ break;
64
+ case 'dismissed':
65
+ this._onNotificationDismissed(event.id);
66
+ break;
67
+ }
68
+ }
69
+ _onNotificationReceived(userInfo) {
70
+ console.log('Notification received:', userInfo);
71
+ this.emit('notificationReceived', userInfo);
72
+ }
73
+ async _onNotificationClicked(identifier, userInfo) {
74
+ console.log('Notification clicked:', identifier, userInfo);
75
+ const deepLink = userInfo['deepLink'];
76
+ if (!this.isLoggedIn && deepLink) {
77
+ this.pendingEvent = {
78
+ identifier,
79
+ userInfo
80
+ };
81
+ this.emit('notificationClicked', {
82
+ identifier,
83
+ userInfo
84
+ });
85
+ return;
86
+ }
87
+ this.emit('notificationClicked', {
88
+ identifier,
89
+ userInfo
90
+ });
91
+ if (deepLink != null && deepLink != '') {
92
+ setTimeout(() => {
93
+ _tyradsSdkCore.default.showOffers({
94
+ route: deepLink,
95
+ launchMode: 2
96
+ }).catch(err => {
97
+ console.error('Failed to show offers from notification click:', err);
98
+ });
99
+ }, 500);
100
+ }
101
+ }
102
+ _onNotificationDismissed(identifier) {
103
+ console.log('Notification dismissed:', identifier);
104
+ this.emit('notificationDismissed', identifier);
105
+ }
106
+ listeners = new Map();
107
+ on(event, callback) {
108
+ if (!this.listeners.has(event)) {
109
+ this.listeners.set(event, []);
110
+ }
111
+ this.listeners.get(event).push(callback);
112
+ }
113
+ off(event, callback) {
114
+ const callbacks = this.listeners.get(event);
115
+ if (callbacks) {
116
+ const index = callbacks.indexOf(callback);
117
+ if (index > -1) {
118
+ callbacks.splice(index, 1);
119
+ }
120
+ }
121
+ }
122
+ emit(event, data) {
123
+ const callbacks = this.listeners.get(event);
124
+ if (callbacks) {
125
+ callbacks.forEach(callback => {
126
+ try {
127
+ callback(data);
128
+ } catch (error) {
129
+ console.error(`Error in ${event} listener:`, error);
130
+ }
131
+ });
132
+ }
133
+ }
134
+ addPushEventHandler(callback) {
135
+ return _tyradsSdkCore.default.addPushNotificationListener(callback);
136
+ }
137
+ dispose() {
138
+ this.pushEventSubscriptions.forEach(subscription => {
139
+ subscription.remove();
140
+ });
141
+ this.pushEventSubscriptions = [];
142
+ this.listeners.clear();
143
+ this.initialized = false;
144
+ }
145
+ }
146
+ exports.FcmManager = FcmManager;
147
+ var _default = exports.default = FcmManager.getInstance();
148
+ //# sourceMappingURL=fcm-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_tyradsSdkCore","_interopRequireDefault","e","__esModule","default","FcmManager","pushEventSubscriptions","initialized","isLoggedIn","pendingEvent","constructor","getInstance","instance","setLoggedIn","status","identifier","userInfo","_onNotificationClicked","init","Platform","OS","console","log","_setupPushEventListeners","error","subscription","TyradsSdkCoreMethods","addPushNotificationListener","event","eventParsed","JSON","parse","_handlePushEvent","push","type","_onNotificationReceived","data","id","_onNotificationDismissed","emit","deepLink","setTimeout","showOffers","route","launchMode","catch","err","listeners","Map","on","callback","has","set","get","off","callbacks","index","indexOf","splice","forEach","addPushEventHandler","dispose","remove","clear","exports","_default"],"sour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AAK,GAAGD,SAAS,CAACE,OAAO,CAACP,QAAQ,CAAC;MACzC,IAAIM,KAAK,GAAG,CAAC,CAAC,EAAE;QACdD,SAAS,CAACG,MAAM,CAACF,KAAK,EAAE,CAAC,CAAC;MAC5B;IACF;EACF;EAEQjB,IAAIA,CAACX,KAAa,EAAEQ,IAAU,EAAQ;IAC5C,MAAMmB,SAAS,GAAG,IAAI,CAACR,SAAS,CAACM,GAAG,CAACzB,KAAK,CAAC;IAC3C,IAAI2B,SAAS,EAAE;MACbA,SAAS,CAACI,OAAO,CAACT,QAAQ,IAAI;QAC5B,IAAI;UACFA,QAAQ,CAACd,IAAI,CAAC;QAChB,CAAC,CAAC,OAAOZ,KAAK,EAAE;UACdH,OAAO,CAACG,KAAK,CAAC,YAAYI,KAAK,YAAY,EAAEJ,KAAK,CAAC;QACrD;MACF,CAAC,CAAC;IACJ;EACF;EAEAoC,mBAAmBA,CAACV,QAA2B,EAAO;IACpD,OAAOxB,sBAAoB,CAACC,2BAA2B,CAACuB,QAAQ,CAAC;EACnE;EAEAW,OAAOA,CAAA,EAAS;IACd,IAAI,CAACvD,sBAAsB,CAACqD,OAAO,CAAClC,YAAY,IAAI;MAClDA,YAAY,CAACqC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC;IACF,IAAI,CAACxD,sBAAsB,GAAG,EAAE;IAChC,IAAI,CAACyC,SAAS,CAACgB,KAAK,CAAC,CAAC;IACtB,IAAI,CAACxD,WAAW,GAAG,KAAK;EAC1B;AACF;AAACyD,OAAA,CAAA3D,UAAA,GAAAA,UAAA;AAAA,IAAA4D,QAAA,GAAAD,OAAA,CAAA5D,OAAA,GAEcC,UAAU,CAACM,WAAW,CAAC,CAAC","ignoreList":[]}
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.AcmoConfig = void 0;
7
7
  class AcmoConfig {
8
- static API_VERSION = "3.0";
9
- static MAJOR_VERSION = "3";
10
- static MINOR_VERSION = "3";
11
- static PATCH_VERSION = "2";
12
- static BUILD_VERSION = "2";
8
+ static API_VERSION = "4.0";
9
+ static BASE_URL = `https://api.tyrads.com/v${this.API_VERSION}/`;
10
+ static MAJOR_VERSION = "4";
11
+ static MINOR_VERSION = "0";
12
+ static PATCH_VERSION = "0";
13
+ static BUILD_VERSION = "1";
13
14
  static SDK_PLATFORM = "React Native";
14
15
  static SDK_VERSION = `${this.MAJOR_VERSION}.${this.MINOR_VERSION}.${this.PATCH_VERSION}-${this.BUILD_VERSION}`;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"names":["AcmoConfig","API_VERSION","MAJOR_VERSION","MINOR_VERSION","PATCH_VERSION","BUILD_VERSION","SDK_PLATFORM","SDK_VERSION","exports"],"sourceRoot":"../../src","sources":["acmo_config.ts"],"mappings":";;;;;;AAAO,MAAMA,UAAU,CAAC;EACtB,OAAcC,WAAW,GAAG,KAAK;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,YAAY,GAAG,cAAc;EAC3C,OAAcC,WAAW,GAAG,GAAG,IAAI,CAACL,aAAa,IAAI,IAAI,CAACC,aAAa,IAAI,IAAI,CAACC,aAAa,IAAI,IAAI,CAACC,aAAa,EAAE;AACvH;AAACG,OAAA,CAAAR,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["AcmoConfig","API_VERSION","BASE_URL","MAJOR_VERSION","MINOR_VERSION","PATCH_VERSION","BUILD_VERSION","SDK_PLATFORM","SDK_VERSION","exports"],"sourceRoot":"../../src","sources":["acmo_config.ts"],"mappings":";;;;;;AAAO,MAAMA,UAAU,CAAC;EACtB,OAAcC,WAAW,GAAG,KAAK;EACjC,OAAcC,QAAQ,GAAG,2BAA2B,IAAI,CAACD,WAAW,GAAG;EACvE,OAAcE,aAAa,GAAG,GAAG;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,aAAa,GAAG,GAAG;EACjC,OAAcC,YAAY,GAAG,cAAc;EAC3C,OAAcC,WAAW,GAAG,GAAG,IAAI,CAACL,aAAa,IAAI,IAAI,CAACC,aAAa,IAAI,IAAI,CAACC,aAAa,IAAI,IAAI,CAACC,aAAa,EAAE;AACvH;AAACG,OAAA,CAAAT,UAAA,GAAAA,UAAA","ignoreList":[]}