@mohasinac/appkit 3.2.20 → 3.3.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 (190) hide show
  1. package/dist/_internal/server/features/checkout/actions.d.ts +2 -0
  2. package/dist/_internal/server/features/checkout/actions.js +239 -190
  3. package/dist/_internal/server/functions/scheduled.d.ts +2 -1
  4. package/dist/_internal/server/functions/scheduled.js +9 -1
  5. package/dist/_internal/server/jobs/core/autoPayoutEligibility.js +8 -11
  6. package/dist/_internal/server/jobs/core/emiInstallmentReminder.d.ts +8 -0
  7. package/dist/_internal/server/jobs/core/emiInstallmentReminder.js +78 -0
  8. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.d.ts +2 -2
  9. package/dist/_internal/server/jobs/core/weeklyPayoutEligibility.js +15 -10
  10. package/dist/_internal/server/jobs/handlers/emiInstallmentReminder.d.ts +2 -0
  11. package/dist/_internal/server/jobs/handlers/emiInstallmentReminder.js +2 -0
  12. package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
  13. package/dist/_internal/server/jobs/handlers/index.js +2 -0
  14. package/dist/_internal/server/providers/index.d.ts +4 -4
  15. package/dist/_internal/server/providers/index.js +4 -4
  16. package/dist/_internal/server/providers/payment/razorpay-mock.d.ts +3 -2
  17. package/dist/_internal/server/providers/payment/razorpay-mock.js +3 -1
  18. package/dist/_internal/server/providers/resolve.d.ts +10 -13
  19. package/dist/_internal/server/providers/resolve.js +9 -15
  20. package/dist/_internal/shared/actions/action-registry.js +28 -0
  21. package/dist/_internal/shared/checkout/rules/_defaults.js +1 -0
  22. package/dist/_internal/shared/checkout/rules/_registry.js +4 -0
  23. package/dist/_internal/shared/checkout/rules/art.rule.d.ts +9 -0
  24. package/dist/_internal/shared/checkout/rules/art.rule.js +5 -0
  25. package/dist/_internal/shared/checkout/rules/auction.rule.js +1 -0
  26. package/dist/_internal/shared/checkout/rules/classified.rule.js +1 -0
  27. package/dist/_internal/shared/checkout/rules/index.d.ts +2 -0
  28. package/dist/_internal/shared/checkout/rules/index.js +2 -0
  29. package/dist/_internal/shared/checkout/rules/stickers.rule.d.ts +9 -0
  30. package/dist/_internal/shared/checkout/rules/stickers.rule.js +5 -0
  31. package/dist/_internal/shared/checkout/rules/types.d.ts +6 -0
  32. package/dist/_internal/shared/features/checkout/config.d.ts +16 -1
  33. package/dist/_internal/shared/features/checkout/config.js +16 -1
  34. package/dist/_internal/shared/features/emi/schedule.d.ts +63 -0
  35. package/dist/_internal/shared/features/emi/schedule.js +62 -0
  36. package/dist/_internal/shared/fees/calculator.d.ts +53 -0
  37. package/dist/_internal/shared/fees/calculator.js +40 -0
  38. package/dist/_internal/shared/listing-types/_registry.d.ts +22 -66
  39. package/dist/_internal/shared/listing-types/_registry.js +19 -2
  40. package/dist/_internal/shared/listing-types/art/config.d.ts +15 -0
  41. package/dist/_internal/shared/listing-types/art/config.js +14 -0
  42. package/dist/_internal/shared/listing-types/art/ctas.d.ts +1 -0
  43. package/dist/_internal/shared/listing-types/art/ctas.js +3 -0
  44. package/dist/_internal/shared/listing-types/art/og.d.ts +1 -0
  45. package/dist/_internal/shared/listing-types/art/og.js +1 -0
  46. package/dist/_internal/shared/listing-types/art/schema.d.ts +2 -0
  47. package/dist/_internal/shared/listing-types/art/schema.js +3 -0
  48. package/dist/_internal/shared/listing-types/art/seed-factory.d.ts +1 -0
  49. package/dist/_internal/shared/listing-types/art/seed-factory.js +1 -0
  50. package/dist/_internal/shared/listing-types/auction/config.d.ts +8 -0
  51. package/dist/_internal/shared/listing-types/auction/config.js +6 -0
  52. package/dist/_internal/shared/listing-types/capabilities.js +17 -0
  53. package/dist/_internal/shared/listing-types/classified/config.d.ts +8 -0
  54. package/dist/_internal/shared/listing-types/classified/config.js +6 -0
  55. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +8 -0
  56. package/dist/_internal/shared/listing-types/digital-code/config.js +6 -0
  57. package/dist/_internal/shared/listing-types/live/config.d.ts +8 -0
  58. package/dist/_internal/shared/listing-types/live/config.js +6 -0
  59. package/dist/_internal/shared/listing-types/pre-order/config.d.ts +8 -0
  60. package/dist/_internal/shared/listing-types/pre-order/config.js +6 -0
  61. package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +8 -0
  62. package/dist/_internal/shared/listing-types/prize-draw/config.js +6 -0
  63. package/dist/_internal/shared/listing-types/standard/config.d.ts +8 -0
  64. package/dist/_internal/shared/listing-types/standard/config.js +6 -0
  65. package/dist/_internal/shared/listing-types/stickers/config.d.ts +15 -0
  66. package/dist/_internal/shared/listing-types/stickers/config.js +14 -0
  67. package/dist/_internal/shared/listing-types/stickers/ctas.d.ts +1 -0
  68. package/dist/_internal/shared/listing-types/stickers/ctas.js +3 -0
  69. package/dist/_internal/shared/listing-types/stickers/og.d.ts +1 -0
  70. package/dist/_internal/shared/listing-types/stickers/og.js +1 -0
  71. package/dist/_internal/shared/listing-types/stickers/schema.d.ts +2 -0
  72. package/dist/_internal/shared/listing-types/stickers/schema.js +3 -0
  73. package/dist/_internal/shared/listing-types/stickers/seed-factory.d.ts +1 -0
  74. package/dist/_internal/shared/listing-types/stickers/seed-factory.js +1 -0
  75. package/dist/client.d.ts +7 -2
  76. package/dist/client.js +4 -2
  77. package/dist/constants/field-names.d.ts +2 -6
  78. package/dist/constants/field-names.js +2 -6
  79. package/dist/contracts/index.d.ts +4 -2
  80. package/dist/contracts/index.js +6 -0
  81. package/dist/contracts/payment.d.ts +14 -9
  82. package/dist/contracts/payment.js +11 -1
  83. package/dist/contracts/shipping.d.ts +14 -9
  84. package/dist/contracts/shipping.js +11 -1
  85. package/dist/features/about/components/PublicProfileView.js +3 -6
  86. package/dist/features/admin/components/AdminAddressBookView.d.ts +11 -0
  87. package/dist/features/admin/components/AdminAddressBookView.js +30 -0
  88. package/dist/features/admin/components/AdminArtView.d.ts +3 -0
  89. package/dist/features/admin/components/AdminArtView.js +45 -0
  90. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  91. package/dist/features/admin/components/AdminSiteSettingsView.js +14 -9
  92. package/dist/features/admin/components/AdminStickersView.d.ts +3 -0
  93. package/dist/features/admin/components/AdminStickersView.js +45 -0
  94. package/dist/features/admin/components/index.d.ts +6 -0
  95. package/dist/features/admin/components/index.js +4 -0
  96. package/dist/features/admin/schemas/firestore.d.ts +19 -11
  97. package/dist/features/admin/schemas/firestore.js +12 -2
  98. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +3 -2
  99. package/dist/features/auth/hooks/useAuth.js +35 -9
  100. package/dist/features/auth/schemas/firestore.d.ts +2 -6
  101. package/dist/features/cart/schemas/firestore.d.ts +3 -2
  102. package/dist/features/consultation/schemas/index.d.ts +2 -2
  103. package/dist/features/loyalty/schemas/index.d.ts +6 -6
  104. package/dist/features/orders/repository/orders.repository.d.ts +20 -2
  105. package/dist/features/orders/repository/orders.repository.js +34 -5
  106. package/dist/features/orders/schemas/firestore.d.ts +33 -7
  107. package/dist/features/orders/schemas/firestore.js +1 -1
  108. package/dist/features/orders/schemas/index.d.ts +176 -31
  109. package/dist/features/orders/schemas/index.js +20 -6
  110. package/dist/features/orders/types/index.d.ts +3 -3
  111. package/dist/features/payments/repository/payout.repository.js +2 -2
  112. package/dist/features/payments/schemas/firestore.d.ts +3 -3
  113. package/dist/features/payments/schemas/firestore.js +2 -2
  114. package/dist/features/payments/schemas/index.d.ts +5 -5
  115. package/dist/features/payments/schemas/index.js +2 -2
  116. package/dist/features/products/api/[id]/route.js +4 -1
  117. package/dist/features/products/api/route.js +4 -1
  118. package/dist/features/products/components/CompareOverlay.js +7 -9
  119. package/dist/features/products/components/ProductDetailPageView.d.ts +3 -1
  120. package/dist/features/products/components/ProductDetailPageView.js +2 -2
  121. package/dist/features/products/components/ProductForm.js +18 -7
  122. package/dist/features/products/components/ProductGrid.js +7 -12
  123. package/dist/features/products/components/ShowGroupSection.js +3 -5
  124. package/dist/features/products/components/SublistingCarouselSection.js +3 -6
  125. package/dist/features/products/constants/listing-tabs.d.ts +32 -0
  126. package/dist/features/products/constants/listing-tabs.js +8 -0
  127. package/dist/features/products/index.d.ts +1 -1
  128. package/dist/features/products/index.js +3 -1
  129. package/dist/features/products/schemas/firestore.d.ts +20 -1
  130. package/dist/features/products/schemas/firestore.js +2 -0
  131. package/dist/features/products/schemas/index.d.ts +48 -0
  132. package/dist/features/products/schemas/index.js +9 -0
  133. package/dist/features/products/schemas/product-features.d.ts +1 -1
  134. package/dist/features/products/types/index.d.ts +5 -3
  135. package/dist/features/products/utils/listing-type.d.ts +6 -0
  136. package/dist/features/products/utils/listing-type.js +3 -0
  137. package/dist/features/reviews/api/[id]/route.js +5 -4
  138. package/dist/features/seller/actions/seller-actions.d.ts +29 -14
  139. package/dist/features/seller/actions/seller-actions.js +101 -27
  140. package/dist/features/seller/components/SellerArtView.d.ts +7 -0
  141. package/dist/features/seller/components/SellerArtView.js +114 -0
  142. package/dist/features/seller/components/SellerOrdersView.js +38 -1
  143. package/dist/features/seller/components/SellerProductShell.d.ts +5 -1
  144. package/dist/features/seller/components/SellerProductShell.js +69 -59
  145. package/dist/features/seller/components/SellerShippingView.js +6 -25
  146. package/dist/features/seller/components/SellerStickersView.d.ts +7 -0
  147. package/dist/features/seller/components/SellerStickersView.js +114 -0
  148. package/dist/features/seller/components/index.d.ts +4 -0
  149. package/dist/features/seller/components/index.js +2 -0
  150. package/dist/features/seller/messages/en.json +1 -1
  151. package/dist/features/seller/schemas/index.d.ts +7 -7
  152. package/dist/features/seller/schemas/index.js +1 -1
  153. package/dist/features/seller/types/index.d.ts +1 -1
  154. package/dist/features/stores/components/StoreDetailLayoutView.js +18 -2
  155. package/dist/features/stores/schemas/firestore.d.ts +7 -1
  156. package/dist/features/stores/schemas/index.d.ts +19 -16
  157. package/dist/features/stores/schemas/index.js +1 -1
  158. package/dist/index.d.ts +21 -36
  159. package/dist/index.js +27 -39
  160. package/dist/next/routing/route-map.d.ts +22 -0
  161. package/dist/next/routing/route-map.js +10 -0
  162. package/dist/providers/payment-manual/index.d.ts +40 -0
  163. package/dist/providers/payment-manual/index.js +91 -0
  164. package/dist/providers/payment-razorpay/index.d.ts +4 -2
  165. package/dist/providers/payment-razorpay/index.js +4 -1
  166. package/dist/providers/shipping-manual/index.d.ts +22 -0
  167. package/dist/providers/shipping-manual/index.js +47 -0
  168. package/dist/providers.d.ts +2 -2
  169. package/dist/providers.js +5 -3
  170. package/dist/schemas/registry.d.ts +129 -70
  171. package/dist/schemas/registry.js +0 -4
  172. package/dist/security/pii-encrypt.js +0 -7
  173. package/dist/security/pii-redact.js +0 -1
  174. package/dist/seed/conversations-seed-data.js +2 -2
  175. package/dist/seed/faq-seed-data.js +7 -7
  176. package/dist/seed/grouped-listings-seed-data.d.ts +2 -0
  177. package/dist/seed/index.d.ts +2 -0
  178. package/dist/seed/index.js +2 -0
  179. package/dist/seed/manifest.js +20 -16
  180. package/dist/seed/payouts-seed-data.js +5 -5
  181. package/dist/seed/products-art-seed-data.d.ts +11 -0
  182. package/dist/seed/products-art-seed-data.js +125 -0
  183. package/dist/seed/products-preorders-seed-data.d.ts +2 -0
  184. package/dist/seed/products-stickers-seed-data.d.ts +11 -0
  185. package/dist/seed/products-stickers-seed-data.js +125 -0
  186. package/dist/seed/site-settings-seed-data.js +13 -4
  187. package/dist/seed/stores-seed-data.js +11 -11
  188. package/dist/server.d.ts +7 -15
  189. package/dist/server.js +17 -42
  190. package/package.json +1 -1
