@adapty/capacitor 3.16.0 → 3.16.2

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 (281) hide show
  1. package/AdaptyCapacitor.podspec +3 -3
  2. package/Package.swift +1 -1
  3. package/README.md +1 -1
  4. package/dist/esm/adapters.d.ts +16 -0
  5. package/dist/esm/adapters.js +31 -0
  6. package/dist/esm/adapters.js.map +1 -0
  7. package/dist/esm/adapty-emitter.js +2 -2
  8. package/dist/esm/adapty-emitter.js.map +1 -1
  9. package/dist/esm/adapty.d.ts +8 -6
  10. package/dist/esm/adapty.js +40 -78
  11. package/dist/esm/adapty.js.map +1 -1
  12. package/dist/esm/coders/factory.d.ts +6 -0
  13. package/dist/esm/coders/factory.js +11 -0
  14. package/dist/esm/coders/factory.js.map +1 -0
  15. package/dist/esm/coders/parse-onboarding.d.ts +3 -0
  16. package/dist/esm/coders/parse-onboarding.js +4 -0
  17. package/dist/esm/coders/parse-onboarding.js.map +1 -0
  18. package/dist/esm/coders/parse-paywall.d.ts +3 -0
  19. package/dist/esm/coders/parse-paywall.js +4 -0
  20. package/dist/esm/coders/parse-paywall.js.map +1 -0
  21. package/dist/esm/coders/parse.d.ts +5 -0
  22. package/dist/esm/coders/parse.js +5 -0
  23. package/dist/esm/coders/parse.js.map +1 -0
  24. package/dist/esm/default-configs.js +1 -1
  25. package/dist/esm/default-configs.js.map +1 -1
  26. package/dist/esm/index.d.ts +5 -7
  27. package/dist/esm/index.js +3 -5
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/logger/index.d.ts +2 -0
  30. package/dist/esm/logger/index.js +2 -0
  31. package/dist/esm/logger/index.js.map +1 -0
  32. package/dist/esm/types/adapty-plugin.d.ts +4 -4
  33. package/dist/esm/types/adapty-plugin.js.map +1 -1
  34. package/dist/esm/types/configs.d.ts +2 -2
  35. package/dist/esm/types/configs.js.map +1 -1
  36. package/dist/esm/types/index.d.ts +5 -0
  37. package/dist/esm/types/index.js +6 -0
  38. package/dist/esm/types/index.js.map +1 -0
  39. package/dist/esm/types/inputs.d.ts +1 -0
  40. package/dist/esm/types/inputs.js +2 -0
  41. package/dist/esm/types/inputs.js.map +1 -0
  42. package/dist/esm/types/method-types.d.ts +1 -0
  43. package/dist/esm/types/method-types.js +2 -0
  44. package/dist/esm/types/method-types.js.map +1 -0
  45. package/dist/esm/types/onboarding-events.d.ts +1 -0
  46. package/dist/esm/types/onboarding-events.js +2 -0
  47. package/dist/esm/types/onboarding-events.js.map +1 -0
  48. package/dist/esm/types/paywall-events.d.ts +1 -0
  49. package/dist/esm/types/paywall-events.js +2 -0
  50. package/dist/esm/types/paywall-events.js.map +1 -0
  51. package/dist/esm/ui-builder/base-view-emitter.d.ts +1 -1
  52. package/dist/esm/ui-builder/base-view-emitter.js +1 -1
  53. package/dist/esm/ui-builder/base-view-emitter.js.map +1 -1
  54. package/dist/esm/ui-builder/create-onboarding-view.d.ts +1 -1
  55. package/dist/esm/ui-builder/create-onboarding-view.js.map +1 -1
  56. package/dist/esm/ui-builder/create-paywall-view.d.ts +1 -1
  57. package/dist/esm/ui-builder/create-paywall-view.js.map +1 -1
  58. package/dist/esm/ui-builder/onboarding-view-controller.d.ts +1 -1
  59. package/dist/esm/ui-builder/onboarding-view-controller.js +7 -9
  60. package/dist/esm/ui-builder/onboarding-view-controller.js.map +1 -1
  61. package/dist/esm/ui-builder/onboarding-view-emitter.d.ts +2 -2
  62. package/dist/esm/ui-builder/onboarding-view-emitter.js +2 -2
  63. package/dist/esm/ui-builder/onboarding-view-emitter.js.map +1 -1
  64. package/dist/esm/ui-builder/paywall-view-controller.d.ts +1 -1
  65. package/dist/esm/ui-builder/paywall-view-controller.js +6 -8
  66. package/dist/esm/ui-builder/paywall-view-controller.js.map +1 -1
  67. package/dist/esm/ui-builder/paywall-view-emitter.d.ts +2 -2
  68. package/dist/esm/ui-builder/paywall-view-emitter.js +2 -2
  69. package/dist/esm/ui-builder/paywall-view-emitter.js.map +1 -1
  70. package/dist/esm/ui-builder/types.d.ts +3 -3
  71. package/dist/esm/ui-builder/types.js +1 -1
  72. package/dist/esm/ui-builder/types.js.map +1 -1
  73. package/dist/esm/utils/index.d.ts +1 -0
  74. package/dist/esm/utils/index.js +2 -0
  75. package/dist/esm/utils/index.js.map +1 -0
  76. package/dist/esm/version.d.ts +1 -1
  77. package/dist/esm/version.js +1 -1
  78. package/dist/esm/version.js.map +1 -1
  79. package/dist/plugin.cjs.js +2882 -2777
  80. package/dist/plugin.cjs.js.map +1 -1
  81. package/dist/plugin.js +5321 -5216
  82. package/dist/plugin.js.map +1 -1
  83. package/package.json +13 -7
  84. package/dist/esm/coder-registry.d.ts +0 -27
  85. package/dist/esm/coder-registry.js +0 -25
  86. package/dist/esm/coder-registry.js.map +0 -1
  87. package/dist/esm/shared/adapty-error.d.ts +0 -19
  88. package/dist/esm/shared/adapty-error.js +0 -46
  89. package/dist/esm/shared/adapty-error.js.map +0 -1
  90. package/dist/esm/shared/coders/adapty-access-level.d.ts +0 -10
  91. package/dist/esm/shared/coders/adapty-access-level.js +0 -113
  92. package/dist/esm/shared/coders/adapty-access-level.js.map +0 -1
  93. package/dist/esm/shared/coders/adapty-configuration.d.ts +0 -8
  94. package/dist/esm/shared/coders/adapty-configuration.js +0 -68
  95. package/dist/esm/shared/coders/adapty-configuration.js.map +0 -1
  96. package/dist/esm/shared/coders/adapty-discount-phase.d.ts +0 -10
  97. package/dist/esm/shared/coders/adapty-discount-phase.js +0 -39
  98. package/dist/esm/shared/coders/adapty-discount-phase.js.map +0 -1
  99. package/dist/esm/shared/coders/adapty-identify-params.d.ts +0 -11
  100. package/dist/esm/shared/coders/adapty-identify-params.js +0 -19
  101. package/dist/esm/shared/coders/adapty-identify-params.js.map +0 -1
  102. package/dist/esm/shared/coders/adapty-installation-details.d.ts +0 -7
  103. package/dist/esm/shared/coders/adapty-installation-details.js +0 -25
  104. package/dist/esm/shared/coders/adapty-installation-details.js.map +0 -1
  105. package/dist/esm/shared/coders/adapty-installation-status.d.ts +0 -7
  106. package/dist/esm/shared/coders/adapty-installation-status.js +0 -42
  107. package/dist/esm/shared/coders/adapty-installation-status.js.map +0 -1
  108. package/dist/esm/shared/coders/adapty-native-error.d.ts +0 -14
  109. package/dist/esm/shared/coders/adapty-native-error.js +0 -21
  110. package/dist/esm/shared/coders/adapty-native-error.js.map +0 -1
  111. package/dist/esm/shared/coders/adapty-non-subscription.d.ts +0 -10
  112. package/dist/esm/shared/coders/adapty-non-subscription.js +0 -31
  113. package/dist/esm/shared/coders/adapty-non-subscription.js.map +0 -1
  114. package/dist/esm/shared/coders/adapty-onboarding-builder.d.ts +0 -10
  115. package/dist/esm/shared/coders/adapty-onboarding-builder.js +0 -14
  116. package/dist/esm/shared/coders/adapty-onboarding-builder.js.map +0 -1
  117. package/dist/esm/shared/coders/adapty-onboarding.d.ts +0 -13
  118. package/dist/esm/shared/coders/adapty-onboarding.js +0 -55
  119. package/dist/esm/shared/coders/adapty-onboarding.js.map +0 -1
  120. package/dist/esm/shared/coders/adapty-paywall-builder.d.ts +0 -10
  121. package/dist/esm/shared/coders/adapty-paywall-builder.js +0 -19
  122. package/dist/esm/shared/coders/adapty-paywall-builder.js.map +0 -1
  123. package/dist/esm/shared/coders/adapty-paywall-product.d.ts +0 -11
  124. package/dist/esm/shared/coders/adapty-paywall-product.js +0 -94
  125. package/dist/esm/shared/coders/adapty-paywall-product.js.map +0 -1
  126. package/dist/esm/shared/coders/adapty-paywall.d.ts +0 -13
  127. package/dist/esm/shared/coders/adapty-paywall.js +0 -75
  128. package/dist/esm/shared/coders/adapty-paywall.js.map +0 -1
  129. package/dist/esm/shared/coders/adapty-placement.d.ts +0 -10
  130. package/dist/esm/shared/coders/adapty-placement.js +0 -23
  131. package/dist/esm/shared/coders/adapty-placement.js.map +0 -1
  132. package/dist/esm/shared/coders/adapty-price.d.ts +0 -10
  133. package/dist/esm/shared/coders/adapty-price.js +0 -29
  134. package/dist/esm/shared/coders/adapty-price.js.map +0 -1
  135. package/dist/esm/shared/coders/adapty-profile-parameters.d.ts +0 -10
  136. package/dist/esm/shared/coders/adapty-profile-parameters.js +0 -30
  137. package/dist/esm/shared/coders/adapty-profile-parameters.js.map +0 -1
  138. package/dist/esm/shared/coders/adapty-profile.d.ts +0 -10
  139. package/dist/esm/shared/coders/adapty-profile.js +0 -47
  140. package/dist/esm/shared/coders/adapty-profile.js.map +0 -1
  141. package/dist/esm/shared/coders/adapty-purchase-params.d.ts +0 -7
  142. package/dist/esm/shared/coders/adapty-purchase-params.js +0 -37
  143. package/dist/esm/shared/coders/adapty-purchase-params.js.map +0 -1
  144. package/dist/esm/shared/coders/adapty-purchase-result.d.ts +0 -12
  145. package/dist/esm/shared/coders/adapty-purchase-result.js +0 -54
  146. package/dist/esm/shared/coders/adapty-purchase-result.js.map +0 -1
  147. package/dist/esm/shared/coders/adapty-remote-config.d.ts +0 -13
  148. package/dist/esm/shared/coders/adapty-remote-config.js +0 -41
  149. package/dist/esm/shared/coders/adapty-remote-config.js.map +0 -1
  150. package/dist/esm/shared/coders/adapty-subscription-details.d.ts +0 -11
  151. package/dist/esm/shared/coders/adapty-subscription-details.js +0 -64
  152. package/dist/esm/shared/coders/adapty-subscription-details.js.map +0 -1
  153. package/dist/esm/shared/coders/adapty-subscription-offer-identifier.d.ts +0 -10
  154. package/dist/esm/shared/coders/adapty-subscription-offer-identifier.js +0 -19
  155. package/dist/esm/shared/coders/adapty-subscription-offer-identifier.js.map +0 -1
  156. package/dist/esm/shared/coders/adapty-subscription-offer.d.ts +0 -11
  157. package/dist/esm/shared/coders/adapty-subscription-offer.js +0 -50
  158. package/dist/esm/shared/coders/adapty-subscription-offer.js.map +0 -1
  159. package/dist/esm/shared/coders/adapty-subscription-period.d.ts +0 -10
  160. package/dist/esm/shared/coders/adapty-subscription-period.js +0 -11
  161. package/dist/esm/shared/coders/adapty-subscription-period.js.map +0 -1
  162. package/dist/esm/shared/coders/adapty-subscription.d.ts +0 -10
  163. package/dist/esm/shared/coders/adapty-subscription.js +0 -116
  164. package/dist/esm/shared/coders/adapty-subscription.js.map +0 -1
  165. package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.d.ts +0 -8
  166. package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js +0 -10
  167. package/dist/esm/shared/coders/adapty-ui-create-onboarding-view-params.js.map +0 -1
  168. package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.d.ts +0 -18
  169. package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js +0 -142
  170. package/dist/esm/shared/coders/adapty-ui-create-paywall-view-params.js.map +0 -1
  171. package/dist/esm/shared/coders/adapty-ui-media-cache.d.ts +0 -10
  172. package/dist/esm/shared/coders/adapty-ui-media-cache.js +0 -24
  173. package/dist/esm/shared/coders/adapty-ui-media-cache.js.map +0 -1
  174. package/dist/esm/shared/coders/adapty-ui-onboarding-meta.d.ts +0 -10
  175. package/dist/esm/shared/coders/adapty-ui-onboarding-meta.js +0 -29
  176. package/dist/esm/shared/coders/adapty-ui-onboarding-meta.js.map +0 -1
  177. package/dist/esm/shared/coders/adapty-ui-onboarding-state-params.d.ts +0 -10
  178. package/dist/esm/shared/coders/adapty-ui-onboarding-state-params.js +0 -24
  179. package/dist/esm/shared/coders/adapty-ui-onboarding-state-params.js.map +0 -1
  180. package/dist/esm/shared/coders/adapty-ui-onboarding-state-updated-action.d.ts +0 -14
  181. package/dist/esm/shared/coders/adapty-ui-onboarding-state-updated-action.js +0 -55
  182. package/dist/esm/shared/coders/adapty-ui-onboarding-state-updated-action.js.map +0 -1
  183. package/dist/esm/shared/coders/array.d.ts +0 -15
  184. package/dist/esm/shared/coders/array.js +0 -34
  185. package/dist/esm/shared/coders/array.js.map +0 -1
  186. package/dist/esm/shared/coders/bridge-error.d.ts +0 -13
  187. package/dist/esm/shared/coders/bridge-error.js +0 -78
  188. package/dist/esm/shared/coders/bridge-error.js.map +0 -1
  189. package/dist/esm/shared/coders/coder.d.ts +0 -13
  190. package/dist/esm/shared/coders/coder.js +0 -118
  191. package/dist/esm/shared/coders/coder.js.map +0 -1
  192. package/dist/esm/shared/coders/date.d.ts +0 -9
  193. package/dist/esm/shared/coders/date.js +0 -36
  194. package/dist/esm/shared/coders/date.js.map +0 -1
  195. package/dist/esm/shared/coders/error-coder.d.ts +0 -6
  196. package/dist/esm/shared/coders/error-coder.js +0 -2
  197. package/dist/esm/shared/coders/error-coder.js.map +0 -1
  198. package/dist/esm/shared/coders/hashmap.d.ts +0 -7
  199. package/dist/esm/shared/coders/hashmap.js +0 -25
  200. package/dist/esm/shared/coders/hashmap.js.map +0 -1
  201. package/dist/esm/shared/coders/json.d.ts +0 -8
  202. package/dist/esm/shared/coders/json.js +0 -15
  203. package/dist/esm/shared/coders/json.js.map +0 -1
  204. package/dist/esm/shared/coders/parse-onboarding.d.ts +0 -3
  205. package/dist/esm/shared/coders/parse-onboarding.js +0 -86
  206. package/dist/esm/shared/coders/parse-onboarding.js.map +0 -1
  207. package/dist/esm/shared/coders/parse-paywall.d.ts +0 -4
  208. package/dist/esm/shared/coders/parse-paywall.js +0 -141
  209. package/dist/esm/shared/coders/parse-paywall.js.map +0 -1
  210. package/dist/esm/shared/coders/parse.d.ts +0 -6
  211. package/dist/esm/shared/coders/parse.js +0 -135
  212. package/dist/esm/shared/coders/parse.js.map +0 -1
  213. package/dist/esm/shared/coders/product-reference.d.ts +0 -10
  214. package/dist/esm/shared/coders/product-reference.js +0 -53
  215. package/dist/esm/shared/coders/product-reference.js.map +0 -1
  216. package/dist/esm/shared/coders/types.d.ts +0 -23
  217. package/dist/esm/shared/coders/types.js +0 -2
  218. package/dist/esm/shared/coders/types.js.map +0 -1
  219. package/dist/esm/shared/coders/utils.d.ts +0 -18
  220. package/dist/esm/shared/coders/utils.js +0 -50
  221. package/dist/esm/shared/coders/utils.js.map +0 -1
  222. package/dist/esm/shared/constants.d.ts +0 -42
  223. package/dist/esm/shared/constants.js +0 -37
  224. package/dist/esm/shared/constants.js.map +0 -1
  225. package/dist/esm/shared/index.d.ts +0 -3
  226. package/dist/esm/shared/index.js +0 -4
  227. package/dist/esm/shared/index.js.map +0 -1
  228. package/dist/esm/shared/logger/console-sink.d.ts +0 -2
  229. package/dist/esm/shared/logger/console-sink.js +0 -23
  230. package/dist/esm/shared/logger/console-sink.js.map +0 -1
  231. package/dist/esm/shared/logger/index.d.ts +0 -5
  232. package/dist/esm/shared/logger/index.js +0 -5
  233. package/dist/esm/shared/logger/index.js.map +0 -1
  234. package/dist/esm/shared/logger/log-context.d.ts +0 -23
  235. package/dist/esm/shared/logger/log-context.js +0 -61
  236. package/dist/esm/shared/logger/log-context.js.map +0 -1
  237. package/dist/esm/shared/logger/log-scope.d.ts +0 -25
  238. package/dist/esm/shared/logger/log-scope.js +0 -26
  239. package/dist/esm/shared/logger/log-scope.js.map +0 -1
  240. package/dist/esm/shared/logger/log.d.ts +0 -34
  241. package/dist/esm/shared/logger/log.js +0 -110
  242. package/dist/esm/shared/logger/log.js.map +0 -1
  243. package/dist/esm/shared/logger/types.d.ts +0 -20
  244. package/dist/esm/shared/logger/types.js +0 -2
  245. package/dist/esm/shared/logger/types.js.map +0 -1
  246. package/dist/esm/shared/types/bridge.d.ts +0 -50
  247. package/dist/esm/shared/types/bridge.js +0 -78
  248. package/dist/esm/shared/types/bridge.js.map +0 -1
  249. package/dist/esm/shared/types/error.d.ts +0 -325
  250. package/dist/esm/shared/types/error.js +0 -176
  251. package/dist/esm/shared/types/error.js.map +0 -1
  252. package/dist/esm/shared/types/index.d.ts +0 -718
  253. package/dist/esm/shared/types/index.js +0 -14
  254. package/dist/esm/shared/types/index.js.map +0 -1
  255. package/dist/esm/shared/types/inputs.d.ts +0 -238
  256. package/dist/esm/shared/types/inputs.js +0 -42
  257. package/dist/esm/shared/types/inputs.js.map +0 -1
  258. package/dist/esm/shared/types/method-types.d.ts +0 -86
  259. package/dist/esm/shared/types/method-types.js +0 -13
  260. package/dist/esm/shared/types/method-types.js.map +0 -1
  261. package/dist/esm/shared/types/onboarding-events.d.ts +0 -60
  262. package/dist/esm/shared/types/onboarding-events.js +0 -11
  263. package/dist/esm/shared/types/onboarding-events.js.map +0 -1
  264. package/dist/esm/shared/types/paywall-events.d.ts +0 -84
  265. package/dist/esm/shared/types/paywall-events.js +0 -16
  266. package/dist/esm/shared/types/paywall-events.js.map +0 -1
  267. package/dist/esm/shared/utils/compact-object.d.ts +0 -6
  268. package/dist/esm/shared/utils/compact-object.js +0 -9
  269. package/dist/esm/shared/utils/compact-object.js.map +0 -1
  270. package/dist/esm/shared/utils/map-values.d.ts +0 -8
  271. package/dist/esm/shared/utils/map-values.js +0 -11
  272. package/dist/esm/shared/utils/map-values.js.map +0 -1
  273. package/dist/esm/shared/utils/merge-options.d.ts +0 -7
  274. package/dist/esm/shared/utils/merge-options.js +0 -93
  275. package/dist/esm/shared/utils/merge-options.js.map +0 -1
  276. package/dist/esm/shared/utils/platform.d.ts +0 -2
  277. package/dist/esm/shared/utils/platform.js +0 -5
  278. package/dist/esm/shared/utils/platform.js.map +0 -1
  279. package/dist/esm/shared/utils/with-error-context.d.ts +0 -7
  280. package/dist/esm/shared/utils/with-error-context.js +0 -33
  281. package/dist/esm/shared/utils/with-error-context.js.map +0 -1
