expo-superwall 0.0.14 → 0.0.16

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 (173) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/package.json +11 -9
  3. package/build/src/CustomPurchaseControllerProvider.d.ts +38 -0
  4. package/build/src/CustomPurchaseControllerProvider.d.ts.map +1 -1
  5. package/build/src/CustomPurchaseControllerProvider.js +26 -0
  6. package/build/src/CustomPurchaseControllerProvider.js.map +1 -1
  7. package/build/src/SuperwallProvider.d.ts +2 -0
  8. package/build/src/SuperwallProvider.d.ts.map +1 -1
  9. package/build/src/SuperwallProvider.js +2 -0
  10. package/build/src/SuperwallProvider.js.map +1 -1
  11. package/build/src/compat/lib/Assigments.d.ts +10 -0
  12. package/build/src/compat/lib/Assigments.d.ts.map +1 -1
  13. package/build/src/compat/lib/Assigments.js +5 -0
  14. package/build/src/compat/lib/Assigments.js.map +1 -1
  15. package/build/src/compat/lib/ComputedPropertyRequest.d.ts +10 -0
  16. package/build/src/compat/lib/ComputedPropertyRequest.d.ts.map +1 -1
  17. package/build/src/compat/lib/ComputedPropertyRequest.js +10 -2
  18. package/build/src/compat/lib/ComputedPropertyRequest.js.map +1 -1
  19. package/build/src/compat/lib/ConfigurationStatus.d.ts +5 -0
  20. package/build/src/compat/lib/ConfigurationStatus.d.ts.map +1 -1
  21. package/build/src/compat/lib/ConfigurationStatus.js +5 -0
  22. package/build/src/compat/lib/ConfigurationStatus.js.map +1 -1
  23. package/build/src/compat/lib/Entitlement.d.ts +5 -0
  24. package/build/src/compat/lib/Entitlement.d.ts.map +1 -1
  25. package/build/src/compat/lib/Entitlement.js +5 -0
  26. package/build/src/compat/lib/Entitlement.js.map +1 -1
  27. package/build/src/compat/lib/EntitlementsInfo.d.ts +5 -0
  28. package/build/src/compat/lib/EntitlementsInfo.d.ts.map +1 -1
  29. package/build/src/compat/lib/EntitlementsInfo.js.map +1 -1
  30. package/build/src/compat/lib/Experiment.d.ts +15 -0
  31. package/build/src/compat/lib/Experiment.d.ts.map +1 -1
  32. package/build/src/compat/lib/Experiment.js +15 -0
  33. package/build/src/compat/lib/Experiment.js.map +1 -1
  34. package/build/src/compat/lib/FeatureGatingBehavior.d.ts +5 -0
  35. package/build/src/compat/lib/FeatureGatingBehavior.d.ts.map +1 -1
  36. package/build/src/compat/lib/FeatureGatingBehavior.js +5 -0
  37. package/build/src/compat/lib/FeatureGatingBehavior.js.map +1 -1
  38. package/build/src/compat/lib/IdentityOptions.d.ts +5 -0
  39. package/build/src/compat/lib/IdentityOptions.d.ts.map +1 -1
  40. package/build/src/compat/lib/IdentityOptions.js +5 -1
  41. package/build/src/compat/lib/IdentityOptions.js.map +1 -1
  42. package/build/src/compat/lib/InterfaceStyle.d.ts +5 -0
  43. package/build/src/compat/lib/InterfaceStyle.d.ts.map +1 -1
  44. package/build/src/compat/lib/InterfaceStyle.js +5 -0
  45. package/build/src/compat/lib/InterfaceStyle.js.map +1 -1
  46. package/build/src/compat/lib/LocalNotification.d.ts +15 -0
  47. package/build/src/compat/lib/LocalNotification.d.ts.map +1 -1
  48. package/build/src/compat/lib/LocalNotification.js +15 -0
  49. package/build/src/compat/lib/LocalNotification.js.map +1 -1
  50. package/build/src/compat/lib/LogLevel.d.ts +5 -0
  51. package/build/src/compat/lib/LogLevel.d.ts.map +1 -1
  52. package/build/src/compat/lib/LogLevel.js +5 -1
  53. package/build/src/compat/lib/LogLevel.js.map +1 -1
  54. package/build/src/compat/lib/LogScope.d.ts +5 -0
  55. package/build/src/compat/lib/LogScope.d.ts.map +1 -1
  56. package/build/src/compat/lib/LogScope.js +5 -0
  57. package/build/src/compat/lib/LogScope.js.map +1 -1
  58. package/build/src/compat/lib/PaywallCloseReason.d.ts +5 -0
  59. package/build/src/compat/lib/PaywallCloseReason.d.ts.map +1 -1
  60. package/build/src/compat/lib/PaywallCloseReason.js +5 -0
  61. package/build/src/compat/lib/PaywallCloseReason.js.map +1 -1
  62. package/build/src/compat/lib/PaywallInfo.d.ts +5 -0
  63. package/build/src/compat/lib/PaywallInfo.d.ts.map +1 -1
  64. package/build/src/compat/lib/PaywallInfo.js +5 -0
  65. package/build/src/compat/lib/PaywallInfo.js.map +1 -1
  66. package/build/src/compat/lib/PaywallOptions.d.ts +15 -0
  67. package/build/src/compat/lib/PaywallOptions.d.ts.map +1 -1
  68. package/build/src/compat/lib/PaywallOptions.js +22 -7
  69. package/build/src/compat/lib/PaywallOptions.js.map +1 -1
  70. package/build/src/compat/lib/PaywallPresentationHandler.d.ts +5 -0
  71. package/build/src/compat/lib/PaywallPresentationHandler.d.ts.map +1 -1
  72. package/build/src/compat/lib/PaywallPresentationHandler.js +5 -0
  73. package/build/src/compat/lib/PaywallPresentationHandler.js.map +1 -1
  74. package/build/src/compat/lib/PaywallPresentationRequestStatus.d.ts +20 -0
  75. package/build/src/compat/lib/PaywallPresentationRequestStatus.d.ts.map +1 -1
  76. package/build/src/compat/lib/PaywallPresentationRequestStatus.js +20 -0
  77. package/build/src/compat/lib/PaywallPresentationRequestStatus.js.map +1 -1
  78. package/build/src/compat/lib/PaywallResult.d.ts +5 -0
  79. package/build/src/compat/lib/PaywallResult.d.ts.map +1 -1
  80. package/build/src/compat/lib/PaywallResult.js.map +1 -1
  81. package/build/src/compat/lib/PaywallSkippedReason.d.ts +25 -0
  82. package/build/src/compat/lib/PaywallSkippedReason.d.ts.map +1 -1
  83. package/build/src/compat/lib/PaywallSkippedReason.js +25 -1
  84. package/build/src/compat/lib/PaywallSkippedReason.js.map +1 -1
  85. package/build/src/compat/lib/PresentationResult.d.ts +35 -0
  86. package/build/src/compat/lib/PresentationResult.d.ts.map +1 -1
  87. package/build/src/compat/lib/PresentationResult.js +35 -1
  88. package/build/src/compat/lib/PresentationResult.js.map +1 -1
  89. package/build/src/compat/lib/Product.d.ts +5 -0
  90. package/build/src/compat/lib/Product.d.ts.map +1 -1
  91. package/build/src/compat/lib/Product.js +5 -0
  92. package/build/src/compat/lib/Product.js.map +1 -1
  93. package/build/src/compat/lib/PurchaseController.d.ts +6 -0
  94. package/build/src/compat/lib/PurchaseController.d.ts.map +1 -1
  95. package/build/src/compat/lib/PurchaseController.js +6 -1
  96. package/build/src/compat/lib/PurchaseController.js.map +1 -1
  97. package/build/src/compat/lib/PurchaseResult.d.ts +30 -0
  98. package/build/src/compat/lib/PurchaseResult.d.ts.map +1 -1
  99. package/build/src/compat/lib/PurchaseResult.js +30 -2
  100. package/build/src/compat/lib/PurchaseResult.js.map +1 -1
  101. package/build/src/compat/lib/RedemptionResults.d.ts +18 -0
  102. package/build/src/compat/lib/RedemptionResults.d.ts.map +1 -1
  103. package/build/src/compat/lib/RedemptionResults.js +2 -0
  104. package/build/src/compat/lib/RedemptionResults.js.map +1 -1
  105. package/build/src/compat/lib/RestorationResult.d.ts +15 -0
  106. package/build/src/compat/lib/RestorationResult.d.ts.map +1 -1
  107. package/build/src/compat/lib/RestorationResult.js +15 -0
  108. package/build/src/compat/lib/RestorationResult.js.map +1 -1
  109. package/build/src/compat/lib/RestoreType.d.ts +10 -0
  110. package/build/src/compat/lib/RestoreType.d.ts.map +1 -1
  111. package/build/src/compat/lib/RestoreType.js +10 -1
  112. package/build/src/compat/lib/RestoreType.js.map +1 -1
  113. package/build/src/compat/lib/StoreProduct.d.ts +5 -0
  114. package/build/src/compat/lib/StoreProduct.d.ts.map +1 -1
  115. package/build/src/compat/lib/StoreProduct.js +5 -1
  116. package/build/src/compat/lib/StoreProduct.js.map +1 -1
  117. package/build/src/compat/lib/StoreTransaction.d.ts +5 -0
  118. package/build/src/compat/lib/StoreTransaction.d.ts.map +1 -1
  119. package/build/src/compat/lib/StoreTransaction.js +5 -0
  120. package/build/src/compat/lib/StoreTransaction.js.map +1 -1
  121. package/build/src/compat/lib/SubscriptionStatus.d.ts +20 -0
  122. package/build/src/compat/lib/SubscriptionStatus.d.ts.map +1 -1
  123. package/build/src/compat/lib/SubscriptionStatus.js.map +1 -1
  124. package/build/src/compat/lib/SuperwallDelegate.d.ts +59 -0
  125. package/build/src/compat/lib/SuperwallDelegate.d.ts.map +1 -1
  126. package/build/src/compat/lib/SuperwallDelegate.js +59 -0
  127. package/build/src/compat/lib/SuperwallDelegate.js.map +1 -1
  128. package/build/src/compat/lib/SuperwallEventInfo.d.ts +25 -0
  129. package/build/src/compat/lib/SuperwallEventInfo.d.ts.map +1 -1
  130. package/build/src/compat/lib/SuperwallEventInfo.js +34 -19
  131. package/build/src/compat/lib/SuperwallEventInfo.js.map +1 -1
  132. package/build/src/compat/lib/SuperwallOptions.d.ts +15 -0
  133. package/build/src/compat/lib/SuperwallOptions.d.ts.map +1 -1
  134. package/build/src/compat/lib/SuperwallOptions.js +22 -3
  135. package/build/src/compat/lib/SuperwallOptions.js.map +1 -1
  136. package/build/src/compat/lib/Survey.d.ts +15 -0
  137. package/build/src/compat/lib/Survey.d.ts.map +1 -1
  138. package/build/src/compat/lib/Survey.js +15 -0
  139. package/build/src/compat/lib/Survey.js.map +1 -1
  140. package/build/src/compat/lib/TransactionProduct.d.ts +5 -0
  141. package/build/src/compat/lib/TransactionProduct.d.ts.map +1 -1
  142. package/build/src/compat/lib/TransactionProduct.js +5 -0
  143. package/build/src/compat/lib/TransactionProduct.js.map +1 -1
  144. package/build/src/compat/lib/TriggerResult.d.ts +10 -0
  145. package/build/src/compat/lib/TriggerResult.d.ts.map +1 -1
  146. package/build/src/compat/lib/TriggerResult.js +10 -1
  147. package/build/src/compat/lib/TriggerResult.js.map +1 -1
  148. package/build/src/compat/lib/Variant.d.ts +10 -0
  149. package/build/src/compat/lib/Variant.d.ts.map +1 -1
  150. package/build/src/compat/lib/Variant.js +10 -0
  151. package/build/src/compat/lib/Variant.js.map +1 -1
  152. package/build/src/components/SuperwallLoading.d.ts +26 -0
  153. package/build/src/components/SuperwallLoading.d.ts.map +1 -1
  154. package/build/src/components/SuperwallLoading.js +26 -0
  155. package/build/src/components/SuperwallLoading.js.map +1 -1
  156. package/build/src/usePlacement.d.ts +12 -0
  157. package/build/src/usePlacement.d.ts.map +1 -1
  158. package/build/src/usePlacement.js +2 -0
  159. package/build/src/usePlacement.js.map +1 -1
  160. package/build/src/useSuperwall.d.ts +12 -1
  161. package/build/src/useSuperwall.d.ts.map +1 -1
  162. package/build/src/useSuperwall.js +4 -1
  163. package/build/src/useSuperwall.js.map +1 -1
  164. package/build/src/useSuperwallEvents.d.ts +4 -1
  165. package/build/src/useSuperwallEvents.d.ts.map +1 -1
  166. package/build/src/useSuperwallEvents.js +2 -0
  167. package/build/src/useSuperwallEvents.js.map +1 -1
  168. package/build/src/useUser.d.ts +2 -0
  169. package/build/src/useUser.d.ts.map +1 -1
  170. package/build/src/useUser.js +2 -0
  171. package/build/src/useUser.js.map +1 -1
  172. package/package.json +11 -9
  173. package/scripts/check-expo-version.js +68 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - e19e626: require Expo 53+
