@tyrads.com/tyrads-sdk 3.3.4-beta.0 → 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 +6 -4
  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
@@ -1,7 +1,9 @@
1
1
  import AsyncStorage from '@react-native-async-storage/async-storage';
2
2
  import axios, { type AxiosInstance } from 'axios';
3
+ import TyradsSdkCore from '../tyrads-sdk-core';
4
+ import { AcmoConfig } from '../../../acmo_config';
3
5
 
4
- const BASE_URL = 'https://api.tyrads.com/v3.0/';
6
+ const BASE_URL = `https://api.tyrads.com/v${AcmoConfig.API_VERSION}/`;
5
7
 
6
8
  interface TranslationResponse {
7
9
  data: Array<{
@@ -31,23 +33,14 @@ class LocalizationService {
31
33
  return LocalizationService.instance;
32
34
  }
33
35
 
34
- private static async getHeadersFromStorage(): Promise<Record<string, string>> {
35
- try {
36
- const data = await AsyncStorage.getItem('credentials');
37
- return data ? JSON.parse(data) : {};
38
- } catch (error) {
39
- console.error('Failed to retrieve headers from AsyncStorage', error);
40
- return {};
41
- }
42
- }
43
-
44
36
 
45
37
  public async init(locale: string): Promise<void> {
46
38
  if (this.axios) {
47
39
  return;
48
40
  }
49
41
 
50
- const headers = await LocalizationService.getHeadersFromStorage();
42
+ const apiKey = TyradsSdkCore.apiKey;
43
+ const apiSecret = TyradsSdkCore.apiSecret;
51
44
 
52
45
  this.axios = axios.create({
53
46
  baseURL: BASE_URL,
@@ -55,8 +48,8 @@ class LocalizationService {
55
48
  headers: {
56
49
  'Content-Type': 'application/json',
57
50
  Accept: 'application/json',
58
- "X-API-Key": headers["X-API-Key"],
59
- "X-API-Secret": headers["X-API-Secret"],
51
+ "X-API-Key": apiKey,
52
+ "X-API-Secret": apiSecret,
60
53
  }
61
54
  });
62
55
 
@@ -0,0 +1,101 @@
1
+ interface ActivatedCampaignsResponse {
2
+ data: ActivatedCampaignsData[];
3
+ message: string;
4
+ }
5
+
6
+ interface ActivatedCampaignsData {
7
+ groupName: string;
8
+ availableCurrencies: { [key: string]: AvailableCurrency };
9
+ campaigns: ActivatedCampaign[];
10
+ }
11
+
12
+ interface AvailableCurrency {
13
+ currencyId: number;
14
+ currencyIcon: string;
15
+ currencyName: string;
16
+ }
17
+
18
+ interface ActivatedCampaign {
19
+ campaignId: number;
20
+ campaignName: string;
21
+ campaignDescription: null | string;
22
+ campaignType: string;
23
+ campaignPremium: boolean;
24
+ validity: {
25
+ isRetryDownload: boolean;
26
+ isActivated: boolean;
27
+ isOldUser: boolean;
28
+ activeCurrencyId: number;
29
+ expiredOn: string | null;
30
+ expiredInSeconds: number | null;
31
+ isInstalled: boolean;
32
+ capReached: boolean;
33
+ };
34
+ availableCurrencies: { [key: string]: AvailableCurrency };
35
+ app: App;
36
+ campaignStatus: string;
37
+ group: null | string;
38
+ stage: null | string;
39
+ eventSummary: CampaignEventSummary;
40
+ limitedTimeEvents: LimitedTimeEvent[];
41
+ shorterMaxTimeEvents: any[];
42
+ }
43
+
44
+ interface App {
45
+ id: number;
46
+ title: string;
47
+ packageName: string;
48
+ rating: number;
49
+ shortDescription: string;
50
+ store: string;
51
+ storeCategory: string;
52
+ previewUrl: string;
53
+ thumbnail: string;
54
+ }
55
+
56
+ interface CampaignEventSummary {
57
+ playableEventCountAvailable: number;
58
+ playableEventCountCompleted: number;
59
+ playableEventCountTotal: number;
60
+ microchargeEventCountAvailable: number;
61
+ microchargeEventCountCompleted: number;
62
+ microchargeEventCountTotal: number;
63
+ }
64
+
65
+ interface LimitedTimeEvent {
66
+ appEventId: number;
67
+ conversionStatus: null | string;
68
+ identifier: string;
69
+ eventName: string;
70
+ eventDescription: null | string;
71
+ eventCategory: string;
72
+ payoutInfo: { [key: string]: PayoutInfo };
73
+ allowDuplicateEvents: boolean;
74
+ maxTime: number;
75
+ maxTimeMetric: null | string;
76
+ maxTimeRemainSeconds: null | number;
77
+ enforceMaxTimeCompletion: boolean;
78
+ isLimitedTimeEvent: boolean;
79
+ limitedTimeEventRemainingSeconds: number;
80
+ isTicketSubmitted: boolean;
81
+ ticketStatus: null | string;
82
+ lockEventRule: null | string;
83
+ hideEventRule: null | string;
84
+ shorterMaxTimeRule: null | string;
85
+ specialCompletionReason: null | string;
86
+ dailyCount: number;
87
+ dailyLimit: null | number;
88
+ count: number;
89
+ limit: null | number;
90
+ totalDailyUniqueCount: number;
91
+ totalDailyUniqueLimit: null | number;
92
+ dailyUniqueTodayExist: boolean;
93
+ }
94
+
95
+ interface PayoutInfo {
96
+ currencyId: number;
97
+ currencyName: string;
98
+ currencyIcon: string;
99
+ currencyConversionRate: number;
100
+ payoutAmountConverted: number;
101
+ }
@@ -18,5 +18,11 @@ export interface TyradsMediaSourceInfo {
18
18
  export interface TyradsUserInfo {
19
19
  email?: string,
20
20
  phoneNumber?: string,
21
- userGroup?: string
21
+ userGroup?: string,
22
+ age?: number,
23
+ gender?: number,
24
+ }
25
+
26
+ export interface TyradsConfig {
27
+ skipInitialPages: boolean | false,
22
28
  }
@@ -1,85 +1,110 @@
1
1
 
2
+ interface AcmoOffersResponseModel {
3
+ code: number;
4
+ data: Campaign[];
5
+ message: string;
6
+ timestamp: number;
7
+ responseTime: number;
8
+ }
9
+
2
10
  interface Campaign {
3
11
  campaignId: number;
4
12
  campaignName: string;
5
- campaignDescription: null | string;
6
- createdOn: string;
7
- sortingScore: number;
8
- status: string;
9
- expiredOn: null | string;
13
+ campaignDescription: string;
14
+ campaignType: string;
15
+ campaignPremium: boolean;
16
+ campaignStatus: string;
17
+ validity: Validity;
18
+ availableCurrencies: { [key: string]: AvailableCurrency };
19
+ app: App;
20
+ targeting: Targeting;
21
+ payoutSummary: { [key: string]: PayoutSummary };
22
+ tracking: Tracking;
23
+ creative: Creative;
10
24
  hasPlaytimeEvents: boolean;
11
- app: {
12
- id: number;
13
- title: string;
14
- packageName: string;
15
- rating: number;
16
- shortDescription: string;
17
- store: string;
18
- storeCategory: string;
19
- previewUrl: string;
20
- thumbnail: string;
21
- confidenceScore: number;
22
- securityLabel: string;
23
- };
24
- currency: {
25
- name: string;
26
- symbol: string;
27
- adUnitName: string;
28
- adUnitCurrencyName: string;
29
- adUnitCurrencyConversion: number;
30
- adUnitCurrencyIcon: string;
31
- };
32
- campaignPayout: {
33
- totalEvents: number;
34
- totalPayout: number;
35
- totalPlayablePayout: number;
36
- totalMicrochargePayout: number;
37
- totalPayoutConverted: number;
38
- totalPlayablePayoutConverted: number;
39
- totalMicrochargePayoutConverted: number;
40
- };
41
- tracking: {
42
- impressionUrl: string;
43
- clickUrl: string;
44
- s2sClickUrl: string;
45
- };
46
- targeting: {
47
- os: string;
48
- targetingType: string;
49
- reward: {
50
- rewardDifficulty: string;
51
- incentRewardDescription: string;
52
- };
53
- };
54
- creative: {
55
- creativeUrl: string;
56
- creativePacks: {
57
- creativePackId: null | number;
58
- creativePackName: string;
59
- languageName: string;
60
- languageCode: string;
61
- creatives: {
62
- creativeId: null | number;
63
- creativeName: string;
64
- callToAction: string;
65
- text: string;
66
- byteSize: string;
67
- fileUrl: string;
68
- duration: string;
69
- creativeType: {
70
- name: string;
71
- type: string;
72
- width: string;
73
- height: string;
74
- creativeCategoryType: string;
75
- };
76
- }[];
77
- }[];
78
- };
79
- isInstalled: boolean;
25
+ }
26
+
27
+ interface Validity {
80
28
  isRetryDownload: boolean;
81
- capReached: boolean;
82
- premium: boolean;
29
+ isActivated: boolean;
30
+ isOldUser: boolean;
31
+ expiredOn: string | null;
32
+ expiredInSeconds: number | null;
33
+ isInstalled: boolean;
34
+ }
35
+
36
+ interface AvailableCurrency {
37
+ currencyId: number;
38
+ currencyIcon: string;
39
+ currencyName: string;
40
+ }
41
+
42
+ interface PayoutSummary {
43
+ totalPayoutConverted: number;
44
+ totalPlayablePayoutConverted: number;
45
+ totalMicrochargePayoutConverted: number;
46
+ }
47
+
48
+ interface Creative {
49
+ creativeUrl: string;
50
+ creativePacks: CreativePack[];
51
+ }
52
+
53
+ interface CreativePack {
54
+ creativePackId: number;
55
+ creativePackName: string;
56
+ languageName: string;
57
+ languageCode: string;
58
+ creatives: (CreativeElement | null)[];
59
+ }
60
+
61
+ interface CreativeElement {
62
+ creativeId: number;
63
+ creativeName: string;
64
+ callToAction: string | null;
65
+ text: string;
66
+ byteSize: string;
67
+ fileUrl: string;
68
+ duration: string | null;
69
+ creativeType: CreativeType;
70
+ }
71
+
72
+ interface CreativeType {
73
+ name: string;
74
+ type: string;
75
+ width: string;
76
+ height: string;
77
+ creativeCategoryType: string;
78
+ }
79
+
80
+ interface Targeting {
81
+ os: string | null;
82
+ targetingType: string;
83
+ reward: Reward | null;
84
+ }
85
+
86
+ interface Tracking {
87
+ attributionTool: string | null;
88
+ clickUrl: string | null;
89
+ impressionUrl: string | null;
90
+ s2sClickUrl: string | null;
91
+ }
92
+
93
+ interface App {
94
+ id: number;
95
+ title: string;
96
+ packageName: string;
97
+ rating: number;
98
+ previewUrl: string;
99
+ shortDescription: string;
100
+ store: string;
101
+ storeCategory: string;
102
+ thumbnail: string;
103
+ }
104
+
105
+ interface Reward {
106
+ rewardDifficulty: string;
107
+ incentRewardDescription: string;
83
108
  }
84
109
 
85
110
  interface CurrencySales {
@@ -89,4 +114,15 @@ interface CurrencySales {
89
114
  dateStart: null | string,
90
115
  dateEnd: null | string,
91
116
  remainingTimeSeconds: null | number
117
+ }
118
+
119
+ interface ApiHeaders {
120
+ languageCode: string;
121
+ premiumColor: string;
122
+ xUserId: string;
123
+ xApiKey: string;
124
+ xApiSecret: string;
125
+ xSdkPlatform: string;
126
+ xSdkVersion: string;
127
+ userAgent: string;
92
128
  }
@@ -0,0 +1,256 @@
1
+ import { NativeEventEmitter, NativeModules, Platform } from "react-native";
2
+ import { AcmoConfig } from "../../acmo_config";
3
+ import type { TyradsConfig, TyradsMediaSourceInfo, TyradsUserInfo } from "./types/external_types";
4
+ import NetworkCommon from "./network/network-common";
5
+ import { FcmManager } from "../modules/push-notifications/fcm-manager";
6
+ import { ApnsManager } from "../modules/push-notifications/apns-manager";
7
+ import { saveData } from "./storage/storage";
8
+ import { changeProviderLanguage, updateProviderLanguage } from "../modules/localization/localization_context";
9
+ import Localization from './services/localization_service';
10
+ import InAppNotificationController from "../modules/inapp-notifications/controller";
11
+
12
+ const LINKING_ERROR =
13
+ `The package 'tyrads-sdk' doesn't seem to be linked. Make sure: \n\n` +
14
+ Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
15
+ '- You rebuilt the app after installing the package\n' +
16
+ '- You are not using Expo Go\n';
17
+
18
+ const TyradsSdk = NativeModules.TyradsSdk
19
+ ? NativeModules.TyradsSdk
20
+ : new Proxy(
21
+ {},
22
+ {
23
+ get() {
24
+ throw new Error(LINKING_ERROR);
25
+ },
26
+ }
27
+ );
28
+
29
+ export interface PushNotificationEvent {
30
+ type: 'received' | 'clicked' | 'dismissed';
31
+ id?: string;
32
+ data?: any;
33
+ }
34
+
35
+ export type PushNotificationCallback = (event: PushNotificationEvent) => void;
36
+
37
+ export class TyradsSdkCore {
38
+ private static instance: TyradsSdkCore;
39
+ private tyradsEmitter: NativeEventEmitter;
40
+ private languageChangedSubscription: any = null;
41
+
42
+ private constructor() {
43
+ this.tyradsEmitter = new NativeEventEmitter(TyradsSdk);
44
+ }
45
+
46
+ public static getInstance(): TyradsSdkCore {
47
+ if (!TyradsSdkCore.instance) {
48
+ TyradsSdkCore.instance = new TyradsSdkCore();
49
+ }
50
+ return TyradsSdkCore.instance;
51
+ }
52
+ public userId: string = "";
53
+ public apiKey: string = "";
54
+ public apiSecret: string = "";
55
+ public encKey?: string = "";
56
+ public engagementId?: string = "";
57
+ public placementId?: string = "";
58
+
59
+ public premiumColor?: string;
60
+ public mainColor?: string;
61
+ public currentLanguage: string = "en";
62
+
63
+ public async init(
64
+ apiKey: string,
65
+ apiSecret: string,
66
+ encKey?: string,
67
+ engagementId?: string,
68
+ placementId?: string,
69
+ mediaSourceInfo?: TyradsMediaSourceInfo,
70
+ userInfo?: TyradsUserInfo,
71
+ config?: TyradsConfig,
72
+ ) {
73
+ this.setSDKVersion();
74
+ if (mediaSourceInfo) {
75
+ this.setMediaSourceInfo(mediaSourceInfo);
76
+ }
77
+ if (userInfo) {
78
+ this.setUserInfo(userInfo);
79
+ }
80
+ var data;
81
+ if (Platform.OS === 'ios') {
82
+ data = await TyradsSdk.init(apiKey, apiSecret, encKey, engagementId, placementId);
83
+ } else {
84
+ data = await TyradsSdk.init(apiKey, apiSecret, encKey, engagementId, placementId, config);
85
+ }
86
+
87
+ this.apiKey = apiKey;
88
+ this.apiSecret = apiSecret;
89
+ this.encKey = encKey;
90
+ this.engagementId = engagementId;
91
+ this.placementId = placementId;
92
+
93
+ try {
94
+ const parsed = typeof data === "string" ? JSON.parse(data) : data;
95
+ if (parsed?.languageCode) {
96
+ this.currentLanguage = parsed.languageCode;
97
+ }
98
+ } catch { }
99
+
100
+ await Localization.getInstance().init(this.currentLanguage);
101
+ await NetworkCommon.getInstance().init();
102
+
103
+ if (Platform.OS === 'android') {
104
+ await FcmManager.getInstance().init().catch(console.error);
105
+ }
106
+ if (Platform.OS === 'ios') {
107
+ await ApnsManager.getInstance().init().catch(console.error);
108
+ }
109
+ TyradsSdk.startObserving();
110
+ this.languageChangedSubscription?.remove();
111
+ this.languageChangedSubscription = this.tyradsEmitter.addListener(
112
+ 'LanguageChanged',
113
+ async (lang: string) => {
114
+ console.log('LanguageChanged event from Android SDK:', lang);
115
+ await changeProviderLanguage(lang);
116
+ }
117
+ );
118
+ await updateProviderLanguage(this.currentLanguage);
119
+
120
+ return data;
121
+ }
122
+
123
+ public async loginUser(userId: string) {
124
+ try {
125
+ const data = await TyradsSdk.loginUser(userId);
126
+ if (typeof data === "object") {
127
+ await saveData('xUserId', data.xUserId);
128
+ this.userId = data.xUserId;
129
+ this.currentLanguage = data.currentLanguage;
130
+ this.premiumColor = data.premiumColor;
131
+ this.mainColor = data.mainColor;
132
+ } else if (typeof data === "string") {
133
+ await saveData('xUserId', JSON.parse(data).xUserId);
134
+ this.userId = JSON.parse(data).xUserId;
135
+ this.currentLanguage = JSON.parse(data).languageCode;
136
+ this.premiumColor = JSON.parse(data).premiumColor;
137
+ this.mainColor = JSON.parse(data).mainColor;
138
+ }
139
+ await NetworkCommon.getInstance().init();
140
+ if (Platform.OS === 'android') {
141
+ FcmManager.getInstance().setLoggedIn(true);
142
+ } else {
143
+ ApnsManager.getInstance().setLoggedIn(true);
144
+ }
145
+
146
+ InAppNotificationController.getInstance().init().catch(err => console.error("In-app notification init error:", err));
147
+
148
+ return data;
149
+ } catch (err) {
150
+ console.error('Error logging in user:', err);
151
+ return null;
152
+ }
153
+ }
154
+
155
+ public async showOffers({
156
+ launchMode = 3,
157
+ route,
158
+ campaignID,
159
+ }: { launchMode?: number; route?: string; campaignID?: number | null } = {}) {
160
+ if (Platform.OS === 'ios') {
161
+ if (campaignID == null) {
162
+ return await TyradsSdk.showOffers(launchMode, route);
163
+ }
164
+ return await TyradsSdk.showOfferDetails(launchMode, route, campaignID);
165
+ } else {
166
+ if (campaignID == null) {
167
+ return await TyradsSdk.showOffers(route);
168
+ }
169
+ return await TyradsSdk.showOfferDetails(route, campaignID);
170
+ }
171
+ }
172
+
173
+ public async changeLanguage(lang: string) {
174
+ return await TyradsSdk.changeLanguage(lang);
175
+ }
176
+
177
+ public async preloadOffers(route?: string) {
178
+ if (Platform.OS !== 'ios') return;
179
+ try {
180
+ await TyradsSdk.preloadOffers(route || null);
181
+ } catch (err) {
182
+ console.error("Error preloading offers:", err);
183
+ }
184
+ }
185
+
186
+ public setSDKVersion() {
187
+ const version = AcmoConfig.SDK_VERSION;
188
+ TyradsSdk.setSDKVersion(version);
189
+ }
190
+
191
+ public setMediaSourceInfo(mediaSourceInfo: TyradsMediaSourceInfo) {
192
+ TyradsSdk.setMediaSourceInfo(mediaSourceInfo);
193
+ }
194
+
195
+ public setUserInfo(userInfo: TyradsUserInfo) {
196
+ TyradsSdk.setUserInfo(userInfo);
197
+ }
198
+
199
+
200
+ public async isPrivacyAccepted() {
201
+ try {
202
+ return await TyradsSdk.isPrivacyAccepted();
203
+ } catch (err) {
204
+ console.error("Error checking privacy acceptance:", err);
205
+ return false;
206
+ }
207
+ }
208
+
209
+ public async checkOnboardingProcess() {
210
+ try {
211
+ const result = await TyradsSdk.checkOnboardingProcess();
212
+ return result === true;
213
+ } catch (err) {
214
+ console.error("Error showing privacy flow:", err);
215
+ return false;
216
+ }
217
+ }
218
+
219
+ public async requestPushPermission(): Promise<boolean> {
220
+ try {
221
+ const granted = await TyradsSdk.pushRequestPermission();
222
+ return granted === true;
223
+ } catch (err) {
224
+ console.error("Error requesting push permission:", err);
225
+ return false;
226
+ }
227
+ }
228
+
229
+ public async getApnsToken(): Promise<string | null> {
230
+ try {
231
+ const token = await TyradsSdk.pushGetApnsToken();
232
+ return token || null;
233
+ } catch (err) {
234
+ console.error("Error getting APNs token:", err);
235
+ return null;
236
+ }
237
+ }
238
+
239
+ public addPushNotificationListener(callback: PushNotificationCallback) {
240
+ return this.tyradsEmitter.addListener('PushNotificationEvent', callback);
241
+ }
242
+
243
+ public startObserving() {
244
+ TyradsSdk.startObserving();
245
+ }
246
+
247
+ public stopObserving() {
248
+ TyradsSdk.stopObserving();
249
+ }
250
+
251
+ public dismissInAppNotification() {
252
+ TyradsSdk.dismissInAppNotification();
253
+ }
254
+ }
255
+
256
+ export default TyradsSdkCore.getInstance();
@@ -0,0 +1,87 @@
1
+ import React from 'react';
2
+ import { View, Pressable, StyleSheet, Image } from 'react-native';
3
+ import LinearGradient from 'react-native-linear-gradient';
4
+ import { TyradsSdkCore } from '../../../core/tyrads-sdk-core';
5
+
6
+ interface CardGradientProps {
7
+ children?: React.ReactNode;
8
+ onClose: () => void;
9
+ gradientColors?: (string | number)[];
10
+ gradientStart?: { x: number; y: number };
11
+ gradientEnd?: { x: number; y: number };
12
+ }
13
+
14
+ export const CardGradient: React.FC<CardGradientProps> = ({
15
+ children,
16
+ onClose,
17
+ gradientColors = (['#ffffff', '#02B5BE'] as (string | number)[]),
18
+ gradientStart = { x: 0.5, y: 0.25 },
19
+ gradientEnd = { x: 0.5, y: 1.2 },
20
+ }) => {
21
+ const mainColor = TyradsSdkCore.getInstance().mainColor;
22
+ const colors = mainColor ? (['#ffffff', mainColor] as string[]) : gradientColors;
23
+ return (
24
+ <View style={styles.wrapper}>
25
+ <View style={styles.topLeftIcon}>
26
+ <Image
27
+ source={require('../../../../assets/images/coin.png')}
28
+ style={{
29
+ width: 110,
30
+ height: 110,
31
+ }}
32
+ />
33
+ </View>
34
+ <LinearGradient
35
+ colors={colors}
36
+ start={gradientStart}
37
+ end={gradientEnd}
38
+ style={styles.gradientCard}
39
+ >
40
+ <Pressable style={styles.closeButton} onPress={onClose}>
41
+ <Image
42
+ source={require('../../../../assets/images/circle-x.png')}
43
+ style={styles.closeIcon}
44
+ />
45
+ </Pressable>
46
+ {children && <View style={styles.content}>{children}</View>}
47
+ </LinearGradient>
48
+ </View>
49
+ );
50
+ };
51
+
52
+ const styles = StyleSheet.create({
53
+ wrapper: {
54
+ position: 'relative',
55
+ width: '90%',
56
+ maxWidth: '90%',
57
+ },
58
+ gradientCard: {
59
+ borderRadius: 16,
60
+ width: '100%',
61
+ shadowColor: '#000',
62
+ shadowOffset: { width: 0, height: 4 },
63
+ shadowOpacity: 0.25,
64
+ shadowRadius: 8,
65
+ elevation: 10,
66
+ },
67
+ topLeftIcon: {
68
+ position: 'absolute',
69
+ left: 10,
70
+ top: -35,
71
+ zIndex: 10,
72
+ },
73
+ closeButton: {
74
+ position: 'absolute',
75
+ top: 16,
76
+ right: 16,
77
+ zIndex: 10,
78
+ padding: 4,
79
+ },
80
+ closeIcon: {
81
+ width: 24,
82
+ height: 24,
83
+ },
84
+ content: {
85
+ margin: 16,
86
+ },
87
+ });