@@ -2,10 +2,69 @@ export * from "./firestore";
2
2
  import { z } from "zod";
3
3
  export declare const orderListingTypeSchema: z.ZodEnum<["standard", "auction", "pre-order", "prize-draw", "classified", "digital-code", "live"]>;
4
4
  export declare const orderPaymentStatusSchema: z.ZodEnum<["pending", "processing", "paid", "failed", "refunded", "partial_refund"]>;
5
- export declare const orderShippingMethodSchema: z.ZodEnum<["custom", "shiprocket"]>;
5
+ export declare const orderShippingMethodSchema: z.ZodEnum<["custom"]>;
6
6
  export declare const orderRefundStatusSchema: z.ZodEnum<["pending", "processing", "completed", "rejected"]>;
7
7
  export declare const orderPayoutStatusSchema: z.ZodEnum<["eligible", "requested", "paid"]>;
8
8
  export declare const orderRefundTypeSchema: z.ZodEnum<["full", "partial"]>;
9
+ export declare const emiInstallmentStatusSchema: z.ZodEnum<["pending", "paid", "overdue"]>;
10
+ export declare const emiInstallmentSchema: z.ZodObject<{
11
+ index: z.ZodNumber;
12
+ dueDate: z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
13
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
14
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
15
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
16
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
17
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
18
+ }, z.ZodTypeAny, "passthrough">>]>;
19
+ amount: z.ZodNumber;
20
+ status: z.ZodEnum<["pending", "paid", "overdue"]>;
21
+ paidAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
22
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
23
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
24
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
25
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
26
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
27
+ }, z.ZodTypeAny, "passthrough">>]>>;
28
+ transactionId: z.ZodOptional<z.ZodString>;
29
+ proofUrl: z.ZodOptional<z.ZodString>;
30
+ reminderSentAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
31
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
32
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
33
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
34
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
35
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
36
+ }, z.ZodTypeAny, "passthrough">>]>>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ status: "pending" | "paid" | "overdue";
39
+ amount: number;
40
+ index: number;
41
+ dueDate: string | Date | z.objectOutputType<{
42
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
43
+ }, z.ZodTypeAny, "passthrough">;
44
+ transactionId?: string | undefined;
45
+ paidAt?: string | Date | z.objectOutputType<{
46
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
47
+ }, z.ZodTypeAny, "passthrough"> | undefined;
48
+ proofUrl?: string | undefined;
49
+ reminderSentAt?: string | Date | z.objectOutputType<{
50
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
51
+ }, z.ZodTypeAny, "passthrough"> | undefined;
52
+ }, {
53
+ status: "pending" | "paid" | "overdue";
54
+ amount: number;
55
+ index: number;
56
+ dueDate: string | Date | z.objectInputType<{
57
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
58
+ }, z.ZodTypeAny, "passthrough">;
59
+ transactionId?: string | undefined;
60
+ paidAt?: string | Date | z.objectInputType<{
61
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
62
+ }, z.ZodTypeAny, "passthrough"> | undefined;
63
+ proofUrl?: string | undefined;
64
+ reminderSentAt?: string | Date | z.objectInputType<{
65
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
66
+ }, z.ZodTypeAny, "passthrough"> | undefined;
67
+ }>;
9
68
  export declare const orderDocumentItemSchema: z.ZodObject<{
10
69
  productId: z.ZodString;
11
70
  productTitle: z.ZodString;
@@ -276,21 +335,75 @@ export declare const orderFirestoreSchema: z.ZodObject<{
276
335
  platformFee: z.ZodOptional<z.ZodNumber>;
277
336
  depositAmount: z.ZodOptional<z.ZodNumber>;
278
337
  codRemainingAmount: z.ZodOptional<z.ZodNumber>;
338
+ codHandlingFee: z.ZodOptional<z.ZodNumber>;
339
+ emiEnabled: z.ZodOptional<z.ZodBoolean>;
340
+ emiTenureMonths: z.ZodOptional<z.ZodNumber>;
341
+ emiTokenAmount: z.ZodOptional<z.ZodNumber>;
342
+ emiSurchargeAmount: z.ZodOptional<z.ZodNumber>;
343
+ emiInstallments: z.ZodOptional<z.ZodArray<z.ZodObject<{
344
+ index: z.ZodNumber;
345
+ dueDate: z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
346
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
347
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
348
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
349
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
350
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
351
+ }, z.ZodTypeAny, "passthrough">>]>;
352
+ amount: z.ZodNumber;
353
+ status: z.ZodEnum<["pending", "paid", "overdue"]>;
354
+ paidAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
355
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
356
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
357
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
358
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
359
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
360
+ }, z.ZodTypeAny, "passthrough">>]>>;
361
+ transactionId: z.ZodOptional<z.ZodString>;
362
+ proofUrl: z.ZodOptional<z.ZodString>;
363
+ reminderSentAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
364
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
365
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
366
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
367
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
368
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
369
+ }, z.ZodTypeAny, "passthrough">>]>>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ status: "pending" | "paid" | "overdue";
372
+ amount: number;
373
+ index: number;
374
+ dueDate: string | Date | z.objectOutputType<{
375
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
376
+ }, z.ZodTypeAny, "passthrough">;
377
+ transactionId?: string | undefined;
378
+ paidAt?: string | Date | z.objectOutputType<{
379
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
380
+ }, z.ZodTypeAny, "passthrough"> | undefined;
381
+ proofUrl?: string | undefined;
382
+ reminderSentAt?: string | Date | z.objectOutputType<{
383
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
384
+ }, z.ZodTypeAny, "passthrough"> | undefined;
385
+ }, {
386
+ status: "pending" | "paid" | "overdue";
387
+ amount: number;
388
+ index: number;
389
+ dueDate: string | Date | z.objectInputType<{
390
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
391
+ }, z.ZodTypeAny, "passthrough">;
392
+ transactionId?: string | undefined;
393
+ paidAt?: string | Date | z.objectInputType<{
394
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
395
+ }, z.ZodTypeAny, "passthrough"> | undefined;
396
+ proofUrl?: string | undefined;
397
+ reminderSentAt?: string | Date | z.objectInputType<{
398
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
399
+ }, z.ZodTypeAny, "passthrough"> | undefined;
400
+ }>, "many">>;
401
+ emiRemainingBalance: z.ZodOptional<z.ZodNumber>;
402
+ emiComplete: z.ZodOptional<z.ZodBoolean>;
279
403
  shippingFee: z.ZodOptional<z.ZodNumber>;
