@mohasinac/appkit 4.58.0 → 4.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (556) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/_internal/server/jobs/handlers/messages.d.ts +1 -1
  3. package/dist/_internal/server/jobs/handlers/messages.js +1 -1
  4. package/dist/_internal/shared/types/base-document.d.ts +1 -1
  5. package/dist/constants/seed-meta.d.ts +113 -0
  6. package/dist/constants/seed-meta.js +91 -0
  7. package/dist/index.d.ts +0 -131
  8. package/dist/index.js +50 -294
  9. package/dist/server.d.ts +0 -69
  10. package/dist/server.js +0 -69
  11. package/package.json +4 -2
  12. package/scripts/seed-cli.mjs +69 -1
  13. package/dist/features/tester/seed-data/_happy-path.d.ts +0 -23
  14. package/dist/features/tester/seed-data/_happy-path.js +0 -710
  15. package/dist/features/tester/seed-data/_money-flows.d.ts +0 -23
  16. package/dist/features/tester/seed-data/_money-flows.js +0 -610
  17. package/dist/features/tester/seed-data/authored/_types.d.ts +0 -57
  18. package/dist/features/tester/seed-data/authored/_types.js +0 -35
  19. package/dist/features/tester/seed-data/authored/account-auth__profile-settings.d.ts +0 -2
  20. package/dist/features/tester/seed-data/authored/account-auth__profile-settings.js +0 -226
  21. package/dist/features/tester/seed-data/authored/account-auth__signup-login.d.ts +0 -2
  22. package/dist/features/tester/seed-data/authored/account-auth__signup-login.js +0 -329
  23. package/dist/features/tester/seed-data/authored/addresses__address-filters.d.ts +0 -2
  24. package/dist/features/tester/seed-data/authored/addresses__address-filters.js +0 -41
  25. package/dist/features/tester/seed-data/authored/addresses__postal-lookup.d.ts +0 -2
  26. package/dist/features/tester/seed-data/authored/addresses__postal-lookup.js +0 -76
  27. package/dist/features/tester/seed-data/authored/addresses__postal-validation.d.ts +0 -2
  28. package/dist/features/tester/seed-data/authored/addresses__postal-validation.js +0 -78
  29. package/dist/features/tester/seed-data/authored/addresses__state-picker.d.ts +0 -2
  30. package/dist/features/tester/seed-data/authored/addresses__state-picker.js +0 -59
  31. package/dist/features/tester/seed-data/authored/addresses__unban-request.d.ts +0 -2
  32. package/dist/features/tester/seed-data/authored/addresses__unban-request.js +0 -77
  33. package/dist/features/tester/seed-data/authored/admin__admin-detail-round-trips.d.ts +0 -2
  34. package/dist/features/tester/seed-data/authored/admin__admin-detail-round-trips.js +0 -151
  35. package/dist/features/tester/seed-data/authored/admin__bans-and-trust.d.ts +0 -2
  36. package/dist/features/tester/seed-data/authored/admin__bans-and-trust.js +0 -265
  37. package/dist/features/tester/seed-data/authored/admin__blog-faqs.d.ts +0 -2
  38. package/dist/features/tester/seed-data/authored/admin__blog-faqs.js +0 -131
  39. package/dist/features/tester/seed-data/authored/admin__bug-hunter-rewards.d.ts +0 -2
  40. package/dist/features/tester/seed-data/authored/admin__bug-hunter-rewards.js +0 -143
  41. package/dist/features/tester/seed-data/authored/admin__bulk-actions.d.ts +0 -2
  42. package/dist/features/tester/seed-data/authored/admin__bulk-actions.js +0 -207
  43. package/dist/features/tester/seed-data/authored/admin__bundles.d.ts +0 -2
  44. package/dist/features/tester/seed-data/authored/admin__bundles.js +0 -144
  45. package/dist/features/tester/seed-data/authored/admin__buyer-data-admin.d.ts +0 -2
  46. package/dist/features/tester/seed-data/authored/admin__buyer-data-admin.js +0 -265
  47. package/dist/features/tester/seed-data/authored/admin__catalog-listings.d.ts +0 -2
  48. package/dist/features/tester/seed-data/authored/admin__catalog-listings.js +0 -318
  49. package/dist/features/tester/seed-data/authored/admin__category-brand-authoring.d.ts +0 -2
  50. package/dist/features/tester/seed-data/authored/admin__category-brand-authoring.js +0 -177
  51. package/dist/features/tester/seed-data/authored/admin__classifieds-digitalcodes-live.d.ts +0 -2
  52. package/dist/features/tester/seed-data/authored/admin__classifieds-digitalcodes-live.js +0 -165
  53. package/dist/features/tester/seed-data/authored/admin__content-deletes.d.ts +0 -2
  54. package/dist/features/tester/seed-data/authored/admin__content-deletes.js +0 -267
  55. package/dist/features/tester/seed-data/authored/admin__content-marketing.d.ts +0 -2
  56. package/dist/features/tester/seed-data/authored/admin__content-marketing.js +0 -188
  57. package/dist/features/tester/seed-data/authored/admin__coupons.d.ts +0 -2
  58. package/dist/features/tester/seed-data/authored/admin__coupons.js +0 -215
  59. package/dist/features/tester/seed-data/authored/admin__events-raffles-spin.d.ts +0 -2
  60. package/dist/features/tester/seed-data/authored/admin__events-raffles-spin.js +0 -202
  61. package/dist/features/tester/seed-data/authored/admin__firebase-function-effects.d.ts +0 -2
  62. package/dist/features/tester/seed-data/authored/admin__firebase-function-effects.js +0 -249
  63. package/dist/features/tester/seed-data/authored/admin__media-watermark.d.ts +0 -2
  64. package/dist/features/tester/seed-data/authored/admin__media-watermark.js +0 -148
  65. package/dist/features/tester/seed-data/authored/admin__orders-fulfillment.d.ts +0 -2
  66. package/dist/features/tester/seed-data/authored/admin__orders-fulfillment.js +0 -350
  67. package/dist/features/tester/seed-data/authored/admin__prize-draws-lotteries.d.ts +0 -2
  68. package/dist/features/tester/seed-data/authored/admin__prize-draws-lotteries.js +0 -129
  69. package/dist/features/tester/seed-data/authored/admin__site-system.d.ts +0 -2
  70. package/dist/features/tester/seed-data/authored/admin__site-system.js +0 -586
  71. package/dist/features/tester/seed-data/authored/admin__uncovered-admin-pages.d.ts +0 -2
  72. package/dist/features/tester/seed-data/authored/admin__uncovered-admin-pages.js +0 -260
  73. package/dist/features/tester/seed-data/authored/admin__users-trust.d.ts +0 -2
  74. package/dist/features/tester/seed-data/authored/admin__users-trust.js +0 -569
  75. package/dist/features/tester/seed-data/authored/buying__bidding.d.ts +0 -2
  76. package/dist/features/tester/seed-data/authored/buying__bidding.js +0 -449
  77. package/dist/features/tester/seed-data/authored/buying__browsing-search.d.ts +0 -2
  78. package/dist/features/tester/seed-data/authored/buying__browsing-search.js +0 -684
  79. package/dist/features/tester/seed-data/authored/buying__buying-checkout.d.ts +0 -2
  80. package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +0 -546
  81. package/dist/features/tester/seed-data/authored/buying__buying-coupons.d.ts +0 -2
  82. package/dist/features/tester/seed-data/authored/buying__buying-coupons.js +0 -379
  83. package/dist/features/tester/seed-data/authored/buying__cart.d.ts +0 -2
  84. package/dist/features/tester/seed-data/authored/buying__cart.js +0 -1264
  85. package/dist/features/tester/seed-data/authored/buying__image-tile-layout.d.ts +0 -2
  86. package/dist/features/tester/seed-data/authored/buying__image-tile-layout.js +0 -122
  87. package/dist/features/tester/seed-data/authored/buying__my-orders.d.ts +0 -2
  88. package/dist/features/tester/seed-data/authored/buying__my-orders.js +0 -279
  89. package/dist/features/tester/seed-data/authored/buying__offers.d.ts +0 -2
  90. package/dist/features/tester/seed-data/authored/buying__offers.js +0 -1127
  91. package/dist/features/tester/seed-data/authored/buying__order-detail-actions.d.ts +0 -2
  92. package/dist/features/tester/seed-data/authored/buying__order-detail-actions.js +0 -153
  93. package/dist/features/tester/seed-data/authored/buying__order-status-lifecycle.d.ts +0 -2
  94. package/dist/features/tester/seed-data/authored/buying__order-status-lifecycle.js +0 -252
  95. package/dist/features/tester/seed-data/authored/buying__product-detail.d.ts +0 -2
  96. package/dist/features/tester/seed-data/authored/buying__product-detail.js +0 -474
  97. package/dist/features/tester/seed-data/authored/buying__return-request.d.ts +0 -2
  98. package/dist/features/tester/seed-data/authored/buying__return-request.js +0 -165
  99. package/dist/features/tester/seed-data/authored/buying__reviews-pagination.d.ts +0 -2
  100. package/dist/features/tester/seed-data/authored/buying__reviews-pagination.js +0 -260
  101. package/dist/features/tester/seed-data/authored/buying__reviews.d.ts +0 -2
  102. package/dist/features/tester/seed-data/authored/buying__reviews.js +0 -128
  103. package/dist/features/tester/seed-data/authored/buying__spares-and-groups.d.ts +0 -2
  104. package/dist/features/tester/seed-data/authored/buying__spares-and-groups.js +0 -96
  105. package/dist/features/tester/seed-data/authored/buying__user-dashboard-extras.d.ts +0 -2
  106. package/dist/features/tester/seed-data/authored/buying__user-dashboard-extras.js +0 -283
  107. package/dist/features/tester/seed-data/authored/buying__user-dashboard-navigation.d.ts +0 -2
  108. package/dist/features/tester/seed-data/authored/buying__user-dashboard-navigation.js +0 -169
  109. package/dist/features/tester/seed-data/authored/buying__user-uncovered-pages.d.ts +0 -2
  110. package/dist/features/tester/seed-data/authored/buying__user-uncovered-pages.js +0 -105
  111. package/dist/features/tester/seed-data/authored/buying__wishlist-history.d.ts +0 -2
  112. package/dist/features/tester/seed-data/authored/buying__wishlist-history.js +0 -374
  113. package/dist/features/tester/seed-data/authored/community-support__messages.d.ts +0 -2
  114. package/dist/features/tester/seed-data/authored/community-support__messages.js +0 -200
  115. package/dist/features/tester/seed-data/authored/community-support__public-profile.d.ts +0 -2
  116. package/dist/features/tester/seed-data/authored/community-support__public-profile.js +0 -54
  117. package/dist/features/tester/seed-data/authored/community-support__support-tickets.d.ts +0 -2
  118. package/dist/features/tester/seed-data/authored/community-support__support-tickets.js +0 -76
  119. package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.d.ts +0 -4
  120. package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.js +0 -590
  121. package/dist/features/tester/seed-data/authored/content-discovery__blog.d.ts +0 -2
  122. package/dist/features/tester/seed-data/authored/content-discovery__blog.js +0 -110
  123. package/dist/features/tester/seed-data/authored/content-discovery__category-brand-relations.d.ts +0 -2
  124. package/dist/features/tester/seed-data/authored/content-discovery__category-brand-relations.js +0 -149
  125. package/dist/features/tester/seed-data/authored/content-discovery__category-counts-and-rollup.d.ts +0 -2
  126. package/dist/features/tester/seed-data/authored/content-discovery__category-counts-and-rollup.js +0 -145
  127. package/dist/features/tester/seed-data/authored/content-discovery__category-tabs-franchise-bundles.d.ts +0 -2
  128. package/dist/features/tester/seed-data/authored/content-discovery__category-tabs-franchise-bundles.js +0 -174
  129. package/dist/features/tester/seed-data/authored/content-discovery__coupons.d.ts +0 -2
  130. package/dist/features/tester/seed-data/authored/content-discovery__coupons.js +0 -169
  131. package/dist/features/tester/seed-data/authored/content-discovery__event-detail-subroutes.d.ts +0 -2
  132. package/dist/features/tester/seed-data/authored/content-discovery__event-detail-subroutes.js +0 -209
  133. package/dist/features/tester/seed-data/authored/content-discovery__event-participation.d.ts +0 -2
  134. package/dist/features/tester/seed-data/authored/content-discovery__event-participation.js +0 -207
  135. package/dist/features/tester/seed-data/authored/content-discovery__events.d.ts +0 -2
  136. package/dist/features/tester/seed-data/authored/content-discovery__events.js +0 -377
  137. package/dist/features/tester/seed-data/authored/content-discovery__faq-help.d.ts +0 -2
  138. package/dist/features/tester/seed-data/authored/content-discovery__faq-help.js +0 -87
  139. package/dist/features/tester/seed-data/authored/content-discovery__notifications.d.ts +0 -2
  140. package/dist/features/tester/seed-data/authored/content-discovery__notifications.js +0 -147
  141. package/dist/features/tester/seed-data/authored/content-discovery__overflowing-pill-rows.d.ts +0 -2
  142. package/dist/features/tester/seed-data/authored/content-discovery__overflowing-pill-rows.js +0 -209
  143. package/dist/features/tester/seed-data/authored/content-discovery__parts-database.d.ts +0 -2
  144. package/dist/features/tester/seed-data/authored/content-discovery__parts-database.js +0 -167
  145. package/dist/features/tester/seed-data/authored/content-discovery__price-index-and-compare.d.ts +0 -2
  146. package/dist/features/tester/seed-data/authored/content-discovery__price-index-and-compare.js +0 -73
  147. package/dist/features/tester/seed-data/authored/content-discovery__search.d.ts +0 -2
  148. package/dist/features/tester/seed-data/authored/content-discovery__search.js +0 -363
  149. package/dist/features/tester/seed-data/authored/content-discovery__site-wide-index.d.ts +0 -2
  150. package/dist/features/tester/seed-data/authored/content-discovery__site-wide-index.js +0 -340
  151. package/dist/features/tester/seed-data/authored/content-discovery__store-reviews-aggregate.d.ts +0 -2
  152. package/dist/features/tester/seed-data/authored/content-discovery__store-reviews-aggregate.js +0 -88
  153. package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.d.ts +0 -2
  154. package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +0 -78
  155. package/dist/features/tester/seed-data/authored/cta-layout__dialog-footers.d.ts +0 -2
  156. package/dist/features/tester/seed-data/authored/cta-layout__dialog-footers.js +0 -76
  157. package/dist/features/tester/seed-data/authored/cta-layout__editor-action-bar.d.ts +0 -2
  158. package/dist/features/tester/seed-data/authored/cta-layout__editor-action-bar.js +0 -62
  159. package/dist/features/tester/seed-data/authored/cta-layout__navbar-ctas.d.ts +0 -2
  160. package/dist/features/tester/seed-data/authored/cta-layout__navbar-ctas.js +0 -163
  161. package/dist/features/tester/seed-data/authored/cta-layout__product-bottom-bar.d.ts +0 -2
  162. package/dist/features/tester/seed-data/authored/cta-layout__product-bottom-bar.js +0 -61
  163. package/dist/features/tester/seed-data/authored/design-ux__action-bar-placement.d.ts +0 -2
  164. package/dist/features/tester/seed-data/authored/design-ux__action-bar-placement.js +0 -89
  165. package/dist/features/tester/seed-data/authored/design-ux__back-to-top-button.d.ts +0 -2
  166. package/dist/features/tester/seed-data/authored/design-ux__back-to-top-button.js +0 -95
  167. package/dist/features/tester/seed-data/authored/design-ux__carousel-arrow-bounds.d.ts +0 -2
  168. package/dist/features/tester/seed-data/authored/design-ux__carousel-arrow-bounds.js +0 -191
  169. package/dist/features/tester/seed-data/authored/design-ux__dashboard-layout.d.ts +0 -2
  170. package/dist/features/tester/seed-data/authored/design-ux__dashboard-layout.js +0 -158
  171. package/dist/features/tester/seed-data/authored/design-ux__feature-badge-picker.d.ts +0 -2
  172. package/dist/features/tester/seed-data/authored/design-ux__feature-badge-picker.js +0 -82
  173. package/dist/features/tester/seed-data/authored/design-ux__footer-theme.d.ts +0 -2
  174. package/dist/features/tester/seed-data/authored/design-ux__footer-theme.js +0 -106
  175. package/dist/features/tester/seed-data/authored/design-ux__form-validation-errors.d.ts +0 -2
  176. package/dist/features/tester/seed-data/authored/design-ux__form-validation-errors.js +0 -88
  177. package/dist/features/tester/seed-data/authored/design-ux__general-design.d.ts +0 -2
  178. package/dist/features/tester/seed-data/authored/design-ux__general-design.js +0 -204
  179. package/dist/features/tester/seed-data/authored/design-ux__hand-mode-layout.d.ts +0 -2
  180. package/dist/features/tester/seed-data/authored/design-ux__hand-mode-layout.js +0 -301
  181. package/dist/features/tester/seed-data/authored/design-ux__header-brand-mark-centring.d.ts +0 -2
  182. package/dist/features/tester/seed-data/authored/design-ux__header-brand-mark-centring.js +0 -90
  183. package/dist/features/tester/seed-data/authored/design-ux__header-controls-and-messages.d.ts +0 -2
  184. package/dist/features/tester/seed-data/authored/design-ux__header-controls-and-messages.js +0 -85
  185. package/dist/features/tester/seed-data/authored/design-ux__homepage-carousels.d.ts +0 -2
  186. package/dist/features/tester/seed-data/authored/design-ux__homepage-carousels.js +0 -407
  187. package/dist/features/tester/seed-data/authored/design-ux__nav-reachability.d.ts +0 -2
  188. package/dist/features/tester/seed-data/authored/design-ux__nav-reachability.js +0 -88
  189. package/dist/features/tester/seed-data/authored/design-ux__rich-text-readability.d.ts +0 -2
  190. package/dist/features/tester/seed-data/authored/design-ux__rich-text-readability.js +0 -84
  191. package/dist/features/tester/seed-data/authored/design-ux__status-badge-legibility.d.ts +0 -2
  192. package/dist/features/tester/seed-data/authored/design-ux__status-badge-legibility.js +0 -214
  193. package/dist/features/tester/seed-data/authored/design-ux__sticky-cta-bar.d.ts +0 -2
  194. package/dist/features/tester/seed-data/authored/design-ux__sticky-cta-bar.js +0 -275
  195. package/dist/features/tester/seed-data/authored/index.d.ts +0 -2
  196. package/dist/features/tester/seed-data/authored/index.js +0 -301
  197. package/dist/features/tester/seed-data/authored/page-wiring__data-loss.d.ts +0 -2
  198. package/dist/features/tester/seed-data/authored/page-wiring__data-loss.js +0 -125
  199. package/dist/features/tester/seed-data/authored/page-wiring__detail-pages.d.ts +0 -2
  200. package/dist/features/tester/seed-data/authored/page-wiring__detail-pages.js +0 -85
  201. package/dist/features/tester/seed-data/authored/page-wiring__drawer-pages.d.ts +0 -2
  202. package/dist/features/tester/seed-data/authored/page-wiring__drawer-pages.js +0 -92
  203. package/dist/features/tester/seed-data/authored/page-wiring__reachability.d.ts +0 -2
  204. package/dist/features/tester/seed-data/authored/page-wiring__reachability.js +0 -115
  205. package/dist/features/tester/seed-data/authored/public-pages__auth-error-pages.d.ts +0 -2
  206. package/dist/features/tester/seed-data/authored/public-pages__auth-error-pages.js +0 -137
  207. package/dist/features/tester/seed-data/authored/public-pages__core-listing-pages.d.ts +0 -2
  208. package/dist/features/tester/seed-data/authored/public-pages__core-listing-pages.js +0 -263
  209. package/dist/features/tester/seed-data/authored/public-pages__help-how-it-works.d.ts +0 -2
  210. package/dist/features/tester/seed-data/authored/public-pages__help-how-it-works.js +0 -229
  211. package/dist/features/tester/seed-data/authored/public-pages__help-scams-guides-subpages.d.ts +0 -2
  212. package/dist/features/tester/seed-data/authored/public-pages__help-scams-guides-subpages.js +0 -325
  213. package/dist/features/tester/seed-data/authored/public-pages__legal-policy-pages.d.ts +0 -2
  214. package/dist/features/tester/seed-data/authored/public-pages__legal-policy-pages.js +0 -126
  215. package/dist/features/tester/seed-data/authored/public-pages__newly-wired-browse-indexes.d.ts +0 -2
  216. package/dist/features/tester/seed-data/authored/public-pages__newly-wired-browse-indexes.js +0 -141
  217. package/dist/features/tester/seed-data/authored/public-pages__store-tabs.d.ts +0 -2
  218. package/dist/features/tester/seed-data/authored/public-pages__store-tabs.js +0 -115
  219. package/dist/features/tester/seed-data/authored/public-pages__stores-sellers-directories.d.ts +0 -2
  220. package/dist/features/tester/seed-data/authored/public-pages__stores-sellers-directories.js +0 -253
  221. package/dist/features/tester/seed-data/authored/search-and-nav__employee-permissions.d.ts +0 -2
  222. package/dist/features/tester/seed-data/authored/search-and-nav__employee-permissions.js +0 -93
  223. package/dist/features/tester/seed-data/authored/search-and-nav__header-search.d.ts +0 -3
  224. package/dist/features/tester/seed-data/authored/search-and-nav__header-search.js +0 -185
  225. package/dist/features/tester/seed-data/authored/search-and-nav__settings-deep-links.d.ts +0 -2
  226. package/dist/features/tester/seed-data/authored/search-and-nav__settings-deep-links.js +0 -82
  227. package/dist/features/tester/seed-data/authored/search-and-nav__sidebar-search.d.ts +0 -2
  228. package/dist/features/tester/seed-data/authored/search-and-nav__sidebar-search.js +0 -60
  229. package/dist/features/tester/seed-data/authored/selling__become-seller.d.ts +0 -2
  230. package/dist/features/tester/seed-data/authored/selling__become-seller.js +0 -117
  231. package/dist/features/tester/seed-data/authored/selling__digital-content-delivery.d.ts +0 -2
  232. package/dist/features/tester/seed-data/authored/selling__digital-content-delivery.js +0 -148
  233. package/dist/features/tester/seed-data/authored/selling__final-sale-authoring.d.ts +0 -2
  234. package/dist/features/tester/seed-data/authored/selling__final-sale-authoring.js +0 -108
  235. package/dist/features/tester/seed-data/authored/selling__listing-a-product.d.ts +0 -2
  236. package/dist/features/tester/seed-data/authored/selling__listing-a-product.js +0 -274
  237. package/dist/features/tester/seed-data/authored/selling__listing-edit-roundtrip.d.ts +0 -2
  238. package/dist/features/tester/seed-data/authored/selling__listing-edit-roundtrip.js +0 -145
  239. package/dist/features/tester/seed-data/authored/selling__listing-lifecycle.d.ts +0 -2
  240. package/dist/features/tester/seed-data/authored/selling__listing-lifecycle.js +0 -336
  241. package/dist/features/tester/seed-data/authored/selling__listing-type-fields-roundtrip.d.ts +0 -2
  242. package/dist/features/tester/seed-data/authored/selling__listing-type-fields-roundtrip.js +0 -136
  243. package/dist/features/tester/seed-data/authored/selling__media-limits.d.ts +0 -2
  244. package/dist/features/tester/seed-data/authored/selling__media-limits.js +0 -135
  245. package/dist/features/tester/seed-data/authored/selling__product-upload-details.d.ts +0 -2
  246. package/dist/features/tester/seed-data/authored/selling__product-upload-details.js +0 -155
  247. package/dist/features/tester/seed-data/authored/selling__quick-add-minimum-details.d.ts +0 -2
  248. package/dist/features/tester/seed-data/authored/selling__quick-add-minimum-details.js +0 -138
  249. package/dist/features/tester/seed-data/authored/selling__sectionised-forms.d.ts +0 -2
  250. package/dist/features/tester/seed-data/authored/selling__sectionised-forms.js +0 -191
  251. package/dist/features/tester/seed-data/authored/selling__seller-analytics-payouts.d.ts +0 -2
  252. package/dist/features/tester/seed-data/authored/selling__seller-analytics-payouts.js +0 -138
  253. package/dist/features/tester/seed-data/authored/selling__seller-bids-bundles-filters.d.ts +0 -2
  254. package/dist/features/tester/seed-data/authored/selling__seller-bids-bundles-filters.js +0 -106
  255. package/dist/features/tester/seed-data/authored/selling__seller-catalog-org.d.ts +0 -2
  256. package/dist/features/tester/seed-data/authored/selling__seller-catalog-org.js +0 -192
  257. package/dist/features/tester/seed-data/authored/selling__seller-custom-brands.d.ts +0 -2
  258. package/dist/features/tester/seed-data/authored/selling__seller-custom-brands.js +0 -109
  259. package/dist/features/tester/seed-data/authored/selling__seller-guide.d.ts +0 -2
  260. package/dist/features/tester/seed-data/authored/selling__seller-guide.js +0 -34
  261. package/dist/features/tester/seed-data/authored/selling__seller-listing-types.d.ts +0 -2
  262. package/dist/features/tester/seed-data/authored/selling__seller-listing-types.js +0 -348
  263. package/dist/features/tester/seed-data/authored/selling__seller-marketing-extras.d.ts +0 -2
  264. package/dist/features/tester/seed-data/authored/selling__seller-marketing-extras.js +0 -87
  265. package/dist/features/tester/seed-data/authored/selling__seller-ops-comms.d.ts +0 -2
  266. package/dist/features/tester/seed-data/authored/selling__seller-ops-comms.js +0 -90
  267. package/dist/features/tester/seed-data/authored/selling__seller-orders-at-scale.d.ts +0 -2
  268. package/dist/features/tester/seed-data/authored/selling__seller-orders-at-scale.js +0 -85
  269. package/dist/features/tester/seed-data/authored/selling__seller-orders.d.ts +0 -2
  270. package/dist/features/tester/seed-data/authored/selling__seller-orders.js +0 -213
  271. package/dist/features/tester/seed-data/authored/selling__seller-shipping-payouts-setup.d.ts +0 -2
  272. package/dist/features/tester/seed-data/authored/selling__seller-shipping-payouts-setup.js +0 -192
  273. package/dist/features/tester/seed-data/authored/selling__spares-and-group-editing.d.ts +0 -2
  274. package/dist/features/tester/seed-data/authored/selling__spares-and-group-editing.js +0 -77
  275. package/dist/features/tester/seed-data/authored/selling__store-dashboard-navigation.d.ts +0 -2
  276. package/dist/features/tester/seed-data/authored/selling__store-dashboard-navigation.js +0 -165
  277. package/dist/features/tester/seed-data/authored/selling__store-uncovered-pages.d.ts +0 -2
  278. package/dist/features/tester/seed-data/authored/selling__store-uncovered-pages.js +0 -116
  279. package/dist/features/tester/seed-data/authored/seo__canonical-and-host.d.ts +0 -2
  280. package/dist/features/tester/seed-data/authored/seo__canonical-and-host.js +0 -127
  281. package/dist/features/tester/seed-data/authored/seo__og-images.d.ts +0 -2
  282. package/dist/features/tester/seed-data/authored/seo__og-images.js +0 -107
  283. package/dist/features/tester/seed-data/authored/seo__page-metadata.d.ts +0 -2
  284. package/dist/features/tester/seed-data/authored/seo__page-metadata.js +0 -120
  285. package/dist/features/tester/seed-data/authored/seo__sitemap-and-robots.d.ts +0 -2
  286. package/dist/features/tester/seed-data/authored/seo__sitemap-and-robots.js +0 -105
  287. package/dist/features/tester/seed-data/authored/tools__sticker-promote-to-listings.d.ts +0 -2
  288. package/dist/features/tester/seed-data/authored/tools__sticker-promote-to-listings.js +0 -58
  289. package/dist/features/tester/seed-data/authored/tools__sticker-tracer.d.ts +0 -2
  290. package/dist/features/tester/seed-data/authored/tools__sticker-tracer.js +0 -284
  291. package/dist/features/tester/seed-data/index.d.ts +0 -2
  292. package/dist/features/tester/seed-data/index.js +0 -2
  293. package/dist/features/tester/seed-data/tester-checklist-seed-data.d.ts +0 -2
  294. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +0 -7601
  295. package/dist/features/tester/seed-data/tester-responses-seed-data.d.ts +0 -2
  296. package/dist/features/tester/seed-data/tester-responses-seed-data.js +0 -95
  297. package/dist/features/tester/seed-data/tester-window.d.ts +0 -25
  298. package/dist/features/tester/seed-data/tester-window.js +0 -66
  299. package/dist/seed/_helpers/brand-rows.d.ts +0 -35
  300. package/dist/seed/_helpers/brand-rows.js +0 -600
  301. package/dist/seed/_helpers/category-content-generated.d.ts +0 -24
  302. package/dist/seed/_helpers/category-content-generated.js +0 -1853
  303. package/dist/seed/_helpers/category-content.d.ts +0 -68
  304. package/dist/seed/_helpers/category-content.js +0 -731
  305. package/dist/seed/_helpers/category-forest.d.ts +0 -4
  306. package/dist/seed/_helpers/category-forest.js +0 -824
  307. package/dist/seed/_helpers/category-images-generated.d.ts +0 -57
  308. package/dist/seed/_helpers/category-images-generated.js +0 -618
  309. package/dist/seed/_helpers/category-models/chunk0.d.ts +0 -2
  310. package/dist/seed/_helpers/category-models/chunk0.js +0 -2648
  311. package/dist/seed/_helpers/category-models/chunk1.d.ts +0 -2
  312. package/dist/seed/_helpers/category-models/chunk1.js +0 -2318
  313. package/dist/seed/_helpers/category-models/chunk2.d.ts +0 -2
  314. package/dist/seed/_helpers/category-models/chunk2.js +0 -2560
  315. package/dist/seed/_helpers/category-models/chunk3.d.ts +0 -2
  316. package/dist/seed/_helpers/category-models/chunk3.js +0 -2196
  317. package/dist/seed/_helpers/category-models/chunk4.d.ts +0 -2
  318. package/dist/seed/_helpers/category-models/chunk4.js +0 -1732
  319. package/dist/seed/_helpers/category-models.d.ts +0 -12
  320. package/dist/seed/_helpers/category-models.js +0 -45
  321. package/dist/seed/_helpers/category-names.d.ts +0 -54
  322. package/dist/seed/_helpers/category-names.js +0 -118
  323. package/dist/seed/_helpers/category-parts-glossary-map.d.ts +0 -1
  324. package/dist/seed/_helpers/category-parts-glossary-map.js +0 -2499
  325. package/dist/seed/_helpers/category-parts.d.ts +0 -9
  326. package/dist/seed/_helpers/category-parts.js +0 -15022
  327. package/dist/seed/_helpers/category-tree.d.ts +0 -27
  328. package/dist/seed/_helpers/category-tree.js +0 -119
  329. package/dist/seed/_helpers/character-features.d.ts +0 -10
  330. package/dist/seed/_helpers/character-features.js +0 -120
  331. package/dist/seed/_helpers/final-sale-fixtures.d.ts +0 -35
  332. package/dist/seed/_helpers/final-sale-fixtures.js +0 -61
  333. package/dist/seed/_helpers/franchise-rows.d.ts +0 -43
  334. package/dist/seed/_helpers/franchise-rows.js +0 -189
  335. package/dist/seed/_helpers/media.d.ts +0 -67
  336. package/dist/seed/_helpers/media.js +0 -172
  337. package/dist/seed/_helpers/part-colours-generated.d.ts +0 -18
  338. package/dist/seed/_helpers/part-colours-generated.js +0 -273
  339. package/dist/seed/_helpers/product-search-txt.d.ts +0 -18
  340. package/dist/seed/_helpers/product-search-txt.js +0 -23
  341. package/dist/seed/_helpers/search-txt-wrappers.d.ts +0 -26
  342. package/dist/seed/_helpers/search-txt-wrappers.js +0 -58
  343. package/dist/seed/addresses-seed-data.d.ts +0 -2
  344. package/dist/seed/addresses-seed-data.js +0 -78
  345. package/dist/seed/authenticity-knowledge-seed-data.d.ts +0 -78
  346. package/dist/seed/authenticity-knowledge-seed-data.js +0 -10729
  347. package/dist/seed/bey-products-seed-data.d.ts +0 -18
  348. package/dist/seed/bey-products-seed-data.js +0 -18011
  349. package/dist/seed/beys/chunk0.d.ts +0 -17
  350. package/dist/seed/beys/chunk0.js +0 -36733
  351. package/dist/seed/beys/chunk1.d.ts +0 -17
  352. package/dist/seed/beys/chunk1.js +0 -35728
  353. package/dist/seed/beys/chunk2.d.ts +0 -17
  354. package/dist/seed/beys/chunk2.js +0 -35857
  355. package/dist/seed/beys/chunk3.d.ts +0 -17
  356. package/dist/seed/beys/chunk3.js +0 -34476
  357. package/dist/seed/beys-seed-data.d.ts +0 -18
  358. package/dist/seed/beys-seed-data.js +0 -11
  359. package/dist/seed/bids-seed-data.d.ts +0 -2
  360. package/dist/seed/bids-seed-data.js +0 -206
  361. package/dist/seed/blog-posts-seed-data.d.ts +0 -6
  362. package/dist/seed/blog-posts-seed-data.js +0 -442
  363. package/dist/seed/carousel-slides-seed-data.d.ts +0 -2
  364. package/dist/seed/carousel-slides-seed-data.js +0 -411
  365. package/dist/seed/carousels-seed-data.d.ts +0 -2
  366. package/dist/seed/carousels-seed-data.js +0 -36
  367. package/dist/seed/cart-seed-data.d.ts +0 -2
  368. package/dist/seed/cart-seed-data.js +0 -241
  369. package/dist/seed/catalogue-seed-data.d.ts +0 -2
  370. package/dist/seed/catalogue-seed-data.js +0 -112
  371. package/dist/seed/categories-seed-data.d.ts +0 -3
  372. package/dist/seed/categories-seed-data.js +0 -816
  373. package/dist/seed/claimed-coupons-seed-data.d.ts +0 -2
  374. package/dist/seed/claimed-coupons-seed-data.js +0 -85
  375. package/dist/seed/coupon-usage-seed-data.d.ts +0 -9
  376. package/dist/seed/coupon-usage-seed-data.js +0 -55
  377. package/dist/seed/coupons-seed-data.d.ts +0 -2
  378. package/dist/seed/coupons-seed-data.js +0 -226
  379. package/dist/seed/defaults/categories.d.ts +0 -2
  380. package/dist/seed/defaults/categories.js +0 -12
  381. package/dist/seed/defaults/faqs.d.ts +0 -2
  382. package/dist/seed/defaults/faqs.js +0 -40
  383. package/dist/seed/events-seed-data.d.ts +0 -7
  384. package/dist/seed/events-seed-data.js +0 -482
  385. package/dist/seed/factories/address.factory.d.ts +0 -21
  386. package/dist/seed/factories/address.factory.js +0 -44
  387. package/dist/seed/factories/bid.factory.d.ts +0 -15
  388. package/dist/seed/factories/bid.factory.js +0 -33
  389. package/dist/seed/factories/blog-post.factory.d.ts +0 -15
  390. package/dist/seed/factories/blog-post.factory.js +0 -22
  391. package/dist/seed/factories/carousel.factory.d.ts +0 -11
  392. package/dist/seed/factories/carousel.factory.js +0 -17
  393. package/dist/seed/factories/cart.factory.d.ts +0 -25
  394. package/dist/seed/factories/cart.factory.js +0 -35
  395. package/dist/seed/factories/category.factory.d.ts +0 -11
  396. package/dist/seed/factories/category.factory.js +0 -16
  397. package/dist/seed/factories/coupon.factory.d.ts +0 -21
  398. package/dist/seed/factories/coupon.factory.js +0 -43
  399. package/dist/seed/factories/faq.factory.d.ts +0 -10
  400. package/dist/seed/factories/faq.factory.js +0 -15
  401. package/dist/seed/factories/notification.factory.d.ts +0 -18
  402. package/dist/seed/factories/notification.factory.js +0 -39
  403. package/dist/seed/factories/order.factory.d.ts +0 -20
  404. package/dist/seed/factories/order.factory.js +0 -20
  405. package/dist/seed/factories/payout.factory.d.ts +0 -21
  406. package/dist/seed/factories/payout.factory.js +0 -38
  407. package/dist/seed/factories/product.factory.d.ts +0 -27
  408. package/dist/seed/factories/product.factory.js +0 -80
  409. package/dist/seed/factories/review.factory.d.ts +0 -14
  410. package/dist/seed/factories/review.factory.js +0 -52
  411. package/dist/seed/factories/session.factory.d.ts +0 -15
  412. package/dist/seed/factories/session.factory.js +0 -31
  413. package/dist/seed/factories/store.factory.d.ts +0 -23
  414. package/dist/seed/factories/store.factory.js +0 -47
  415. package/dist/seed/factories/user.factory.d.ts +0 -19
  416. package/dist/seed/factories/user.factory.js +0 -56
  417. package/dist/seed/faq-seed-data.d.ts +0 -18
  418. package/dist/seed/faq-seed-data.js +0 -1956
  419. package/dist/seed/firestore-indexes.d.ts +0 -12
  420. package/dist/seed/firestore-indexes.js +0 -31
  421. package/dist/seed/grouped-listings-seed-data.d.ts +0 -2
  422. package/dist/seed/grouped-listings-seed-data.js +0 -283
  423. package/dist/seed/history-seed-data.d.ts +0 -12
  424. package/dist/seed/history-seed-data.js +0 -70
  425. package/dist/seed/homepage-sections-seed-data.d.ts +0 -2
  426. package/dist/seed/homepage-sections-seed-data.js +0 -1034
  427. package/dist/seed/index.d.ts +0 -100
  428. package/dist/seed/index.js +0 -115
  429. package/dist/seed/lottery-entries-seed-data.d.ts +0 -2
  430. package/dist/seed/lottery-entries-seed-data.js +0 -108
  431. package/dist/seed/manifest.d.ts +0 -16
  432. package/dist/seed/manifest.js +0 -235
  433. package/dist/seed/media-assets-seed-data.d.ts +0 -22
  434. package/dist/seed/media-assets-seed-data.js +0 -5593
  435. package/dist/seed/model-composition-seed-data.d.ts +0 -15
  436. package/dist/seed/model-composition-seed-data.js +0 -9032
  437. package/dist/seed/notifications-seed-data.d.ts +0 -2
  438. package/dist/seed/notifications-seed-data.js +0 -606
  439. package/dist/seed/offers-seed-data.d.ts +0 -2
  440. package/dist/seed/offers-seed-data.js +0 -398
  441. package/dist/seed/orders-seed-data.d.ts +0 -2
  442. package/dist/seed/orders-seed-data.js +0 -845
  443. package/dist/seed/part-glossary/chunk0.d.ts +0 -9
  444. package/dist/seed/part-glossary/chunk0.js +0 -35448
  445. package/dist/seed/part-glossary/chunk1.d.ts +0 -9
  446. package/dist/seed/part-glossary/chunk1.js +0 -40494
  447. package/dist/seed/part-glossary/chunk2.d.ts +0 -9
  448. package/dist/seed/part-glossary/chunk2.js +0 -51242
  449. package/dist/seed/part-glossary/chunk3.d.ts +0 -9
  450. package/dist/seed/part-glossary/chunk3.js +0 -53337
  451. package/dist/seed/part-glossary/chunk4.d.ts +0 -9
  452. package/dist/seed/part-glossary/chunk4.js +0 -51454
  453. package/dist/seed/part-glossary-seed-data.d.ts +0 -15
  454. package/dist/seed/part-glossary-seed-data.js +0 -25
  455. package/dist/seed/payouts-seed-data.d.ts +0 -2
  456. package/dist/seed/payouts-seed-data.js +0 -302
  457. package/dist/seed/product-features-seed-data.d.ts +0 -3
  458. package/dist/seed/product-features-seed-data.js +0 -366
  459. package/dist/seed/products-art-seed-data.d.ts +0 -2
  460. package/dist/seed/products-art-seed-data.js +0 -289
  461. package/dist/seed/products-auctions-seed-data.d.ts +0 -2
  462. package/dist/seed/products-auctions-seed-data.js +0 -475
  463. package/dist/seed/products-beyblade-x-seed-data.d.ts +0 -2
  464. package/dist/seed/products-beyblade-x-seed-data.js +0 -476
  465. package/dist/seed/products-catalogue/chunk0.d.ts +0 -12
  466. package/dist/seed/products-catalogue/chunk0.js +0 -7262
  467. package/dist/seed/products-catalogue/chunk1.d.ts +0 -12
  468. package/dist/seed/products-catalogue/chunk1.js +0 -7290
  469. package/dist/seed/products-catalogue/chunk10.d.ts +0 -12
  470. package/dist/seed/products-catalogue/chunk10.js +0 -7290
  471. package/dist/seed/products-catalogue/chunk11.d.ts +0 -12
  472. package/dist/seed/products-catalogue/chunk11.js +0 -7005
  473. package/dist/seed/products-catalogue/chunk12.d.ts +0 -12
  474. package/dist/seed/products-catalogue/chunk12.js +0 -7002
  475. package/dist/seed/products-catalogue/chunk13.d.ts +0 -12
  476. package/dist/seed/products-catalogue/chunk13.js +0 -7002
  477. package/dist/seed/products-catalogue/chunk14.d.ts +0 -12
  478. package/dist/seed/products-catalogue/chunk14.js +0 -7002
  479. package/dist/seed/products-catalogue/chunk15.d.ts +0 -12
  480. package/dist/seed/products-catalogue/chunk15.js +0 -7002
  481. package/dist/seed/products-catalogue/chunk16.d.ts +0 -12
  482. package/dist/seed/products-catalogue/chunk16.js +0 -7002
  483. package/dist/seed/products-catalogue/chunk17.d.ts +0 -12
  484. package/dist/seed/products-catalogue/chunk17.js +0 -7002
  485. package/dist/seed/products-catalogue/chunk18.d.ts +0 -12
  486. package/dist/seed/products-catalogue/chunk18.js +0 -4398
  487. package/dist/seed/products-catalogue/chunk2.d.ts +0 -12
  488. package/dist/seed/products-catalogue/chunk2.js +0 -7268
  489. package/dist/seed/products-catalogue/chunk3.d.ts +0 -12
  490. package/dist/seed/products-catalogue/chunk3.js +0 -7264
  491. package/dist/seed/products-catalogue/chunk4.d.ts +0 -12
  492. package/dist/seed/products-catalogue/chunk4.js +0 -7268
  493. package/dist/seed/products-catalogue/chunk5.d.ts +0 -12
  494. package/dist/seed/products-catalogue/chunk5.js +0 -7258
  495. package/dist/seed/products-catalogue/chunk6.d.ts +0 -12
  496. package/dist/seed/products-catalogue/chunk6.js +0 -7268
  497. package/dist/seed/products-catalogue/chunk7.d.ts +0 -12
  498. package/dist/seed/products-catalogue/chunk7.js +0 -7311
  499. package/dist/seed/products-catalogue/chunk8.d.ts +0 -12
  500. package/dist/seed/products-catalogue/chunk8.js +0 -7304
  501. package/dist/seed/products-catalogue/chunk9.d.ts +0 -12
  502. package/dist/seed/products-catalogue/chunk9.js +0 -7309
  503. package/dist/seed/products-catalogue-seed-data.d.ts +0 -2
  504. package/dist/seed/products-catalogue-seed-data.js +0 -60
  505. package/dist/seed/products-classifieds-seed-data.d.ts +0 -7
  506. package/dist/seed/products-classifieds-seed-data.js +0 -435
  507. package/dist/seed/products-digital-codes-seed-data.d.ts +0 -7
  508. package/dist/seed/products-digital-codes-seed-data.js +0 -395
  509. package/dist/seed/products-live-items-seed-data.d.ts +0 -7
  510. package/dist/seed/products-live-items-seed-data.js +0 -269
  511. package/dist/seed/products-preorders-seed-data.d.ts +0 -2
  512. package/dist/seed/products-preorders-seed-data.js +0 -360
  513. package/dist/seed/products-prize-draws-seed-data.d.ts +0 -7
  514. package/dist/seed/products-prize-draws-seed-data.js +0 -427
  515. package/dist/seed/products-spares-seed-data.d.ts +0 -2
  516. package/dist/seed/products-spares-seed-data.js +0 -368
  517. package/dist/seed/products-standard-seed-data.d.ts +0 -2
  518. package/dist/seed/products-standard-seed-data.js +0 -632
  519. package/dist/seed/products-stickers-seed-data.d.ts +0 -2
  520. package/dist/seed/products-stickers-seed-data.js +0 -319
  521. package/dist/seed/reviews-seed-data.d.ts +0 -1
  522. package/dist/seed/reviews-seed-data.js +0 -185
  523. package/dist/seed/runner.d.ts +0 -2
  524. package/dist/seed/runner.js +0 -125
  525. package/dist/seed/scammers-seed-data.d.ts +0 -2
  526. package/dist/seed/scammers-seed-data.js +0 -235
  527. package/dist/seed/seed-market-config.d.ts +0 -48
  528. package/dist/seed/seed-market-config.js +0 -199
  529. package/dist/seed/seed-purpose.d.ts +0 -299
  530. package/dist/seed/seed-purpose.js +0 -440
  531. package/dist/seed/sessions-seed-data.d.ts +0 -3
  532. package/dist/seed/sessions-seed-data.js +0 -116
  533. package/dist/seed/shipments-seed-data.d.ts +0 -5
  534. package/dist/seed/shipments-seed-data.js +0 -185
  535. package/dist/seed/site-settings-seed-data.d.ts +0 -2
  536. package/dist/seed/site-settings-seed-data.js +0 -1069
  537. package/dist/seed/store-addresses-seed-data.d.ts +0 -18
  538. package/dist/seed/store-addresses-seed-data.js +0 -71
  539. package/dist/seed/store-extensions-seed-data.d.ts +0 -11
  540. package/dist/seed/store-extensions-seed-data.js +0 -292
  541. package/dist/seed/stores-seed-data.d.ts +0 -6
  542. package/dist/seed/stores-seed-data.js +0 -242
  543. package/dist/seed/support-tickets-seed-data.d.ts +0 -16
  544. package/dist/seed/support-tickets-seed-data.js +0 -239
  545. package/dist/seed/tax-codes-seed-data.d.ts +0 -34
  546. package/dist/seed/tax-codes-seed-data.js +0 -100
  547. package/dist/seed/test-data-ttl.d.ts +0 -29
  548. package/dist/seed/test-data-ttl.js +0 -31
  549. package/dist/seed/test-utils.d.ts +0 -49
  550. package/dist/seed/test-utils.js +0 -110
  551. package/dist/seed/types.d.ts +0 -89
  552. package/dist/seed/types.js +0 -15
  553. package/dist/seed/users-seed-data.d.ts +0 -2
  554. package/dist/seed/users-seed-data.js +0 -597
  555. package/dist/seed/wishlists-seed-data.d.ts +0 -12
  556. package/dist/seed/wishlists-seed-data.js +0 -54