8
+
9
+ ## 0.0.15
10
+
11
+ ### Patch Changes
12
+
13
+ - 020c22a: fix: old exports
14
+
3
15
  ## 0.0.14
4
16
 
5
17
  ### Patch Changes
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "expo-superwall",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Offical Expo Integration for Superwall",
5
- "main": "build/index.js",
6
- "types": "build/index.d.ts",
5
+ "main": "build/src/index.js",
6
+ "types": "build/src/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
9
  "import": "./build/src/index.js",
@@ -29,7 +29,8 @@
29
29
  "android": "expo run:android",
30
30
  "ios": "expo run:ios",
31
31
  "version": "changeset version",
32
- "release": "yarn build && yarn build plugin && changeset publish"
32
+ "release": "yarn build && yarn build plugin && changeset publish",
33
+ "postinstall": "node scripts/check-expo-version.js"
33
34
  },
34
35
  "keywords": [
35
36
  "react-native",
@@ -45,11 +46,11 @@
45
46
  "license": "MIT",
46
47
  "homepage": "https://github.com/superwall/expo-superwall#readme",
47
48
  "devDependencies": {
48
- "@biomejs/biome": "^1.9.4",
49
- "@changesets/cli": "^2.29.4",
49
+ "@biomejs/biome": "^2.0.6",
50
+ "@changesets/cli": "^2.29.5",
50
51
  "@types/react": "~19.0.10",
51
52
  "expo": "*",
52
- "expo-module-scripts": "^4.1.7",
53
+ "expo-module-scripts": "^4.1.8",
53
54
  "react-native": "*"
54
55
  },
55
56
  "peerDependencies": {
@@ -66,10 +67,11 @@
66
67
  "android",
67
68
  "expo-module.config.json",
68
69
  "plugin",
69
- "app.plugin.js"
70
+ "app.plugin.js",
71
+ "scripts"
70
72
  ],
71
73
  "packageManager": "yarn@4.7.0",
72
74
  "dependencies": {
73
- "zustand": "^5.0.5"
75
+ "zustand": "^5.0.6"
74
76
  }
75
77
  }
@@ -1,16 +1,54 @@
1
1
  import type { OnPurchaseParams } from "./SuperwallExpoModule.types";
2
+ /**
3
+ * @category Purchase Controller
4
+ * @since 0.0.15
5
+ */
2
6
  export interface PurchaseResult {
3
7
  type: string;
4
8
  error?: string;
5
9
  }
10
+ /**
11
+ * @category Purchase Controller
12
+ * @since 0.0.15
13
+ */
6
14
  export interface CustomPurchaseControllerContext {
7
15
  onPurchase: (params: OnPurchaseParams) => Promise<void>;
8
16
  onPurchaseRestore: () => Promise<void>;
9
17
  }
18
+ /**
19
+ * @category Purchase Controller
20
+ * @since 0.0.15
21
+ */
10
22
  export interface CustomPurchaseControllerProviderProps {
11
23
  children: React.ReactNode;
12
24
  controller: CustomPurchaseControllerContext;
13
25
  }
26
+ /**
27
+ * @category Purchase Controller
28
+ * @since 0.0.15
29
+ * Provider component for custom purchase controller logic.
30
+ *
31
+ * This component allows you to integrate your own purchase handling logic
32
+ * with the Superwall SDK. It listens for purchase and restore events from
33
+ * Superwall and delegates them to the provided `controller`.
34
+ *
35
+ * @param props - The properties for the CustomPurchaseControllerProvider.
36
+ * @param props.children - The child components that will be wrapped by this provider.
37
+ * @param props.controller - An object implementing the `CustomPurchaseControllerContext`
38
+ * interface, which defines how to handle purchases and restores.
39
+ */
14
40
  export declare const CustomPurchaseControllerProvider: ({ children, controller, }: CustomPurchaseControllerProviderProps) => import("react").JSX.Element;
41
+ /**
42
+ * @category Purchase Controller
43
+ * @since 0.0.15
44
+ * Hook to access the custom purchase controller context.
45
+ *
46
+ * This hook provides access to the `controller` object that was passed
47
+ * to the `CustomPurchaseControllerProvider`. It can be used by child
48
+ * components to trigger purchase or restore flows using the custom logic.
49
+ *
50
+ * @returns The `CustomPurchaseControllerContext` object, or `null` if not
51
+ * used within a `CustomPurchaseControllerProvider`.
52
+ */
15
53
  export declare const useCustomPurchaseController: () => CustomPurchaseControllerContext | null;
16
54
  //# sourceMappingURL=CustomPurchaseControllerProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomPurchaseControllerProvider.d.ts","sourceRoot":"","sources":["../../src/CustomPurchaseControllerProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKnE,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED,MAAM,WAAW,qCAAqC;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,+BAA+B,CAAA;CAC5C;AAED,eAAO,MAAM,gCAAgC,GAAI,2BAG9C,qCAAqC,gCAuBvC,CAAA;AAED,eAAO,MAAM,2BAA2B,8CAIvC,CAAA"}