280
- shippingMethod: z.ZodOptional<z.ZodEnum<["custom", "shiprocket"]>>;
404
+ shippingMethod: z.ZodOptional<z.ZodEnum<["custom"]>>;
281
405
  shippingCarrier: z.ZodOptional<z.ZodString>;
282
406
  trackingUrl: z.ZodOptional<z.ZodString>;
283
- shiprocketOrderId: z.ZodOptional<z.ZodNumber>;
284
- shiprocketShipmentId: z.ZodOptional<z.ZodNumber>;
285
- shiprocketAWB: z.ZodOptional<z.ZodString>;
286
- shiprocketStatus: z.ZodOptional<z.ZodString>;
287
- shiprocketUpdatedAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
288
- toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
289
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
290
- toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
291
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
292
- toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
293
- }, z.ZodTypeAny, "passthrough">>]>>;
294
407
  payoutStatus: z.ZodOptional<z.ZodEnum<["eligible", "requested", "paid"]>>;
295
408
  payoutId: z.ZodOptional<z.ZodString>;
296
409
  offerId: z.ZodOptional<z.ZodString>;
@@ -452,7 +565,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
452
565
  }[] | undefined;
453
566
  payoutStatus?: "paid" | "eligible" | "requested" | undefined;
454
567
  couponCode?: string | undefined;