@@ -1,16 +0,0 @@
1
- import type { SupportTicketPlain } from "../features/support/schemas/firestore";
2
- /**
3
- * Derive `searchTxt` for every record from its own subject.
4
- *
5
- * The seed writes documents raw via `batch.set()` — both `seed/runner.ts` and
6
- * `seed-cli.mjs` — bypassing the repository, which is the only thing that
7
- * builds tokens. Without this every seeded ticket would have no `searchTxt` at
8
- * all and `array-contains` would match zero documents, for every query,
9
- * forever. That is exactly how FAQ search was found broken.
10
- *
11
- * Computed with the SAME `buildSearchTxt` over the SAME field the repository
12
- * uses, so a seeded ticket and a user-created one are byte-identical. Pure
13
- * function of the record's own content, so it stays deterministic and does not
14
- * reintroduce the `appkit-seed` idempotency problem of Root Cause #25.
15
- */
16
- export declare const supportTicketsSeedData: Partial<SupportTicketPlain>[];
@@ -1,239 +0,0 @@
1
- /*
2
- * WHY: Seeds support tickets for the Beyblade marketplace — 8 tickets across all statuses.
3
- * WHAT: open (2), in_progress (2), waiting_on_user (1), resolved (2), closed (1).
4
- *
5
- * EXPORTS:
6
- * supportTicketsSeedData — Array of Partial<SupportTicketPlain> for seed runner
7
- *
8
- * @tag domain:support
9
- * @tag layer:seed
10
- * @tag pattern:none
11
- * @tag access:server-only
12
- * @tag consumers:seed/index.ts,seed/runner.ts
13
- * @tag sideEffects:none
14
- */
15
- import { SUPPORT_TICKET_FIELDS } from "../constants/field-names.js";
16
- import { buildSearchTxt } from "../utils/search-txt.js";
17
- function msg(id, authorId, authorRole, body, daysAgo) {
18
- const createdAt = new Date(Date.now() - daysAgo * 24 * 60 * 60 * 1000);
19
- return { id, authorId, authorRole, body, createdAt };
20
- }
21
- const BASE = Date.now();
22
- function daysBack(n) {
23
- return new Date(BASE - n * 24 * 60 * 60 * 1000);
24
- }
25
- /**
26
- * A timeline entry for the W18 `statusHistory` fixtures.
27
- *
28
- * `actorUid` only, never a name — `withHistory` scrubs
29
- * SUPPORT_TICKET_PII_FIELDS (which includes `assignedToName`) from real
30
- * writes, so a fixture carrying one would be the single place that is untrue.
31
- */
32
- function entry(at, actorRole, trigger, changes, extra) {
33
- return { at, actorRole, trigger, changes, ...extra };
34
- }
35
- const supportTicketRecords = [
36
- // ── 1. Order issue — in progress ─────────────────────────────────────────
37
- {
38
- id: "ticket-yugi-order-001",
39
- userId: "user-yugi-muto",
40
- userEmail: "rehan.sheikh@example.com",
41
- userDisplayName: "Mock User 3",
42
- category: "order_issue",
43
- subject: "Order delivered but item is missing from the box",
44
- description: "I received order #order-1-20260515-abc123 but the Beyblade Original Dranzer S was not inside — only the outer packaging and bubble wrap were present. Please help.",
45
- orderId: "order-1-20260515-abc123",
46
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.IN_PROGRESS,
47
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.HIGH,
48
- assignedTo: "user-admin-letitrip",
49
- assignedToName: "Mock User 1",
50
- messages: [
51
- msg("msg-yugi-001-u1", "user-yugi-muto", "user", "I received my order but the beyblade was missing! The seal was broken on arrival.", 5),
52
- msg("msg-yugi-001-s1", "user-admin-letitrip", "support", "Hi Rehan, we're sorry to hear this. I've raised a claim with the courier. Could you please share a photo of the packaging?", 4),
53
- msg("msg-yugi-001-u2", "user-yugi-muto", "user", "Photos attached. The outer tape was clearly cut and resealed.", 3),
54
- ],
55
- createdAt: daysBack(5),
56
- updatedAt: daysBack(3),
57
- },
58
- // ── 2. Open ticket — refund request ───────────────────────────────────────
59
- {
60
- id: "ticket-yugi-refund-001",
61
- userId: "user-yugi-muto",
62
- userEmail: "rehan.sheikh@example.com",
63
- userDisplayName: "Mock User 3",
64
- category: "refund_request",
65
- subject: "Requesting refund for cancelled pre-order",
66
- description: "I placed a pre-order for the Beyblade X BX-08 wave 3 months ago. The store has now closed. I would like a full refund of ₹899.",
67
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.OPEN,
68
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.NORMAL,
69
- messages: [
70
- msg("msg-yugi-002-u1", "user-yugi-muto", "user", "The store closed without shipping. I paid via Razorpay. Transaction ID: pay_test_abc123.", 2),
71
- ],
72
- createdAt: daysBack(2),
73
- updatedAt: daysBack(2),
74
- },
75
- // ── 3. Waiting on user — account recovery ─────────────────────────────────
76
- {
77
- id: "ticket-kaiba-account-001",
78
- userId: "user-seto-kaiba",
79
- userEmail: "vivaan.kapoor@example.com",
80
- userDisplayName: "Mock User 2",
81
- category: "account",
82
- subject: "Cannot log in — OTP not arriving on new phone number",
83
- description: "I changed my phone number and now OTP for login is going to the old number. I cannot access my account.",
84
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.WAITING_ON_USER,
85
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.NORMAL,
86
- assignedTo: "user-admin-letitrip",
87
- assignedToName: "Mock User 1",
88
- messages: [
89
- msg("msg-kaiba-001-u1", "user-seto-kaiba", "user", "I'm locked out. My old number is no longer active.", 7),
90
- msg("msg-kaiba-001-s1", "user-admin-letitrip", "support", "Hi Vivaan, to verify ownership we need your registered email and last 4 digits of the payment card used on this account. Please reply here.", 6),
91
- ],
92
- createdAt: daysBack(7),
93
- updatedAt: daysBack(6),
94
- },
95
- // ── 4. Resolved — listing dispute ─────────────────────────────────────────
96
- {
97
- id: "ticket-yugi-dispute-001",
98
- userId: "user-yugi-muto",
99
- userEmail: "rehan.sheikh@example.com",
100
- userDisplayName: "Mock User 3",
101
- category: "listing_dispute",
102
- subject: "Product description says mint but tip is heavily worn",
103
- description: "The Beyblade Metal Storm Pegasus I received has a rounded, sanded-down tip and scratches on the layer. The listing said mint condition. I want to return it.",
104
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.RESOLVED,
105
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.NORMAL,
106
- assignedTo: "user-admin-letitrip",
107
- assignedToName: "Mock User 1",
108
- messages: [
109
- msg("msg-yugi-003-u1", "user-yugi-muto", "user", "The tip is clearly not mint. Here are photos showing the wear and scratches.", 12),
110
- msg("msg-yugi-003-s1", "user-admin-letitrip", "support", "Thank you for the photos Rehan. We've contacted the seller and initiated a return + full refund.", 11),
111
- msg("msg-yugi-003-s2", "user-admin-letitrip", "support", "Refund of ₹2,499 has been processed back to your original payment method. This ticket is now resolved.", 8),
112
- ],
113
- resolvedAt: daysBack(8),
114
- /*
115
- * open -> in_progress -> resolved, with the assignment in between.
116
- *
117
- * `resolvedAt` above was ALREADY in this fixture, and no code path had
118
- * ever written it (verified 2026-08-26) — the seed described a shape the
119
- * application could not produce. The repository stamps it on the
120
- * transition now, so this fixture and reality finally agree.
121
- */
122
- statusHistory: [
123
- entry(daysBack(12), "buyer", "createTicket", {
124
- status: { from: null, to: "open" },
125
- }, { actorUid: "user-yugi-muto" }),
126
- entry(daysBack(11), "admin", "assignTicket", {
127
- assignedTo: { from: null, to: "user-admin-letitrip" },
128
- status: { from: "open", to: "in_progress" },
129
- }, { actorUid: "user-admin-letitrip" }),
130
- entry(daysBack(8), "admin", "adminUpdateTicket", {
131
- status: { from: "in_progress", to: "resolved" },
132
- resolvedAt: { from: null, to: "2026-08-18T00:00:00.000Z" },
133
- }, {
134
- actorUid: "user-admin-letitrip",
135
- reason: "Return accepted and refund processed.",
136
- }),
137
- ],
138
- createdAt: daysBack(12),
139
- updatedAt: daysBack(8),
140
- },
141
- // ── 5. Closed — auction dispute (terminal) ────────────────────────────────
142
- {
143
- id: "ticket-yugi-auction-001",
144
- userId: "user-yugi-muto",
145
- userEmail: "rehan.sheikh@example.com",
146
- userDisplayName: "Mock User 3",
147
- category: "auction_dispute",
148
- subject: "Winning bid was removed from Dragoon Storm auction",
149
- description: "I won the Beyblade Original Dragoon Storm auction but my winning bid was removed without explanation.",
150
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.CLOSED,
151
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.LOW,
152
- messages: [
153
- msg("msg-yugi-004-u1", "user-yugi-muto", "user", "My winning bid was cancelled. I have a screenshot.", 20),
154
- msg("msg-yugi-004-s1", "user-admin-letitrip", "support", "Hi Rehan, after reviewing the auction logs we found a duplicate bid was submitted. The correct winning bid remains active. No action needed.", 18),
155
- msg("msg-yugi-004-u2", "user-yugi-muto", "user", "Understood, thanks for clarifying.", 17),
156
- ],
157
- closedAt: daysBack(17),
158
- createdAt: daysBack(20),
159
- updatedAt: daysBack(17),
160
- },
161
- // ── 6. Open — general inquiry ─────────────────────────────────────────────
162
- {
163
- id: "ticket-kaiba-general-001",
164
- userId: "user-seto-kaiba",
165
- userEmail: "vivaan.kapoor@example.com",
166
- userDisplayName: "Mock User 2",
167
- category: "general",
168
- subject: "How do I list a sealed limited-edition beyblade?",
169
- description: "I want to list my sealed limited-edition Metal Lightning L-Drago with the authenticity certificate visible and verified. What are the steps?",
170
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.OPEN,
171
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.LOW,
172
- messages: [
173
- msg("msg-kaiba-002-u1", "user-seto-kaiba", "user", "I've read the FAQ but couldn't find the exact authenticity verification requirements for sealed pieces.", 1),
174
- ],
175
- createdAt: daysBack(1),
176
- updatedAt: daysBack(1),
177
- },
178
- // ── 7. Resolved — escalated fraud report (admin handled) ──────────────────
179
- {
180
- id: "ticket-yugi-fraud-001",
181
- userId: "user-yugi-muto",
182
- userEmail: "rehan.sheikh@example.com",
183
- userDisplayName: "Mock User 3",
184
- category: "scam_report",
185
- subject: "Seller sent empty box and is now unreachable",
186
- description: "I paid ₹2,999 for a Beyblade Burst Regalia Genesis via Razorpay. The seller has not responded in 7 days and the tracking shows the box was 40g — way too light for a sealed spinner.",
187
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.RESOLVED,
188
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.HIGH,
189
- assignedTo: "user-admin-letitrip",
190
- assignedToName: "Mock User 1",
191
- messages: [
192
- msg("msg-yugi-005-u1", "user-yugi-muto", "user", "I have the weight receipt from Delhivery. 40g is impossible for a sealed beyblade. The seller is not replying on messages or phone.", 10),
193
- msg("msg-yugi-005-s1", "user-admin-letitrip", "support", "Hi Rehan, I have escalated this to our admin team for review as it qualifies as a potential fraud case. You will hear back within 24 hours.", 9),
194
- msg("msg-yugi-005-a1", "user-admin-letitrip", "support", "Hi Rehan, this is the LetItRip admin. I have reviewed the shipment weight log and the seller communication history. We are initiating a full refund of ₹2,999 under our buyer protection policy. The seller account has been suspended pending investigation.", 8),
195
- msg("msg-yugi-005-u2", "user-yugi-muto", "user", "Thank you so much. I really appreciate the quick escalation.", 7),
196
- ],
197
- resolvedAt: daysBack(7),
198
- createdAt: daysBack(10),
199
- updatedAt: daysBack(7),
200
- },
201
- // ── 8. In-progress — seller store suspension appeal (admin handling) ──────
202
- {
203
- id: "ticket-kaiba-ban-appeal-001",
204
- userId: "user-seto-kaiba",
205
- userEmail: "vivaan.kapoor@example.com",
206
- userDisplayName: "Mock User 2",
207
- category: "account",
208
- subject: "My account was flagged — I believe it was a mistake",
209
- description: "My account was flagged 2 days ago. I received no email explanation. I have never violated any policy. Please review.",
210
- status: SUPPORT_TICKET_FIELDS.STATUS_VALUES.IN_PROGRESS,
211
- priority: SUPPORT_TICKET_FIELDS.PRIORITY_VALUES.HIGH,
212
- assignedTo: "user-admin-letitrip",
213
- assignedToName: "Mock User 1",
214
- messages: [
215
- msg("msg-kaiba-003-u1", "user-seto-kaiba", "user", "I'm a legitimate buyer. I have a clean order history and never had a single complaint. Please explain the flag.", 2),
216
- msg("msg-kaiba-003-a1", "user-admin-letitrip", "support", "Hi Vivaan, your account was flagged as part of an automatic fraud check triggered by an unusual login pattern. I am manually reviewing your account history. Please share the last 4 digits of the card used for your most recent Razorpay payment for verification.", 1),
217
- ],
218
- createdAt: daysBack(2),
219
- updatedAt: daysBack(1),
220
- },
221
- ];
222
- /**
223
- * Derive `searchTxt` for every record from its own subject.
224
- *
225
- * The seed writes documents raw via `batch.set()` — both `seed/runner.ts` and
226
- * `seed-cli.mjs` — bypassing the repository, which is the only thing that
227
- * builds tokens. Without this every seeded ticket would have no `searchTxt` at
228
- * all and `array-contains` would match zero documents, for every query,
229
- * forever. That is exactly how FAQ search was found broken.
230
- *
231
- * Computed with the SAME `buildSearchTxt` over the SAME field the repository
232
- * uses, so a seeded ticket and a user-created one are byte-identical. Pure
233
- * function of the record's own content, so it stays deterministic and does not
234
- * reintroduce the `appkit-seed` idempotency problem of Root Cause #25.
235
- */
236
- export const supportTicketsSeedData = supportTicketRecords.map((ticket) => ({
237
- ...ticket,
238
- searchTxt: ticket.subject ? buildSearchTxt([ticket.subject]) : [],
239
- }));
@@ -1,34 +0,0 @@
1
- /**
2
- * Tax Codes Seed Data
3
- *
4
- * The HSN codes this catalogue actually needs, and nothing speculative.
5
- *
6
- * ## 🛑 Only chapter 9503 is VERIFIED
7
- *
8
- * The four 9503 rates below were confirmed against the current schedule. The
9
- * chapters for printed matter (4911) and playing cards (9504) are correct
10
- * chapters for merchandise we sell, and their RATES ARE NOT CONFIRMED — the
11
- * toys rates themselves moved in the 2025 revision. They are deliberately NOT
12
- * seeded: a wrong HSN on a real invoice is worse than an absent one, and an
13
- * absent code leaves `gstRate` undefined, which every reader already handles.
14
- *
15
- * Add them as a one-line seed change once someone has checked the schedule.
16
- *
17
- * ## The 18% row is load-bearing
18
- *
19
- * `tax-hsn-95030010` exists so the catalogue has at least one rate that is not
20
- * 5%. Without it a 5%-only dataset cannot distinguish "the rate is being
21
- * applied" from "the rate is hardcoded", and the B6 gate — the Tax row
22
- * rendering on a real order for the first time — would pass either way.
23
- *
24
- * ## The 0% row is an EXEMPTION, not a missing value
25
- *
26
- * `tax-exempt-0` carries no HSN, which is legal only at rate 0 (enforced in
27
- * both the form schema and the repository). It covers the live
28
- * plants/animals listings. `gstRate: 0` and `gstRate: undefined` mean
29
- * different things throughout — see the field's own comment.
30
- *
31
- * id === slug, prefix: tax-
32
- */
33
- import type { TaxCodeDocument } from "../features/tax-codes/schemas/firestore";
34
- export declare const taxCodesSeedData: TaxCodeDocument[];
@@ -1,100 +0,0 @@
1
- /**
2
- * Tax Codes Seed Data
3
- *
4
- * The HSN codes this catalogue actually needs, and nothing speculative.
5
- *
6
- * ## 🛑 Only chapter 9503 is VERIFIED
7
- *
8
- * The four 9503 rates below were confirmed against the current schedule. The
9
- * chapters for printed matter (4911) and playing cards (9504) are correct
10
- * chapters for merchandise we sell, and their RATES ARE NOT CONFIRMED — the
11
- * toys rates themselves moved in the 2025 revision. They are deliberately NOT
12
- * seeded: a wrong HSN on a real invoice is worse than an absent one, and an
13
- * absent code leaves `gstRate` undefined, which every reader already handles.
14
- *
15
- * Add them as a one-line seed change once someone has checked the schedule.
16
- *
17
- * ## The 18% row is load-bearing
18
- *
19
- * `tax-hsn-95030010` exists so the catalogue has at least one rate that is not
20
- * 5%. Without it a 5%-only dataset cannot distinguish "the rate is being
21
- * applied" from "the rate is hardcoded", and the B6 gate — the Tax row
22
- * rendering on a real order for the first time — would pass either way.
23
- *
24
- * ## The 0% row is an EXEMPTION, not a missing value
25
- *
26
- * `tax-exempt-0` carries no HSN, which is legal only at rate 0 (enforced in
27
- * both the form schema and the repository). It covers the live
28
- * plants/animals listings. `gstRate: 0` and `gstRate: undefined` mean
29
- * different things throughout — see the field's own comment.
30
- *
31
- * id === slug, prefix: tax-
32
- */
33
- /*
34
- * A FIXED date, not `Date.now()`. Seed files are re-imported on every
35
- * `appkit-seed` invocation, so a moving timestamp makes `load` non-idempotent
36
- * and `status`/`delete` unable to see what a prior run wrote — Root Cause #25.
37
- */
38
- const SEEDED_AT = new Date("2026-10-10T00:00:00.000Z");
39
- export const taxCodesSeedData = [
40
- {
41
- id: "tax-hsn-95030020",
42
- hsnCode: "95030020",
43
- label: "Toys, non-electronic incl. spinning tops (HSN 9503 0020) — 5%",
44
- description: "The default for this catalogue: every Beyblade, part, launcher and stadium.",
45
- gstRate: 5,
46
- chapter: "9503",
47
- isActive: true,
48
- notes: "Verified against the current GST schedule. Spinning tops are named explicitly in this sub-heading, which is why it is the default rather than 9503 0099.",
49
- createdAt: SEEDED_AT,
50
- updatedAt: SEEDED_AT,
51
- },
52
- {
53
- id: "tax-hsn-95030099",
54
- hsnCode: "95030099",
55
- label: "Other toys (HSN 9503 0099) — 5%",
56
- description: "Toys and collectibles that are not spinning tops and not electronic — figures, model kits, diecast.",
57
- gstRate: 5,
58
- chapter: "9503",
59
- isActive: true,
60
- notes: "Verified. The catch-all within chapter 9503 for non-electronic toys.",
61
- createdAt: SEEDED_AT,
62
- updatedAt: SEEDED_AT,
63
- },
64
- {
65
- id: "tax-hsn-95030010",
66
- hsnCode: "95030010",
67
- label: "Electronic toys (HSN 9503 0010) — 18%",
68
- description: "Toys whose function depends on electronics — anything battery-driven or with a screen.",
69
- gstRate: 18,
70
- chapter: "9503",
71
- isActive: true,
72
- notes: "Verified. 🛑 Keep at least one product on this code: it is the only row that proves the 18% branch is applied rather than a 5% rate being hardcoded.",
73
- createdAt: SEEDED_AT,
74
- updatedAt: SEEDED_AT,
75
- },
76
- {
77
- id: "tax-hsn-95030091",
78
- hsnCode: "95030091",
79
- label: "Parts of electronic toys (HSN 9503 0091) — 18%",
80
- description: "Components and spares for electronic toys.",
81
- gstRate: 18,
82
- chapter: "9503",
83
- isActive: true,
84
- notes: "Verified. Follows the parent heading's rate.",
85
- createdAt: SEEDED_AT,
86
- updatedAt: SEEDED_AT,
87
- },
88
- {
89
- id: "tax-exempt-0",
90
- hsnCode: "",
91
- label: "Exempt — 0% (no HSN)",
92
- description: "Live plants and live animals. An exemption, deliberately recorded rather than left unset.",
93
- gstRate: 0,
94
- chapter: "exempt",
95
- isActive: true,
96
- notes: "🛑 Rate 0 is a DECISION; `gstRate: undefined` is 'nobody has said'. Every reader tests `== null` rather than falsiness precisely so this row survives a default being applied elsewhere.",
97
- createdAt: SEEDED_AT,
98
- updatedAt: SEEDED_AT,
99
- },
100
- ];
@@ -1,29 +0,0 @@
1
- /**
2
- * The TTL stamp every disposable test fixture must carry.
3
- *
4
- * 🛑 `isTestData: true` WITHOUT `testDataExpiresAt` means PERMANENT — nothing
5
- * ever reclaims it (see `jobs/handlers/_helpers.ts`, which documents the same
6
- * rule from the sweep's side). That is not a theoretical hazard: until
7
- * 2026-10-10 the only two `isTestData` rows in the whole seed,
8
- * `product-tester-crossstore-a` / `-b`, were in exactly that state — live in
9
- * the public catalogue of 72 products, never purged, and one of them was
10
- * `store-letitrip-official`'s ONLY buyable standard product, so it was hidden
11
- * from every real buyer by `hidePublicTestData` while being the only thing
12
- * that store had to sell. Both are deleted.
13
- *
14
- * And the reason they were permanent is that **this module had zero callers**.
15
- * The helper that enforces the rule existed, was documented as the rule that
16
- * matters most, and no fixture used it. So: a fixture's three obligations are
17
- * an id containing `-test-`, `isTestData: true`, and an expiry FROM HERE.
18
- *
19
- * Recomputed fresh on every seed run (seed files are re-imported per
20
- * invocation), so re-seeding naturally refreshes the expiry rather than
21
- * leaving a fixture that expired between runs.
22
- *
23
- * 🛑 Do NOT re-declare the day count elsewhere. It used to be declared twice —
24
- * here and in `jobs/handlers/messages.ts` — with a comment as the only thing
25
- * keeping them equal, which is the drift shape Root Cause #42 describes.
26
- * `messages.ts` now re-exports this one.
27
- */
28
- export declare const TEST_DATA_TTL_DAYS = 7;
29
- export declare function testDataExpiresAt(): Date;
@@ -1,31 +0,0 @@
1
- /**
2
- * The TTL stamp every disposable test fixture must carry.
3
- *
4
- * 🛑 `isTestData: true` WITHOUT `testDataExpiresAt` means PERMANENT — nothing
5
- * ever reclaims it (see `jobs/handlers/_helpers.ts`, which documents the same
6
- * rule from the sweep's side). That is not a theoretical hazard: until
7
- * 2026-10-10 the only two `isTestData` rows in the whole seed,
8
- * `product-tester-crossstore-a` / `-b`, were in exactly that state — live in
9
- * the public catalogue of 72 products, never purged, and one of them was
10
- * `store-letitrip-official`'s ONLY buyable standard product, so it was hidden
11
- * from every real buyer by `hidePublicTestData` while being the only thing
12
- * that store had to sell. Both are deleted.
13
- *
14
- * And the reason they were permanent is that **this module had zero callers**.
15
- * The helper that enforces the rule existed, was documented as the rule that
16
- * matters most, and no fixture used it. So: a fixture's three obligations are
17
- * an id containing `-test-`, `isTestData: true`, and an expiry FROM HERE.
18
- *
19
- * Recomputed fresh on every seed run (seed files are re-imported per
20
- * invocation), so re-seeding naturally refreshes the expiry rather than
21
- * leaving a fixture that expired between runs.
22
- *
23
- * 🛑 Do NOT re-declare the day count elsewhere. It used to be declared twice —
24
- * here and in `jobs/handlers/messages.ts` — with a comment as the only thing
25
- * keeping them equal, which is the drift shape Root Cause #42 describes.
26
- * `messages.ts` now re-exports this one.
27
- */
28
- export const TEST_DATA_TTL_DAYS = 7;
29
- export function testDataExpiresAt() {
30
- return new Date(Date.now() + TEST_DATA_TTL_DAYS * 24 * 60 * 60 * 1000);
31
- }
@@ -1,49 +0,0 @@
1
- import type { JsonValue } from "@mohasinac/appkit";
2
- import type { SeedBaseUserDocument } from "./factories/user.factory";
3
- import type { SeedBaseProductDocument } from "./factories/product.factory";
4
- import type { SeedBaseStoreDocument } from "./factories/store.factory";
5
- import type { SeedBaseOrderDocument } from "./factories/order.factory";
6
- import type { SeedCategoryDocument } from "./factories/category.factory";
7
- import type { SeedFaqDocument } from "./factories/faq.factory";
8
- /**
9
- * Assert that every `piiField` in `doc` is encrypted and can be decrypted
10
- * back to the original plaintext.
11
- *
12
- * Throws a descriptive error on any violation — use in tests.
13
- *
14
- * @example
15
- * ```ts
16
- * const user = makeFullUser({ email: "test@example.com", phone: "+919876543210" });
17
- * await assertPiiRoundTrip(user, ["email", "phone"]);
18
- * ```
19
- */
20
- export declare function assertPiiRoundTrip<T extends Record<string, JsonValue>>(doc: T, piiFields: Array<keyof T & string>): Promise<void>;
21
- export interface TestSeedHandles {
22
- users: SeedBaseUserDocument[];
23
- products: SeedBaseProductDocument[];
24
- stores: SeedBaseStoreDocument[];
25
- orders: SeedBaseOrderDocument[];
26
- categories: SeedCategoryDocument[];
27
- faqs: SeedFaqDocument[];
28
- }
29
- /**
30
- * Seed the Firestore emulator with a predictable, minimal dataset.
31
- *
32
- * Uses the `FIRESTORE_EMULATOR_PROJECT_ID` env var (default: "demo-test").
33
- * Requires the emulator to be running before calling this.
34
- *
35
- * @example
36
- * ```ts
37
- * // jest.setup.ts
38
- * beforeAll(async () => {
39
- * const handles = await seedForTest();
40
- * globalThis.__testUsers = handles.users;
41
- * });
42
- * ```
43
- */
44
- export declare function seedForTest(overrides?: Partial<{
45
- users: SeedBaseUserDocument[];
46
- products: SeedBaseProductDocument[];
47
- stores: SeedBaseStoreDocument[];
48
- orders: SeedBaseOrderDocument[];
49
- }>): Promise<TestSeedHandles>;
@@ -1,110 +0,0 @@
1
- import { runSeed } from "./runner.js";
2
- import { encryptPiiFields, decryptPiiFields, ENC_PREFIX } from "../security/pii-encrypt.js";
3
- import { hasEncPrefix } from "../security/pii-mask.js";
4
- import { DEFAULT_CATEGORIES } from "./defaults/categories.js";
5
- import { DEFAULT_FAQS } from "./defaults/faqs.js";
6
- import { makeProduct } from "./factories/product.factory.js";
7
- import { USER_FIXTURES } from "./factories/user.factory.js";
8
- import { makeStore } from "./factories/store.factory.js";
9
- // ---------------------------------------------------------------------------
10
- // PII round-trip assertion
11
- // ---------------------------------------------------------------------------
12
- /**
13
- * Assert that every `piiField` in `doc` is encrypted and can be decrypted
14
- * back to the original plaintext.
15
- *
16
- * Throws a descriptive error on any violation — use in tests.
17
- *
18
- * @example
19
- * ```ts
20
- * const user = makeFullUser({ email: "test@example.com", phone: "+919876543210" });
21
- * await assertPiiRoundTrip(user, ["email", "phone"]);
22
- * ```
23
- */
24
- export async function assertPiiRoundTrip(doc, piiFields) {
25
- const encrypted = encryptPiiFields(doc, piiFields);
26
- for (const field of piiFields) {
27
- const val = encrypted[field];
28
- // `hasEncPrefix`, not a bare startsWith: the assertion is "this is not
29
- // cleartext", which both crypto formats satisfy. And the value NEVER goes
30
- // in the message — this helper runs over real fixture PII.
31
- if (!hasEncPrefix(val)) {
32
- throw new Error(`assertPiiRoundTrip: field "${String(field)}" was NOT encrypted (got ${val.length} chars, no ${ENC_PREFIX} prefix).`);
33
- }
34
- // Verify blind index was written
35
- const indexKey = `${String(field)}Index`;
36
- if (!encrypted[indexKey]) {
37
- throw new Error(`assertPiiRoundTrip: blind index "${indexKey}" is missing after encryption.`);
38
- }
39
- }
40
- const decrypted = decryptPiiFields(encrypted, piiFields);
41
- for (const field of piiFields) {
42
- if (decrypted[field] !== doc[field]) {
43
- throw new Error(`assertPiiRoundTrip: field "${String(field)}" round-trip mismatch. ` +
44
- `Expected "${String(doc[field])}", got "${String(decrypted[field])}"`);
45
- }
46
- }
47
- }
48
- /**
49
- * Seed the Firestore emulator with a predictable, minimal dataset.
50
- *
51
- * Uses the `FIRESTORE_EMULATOR_PROJECT_ID` env var (default: "demo-test").
52
- * Requires the emulator to be running before calling this.
53
- *
54
- * @example
55
- * ```ts
56
- * // jest.setup.ts
57
- * beforeAll(async () => {
58
- * const handles = await seedForTest();
59
- * globalThis.__testUsers = handles.users;
60
- * });
61
- * ```
62
- */
63
- export async function seedForTest(overrides) {
64
- const users = overrides?.users ?? Object.values(USER_FIXTURES);
65
- const products = overrides?.products ??
66
- Array.from({ length: 5 }, (_, i) => makeProduct({ id: `p-${i + 1}` }));
67
- const stores = overrides?.stores ?? [makeStore({ id: "store-1" })];
68
- const orders = overrides?.orders ?? [];
69
- const seedConfig = {
70
- projectId: process.env["FIRESTORE_EMULATOR_PROJECT_ID"] ?? "demo-test",
71
- collections: [
72
- {
73
- collection: "users",
74
- data: users,
75
- idField: "uid",
76
- piiFields: ["email"],
77
- },
78
- {
79
- collection: "products",
80
- data: products,
81
- },
82
- {
83
- collection: "stores",
84
- data: stores,
85
- piiFields: ["ownerEmail"],
86
- },
87
- {
88
- collection: "orders",
89
- data: orders,
90
- },
91
- {
92
- collection: "categories",
93
- data: DEFAULT_CATEGORIES,
94
- },
95
- {
96
- collection: "faqs",
97
- data: DEFAULT_FAQS,
98
- },
99
- ],
100
- };
101
- await runSeed(seedConfig);
102
- return {
103
- users,
104
- products,
105
- stores,
106
- orders,
107
- categories: DEFAULT_CATEGORIES,
108
- faqs: DEFAULT_FAQS,
109
- };
110
- }