@@ -1,14 +0,0 @@
1
- export * from './error';
2
- export * from './inputs';
3
- export * from '../constants';
4
- export * from './paywall-events';
5
- export const WebPresentation = Object.freeze({
6
- BrowserOutApp: 'browser_out_app',
7
- BrowserInApp: 'browser_in_app',
8
- });
9
- export const RefundPreference = Object.freeze({
10
- NoPreference: 'no_preference',
11
- Grant: 'grant',
12
- Decline: 'decline',
13
- });
14
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared/types/index.ts"],"names":[],"mappings":"AASA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AAovBjC,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,aAAa,EAAE,iBAAiB;IAChC,YAAY,EAAE,gBAAgB;CAC/B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,YAAY,EAAE,eAAe;IAC7B,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC","sourcesContent":["import {\n VendorStore,\n OfferType,\n CancellationReason,\n Gender,\n AppTrackingTransparencyStatus,\n ProductPeriod,\n} from '../constants';\n\nexport * from './error';\nexport * from './inputs';\nexport * from '../constants';\nexport * from './paywall-events';\n\nexport interface AdaptyPrice {\n /**\n * Price as number\n */\n amount: number;\n /**\n * The currency code of the locale\n * used to format the price of the product.\n * The ISO 4217 (USD, EUR).\n */\n currencyCode?: string;\n /**\n * The currency symbol of the locale\n * used to format the price of the product.\n * ($, €).\n */\n currencySymbol?: string;\n /**\n * A price’s language is determined\n * by the preferred language set on the device.\n * On Android, the formatted price from Google Play as is.\n */\n localizedString?: string;\n}\n\n/**\n * Describes an object that represents a paywall.\n * Used in {@link Adapty.getPaywall} method.\n * @public\n */\nexport interface AdaptyPaywall {\n readonly placement: AdaptyPlacement;\n\n /**\n * If `true`, it is possible to fetch the view object\n * and use it with AdaptyUI library.\n * @readonly\n */\n readonly hasViewConfiguration: boolean;\n\n /**\n * A paywall name.\n * @readonly\n */\n readonly name: string;\n /**\n * A remote config configured in Adapty Dashboard for this paywall.\n * @readonly\n */\n readonly remoteConfig?: AdaptyRemoteConfig;\n /**\n * An identifier of a variation,\n * used to attribute purchases to this paywall.\n * @readonly\n */\n readonly variationId: string;\n /**\n * Array of initial products info\n * @readonly\n * @deprecated Use {@link AdaptyPaywall.productIdentifiers} instead\n */\n readonly products: ProductReference[];\n\n /**\n * Array of product identifiers for this paywall\n * @readonly\n */\n readonly productIdentifiers: AdaptyProductIdentifier[];\n\n id: string;\n version?: number;\n webPurchaseUrl?: string;\n payloadData?: string;\n /**\n * @internal Used internally by the SDK\n */\n requestLocale: string;\n paywallBuilder?: AdaptyPaywallBuilder;\n}\n\nexport interface AdaptyOnboarding {\n readonly placement: AdaptyPlacement;\n /**\n * If `true`, it is possible to fetch the view object\n * and use it with AdaptyUI library.\n * @readonly\n */\n readonly hasViewConfiguration: boolean;\n\n /**\n * A paywall name.\n * @readonly\n */\n readonly name: string;\n /**\n * A remote config configured in Adapty Dashboard for this paywall.\n * @readonly\n */\n readonly remoteConfig?: AdaptyRemoteConfig;\n /**\n * An identifier of a variation,\n * used to attribute purchases to this paywall.\n * @readonly\n */\n readonly variationId: string;\n\n id: string;\n version?: number;\n payloadData?: string;\n /**\n * @internal Used internally by the SDK\n */\n requestLocale: string;\n onboardingBuilder?: AdaptyOnboardingBuilder;\n}\n\nexport interface AdaptyPlacement {\n /**\n * Parent A/B test name.\n * @readonly\n */\n readonly abTestName: string;\n\n /**\n * A name of an audience to which the paywall belongs.\n * @readonly\n */\n readonly audienceName: string;\n /**\n * ID of a placement configured in Adapty Dashboard.\n * @readonly\n */\n readonly id: string;\n /**\n * Current revision (version) of a paywall.\n * Every change within a paywall creates a new revision.\n * @readonly\n */\n readonly revision: number;\n\n isTrackingPurchases?: boolean;\n audienceVersionId: string;\n}\n\n/**\n * Describes an object that represents a remote config of a paywall.\n * @public\n */\nexport interface AdaptyRemoteConfig {\n /**\n * Identifier of a paywall locale.\n * @readonly\n */\n readonly lang: string;\n /**\n * A custom dictionary configured in Adapty Dashboard for this paywall.\n * @readonly\n */\n readonly data: Record<string, any>;\n /**\n * A custom JSON string configured in Adapty Dashboard for this paywall.\n * @readonly\n */\n readonly dataString: string;\n}\n\nexport interface AdaptyPaywallBuilder {\n readonly id: string;\n readonly lang: string;\n}\n\nexport interface AdaptyOnboardingBuilder {\n readonly url: string;\n}\n\nexport type AdaptyPurchaseResult =\n | {\n type: 'pending' | 'user_cancelled';\n }\n | {\n type: 'success';\n profile: AdaptyProfile;\n ios?: {\n jwsTransaction?: string;\n };\n android?: {\n purchaseToken?: string;\n };\n };\n\n/**\n * Interface representing a user profile in Adapty,\n * including details about the user's subscriptions and consumable products.\n * @public\n */\nexport interface AdaptyProfile {\n /**\n * Object that maps access level identifiers (configured by you in Adapty Dashboard)\n * to the corresponding access level details. The value can be `null`\n * if the user does not have any access levels.\n * @readonly\n */\n readonly accessLevels?: Record<string, AdaptyAccessLevel>;\n\n /**\n * Object representing custom attributes set for the user using\n * the {@link Adapty.updateProfile} method.\n * @readonly\n */\n readonly customAttributes?: Record<string, any>;\n\n /**\n * The identifier for a user in your system.\n * @readonly\n */\n readonly customerUserId?: string;\n\n /**\n * Object that maps product ids from the store to an array of\n * information about the user's non-subscription purchases.\n * The value can be `null` if the user does not have any purchases.\n * @readonly\n */\n readonly nonSubscriptions?: Record<string, AdaptyNonSubscription[]>;\n\n /**\n * The identifier for a user in Adapty.\n */\n readonly profileId: string;\n\n /**\n * Object that maps product ids from a store to\n * information about the user's subscriptions.\n * The value can be `null` if the user does not have any subscriptions.\n * @readonly\n */\n readonly subscriptions?: Record<string, AdaptySubscription>;\n}\n\n/**\n * Interface representing access level details of a user.\n * @public\n */\nexport interface AdaptyAccessLevel {\n /**\n * The date and time when the access level was activated.\n * @readonly\n */\n readonly activatedAt: Date;\n\n /**\n * Type of active introductory offer, if any.\n * @readonly\n */\n readonly activeIntroductoryOfferType?: OfferType;\n\n /**\n * Identifier of the active promotional offer, if any.\n * @readonly\n */\n readonly activePromotionalOfferId?: string;\n\n /**\n * Type of the active promotional offer, if any.\n * @readonly\n */\n readonly activePromotionalOfferType?: OfferType;\n\n /**\n * The date and time when a billing issue was detected.\n * @readonly\n */\n readonly billingIssueDetectedAt?: Date;\n\n /**\n * The reason for the cancellation of the subscription.\n * @readonly\n */\n readonly cancellationReason?: CancellationReason;\n\n /**\n * The expiration date of the access level, if applicable.\n * @readonly\n */\n readonly expiresAt?: Date;\n\n /**\n * Unique identifier of the access level\n * configured by you in Adapty Dashboard.\n * @readonly\n */\n readonly id: string;\n\n /**\n * Flag indicating whether the access level is currently active.\n * @readonly\n */\n readonly isActive: boolean;\n\n /**\n * Flag indicating whether this auto-renewable subscription is in the grace period.\n * @readonly\n */\n readonly isInGracePeriod: boolean;\n\n /**\n * Flag indicating whether this access level is active for a lifetime.\n * @readonly\n */\n readonly isLifetime: boolean;\n\n /**\n * Flag indicating whether this purchase was refunded.\n * @readonly\n */\n readonly isRefund: boolean;\n\n /**\n * The date and time when the access level was renewed.\n * @readonly\n */\n readonly renewedAt?: Date;\n\n /**\n * The start date of this access level.\n * @readonly\n */\n readonly startsAt?: Date;\n\n /**\n * The store where the purchase that unlocked this access level was made.\n * @readonly\n */\n readonly store: VendorStore;\n\n /**\n * The date and time when the auto-renewable subscription was cancelled.\n * @readonly\n */\n readonly unsubscribedAt?: Date;\n\n /**\n * The identifier of the product in the store that unlocked this access level.\n * @readonly\n */\n readonly vendorProductId: string;\n\n /**\n * Flag indicating whether this auto-renewable subscription is set to renew.\n * @readonly\n */\n readonly willRenew: boolean;\n\n android?: {\n offerId?: string;\n };\n}\n\n/**\n * Interface representing a consumable or non-subscription purchase made by the user.\n * @public\n */\nexport interface AdaptyNonSubscription {\n /**\n * Flag indicating whether the product is consumable.\n * @readonly\n */\n readonly isConsumable: boolean;\n\n /**\n * Flag indicating whether the purchase was refunded.\n * @readonly\n */\n readonly isRefund: boolean;\n\n /**\n * Flag indicating whether the product was purchased in a sandbox environment.\n * @readonly\n */\n readonly isSandbox: boolean;\n\n /**\n * The date and time when the purchase was made.\n * @readonly\n */\n readonly purchasedAt: Date;\n\n /**\n * The identifier of the product in the store that was purchased.\n * @readonly\n */\n readonly vendorProductId: string;\n /**\n * The identifier of the product in the store that was purchased.\n * @readonly\n */\n readonly vendorTransactionId?: string;\n\n /**\n * The store where the purchase was made.\n * @readonly\n */\n readonly store: VendorStore;\n\n /**\n * An identifier of the purchase in Adapty.\n * You can use it to ensure that you've already processed this purchase\n * (for example tracking one time products).\n * @readonly\n */\n readonly purchaseId: string;\n}\n\n/**\n * Interface representing details about a user's subscription.\n * @public\n */\nexport interface AdaptySubscription {\n /**\n * The date and time when the subscription was activated.\n * @readonly\n */\n readonly activatedAt: Date;\n\n /**\n * Type of active introductory offer, if any.\n * @readonly\n */\n readonly activeIntroductoryOfferType?: OfferType;\n\n /**\n * Identifier of the active promotional offer, if any.\n * @readonly\n */\n readonly activePromotionalOfferId?: string;\n\n /**\n * Type of the active promotional offer, if any.\n * @readonly\n */\n readonly activePromotionalOfferType?: OfferType;\n\n /**\n * The date and time when a billing issue was detected.\n * @readonly\n */\n readonly billingIssueDetectedAt?: Date;\n\n /**\n * The reason for the cancellation of the subscription.\n * @readonly\n */\n readonly cancellationReason?: CancellationReason;\n\n /**\n * The expiration date of the subscription, if applicable.\n * @readonly\n */\n readonly expiresAt?: Date;\n\n /**\n * Flag indicating whether the subscription is currently active.\n * @readonly\n */\n readonly isActive: boolean;\n\n /**\n * Flag indicating whether the subscription is in the grace period.\n * @readonly\n */\n readonly isInGracePeriod: boolean;\n\n /**\n * Flag indicating whether the subscription is set for a lifetime.\n * @readonly\n */\n readonly isLifetime: boolean;\n\n /**\n * Flag indicating whether the subscription was refunded.\n * @readonly\n */\n readonly isRefund: boolean;\n\n /**\n * Flag indicating whether the subscription was purchased in a sandbox environment.\n * @readonly\n */\n readonly isSandbox: boolean;\n\n /**\n * The date and time when the subscription was renewed.\n * @readonly\n */\n readonly renewedAt?: Date;\n\n /**\n * The date and time when the subscription starts.\n * @readonly\n */\n readonly startsAt?: Date;\n\n /**\n * The store where the subscription was made.\n * @readonly\n */\n readonly store: VendorStore;\n\n /**\n * The date and time when the subscription was cancelled.\n * @readonly\n */\n readonly unsubscribedAt?: Date;\n\n /**\n * The identifier of the product in the store that was subscribed to.\n * @readonly\n */\n readonly vendorProductId: string;\n\n /**\n * The identifier of the product in the store that was subscribed to.\n * @readonly\n */\n readonly vendorTransactionId: string;\n /**\n * An original transaction id of the purchase in a store that unlocked this subscription.\n * For auto-renewable subscription, this will be an id of the first transaction in this subscription.\n * @readonly\n */\n readonly vendorOriginalTransactionId: string;\n /**\n * Flag indicating whether the subscription is set to auto-renew.\n * @readonly\n */\n readonly willRenew: boolean;\n}\n\n/**\n * Describes an object that represents a product.\n * Used in {@link Adapty.getPaywallProducts} method and in {@link Adapty.makePurchase} method.\n * @public\n */\nexport interface AdaptyPaywallProduct {\n /**\n * A description of the product.\n */\n readonly localizedDescription: string;\n /**\n * The region code of the locale used to format the price of the product.\n * ISO 3166 ALPHA-2 (US, DE)\n */\n readonly regionCode?: string;\n /**\n * The name of the product.\n */\n readonly localizedTitle: string;\n /**\n * Same as `abTestName` property of the parent {@link AdaptyPaywall}.\n */\n readonly paywallABTestName: string;\n /**\n * Same as `name` property of the parent {@link AdaptyPaywall}.\n */\n readonly paywallName: string;\n /**\n * The cost of the product in the local currency\n */\n readonly price?: AdaptyPrice;\n readonly adaptyId: string;\n readonly accessLevelId: string;\n readonly productType: string;\n /**\n * Same as `variationId` property of the parent {@link AdaptyPaywall}.\n */\n readonly variationId: string;\n /**\n * Unique identifier of a product\n * from App Store Connect or Google Play Console\n */\n readonly vendorProductId: string;\n paywallProductIndex: number;\n webPurchaseUrl?: string;\n payloadData?: string;\n subscription?: AdaptySubscriptionDetails;\n ios?: {\n /**\n * Boolean value that indicates\n * whether the product is available for family sharing\n * in App Store Connect.\n * Will be `false` for iOS version below 14.0 and macOS version below 11.0.\n * @see {@link https://developer.apple.com/documentation/storekit/skproduct/3564805-isfamilyshareable}\n */\n readonly isFamilyShareable: boolean;\n };\n}\n\nexport interface AdaptySubscriptionDetails {\n /**\n * The period details for products that are subscriptions.\n * Will be `null` for iOS version below 11.2 and macOS version below 10.14.4.\n */\n subscriptionPeriod: AdaptySubscriptionPeriod;\n /**\n * The period’s language is determined\n * by the preferred language set on the device.\n */\n localizedSubscriptionPeriod?: string;\n /**\n * A subscription offer if available for the auto-renewable subscription.\n */\n offer?: AdaptySubscriptionOffer;\n\n ios?: {\n /**\n * An identifier of the subscription group\n * to which the subscription belongs.\n * Will be `null` for iOS version below 12.0 and macOS version below 10.14.\n */\n subscriptionGroupIdentifier?: string;\n };\n\n android?: {\n basePlanId: string;\n renewalType?: 'prepaid' | 'autorenewable';\n };\n}\n\n/**\n * Subscription offer model to products\n * @see {@link https://adapty.io/docs/capacitor-sdk-models | [DOC] SDK Models}\n */\nexport interface AdaptySubscriptionOffer {\n readonly identifier: AdaptySubscriptionOfferId;\n\n phases: AdaptyDiscountPhase[];\n\n android?: {\n offerTags?: string[];\n };\n}\n\nexport type AdaptySubscriptionOfferId =\n | { id?: string; type: 'introductory' }\n | { id: string; type: 'promotional' | 'win_back' };\n\n/**\n * Discount model to products\n * @see {@link https://adapty.io/docs/capacitor-sdk-models | [DOC] SDK Models}\n */\nexport interface AdaptyDiscountPhase {\n /**\n * A formatted number of periods of a discount for a user’s locale.\n * @readonly\n */\n readonly localizedNumberOfPeriods?: string;\n /**\n * A formatted subscription period of a discount for a user’s locale.\n * @readonly\n */\n readonly localizedSubscriptionPeriod?: string;\n /**\n * A number of periods this product discount is available.\n * @readonly\n */\n readonly numberOfPeriods: number;\n /**\n * Discount price of a product in a local currency.\n * @readonly\n */\n readonly price: AdaptyPrice;\n /**\n * An information about period for a product discount.\n * @readonly\n */\n readonly subscriptionPeriod: AdaptySubscriptionPeriod;\n\n /**\n * A payment mode for this product discount.\n * @readonly\n */\n readonly paymentMode: OfferType;\n}\n\n/**\n * An object containing information about a subscription period.\n * @public\n */\nexport interface AdaptySubscriptionPeriod {\n /**\n * A number of period units.\n * @readonly\n */\n readonly numberOfUnits: number;\n /**\n * A unit of time that a subscription period is specified in.\n * @readonly\n */\n readonly unit: ProductPeriod;\n}\n\nexport interface AdaptyProfileParameters {\n analyticsDisabled?: boolean;\n codableCustomAttributes?: { [key: string]: any };\n appTrackingTransparencyStatus?: AppTrackingTransparencyStatus;\n firstName?: string;\n lastName?: string;\n gender?: Gender;\n birthday?: string;\n email?: string;\n phoneNumber?: string;\n}\n\nexport interface ProductReference {\n vendorId: string;\n adaptyId: string;\n accessLevelId: string;\n productType: string;\n\n ios?: {\n promotionalOfferId?: string;\n winBackOfferId?: string;\n };\n\n android?: {\n basePlanId?: string;\n offerId?: string;\n };\n}\n\n/**\n * Interface representing a product identifier with vendor and platform-specific information.\n * @public\n */\nexport interface AdaptyProductIdentifier {\n /**\n * The vendor-specific product identifier (e.g., App Store or Google Play product ID).\n * @readonly\n */\n readonly vendorProductId: string;\n\n /**\n * The base plan identifier for Google Play subscriptions (Android only).\n * @readonly\n */\n readonly basePlanId?: string;\n\n /**\n * Internal Adapty product identifier.\n * @readonly\n */\n readonly adaptyProductId: string;\n}\n\nexport const WebPresentation = Object.freeze({\n BrowserOutApp: 'browser_out_app',\n BrowserInApp: 'browser_in_app',\n});\nexport type WebPresentation =\n (typeof WebPresentation)[keyof typeof WebPresentation];\n\nexport const RefundPreference = Object.freeze({\n NoPreference: 'no_preference',\n Grant: 'grant',\n Decline: 'decline',\n});\nexport type RefundPreference =\n (typeof RefundPreference)[keyof typeof RefundPreference];\n\nexport type AdaptyInstallationStatus =\n | {\n status: 'not_available' | 'not_determined';\n }\n | {\n status: 'determined';\n details: AdaptyInstallationDetails;\n };\n\nexport interface AdaptyInstallationDetails {\n /**\n * A unique identifier for this installation.\n * @readonly\n */\n readonly installId?: string;\n /**\n * The date and time when the app was installed.\n * @readonly\n */\n readonly installTime: Date;\n /**\n * The total number of times the app has been launched.\n * @readonly\n */\n readonly appLaunchCount: number;\n /**\n * Custom payload data associated with the installation.\n * @readonly\n */\n readonly payload?: string;\n}\n\n\n"]}
@@ -1,238 +0,0 @@
1
- import { AdaptyUiMediaCache } from '../../ui-builder/types';
2
- /**
3
- * Log levels for the SDK
4
- *
5
- * @remarks
6
- * Logging is performed on a native side.
7
- * So you are expected to watch logs in Xcode or Android Studio.
8
- */
9
- export declare const LogLevel: Readonly<{
10
- /**
11
- * Logs any additional information that may be useful during debugging,
12
- * such as function calls, API queries, etc.
13
- */
14
- VERBOSE: "verbose";
15
- /**
16
- * Logs only errors
17
- */
18
- ERROR: "error";
19
- /**
20
- * Logs messages from the SDK
21
- * that do not cause critical errors,
22
- * but are worth paying attention to
23
- */
24
- WARN: "warn";
25
- /**
26
- * Logs various information messages,
27
- * such as those that log the lifecycle of various modules
28
- */
29
- INFO: "info";
30
- }>;
31
- export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
32
- export declare const FetchPolicy: Readonly<{
33
- ReloadRevalidatingCacheData: "reload_revalidating_cache_data";
34
- ReturnCacheDataElseLoad: "return_cache_data_else_load";
35
- ReturnCacheDataIfNotExpiredElseLoad: "return_cache_data_if_not_expired_else_load";
36
- }>;
37
- export type FetchPolicy = (typeof FetchPolicy)[keyof typeof FetchPolicy];
38
- export type GetPlacementParamsInput = GetPlacementForDefaultAudienceParamsInput & {
39
- /**
40
- * This value limits the timeout (in milliseconds) for this method.
41
- *
42
- * @remarks
43
- * If the timeout is reached, cached data or local fallback will be returned.
44
- */
45
- loadTimeoutMs?: number;
46
- };
47
- export type GetPlacementForDefaultAudienceParamsInput = {
48
- /**
49
- * Fetch policy
50
- *
51
- * @remarks
52
- * By default SDK will try to load data from server and will return cached data in case of failure.
53
- * Otherwise use `'return_cache_data_else_load'` to return cached data if it exists.
54
- */
55
- fetchPolicy?: Exclude<FetchPolicy, 'return_cache_data_if_not_expired_else_load'>;
56
- } | {
57
- /**
58
- * Fetch policy
59
- *
60
- * @remarks
61
- * By default SDK will try to load data from server and will return cached data in case of failure.
62
- * Otherwise use `'return_cache_data_else_load'` to return cached data if it exists.
63
- */
64
- fetchPolicy: Extract<FetchPolicy, 'return_cache_data_if_not_expired_else_load'>;
65
- /**
66
- * Max age for cached data.
67
- *
68
- * @remarks
69
- * Max time (in seconds) the cache is valid in case of `'return_cache_data_if_not_expired_else_load'` fetch policy.
70
- */
71
- maxAgeSeconds: number;
72
- };
73
- /**
74
- * Describes optional parameters for the {@link activate} method.
75
- */
76
- export interface ActivateParamsInput {
77
- /**
78
- * Turn it on if you handle purchases and subscription status yourself
79
- * and use Adapty for sending subscription events and analytics
80
- *
81
- * @defaultValue `false`
82
- */
83
- observerMode?: boolean;
84
- /**
85
- * User identifier in your system
86
- *
87
- * @remarks
88
- * If none of the parameters are passed, the SDK will generate an ID
89
- * and use it for a current device.
90
- * Use your own ID:
91
- * 1. If you want to support a cross-device experience
92
- * 2. If you have your own authentication system,
93
- * and you want to associate adapty profile with your user
94
- */
95
- customerUserId?: string;
96
- /**
97
- * Log level for the SDK
98
- *
99
- * @remarks
100
- * Logging is performed on a native side.
101
- * So you are expected to watch logs in Xcode or Android Studio.
102
- */
103
- logLevel?: LogLevel;
104
- serverCluster?: 'default' | 'eu' | 'cn';
105
- backendProxyHost?: string;
106
- backendProxyPort?: number;
107
- activateUi?: boolean;
108
- mediaCache?: AdaptyUiMediaCache;
109
- /**
110
- * Locks methods threads until the SDK is ready.
111
- * @defaultValue `false`
112
- * @deprecated Turned on by default
113
- */
114
- lockMethodsUntilReady?: boolean;
115
- /**
116
- * Does not activate SDK until any other method is called
117
- * Fixes annoying iOS simulator auhtentication
118
- */
119
- __debugDeferActivation?: boolean;
120
- /**
121
- * Ignores multiple activation attempts on fast refresh.
122
- * If true, skips activation if SDK is already activated.
123
- */
124
- __ignoreActivationOnFastRefresh?: boolean;
125
- /**
126
- * Disables IP address collection
127
- * @defaultValue `false`
128
- */
129
- ipAddressCollectionDisabled?: boolean;
130
- ios?: {
131
- /**
132
- * Disables IDFA collection
133
- * @default false
134
- */
135
- idfaCollectionDisabled?: boolean;
136
- /**
137
- * App account token for iOS
138
- * @platform ios
139
- */
140
- appAccountToken?: string;
141
- /**
142
- * Controls whether the SDK will create a new profile when the app is restored from an iCloud backup
143
- * @defaultValue `false`
144
- * @platform ios
145
- */
146
- clearDataOnBackup?: boolean;
147
- };
148
- android?: {
149
- /**
150
- * Disables Google AdvertisingID collection
151
- * @default false
152
- */
153
- adIdCollectionDisabled?: boolean;
154
- /**
155
- * Enable pending prepaid plans for Android
156
- * @platform android
157
- * @default false
158
- */
159
- pendingPrepaidPlansEnabled?: boolean;
160
- /**
161
- * Allows using local access level data on Android when available
162
- * @platform android
163
- * @default false
164
- */
165
- localAccessLevelAllowed?: boolean;
166
- /**
167
- * Obfuscated account ID
168
- * @platform android
169
- */
170
- obfuscatedAccountId?: string;
171
- };
172
- }
173
- /**
174
- * Describes optional parameters for the {@link identify} method.
175
- */
176
- export interface IdentifyParamsInput {
177
- ios?: {
178
- /**
179
- * App account token for iOS
180
- * @platform ios
181
- */
182
- appAccountToken?: string;
183
- };
184
- android?: {
185
- /**
186
- * Obfuscated account ID
187
- * @platform android
188
- */
189
- obfuscatedAccountId?: string;
190
- };
191
- }
192
- export interface GetPaywallProductsParamsInput {
193
- }
194
- export declare const AdaptyAndroidSubscriptionUpdateReplacementMode: Readonly<{
195
- ChargeFullPrice: "charge_full_price";
196
- Deferred: "deferred";
197
- WithoutProration: "without_proration";
198
- ChargeProratedPrice: "charge_prorated_price";
199
- WithTimeProration: "with_time_proration";
200
- }>;
201
- export type AdaptyAndroidSubscriptionUpdateReplacementMode = (typeof AdaptyAndroidSubscriptionUpdateReplacementMode)[keyof typeof AdaptyAndroidSubscriptionUpdateReplacementMode];
202
- export interface AdaptyAndroidSubscriptionUpdateParameters {
203
- oldSubVendorProductId: string;
204
- prorationMode: AdaptyAndroidSubscriptionUpdateReplacementMode;
205
- }
206
- export interface AdaptyAndroidPurchaseParams {
207
- /**
208
- * Subscription update parameters
209
- * @platform android
210
- */
211
- subscriptionUpdateParams?: {
212
- oldSubVendorProductId: string;
213
- prorationMode: AdaptyAndroidSubscriptionUpdateReplacementMode;
214
- };
215
- /**
216
- * Whether the offer is personalized
217
- * @platform android
218
- * @see {@link https://developer.android.com/google/play/billing/integrate#personalized-price}
219
- */
220
- isOfferPersonalized?: boolean;
221
- }
222
- export type MakePurchaseParamsInput = {
223
- /**
224
- * Android purchase parameters
225
- * @platform android
226
- */
227
- android?: AdaptyAndroidPurchaseParams;
228
- };
229
- export type FileLocation = {
230
- ios: {
231
- fileName: string;
232
- };
233
- android: {
234
- relativeAssetPath: string;
235
- } | {
236
- rawResName: string;
237
- };
238
- };
@@ -1,42 +0,0 @@
1
- /**
2
- * Log levels for the SDK
3
- *
4
- * @remarks
5
- * Logging is performed on a native side.
6
- * So you are expected to watch logs in Xcode or Android Studio.
7
- */
8
- export const LogLevel = Object.freeze({
9
- /**
10
- * Logs any additional information that may be useful during debugging,
11
- * such as function calls, API queries, etc.
12
- */
13
- VERBOSE: 'verbose',
14
- /**
15
- * Logs only errors
16
- */
17
- ERROR: 'error',
18
- /**
19
- * Logs messages from the SDK
20
- * that do not cause critical errors,
21
- * but are worth paying attention to
22
- */
23
- WARN: 'warn',
24
- /**
25
- * Logs various information messages,
26
- * such as those that log the lifecycle of various modules
27
- */
28
- INFO: 'info',
29
- });
30
- export const FetchPolicy = Object.freeze({
31
- ReloadRevalidatingCacheData: 'reload_revalidating_cache_data',
32
- ReturnCacheDataElseLoad: 'return_cache_data_else_load',
33
- ReturnCacheDataIfNotExpiredElseLoad: 'return_cache_data_if_not_expired_else_load',
34
- });
35
- export const AdaptyAndroidSubscriptionUpdateReplacementMode = Object.freeze({
36
- ChargeFullPrice: 'charge_full_price',
37
- Deferred: 'deferred',
38
- WithoutProration: 'without_proration',
39
- ChargeProratedPrice: 'charge_prorated_price',
40
- WithTimeProration: 'with_time_proration',
41
- });
42
- //# sourceMappingURL=inputs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inputs.js","sourceRoot":"","sources":["../../../../src/shared/types/inputs.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC;IACpC;;;OAGG;IACH,OAAO,EAAE,SAAS;IAClB;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;;;OAIG;IACH,IAAI,EAAE,MAAM;IACZ;;;OAGG;IACH,IAAI,EAAE,MAAM;CACb,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IACvC,2BAA2B,EAAE,gCAAgC;IAC7D,uBAAuB,EAAE,6BAA6B;IACtD,mCAAmC,EACjC,4CAA4C;CAC/C,CAAC,CAAC;AA8KH,MAAM,CAAC,MAAM,8CAA8C,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1E,eAAe,EAAE,mBAAmB;IACpC,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,mBAAmB;IACrC,mBAAmB,EAAE,uBAAuB;IAC5C,iBAAiB,EAAE,qBAAqB;CACzC,CAAC,CAAC","sourcesContent":["import { AdaptyUiMediaCache } from '../../ui-builder/types';\n/**\n * Log levels for the SDK\n *\n * @remarks\n * Logging is performed on a native side.\n * So you are expected to watch logs in Xcode or Android Studio.\n */\nexport const LogLevel = Object.freeze({\n /**\n * Logs any additional information that may be useful during debugging,\n * such as function calls, API queries, etc.\n */\n VERBOSE: 'verbose',\n /**\n * Logs only errors\n */\n ERROR: 'error',\n /**\n * Logs messages from the SDK\n * that do not cause critical errors,\n * but are worth paying attention to\n */\n WARN: 'warn',\n /**\n * Logs various information messages,\n * such as those that log the lifecycle of various modules\n */\n INFO: 'info',\n});\n\nexport type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];\n\nexport const FetchPolicy = Object.freeze({\n ReloadRevalidatingCacheData: 'reload_revalidating_cache_data',\n ReturnCacheDataElseLoad: 'return_cache_data_else_load',\n ReturnCacheDataIfNotExpiredElseLoad:\n 'return_cache_data_if_not_expired_else_load',\n});\nexport type FetchPolicy = (typeof FetchPolicy)[keyof typeof FetchPolicy];\n\nexport type GetPlacementParamsInput =\n GetPlacementForDefaultAudienceParamsInput & {\n /**\n * This value limits the timeout (in milliseconds) for this method.\n *\n * @remarks\n * If the timeout is reached, cached data or local fallback will be returned.\n */\n loadTimeoutMs?: number;\n };\n\nexport type GetPlacementForDefaultAudienceParamsInput =\n | {\n /**\n * Fetch policy\n *\n * @remarks\n * By default SDK will try to load data from server and will return cached data in case of failure.\n * Otherwise use `'return_cache_data_else_load'` to return cached data if it exists.\n */\n fetchPolicy?: Exclude<\n FetchPolicy,\n 'return_cache_data_if_not_expired_else_load'\n >;\n }\n | {\n /**\n * Fetch policy\n *\n * @remarks\n * By default SDK will try to load data from server and will return cached data in case of failure.\n * Otherwise use `'return_cache_data_else_load'` to return cached data if it exists.\n */\n fetchPolicy: Extract<\n FetchPolicy,\n 'return_cache_data_if_not_expired_else_load'\n >;\n /**\n * Max age for cached data.\n *\n * @remarks\n * Max time (in seconds) the cache is valid in case of `'return_cache_data_if_not_expired_else_load'` fetch policy.\n */\n maxAgeSeconds: number;\n };\n\n/**\n * Describes optional parameters for the {@link activate} method.\n */\nexport interface ActivateParamsInput {\n /**\n * Turn it on if you handle purchases and subscription status yourself\n * and use Adapty for sending subscription events and analytics\n *\n * @defaultValue `false`\n */\n observerMode?: boolean;\n /**\n * User identifier in your system\n *\n * @remarks\n * If none of the parameters are passed, the SDK will generate an ID\n * and use it for a current device.\n * Use your own ID:\n * 1. If you want to support a cross-device experience\n * 2. If you have your own authentication system,\n * and you want to associate adapty profile with your user\n */\n customerUserId?: string;\n /**\n * Log level for the SDK\n *\n * @remarks\n * Logging is performed on a native side.\n * So you are expected to watch logs in Xcode or Android Studio.\n */\n logLevel?: LogLevel;\n\n serverCluster?: 'default' | 'eu' | 'cn';\n backendProxyHost?: string;\n backendProxyPort?: number;\n activateUi?: boolean;\n mediaCache?: AdaptyUiMediaCache;\n\n /**\n * Locks methods threads until the SDK is ready.\n * @defaultValue `false`\n * @deprecated Turned on by default\n */\n lockMethodsUntilReady?: boolean;\n /**\n * Does not activate SDK until any other method is called\n * Fixes annoying iOS simulator auhtentication\n */\n __debugDeferActivation?: boolean;\n /**\n * Ignores multiple activation attempts on fast refresh.\n * If true, skips activation if SDK is already activated.\n */\n __ignoreActivationOnFastRefresh?: boolean;\n /**\n * Disables IP address collection\n * @defaultValue `false`\n */\n ipAddressCollectionDisabled?: boolean;\n ios?: {\n /**\n * Disables IDFA collection\n * @default false\n */\n idfaCollectionDisabled?: boolean;\n /**\n * App account token for iOS\n * @platform ios\n */\n appAccountToken?: string;\n /**\n * Controls whether the SDK will create a new profile when the app is restored from an iCloud backup\n * @defaultValue `false`\n * @platform ios\n */\n clearDataOnBackup?: boolean;\n };\n android?: {\n /**\n * Disables Google AdvertisingID collection\n * @default false\n */\n adIdCollectionDisabled?: boolean;\n /**\n * Enable pending prepaid plans for Android\n * @platform android\n * @default false\n */\n pendingPrepaidPlansEnabled?: boolean;\n /**\n * Allows using local access level data on Android when available\n * @platform android\n * @default false\n */\n localAccessLevelAllowed?: boolean;\n /**\n * Obfuscated account ID\n * @platform android\n */\n obfuscatedAccountId?: string;\n };\n}\n\n/**\n * Describes optional parameters for the {@link identify} method.\n */\nexport interface IdentifyParamsInput {\n ios?: {\n /**\n * App account token for iOS\n * @platform ios\n */\n appAccountToken?: string;\n };\n android?: {\n /**\n * Obfuscated account ID\n * @platform android\n */\n obfuscatedAccountId?: string;\n };\n}\n\nexport interface GetPaywallProductsParamsInput {}\n\nexport const AdaptyAndroidSubscriptionUpdateReplacementMode = Object.freeze({\n ChargeFullPrice: 'charge_full_price',\n Deferred: 'deferred',\n WithoutProration: 'without_proration',\n ChargeProratedPrice: 'charge_prorated_price',\n WithTimeProration: 'with_time_proration',\n});\n// satisfies Record<\n// string,\n// Schema['Input.AdaptyAndroidSubscriptionUpdateParameters']['replacement_mode']\n// >;\n\nexport type AdaptyAndroidSubscriptionUpdateReplacementMode =\n (typeof AdaptyAndroidSubscriptionUpdateReplacementMode)[keyof typeof AdaptyAndroidSubscriptionUpdateReplacementMode];\n\nexport interface AdaptyAndroidSubscriptionUpdateParameters {\n oldSubVendorProductId: string;\n prorationMode: AdaptyAndroidSubscriptionUpdateReplacementMode;\n}\n\nexport interface AdaptyAndroidPurchaseParams {\n /**\n * Subscription update parameters\n * @platform android\n */\n subscriptionUpdateParams?: {\n oldSubVendorProductId: string;\n prorationMode: AdaptyAndroidSubscriptionUpdateReplacementMode;\n };\n /**\n * Whether the offer is personalized\n * @platform android\n * @see {@link https://developer.android.com/google/play/billing/integrate#personalized-price}\n */\n isOfferPersonalized?: boolean;\n}\n\nexport type MakePurchaseParamsInput = {\n /**\n * Android purchase parameters\n * @platform android\n */\n android?: AdaptyAndroidPurchaseParams;\n };\n\nexport type FileLocation = {\n ios: {\n fileName: string;\n };\n android:\n | {\n relativeAssetPath: string;\n }\n | {\n rawResName: string;\n };\n};\n"]}
@@ -1,86 +0,0 @@
1
- import type { AdaptyPaywall, AdaptyPaywallProduct, AdaptyOnboarding, AdaptyProfile, AdaptyPurchaseResult, AdaptyInstallationStatus } from './';
2
- /**
3
- * All available method names in the SDK
4
- */
5
- export type MethodName = 'activate' | 'adapty_ui_create_paywall_view' | 'adapty_ui_dismiss_paywall_view' | 'adapty_ui_present_paywall_view' | 'adapty_ui_show_dialog' | 'adapty_ui_create_onboarding_view' | 'adapty_ui_dismiss_onboarding_view' | 'adapty_ui_present_onboarding_view' | 'get_paywall' | 'get_paywall_for_default_audience' | 'get_paywall_products' | 'get_onboarding' | 'get_onboarding_for_default_audience' | 'get_profile' | 'identify' | 'is_activated' | 'get_current_installation_status' | 'get_log_level' | 'set_log_level' | 'logout' | 'log_show_paywall' | 'make_purchase' | 'open_web_paywall' | 'create_web_paywall_url' | 'present_code_redemption_sheet' | 'report_transaction' | 'restore_purchases' | 'get_sdk_version' | 'set_fallback' | 'set_integration_identifiers' | 'update_attribution_data' | 'update_collecting_refund_data_consent' | 'update_profile' | 'update_refund_preference';
6
- /**
7
- * AdaptyUI View types for UI methods
8
- */
9
- export interface AdaptyUIPaywallView {
10
- id: string;
11
- placementId: string;
12
- variationId: string;
13
- }
14
- export interface AdaptyUIOnboardingView {
15
- id: string;
16
- placementId: string;
17
- variationId: string;
18
- }
19
- export type AdaptyUIDialogActionType = 'primary' | 'secondary';
20
- export type LogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug';
21
- /**
22
- * Simple error type for cross-platform responses
23
- */
24
- export interface AdaptyError {
25
- adaptyCode: number;
26
- message: string;
27
- detail?: string;
28
- }
29
- /**
30
- * Map method names to their success response types (camelCase TypeScript types)
31
- */
32
- export type MethodResponseMap = {
33
- 'activate': true;
34
- 'adapty_ui_create_paywall_view': AdaptyUIPaywallView;
35
- 'adapty_ui_dismiss_paywall_view': true;
36
- 'adapty_ui_present_paywall_view': true;
37
- 'adapty_ui_show_dialog': AdaptyUIDialogActionType;
38
- 'adapty_ui_create_onboarding_view': AdaptyUIOnboardingView;
39
- 'adapty_ui_dismiss_onboarding_view': true;
40
- 'adapty_ui_present_onboarding_view': true;
41
- 'get_paywall': AdaptyPaywall;
42
- 'get_paywall_for_default_audience': AdaptyPaywall;
43
- 'get_paywall_products': AdaptyPaywallProduct[];
44
- 'get_onboarding': AdaptyOnboarding;
45
- 'get_onboarding_for_default_audience': AdaptyOnboarding;
46
- 'get_profile': AdaptyProfile;
47
- 'identify': true;
48
- 'is_activated': boolean;
49
- 'get_current_installation_status': AdaptyInstallationStatus;
50
- 'get_log_level': LogLevel;
51
- 'set_log_level': true;
52
- 'logout': true;
53
- 'log_show_paywall': true;
54
- 'make_purchase': AdaptyPurchaseResult;
55
- 'open_web_paywall': true;
56
- 'create_web_paywall_url': string;
57
- 'present_code_redemption_sheet': true;
58
- 'report_transaction': AdaptyProfile;
59
- 'restore_purchases': AdaptyProfile;
60
- 'get_sdk_version': string;
61
- 'set_fallback': true;
62
- 'set_integration_identifiers': true;
63
- 'update_attribution_data': true;
64
- 'update_collecting_refund_data_consent': true;
65
- 'update_profile': true;
66
- 'update_refund_preference': true;
67
- };
68
- /**
69
- * Response type mapping for cross-platform method calls
70
- */
71
- export type CrossPlatformResponse<T = unknown> = {
72
- success?: T;
73
- error?: AdaptyError;
74
- };
75
- /**
76
- * Type guard to check if response contains error
77
- */
78
- export declare function isErrorResponse(response: CrossPlatformResponse): response is {
79
- error: AdaptyError;
80
- };
81
- /**
82
- * Type guard to check if response contains success data
83
- */
84
- export declare function isSuccessResponse<T>(response: CrossPlatformResponse<T>): response is {
85
- success: T;
86
- };
@@ -1,13 +0,0 @@
1
- /**
2
- * Type guard to check if response contains error
3
- */
4
- export function isErrorResponse(response) {
5
- return 'error' in response && response.error !== undefined;
6
- }
7
- /**
8
- * Type guard to check if response contains success data
9
- */
10
- export function isSuccessResponse(response) {
11
- return 'success' in response && response.success !== undefined;
12
- }
13
- //# sourceMappingURL=method-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"method-types.js","sourceRoot":"","sources":["../../../../src/shared/types/method-types.ts"],"names":[],"mappings":"AA8HA;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,QAA+B;IAE/B,OAAO,OAAO,IAAI,QAAQ,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,CAAC;AAC7D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAkC;IAElC,OAAO,SAAS,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,SAAS,CAAC;AACjE,CAAC","sourcesContent":["import type { \n AdaptyPaywall, \n AdaptyPaywallProduct, \n AdaptyOnboarding, \n AdaptyProfile, \n AdaptyPurchaseResult,\n AdaptyInstallationStatus\n} from './';\n\n/**\n * All available method names in the SDK\n */\nexport type MethodName = \n | 'activate'\n | 'adapty_ui_create_paywall_view'\n | 'adapty_ui_dismiss_paywall_view' \n | 'adapty_ui_present_paywall_view'\n | 'adapty_ui_show_dialog'\n | 'adapty_ui_create_onboarding_view'\n | 'adapty_ui_dismiss_onboarding_view'\n | 'adapty_ui_present_onboarding_view'\n | 'get_paywall'\n | 'get_paywall_for_default_audience'\n | 'get_paywall_products'\n | 'get_onboarding'\n | 'get_onboarding_for_default_audience'\n | 'get_profile'\n | 'identify'\n | 'is_activated'\n | 'get_current_installation_status'\n | 'get_log_level'\n | 'set_log_level'\n | 'logout'\n\n | 'log_show_paywall'\n | 'make_purchase'\n | 'open_web_paywall'\n | 'create_web_paywall_url'\n | 'present_code_redemption_sheet'\n | 'report_transaction'\n | 'restore_purchases'\n | 'get_sdk_version'\n | 'set_fallback'\n | 'set_integration_identifiers'\n | 'update_attribution_data'\n | 'update_collecting_refund_data_consent'\n | 'update_profile'\n | 'update_refund_preference';\n\n/**\n * AdaptyUI View types for UI methods\n */\nexport interface AdaptyUIPaywallView {\n id: string;\n placementId: string;\n variationId: string;\n}\n\nexport interface AdaptyUIOnboardingView {\n id: string;\n placementId: string; \n variationId: string;\n}\n\nexport type AdaptyUIDialogActionType = 'primary' | 'secondary';\n\nexport type LogLevel = 'error' | 'warn' | 'info' | 'verbose' | 'debug';\n\n/**\n * Simple error type for cross-platform responses\n */\nexport interface AdaptyError {\n adaptyCode: number;\n message: string;\n detail?: string;\n}\n\n/**\n * Map method names to their success response types (camelCase TypeScript types)\n */\nexport type MethodResponseMap = {\n 'activate': true;\n 'adapty_ui_create_paywall_view': AdaptyUIPaywallView;\n 'adapty_ui_dismiss_paywall_view': true;\n 'adapty_ui_present_paywall_view': true;\n 'adapty_ui_show_dialog': AdaptyUIDialogActionType;\n 'adapty_ui_create_onboarding_view': AdaptyUIOnboardingView;\n 'adapty_ui_dismiss_onboarding_view': true;\n 'adapty_ui_present_onboarding_view': true;\n 'get_paywall': AdaptyPaywall;\n 'get_paywall_for_default_audience': AdaptyPaywall;\n 'get_paywall_products': AdaptyPaywallProduct[];\n 'get_onboarding': AdaptyOnboarding;\n 'get_onboarding_for_default_audience': AdaptyOnboarding;\n 'get_profile': AdaptyProfile;\n 'identify': true;\n 'is_activated': boolean;\n 'get_current_installation_status': AdaptyInstallationStatus;\n 'get_log_level': LogLevel;\n 'set_log_level': true;\n 'logout': true;\n\n 'log_show_paywall': true;\n 'make_purchase': AdaptyPurchaseResult;\n 'open_web_paywall': true;\n 'create_web_paywall_url': string;\n 'present_code_redemption_sheet': true;\n 'report_transaction': AdaptyProfile;\n 'restore_purchases': AdaptyProfile;\n 'get_sdk_version': string;\n 'set_fallback': true;\n 'set_integration_identifiers': true;\n 'update_attribution_data': true;\n 'update_collecting_refund_data_consent': true;\n 'update_profile': true;\n 'update_refund_preference': true;\n};\n\n/**\n * Response type mapping for cross-platform method calls\n */\nexport type CrossPlatformResponse<T = unknown> = {\n success?: T;\n error?: AdaptyError;\n};\n\n/**\n * Type guard to check if response contains error\n */\nexport function isErrorResponse(\n response: CrossPlatformResponse\n): response is { error: AdaptyError } {\n return 'error' in response && response.error !== undefined;\n}\n\n/**\n * Type guard to check if response contains success data\n */\nexport function isSuccessResponse<T>(\n response: CrossPlatformResponse<T>\n): response is { success: T } {\n return 'success' in response && response.success !== undefined;\n} "]}
@@ -1,60 +0,0 @@
1
- import type { AdaptyError } from './method-types';
2
- import type { AdaptyUiOnboardingMeta, OnboardingStateUpdatedAction } from '../../ui-builder/types';
3
- export declare const OnboardingEventId: {
4
- readonly Close: "onboarding_on_close_action";
5
- readonly Custom: "onboarding_on_custom_action";
6
- readonly Paywall: "onboarding_on_paywall_action";
7
- readonly StateUpdated: "onboarding_on_state_updated_action";
8
- readonly FinishedLoading: "onboarding_did_finish_loading";
9
- readonly Analytics: "onboarding_on_analytics_action";
10
- readonly Error: "onboarding_did_fail_with_error";
11
- };
12
- export type OnboardingEventIdType = (typeof OnboardingEventId)[keyof typeof OnboardingEventId];
13
- export interface OnboardingEventView {
14
- id: string;
15
- placementId?: string;
16
- variationId?: string;
17
- }
18
- interface BaseOnboardingEvent {
19
- id: OnboardingEventIdType;
20
- view: OnboardingEventView;
21
- }
22
- export interface OnboardingCloseEvent extends BaseOnboardingEvent {
23
- id: typeof OnboardingEventId.Close;
24
- actionId: string;
25
- meta: AdaptyUiOnboardingMeta;
26
- }
27
- export interface OnboardingCustomEvent extends BaseOnboardingEvent {
28
- id: typeof OnboardingEventId.Custom;
29
- actionId: string;
30
- meta: AdaptyUiOnboardingMeta;
31
- }
32
- export interface OnboardingPaywallEvent extends BaseOnboardingEvent {
33
- id: typeof OnboardingEventId.Paywall;
34
- actionId: string;
35
- meta: AdaptyUiOnboardingMeta;
36
- }
37
- export interface OnboardingStateUpdatedEvent extends BaseOnboardingEvent {
38
- id: typeof OnboardingEventId.StateUpdated;
39
- action: OnboardingStateUpdatedAction;
40
- meta: AdaptyUiOnboardingMeta;
41
- }
42
- export interface OnboardingFinishedLoadingEvent extends BaseOnboardingEvent {
43
- id: typeof OnboardingEventId.FinishedLoading;
44
- meta: AdaptyUiOnboardingMeta;
45
- }
46
- export interface OnboardingAnalyticsEvent extends BaseOnboardingEvent {
47
- id: typeof OnboardingEventId.Analytics;
48
- event: {
49
- name: string;
50
- elementId?: string;
51
- reply?: string;
52
- };
53
- meta: AdaptyUiOnboardingMeta;
54
- }
55
- export interface OnboardingErrorEvent extends BaseOnboardingEvent {
56
- id: typeof OnboardingEventId.Error;
57
- error: AdaptyError;
58
- }
59
- export type ParsedOnboardingEvent = OnboardingCloseEvent | OnboardingCustomEvent | OnboardingPaywallEvent | OnboardingStateUpdatedEvent | OnboardingFinishedLoadingEvent | OnboardingAnalyticsEvent | OnboardingErrorEvent;
60
- export {};
@@ -1,11 +0,0 @@
1
- // Onboarding Event IDs
2
- export const OnboardingEventId = {
3
- Close: 'onboarding_on_close_action',
4
- Custom: 'onboarding_on_custom_action',
5
- Paywall: 'onboarding_on_paywall_action',
6
- StateUpdated: 'onboarding_on_state_updated_action',
7
- FinishedLoading: 'onboarding_did_finish_loading',
8
- Analytics: 'onboarding_on_analytics_action',
9
- Error: 'onboarding_did_fail_with_error',
10
- };
11
- //# sourceMappingURL=onboarding-events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"onboarding-events.js","sourceRoot":"","sources":["../../../../src/shared/types/onboarding-events.ts"],"names":[],"mappings":"AAGA,uBAAuB;AACvB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK,EAAE,4BAA4B;IACnC,MAAM,EAAE,6BAA6B;IACrC,OAAO,EAAE,8BAA8B;IACvC,YAAY,EAAE,oCAAoC;IAClD,eAAe,EAAE,+BAA+B;IAChD,SAAS,EAAE,gCAAgC;IAC3C,KAAK,EAAE,gCAAgC;CAC/B,CAAC","sourcesContent":["import type { AdaptyError } from './method-types';\nimport type { AdaptyUiOnboardingMeta, OnboardingStateUpdatedAction } from '../../ui-builder/types';\n\n// Onboarding Event IDs\nexport const OnboardingEventId = {\n Close: 'onboarding_on_close_action',\n Custom: 'onboarding_on_custom_action',\n Paywall: 'onboarding_on_paywall_action',\n StateUpdated: 'onboarding_on_state_updated_action',\n FinishedLoading: 'onboarding_did_finish_loading',\n Analytics: 'onboarding_on_analytics_action',\n Error: 'onboarding_did_fail_with_error',\n} as const;\n\nexport type OnboardingEventIdType = (typeof OnboardingEventId)[keyof typeof OnboardingEventId];\n\n// Event View\nexport interface OnboardingEventView {\n id: string;\n placementId?: string;\n variationId?: string;\n}\n\n// Base Event\ninterface BaseOnboardingEvent {\n id: OnboardingEventIdType;\n view: OnboardingEventView;\n}\n\n// Event Types\nexport interface OnboardingCloseEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.Close;\n actionId: string;\n meta: AdaptyUiOnboardingMeta;\n}\n\nexport interface OnboardingCustomEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.Custom;\n actionId: string;\n meta: AdaptyUiOnboardingMeta;\n}\n\nexport interface OnboardingPaywallEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.Paywall;\n actionId: string;\n meta: AdaptyUiOnboardingMeta;\n}\n\nexport interface OnboardingStateUpdatedEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.StateUpdated;\n action: OnboardingStateUpdatedAction;\n meta: AdaptyUiOnboardingMeta;\n}\n\nexport interface OnboardingFinishedLoadingEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.FinishedLoading;\n meta: AdaptyUiOnboardingMeta;\n}\n\nexport interface OnboardingAnalyticsEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.Analytics;\n event: { name: string; elementId?: string; reply?: string };\n meta: AdaptyUiOnboardingMeta;\n}\n\nexport interface OnboardingErrorEvent extends BaseOnboardingEvent {\n id: typeof OnboardingEventId.Error;\n error: AdaptyError;\n}\n\nexport type ParsedOnboardingEvent =\n | OnboardingCloseEvent\n | OnboardingCustomEvent\n | OnboardingPaywallEvent\n | OnboardingStateUpdatedEvent\n | OnboardingFinishedLoadingEvent\n | OnboardingAnalyticsEvent\n | OnboardingErrorEvent;\n"]}
@@ -1,84 +0,0 @@
1
- import type { AdaptyPaywallProduct, AdaptyProfile, AdaptyPurchaseResult } from './';
2
- import type { AdaptyError } from './method-types';
3
- export declare const PaywallEventId: {
4
- readonly DidAppear: "paywall_view_did_appear";
5
- readonly DidDisappear: "paywall_view_did_disappear";
6
- readonly DidPerformAction: "paywall_view_did_perform_action";
7
- readonly DidSelectProduct: "paywall_view_did_select_product";
8
- readonly DidStartPurchase: "paywall_view_did_start_purchase";
9
- readonly DidFinishPurchase: "paywall_view_did_finish_purchase";
10
- readonly DidFailPurchase: "paywall_view_did_fail_purchase";
11
- readonly DidStartRestore: "paywall_view_did_start_restore";
12
- readonly DidFinishRestore: "paywall_view_did_finish_restore";
13
- readonly DidFailRestore: "paywall_view_did_fail_restore";
14
- readonly DidFailRendering: "paywall_view_did_fail_rendering";
15
- readonly DidFailLoadingProducts: "paywall_view_did_fail_loading_products";
16
- readonly DidFinishWebPaymentNavigation: "paywall_view_did_finish_web_payment_navigation";
17
- };
18
- export type PaywallEventIdType = (typeof PaywallEventId)[keyof typeof PaywallEventId];
19
- export interface PaywallEventView {
20
- id: string;
21
- placementId?: string;
22
- variationId?: string;
23
- }
24
- interface BasePaywallEvent {
25
- id: PaywallEventIdType;
26
- view: PaywallEventView;
27
- }
28
- export interface PaywallDidAppearEvent extends BasePaywallEvent {
29
- id: typeof PaywallEventId.DidAppear;
30
- }
31
- export interface PaywallDidDisappearEvent extends BasePaywallEvent {
32
- id: typeof PaywallEventId.DidDisappear;
33
- }
34
- export interface PaywallDidPerformActionEvent extends BasePaywallEvent {
35
- id: typeof PaywallEventId.DidPerformAction;
36
- action: {
37
- type: 'close' | 'system_back' | 'open_url' | 'custom';
38
- value?: string;
39
- };
40
- }
41
- export interface PaywallDidSelectProductEvent extends BasePaywallEvent {
42
- id: typeof PaywallEventId.DidSelectProduct;
43
- productId: string;
44
- }
45
- export interface PaywallDidStartPurchaseEvent extends BasePaywallEvent {
46
- id: typeof PaywallEventId.DidStartPurchase;
47
- product: AdaptyPaywallProduct;
48
- }
49
- export interface PaywallDidFinishPurchaseEvent extends BasePaywallEvent {
50
- id: typeof PaywallEventId.DidFinishPurchase;
51
- purchaseResult: AdaptyPurchaseResult;
52
- product: AdaptyPaywallProduct;
53
- }
54
- export interface PaywallDidFailPurchaseEvent extends BasePaywallEvent {
55
- id: typeof PaywallEventId.DidFailPurchase;
56
- error: AdaptyError;
57
- product: AdaptyPaywallProduct;
58
- }
59
- export interface PaywallDidStartRestoreEvent extends BasePaywallEvent {
60
- id: typeof PaywallEventId.DidStartRestore;
61
- }
62
- export interface PaywallDidFinishRestoreEvent extends BasePaywallEvent {
63
- id: typeof PaywallEventId.DidFinishRestore;
64
- profile: AdaptyProfile;
65
- }
66
- export interface PaywallDidFailRestoreEvent extends BasePaywallEvent {
67
- id: typeof PaywallEventId.DidFailRestore;
68
- error: AdaptyError;
69
- }
70
- export interface PaywallDidFailRenderingEvent extends BasePaywallEvent {
71
- id: typeof PaywallEventId.DidFailRendering;
72
- error: AdaptyError;
73
- }
74
- export interface PaywallDidFailLoadingProductsEvent extends BasePaywallEvent {
75
- id: typeof PaywallEventId.DidFailLoadingProducts;
76
- error: AdaptyError;
77
- }
78
- export interface PaywallDidFinishWebPaymentNavigationEvent extends BasePaywallEvent {
79
- id: typeof PaywallEventId.DidFinishWebPaymentNavigation;
80
- product?: AdaptyPaywallProduct;
81
- error?: AdaptyError;
82
- }
83
- export type ParsedPaywallEvent = PaywallDidAppearEvent | PaywallDidDisappearEvent | PaywallDidPerformActionEvent | PaywallDidSelectProductEvent | PaywallDidStartPurchaseEvent | PaywallDidFinishPurchaseEvent | PaywallDidFailPurchaseEvent | PaywallDidStartRestoreEvent | PaywallDidFinishRestoreEvent | PaywallDidFailRestoreEvent | PaywallDidFailRenderingEvent | PaywallDidFailLoadingProductsEvent | PaywallDidFinishWebPaymentNavigationEvent;
84
- export {};