455
- shippingMethod?: "custom" | "shiprocket" | undefined;
568
+ shippingMethod?: "custom" | undefined;
456
569
  orderType?: string | undefined;
457
570
  imageUrls?: string[] | undefined;
458
571
  paymentId?: string | undefined;
@@ -469,7 +582,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
469
582
  }, z.ZodTypeAny, "passthrough"> | undefined;
470
583
  cancellationReason?: string | undefined;
471
584
  refundAmount?: number | undefined;
472
- refundStatus?: "pending" | "processing" | "completed" | "rejected" | undefined;
585
+ refundStatus?: "pending" | "processing" | "rejected" | "completed" | undefined;
473
586
  refundFeeDeducted?: number | undefined;
474
587
  refundNetAmount?: number | undefined;
475
588
  refundNote?: string | undefined;
@@ -484,16 +597,32 @@ export declare const orderFirestoreSchema: z.ZodObject<{
484
597
  }[] | undefined;
485
598
  depositAmount?: number | undefined;
486
599
  codRemainingAmount?: number | undefined;
600
+ codHandlingFee?: number | undefined;
601
+ emiEnabled?: boolean | undefined;
602
+ emiTenureMonths?: number | undefined;
603
+ emiTokenAmount?: number | undefined;
604
+ emiSurchargeAmount?: number | undefined;
605
+ emiInstallments?: {
606
+ status: "pending" | "paid" | "overdue";
607
+ amount: number;
608
+ index: number;
609
+ dueDate: string | Date | z.objectOutputType<{
610
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
611
+ }, z.ZodTypeAny, "passthrough">;
612
+ transactionId?: string | undefined;
613
+ paidAt?: string | Date | z.objectOutputType<{
614
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
615
+ }, z.ZodTypeAny, "passthrough"> | undefined;
616
+ proofUrl?: string | undefined;
617
+ reminderSentAt?: string | Date | z.objectOutputType<{
618
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
619
+ }, z.ZodTypeAny, "passthrough"> | undefined;
620
+ }[] | undefined;
621
+ emiRemainingBalance?: number | undefined;
622
+ emiComplete?: boolean | undefined;
487
623
  shippingFee?: number | undefined;
488
624
  shippingCarrier?: string | undefined;
489
625
  trackingUrl?: string | undefined;
490
- shiprocketOrderId?: number | undefined;
491
- shiprocketShipmentId?: number | undefined;
492
- shiprocketAWB?: string | undefined;
493
- shiprocketStatus?: string | undefined;
494
- shiprocketUpdatedAt?: string | Date | z.objectOutputType<{
495
- toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
496
- }, z.ZodTypeAny, "passthrough"> | undefined;
497
626
  payoutId?: string | undefined;
498
627
  offerId?: string | undefined;
499
628
  prizeWon?: {
@@ -581,7 +710,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
581
710
  }[] | undefined;
582
711
  payoutStatus?: "paid" | "eligible" | "requested" | undefined;
583
712
  couponCode?: string | undefined;
584
- shippingMethod?: "custom" | "shiprocket" | undefined;
713
+ shippingMethod?: "custom" | undefined;
585
714
  orderType?: string | undefined;
586
715
  imageUrls?: string[] | undefined;
587
716
  paymentId?: string | undefined;
@@ -598,7 +727,7 @@ export declare const orderFirestoreSchema: z.ZodObject<{
598
727
  }, z.ZodTypeAny, "passthrough"> | undefined;
