flowgrid-sdk 1.2.1 → 1.4.1

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 (312) hide show
  1. package/README.md +221 -250
  2. package/dist/237.flowgrid.min.js +2 -0
  3. package/dist/237.flowgrid.min.js.map +1 -0
  4. package/dist/546.flowgrid.min.js +3 -0
  5. package/dist/546.flowgrid.min.js.LICENSE.txt +14 -0
  6. package/dist/546.flowgrid.min.js.map +1 -0
  7. package/dist/EXAMPLE.d.ts +1 -0
  8. package/dist/EXAMPLE.js +55 -0
  9. package/dist/EXAMPLE.js.map +1 -0
  10. package/dist/browser.d.ts +46 -103
  11. package/dist/browser.js +102 -0
  12. package/dist/browser.js.map +1 -0
  13. package/dist/flowgrid.min.js +1 -1
  14. package/dist/flowgrid.min.js.map +1 -1
  15. package/dist/index.d.ts +7 -8
  16. package/dist/index.js +64 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/lib/client/transport.d.ts +14 -4
  19. package/dist/lib/client/transport.js +432 -0
  20. package/dist/lib/client/transport.js.map +1 -0
  21. package/dist/lib/consent/index.d.ts +0 -5
  22. package/dist/lib/consent/index.js +32 -0
  23. package/dist/lib/consent/index.js.map +1 -0
  24. package/dist/lib/consent/manager.js +336 -0
  25. package/dist/lib/consent/manager.js.map +1 -0
  26. package/dist/lib/consent/types.d.ts +3 -20
  27. package/dist/lib/consent/types.js +10 -0
  28. package/dist/lib/consent/types.js.map +1 -0
  29. package/dist/lib/features/analytics/attribution.d.ts +6 -47
  30. package/dist/lib/features/analytics/attribution.js +181 -0
  31. package/dist/lib/features/analytics/attribution.js.map +1 -0
  32. package/dist/lib/features/analytics/events.d.ts +1 -28
  33. package/dist/lib/features/analytics/events.js +256 -0
  34. package/dist/lib/features/analytics/events.js.map +1 -0
  35. package/dist/lib/features/analytics/funnels.js +260 -0
  36. package/dist/lib/features/analytics/funnels.js.map +1 -0
  37. package/dist/lib/features/analytics/heatmaps.d.ts +12 -19
  38. package/dist/lib/features/analytics/heatmaps.js +258 -0
  39. package/dist/lib/features/analytics/heatmaps.js.map +1 -0
  40. package/dist/lib/features/analytics/identify.d.ts +1 -21
  41. package/dist/lib/features/analytics/identify.js +213 -0
  42. package/dist/lib/features/analytics/identify.js.map +1 -0
  43. package/dist/lib/features/analytics/index.d.ts +2 -0
  44. package/dist/lib/features/analytics/index.js +15 -0
  45. package/dist/lib/features/analytics/index.js.map +1 -0
  46. package/dist/lib/features/analytics/page-views.d.ts +13 -30
  47. package/dist/lib/features/analytics/page-views.js +268 -0
  48. package/dist/lib/features/analytics/page-views.js.map +1 -0
  49. package/dist/lib/features/analytics/performance.d.ts +18 -24
  50. package/dist/lib/features/analytics/performance.js +232 -0
  51. package/dist/lib/features/analytics/performance.js.map +1 -0
  52. package/dist/lib/features/analytics/replay.d.ts +170 -0
  53. package/dist/lib/features/analytics/replay.js +381 -0
  54. package/dist/lib/features/analytics/replay.js.map +1 -0
  55. package/dist/lib/features/analytics/retention.d.ts +1 -76
  56. package/dist/lib/features/analytics/retention.js +135 -0
  57. package/dist/lib/features/analytics/retention.js.map +1 -0
  58. package/dist/lib/features/analytics/sessions.d.ts +12 -37
  59. package/dist/lib/features/analytics/sessions.js +213 -0
  60. package/dist/lib/features/analytics/sessions.js.map +1 -0
  61. package/dist/lib/features/core/activation.d.ts +1 -24
  62. package/dist/lib/features/core/activation.js +175 -0
  63. package/dist/lib/features/core/activation.js.map +1 -0
  64. package/dist/lib/features/core/experiment.d.ts +53 -21
  65. package/dist/lib/features/core/experiment.js +554 -0
  66. package/dist/lib/features/core/experiment.js.map +1 -0
  67. package/dist/lib/features/core/index.js +9 -0
  68. package/dist/lib/features/core/index.js.map +1 -0
  69. package/dist/lib/features/core/track-feature.d.ts +1 -8
  70. package/dist/lib/features/core/track-feature.js +119 -0
  71. package/dist/lib/features/core/track-feature.js.map +1 -0
  72. package/dist/lib/features/core/track-prompt.d.ts +5 -8
  73. package/dist/lib/features/core/track-prompt.js +181 -0
  74. package/dist/lib/features/core/track-prompt.js.map +1 -0
  75. package/dist/lib/features/ecommerce/cart.d.ts +1 -24
  76. package/dist/lib/features/ecommerce/cart.js +244 -0
  77. package/dist/lib/features/ecommerce/cart.js.map +1 -0
  78. package/dist/lib/features/ecommerce/checkout.d.ts +1 -28
  79. package/dist/lib/features/ecommerce/checkout.js +254 -0
  80. package/dist/lib/features/ecommerce/checkout.js.map +1 -0
  81. package/dist/lib/features/ecommerce/index.d.ts +0 -2
  82. package/dist/lib/features/ecommerce/index.js +15 -0
  83. package/dist/lib/features/ecommerce/index.js.map +1 -0
  84. package/dist/lib/features/ecommerce/ltv.d.ts +1 -69
  85. package/dist/lib/features/ecommerce/ltv.js +114 -0
  86. package/dist/lib/features/ecommerce/ltv.js.map +1 -0
  87. package/dist/lib/features/ecommerce/products.d.ts +1 -33
  88. package/dist/lib/features/ecommerce/products.js +223 -0
  89. package/dist/lib/features/ecommerce/products.js.map +1 -0
  90. package/dist/lib/features/ecommerce/promotions.d.ts +1 -30
  91. package/dist/lib/features/ecommerce/promotions.js +197 -0
  92. package/dist/lib/features/ecommerce/promotions.js.map +1 -0
  93. package/dist/lib/features/ecommerce/purchases.d.ts +1 -48
  94. package/dist/lib/features/ecommerce/purchases.js +193 -0
  95. package/dist/lib/features/ecommerce/purchases.js.map +1 -0
  96. package/dist/lib/features/ecommerce/refunds.d.ts +1 -27
  97. package/dist/lib/features/ecommerce/refunds.js +195 -0
  98. package/dist/lib/features/ecommerce/refunds.js.map +1 -0
  99. package/dist/lib/features/ecommerce/search.d.ts +1 -24
  100. package/dist/lib/features/ecommerce/search.js +156 -0
  101. package/dist/lib/features/ecommerce/search.js.map +1 -0
  102. package/dist/lib/features/ecommerce/subscriptions.d.ts +1 -28
  103. package/dist/lib/features/ecommerce/subscriptions.js +207 -0
  104. package/dist/lib/features/ecommerce/subscriptions.js.map +1 -0
  105. package/dist/lib/features/ecommerce/wishlist.d.ts +1 -28
  106. package/dist/lib/features/ecommerce/wishlist.js +186 -0
  107. package/dist/lib/features/ecommerce/wishlist.js.map +1 -0
  108. package/dist/lib/features/enterprise/acquisition.d.ts +2 -57
  109. package/dist/lib/features/enterprise/acquisition.js +166 -0
  110. package/dist/lib/features/enterprise/acquisition.js.map +1 -0
  111. package/dist/lib/features/enterprise/alerts.d.ts +1 -37
  112. package/dist/lib/features/enterprise/alerts.js +246 -0
  113. package/dist/lib/features/enterprise/alerts.js.map +1 -0
  114. package/dist/lib/features/enterprise/churn.d.ts +1 -42
  115. package/dist/lib/features/enterprise/churn.js +175 -0
  116. package/dist/lib/features/enterprise/churn.js.map +1 -0
  117. package/dist/lib/features/enterprise/cohorts.d.ts +1 -37
  118. package/dist/lib/features/enterprise/cohorts.js +201 -0
  119. package/dist/lib/features/enterprise/cohorts.js.map +1 -0
  120. package/dist/lib/features/enterprise/engagement.d.ts +40 -46
  121. package/dist/lib/features/enterprise/engagement.js +335 -0
  122. package/dist/lib/features/enterprise/engagement.js.map +1 -0
  123. package/dist/lib/features/enterprise/forecasting.d.ts +0 -50
  124. package/dist/lib/features/enterprise/forecasting.js +232 -0
  125. package/dist/lib/features/enterprise/forecasting.js.map +1 -0
  126. package/dist/lib/features/enterprise/index.d.ts +1 -1
  127. package/dist/lib/features/enterprise/index.js +76 -0
  128. package/dist/lib/features/enterprise/index.js.map +1 -0
  129. package/dist/lib/features/enterprise/monetization.d.ts +1 -60
  130. package/dist/lib/features/enterprise/monetization.js +146 -0
  131. package/dist/lib/features/enterprise/monetization.js.map +1 -0
  132. package/dist/lib/features/enterprise/multi-path-funnels.d.ts +1 -17
  133. package/dist/lib/features/enterprise/multi-path-funnels.js +205 -0
  134. package/dist/lib/features/enterprise/multi-path-funnels.js.map +1 -0
  135. package/dist/lib/features/enterprise/paths.d.ts +1 -56
  136. package/dist/lib/features/enterprise/paths.js +149 -0
  137. package/dist/lib/features/enterprise/paths.js.map +1 -0
  138. package/dist/lib/features/enterprise/security.d.ts +8 -57
  139. package/dist/lib/features/enterprise/security.js +202 -0
  140. package/dist/lib/features/enterprise/security.js.map +1 -0
  141. package/dist/lib/features/enterprise/support.d.ts +3 -42
  142. package/dist/lib/features/enterprise/support.js +162 -0
  143. package/dist/lib/features/enterprise/support.js.map +1 -0
  144. package/dist/lib/flowgrid.d.ts +278 -0
  145. package/dist/lib/flowgrid.js +323 -0
  146. package/dist/lib/flowgrid.js.map +1 -0
  147. package/dist/lib/frameworks/index.d.ts +13 -6
  148. package/dist/lib/frameworks/index.js +18 -0
  149. package/dist/lib/frameworks/index.js.map +1 -0
  150. package/dist/lib/frameworks/nextjs/client.js +355 -0
  151. package/dist/lib/frameworks/nextjs/client.js.map +1 -0
  152. package/dist/lib/frameworks/nextjs/index.js +31 -0
  153. package/dist/lib/frameworks/nextjs/index.js.map +1 -0
  154. package/dist/lib/frameworks/nextjs/server.js +259 -0
  155. package/dist/lib/frameworks/nextjs/server.js.map +1 -0
  156. package/dist/lib/frameworks/node/index.js +391 -0
  157. package/dist/lib/frameworks/node/index.js.map +1 -0
  158. package/dist/lib/frameworks/nuxt/index.js +288 -0
  159. package/dist/lib/frameworks/nuxt/index.js.map +1 -0
  160. package/dist/lib/frameworks/react/CookieBanner.js +166 -0
  161. package/dist/lib/frameworks/react/CookieBanner.js.map +1 -0
  162. package/dist/lib/frameworks/react/index.js +271 -0
  163. package/dist/lib/frameworks/react/index.js.map +1 -0
  164. package/dist/lib/frameworks/vue/CookieBanner.js +165 -0
  165. package/dist/lib/frameworks/vue/CookieBanner.js.map +1 -0
  166. package/dist/lib/frameworks/vue/index.js +390 -0
  167. package/dist/lib/frameworks/vue/index.js.map +1 -0
  168. package/dist/lib/tracking/analytics/attribution.d.ts +14 -0
  169. package/dist/lib/tracking/analytics/attribution.js +18 -0
  170. package/dist/lib/tracking/analytics/attribution.js.map +1 -0
  171. package/dist/lib/tracking/analytics/events.d.ts +26 -0
  172. package/dist/lib/tracking/analytics/events.js +30 -0
  173. package/dist/lib/tracking/analytics/events.js.map +1 -0
  174. package/dist/lib/tracking/analytics/funnels.d.ts +16 -0
  175. package/dist/lib/tracking/analytics/funnels.js +22 -0
  176. package/dist/lib/tracking/analytics/funnels.js.map +1 -0
  177. package/dist/lib/tracking/analytics/heatmaps.d.ts +27 -0
  178. package/dist/lib/tracking/analytics/heatmaps.js +22 -0
  179. package/dist/lib/tracking/analytics/heatmaps.js.map +1 -0
  180. package/dist/lib/tracking/analytics/identify.d.ts +16 -0
  181. package/dist/lib/tracking/analytics/identify.js +22 -0
  182. package/dist/lib/tracking/analytics/identify.js.map +1 -0
  183. package/dist/lib/tracking/analytics/index.d.ts +10 -0
  184. package/dist/lib/tracking/analytics/index.js +11 -0
  185. package/dist/lib/tracking/analytics/index.js.map +1 -0
  186. package/dist/lib/tracking/analytics/page-views.d.ts +29 -0
  187. package/dist/lib/tracking/analytics/page-views.js +50 -0
  188. package/dist/lib/tracking/analytics/page-views.js.map +1 -0
  189. package/dist/lib/tracking/analytics/performance.d.ts +22 -0
  190. package/dist/lib/tracking/analytics/performance.js +22 -0
  191. package/dist/lib/tracking/analytics/performance.js.map +1 -0
  192. package/dist/lib/tracking/analytics/replay.d.ts +34 -0
  193. package/dist/lib/tracking/analytics/replay.js +46 -0
  194. package/dist/lib/tracking/analytics/replay.js.map +1 -0
  195. package/dist/lib/tracking/analytics/retention.d.ts +10 -0
  196. package/dist/lib/tracking/analytics/retention.js +10 -0
  197. package/dist/lib/tracking/analytics/retention.js.map +1 -0
  198. package/dist/lib/tracking/analytics/sessions.d.ts +20 -0
  199. package/dist/lib/tracking/analytics/sessions.js +26 -0
  200. package/dist/lib/tracking/analytics/sessions.js.map +1 -0
  201. package/dist/lib/tracking/core/activation.d.ts +23 -0
  202. package/dist/lib/tracking/core/activation.js +33 -0
  203. package/dist/lib/tracking/core/activation.js.map +1 -0
  204. package/dist/lib/tracking/core/experiment.d.ts +122 -0
  205. package/dist/lib/tracking/core/experiment.js +150 -0
  206. package/dist/lib/tracking/core/experiment.js.map +1 -0
  207. package/dist/lib/tracking/core/feature.d.ts +13 -0
  208. package/dist/lib/tracking/core/feature.js +14 -0
  209. package/dist/lib/tracking/core/feature.js.map +1 -0
  210. package/dist/lib/tracking/core/index.d.ts +4 -0
  211. package/dist/lib/tracking/core/index.js +5 -0
  212. package/dist/lib/tracking/core/index.js.map +1 -0
  213. package/dist/lib/tracking/core/prompt.d.ts +18 -0
  214. package/dist/lib/tracking/core/prompt.js +26 -0
  215. package/dist/lib/tracking/core/prompt.js.map +1 -0
  216. package/dist/lib/tracking/ecommerce/cart.d.ts +17 -0
  217. package/dist/lib/tracking/ecommerce/cart.js +22 -0
  218. package/dist/lib/tracking/ecommerce/cart.js.map +1 -0
  219. package/dist/lib/tracking/ecommerce/checkout.d.ts +17 -0
  220. package/dist/lib/tracking/ecommerce/checkout.js +22 -0
  221. package/dist/lib/tracking/ecommerce/checkout.js.map +1 -0
  222. package/dist/lib/tracking/ecommerce/index.d.ts +10 -0
  223. package/dist/lib/tracking/ecommerce/index.js +11 -0
  224. package/dist/lib/tracking/ecommerce/index.js.map +1 -0
  225. package/dist/lib/tracking/ecommerce/ltv.d.ts +15 -0
  226. package/dist/lib/tracking/ecommerce/ltv.js +14 -0
  227. package/dist/lib/tracking/ecommerce/ltv.js.map +1 -0
  228. package/dist/lib/tracking/ecommerce/products.d.ts +15 -0
  229. package/dist/lib/tracking/ecommerce/products.js +18 -0
  230. package/dist/lib/tracking/ecommerce/products.js.map +1 -0
  231. package/dist/lib/tracking/ecommerce/promotions.d.ts +14 -0
  232. package/dist/lib/tracking/ecommerce/promotions.js +25 -0
  233. package/dist/lib/tracking/ecommerce/promotions.js.map +1 -0
  234. package/dist/lib/tracking/ecommerce/purchases.d.ts +11 -0
  235. package/dist/lib/tracking/ecommerce/purchases.js +10 -0
  236. package/dist/lib/tracking/ecommerce/purchases.js.map +1 -0
  237. package/dist/lib/tracking/ecommerce/refunds.d.ts +17 -0
  238. package/dist/lib/tracking/ecommerce/refunds.js +22 -0
  239. package/dist/lib/tracking/ecommerce/refunds.js.map +1 -0
  240. package/dist/lib/tracking/ecommerce/search.d.ts +24 -0
  241. package/dist/lib/tracking/ecommerce/search.js +22 -0
  242. package/dist/lib/tracking/ecommerce/search.js.map +1 -0
  243. package/dist/lib/tracking/ecommerce/subscriptions.d.ts +21 -0
  244. package/dist/lib/tracking/ecommerce/subscriptions.js +38 -0
  245. package/dist/lib/tracking/ecommerce/subscriptions.js.map +1 -0
  246. package/dist/lib/tracking/ecommerce/wishlist.d.ts +19 -0
  247. package/dist/lib/tracking/ecommerce/wishlist.js +26 -0
  248. package/dist/lib/tracking/ecommerce/wishlist.js.map +1 -0
  249. package/dist/lib/tracking/enterprise/acquisition.d.ts +25 -0
  250. package/dist/lib/tracking/enterprise/acquisition.js +22 -0
  251. package/dist/lib/tracking/enterprise/acquisition.js.map +1 -0
  252. package/dist/lib/tracking/enterprise/alerts.d.ts +32 -0
  253. package/dist/lib/tracking/enterprise/alerts.js +30 -0
  254. package/dist/lib/tracking/enterprise/alerts.js.map +1 -0
  255. package/dist/lib/tracking/enterprise/churn.d.ts +23 -0
  256. package/dist/lib/tracking/enterprise/churn.js +22 -0
  257. package/dist/lib/tracking/enterprise/churn.js.map +1 -0
  258. package/dist/lib/tracking/enterprise/cohorts.d.ts +18 -0
  259. package/dist/lib/tracking/enterprise/cohorts.js +18 -0
  260. package/dist/lib/tracking/enterprise/cohorts.js.map +1 -0
  261. package/dist/lib/tracking/enterprise/engagement.d.ts +31 -0
  262. package/dist/lib/tracking/enterprise/engagement.js +44 -0
  263. package/dist/lib/tracking/enterprise/engagement.js.map +1 -0
  264. package/dist/lib/tracking/enterprise/forecasting.d.ts +18 -0
  265. package/dist/lib/tracking/enterprise/forecasting.js +22 -0
  266. package/dist/lib/tracking/enterprise/forecasting.js.map +1 -0
  267. package/dist/lib/tracking/enterprise/index.d.ts +11 -0
  268. package/dist/lib/tracking/enterprise/index.js +12 -0
  269. package/dist/lib/tracking/enterprise/index.js.map +1 -0
  270. package/dist/lib/tracking/enterprise/monetization.d.ts +14 -0
  271. package/dist/lib/tracking/enterprise/monetization.js +10 -0
  272. package/dist/lib/tracking/enterprise/monetization.js.map +1 -0
  273. package/dist/lib/tracking/enterprise/multi-path-funnels.d.ts +20 -0
  274. package/dist/lib/tracking/enterprise/multi-path-funnels.js +18 -0
  275. package/dist/lib/tracking/enterprise/multi-path-funnels.js.map +1 -0
  276. package/dist/lib/tracking/enterprise/paths.d.ts +20 -0
  277. package/dist/lib/tracking/enterprise/paths.js +18 -0
  278. package/dist/lib/tracking/enterprise/paths.js.map +1 -0
  279. package/dist/lib/tracking/enterprise/security.d.ts +28 -0
  280. package/dist/lib/tracking/enterprise/security.js +26 -0
  281. package/dist/lib/tracking/enterprise/security.js.map +1 -0
  282. package/dist/lib/tracking/enterprise/support.d.ts +25 -0
  283. package/dist/lib/tracking/enterprise/support.js +22 -0
  284. package/dist/lib/tracking/enterprise/support.js.map +1 -0
  285. package/dist/lib/tracking/index.d.ts +4 -0
  286. package/dist/lib/tracking/index.js +5 -0
  287. package/dist/lib/tracking/index.js.map +1 -0
  288. package/dist/lib/types/analytics.d.ts +10 -2
  289. package/dist/lib/types/analytics.js +6 -0
  290. package/dist/lib/types/analytics.js.map +1 -0
  291. package/dist/lib/types/common.js +6 -0
  292. package/dist/lib/types/common.js.map +1 -0
  293. package/dist/lib/types/ecommerce.js +6 -0
  294. package/dist/lib/types/ecommerce.js.map +1 -0
  295. package/dist/lib/types/index.js +8 -0
  296. package/dist/lib/types/index.js.map +1 -0
  297. package/dist/lib/utils/browser.d.ts +16 -0
  298. package/dist/lib/utils/browser.js +32 -0
  299. package/dist/lib/utils/browser.js.map +1 -0
  300. package/dist/lib/utils/identity.js +346 -0
  301. package/dist/lib/utils/identity.js.map +1 -0
  302. package/dist/lib/utils/storage.js +105 -0
  303. package/dist/lib/utils/storage.js.map +1 -0
  304. package/dist/umd/237.index.js +2 -0
  305. package/dist/umd/237.index.js.map +1 -0
  306. package/dist/umd/546.index.js +3 -0
  307. package/dist/umd/546.index.js.LICENSE.txt +14 -0
  308. package/dist/umd/546.index.js.map +1 -0
  309. package/dist/umd/index.js +2 -0
  310. package/dist/umd/index.js.map +1 -0
  311. package/package.json +27 -80
  312. package/dist/lib/features/ecommerce/inventory.d.ts +0 -219