1
+ {"version":3,"file":"CustomPurchaseControllerProvider.d.ts","sourceRoot":"","sources":["../../src/CustomPurchaseControllerProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAKnE;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,iBAAiB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,qCAAqC;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,+BAA+B,CAAA;CAC5C;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gCAAgC,GAAI,2BAG9C,qCAAqC,gCAuBvC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,2BAA2B,8CAIvC,CAAA"}
@@ -2,6 +2,20 @@ import { createContext, useContext } from "react";
2
2
  import SuperwallExpoModule from "./SuperwallExpoModule";
3
3
  import { useSuperwallEvents } from "./useSuperwallEvents";
4
4
  const customPurchaseControllerContext = createContext(null);
5
+ /**
6
+ * @category Purchase Controller
7
+ * @since 0.0.15
8
+ * Provider component for custom purchase controller logic.
9
+ *
10
+ * This component allows you to integrate your own purchase handling logic
11
+ * with the Superwall SDK. It listens for purchase and restore events from
12
+ * Superwall and delegates them to the provided `controller`.
13
+ *
14
+ * @param props - The properties for the CustomPurchaseControllerProvider.
15
+ * @param props.children - The child components that will be wrapped by this provider.
16
+ * @param props.controller - An object implementing the `CustomPurchaseControllerContext`
17
+ * interface, which defines how to handle purchases and restores.
18
+ */
5
19
  export const CustomPurchaseControllerProvider = ({ children, controller, }) => {
6
20
  useSuperwallEvents({
7
21
  onPurchase: async (params) => {
@@ -21,6 +35,18 @@ export const CustomPurchaseControllerProvider = ({ children, controller, }) => {
21
35
  {children}
22
36
  </customPurchaseControllerContext.Provider>);
23
37
  };
38
+ /**
39
+ * @category Purchase Controller
40
+ * @since 0.0.15
41
+ * Hook to access the custom purchase controller context.
42
+ *
43
+ * This hook provides access to the `controller` object that was passed
44
+ * to the `CustomPurchaseControllerProvider`. It can be used by child
45
+ * components to trigger purchase or restore flows using the custom logic.
46
+ *
47
+ * @returns The `CustomPurchaseControllerContext` object, or `null` if not
48
+ * used within a `CustomPurchaseControllerProvider`.
49
+ */
24
50
  export const useCustomPurchaseController = () => {
25
51
  const context = useContext(customPurchaseControllerContext);
26
52
  return context;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomPurchaseControllerProvider.js","sourceRoot":"","sources":["../../src/CustomPurchaseControllerProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,+BAA+B,GAAG,aAAa,CAAyC,IAAI,CAAC,CAAA;AAiBnG,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,EAC/C,QAAQ,EACR,UAAU,GAC4B,EAAE,EAAE;IAC1C,kBAAkB,CAAC;QACjB,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAC3B,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YAEnC,mBAAmB,CAAC,WAAW,CAAC;gBAC9B,IAAI,EAAE,WAAW;aAClB,CAAC,CAAA;QACJ,CAAC;QACD,iBAAiB,EAAE,KAAK,IAAI,EAAE;YAC5B,MAAM,UAAU,CAAC,iBAAiB,EAAE,CAAA;YAEpC,mBAAmB,CAAC,UAAU,CAAC;gBAC7B,IAAI,EAAE,UAAU;aACjB,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,+BAA+B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAC1D;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,+BAA+B,CAAC,QAAQ,CAAC,CAC5C,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,+BAA+B,CAAC,CAAA;IAE3D,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import { createContext, useContext } from \"react\"\nimport SuperwallExpoModule from \"./SuperwallExpoModule\"\nimport type { OnPurchaseParams } from \"./SuperwallExpoModule.types\"\nimport { useSuperwallEvents } from \"./useSuperwallEvents\"\n\nconst customPurchaseControllerContext = createContext<CustomPurchaseControllerContext | null>(null)\n\nexport interface PurchaseResult {\n type: string\n error?: string\n}\n\nexport interface CustomPurchaseControllerContext {\n onPurchase: (params: OnPurchaseParams) => Promise<void>\n onPurchaseRestore: () => Promise<void>\n}\n\nexport interface CustomPurchaseControllerProviderProps {\n children: React.ReactNode\n controller: CustomPurchaseControllerContext\n}\n\nexport const CustomPurchaseControllerProvider = ({\n children,\n controller,\n}: CustomPurchaseControllerProviderProps) => {\n useSuperwallEvents({\n onPurchase: async (params) => {\n await controller.onPurchase(params)\n\n SuperwallExpoModule.didPurchase({\n type: \"purchased\",\n })\n },\n onPurchaseRestore: async () => {\n await controller.onPurchaseRestore()\n\n SuperwallExpoModule.didRestore({\n type: \"restored\",\n })\n },\n })\n\n return (\n <customPurchaseControllerContext.Provider value={controller}>\n {children}\n </customPurchaseControllerContext.Provider>\n )\n}\n\nexport const useCustomPurchaseController = () => {\n const context = useContext(customPurchaseControllerContext)\n\n return context\n}\n"]}
1
+ {"version":3,"file":"CustomPurchaseControllerProvider.js","sourceRoot":"","sources":["../../src/CustomPurchaseControllerProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,mBAAmB,MAAM,uBAAuB,CAAA;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,+BAA+B,GAAG,aAAa,CAAyC,IAAI,CAAC,CAAA;AA6BnG;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,EAC/C,QAAQ,EACR,UAAU,GAC4B,EAAE,EAAE;IAC1C,kBAAkB,CAAC;QACjB,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;YAC3B,MAAM,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;YAEnC,mBAAmB,CAAC,WAAW,CAAC;gBAC9B,IAAI,EAAE,WAAW;aAClB,CAAC,CAAA;QACJ,CAAC;QACD,iBAAiB,EAAE,KAAK,IAAI,EAAE;YAC5B,MAAM,UAAU,CAAC,iBAAiB,EAAE,CAAA;YAEpC,mBAAmB,CAAC,UAAU,CAAC;gBAC7B,IAAI,EAAE,UAAU;aACjB,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,CACL,CAAC,+BAA+B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC,CAC1D;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,+BAA+B,CAAC,QAAQ,CAAC,CAC5C,CAAA;AACH,CAAC,CAAA;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,EAAE;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,+BAA+B,CAAC,CAAA;IAE3D,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import { createContext, useContext } from \"react\"\nimport SuperwallExpoModule from \"./SuperwallExpoModule\"\nimport type { OnPurchaseParams } from \"./SuperwallExpoModule.types\"\nimport { useSuperwallEvents } from \"./useSuperwallEvents\"\n\nconst customPurchaseControllerContext = createContext<CustomPurchaseControllerContext | null>(null)\n\n/**\n * @category Purchase Controller\n * @since 0.0.15\n */\nexport interface PurchaseResult {\n type: string\n error?: string\n}\n\n/**\n * @category Purchase Controller\n * @since 0.0.15\n */\nexport interface CustomPurchaseControllerContext {\n onPurchase: (params: OnPurchaseParams) => Promise<void>\n onPurchaseRestore: () => Promise<void>\n}\n\n/**\n * @category Purchase Controller\n * @since 0.0.15\n */\nexport interface CustomPurchaseControllerProviderProps {\n children: React.ReactNode\n controller: CustomPurchaseControllerContext\n}\n\n/**\n * @category Purchase Controller\n * @since 0.0.15\n * Provider component for custom purchase controller logic.\n *\n * This component allows you to integrate your own purchase handling logic\n * with the Superwall SDK. It listens for purchase and restore events from\n * Superwall and delegates them to the provided `controller`.\n *\n * @param props - The properties for the CustomPurchaseControllerProvider.\n * @param props.children - The child components that will be wrapped by this provider.\n * @param props.controller - An object implementing the `CustomPurchaseControllerContext`\n * interface, which defines how to handle purchases and restores.\n */\nexport const CustomPurchaseControllerProvider = ({\n children,\n controller,\n}: CustomPurchaseControllerProviderProps) => {\n useSuperwallEvents({\n onPurchase: async (params) => {\n await controller.onPurchase(params)\n\n SuperwallExpoModule.didPurchase({\n type: \"purchased\",\n })\n },\n onPurchaseRestore: async () => {\n await controller.onPurchaseRestore()\n\n SuperwallExpoModule.didRestore({\n type: \"restored\",\n })\n },\n })\n\n return (\n <customPurchaseControllerContext.Provider value={controller}>\n {children}\n </customPurchaseControllerContext.Provider>\n )\n}\n\n/**\n * @category Purchase Controller\n * @since 0.0.15\n * Hook to access the custom purchase controller context.\n *\n * This hook provides access to the `controller` object that was passed\n * to the `CustomPurchaseControllerProvider`. It can be used by child\n * components to trigger purchase or restore flows using the custom logic.\n *\n * @returns The `CustomPurchaseControllerContext` object, or `null` if not\n * used within a `CustomPurchaseControllerProvider`.\n */\nexport const useCustomPurchaseController = () => {\n const context = useContext(customPurchaseControllerContext)\n\n return context\n}\n"]}
@@ -11,6 +11,8 @@ interface SuperwallProviderProps {
11
11
  children: ReactNode;
12
12
  }
13
13
  /**
14
+ * @category Providers
15
+ * @since 0.0.15
14
16
  * Main provider component for the Superwall SDK.
15
17
  *
16
18
  * This component initializes the Superwall SDK with your API key and configuration options.
@@ -1 +1 @@
1
- {"version":3,"file":"SuperwallProvider.d.ts","sourceRoot":"","sources":["../../src/SuperwallProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAMjD,UAAU,sBAAsB;IAC9B,6BAA6B;IAC7B,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;IACD,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EAEP,QAAQ,GACT,EAAE,sBAAsB,+BAiCxB"}
1
+ {"version":3,"file":"SuperwallProvider.d.ts","sourceRoot":"","sources":["../../src/SuperwallProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAMjD,UAAU,sBAAsB;IAC9B,6BAA6B;IAC7B,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;IACD,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC7B,4CAA4C;IAC5C,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EAEP,QAAQ,GACT,EAAE,sBAAsB,+BAiCxB"}
@@ -4,6 +4,8 @@ import { useShallow } from "zustand/shallow";
4
4
  import { useCustomPurchaseController } from "./CustomPurchaseControllerProvider";
5
5
  import { SuperwallContext, useSuperwallStore } from "./useSuperwall";
6
6
  /**
7
+ * @category Providers
8
+ * @since 0.0.15
7
9
  * Main provider component for the Superwall SDK.
8
10
  *
9
11
  * This component initializes the Superwall SDK with your API key and configuration options.
@@ -1 +1 @@
1
- {"version":3,"file":"SuperwallProvider.js","sourceRoot":"","sources":["../../src/SuperwallProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAcpE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EAEP,QAAQ,GACe;IACvB,MAAM,+BAA+B,GAAG,CAAC,CAAC,2BAA2B,EAAE,CAAA;IACvE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,iBAAiB,CAC9D,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC,CAAC,CACJ,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;YAChC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAA0B,CAAC,CAAA;YAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAA;YACpE,CAAC;YAED,SAAS,CAAC,MAAM,EAAE;gBAChB,GAAG,OAAO;gBACV,uBAAuB,EAAE,+BAA+B;aACzD,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAA;YAClD,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,+BAA+B,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;IAE3F,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAA;QAE7D,OAAO,OAAO,CAAA;IAChB,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACvF,CAAC","sourcesContent":["import { type ReactNode, useEffect } from \"react\"\nimport { Platform } from \"react-native\"\nimport { useShallow } from \"zustand/shallow\"\nimport { useCustomPurchaseController } from \"./CustomPurchaseControllerProvider\"\nimport { SuperwallContext, useSuperwallStore } from \"./useSuperwall\"\n\ninterface SuperwallProviderProps {\n /** Your Superwall API key */\n apiKeys: {\n android?: string\n ios?: string\n }\n /** Optional configuration options passed to the native SDK */\n options?: Record<string, any>\n /** App content to render once configured */\n children: ReactNode\n}\n\n/**\n * Main provider component for the Superwall SDK.\n *\n * This component initializes the Superwall SDK with your API key and configuration options.\n * It should wrap the root of your application or the part of your app that requires Superwall functionality.\n * It also sets up necessary event listeners for the SDK.\n *\n * @param props - The properties for the SuperwallProvider.\n * @param props.apiKeys - An object containing your Superwall API keys for Android and iOS.\n * @param props.options - Optional configuration options to pass to the native Superwall SDK.\n * @param props.children - The child components of your application that will have access to Superwall features.\n *\n * Example:\n * ```tsx\n * <SuperwallProvider apiKeys={{ ios: \"YOUR_IOS_API_KEY\", android: \"YOUR_ANDROID_API_KEY\" }}>\n * <App />\n * </SuperwallProvider>\n * ```\n */\nexport function SuperwallProvider({\n apiKeys,\n options,\n\n children,\n}: SuperwallProviderProps) {\n const isUsingCustomPurchaseController = !!useCustomPurchaseController()\n const { isConfigured, isLoading, configure } = useSuperwallStore(\n useShallow((state) => ({\n isConfigured: state.isConfigured,\n isLoading: state.isLoading,\n configure: state.configure,\n })),\n )\n\n useEffect(() => {\n if (!isConfigured && !isLoading) {\n const apiKey = apiKeys[Platform.OS as keyof typeof apiKeys]\n if (!apiKey) {\n throw new Error(`No API key provided for platform ${Platform.OS}`)\n }\n\n configure(apiKey, {\n ...options,\n manualPurchaseManagment: isUsingCustomPurchaseController,\n }).catch((err) => {\n console.error(\"Superwall configure failed\", err)\n })\n }\n }, [isConfigured, isUsingCustomPurchaseController, isLoading, apiKeys, options, configure])\n\n useEffect(() => {\n const cleanup = useSuperwallStore.getState()._initListeners()\n\n return cleanup\n }, [])\n\n return <SuperwallContext.Provider value={true}>{children}</SuperwallContext.Provider>\n}\n"]}
1
+ {"version":3,"file":"SuperwallProvider.js","sourceRoot":"","sources":["../../src/SuperwallProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAA;AAChF,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAcpE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,OAAO,EACP,OAAO,EAEP,QAAQ,GACe;IACvB,MAAM,+BAA+B,GAAG,CAAC,CAAC,2BAA2B,EAAE,CAAA;IACvE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,iBAAiB,CAC9D,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACrB,YAAY,EAAE,KAAK,CAAC,YAAY;QAChC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC,CAAC,CACJ,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;YAChC,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,EAA0B,CAAC,CAAA;YAC3D,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,oCAAoC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAA;YACpE,CAAC;YAED,SAAS,CAAC,MAAM,EAAE;gBAChB,GAAG,OAAO;gBACV,uBAAuB,EAAE,+BAA+B;aACzD,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAA;YAClD,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,+BAA+B,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAA;IAE3F,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAC,cAAc,EAAE,CAAA;QAE7D,OAAO,OAAO,CAAA;IAChB,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;AACvF,CAAC","sourcesContent":["import { type ReactNode, useEffect } from \"react\"\nimport { Platform } from \"react-native\"\nimport { useShallow } from \"zustand/shallow\"\nimport { useCustomPurchaseController } from \"./CustomPurchaseControllerProvider\"\nimport { SuperwallContext, useSuperwallStore } from \"./useSuperwall\"\n\ninterface SuperwallProviderProps {\n /** Your Superwall API key */\n apiKeys: {\n android?: string\n ios?: string\n }\n /** Optional configuration options passed to the native SDK */\n options?: Record<string, any>\n /** App content to render once configured */\n children: ReactNode\n}\n\n/**\n * @category Providers\n * @since 0.0.15\n * Main provider component for the Superwall SDK.\n *\n * This component initializes the Superwall SDK with your API key and configuration options.\n * It should wrap the root of your application or the part of your app that requires Superwall functionality.\n * It also sets up necessary event listeners for the SDK.\n *\n * @param props - The properties for the SuperwallProvider.\n * @param props.apiKeys - An object containing your Superwall API keys for Android and iOS.\n * @param props.options - Optional configuration options to pass to the native Superwall SDK.\n * @param props.children - The child components of your application that will have access to Superwall features.\n *\n * Example:\n * ```tsx\n * <SuperwallProvider apiKeys={{ ios: \"YOUR_IOS_API_KEY\", android: \"YOUR_ANDROID_API_KEY\" }}>\n * <App />\n * </SuperwallProvider>\n * ```\n */\nexport function SuperwallProvider({\n apiKeys,\n options,\n\n children,\n}: SuperwallProviderProps) {\n const isUsingCustomPurchaseController = !!useCustomPurchaseController()\n const { isConfigured, isLoading, configure } = useSuperwallStore(\n useShallow((state) => ({\n isConfigured: state.isConfigured,\n isLoading: state.isLoading,\n configure: state.configure,\n })),\n )\n\n useEffect(() => {\n if (!isConfigured && !isLoading) {\n const apiKey = apiKeys[Platform.OS as keyof typeof apiKeys]\n if (!apiKey) {\n throw new Error(`No API key provided for platform ${Platform.OS}`)\n }\n\n configure(apiKey, {\n ...options,\n manualPurchaseManagment: isUsingCustomPurchaseController,\n }).catch((err) => {\n console.error(\"Superwall configure failed\", err)\n })\n }\n }, [isConfigured, isUsingCustomPurchaseController, isLoading, apiKeys, options, configure])\n\n useEffect(() => {\n const cleanup = useSuperwallStore.getState()._initListeners()\n\n return cleanup\n }, [])\n\n return <SuperwallContext.Provider value={true}>{children}</SuperwallContext.Provider>\n}\n"]}
@@ -1,4 +1,9 @@
1
1
  import { Variant } from "./Experiment";
2
+ /**
3
+ * @category Models
4
+ * @since 0.0.15
5
+ * Represents an assignment to an experiment variant.
6
+ */
2
7
  export declare class Assignment {
3
8
  experimentId: string;
4
9
  variant: Variant;
@@ -6,5 +11,10 @@ export declare class Assignment {
6
11
  constructor(experimentId: string, variant: Variant, isSentToServer: boolean);
7
12
  static fromJson(json: any): Assignment;
8
13
  }
14
+ /**
15
+ * @category Types
16
+ * @since 0.0.15
17
+ * Represents a confirmed assignment, which is an alias for Assignment.
18
+ */
9
19
  export type ConfirmedAssignment = Assignment;
10
20
  //# sourceMappingURL=Assigments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Assigments.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/Assigments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,qBAAa,UAAU;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,OAAO,CAAA;gBAEX,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;IAM3E,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU;CAOvC;AAED,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAA"}
1
+ {"version":3,"file":"Assigments.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/Assigments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;GAIG;AACH,qBAAa,UAAU;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB,cAAc,EAAE,OAAO,CAAA;gBAEX,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO;IAM3E,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU;CAOvC;AAED;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAA"}
@@ -1,4 +1,9 @@
1
1
  import { Variant } from "./Experiment";
2
+ /**
3
+ * @category Models
4
+ * @since 0.0.15
5
+ * Represents an assignment to an experiment variant.
6
+ */
2
7
  export class Assignment {
3
8
  experimentId;
4
9
  variant;
@@ -1 +1 @@
1
- {"version":3,"file":"Assigments.js","sourceRoot":"","sources":["../../../../src/compat/lib/Assigments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,OAAO,UAAU;IACrB,YAAY,CAAQ;IACpB,OAAO,CAAS;IAChB,cAAc,CAAS;IAEvB,YAAY,YAAoB,EAAE,OAAgB,EAAE,cAAuB;QACzE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,IAAI,UAAU,CACnB,IAAI,CAAC,YAAY,EACjB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAC9B,IAAI,CAAC,cAAc,IAAI,KAAK,CAC7B,CAAA;IACH,CAAC;CACF","sourcesContent":["import { Variant } from \"./Experiment\"\n\nexport class Assignment {\n experimentId: string\n variant: Variant\n isSentToServer: boolean\n\n constructor(experimentId: string, variant: Variant, isSentToServer: boolean) {\n this.experimentId = experimentId\n this.variant = variant\n this.isSentToServer = isSentToServer\n }\n\n static fromJson(json: any): Assignment {\n return new Assignment(\n json.experimentId,\n Variant.fromJson(json.variant),\n json.isSentToServer ?? false,\n )\n }\n}\n\nexport type ConfirmedAssignment = Assignment\n"]}
1
+ {"version":3,"file":"Assigments.js","sourceRoot":"","sources":["../../../../src/compat/lib/Assigments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC;;;;GAIG;AACH,MAAM,OAAO,UAAU;IACrB,YAAY,CAAQ;IACpB,OAAO,CAAS;IAChB,cAAc,CAAS;IAEvB,YAAY,YAAoB,EAAE,OAAgB,EAAE,cAAuB;QACzE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QAChC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,IAAI,UAAU,CACnB,IAAI,CAAC,YAAY,EACjB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAC9B,IAAI,CAAC,cAAc,IAAI,KAAK,CAC7B,CAAA;IACH,CAAC;CACF","sourcesContent":["import { Variant } from \"./Experiment\"\n\n/**\n * @category Models\n * @since 0.0.15\n * Represents an assignment to an experiment variant.\n */\nexport class Assignment {\n experimentId: string\n variant: Variant\n isSentToServer: boolean\n\n constructor(experimentId: string, variant: Variant, isSentToServer: boolean) {\n this.experimentId = experimentId\n this.variant = variant\n this.isSentToServer = isSentToServer\n }\n\n static fromJson(json: any): Assignment {\n return new Assignment(\n json.experimentId,\n Variant.fromJson(json.variant),\n json.isSentToServer ?? false,\n )\n }\n}\n\n/**\n * @category Types\n * @since 0.0.15\n * Represents a confirmed assignment, which is an alias for Assignment.\n */\nexport type ConfirmedAssignment = Assignment\n"]}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Represents a request to compute a device property.
5
+ */
1
6
  export declare class ComputedPropertyRequest {
2
7
  type: ComputedPropertyRequestType;
3
8
  placementName: string;
@@ -7,6 +12,11 @@ export declare class ComputedPropertyRequest {
7
12
  placementName: string;
8
13
  }): ComputedPropertyRequest;
9
14
  }
15
+ /**
16
+ * @category Enums
17
+ * @since 0.0.15
18
+ * Enum for the types of computed properties.
19
+ */
10
20
  export declare enum ComputedPropertyRequestType {
11
21
  minutesSince = "minutesSince",
12
22
  hoursSince = "hoursSince",
@@ -1 +1 @@
1
- {"version":3,"file":"ComputedPropertyRequest.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/ComputedPropertyRequest.ts"],"names":[],"mappings":"AACA,qBAAa,uBAAuB;IAClC,IAAI,EAAE,2BAA2B,CAAA;IACjC,aAAa,EAAE,MAAM,CAAA;gBAET,IAAI,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM;IAMpE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,MAAM,CAAA;QACZ,aAAa,EAAE,MAAM,CAAA;KACtB,GAAG,uBAAuB;CAI5B;AAGD,oBAAY,2BAA2B;IACrC,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAGD,yBAAiB,2BAA2B,CAAC;IAE3C,SAAgB,MAAM,CAAC,IAAI,EAAE,2BAA2B,GAAG,MAAM,CAEhE;IAGD,SAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,CAMlE;CACF"}
1
+ {"version":3,"file":"ComputedPropertyRequest.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/ComputedPropertyRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,uBAAuB;IAClC,IAAI,EAAE,2BAA2B,CAAA;IACjC,aAAa,EAAE,MAAM,CAAA;gBAET,IAAI,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM;IAMpE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,MAAM,CAAA;QACZ,aAAa,EAAE,MAAM,CAAA;KACtB,GAAG,uBAAuB;CAI5B;AAED;;;;GAIG;AACH,oBAAY,2BAA2B;IACrC,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;CAC1B;AAGD,yBAAiB,2BAA2B,CAAC;IAE3C,SAAgB,MAAM,CAAC,IAAI,EAAE,2BAA2B,GAAG,MAAM,CAEhE;IAGD,SAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,2BAA2B,CAMlE;CACF"}
@@ -1,4 +1,8 @@
1
- // TypeScript class for the request to compute a device property
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Represents a request to compute a device property.
5
+ */
2
6
  export class ComputedPropertyRequest {
3
7
  type;
4
8
  placementName;
@@ -12,7 +16,11 @@ export class ComputedPropertyRequest {
12
16
  return new ComputedPropertyRequest(type, json.placementName);
13
17
  }
14
18
  }
15
- // TypeScript enum for the types of computed properties
19
+ /**
20
+ * @category Enums
21
+ * @since 0.0.15
22
+ * Enum for the types of computed properties.
23
+ */
16
24
  export var ComputedPropertyRequestType;
17
25
  (function (ComputedPropertyRequestType) {
18
26
  ComputedPropertyRequestType["minutesSince"] = "minutesSince";
@@ -1 +1 @@
1
- {"version":3,"file":"ComputedPropertyRequest.js","sourceRoot":"","sources":["../../../../src/compat/lib/ComputedPropertyRequest.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,MAAM,OAAO,uBAAuB;IAClC,IAAI,CAA6B;IACjC,aAAa,CAAQ;IAErB,YAAY,IAAiC,EAAE,aAAqB;QAClE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;IAED,yDAAyD;IACzD,MAAM,CAAC,QAAQ,CAAC,IAGf;QACC,MAAM,IAAI,GAAG,2BAA2B,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC5D,OAAO,IAAI,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;IAC9D,CAAC;CACF;AAED,uDAAuD;AACvD,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,4DAA6B,CAAA;IAC7B,wDAAyB,CAAA;IACzB,sDAAuB,CAAA;IACvB,0DAA2B,CAAA;IAC3B,wDAAyB,CAAA;AAC3B,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AAED,4FAA4F;AAC5F,WAAiB,2BAA2B;IAC1C,2CAA2C;IAC3C,SAAgB,MAAM,CAAC,IAAiC;QACtD,OAAO,IAAI,CAAA;IACb,CAAC;IAFe,kCAAM,SAErB,CAAA;IAED,uFAAuF;IACvF,SAAgB,QAAQ,CAAC,IAAY;QACnC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;QAC/F,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,8CAA8C,IAAI,EAAE,CAAC,CAAA;QACvE,CAAC;QACD,OAAO,YAA2C,CAAA;IACpD,CAAC;IANe,oCAAQ,WAMvB,CAAA;AACH,CAAC,EAdgB,2BAA2B,KAA3B,2BAA2B,QAc3C","sourcesContent":["// TypeScript class for the request to compute a device property\nexport class ComputedPropertyRequest {\n type: ComputedPropertyRequestType\n placementName: string\n\n constructor(type: ComputedPropertyRequestType, placementName: string) {\n this.type = type\n this.placementName = placementName\n }\n\n // Static method to create an instance from a JSON object\n static fromJson(json: {\n type: string\n placementName: string\n }): ComputedPropertyRequest {\n const type = ComputedPropertyRequestType.fromJson(json.type)\n return new ComputedPropertyRequest(type, json.placementName)\n }\n}\n\n// TypeScript enum for the types of computed properties\nexport enum ComputedPropertyRequestType {\n minutesSince = \"minutesSince\",\n hoursSince = \"hoursSince\",\n daysSince = \"daysSince\",\n monthsSince = \"monthsSince\",\n yearsSince = \"yearsSince\",\n}\n\n// Utilizing a namespace to extend the enum with serialization and deserialization functions\nexport namespace ComputedPropertyRequestType {\n // Converts the enum to a JSON-valid string\n export function toJson(type: ComputedPropertyRequestType): string {\n return type\n }\n\n // Parses a JSON string to get the corresponding ComputedPropertyRequestType enum value\n export function fromJson(json: string): ComputedPropertyRequestType {\n const matchingType = Object.values(ComputedPropertyRequestType).find((value) => value === json)\n if (!matchingType) {\n throw new Error(`Invalid ComputedPropertyRequestType value: ${json}`)\n }\n return matchingType as ComputedPropertyRequestType\n }\n}\n"]}
1
+ {"version":3,"file":"ComputedPropertyRequest.js","sourceRoot":"","sources":["../../../../src/compat/lib/ComputedPropertyRequest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAO,uBAAuB;IAClC,IAAI,CAA6B;IACjC,aAAa,CAAQ;IAErB,YAAY,IAAiC,EAAE,aAAqB;QAClE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IACpC,CAAC;IAED,yDAAyD;IACzD,MAAM,CAAC,QAAQ,CAAC,IAGf;QACC,MAAM,IAAI,GAAG,2BAA2B,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC5D,OAAO,IAAI,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;IAC9D,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,2BAMX;AAND,WAAY,2BAA2B;IACrC,4DAA6B,CAAA;IAC7B,wDAAyB,CAAA;IACzB,sDAAuB,CAAA;IACvB,0DAA2B,CAAA;IAC3B,wDAAyB,CAAA;AAC3B,CAAC,EANW,2BAA2B,KAA3B,2BAA2B,QAMtC;AAED,4FAA4F;AAC5F,WAAiB,2BAA2B;IAC1C,2CAA2C;IAC3C,SAAgB,MAAM,CAAC,IAAiC;QACtD,OAAO,IAAI,CAAA;IACb,CAAC;IAFe,kCAAM,SAErB,CAAA;IAED,uFAAuF;IACvF,SAAgB,QAAQ,CAAC,IAAY;QACnC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAA;QAC/F,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,8CAA8C,IAAI,EAAE,CAAC,CAAA;QACvE,CAAC;QACD,OAAO,YAA2C,CAAA;IACpD,CAAC;IANe,oCAAQ,WAMvB,CAAA;AACH,CAAC,EAdgB,2BAA2B,KAA3B,2BAA2B,QAc3C","sourcesContent":["/**\n * @category Models\n * @since 0.0.15\n * Represents a request to compute a device property.\n */\nexport class ComputedPropertyRequest {\n type: ComputedPropertyRequestType\n placementName: string\n\n constructor(type: ComputedPropertyRequestType, placementName: string) {\n this.type = type\n this.placementName = placementName\n }\n\n // Static method to create an instance from a JSON object\n static fromJson(json: {\n type: string\n placementName: string\n }): ComputedPropertyRequest {\n const type = ComputedPropertyRequestType.fromJson(json.type)\n return new ComputedPropertyRequest(type, json.placementName)\n }\n}\n\n/**\n * @category Enums\n * @since 0.0.15\n * Enum for the types of computed properties.\n */\nexport enum ComputedPropertyRequestType {\n minutesSince = \"minutesSince\",\n hoursSince = \"hoursSince\",\n daysSince = \"daysSince\",\n monthsSince = \"monthsSince\",\n yearsSince = \"yearsSince\",\n}\n\n// Utilizing a namespace to extend the enum with serialization and deserialization functions\nexport namespace ComputedPropertyRequestType {\n // Converts the enum to a JSON-valid string\n export function toJson(type: ComputedPropertyRequestType): string {\n return type\n }\n\n // Parses a JSON string to get the corresponding ComputedPropertyRequestType enum value\n export function fromJson(json: string): ComputedPropertyRequestType {\n const matchingType = Object.values(ComputedPropertyRequestType).find((value) => value === json)\n if (!matchingType) {\n throw new Error(`Invalid ComputedPropertyRequestType value: ${json}`)\n }\n return matchingType as ComputedPropertyRequestType\n }\n}\n"]}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Enums
3
+ * @since 0.0.15
4
+ * Enum representing the configuration status of the SDK.
5
+ */
1
6
  export declare enum ConfigurationStatus {
2
7
  CONFIGURED = "CONFIGURED",
3
8
  FAILED = "FAILED",
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationStatus.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/ConfigurationStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB;IAC7B,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,yBAAiB,mBAAmB,CAAC;IACnC,SAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAW7D;IAED,SAAgB,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAS3D;CACF"}
1
+ {"version":3,"file":"ConfigurationStatus.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/ConfigurationStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,mBAAmB;IAC7B,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,yBAAiB,mBAAmB,CAAC;IACnC,SAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAW7D;IAED,SAAgB,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,MAAM,CAS3D;CACF"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Enums
3
+ * @since 0.0.15
4
+ * Enum representing the configuration status of the SDK.
5
+ */
1
6
  export var ConfigurationStatus;
2
7
  (function (ConfigurationStatus) {
3
8
  ConfigurationStatus["CONFIGURED"] = "CONFIGURED";
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurationStatus.js","sourceRoot":"","sources":["../../../../src/compat/lib/ConfigurationStatus.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,gDAAyB,CAAA;IACzB,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED,WAAiB,mBAAmB;IAClC,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,QAAQ;gBACX,OAAO,mBAAmB,CAAC,MAAM,CAAA;YACnC,KAAK,SAAS;gBACZ,OAAO,mBAAmB,CAAC,OAAO,CAAA;YACpC,KAAK,YAAY;gBACf,OAAO,mBAAmB,CAAC,UAAU,CAAA;YACvC;gBACE,OAAO,mBAAmB,CAAC,OAAO,CAAA;QACtC,CAAC;IACH,CAAC;IAXe,8BAAU,aAWzB,CAAA;IAED,SAAgB,QAAQ,CAAC,KAA0B;QACjD,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,QAAQ,CAAA;YACjB,KAAK,mBAAmB,CAAC,OAAO;gBAC9B,OAAO,SAAS,CAAA;YAClB,KAAK,mBAAmB,CAAC,UAAU;gBACjC,OAAO,YAAY,CAAA;QACvB,CAAC;IACH,CAAC;IATe,4BAAQ,WASvB,CAAA;AACH,CAAC,EAxBgB,mBAAmB,KAAnB,mBAAmB,QAwBnC","sourcesContent":["export enum ConfigurationStatus {\n CONFIGURED = \"CONFIGURED\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n}\n\nexport namespace ConfigurationStatus {\n export function fromString(value: string): ConfigurationStatus {\n switch (value) {\n case \"FAILED\":\n return ConfigurationStatus.FAILED\n case \"PENDING\":\n return ConfigurationStatus.PENDING\n case \"CONFIGURED\":\n return ConfigurationStatus.CONFIGURED\n default:\n return ConfigurationStatus.PENDING\n }\n }\n\n export function toString(value: ConfigurationStatus): string {\n switch (value) {\n case ConfigurationStatus.FAILED:\n return \"FAILED\"\n case ConfigurationStatus.PENDING:\n return \"PENDING\"\n case ConfigurationStatus.CONFIGURED:\n return \"CONFIGURED\"\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ConfigurationStatus.js","sourceRoot":"","sources":["../../../../src/compat/lib/ConfigurationStatus.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,gDAAyB,CAAA;IACzB,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B;AAED,WAAiB,mBAAmB;IAClC,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,QAAQ;gBACX,OAAO,mBAAmB,CAAC,MAAM,CAAA;YACnC,KAAK,SAAS;gBACZ,OAAO,mBAAmB,CAAC,OAAO,CAAA;YACpC,KAAK,YAAY;gBACf,OAAO,mBAAmB,CAAC,UAAU,CAAA;YACvC;gBACE,OAAO,mBAAmB,CAAC,OAAO,CAAA;QACtC,CAAC;IACH,CAAC;IAXe,8BAAU,aAWzB,CAAA;IAED,SAAgB,QAAQ,CAAC,KAA0B;QACjD,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,mBAAmB,CAAC,MAAM;gBAC7B,OAAO,QAAQ,CAAA;YACjB,KAAK,mBAAmB,CAAC,OAAO;gBAC9B,OAAO,SAAS,CAAA;YAClB,KAAK,mBAAmB,CAAC,UAAU;gBACjC,OAAO,YAAY,CAAA;QACvB,CAAC;IACH,CAAC;IATe,4BAAQ,WASvB,CAAA;AACH,CAAC,EAxBgB,mBAAmB,KAAnB,mBAAmB,QAwBnC","sourcesContent":["/**\n * @category Enums\n * @since 0.0.15\n * Enum representing the configuration status of the SDK.\n */\nexport enum ConfigurationStatus {\n CONFIGURED = \"CONFIGURED\",\n FAILED = \"FAILED\",\n PENDING = \"PENDING\",\n}\n\nexport namespace ConfigurationStatus {\n export function fromString(value: string): ConfigurationStatus {\n switch (value) {\n case \"FAILED\":\n return ConfigurationStatus.FAILED\n case \"PENDING\":\n return ConfigurationStatus.PENDING\n case \"CONFIGURED\":\n return ConfigurationStatus.CONFIGURED\n default:\n return ConfigurationStatus.PENDING\n }\n }\n\n export function toString(value: ConfigurationStatus): string {\n switch (value) {\n case ConfigurationStatus.FAILED:\n return \"FAILED\"\n case ConfigurationStatus.PENDING:\n return \"PENDING\"\n case ConfigurationStatus.CONFIGURED:\n return \"CONFIGURED\"\n }\n }\n}\n"]}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Represents a user entitlement.
5
+ */
1
6
  export declare class Entitlement {
2
7
  id: string;
3
8
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Entitlement.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/Entitlement.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAA;IAEV,IAAI,EAAE,MAAM,CAAA;IAEZ;;;OAGG;gBACS,EAAE,EAAE,MAAM;IAKtB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW;IAIvC;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW;CAKrD"}
1
+ {"version":3,"file":"Entitlement.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/Entitlement.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,WAAW;IAEtB,EAAE,EAAE,MAAM,CAAA;IAEV,IAAI,EAAE,MAAM,CAAA;IAEZ;;;OAGG;gBACS,EAAE,EAAE,MAAM;IAKtB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,WAAW;IAIvC;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW;CAKrD"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Represents a user entitlement.
5
+ */
1
6
  export class Entitlement {
2
7
  // The entitlement's identifier.
3
8
  id;
@@ -1 +1 @@
1
- {"version":3,"file":"Entitlement.js","sourceRoot":"","sources":["../../../../src/compat/lib/Entitlement.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,WAAW;IACtB,gCAAgC;IAChC,EAAE,CAAQ;IACV,0BAA0B;IAC1B,IAAI,CAAQ;IAEZ;;;OAGG;IACH,YAAY,EAAU;QACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;IAC7B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAU,EAAE,IAAY;QACpC,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC,CAAA;QAC7B,CAAC,CAAC,IAAI,GAAG,IAAI,CAAA;QACb,OAAO,CAAC,CAAA;IACV,CAAC;CACF","sourcesContent":["export class Entitlement {\n // The entitlement's identifier.\n id: string\n // The entitlement's type.\n type: string\n\n /**\n * Creates an instance of Entitlement.\n * @param id - The entitlement's identifier.\n */\n constructor(id: string) {\n this.id = id\n this.type = \"SERVICE_LEVEL\"\n }\n\n static fromJson(json: any): Entitlement {\n return Entitlement.create(json.id, json.type)\n }\n\n /**\n * Creates an Entitlement instance from id and type strings.\n * @param id - The entitlement's identifier.\n * @param type - The entitlement's type.\n * @returns A new Entitlement instance.\n */\n static create(id: string, type: string): Entitlement {\n const e = new Entitlement(id)\n e.type = type\n return e\n }\n}\n"]}
1
+ {"version":3,"file":"Entitlement.js","sourceRoot":"","sources":["../../../../src/compat/lib/Entitlement.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAO,WAAW;IACtB,gCAAgC;IAChC,EAAE,CAAQ;IACV,0BAA0B;IAC1B,IAAI,CAAQ;IAEZ;;;OAGG;IACH,YAAY,EAAU;QACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;IAC7B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/C,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,EAAU,EAAE,IAAY;QACpC,MAAM,CAAC,GAAG,IAAI,WAAW,CAAC,EAAE,CAAC,CAAA;QAC7B,CAAC,CAAC,IAAI,GAAG,IAAI,CAAA;QACb,OAAO,CAAC,CAAA;IACV,CAAC;CACF","sourcesContent":["/**\n * @category Models\n * @since 0.0.15\n * Represents a user entitlement.\n */\nexport class Entitlement {\n // The entitlement's identifier.\n id: string\n // The entitlement's type.\n type: string\n\n /**\n * Creates an instance of Entitlement.\n * @param id - The entitlement's identifier.\n */\n constructor(id: string) {\n this.id = id\n this.type = \"SERVICE_LEVEL\"\n }\n\n static fromJson(json: any): Entitlement {\n return Entitlement.create(json.id, json.type)\n }\n\n /**\n * Creates an Entitlement instance from id and type strings.\n * @param id - The entitlement's identifier.\n * @param type - The entitlement's type.\n * @returns A new Entitlement instance.\n */\n static create(id: string, type: string): Entitlement {\n const e = new Entitlement(id)\n e.type = type\n return e\n }\n}\n"]}
@@ -1,5 +1,10 @@
1
1
  import type { Entitlement } from "./Entitlement";
2
2
  import { SubscriptionStatus } from "./SubscriptionStatus";
3
+ /**
4
+ * @category Models
5
+ * @since 0.0.15
6
+ * Interface representing information about user entitlements.
7
+ */
3
8
  export interface EntitlementsInfo {
4
9
  status: SubscriptionStatus;
5
10
  active: Entitlement[];
@@ -1 +1 @@
1
- {"version":3,"file":"EntitlementsInfo.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/EntitlementsInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,GAAG,EAAE,WAAW,EAAE,CAAA;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB;AAGD,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CAOrD;CACF"}
1
+ {"version":3,"file":"EntitlementsInfo.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/EntitlementsInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,GAAG,EAAE,WAAW,EAAE,CAAA;IAClB,QAAQ,EAAE,WAAW,EAAE,CAAA;CACxB;AAGD,yBAAiB,gBAAgB,CAAC;IAChC,SAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,CAOrD;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntitlementsInfo.js","sourceRoot":"","sources":["../../../../src/compat/lib/EntitlementsInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AASzD,yCAAyC;AACzC,MAAM,KAAW,gBAAgB,CAShC;AATD,WAAiB,gBAAgB;IAC/B,SAAgB,UAAU,CAAC,GAAQ;QACjC,OAAO;YACL,MAAM,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;YAC7D,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,EAAE,GAAG,CAAC,GAAG;YACZ,QAAQ,EAAE,GAAG,CAAC,QAAQ;SACvB,CAAA;IACH,CAAC;IAPe,2BAAU,aAOzB,CAAA;AACH,CAAC,EATgB,gBAAgB,KAAhB,gBAAgB,QAShC","sourcesContent":["import type { Entitlement } from \"./Entitlement\"\nimport { SubscriptionStatus } from \"./SubscriptionStatus\"\n\nexport interface EntitlementsInfo {\n status: SubscriptionStatus\n active: Entitlement[]\n all: Entitlement[]\n inactive: Entitlement[]\n}\n\n// Utility functions for EntitlementsInfo\nexport namespace EntitlementsInfo {\n export function fromObject(obj: any): EntitlementsInfo {\n return {\n status: SubscriptionStatus.fromString(obj.status, obj.active),\n active: obj.active,\n all: obj.all,\n inactive: obj.inactive,\n }\n }\n}\n"]}
1
+ {"version":3,"file":"EntitlementsInfo.js","sourceRoot":"","sources":["../../../../src/compat/lib/EntitlementsInfo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAczD,yCAAyC;AACzC,MAAM,KAAW,gBAAgB,CAShC;AATD,WAAiB,gBAAgB;IAC/B,SAAgB,UAAU,CAAC,GAAQ;QACjC,OAAO;YACL,MAAM,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC;YAC7D,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,EAAE,GAAG,CAAC,GAAG;YACZ,QAAQ,EAAE,GAAG,CAAC,QAAQ;SACvB,CAAA;IACH,CAAC;IAPe,2BAAU,aAOzB,CAAA;AACH,CAAC,EATgB,gBAAgB,KAAhB,gBAAgB,QAShC","sourcesContent":["import type { Entitlement } from \"./Entitlement\"\nimport { SubscriptionStatus } from \"./SubscriptionStatus\"\n\n/**\n * @category Models\n * @since 0.0.15\n * Interface representing information about user entitlements.\n */\nexport interface EntitlementsInfo {\n status: SubscriptionStatus\n active: Entitlement[]\n all: Entitlement[]\n inactive: Entitlement[]\n}\n\n// Utility functions for EntitlementsInfo\nexport namespace EntitlementsInfo {\n export function fromObject(obj: any): EntitlementsInfo {\n return {\n status: SubscriptionStatus.fromString(obj.status, obj.active),\n active: obj.active,\n all: obj.all,\n inactive: obj.inactive,\n }\n }\n}\n"]}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Represents an experiment a user is part of.
5
+ */
1
6
  export declare class Experiment {
2
7
  id: string;
3
8
  groupId: string;
@@ -6,6 +11,11 @@ export declare class Experiment {
6
11
  static fromJson(json: any): Experiment;
7
12
  toJson(): any;
8
13
  }
14
+ /**
15
+ * @category Models
16
+ * @since 0.0.15
17
+ * Represents a variant in an experiment.
18
+ */
9
19
  export declare class Variant {
10
20
  id: string;
11
21
  type: VariantType;
@@ -14,6 +24,11 @@ export declare class Variant {
14
24
  static fromJson(json: any): Variant;
15
25
  toJson(): any;
16
26
  }
27
+ /**
28
+ * @category Enums
29
+ * @since 0.0.15
30
+ * The type of variant in an experiment.
31
+ */
17
32
  export declare enum VariantType {
18
33
  TREATMENT = "TREATMENT",
19
34
  HOLDOUT = "HOLDOUT"
@@ -1 +1 @@
1
- {"version":3,"file":"Experiment.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/Experiment.ts"],"names":[],"mappings":"AAAA,qBAAa,UAAU;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;gBAEJ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAMzD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU;IAItC,MAAM,IAAI,GAAG;CAOd;AAED,qBAAa,OAAO;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;gBAEZ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAMnE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;IAQnC,MAAM,IAAI,GAAG;CAOd;AAED,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB"}
1
+ {"version":3,"file":"Experiment.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/Experiment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,UAAU;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;gBAEJ,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAMzD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,UAAU;IAItC,MAAM,IAAI,GAAG;CAOd;AAED;;;;GAIG;AACH,qBAAa,OAAO;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,WAAW,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;gBAEZ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAMnE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO;IAQnC,MAAM,IAAI,GAAG;CAOd;AAED;;;;GAIG;AACH,oBAAY,WAAW;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Represents an experiment a user is part of.
5
+ */
1
6
  export class Experiment {
2
7
  id;
3
8
  groupId;
@@ -18,6 +23,11 @@ export class Experiment {
18
23
  };
19
24
  }
20
25
  }
26
+ /**
27
+ * @category Models
28
+ * @since 0.0.15
29
+ * Represents a variant in an experiment.
30
+ */
21
31
  export class Variant {
22
32
  id;
23
33
  type;
@@ -38,6 +48,11 @@ export class Variant {
38
48
  };
39
49
  }
40
50
  }
51
+ /**
52
+ * @category Enums
53
+ * @since 0.0.15
54
+ * The type of variant in an experiment.
55
+ */
41
56
  export var VariantType;
42
57
  (function (VariantType) {
43
58
  VariantType["TREATMENT"] = "TREATMENT";
@@ -1 +1 @@
1
- {"version":3,"file":"Experiment.js","sourceRoot":"","sources":["../../../../src/compat/lib/Experiment.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,UAAU;IACrB,EAAE,CAAQ;IACV,OAAO,CAAQ;IACf,OAAO,CAAS;IAEhB,YAAY,EAAU,EAAE,OAAe,EAAE,OAAgB;QACvD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9E,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;SAC/B,CAAA;IACH,CAAC;CACF;AAED,MAAM,OAAO,OAAO;IAClB,EAAE,CAAQ;IACV,IAAI,CAAa;IACjB,SAAS,CAAe;IAExB,YAAY,EAAU,EAAE,IAAiB,EAAE,SAAwB;QACjE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,IAAI,OAAO,CAChB,IAAI,CAAC,EAAE,EACP,WAAW,CAAC,IAAI,CAAC,IAAgC,CAAC,EAClD,IAAI,CAAC,SAAS,IAAI,IAAI,CACvB,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAA;IACH,CAAC;CACF;AAED,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["export class Experiment {\n id: string\n groupId: string\n variant: Variant\n\n constructor(id: string, groupId: string, variant: Variant) {\n this.id = id\n this.groupId = groupId\n this.variant = variant\n }\n\n static fromJson(json: any): Experiment {\n return new Experiment(json.id, json.groupId, Variant.fromJson(json.variant))\n }\n\n toJson(): any {\n return {\n id: this.id,\n groupId: this.groupId,\n variant: this.variant.toJson(),\n }\n }\n}\n\nexport class Variant {\n id: string\n type: VariantType\n paywallId: string | null\n\n constructor(id: string, type: VariantType, paywallId: string | null) {\n this.id = id\n this.type = type\n this.paywallId = paywallId\n }\n\n static fromJson(json: any): Variant {\n return new Variant(\n json.id,\n VariantType[json.type as keyof typeof VariantType],\n json.paywallId ?? null,\n )\n }\n\n toJson(): any {\n return {\n id: this.id,\n type: this.type,\n paywallId: this.paywallId,\n }\n }\n}\n\nexport enum VariantType {\n TREATMENT = \"TREATMENT\",\n HOLDOUT = \"HOLDOUT\",\n}\n"]}
1
+ {"version":3,"file":"Experiment.js","sourceRoot":"","sources":["../../../../src/compat/lib/Experiment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,OAAO,UAAU;IACrB,EAAE,CAAQ;IACV,OAAO,CAAQ;IACf,OAAO,CAAS;IAEhB,YAAY,EAAU,EAAE,OAAe,EAAE,OAAgB;QACvD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAA;IAC9E,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;SAC/B,CAAA;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,OAAO,OAAO;IAClB,EAAE,CAAQ;IACV,IAAI,CAAa;IACjB,SAAS,CAAe;IAExB,YAAY,EAAU,EAAE,IAAiB,EAAE,SAAwB;QACjE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAS;QACvB,OAAO,IAAI,OAAO,CAChB,IAAI,CAAC,EAAE,EACP,WAAW,CAAC,IAAI,CAAC,IAAgC,CAAC,EAClD,IAAI,CAAC,SAAS,IAAI,IAAI,CACvB,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAA;IACH,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;AACrB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB","sourcesContent":["/**\n * @category Models\n * @since 0.0.15\n * Represents an experiment a user is part of.\n */\nexport class Experiment {\n id: string\n groupId: string\n variant: Variant\n\n constructor(id: string, groupId: string, variant: Variant) {\n this.id = id\n this.groupId = groupId\n this.variant = variant\n }\n\n static fromJson(json: any): Experiment {\n return new Experiment(json.id, json.groupId, Variant.fromJson(json.variant))\n }\n\n toJson(): any {\n return {\n id: this.id,\n groupId: this.groupId,\n variant: this.variant.toJson(),\n }\n }\n}\n\n/**\n * @category Models\n * @since 0.0.15\n * Represents a variant in an experiment.\n */\nexport class Variant {\n id: string\n type: VariantType\n paywallId: string | null\n\n constructor(id: string, type: VariantType, paywallId: string | null) {\n this.id = id\n this.type = type\n this.paywallId = paywallId\n }\n\n static fromJson(json: any): Variant {\n return new Variant(\n json.id,\n VariantType[json.type as keyof typeof VariantType],\n json.paywallId ?? null,\n )\n }\n\n toJson(): any {\n return {\n id: this.id,\n type: this.type,\n paywallId: this.paywallId,\n }\n }\n}\n\n/**\n * @category Enums\n * @since 0.0.15\n * The type of variant in an experiment.\n */\nexport enum VariantType {\n TREATMENT = \"TREATMENT\",\n HOLDOUT = \"HOLDOUT\",\n}\n"]}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Enums
3
+ * @since 0.0.15
4
+ * Defines the behavior of feature gating.
5
+ */
1
6
  export declare enum FeatureGatingBehavior {
2
7
  gated = "gated",
3
8
  nonGated = "nonGated"
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureGatingBehavior.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/FeatureGatingBehavior.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAGD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAEnF;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAMjF"}
1
+ {"version":3,"file":"FeatureGatingBehavior.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/FeatureGatingBehavior.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAGD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CAEnF;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAMjF"}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Enums
3
+ * @since 0.0.15
4
+ * Defines the behavior of feature gating.
5
+ */
1
6
  export var FeatureGatingBehavior;
2
7
  (function (FeatureGatingBehavior) {
3
8
  FeatureGatingBehavior["gated"] = "gated";
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureGatingBehavior.js","sourceRoot":"","sources":["../../../../src/compat/lib/FeatureGatingBehavior.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,sCAAsC;AACtC,MAAM,UAAU,2BAA2B,CAAC,QAA+B;IACzE,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,IAAY;IACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;IAC7E,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,EAAE,CAAC,CAAA;IACjE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["export enum FeatureGatingBehavior {\n gated = \"gated\",\n nonGated = \"nonGated\",\n}\n\n// Standalone functions for conversion\nexport function featureGatingBehaviorToJson(behavior: FeatureGatingBehavior): string {\n return behavior\n}\n\nexport function featureGatingBehaviorFromJson(json: string): FeatureGatingBehavior {\n const behavior = Object.values(FeatureGatingBehavior).find((b) => b === json)\n if (!behavior) {\n throw new Error(`Invalid FeatureGatingBehavior value: ${json}`)\n }\n return behavior\n}\n"]}
1
+ {"version":3,"file":"FeatureGatingBehavior.js","sourceRoot":"","sources":["../../../../src/compat/lib/FeatureGatingBehavior.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,8CAAqB,CAAA;AACvB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED,sCAAsC;AACtC,MAAM,UAAU,2BAA2B,CAAC,QAA+B;IACzE,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,IAAY;IACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;IAC7E,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,EAAE,CAAC,CAAA;IACjE,CAAC;IACD,OAAO,QAAQ,CAAA;AACjB,CAAC","sourcesContent":["/**\n * @category Enums\n * @since 0.0.15\n * Defines the behavior of feature gating.\n */\nexport enum FeatureGatingBehavior {\n gated = \"gated\",\n nonGated = \"nonGated\",\n}\n\n// Standalone functions for conversion\nexport function featureGatingBehaviorToJson(behavior: FeatureGatingBehavior): string {\n return behavior\n}\n\nexport function featureGatingBehaviorFromJson(json: string): FeatureGatingBehavior {\n const behavior = Object.values(FeatureGatingBehavior).find((b) => b === json)\n if (!behavior) {\n throw new Error(`Invalid FeatureGatingBehavior value: ${json}`)\n }\n return behavior\n}\n"]}
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Options passed in when calling `Superwall.identify(userId:options:)`.
5
+ */
1
6
  export declare class IdentityOptions {
2
7
  restorePaywallAssignments: boolean;
3
8
  constructor(restorePaywallAssignments?: boolean);
@@ -1 +1 @@
1
- {"version":3,"file":"IdentityOptions.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/IdentityOptions.ts"],"names":[],"mappings":"AACA,qBAAa,eAAe;IAQ1B,yBAAyB,EAAE,OAAO,CAAA;gBAMtB,yBAAyB,UAAQ;IAK7C,MAAM,IAAI,MAAM;CAKjB"}
1
+ {"version":3,"file":"IdentityOptions.d.ts","sourceRoot":"","sources":["../../../../src/compat/lib/IdentityOptions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,eAAe;IAQ1B,yBAAyB,EAAE,OAAO,CAAA;gBAMtB,yBAAyB,UAAQ;IAK7C,MAAM,IAAI,MAAM;CAKjB"}
@@ -1,4 +1,8 @@
1
- /// Options passed in when calling `Superwall.identify(userId:options:)`.
1
+ /**
2
+ * @category Models
3
+ * @since 0.0.15
4
+ * Options passed in when calling `Superwall.identify(userId:options:)`.
5
+ */
2
6
  export class IdentityOptions {
3
7
  // Determines whether the SDK should wait to restore paywall assignments from the server
4
8
  // before presenting any paywalls.