599
728
  cancellationReason?: string | undefined;
600
729
  refundAmount?: number | undefined;
601
- refundStatus?: "pending" | "processing" | "completed" | "rejected" | undefined;
730
+ refundStatus?: "pending" | "processing" | "rejected" | "completed" | undefined;
602
731
  refundFeeDeducted?: number | undefined;
603
732
  refundNetAmount?: number | undefined;
604
733
  refundNote?: string | undefined;
@@ -613,16 +742,32 @@ export declare const orderFirestoreSchema: z.ZodObject<{
613
742
  }[] | undefined;
614
743
  depositAmount?: number | undefined;
615
744
  codRemainingAmount?: number | undefined;
745
+ codHandlingFee?: number | undefined;
746
+ emiEnabled?: boolean | undefined;
747
+ emiTenureMonths?: number | undefined;
748
+ emiTokenAmount?: number | undefined;
749
+ emiSurchargeAmount?: number | undefined;
750
+ emiInstallments?: {
751
+ status: "pending" | "paid" | "overdue";
752
+ amount: number;
753
+ index: number;
754
+ dueDate: string | Date | z.objectInputType<{
755
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
756
+ }, z.ZodTypeAny, "passthrough">;
757
+ transactionId?: string | undefined;
758
+ paidAt?: string | Date | z.objectInputType<{
759
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
760
+ }, z.ZodTypeAny, "passthrough"> | undefined;
761
+ proofUrl?: string | undefined;
762
+ reminderSentAt?: string | Date | z.objectInputType<{
763
+ toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
764
+ }, z.ZodTypeAny, "passthrough"> | undefined;
765
+ }[] | undefined;
766
+ emiRemainingBalance?: number | undefined;
767
+ emiComplete?: boolean | undefined;
616
768
  shippingFee?: number | undefined;
617
769
  shippingCarrier?: string | undefined;
618
770
  trackingUrl?: string | undefined;
619
- shiprocketOrderId?: number | undefined;
620
- shiprocketShipmentId?: number | undefined;
621
- shiprocketAWB?: string | undefined;
622
- shiprocketStatus?: string | undefined;
623
- shiprocketUpdatedAt?: string | Date | z.objectInputType<{
624
- toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
625
- }, z.ZodTypeAny, "passthrough"> | undefined;
626
771
  payoutId?: string | undefined;
627
772
  offerId?: string | undefined;
