@mohasinac/appkit 2.7.10 → 2.7.12

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 (148) hide show
  1. package/dist/_internal/server/jobs/core/assignSpinPrize.js +8 -7
  2. package/dist/_internal/server/jobs/core/bundleStockSync.js +11 -6
  3. package/dist/_internal/server/jobs/core/countersReconcile.js +3 -2
  4. package/dist/_internal/server/jobs/core/onProductStockChange.js +12 -7
  5. package/dist/_internal/server/jobs/core/onProductWrite.js +3 -2
  6. package/dist/_internal/server/jobs/core/prizeRevealClose.js +7 -5
  7. package/dist/_internal/server/jobs/core/prizeRevealExpiry.js +11 -6
  8. package/dist/_internal/server/jobs/core/prizeRevealOpen.js +13 -7
  9. package/dist/_internal/server/jobs/core/prizeRevealReminder.js +9 -4
  10. package/dist/_internal/server/jobs/core/triggerEventRaffle.js +3 -2
  11. package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
  12. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
  13. package/dist/_internal/shared/features/events/schema.d.ts +4 -4
  14. package/dist/_internal/shared/features/products/schema.d.ts +20 -20
  15. package/dist/_internal/shared/features/promotions/schema.d.ts +2 -2
  16. package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
  17. package/dist/configs/next.js +17 -1
  18. package/dist/constants/field-names.d.ts +813 -0
  19. package/dist/constants/field-names.js +918 -0
  20. package/dist/constants/sort.d.ts +7 -0
  21. package/dist/constants/sort.js +5 -0
  22. package/dist/constants/table-keys.d.ts +48 -0
  23. package/dist/constants/table-keys.js +46 -0
  24. package/dist/features/account/components/AddressesIndexListing.js +9 -6
  25. package/dist/features/admin/components/AdminAllEventEntriesView.js +4 -1
  26. package/dist/features/admin/components/AdminBidsView.js +4 -1
  27. package/dist/features/admin/components/AdminBlogView.js +9 -2
  28. package/dist/features/admin/components/AdminBrandsView.js +9 -2
  29. package/dist/features/admin/components/AdminCarouselView.js +4 -1
  30. package/dist/features/admin/components/AdminCartsView.js +4 -1
  31. package/dist/features/admin/components/AdminCategoriesView.js +9 -2
  32. package/dist/features/admin/components/AdminContactView.js +4 -1
  33. package/dist/features/admin/components/AdminCouponsView.js +4 -1
  34. package/dist/features/admin/components/AdminFaqsView.js +5 -1
  35. package/dist/features/admin/components/AdminFeaturesView.js +5 -2
  36. package/dist/features/admin/components/AdminHistoryView.js +5 -1
  37. package/dist/features/admin/components/AdminNewsletterView.js +4 -1
  38. package/dist/features/admin/components/AdminNotificationsView.js +4 -1
  39. package/dist/features/admin/components/AdminOrdersView.js +14 -12
  40. package/dist/features/admin/components/AdminPayoutsView.js +4 -1
  41. package/dist/features/admin/components/AdminPrizeDrawsView.js +4 -1
  42. package/dist/features/admin/components/AdminProductsView.js +14 -3
  43. package/dist/features/admin/components/AdminReturnRequestsView.js +4 -1
  44. package/dist/features/admin/components/AdminReviewsView.js +4 -1
  45. package/dist/features/admin/components/AdminScammersView.js +4 -1
  46. package/dist/features/admin/components/AdminSessionsView.js +4 -1
  47. package/dist/features/admin/components/AdminStoreAddressesView.js +5 -1
  48. package/dist/features/admin/components/AdminStoresView.js +10 -3
  49. package/dist/features/admin/components/AdminSublistingCategoriesView.js +4 -1
  50. package/dist/features/admin/components/AdminSupportTicketsView.js +4 -1
  51. package/dist/features/admin/components/AdminTeamView.js +4 -1
  52. package/dist/features/admin/components/AdminUsersView.js +9 -12
  53. package/dist/features/admin/components/AdminViewCards.d.ts +12 -0
  54. package/dist/features/admin/components/AdminViewCards.js +53 -0
  55. package/dist/features/admin/components/AdminWishlistsView.js +4 -1
  56. package/dist/features/auctions/repository/bid.repository.js +1 -6
  57. package/dist/features/auctions/schemas/index.d.ts +4 -4
  58. package/dist/features/blog/actions/blog-actions.d.ts +16 -16
  59. package/dist/features/blog/components/BlogFilters.d.ts +28 -28
  60. package/dist/features/blog/components/BlogFilters.js +18 -15
  61. package/dist/features/blog/components/BlogIndexListing.js +24 -13
  62. package/dist/features/blog/schemas/index.d.ts +10 -10
  63. package/dist/features/categories/components/CategoriesIndexListing.js +30 -19
  64. package/dist/features/categories/schemas/index.d.ts +2 -2
  65. package/dist/features/events/components/AdminEventsView.js +5 -1
  66. package/dist/features/events/components/EventFilters.d.ts +24 -24
  67. package/dist/features/events/components/EventFilters.js +16 -13
  68. package/dist/features/events/components/EventStatusBadge.js +1 -0
  69. package/dist/features/events/components/EventsIndexListing.js +36 -24
  70. package/dist/features/events/components/EventsListPageView.js +13 -10
  71. package/dist/features/events/schemas/firestore.d.ts +1 -0
  72. package/dist/features/events/schemas/firestore.js +1 -0
  73. package/dist/features/events/schemas/index.d.ts +1 -1
  74. package/dist/features/events/types/index.d.ts +1 -1
  75. package/dist/features/faq/actions/faq-actions.d.ts +10 -10
  76. package/dist/features/faq/schemas/index.d.ts +4 -4
  77. package/dist/features/layout/TitleBarLayout.js +1 -1
  78. package/dist/features/orders/components/OrderFilters.d.ts +20 -20
  79. package/dist/features/orders/components/OrderFilters.js +33 -30
  80. package/dist/features/orders/repository/orders.repository.js +1 -15
  81. package/dist/features/orders/schemas/index.d.ts +2 -2
  82. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +44 -36
  83. package/dist/features/pre-orders/schemas/index.d.ts +3 -3
  84. package/dist/features/products/components/AuctionsIndexListing.js +63 -30
  85. package/dist/features/products/components/BidHistory.d.ts +0 -1
  86. package/dist/features/products/components/BidHistory.js +1 -1
  87. package/dist/features/products/components/PrizeDrawsIndexListing.js +44 -37
  88. package/dist/features/products/components/ProductDetailPageView.js +1 -1
  89. package/dist/features/products/components/ProductFilters.d.ts +20 -20
  90. package/dist/features/products/components/ProductFilters.js +62 -59
  91. package/dist/features/products/components/ProductsIndexListing.js +37 -29
  92. package/dist/features/products/components/ProductsIndexPageView.js +18 -10
  93. package/dist/features/products/hooks/useProducts.js +2 -0
  94. package/dist/features/products/repository/products.repository.js +2 -22
  95. package/dist/features/products/schemas/index.d.ts +28 -28
  96. package/dist/features/products/schemas/product-features.validators.d.ts +12 -12
  97. package/dist/features/products/types/index.d.ts +2 -0
  98. package/dist/features/promotions/components/CouponsIndexListing.js +21 -17
  99. package/dist/features/promotions/schemas/index.d.ts +4 -4
  100. package/dist/features/reviews/components/ReviewDetailShell.js +6 -5
  101. package/dist/features/reviews/components/ReviewFilters.d.ts +16 -16
  102. package/dist/features/reviews/components/ReviewFilters.js +10 -7
  103. package/dist/features/reviews/components/ReviewsIndexListing.js +25 -14
  104. package/dist/features/reviews/components/ReviewsList.d.ts +5 -2
  105. package/dist/features/reviews/components/ReviewsList.js +11 -5
  106. package/dist/features/reviews/schemas/firestore.d.ts +1 -0
  107. package/dist/features/reviews/schemas/index.d.ts +8 -8
  108. package/dist/features/reviews/types/index.d.ts +1 -0
  109. package/dist/features/search/schemas/index.d.ts +2 -2
  110. package/dist/features/seller/components/SellerAuctionsView.js +5 -1
  111. package/dist/features/seller/components/SellerBidsView.js +4 -1
  112. package/dist/features/seller/components/SellerCouponsView.js +4 -1
  113. package/dist/features/seller/components/SellerOffersView.js +5 -1
  114. package/dist/features/seller/components/SellerOrdersView.js +4 -1
  115. package/dist/features/seller/components/SellerPayoutsView.js +5 -1
  116. package/dist/features/seller/components/SellerPreOrdersView.js +4 -1
  117. package/dist/features/seller/components/SellerPrizeDrawsView.js +4 -1
  118. package/dist/features/seller/components/SellerProductsView.js +4 -1
  119. package/dist/features/seller/schemas/index.d.ts +10 -10
  120. package/dist/features/stores/api/route.js +10 -1
  121. package/dist/features/stores/components/StoreAuctionsListing.js +2 -1
  122. package/dist/features/stores/components/StorePreOrdersListing.js +2 -1
  123. package/dist/features/stores/components/StoreReviewsListing.js +1 -1
  124. package/dist/features/stores/components/StoresIndexListing.js +45 -27
  125. package/dist/features/stores/schemas/firestore.d.ts +1 -0
  126. package/dist/features/stores/schemas/index.d.ts +4 -4
  127. package/dist/index.d.ts +8 -1
  128. package/dist/index.js +12 -1
  129. package/dist/react/hooks/useUrlTable.js +2 -1
  130. package/dist/seed/bids-seed-data.js +45 -44
  131. package/dist/seed/categories-seed-data.js +41 -40
  132. package/dist/seed/coupons-seed-data.js +41 -40
  133. package/dist/seed/products-auctions-seed-data.js +54 -53
  134. package/dist/seed/products-preorders-seed-data.js +25 -24
  135. package/dist/seed/products-prize-draws-seed-data.js +24 -23
  136. package/dist/seed/products-standard-seed-data.js +294 -293
  137. package/dist/seed/reviews-seed-data.js +61 -60
  138. package/dist/seed/scammers-seed-data.js +3 -2
  139. package/dist/seed/stores-seed-data.js +9 -8
  140. package/dist/seed/support-tickets-seed-data.js +13 -12
  141. package/dist/seed/users-seed-data.js +28 -27
  142. package/dist/tailwind-utilities.css +1 -1
  143. package/dist/ui/components/ListingToolbar.d.ts +7 -4
  144. package/dist/ui/components/ListingToolbar.js +4 -3
  145. package/dist/ui/components/SiteLogo.js +1 -1
  146. package/dist/utils/sieve-builder.d.ts +41 -0
  147. package/dist/utils/sieve-builder.js +66 -0
  148. package/package.json +1 -1
