@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,718 +0,0 @@
1
- import { VendorStore, OfferType, CancellationReason, Gender, AppTrackingTransparencyStatus, ProductPeriod } from '../constants';
2
- export * from './error';
3
- export * from './inputs';
4
- export * from '../constants';
5
- export * from './paywall-events';
6
- export interface AdaptyPrice {
7
- /**
8
- * Price as number
9
- */
10
- amount: number;
11
- /**
12
- * The currency code of the locale
13
- * used to format the price of the product.
14
- * The ISO 4217 (USD, EUR).
15
- */
16
- currencyCode?: string;
17
- /**
18
- * The currency symbol of the locale
19
- * used to format the price of the product.
20
- * ($, €).
21
- */
22
- currencySymbol?: string;
23
- /**
24
- * A price’s language is determined
25
- * by the preferred language set on the device.
26
- * On Android, the formatted price from Google Play as is.
27
- */
28
- localizedString?: string;
29
- }
30
- /**
31
- * Describes an object that represents a paywall.
32
- * Used in {@link Adapty.getPaywall} method.
33
- * @public
34
- */
35
- export interface AdaptyPaywall {
36
- readonly placement: AdaptyPlacement;
37
- /**
38
- * If `true`, it is possible to fetch the view object
39
- * and use it with AdaptyUI library.
40
- * @readonly
41
- */
42
- readonly hasViewConfiguration: boolean;
43
- /**
44
- * A paywall name.
45
- * @readonly
46
- */
47
- readonly name: string;
48
- /**
49
- * A remote config configured in Adapty Dashboard for this paywall.
50
- * @readonly
51
- */
52
- readonly remoteConfig?: AdaptyRemoteConfig;
53
- /**
54
- * An identifier of a variation,
55
- * used to attribute purchases to this paywall.
56
- * @readonly
57
- */
58
- readonly variationId: string;
59
- /**
60
- * Array of initial products info
61
- * @readonly
62
- * @deprecated Use {@link AdaptyPaywall.productIdentifiers} instead
63
- */
64
- readonly products: ProductReference[];
65
- /**
66
- * Array of product identifiers for this paywall
67
- * @readonly
68
- */
69
- readonly productIdentifiers: AdaptyProductIdentifier[];
70
- id: string;
71
- version?: number;
72
- webPurchaseUrl?: string;
73
- payloadData?: string;
74
- /**
75
- * @internal Used internally by the SDK
76
- */
77
- requestLocale: string;
78
- paywallBuilder?: AdaptyPaywallBuilder;
79
- }
80
- export interface AdaptyOnboarding {
81
- readonly placement: AdaptyPlacement;
82
- /**
83
- * If `true`, it is possible to fetch the view object
84
- * and use it with AdaptyUI library.
85
- * @readonly
86
- */
87
- readonly hasViewConfiguration: boolean;
88
- /**
89
- * A paywall name.
90
- * @readonly
91
- */
92
- readonly name: string;
93
- /**
94
- * A remote config configured in Adapty Dashboard for this paywall.
95
- * @readonly
96
- */
97
- readonly remoteConfig?: AdaptyRemoteConfig;
98
- /**
99
- * An identifier of a variation,
100
- * used to attribute purchases to this paywall.
101
- * @readonly
102
- */
103
- readonly variationId: string;
104
- id: string;
105
- version?: number;
106
- payloadData?: string;
107
- /**
108
- * @internal Used internally by the SDK
109
- */
110
- requestLocale: string;
111
- onboardingBuilder?: AdaptyOnboardingBuilder;
112
- }
113
- export interface AdaptyPlacement {
114
- /**
115
- * Parent A/B test name.
116
- * @readonly
117
- */
118
- readonly abTestName: string;
119
- /**
120
- * A name of an audience to which the paywall belongs.
121
- * @readonly
122
- */
123
- readonly audienceName: string;
124
- /**
125
- * ID of a placement configured in Adapty Dashboard.
126
- * @readonly
127
- */
128
- readonly id: string;
129
- /**
130
- * Current revision (version) of a paywall.
131
- * Every change within a paywall creates a new revision.
132
- * @readonly
133
- */
134
- readonly revision: number;
135
- isTrackingPurchases?: boolean;
136
- audienceVersionId: string;
137
- }
138
- /**
139
- * Describes an object that represents a remote config of a paywall.
140
- * @public
141
- */
142
- export interface AdaptyRemoteConfig {
143
- /**
144
- * Identifier of a paywall locale.
145
- * @readonly
146
- */
147
- readonly lang: string;
148
- /**
149
- * A custom dictionary configured in Adapty Dashboard for this paywall.
150
- * @readonly
151
- */
152
- readonly data: Record<string, any>;
153
- /**
154
- * A custom JSON string configured in Adapty Dashboard for this paywall.
155
- * @readonly
156
- */
157
- readonly dataString: string;
158
- }
159
- export interface AdaptyPaywallBuilder {
160
- readonly id: string;
161
- readonly lang: string;
162
- }
163
- export interface AdaptyOnboardingBuilder {
164
- readonly url: string;
165
- }
166
- export type AdaptyPurchaseResult = {
167
- type: 'pending' | 'user_cancelled';
168
- } | {
169
- type: 'success';
170
- profile: AdaptyProfile;
171
- ios?: {
172
- jwsTransaction?: string;
173
- };
174
- android?: {
175
- purchaseToken?: string;
176
- };
177
- };
178
- /**
179
- * Interface representing a user profile in Adapty,
180
- * including details about the user's subscriptions and consumable products.
181
- * @public
182
- */
183
- export interface AdaptyProfile {
184
- /**
185
- * Object that maps access level identifiers (configured by you in Adapty Dashboard)
186
- * to the corresponding access level details. The value can be `null`
187
- * if the user does not have any access levels.
188
- * @readonly
189
- */
190
- readonly accessLevels?: Record<string, AdaptyAccessLevel>;
191
- /**
192
- * Object representing custom attributes set for the user using
193
- * the {@link Adapty.updateProfile} method.
194
- * @readonly
195
- */
196
- readonly customAttributes?: Record<string, any>;
197
- /**
198
- * The identifier for a user in your system.
199
- * @readonly
200
- */
201
- readonly customerUserId?: string;
202
- /**
203
- * Object that maps product ids from the store to an array of
204
- * information about the user's non-subscription purchases.
205
- * The value can be `null` if the user does not have any purchases.
206
- * @readonly
207
- */
208
- readonly nonSubscriptions?: Record<string, AdaptyNonSubscription[]>;
209
- /**
210
- * The identifier for a user in Adapty.
211
- */
212
- readonly profileId: string;
213
- /**
214
- * Object that maps product ids from a store to
215
- * information about the user's subscriptions.
216
- * The value can be `null` if the user does not have any subscriptions.
217
- * @readonly
218
- */
219
- readonly subscriptions?: Record<string, AdaptySubscription>;
220
- }
221
- /**
222
- * Interface representing access level details of a user.
223
- * @public
224
- */
225
- export interface AdaptyAccessLevel {
226
- /**
227
- * The date and time when the access level was activated.
228
- * @readonly
229
- */
230
- readonly activatedAt: Date;
231
- /**
232
- * Type of active introductory offer, if any.
233
- * @readonly
234
- */
235
- readonly activeIntroductoryOfferType?: OfferType;
236
- /**
237
- * Identifier of the active promotional offer, if any.
238
- * @readonly
239
- */
240
- readonly activePromotionalOfferId?: string;
241
- /**
242
- * Type of the active promotional offer, if any.
243
- * @readonly
244
- */
245
- readonly activePromotionalOfferType?: OfferType;
246
- /**
247
- * The date and time when a billing issue was detected.
248
- * @readonly
249
- */
250
- readonly billingIssueDetectedAt?: Date;
251
- /**
252
- * The reason for the cancellation of the subscription.
253
- * @readonly
254
- */
255
- readonly cancellationReason?: CancellationReason;
256
- /**
257
- * The expiration date of the access level, if applicable.
258
- * @readonly
259
- */
260
- readonly expiresAt?: Date;
261
- /**
262
- * Unique identifier of the access level
263
- * configured by you in Adapty Dashboard.
264
- * @readonly
265
- */
266
- readonly id: string;
267
- /**
268
- * Flag indicating whether the access level is currently active.
269
- * @readonly
270
- */
271
- readonly isActive: boolean;
272
- /**
273
- * Flag indicating whether this auto-renewable subscription is in the grace period.
274
- * @readonly
275
- */
276
- readonly isInGracePeriod: boolean;
277
- /**
278
- * Flag indicating whether this access level is active for a lifetime.
279
- * @readonly
280
- */
281
- readonly isLifetime: boolean;
282
- /**
283
- * Flag indicating whether this purchase was refunded.
284
- * @readonly
285
- */
286
- readonly isRefund: boolean;
287
- /**
288
- * The date and time when the access level was renewed.
289
- * @readonly
290
- */
291
- readonly renewedAt?: Date;
292
- /**
293
- * The start date of this access level.
294
- * @readonly
295
- */
296
- readonly startsAt?: Date;
297
- /**
298
- * The store where the purchase that unlocked this access level was made.
299
- * @readonly
300
- */
301
- readonly store: VendorStore;
302
- /**
303
- * The date and time when the auto-renewable subscription was cancelled.
304
- * @readonly
305
- */
306
- readonly unsubscribedAt?: Date;
307
- /**
308
- * The identifier of the product in the store that unlocked this access level.
309
- * @readonly
310
- */
311
- readonly vendorProductId: string;
312
- /**
313
- * Flag indicating whether this auto-renewable subscription is set to renew.
314
- * @readonly
315
- */
316
- readonly willRenew: boolean;
317
- android?: {
318
- offerId?: string;
319
- };
320
- }
321
- /**
322
- * Interface representing a consumable or non-subscription purchase made by the user.
323
- * @public
324
- */
325
- export interface AdaptyNonSubscription {
326
- /**
327
- * Flag indicating whether the product is consumable.
328
- * @readonly
329
- */
330
- readonly isConsumable: boolean;
331
- /**
332
- * Flag indicating whether the purchase was refunded.
333
- * @readonly
334
- */
335
- readonly isRefund: boolean;
336
- /**
337
- * Flag indicating whether the product was purchased in a sandbox environment.
338
- * @readonly
339
- */
340
- readonly isSandbox: boolean;
341
- /**
342
- * The date and time when the purchase was made.
343
- * @readonly
344
- */
345
- readonly purchasedAt: Date;
346
- /**
347
- * The identifier of the product in the store that was purchased.
348
- * @readonly
349
- */
350
- readonly vendorProductId: string;
351
- /**
352
- * The identifier of the product in the store that was purchased.
353
- * @readonly
354
- */
355
- readonly vendorTransactionId?: string;
356
- /**
357
- * The store where the purchase was made.
358
- * @readonly
359
- */
360
- readonly store: VendorStore;
361
- /**
362
- * An identifier of the purchase in Adapty.
363
- * You can use it to ensure that you've already processed this purchase
364
- * (for example tracking one time products).
365
- * @readonly
366
- */
367
- readonly purchaseId: string;
368
- }
369
- /**
370
- * Interface representing details about a user's subscription.
371
- * @public
372
- */
373
- export interface AdaptySubscription {
374
- /**
375
- * The date and time when the subscription was activated.
376
- * @readonly
377
- */
378
- readonly activatedAt: Date;
379
- /**
380
- * Type of active introductory offer, if any.
381
- * @readonly
382
- */
383
- readonly activeIntroductoryOfferType?: OfferType;
384
- /**
385
- * Identifier of the active promotional offer, if any.
386
- * @readonly
387
- */
388
- readonly activePromotionalOfferId?: string;
389
- /**
390
- * Type of the active promotional offer, if any.
391
- * @readonly
392
- */
393
- readonly activePromotionalOfferType?: OfferType;
394
- /**
395
- * The date and time when a billing issue was detected.
396
- * @readonly
397
- */
398
- readonly billingIssueDetectedAt?: Date;
399
- /**
400
- * The reason for the cancellation of the subscription.
401
- * @readonly
402
- */
403
- readonly cancellationReason?: CancellationReason;
404
- /**
405
- * The expiration date of the subscription, if applicable.
406
- * @readonly
407
- */
408
- readonly expiresAt?: Date;
409
- /**
410
- * Flag indicating whether the subscription is currently active.
411
- * @readonly
412
- */
413
- readonly isActive: boolean;
414
- /**
415
- * Flag indicating whether the subscription is in the grace period.
416
- * @readonly
417
- */
418
- readonly isInGracePeriod: boolean;
419
- /**
420
- * Flag indicating whether the subscription is set for a lifetime.
421
- * @readonly
422
- */
423
- readonly isLifetime: boolean;
424
- /**
425
- * Flag indicating whether the subscription was refunded.
426
- * @readonly
427
- */
428
- readonly isRefund: boolean;
429
- /**
430
- * Flag indicating whether the subscription was purchased in a sandbox environment.
431
- * @readonly
432
- */
433
- readonly isSandbox: boolean;
434
- /**
435
- * The date and time when the subscription was renewed.
436
- * @readonly
437
- */
438
- readonly renewedAt?: Date;
439
- /**
440
- * The date and time when the subscription starts.
441
- * @readonly
442
- */
443
- readonly startsAt?: Date;
444
- /**
445
- * The store where the subscription was made.
446
- * @readonly
447
- */
448
- readonly store: VendorStore;
449
- /**
450
- * The date and time when the subscription was cancelled.
451
- * @readonly
452
- */
453
- readonly unsubscribedAt?: Date;
454
- /**
455
- * The identifier of the product in the store that was subscribed to.
456
- * @readonly
457
- */
458
- readonly vendorProductId: string;
459
- /**
460
- * The identifier of the product in the store that was subscribed to.
461
- * @readonly
462
- */
463
- readonly vendorTransactionId: string;
464
- /**
465
- * An original transaction id of the purchase in a store that unlocked this subscription.
466
- * For auto-renewable subscription, this will be an id of the first transaction in this subscription.
467
- * @readonly
468
- */
469
- readonly vendorOriginalTransactionId: string;
470
- /**
471
- * Flag indicating whether the subscription is set to auto-renew.
472
- * @readonly
473
- */
474
- readonly willRenew: boolean;
475
- }
476
- /**
477
- * Describes an object that represents a product.
478
- * Used in {@link Adapty.getPaywallProducts} method and in {@link Adapty.makePurchase} method.
479
- * @public
480
- */
481
- export interface AdaptyPaywallProduct {
482
- /**
483
- * A description of the product.
484
- */
485
- readonly localizedDescription: string;
486
- /**
487
- * The region code of the locale used to format the price of the product.
488
- * ISO 3166 ALPHA-2 (US, DE)
489
- */
490
- readonly regionCode?: string;
491
- /**
492
- * The name of the product.
493
- */
494
- readonly localizedTitle: string;
495
- /**
496
- * Same as `abTestName` property of the parent {@link AdaptyPaywall}.
497
- */
498
- readonly paywallABTestName: string;
499
- /**
500
- * Same as `name` property of the parent {@link AdaptyPaywall}.
501
- */
502
- readonly paywallName: string;
503
- /**
504
- * The cost of the product in the local currency
505
- */
506
- readonly price?: AdaptyPrice;
507
- readonly adaptyId: string;
508
- readonly accessLevelId: string;
509
- readonly productType: string;
510
- /**
511
- * Same as `variationId` property of the parent {@link AdaptyPaywall}.
512
- */
513
- readonly variationId: string;
514
- /**
515
- * Unique identifier of a product
516
- * from App Store Connect or Google Play Console
517
- */
518
- readonly vendorProductId: string;
519
- paywallProductIndex: number;
520
- webPurchaseUrl?: string;
521
- payloadData?: string;
522
- subscription?: AdaptySubscriptionDetails;
523
- ios?: {
524
- /**
525
- * Boolean value that indicates
526
- * whether the product is available for family sharing
527
- * in App Store Connect.
528
- * Will be `false` for iOS version below 14.0 and macOS version below 11.0.
529
- * @see {@link https://developer.apple.com/documentation/storekit/skproduct/3564805-isfamilyshareable}
530
- */
531
- readonly isFamilyShareable: boolean;
532
- };
533
- }
534
- export interface AdaptySubscriptionDetails {
535
- /**
536
- * The period details for products that are subscriptions.
537
- * Will be `null` for iOS version below 11.2 and macOS version below 10.14.4.
538
- */
539
- subscriptionPeriod: AdaptySubscriptionPeriod;
540
- /**
541
- * The period’s language is determined
542
- * by the preferred language set on the device.
543
- */
544
- localizedSubscriptionPeriod?: string;
545
- /**
546
- * A subscription offer if available for the auto-renewable subscription.
547
- */
548
- offer?: AdaptySubscriptionOffer;
549
- ios?: {
550
- /**
551
- * An identifier of the subscription group
552
- * to which the subscription belongs.
553
- * Will be `null` for iOS version below 12.0 and macOS version below 10.14.
554
- */
555
- subscriptionGroupIdentifier?: string;
556
- };
557
- android?: {
558
- basePlanId: string;
559
- renewalType?: 'prepaid' | 'autorenewable';
560
- };
561
- }
562
- /**
563
- * Subscription offer model to products
564
- * @see {@link https://adapty.io/docs/capacitor-sdk-models | [DOC] SDK Models}
565
- */
566
- export interface AdaptySubscriptionOffer {
567
- readonly identifier: AdaptySubscriptionOfferId;
568
- phases: AdaptyDiscountPhase[];
569
- android?: {
570
- offerTags?: string[];
571
- };
572
- }
573
- export type AdaptySubscriptionOfferId = {
574
- id?: string;
575
- type: 'introductory';
576
- } | {
577
- id: string;
578
- type: 'promotional' | 'win_back';
579
- };
580
- /**
581
- * Discount model to products
582
- * @see {@link https://adapty.io/docs/capacitor-sdk-models | [DOC] SDK Models}
583
- */
584
- export interface AdaptyDiscountPhase {
585
- /**
586
- * A formatted number of periods of a discount for a user’s locale.
587
- * @readonly
588
- */
589
- readonly localizedNumberOfPeriods?: string;
590
- /**
591
- * A formatted subscription period of a discount for a user’s locale.
592
- * @readonly
593
- */
594
- readonly localizedSubscriptionPeriod?: string;
595
- /**
596
- * A number of periods this product discount is available.
597
- * @readonly
598
- */
599
- readonly numberOfPeriods: number;
600
- /**
601
- * Discount price of a product in a local currency.
602
- * @readonly
603
- */
604
- readonly price: AdaptyPrice;
605
- /**
606
- * An information about period for a product discount.
607
- * @readonly
608
- */
609
- readonly subscriptionPeriod: AdaptySubscriptionPeriod;
610
- /**
611
- * A payment mode for this product discount.
612
- * @readonly
613
- */
614
- readonly paymentMode: OfferType;
615
- }
616
- /**
617
- * An object containing information about a subscription period.
618
- * @public
619
- */
620
- export interface AdaptySubscriptionPeriod {
621
- /**
622
- * A number of period units.
623
- * @readonly
624
- */
625
- readonly numberOfUnits: number;
626
- /**
627
- * A unit of time that a subscription period is specified in.
628
- * @readonly
629
- */
630
- readonly unit: ProductPeriod;
631
- }
632
- export interface AdaptyProfileParameters {
633
- analyticsDisabled?: boolean;
634
- codableCustomAttributes?: {
635
- [key: string]: any;
636
- };
637
- appTrackingTransparencyStatus?: AppTrackingTransparencyStatus;
638
- firstName?: string;
639
- lastName?: string;
640
- gender?: Gender;
641
- birthday?: string;
642
- email?: string;
643
- phoneNumber?: string;
644
- }
645
- export interface ProductReference {
646
- vendorId: string;
647
- adaptyId: string;
648
- accessLevelId: string;
649
- productType: string;
650
- ios?: {
651
- promotionalOfferId?: string;
652
- winBackOfferId?: string;
653
- };
654
- android?: {
655
- basePlanId?: string;
656
- offerId?: string;
657
- };
658
- }
659
- /**
660
- * Interface representing a product identifier with vendor and platform-specific information.
661
- * @public
662
- */
663
- export interface AdaptyProductIdentifier {
664
- /**
665
- * The vendor-specific product identifier (e.g., App Store or Google Play product ID).
666
- * @readonly
667
- */
668
- readonly vendorProductId: string;
669
- /**
670
- * The base plan identifier for Google Play subscriptions (Android only).
671
- * @readonly
672
- */
673
- readonly basePlanId?: string;
674
- /**
675
- * Internal Adapty product identifier.
676
- * @readonly
677
- */
678
- readonly adaptyProductId: string;
679
- }
680
- export declare const WebPresentation: Readonly<{
681
- BrowserOutApp: "browser_out_app";
682
- BrowserInApp: "browser_in_app";
683
- }>;
684
- export type WebPresentation = (typeof WebPresentation)[keyof typeof WebPresentation];
685
- export declare const RefundPreference: Readonly<{
686
- NoPreference: "no_preference";
687
- Grant: "grant";
688
- Decline: "decline";
689
- }>;
690
- export type RefundPreference = (typeof RefundPreference)[keyof typeof RefundPreference];
691
- export type AdaptyInstallationStatus = {
692
- status: 'not_available' | 'not_determined';
693
- } | {
694
- status: 'determined';
695
- details: AdaptyInstallationDetails;
696
- };
697
- export interface AdaptyInstallationDetails {
698
- /**
699
- * A unique identifier for this installation.
700
- * @readonly
701
- */
702
- readonly installId?: string;
703
- /**
704
- * The date and time when the app was installed.
705
- * @readonly
706
- */
707
- readonly installTime: Date;
708
- /**
709
- * The total number of times the app has been launched.
710
- * @readonly
711
- */
712
- readonly appLaunchCount: number;
713
- /**
714
- * Custom payload data associated with the installation.
715
- * @readonly
716
- */
717
- readonly payload?: string;
718
- }