628
773
  prizeWon?: {
@@ -21,10 +21,21 @@ export const orderPaymentStatusSchema = z.enum([
21
21
  "refunded",
22
22
  "partial_refund",
23
23
  ]);
24
- export const orderShippingMethodSchema = z.enum(["custom", "shiprocket"]);
24
+ export const orderShippingMethodSchema = z.enum(["custom"]);
25
25
  export const orderRefundStatusSchema = z.enum(["pending", "processing", "completed", "rejected"]);
26
26
  export const orderPayoutStatusSchema = z.enum(["eligible", "requested", "paid"]);
27
27
  export const orderRefundTypeSchema = z.enum(["full", "partial"]);
28
+ export const emiInstallmentStatusSchema = z.enum(["pending", "paid", "overdue"]);
29
+ export const emiInstallmentSchema = z.object({
30
+ index: z.number().int().positive(),
31
+ dueDate: firestoreDateSchema,
32
+ amount: paiseSchema,
33
+ status: emiInstallmentStatusSchema,
34
+ paidAt: firestoreDateSchema.optional(),
35
+ transactionId: z.string().optional(),
36
+ proofUrl: z.string().optional(),
37
+ reminderSentAt: firestoreDateSchema.optional(),
38
+ });
28
39
  export const orderDocumentItemSchema = z.object({
29
40
  productId: z.string(),
30
41
  productTitle: z.string(),
@@ -118,15 +129,18 @@ export const orderFirestoreSchema = z.object({
118
129
  platformFee: paiseSchema.optional(),
119
130
  depositAmount: paiseSchema.optional(),
120
131
  codRemainingAmount: paiseSchema.optional(),
132
+ codHandlingFee: paiseSchema.optional(),
133
+ emiEnabled: z.boolean().optional(),
134
+ emiTenureMonths: z.number().int().min(2).max(6).optional(),
135
+ emiTokenAmount: paiseSchema.optional(),
136
+ emiSurchargeAmount: paiseSchema.optional(),
137
+ emiInstallments: z.array(emiInstallmentSchema).optional(),
138
+ emiRemainingBalance: paiseSchema.optional(),
139
+ emiComplete: z.boolean().optional(),
121
140
  shippingFee: paiseSchema.optional(),
122
141
  shippingMethod: orderShippingMethodSchema.optional(),
123
142
  shippingCarrier: z.string().optional(),
124
143
  trackingUrl: z.string().optional(),
125
- shiprocketOrderId: z.number().int().optional(),
126
- shiprocketShipmentId: z.number().int().optional(),
127
- shiprocketAWB: z.string().optional(),
128
- shiprocketStatus: z.string().optional(),
129
- shiprocketUpdatedAt: firestoreDateSchema.optional(),
130
144
  payoutStatus: orderPayoutStatusSchema.optional(),
131
145
  payoutId: z.string().optional(),
132
146
  offerId: z.string().optional(),
@@ -1,5 +1,6 @@
1
1
  import { type PaymentGateway, PaymentGatewayValues } from "../../payments/schemas";
2
2
  export { type PaymentGateway, PaymentGatewayValues };
3
+ import type { ListingType } from "../../products/types/index";
3
4
  export type PaymentStatus = "pending" | "processing" | "paid" | "failed" | "refunded" | "partial_refund";
4
5
  export interface UserAddress {
5
6
  id: string;
@@ -23,9 +24,8 @@ export interface OrderItem {
23
24
  currency?: string;
24
25
  storeId?: string;
25
26
  attributes?: Record<string, string>;
26
- /** Listing kind at the time of order — needed for prize-draw UI hints (SB8-F).
27
- * SB-UNI-F 2026-05-13 — Phase 2 union extension. */
28
- listingType?: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live";
27
+ /** Listing kind at the time of order — needed for prize-draw UI hints (SB8-F). */
28
+ listingType?: ListingType;
29
29
  /**
30
30
  * Per-item prize-draw reveal status (SB8-F). Populated by the checkout
31
31
  * actions when listingType === "prize-draw". Used to render the
@@ -126,7 +126,7 @@ export class PayoutRepository extends BaseRepository {
126
126
  return this.update(payoutId, {
127
127
  status,
128
128
  ...extra,
129
- ...(status === PAYOUT_FIELDS.STATUS_VALUES.COMPLETED ||
129
+ ...(status === PAYOUT_FIELDS.STATUS_VALUES.PAID ||
130
130
  status === PAYOUT_FIELDS.STATUS_VALUES.FAILED
131
131
  ? { processedAt: new Date() }
132
132
  : {}),
@@ -163,7 +163,7 @@ export class PayoutRepository extends BaseRepository {
163
163
  const snapshot = await this.db
164
164
  .collection(this.collection)
165
165
  .where(PAYOUT_FIELDS.STORE_ID, "==", storeId)
166
- .where(PAYOUT_FIELDS.STATUS, "in", ["pending", "processing", "completed"])
166
+ .where(PAYOUT_FIELDS.STATUS, "in", ["pending", "processing", "paid"])
167
167
  .get();
168
168
  const ids = new Set();
169
169
  snapshot.docs.forEach((doc) => {
@@ -9,7 +9,7 @@ export interface PayoutBankAccount {
9
9
  ifscCode: string;
10
10
  bankName: string;
11
11
  }
12
- export type PayoutStatus = "pending" | "processing" | "completed" | "failed";
12
+ export type PayoutStatus = "pending" | "processing" | "paid" | "failed";
13
13
  /**
14
14
  * A single refund deduction applied against a payout before dispatch.
15
15
  *
@@ -29,7 +29,7 @@ export interface PayoutRefundDeduction {
29
29
  export declare const PayoutStatusValues: {
30
30
  readonly PENDING: "pending";
31
31
  readonly PROCESSING: "processing";
32
- readonly COMPLETED: "completed";
32
+ readonly PAID: "paid";
33
33
  readonly FAILED: "failed";
34
34
  };
35
35
  export type PayoutPaymentMethod = "bank_transfer" | "upi";
@@ -82,7 +82,7 @@ export declare const PAYOUT_FIELDS: {
82
82
  readonly STATUS_VALUES: {
83
83
  readonly PENDING: PayoutStatus;
84
84
  readonly PROCESSING: PayoutStatus;
85
- readonly COMPLETED: PayoutStatus;
85
+ readonly PAID: PayoutStatus;
86
86
  readonly FAILED: PayoutStatus;
87
87
  };
88
88
  };
@@ -5,7 +5,7 @@ import { generatePayoutId, } from "../../../utils/id-generators";
5
5
  export const PayoutStatusValues = {
6
6
  PENDING: "pending",
7
7
  PROCESSING: "processing",
8
- COMPLETED: "completed",
8
+ PAID: "paid",
9
9
  FAILED: "failed",
10
10
  };
11
11
  export const PAYOUT_COLLECTION = "payouts";
@@ -32,7 +32,7 @@ export const PAYOUT_FIELDS = {
32
32
  STATUS_VALUES: {
33
33
  PENDING: "pending",
34
34
  PROCESSING: "processing",
35
- COMPLETED: "completed",
35
+ PAID: "paid",
36
36
  FAILED: "failed",
37
37
  },
38
38
  };
@@ -1,7 +1,7 @@
1
1
  export * from "./firestore";
2
2
  export * from "./saved-methods-firestore";
3
3
  import { z } from "zod";
4
- export declare const payoutStatusEnumSchema: z.ZodEnum<["pending", "processing", "completed", "failed"]>;
4
+ export declare const payoutStatusEnumSchema: z.ZodEnum<["pending", "processing", "paid", "failed"]>;
5
5
  export declare const payoutPaymentMethodSchema: z.ZodEnum<["bank_transfer", "upi"]>;
6
6
  export declare const payoutBankAccountSchema: z.ZodObject<{
7
7
  accountHolderName: z.ZodString;
@@ -75,7 +75,7 @@ export declare const payoutFirestoreSchema: z.ZodObject<{
75
75
  platformFee: z.ZodNumber;
76
76
  platformFeeRate: z.ZodNumber;
77
77
  currency: z.ZodString;
78
- status: z.ZodEnum<["pending", "processing", "completed", "failed"]>;
78
+ status: z.ZodEnum<["pending", "processing", "paid", "failed"]>;
79
79
  paymentMethod: z.ZodEnum<["bank_transfer", "upi"]>;
80
80
  bankAccount: z.ZodOptional<z.ZodObject<{
81
81
  accountHolderName: z.ZodString;
@@ -150,7 +150,7 @@ export declare const payoutFirestoreSchema: z.ZodObject<{
150
150
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
151
151
  }, z.ZodTypeAny, "passthrough">>]>>;
152
152
  }, "strip", z.ZodTypeAny, {
153
- status: "pending" | "failed" | "processing" | "completed";
153
+ status: "pending" | "paid" | "failed" | "processing";
154
154
  currency: string;
155
155
  storeId: string;
156
156
  createdAt: string | Date | z.objectOutputType<{
@@ -200,7 +200,7 @@ export declare const payoutFirestoreSchema: z.ZodObject<{
200
200
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
201
201
  }, z.ZodTypeAny, "passthrough"> | undefined;
202
202
  }, {
203
- status: "pending" | "failed" | "processing" | "completed";
203
+ status: "pending" | "paid" | "failed" | "processing";
204
204
  currency: string;
205
205
  storeId: string;
206
206
  createdAt: string | Date | z.objectInputType<{
@@ -252,7 +252,7 @@ export declare const payoutFirestoreSchema: z.ZodObject<{
252
252
  }>;
253
253
  export type PayoutFromSchema = z.infer<typeof payoutFirestoreSchema>;
254
254
  /** Zod schema for payout status — use instead of inline `z.enum(["pending",...])`. */
255
- export declare const payoutStatusSchema: z.ZodEnum<["pending", "processing", "completed", "failed"]>;
255
+ export declare const payoutStatusSchema: z.ZodEnum<["pending", "processing", "paid", "failed"]>;
256
256
  /**
257
257
  * Canonical payment gateway identifiers.
258
258
  * Use these constants instead of bare string literals.
@@ -6,7 +6,7 @@ import { auditTimestampsShape, firestoreDateSchema, paiseSchema } from "../../..
6
6
  // ─── Firestore document schema (W2) ───────────────────────────────────────────
7
7
  // Mirrors PayoutDocument + PayoutRefundDeduction + PayoutBankAccount in
8
8
  // ./firestore.ts. Registered into SCHEMAS.firestore.payouts.
9
- export const payoutStatusEnumSchema = z.enum(["pending", "processing", "completed", "failed"]);
9
+ export const payoutStatusEnumSchema = z.enum(["pending", "processing", "paid", "failed"]);
10
10
  export const payoutPaymentMethodSchema = z.enum(["bank_transfer", "upi"]);
11
11
  export const payoutBankAccountSchema = z.object({
12
12
  accountHolderName: z.string(),
@@ -54,7 +54,7 @@ export const payoutFirestoreSchema = z.object({
54
54
  export const payoutStatusSchema = z.enum([
55
55
  "pending",
56
56
  "processing",
57
- "completed",
57
+ "paid",
58
58
  "failed",
59
59
  ]);
60
60
  /**
@@ -18,6 +18,7 @@ import { storeRepository } from "../../../stores/repository/store.repository";
18
18
  // SB-UNI-V — bundlesRepository deleted; bundle stock-sync moves to the
19
19
  // `onProductStockChange` Firebase Function (see functions/src/bundle-stock-sync.ts).
20
20
  import { sanitizeProductForPublic } from "../../utils/sanitize";
21
+ import { printMetaSchema } from "../../schemas/index";
21
22
  import { isAdminUser, isModeratorUser } from "../../../auth/role-predicates";
22
23
  import { normalizeError } from "../../../../errors/normalize";
23
24
  const ERR_DB_NOT_REGISTERED = "Database provider not registered";
@@ -52,8 +53,10 @@ const productUpdateSchema = z
52
53
  tags: z.array(z.string()).optional(),
53
54
  featured: z.boolean().optional(),
54
55
  isPromoted: z.boolean().optional(),
56
+ allowShipBeforeEmiComplete: z.boolean().optional(),
57
+ printMeta: printMetaSchema.optional(),
55
58
  listingType: z
56
- .enum(["standard", "auction", "pre-order", "prize-draw", "bundle", "classified", "digital-code", "live"])
59
+ .enum(["standard", "auction", "pre-order", "prize-draw", "bundle", "classified", "digital-code", "live", "art", "stickers"])
57
60
  .optional(),
58
61
  media: z.array(mediaFieldSchema).optional(),
59
62
  })
@@ -17,6 +17,7 @@ import { z } from "zod";
17
17
  import { getProviders } from "../../../contracts";
18
18
  import { createRouteHandler } from "../../../next";
19
19
  import { mediaFieldSchema } from "../../media/types/index";
20
+ import { printMetaSchema } from "../schemas/index";
20
21
  import { sanitizeProductsForPublic } from "../utils/sanitize";
21
22
  import { normalizeError } from "../../../errors/normalize";
22
23
  // --- Mutation schemas ---------------------------------------------------------
@@ -42,12 +43,14 @@ const productMutateSchema = z
42
43
  tags: z.array(z.string()).optional(),
43
44
  featured: z.boolean().optional(),
44
45
  isPromoted: z.boolean().optional(),
46
+ allowShipBeforeEmiComplete: z.boolean().optional(),
47
+ printMeta: printMetaSchema.optional(),
45
48
  sellerId: z.string().optional(),
46
49
  sellerName: z.string().optional(),
47
50
  sellerEmail: z.string().email().optional(),
48
51
  slug: z.string().optional(),
49
52
  listingType: z
50
- .enum(["standard", "auction", "pre-order", "prize-draw", "bundle", "classified", "digital-code", "live"])
53
+ .enum(["standard", "auction", "pre-order", "prize-draw", "bundle", "classified", "digital-code", "live", "art", "stickers"])
51
54
  .optional(),
52
55
  media: z.array(mediaFieldSchema).optional(),
53
56
  })
@@ -14,10 +14,10 @@ import Link from "next/link";
14
14
  import { X } from "lucide-react";
15
15
  import { Button, Div, Heading, Row, Span, Stack, Text } from "../../../ui";
16
16
  import { useSwipe } from "../../../react/hooks/useSwipe";
17
- import { ROUTES } from "../../../next";
18
17
  import { formatCurrency } from "../../../utils/number.formatter";
19
18
  import { COMPARE_MAX_ITEMS } from "../constants/action-defs";
20
- import { isAuctionListing, isPreOrderListing } from "../utils/listing-type";
19
+ import { normalizeListingType } from "../utils/listing-type";
20
+ import { pluginFor } from "../../../_internal/shared/listing-types/_registry";
21
21
  const DEFAULT_LABELS = {
22
22
  title: "Compare items",
23
23
  empty: "Select up to 4 items from the listing to compare.",
@@ -40,13 +40,11 @@ const CHIP_CLASS = "inline-flex items-center rounded-full bg-[var(--appkit-color
40
40
  const COLUMN_CARD_CLASS = "flex flex-col gap-3 rounded-xl border border-[var(--appkit-color-border-subtle)] bg-[var(--appkit-color-surface)] p-3";
41
41
  function detailHref(item, type) {
42
42
  const id = item.slug ?? item.id;
43
- if (type === "auction" || isAuctionListing(item)) {
44
- return String(ROUTES.PUBLIC.AUCTION_DETAIL(id));
45
- }
46
- if (type === "preorder" || isPreOrderListing(item)) {
47
- return String(ROUTES.PUBLIC.PRE_ORDER_DETAIL(id));
48
- }
49
- return String(ROUTES.PUBLIC.PRODUCT_DETAIL(id));
43
+ // The caller-supplied `type` hint takes precedence some compare contexts
44
+ // (e.g. an auction comparison page) feed items that don't carry their own
45
+ // `listingType` field, so the hint is the only signal available.
46
+ const listingType = type === "auction" ? "auction" : type === "preorder" ? "pre-order" : normalizeListingType(item);
47
+ return pluginFor(listingType).detailRoute(id);
50
48
  }
51
49
  function priceLabel(item) {
52
50
  if (typeof item.price !== "number")
@@ -42,5 +42,7 @@ export interface ProductDetailPageViewProps {
42
42
  * legacy bullets render unchanged.
43
43
  */
44
44
  productFeatures?: ProductFeatureDocument[];
45
+ /** Site-wide COD availability (`siteSettings.payment.codEnabled`), threaded from the page's data layer. Drives the "Cash on Delivery" feature badge. */
46
+ codEnabled?: boolean;
45
47
  }
46
- export declare function ProductDetailPageView({ slug, initialProduct, renderOfferAction, renderPrimaryActions, productFeatures, }: ProductDetailPageViewProps): Promise<import("react/jsx-runtime").JSX.Element>;
48
+ export declare function ProductDetailPageView({ slug, initialProduct, renderOfferAction, renderPrimaryActions, productFeatures, codEnabled, }: ProductDetailPageViewProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -106,7 +106,7 @@ function StarRating({ value }) {
106
106
  // ---------------------------------------------------------------------------
107
107
  // Component
108
108
  // ---------------------------------------------------------------------------
109
- export async function ProductDetailPageView({ slug, initialProduct, renderOfferAction, renderPrimaryActions, productFeatures, }) {
109
+ export async function ProductDetailPageView({ slug, initialProduct, renderOfferAction, renderPrimaryActions, productFeatures, codEnabled, }) {
110
110
  // Use pre-fetched data when available to avoid a redundant repository call.
111
111
  // The page layer wraps getProductForDetail in React.cache(), so both
112
112
  // generateMetadata() and this component share the same in-flight promise.
@@ -262,7 +262,7 @@ export async function ProductDetailPageView({ slug, initialProduct, renderOfferA
262
262
  ? ` — only ${effectiveStock} left`
263
263
  : ""] })] })) : (_jsxs(Span, { layout: "inline-flex", gap: "xs", className: `w-fit .5 ${inStock ? CLS_STOCK_IN : CLS_STOCK_OUT}`, rounded: "full", padding: "pill-md", size: "xs", weight: "medium", children: [inStock ? "✓ In Stock" : "✗ Out of Stock", inStock && effectiveStock !== null && effectiveStock <= 10
264
264
  ? ` — only ${effectiveStock} left`
265
- : ""] })), (categorySlugs.length > 0 || subcategory || brand) && (_jsxs(Row, { gap: "sm", wrap: true, children: [categorySlugs.map((slug, i) => (_jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(slug)), className: "inline-flex items-center rounded-full border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] px-2.5 py-1 text-xs font-medium text-[var(--appkit-color-text-muted)] transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: categoryNames[i] ?? slug }, slug))), subcategory && (_jsx(Span, { layout: "inline-flex", size: "xs", weight: "medium", border: "subtle", rounded: "full", padding: "pill-sm-tall", surface: "muted", color: "muted", transform: "capitalize", children: subcategory })), brand && brandSlug && (_jsx(Link, { href: String(ROUTES.PUBLIC.BRAND_DETAIL(brandSlug)), className: "inline-flex items-center rounded-full border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] px-2.5 py-1 text-xs font-medium text-[var(--appkit-color-text-muted)] transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: brand })), brand && !brandSlug && (_jsx(Span, { layout: "inline-flex", size: "xs", weight: "medium", border: "subtle", rounded: "full", padding: "pill-sm-tall", surface: "muted", color: "muted", children: brand }))] })), bundleMemberships.length > 0 && (_jsx(Row, { gap: "sm", wrap: true, children: bundleMemberships.map((b) => (_jsxs(Link, { href: String(ROUTES.PUBLIC.BUNDLE_DETAIL(b.id)), className: CLS_BUNDLE_PILL, children: [_jsx(Span, { "aria-hidden": "true", children: "\uD83D\uDCE6" }), "In bundle: ", b.title] }, b.id))) })), _jsx(ProductFeatureBadges, { featured: featured, freeShipping: freeShipping, condition: condition ?? undefined, returnable: returnPolicy != null && returnPolicy.length > 0, labels: {
265
+ : ""] })), (categorySlugs.length > 0 || subcategory || brand) && (_jsxs(Row, { gap: "sm", wrap: true, children: [categorySlugs.map((slug, i) => (_jsx(Link, { href: String(ROUTES.PUBLIC.CATEGORY_DETAIL(slug)), className: "inline-flex items-center rounded-full border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] px-2.5 py-1 text-xs font-medium text-[var(--appkit-color-text-muted)] transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: categoryNames[i] ?? slug }, slug))), subcategory && (_jsx(Span, { layout: "inline-flex", size: "xs", weight: "medium", border: "subtle", rounded: "full", padding: "pill-sm-tall", surface: "muted", color: "muted", transform: "capitalize", children: subcategory })), brand && brandSlug && (_jsx(Link, { href: String(ROUTES.PUBLIC.BRAND_DETAIL(brandSlug)), className: "inline-flex items-center rounded-full border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] px-2.5 py-1 text-xs font-medium text-[var(--appkit-color-text-muted)] transition-colors hover:border-primary-300 hover:bg-primary-50 hover:text-primary-700 dark:hover:border-primary-700/60 dark:hover:bg-primary-900/20 dark:hover:text-primary-400", children: brand })), brand && !brandSlug && (_jsx(Span, { layout: "inline-flex", size: "xs", weight: "medium", border: "subtle", rounded: "full", padding: "pill-sm-tall", surface: "muted", color: "muted", children: brand }))] })), bundleMemberships.length > 0 && (_jsx(Row, { gap: "sm", wrap: true, children: bundleMemberships.map((b) => (_jsxs(Link, { href: String(ROUTES.PUBLIC.BUNDLE_DETAIL(b.id)), className: CLS_BUNDLE_PILL, children: [_jsx(Span, { "aria-hidden": "true", children: "\uD83D\uDCE6" }), "In bundle: ", b.title] }, b.id))) })), _jsx(ProductFeatureBadges, { featured: featured, freeShipping: freeShipping, codAvailable: codEnabled === true, condition: condition ?? undefined, returnable: returnPolicy != null && returnPolicy.length > 0, labels: {
266
266
  featured: "Featured",
267
267
  fasterDelivery: "Faster Delivery",
268
268
  ratedSeller: "Rated Seller",