@@ -7,6 +7,7 @@
7
7
  *
8
8
  * Prices in INR paise (₹1 = 100 paise).
9
9
  */
10
+ import { PRODUCT_FIELDS, SCHEMA_DEFAULTS } from "../constants/field-names";
10
11
  const NOW = new Date();
11
12
  const daysAgo = (n) => new Date(NOW.getTime() - n * 86400000);
12
13
  const daysAhead = (n) => new Date(NOW.getTime() + n * 86400000);
@@ -22,7 +23,7 @@ const _rawProductsPrizeDrawsSeedData = [
22
23
  brand: "The Pokémon Company",
23
24
  brandSlug: "brand-pokemon-company",
24
25
  price: 500, // ₹5 per entry (matches pricePerEntry; price is the unit cost for cart totals)
25
- currency: "INR",
26
+ currency: SCHEMA_DEFAULTS.CURRENCY,
26
27
  stockQuantity: 50,
27
28
  availableQuantity: 50,
28
29
  mainImage: "https://images.unsplash.com/photo-1613771404784-3a5686aa2be3?w=800&h=800&fit=crop",
@@ -30,7 +31,7 @@ const _rawProductsPrizeDrawsSeedData = [
30
31
  "https://images.unsplash.com/photo-1613771404784-3a5686aa2be3?w=800&h=800&fit=crop",
31
32
  "https://images.unsplash.com/photo-1607604276583-eef5d076aa5f?w=800&h=800&fit=crop",
32
33
  ],
33
- status: "published",
34
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
34
35
  storeName: "Pokémon Palace",
35
36
  storeId: "store-pokemon-palace",
36
37
  featured: true,
@@ -43,7 +44,7 @@ const _rawProductsPrizeDrawsSeedData = [
43
44
  "charizard",
44
45
  "fair-rng",
45
46
  ],
46
- condition: "new",
47
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
47
48
  listingType: "prize-draw",
48
49
  pricePerEntry: 500,
49
50
  prizeMaxEntries: 50,
@@ -72,7 +73,7 @@ const _rawProductsPrizeDrawsSeedData = [
72
73
  brand: "Hot Wheels",
73
74
  brandSlug: "brand-hot-wheels",
74
75
  price: 29900, // ₹299 per entry
75
- currency: "INR",
76
+ currency: SCHEMA_DEFAULTS.CURRENCY,
76
77
  stockQuantity: 100,
77
78
  availableQuantity: 100,
78
79
  mainImage: "https://images.unsplash.com/photo-1583121274602-3e2820c69888?w=800&h=800&fit=crop",
@@ -80,7 +81,7 @@ const _rawProductsPrizeDrawsSeedData = [
80
81
  "https://images.unsplash.com/photo-1583121274602-3e2820c69888?w=800&h=800&fit=crop",
81
82
  "https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=800&h=800&fit=crop",
82
83
  ],
83
- status: "published",
84
+ status: PRODUCT_FIELDS.STATUS_VALUES.PUBLISHED,
84
85
  storeName: "Diecast Depot",
85
86
  storeId: "store-diecast-depot",
86
87
  featured: true,
@@ -92,7 +93,7 @@ const _rawProductsPrizeDrawsSeedData = [
92
93
  "diecast",
93
94
  "fair-rng",
94
95
  ],
95
- condition: "new",
96
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
96
97
  listingType: "prize-draw",
97
98
  pricePerEntry: 29900,
98
99
  prizeMaxEntries: 100,
@@ -120,7 +121,7 @@ function _pokemonPrizeItems() {
120
121
  images: [
121
122
  "https://images.unsplash.com/photo-1613771404784-3a5686aa2be3?w=600&h=600&fit=crop",
122
123
  ],
123
- condition: "new",
124
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
124
125
  estimatedValue: 549900,
125
126
  isWon: false,
126
127
  },
@@ -140,7 +141,7 @@ function _pokemonPrizeItems() {
140
141
  images: [
141
142
  "https://images.unsplash.com/photo-1614108831137-558fffac9ead?w=600&h=600&fit=crop",
142
143
  ],
143
- condition: "new",
144
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
144
145
  estimatedValue: 199900,
145
146
  isWon: false,
146
147
  },
@@ -150,7 +151,7 @@ function _pokemonPrizeItems() {
150
151
  images: [
151
152
  "https://images.unsplash.com/photo-1628968434441-d9c61d543a91?w=600&h=600&fit=crop",
152
153
  ],
153
- condition: "new",
154
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
154
155
  estimatedValue: 299900,
155
156
  isWon: false,
156
157
  },
@@ -160,7 +161,7 @@ function _pokemonPrizeItems() {
160
161
  images: [
161
162
  "https://images.unsplash.com/photo-1606503153255-59d8b8b82176?w=600&h=600&fit=crop",
162
163
  ],
163
- condition: "new",
164
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
164
165
  estimatedValue: 249900,
165
166
  isWon: false,
166
167
  },
@@ -170,7 +171,7 @@ function _pokemonPrizeItems() {
170
171
  images: [
171
172
  "https://images.unsplash.com/photo-1613771404721-1f92d799e49f?w=600&h=600&fit=crop",
172
173
  ],
173
- condition: "new",
174
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
174
175
  estimatedValue: 99900,
175
176
  isWon: false,
176
177
  },
@@ -180,7 +181,7 @@ function _pokemonPrizeItems() {
180
181
  images: [
181
182
  "https://images.unsplash.com/photo-1607604276583-eef5d076aa5f?w=600&h=600&fit=crop",
182
183
  ],
183
- condition: "new",
184
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
184
185
  estimatedValue: 1999900,
185
186
  isWon: false,
186
187
  },
@@ -190,7 +191,7 @@ function _pokemonPrizeItems() {
190
191
  images: [
191
192
  "https://images.unsplash.com/photo-1610890716171-6b1bb98ffd09?w=600&h=600&fit=crop",
192
193
  ],
193
- condition: "new",
194
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
194
195
  estimatedValue: 79900,
195
196
  isWon: false,
196
197
  },
@@ -200,7 +201,7 @@ function _pokemonPrizeItems() {
200
201
  images: [
201
202
  "https://images.unsplash.com/photo-1542779283-5a86fe9aab09?w=600&h=600&fit=crop",
202
203
  ],
203
- condition: "new",
204
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
204
205
  estimatedValue: 449900,
205
206
  isWon: false,
206
207
  },
@@ -211,7 +212,7 @@ function _pokemonPrizeItems() {
211
212
  images: [
212
213
  "https://images.unsplash.com/photo-1613771404784-3a5686aa2be3?w=600&h=600&fit=crop",
213
214
  ],
214
- condition: "used",
215
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.USED,
215
216
  estimatedValue: 149900,
216
217
  isWon: false,
217
218
  },
@@ -225,7 +226,7 @@ function _hotWheelsPrizeItems() {
225
226
  images: [
226
227
  "https://images.unsplash.com/photo-1583121274602-3e2820c69888?w=600&h=600&fit=crop",
227
228
  ],
228
- condition: "new",
229
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
229
230
  estimatedValue: 899900,
230
231
  isWon: false,
231
232
  },
@@ -235,7 +236,7 @@ function _hotWheelsPrizeItems() {
235
236
  images: [
236
237
  "https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=600&h=600&fit=crop",
237
238
  ],
238
- condition: "new",
239
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
239
240
  estimatedValue: 499900,
240
241
  isWon: false,
241
242
  },
@@ -245,7 +246,7 @@ function _hotWheelsPrizeItems() {
245
246
  images: [
246
247
  "https://images.unsplash.com/photo-1494976388531-d1058494cdd8?w=600&h=600&fit=crop",
247
248
  ],
248
- condition: "new",
249
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
249
250
  estimatedValue: 599900,
250
251
  isWon: false,
251
252
  },
@@ -255,7 +256,7 @@ function _hotWheelsPrizeItems() {
255
256
  images: [
256
257
  "https://images.unsplash.com/photo-1611821064430-0d40291922d2?w=600&h=600&fit=crop",
257
258
  ],
258
- condition: "new",
259
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
259
260
  estimatedValue: 449900,
260
261
  isWon: false,
261
262
  },
@@ -265,7 +266,7 @@ function _hotWheelsPrizeItems() {
265
266
  images: [
266
267
  "https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=600&h=600&fit=crop",
267
268
  ],
268
- condition: "new",
269
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
269
270
  estimatedValue: 699900,
270
271
  isWon: false,
271
272
  },
@@ -275,7 +276,7 @@ function _hotWheelsPrizeItems() {
275
276
  images: [
276
277
  "https://images.unsplash.com/photo-1611821064430-0d40291922d2?w=600&h=600&fit=crop",
277
278
  ],
278
- condition: "new",
279
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
279
280
  estimatedValue: 549900,
280
281
  isWon: false,
281
282
  },
@@ -285,7 +286,7 @@ function _hotWheelsPrizeItems() {
285
286
  images: [
286
287
  "https://images.unsplash.com/photo-1494976388531-d1058494cdd8?w=600&h=600&fit=crop",
287
288
  ],
288
- condition: "new",
289
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
289
290
  estimatedValue: 799900,
290
291
  isWon: false,
291
292
  },
@@ -295,7 +296,7 @@ function _hotWheelsPrizeItems() {
295
296
  images: [
296
297
  "https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=600&h=600&fit=crop",
297
298
  ],
298
- condition: "new",
299
+ condition: PRODUCT_FIELDS.CONDITION_VALUES.NEW,
299
300
  estimatedValue: 649900,
300
301
  isWon: false,
301
302
  },