@@ -0,0 +1,223 @@
1
+ /**
2
+ * @fileoverview Ecommerce - Product Tracking
3
+ * @module features/ecommerce/products
4
+ *
5
+ * @description
6
+ * Track product interactions including views, impressions, clicks,
7
+ * and product list interactions.
8
+ *
9
+ * @useCases
10
+ * - Track product page views
11
+ * - Measure product list/search impressions
12
+ * - Analyze product click-through rates
13
+ * - Monitor product detail engagement
14
+ * - Compare product performance
15
+ *
16
+ * @metrics
17
+ * - Product views
18
+ * - Product impressions
19
+ * - Click-through rate
20
+ * - View-to-cart rate
21
+ * - Revenue per product
22
+ *
23
+ * @chartData
24
+ * - Bar chart: Top products by views
25
+ * - Line chart: Product views over time
26
+ * - Table: Product performance comparison
27
+ * - Scatter: Price vs conversion rate
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const products = new Products(webId, endpoint, apiKey);
32
+ *
33
+ * // Track product view
34
+ * await products.view({
35
+ * productId: 'SKU-123',
36
+ * name: 'Premium Headphones',
37
+ * price: 299.99,
38
+ * currency: 'USD',
39
+ * category: 'Electronics/Audio'
40
+ * });
41
+ * ```
42
+ */
43
+ import { FlowGridTransport } from "../../client/transport";
44
+ // ============================================================================
45
+ // PRODUCTS CLASS
46
+ // ============================================================================
47
+ /**
48
+ * Products - Track product interactions.
49
+ *
50
+ * @extends FlowGridTransport
51
+ *
52
+ * @description
53
+ * Provides product tracking capabilities including:
54
+ * - Product page views
55
+ * - Product list impressions
56
+ * - Product clicks from lists
57
+ * - Product detail interactions
58
+ * - Quick view tracking
59
+ *
60
+ * @example
61
+ * ```typescript
62
+ * const products = new Products(webId, endpoint, apiKey);
63
+ *
64
+ * // Track product page view
65
+ * await products.view({
66
+ * productId: 'PROD-001',
67
+ * name: 'Wireless Earbuds',
68
+ * price: 79.99,
69
+ * currency: 'USD',
70
+ * category: 'Electronics/Audio',
71
+ * brand: 'AudioTech'
72
+ * });
73
+ *
74
+ * // Track list impressions
75
+ * await products.impression({
76
+ * list: {
77
+ * listId: 'search-results',
78
+ * listName: 'Search Results',
79
+ * products: searchResults
80
+ * }
81
+ * });
82
+ * ```
83
+ */
84
+ export class Products extends FlowGridTransport {
85
+ /**
86
+ * Tracks a product page view.
87
+ *
88
+ * @param config - Product view configuration
89
+ * @returns Promise resolving to product response
90
+ *
91
+ * @example
92
+ * ```typescript
93
+ * await products.view({
94
+ * productId: 'SKU-12345',
95
+ * name: 'Premium Widget',
96
+ * price: 49.99,
97
+ * currency: 'USD',
98
+ * category: 'Widgets/Premium',
99
+ * brand: 'WidgetCo',
100
+ * source: 'search',
101
+ * searchQuery: 'premium widget'
102
+ * });
103
+ * ```
104
+ */
105
+ async view(config) {
106
+ return await this.init("product_view", {
107
+ type: "ecommerce",
108
+ subtype: "product_view",
109
+ product: {
110
+ productId: config.productId,
111
+ name: config.name,
112
+ brand: config.brand,
113
+ category: config.category,
114
+ variant: config.variant,
115
+ price: config.price,
116
+ currency: config.currency,
117
+ url: config.url,
118
+ imageUrl: config.imageUrl,
119
+ rating: config.rating,
120
+ reviewCount: config.reviewCount,
121
+ stockStatus: config.stockStatus,
122
+ attributes: config.attributes
123
+ },
124
+ source: config.source,
125
+ searchQuery: config.searchQuery,
126
+ userId: config.userId,
127
+ sessionId: config.sessionId,
128
+ ...config.properties,
129
+ timestamp: new Date().toISOString()
130
+ });
131
+ }
132
+ /**
133
+ * Tracks product list impressions.
134
+ *
135
+ * @param config - Impression configuration
136
+ * @returns Promise resolving to impression response
137
+ *
138
+ * @example
139
+ * ```typescript
140
+ * // Track products shown in search results
141
+ * await products.impression({
142
+ * list: {
143
+ * listId: 'search-results',
144
+ * listName: 'Search Results',
145
+ * products: products.map((p, i) => ({ ...p, position: i + 1 }))
146
+ * }
147
+ * });
148
+ * ```
149
+ */
150
+ async impression(config) {
151
+ return await this.init("product_impression", {
152
+ type: "ecommerce",
153
+ subtype: "product_impression",
154
+ list: config.list,
155
+ productCount: config.list.products.length,
156
+ userId: config.userId,
157
+ sessionId: config.sessionId,
158
+ timestamp: new Date().toISOString()
159
+ });
160
+ }
161
+ /**
162
+ * Tracks a product click from a list.
163
+ *
164
+ * @param config - Click configuration
165
+ * @returns Promise resolving to click response
166
+ *
167
+ * @example
168
+ * ```typescript
169
+ * await products.click({
170
+ * product: selectedProduct,
171
+ * listId: 'homepage-featured',
172
+ * position: 3
173
+ * });
174
+ * ```
175
+ */
176
+ async click(config) {
177
+ return await this.init("product_click", {
178
+ type: "ecommerce",
179
+ subtype: "product_click",
180
+ product: config.product,
181
+ listId: config.listId,
182
+ position: config.position,
183
+ userId: config.userId,
184
+ timestamp: new Date().toISOString()
185
+ });
186
+ }
187
+ /**
188
+ * Tracks a quick view interaction (modal product view).
189
+ *
190
+ * @param product - Product being quick-viewed
191
+ * @param listId - List where quick view was triggered
192
+ * @returns Promise resolving to quick view response
193
+ */
194
+ async quickView(product, listId) {
195
+ return await this.init("product_quick_view", {
196
+ type: "ecommerce",
197
+ subtype: "product_quick_view",
198
+ product,
199
+ listId,
200
+ timestamp: new Date().toISOString()
201
+ });
202
+ }
203
+ /**
204
+ * Tracks product detail interaction (zoom, read reviews, etc.).
205
+ *
206
+ * @param productId - Product identifier
207
+ * @param action - Interaction type
208
+ * @param properties - Additional properties
209
+ * @returns Promise resolving to interaction response
210
+ */
211
+ async interaction(productId, action, properties) {
212
+ return await this.init("product_interaction", {
213
+ type: "ecommerce",
214
+ subtype: "product_interaction",
215
+ productId,
216
+ action,
217
+ ...properties,
218
+ timestamp: new Date().toISOString()
219
+ });
220
+ }
221
+ }
222
+ export default Products;
223
+ //# sourceMappingURL=products.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products.js","sourceRoot":"","sources":["../../../../src/lib/features/ecommerce/products.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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O,EAAE,qBAAqB;YAC9B,SAAS;YACT,MAAM;YACN,GAAG,UAAU;YACb,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;CAEF;AAED,eAAe,QAAQ,CAAC"}
@@ -46,7 +46,7 @@
46
46
  * ```
47
47
  */
48
48
  import { FlowGridTransport } from "../../client/transport";
49
- import { Promotion, MoneyValue, DateRangeFilter, TimeSeriesData } from "../../types";
49
+ import { Promotion, MoneyValue, TimeSeriesData } from "../../types";
50
50
  /**
51
51
  * Configuration for tracking promotion view.
52
52
  */
@@ -233,34 +233,5 @@ export declare class Promotions extends FlowGridTransport {
233
233
  * @returns Promise resolving to attempt response
234
234
  */
235
235
  couponAttempt(code: string, success: boolean, failureReason?: 'expired' | 'invalid' | 'minimum_not_met' | 'already_used' | 'not_applicable'): Promise<PromotionResponse>;
236
- /**
237
- * Retrieves promotion analytics for dashboards and charts.
238
- *
239
- * @param filter - Date range filter
240
- * @returns Promise resolving to promotion analytics
241
- *
242
- * @example
243
- * ```typescript
244
- * const analytics = await promotions.getAnalytics({
245
- * range: 'last30days'
246
- * });
247
- *
248
- * // Bar chart - top promotions
249
- * const topPromoChart = analytics.topPromotions.map(p => ({
250
- * name: p.name,
251
- * value: p.revenue
252
- * }));
253
- *
254
- * // Table - coupon performance
255
- * const couponTable = analytics.coupons;
256
- *
257
- * // Pie chart - promoted vs non-promoted revenue
258
- * const revenuePie = [
259
- * { name: 'Promoted', value: analytics.revenueImpact.promotedRevenue.amount },
260
- * { name: 'Non-Promoted', value: analytics.revenueImpact.nonPromotedRevenue.amount }
261
- * ];
262
- * ```
263
- */
264
- getAnalytics(filter?: DateRangeFilter): Promise<PromotionAnalyticsData>;
265
236
  }
266
237
  export default Promotions;
@@ -0,0 +1,197 @@
1
+ /**
2
+ * @fileoverview Ecommerce - Promotion Tracking
3
+ * @module features/ecommerce/promotions
4
+ *
5
+ * @description
6
+ * Track promotional content, coupon usage, and discount
7
+ * effectiveness across your ecommerce store.
8
+ *
9
+ * @useCases
10
+ * - Track promotional banner views
11
+ * - Measure promotion click-through rates
12
+ * - Analyze coupon usage and effectiveness
13
+ * - Monitor discount impact on revenue
14
+ * - Compare promotion performance
15
+ *
16
+ * @metrics
17
+ * - Promotion impressions
18
+ * - Promotion CTR
19
+ * - Coupon redemption rate
20
+ * - Revenue attributed to promotions
21
+ * - Discount impact on margins
22
+ *
23
+ * @chartData
24
+ * - Bar chart: Top promotions by revenue
25
+ * - Line chart: Coupon usage over time
26
+ * - Table: Promotion performance comparison
27
+ * - Pie chart: Revenue by promotion type
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const promotions = new Promotions(webId, endpoint, apiKey);
32
+ *
33
+ * // Track promotion view
34
+ * await promotions.view({
35
+ * promotionId: 'PROMO-SUMMER',
36
+ * name: 'Summer Sale 20% Off',
37
+ * creative: 'homepage-banner'
38
+ * });
39
+ *
40
+ * // Track coupon usage
41
+ * await promotions.couponUsed({
42
+ * code: 'SAVE20',
43
+ * discountValue: 20,
44
+ * orderId: 'ORD-123'
45
+ * });
46
+ * ```
47
+ */
48
+ import { FlowGridTransport } from "../../client/transport";
49
+ // ============================================================================
50
+ // PROMOTIONS CLASS
51
+ // ============================================================================
52
+ /**
53
+ * Promotions - Track promotions and coupons.
54
+ *
55
+ * @extends FlowGridTransport
56
+ *
57
+ * @description
58
+ * Provides promotion tracking capabilities including:
59
+ * - Promotion/banner impressions
60
+ * - Promotion clicks
61
+ * - Coupon applications
62
+ * - Coupon success/failure
63
+ * - Revenue attribution
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * const promotions = new Promotions(webId, endpoint, apiKey);
68
+ *
69
+ * // Track banner impression
70
+ * await promotions.view({
71
+ * promotionId: 'FLASH-SALE',
72
+ * name: 'Flash Sale - 30% Off',
73
+ * creative: 'hero-banner',
74
+ * position: 'homepage-top'
75
+ * });
76
+ *
77
+ * // Track banner click
78
+ * await promotions.click({
79
+ * promotionId: 'FLASH-SALE',
80
+ * name: 'Flash Sale - 30% Off',
81
+ * destinationUrl: '/sale'
82
+ * });
83
+ * ```
84
+ */
85
+ export class Promotions extends FlowGridTransport {
86
+ /**
87
+ * Tracks promotion view/impression.
88
+ *
89
+ * @param config - Promotion view configuration
90
+ * @returns Promise resolving to promotion response
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * await promotions.view({
95
+ * promotionId: 'SUMMER-2026',
96
+ * name: 'Summer Collection Launch',
97
+ * creative: 'collection-banner',
98
+ * position: 'homepage-hero',
99
+ * page: '/home'
100
+ * });
101
+ * ```
102
+ */
103
+ async view(config) {
104
+ return await this.init("promotion_view", {
105
+ type: "ecommerce",
106
+ subtype: "promotion_view",
107
+ promotionId: config.promotionId,
108
+ name: config.name,
109
+ creative: config.creative,
110
+ position: config.position,
111
+ page: config.page,
112
+ userId: config.userId,
113
+ timestamp: new Date().toISOString()
114
+ });
115
+ }
116
+ /**
117
+ * Tracks promotion click.
118
+ *
119
+ * @param config - Promotion click configuration
120
+ * @returns Promise resolving to promotion response
121
+ *
122
+ * @example
123
+ * ```typescript
124
+ * await promotions.click({
125
+ * promotionId: 'SUMMER-2026',
126
+ * name: 'Summer Collection Launch',
127
+ * destinationUrl: '/collections/summer-2026'
128
+ * });
129
+ * ```
130
+ */
131
+ async click(config) {
132
+ return await this.init("promotion_click", {
133
+ type: "ecommerce",
134
+ subtype: "promotion_click",
135
+ promotionId: config.promotionId,
136
+ name: config.name,
137
+ creative: config.creative,
138
+ position: config.position,
139
+ destinationUrl: config.destinationUrl,
140
+ userId: config.userId,
141
+ timestamp: new Date().toISOString()
142
+ });
143
+ }
144
+ /**
145
+ * Tracks successful coupon usage.
146
+ *
147
+ * @param config - Coupon usage configuration
148
+ * @returns Promise resolving to coupon response
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * await promotions.couponUsed({
153
+ * code: 'SAVE20',
154
+ * orderId: 'ORD-12345',
155
+ * discountValue: 20,
156
+ * discountType: 'percentage',
157
+ * orderValueBefore: 100,
158
+ * orderValueAfter: 80
159
+ * });
160
+ * ```
161
+ */
162
+ async couponUsed(config) {
163
+ return await this.init("coupon_used", {
164
+ type: "ecommerce",
165
+ subtype: "coupon_used",
166
+ code: config.code,
167
+ orderId: config.orderId,
168
+ discountValue: config.discountValue,
169
+ discountType: config.discountType,
170
+ orderValueBefore: config.orderValueBefore,
171
+ orderValueAfter: config.orderValueAfter,
172
+ savings: config.orderValueBefore - config.orderValueAfter,
173
+ userId: config.userId,
174
+ timestamp: new Date().toISOString()
175
+ });
176
+ }
177
+ /**
178
+ * Tracks coupon application attempt (including failures).
179
+ *
180
+ * @param code - Coupon code attempted
181
+ * @param success - Whether coupon was valid
182
+ * @param failureReason - Reason for failure (if failed)
183
+ * @returns Promise resolving to attempt response
184
+ */
185
+ async couponAttempt(code, success, failureReason) {
186
+ return await this.init("coupon_attempt", {
187
+ type: "ecommerce",
188
+ subtype: "coupon_attempt",
189
+ code,
190
+ success,
191
+ failureReason,
192
+ timestamp: new Date().toISOString()
193
+ });
194
+ }
195
+ }
196
+ export default Promotions;
197
+ //# sourceMappingURL=promotions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promotions.js","sourceRoot":"","sources":["../../../../src/lib/features/ecommerce/promotions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA2G3D,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,OAAO,UAAW,SAAQ,iBAAiB;IAC/C;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,IAAI,CAAC,MAA2B;QACpC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACvC,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,gBAAgB;YAC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;YACzD,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CACjB,IAAY,EACZ,OAAgB,EAChB,aAA6F;QAE7F,OAAO,MAAM,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YACvC,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,gBAAgB;YACzB,IAAI;YACJ,OAAO;YACP,aAAa;YACb,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;SACpC,CAAC,CAAC;IACL,CAAC;CAEF;AAED,eAAe,UAAU,CAAC"}
@@ -42,7 +42,7 @@
42
42
  * ```
43
43
  */
44
44
  import { FlowGridTransport } from "../../client/transport";
45
- import { Order, ShippingInfo, MoneyValue, DateRangeFilter, TimeSeriesData, PaginationParams } from "../../types";
45
+ import { Order, ShippingInfo, MoneyValue, TimeSeriesData } from "../../types";
46
46
  /**
47
47
  * Configuration for tracking a purchase.
48
48
  */
@@ -178,9 +178,6 @@ export interface RecentOrdersData {
178
178
  * },
179
179
  * userId: 'user_123'
180
180
  * });
181
- *
182
- * // Get revenue analytics
183
- * const revenue = await purchases.getRevenue({ range: 'thisMonth' });
184
181
  * ```
185
182
  */
186
183
  export declare class Purchases extends FlowGridTransport {
@@ -239,49 +236,5 @@ export declare class Purchases extends FlowGridTransport {
239
236
  * @returns Promise resolving to delivered response
240
237
  */
241
238
  delivered(orderId: string, deliveredAt?: string): Promise<PurchaseResponse>;
242
- /**
243
- * Retrieves revenue analytics for dashboards and charts.
244
- *
245
- * @param filter - Date range filter
246
- * @returns Promise resolving to revenue analytics
247
- *
248
- * @example
249
- * ```typescript
250
- * const revenue = await purchases.getRevenue({
251
- * range: 'last30days'
252
- * });
253
- *
254
- * // KPI cards
255
- * const kpis = [
256
- * { label: 'Revenue', value: revenue.summary.totalRevenue.amount },
257
- * { label: 'Orders', value: revenue.summary.totalOrders },
258
- * { label: 'AOV', value: revenue.summary.averageOrderValue.amount }
259
- * ];
260
- *
261
- * // Revenue chart
262
- * const revenueChart = revenue.revenueTimeSeries.data;
263
- *
264
- * // Category breakdown
265
- * const categoryPie = revenue.byCategory.map(c => ({
266
- * name: c.category,
267
- * value: c.revenue
268
- * }));
269
- * ```
270
- */
271
- getRevenue(filter?: DateRangeFilter): Promise<RevenueAnalyticsData>;
272
- /**
273
- * Gets recent orders for display.
274
- *
275
- * @param pagination - Pagination options
276
- * @returns Promise resolving to recent orders
277
- */
278
- getRecentOrders(pagination?: PaginationParams): Promise<RecentOrdersData>;
279
- /**
280
- * Gets order details by ID.
281
- *
282
- * @param orderId - Order identifier
283
- * @returns Promise resolving to order details
284
- */
285
- getOrder(orderId: string): Promise<Order>;
286
239
  }
287
240
  export default Purchases;