@mohasinac/appkit 4.14.0 → 4.16.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 (206) hide show
  1. package/dist/_internal/server/features/auctions/actions.js +2 -2
  2. package/dist/_internal/server/features/cart/service.d.ts +3 -3
  3. package/dist/_internal/server/features/checkout/actions.js +19 -0
  4. package/dist/_internal/server/features/checkout/source-context.d.ts +5 -0
  5. package/dist/_internal/server/features/checkout/source-context.js +157 -0
  6. package/dist/_internal/server/features/offers/adapters.d.ts +103 -0
  7. package/dist/_internal/server/features/offers/adapters.js +88 -0
  8. package/dist/_internal/server/features/offers/index.d.ts +2 -0
  9. package/dist/_internal/server/features/offers/index.js +1 -0
  10. package/dist/_internal/server/features/orders/adapters.js +24 -0
  11. package/dist/_internal/server/jobs/core/offerExpiry.js +10 -10
  12. package/dist/_internal/shared/actions/action-registry.d.ts +9 -2
  13. package/dist/_internal/shared/actions/action-registry.js +458 -7
  14. package/dist/_internal/shared/features/auctions/schema.d.ts +14 -2
  15. package/dist/_internal/shared/features/auctions/schema.js +13 -1
  16. package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
  17. package/dist/_internal/shared/features/cart/schema.d.ts +25 -20
  18. package/dist/_internal/shared/features/cart/schema.js +15 -0
  19. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +22 -22
  20. package/dist/_internal/shared/features/orders/schema.d.ts +4 -4
  21. package/dist/_internal/shared/features/products/schema.d.ts +27 -27
  22. package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
  23. package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
  24. package/dist/_internal/shared/history/history.d.ts +22 -0
  25. package/dist/_internal/shared/history/history.js +41 -1
  26. package/dist/client.d.ts +13 -2
  27. package/dist/client.js +20 -2
  28. package/dist/constants/field-names.d.ts +8 -6
  29. package/dist/constants/field-names.js +48 -6
  30. package/dist/contracts/extend.d.ts +29 -0
  31. package/dist/contracts/extend.js +20 -0
  32. package/dist/contracts/index.d.ts +2 -1
  33. package/dist/contracts/index.js +2 -0
  34. package/dist/features/account/components/UserBidsView.js +12 -4
  35. package/dist/features/account/components/UserReturnsView.d.ts +3 -0
  36. package/dist/features/account/components/UserReturnsView.js +17 -1
  37. package/dist/features/admin/components/AdminAuditLogView.js +1 -0
  38. package/dist/features/admin/components/AdminBidsView.js +15 -2
  39. package/dist/features/admin/components/AdminBlogEditorView.js +65 -33
  40. package/dist/features/admin/components/AdminFeatureEditorView.js +35 -6
  41. package/dist/features/admin/components/AdminNavEditorView.js +15 -5
  42. package/dist/features/admin/components/AdminNewsletterView.js +18 -2
  43. package/dist/features/admin/components/AdminOffersView.js +62 -18
  44. package/dist/features/admin/components/AdminPaymentMethodsView.js +24 -4
  45. package/dist/features/admin/components/AdminScammerEditorView.d.ts +2 -1
  46. package/dist/features/admin/components/AdminScammerEditorView.js +3 -13
  47. package/dist/features/admin/components/AdminScammersView.js +3 -8
  48. package/dist/features/admin/components/AdminSectionsView.js +32 -23
  49. package/dist/features/admin/components/AdminSessionsView.js +17 -2
  50. package/dist/features/admin/components/AdminViewCards.js +24 -17
  51. package/dist/features/admin/components/DataListingView.js +15 -1
  52. package/dist/features/admin/components/DataTable.js +7 -17
  53. package/dist/features/admin/components/ViewAuditLogEntryModal.js +1 -0
  54. package/dist/features/admin/components/sections/adminSectionsTypes.d.ts +4 -2
  55. package/dist/features/admin/components/sections/adminSectionsTypes.js +45 -27
  56. package/dist/features/admin/constants/filter-tabs.d.ts +3 -0
  57. package/dist/features/admin/constants/filter-tabs.js +1 -0
  58. package/dist/features/admin/schemas/homepage-section-form.d.ts +22 -0
  59. package/dist/features/admin/schemas/homepage-section-form.js +68 -0
  60. package/dist/features/admin/schemas/nav-item-form.d.ts +74 -0
  61. package/dist/features/admin/schemas/nav-item-form.js +72 -0
  62. package/dist/features/auctions/components/AuctionBidsTable.d.ts +10 -1
  63. package/dist/features/auctions/components/AuctionBidsTable.js +22 -4
  64. package/dist/features/auctions/components/bid-detail-fields.d.ts +29 -0
  65. package/dist/features/auctions/components/bid-detail-fields.js +103 -0
  66. package/dist/features/auctions/schemas/index.d.ts +14 -14
  67. package/dist/features/audit-log/schemas/firestore.d.ts +14 -0
  68. package/dist/features/audit-log/schemas/firestore.js +7 -0
  69. package/dist/features/auth/schemas/index.d.ts +2 -2
  70. package/dist/features/blog/actions/blog-actions.d.ts +7 -7
  71. package/dist/features/blog/schemas/blog-form.d.ts +80 -0
  72. package/dist/features/blog/schemas/blog-form.js +100 -0
  73. package/dist/features/blog/schemas/index.d.ts +10 -10
  74. package/dist/features/cart/schemas/index.d.ts +3 -3
  75. package/dist/features/catalogue/schemas/validation.d.ts +12 -12
  76. package/dist/features/categories/schemas/index.d.ts +16 -16
  77. package/dist/features/collections/schemas/index.d.ts +8 -8
  78. package/dist/features/events/components/AdminEventEditorView.js +32 -54
  79. package/dist/features/events/components/AdminEventEntriesView.js +22 -3
  80. package/dist/features/events/schemas/event-form.d.ts +113 -0
  81. package/dist/features/events/schemas/event-form.js +82 -0
  82. package/dist/features/events/schemas/index.d.ts +2 -2
  83. package/dist/features/faq/actions/faq-actions.d.ts +6 -6
  84. package/dist/features/faq/schemas/index.d.ts +6 -6
  85. package/dist/features/grouped/schemas/grouped-listing-form.d.ts +101 -0
  86. package/dist/features/grouped/schemas/grouped-listing-form.js +89 -0
  87. package/dist/features/grouped/schemas/index.d.ts +4 -4
  88. package/dist/features/homepage/actions/homepage-section-actions.d.ts +11 -3
  89. package/dist/features/homepage/actions/homepage-section-actions.js +33 -1
  90. package/dist/features/homepage/schemas/index.d.ts +71 -40
  91. package/dist/features/homepage/schemas/index.js +24 -0
  92. package/dist/features/messages/schemas/index.d.ts +2 -2
  93. package/dist/features/orders/components/OrderStatusTimeline.d.ts +5 -1
  94. package/dist/features/orders/components/OrderStatusTimeline.js +39 -20
  95. package/dist/features/orders/repository/orders.repository.js +5 -0
  96. package/dist/features/orders/schemas/firestore.d.ts +36 -1
  97. package/dist/features/orders/schemas/index.d.ts +24 -24
  98. package/dist/features/orders/types/index.d.ts +35 -7
  99. package/dist/features/pre-orders/schemas/index.d.ts +4 -4
  100. package/dist/features/products/components/GroupSettingsPanel.js +5 -1
  101. package/dist/features/products/schemas/index.d.ts +38 -38
  102. package/dist/features/products/schemas/product-features.validators.d.ts +75 -2
  103. package/dist/features/products/schemas/product-features.validators.js +63 -0
  104. package/dist/features/promotions/schemas/index.d.ts +14 -14
  105. package/dist/features/reviews/schemas/index.d.ts +14 -14
  106. package/dist/features/scams/constants/scammer-status-display.d.ts +28 -0
  107. package/dist/features/scams/constants/scammer-status-display.js +79 -0
  108. package/dist/features/scams/schemas/index.d.ts +2 -2
  109. package/dist/features/search/schemas/index.d.ts +2 -2
  110. package/dist/features/seller/actions/offer-actions.js +32 -2
  111. package/dist/features/seller/components/OfferPhaseTimeline.d.ts +59 -0
  112. package/dist/features/seller/components/OfferPhaseTimeline.js +107 -0
  113. package/dist/features/seller/components/SellerBidsView.js +11 -4
  114. package/dist/features/seller/components/SellerCouponEditorView.js +17 -17
  115. package/dist/features/seller/components/SellerOffersView.js +2 -1
  116. package/dist/features/seller/components/SellerPayoutSettingsView.js +38 -14
  117. package/dist/features/seller/repository/offer.repository.d.ts +69 -8
  118. package/dist/features/seller/repository/offer.repository.js +127 -23
  119. package/dist/features/seller/schemas/coupon-form.d.ts +72 -0
  120. package/dist/features/seller/schemas/coupon-form.js +116 -0
  121. package/dist/features/seller/schemas/firestore.d.ts +56 -2
  122. package/dist/features/seller/schemas/firestore.js +27 -0
  123. package/dist/features/seller/schemas/index.d.ts +2 -2
  124. package/dist/features/seller/schemas/offer-forms.d.ts +21 -0
  125. package/dist/features/seller/schemas/offer-forms.js +21 -0
  126. package/dist/features/shell/build-sections.d.ts +63 -0
  127. package/dist/features/shell/build-sections.js +207 -0
  128. package/dist/features/shell/field-ui-meta.d.ts +115 -0
  129. package/dist/features/shell/field-ui-meta.js +324 -0
  130. package/dist/features/shell/index.d.ts +4 -0
  131. package/dist/features/shell/index.js +2 -0
  132. package/dist/features/shipments/schemas/validation.d.ts +22 -22
  133. package/dist/features/status-history/components/StatusTimeline.d.ts +74 -0
  134. package/dist/features/status-history/components/StatusTimeline.js +46 -0
  135. package/dist/features/status-history/index.d.ts +11 -0
  136. package/dist/features/status-history/index.js +10 -0
  137. package/dist/features/store-extensions/components/ReviewDecisionModal.d.ts +27 -0
  138. package/dist/features/store-extensions/components/ReviewDecisionModal.js +82 -0
  139. package/dist/features/store-extensions/index.d.ts +12 -0
  140. package/dist/features/store-extensions/index.js +12 -0
  141. package/dist/features/store-extensions/schemas/admin-notification-form.d.ts +36 -0
  142. package/dist/features/store-extensions/schemas/admin-notification-form.js +114 -0
  143. package/dist/features/store-extensions/schemas/analytics-forms.d.ts +57 -0
  144. package/dist/features/store-extensions/schemas/analytics-forms.js +158 -0
  145. package/dist/features/store-extensions/schemas/custom-role-form.d.ts +85 -0
  146. package/dist/features/store-extensions/schemas/custom-role-form.js +118 -0
  147. package/dist/features/store-extensions/schemas/firestore.d.ts +21 -1
  148. package/dist/features/store-extensions/schemas/firestore.js +60 -0
  149. package/dist/features/store-extensions/schemas/google-config-form.d.ts +53 -0
  150. package/dist/features/store-extensions/schemas/google-config-form.js +105 -0
  151. package/dist/features/store-extensions/schemas/item-request-create-form.d.ts +28 -0
  152. package/dist/features/store-extensions/schemas/item-request-create-form.js +80 -0
  153. package/dist/features/store-extensions/schemas/listing-template-form.d.ts +78 -0
  154. package/dist/features/store-extensions/schemas/listing-template-form.js +87 -0
  155. package/dist/features/store-extensions/schemas/moderation-review-form.d.ts +49 -0
  156. package/dist/features/store-extensions/schemas/moderation-review-form.js +101 -0
  157. package/dist/features/store-extensions/schemas/payout-method-form.d.ts +153 -0
  158. package/dist/features/store-extensions/schemas/payout-method-form.js +155 -0
  159. package/dist/features/store-extensions/schemas/report-create-form.d.ts +25 -0
  160. package/dist/features/store-extensions/schemas/report-create-form.js +79 -0
  161. package/dist/features/store-extensions/schemas/report-review-form.d.ts +47 -0
  162. package/dist/features/store-extensions/schemas/report-review-form.js +111 -0
  163. package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +148 -0
  164. package/dist/features/store-extensions/schemas/shipping-config-form.js +104 -0
  165. package/dist/features/store-extensions/schemas/store-category-form.d.ts +54 -0
  166. package/dist/features/store-extensions/schemas/store-category-form.js +73 -0
  167. package/dist/features/stores/schemas/index.d.ts +4 -4
  168. package/dist/features/support/schemas/index.d.ts +4 -4
  169. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +350 -0
  170. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  171. package/dist/index.d.ts +12 -2
  172. package/dist/index.js +12 -2
  173. package/dist/next/routing/route-map.d.ts +16 -2
  174. package/dist/next/routing/route-map.js +9 -2
  175. package/dist/schemas/firestore-value.d.ts +8 -0
  176. package/dist/schemas/firestore-value.js +44 -0
  177. package/dist/schemas/index.d.ts +1 -1
  178. package/dist/schemas/index.js +1 -1
  179. package/dist/schemas/registry.d.ts +734 -101
  180. package/dist/schemas/registry.js +64 -1
  181. package/dist/seed/bids-seed-data.js +30 -0
  182. package/dist/seed/offers-seed-data.js +212 -7
  183. package/dist/seed/orders-seed-data.js +336 -1
  184. package/dist/seed/products-auctions-seed-data.js +41 -0
  185. package/dist/server.d.ts +2 -0
  186. package/dist/server.js +5 -0
  187. package/dist/styles.css +1 -1
  188. package/dist/tailwind-utilities.css +1 -1
  189. package/dist/ui/DataTable.js +4 -2
  190. package/dist/ui/columns/build-columns.d.ts +6 -1
  191. package/dist/ui/columns/build-columns.js +53 -0
  192. package/dist/ui/columns/cell-renderers.d.ts +68 -0
  193. package/dist/ui/columns/cell-renderers.js +111 -0
  194. package/dist/ui/columns/column-renderers.d.ts +6 -1
  195. package/dist/ui/columns/column-renderers.js +6 -1
  196. package/dist/ui/columns/index.d.ts +2 -1
  197. package/dist/ui/columns/index.js +5 -1
  198. package/dist/ui/components/Button.js +27 -2
  199. package/dist/ui/components/RecordDetailModal.d.ts +10 -1
  200. package/dist/ui/components/RecordDetailModal.js +2 -2
  201. package/dist/ui/icons/icon-registry.d.ts +65 -0
  202. package/dist/ui/icons/icon-registry.js +115 -0
  203. package/package.json +2 -1
  204. package/scripts/node-esm-loader.mjs +65 -0
  205. package/scripts/seed-cli-loader.mjs +6 -49
  206. package/scripts/seed-cli.mjs +1 -1
@@ -0,0 +1,80 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * The blog form's own schema. Distinct from `blogPostSchema` (blog/schemas),
4
+ * which requires an `id` this draft cannot have before its first save and
5
+ * models `coverImage` as a `MediaField` where the form holds a plain URL.
6
+ *
7
+ * ## Why `.passthrough()` is gone
8
+ *
9
+ * It used to name FOUR of the draft's fourteen fields and rely on passthrough
10
+ * to keep the other ten alive. That is the single most dangerous shape in this
11
+ * codebase — `z.object()` strips unknown keys, so the moment anyone tightened
12
+ * it, ten fields would vanish on the next save with no error. Verified safe to
13
+ * remove here: every one of the fourteen is now named, and the save payload
14
+ * (below) maps each explicitly rather than spreading the draft, so there is no
15
+ * extra key for passthrough to have been protecting.
16
+ *
17
+ * ## Section, row and control come from the field itself
18
+ *
19
+ * 🛑 `annotate()` must be the OUTERMOST call — it keys a WeakMap by schema
20
+ * instance and every zod wrapper returns a new one, so
21
+ * `annotate(z.string(), …).optional()` silently loses the metadata and drops
22
+ * the field into the "advanced" fallback. `audit-field-ui-meta` blocks it.
23
+ */
24
+ export declare const blogDraftSchema: z.ZodObject<{
25
+ title: z.ZodString;
26
+ /**
27
+ * NO `blog-` prefix. Surfaced by `roundtrip-diff` in W4: the schema demanded
28
+ * `/^blog-/`, and **all 20 stored posts fail it** — every seeded post holds
29
+ * the bare slug (`spot-genuine-takara-tomy-beyblade`) while only the
30
+ * DOCUMENT ID carries the prefix (`generateBlogPostId` adds it).
31
+ *
32
+ * `BlogRepository.findBySlug` queries this field directly, so the public URL
33
+ * is the bare slug. The regex therefore broke the editor from both ends:
34
+ * opening any existing post flagged its slug invalid, and "fixing" it to
35
+ * satisfy the rule would rewrite the stored slug and 404 the live URL.
36
+ */
37
+ slug: z.ZodString;
38
+ excerpt: z.ZodString;
39
+ content: z.ZodString;
40
+ coverImage: z.ZodString;
41
+ youtubeId: z.ZodString;
42
+ category: z.ZodEnum<["news", "tips", "guides", "updates", "community"]>;
43
+ tags: z.ZodArray<z.ZodString, "many">;
44
+ metaTitle: z.ZodString;
45
+ metaDescription: z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>;
46
+ status: z.ZodEnum<["draft", "published", "archived"]>;
47
+ publishedAt: z.ZodString;
48
+ authorName: z.ZodString;
49
+ isFeatured: z.ZodBoolean;
50
+ }, "strip", z.ZodTypeAny, {
51
+ status: "draft" | "published" | "archived";
52
+ title: string;
53
+ content: string;
54
+ category: "news" | "tips" | "guides" | "updates" | "community";
55
+ publishedAt: string;
56
+ slug: string;
57
+ youtubeId: string;
58
+ tags: string[];
59
+ isFeatured: boolean;
60
+ excerpt: string;
61
+ coverImage: string;
62
+ authorName: string;
63
+ metaTitle: string;
64
+ metaDescription: string;
65
+ }, {
66
+ status: "draft" | "published" | "archived";
67
+ title: string;
68
+ content: string;
69
+ category: "news" | "tips" | "guides" | "updates" | "community";
70
+ publishedAt: string;
71
+ slug: string;
72
+ youtubeId: string;
73
+ tags: string[];
74
+ isFeatured: boolean;
75
+ excerpt: string;
76
+ coverImage: string;
77
+ authorName: string;
78
+ metaTitle: string;
79
+ metaDescription: string;
80
+ }>;
@@ -0,0 +1,100 @@
1
+ /*
2
+ * WHY: The blog form's schema used to live inside `AdminBlogEditorView.tsx`.
3
+ * Registering it in `SCHEMAS.forms` from there would have made
4
+ * `schemas/registry.ts` import a `.tsx` component — and `routeHandler.ts`
5
+ * imports SCHEMAS, so every API route would have pulled the admin blog
6
+ * editor's whole React tree into the server bundle. Schemas belong in
7
+ * `schemas/`; that is the layering this restores.
8
+ * WHAT: The blog editor's form schema, with its UI metadata.
9
+ *
10
+ * EXPORTS:
11
+ * blogDraftSchema
12
+ *
13
+ * @tag domain:blog
14
+ * @tag layer:schema
15
+ * @tag pattern:none
16
+ * @tag access:isomorphic
17
+ * @tag consumers:AdminBlogEditorView,SCHEMAS.forms
18
+ * @tag sideEffects:none
19
+ */
20
+ import { z } from "zod";
21
+ import { annotate } from "../../shell/field-ui-meta";
22
+ import { blogPostCategorySchema } from "./index";
23
+ /**
24
+ * The blog form's own schema. Distinct from `blogPostSchema` (blog/schemas),
25
+ * which requires an `id` this draft cannot have before its first save and
26
+ * models `coverImage` as a `MediaField` where the form holds a plain URL.
27
+ *
28
+ * ## Why `.passthrough()` is gone
29
+ *
30
+ * It used to name FOUR of the draft's fourteen fields and rely on passthrough
31
+ * to keep the other ten alive. That is the single most dangerous shape in this
32
+ * codebase — `z.object()` strips unknown keys, so the moment anyone tightened
33
+ * it, ten fields would vanish on the next save with no error. Verified safe to
34
+ * remove here: every one of the fourteen is now named, and the save payload
35
+ * (below) maps each explicitly rather than spreading the draft, so there is no
36
+ * extra key for passthrough to have been protecting.
37
+ *
38
+ * ## Section, row and control come from the field itself
39
+ *
40
+ * 🛑 `annotate()` must be the OUTERMOST call — it keys a WeakMap by schema
41
+ * instance and every zod wrapper returns a new one, so
42
+ * `annotate(z.string(), …).optional()` silently loses the metadata and drops
43
+ * the field into the "advanced" fallback. `audit-field-ui-meta` blocks it.
44
+ */
45
+ export const blogDraftSchema = z.object({
46
+ title: annotate(z.string().min(1, "Title is required"), {
47
+ section: "content", sectionLabel: "Content", sectionRequired: true,
48
+ quick: true, order: 1, row: "full",
49
+ }),
50
+ /**
51
+ * NO `blog-` prefix. Surfaced by `roundtrip-diff` in W4: the schema demanded
52
+ * `/^blog-/`, and **all 20 stored posts fail it** — every seeded post holds
53
+ * the bare slug (`spot-genuine-takara-tomy-beyblade`) while only the
54
+ * DOCUMENT ID carries the prefix (`generateBlogPostId` adds it).
55
+ *
56
+ * `BlogRepository.findBySlug` queries this field directly, so the public URL
57
+ * is the bare slug. The regex therefore broke the editor from both ends:
58
+ * opening any existing post flagged its slug invalid, and "fixing" it to
59
+ * satisfy the rule would rewrite the stored slug and 404 the live URL.
60
+ */
61
+ slug: annotate(z.string().min(1, "Slug is required"), {
62
+ section: "content", quick: true, order: 2, row: "full",
63
+ // T1 calculated: derived from the title on CREATE only, then frozen.
64
+ // Recomputing on rename would break every inbound link and bookmark —
65
+ // categories, brands and bundles all establish that convention.
66
+ tier: "t1-derive",
67
+ help: "Auto-filled from the title. Changing it after publishing breaks existing links.",
68
+ }),
69
+ excerpt: annotate(z.string().max(300, "Keep the excerpt under 300 characters."), {
70
+ section: "content", order: 3, row: "full",
71
+ }),
72
+ content: annotate(z.string().min(1, "Content is required"), {
73
+ section: "content", quick: true, order: 4, row: "full",
74
+ }),
75
+ coverImage: annotate(z.string(), {
76
+ section: "media", sectionLabel: "Media", order: 1, row: "full", kind: "media",
77
+ }),
78
+ youtubeId: annotate(z.string(), {
79
+ section: "media", order: 2, row: "full",
80
+ help: "A YouTube video id or watch URL — rendered as a privacy-mode embed.",
81
+ }),
82
+ category: annotate(blogPostCategorySchema, {
83
+ section: "seo", sectionLabel: "SEO & Tags", quick: true, order: 1, row: "pair",
84
+ }),
85
+ tags: annotate(z.array(z.string()), {
86
+ section: "seo", order: 2, row: "full", kind: "list",
87
+ }),
88
+ metaTitle: annotate(z.string().max(60, "Keep the meta title under 60 characters."), {
89
+ section: "seo", order: 3, row: "full", tier: "t1-derive",
90
+ }),
91
+ metaDescription: annotate(z.string().max(160, "Keep the meta description under 160 characters.").or(z.literal("")), { section: "seo", order: 4, row: "full", tier: "t1-derive" }),
92
+ status: annotate(z.enum(["draft", "published", "archived"]), {
93
+ section: "publish", sectionLabel: "Publish", quick: true, order: 1, row: "pair",
94
+ }),
95
+ publishedAt: annotate(z.string(), {
96
+ section: "publish", order: 2, row: "pair", kind: "date",
97
+ }),
98
+ authorName: annotate(z.string(), { section: "publish", order: 3, row: "pair" }),
99
+ isFeatured: annotate(z.boolean(), { section: "publish", order: 4, row: "quarter" }),
100
+ });
@@ -125,15 +125,15 @@ export declare const blogPostFirestoreSchema: z.ZodObject<{
125
125
  updatedAt: string | Date | z.objectOutputType<{
126
126
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
127
127
  }, z.ZodTypeAny, "passthrough">;
128
- slug: string;
129
128
  category: string;
129
+ slug: string;
130
+ views: number;
130
131
  tags: string[];
131
132
  isFeatured: boolean;
132
133
  excerpt: string;
133
134
  authorId: string;
134
135
  authorName: string;
135
136
  readTimeMinutes: number;
136
- views: number;
137
137
  publishedAt?: string | Date | z.objectOutputType<{
138
138
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
139
139
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -178,15 +178,15 @@ export declare const blogPostFirestoreSchema: z.ZodObject<{
178
178
  updatedAt: string | Date | z.objectInputType<{
179
179
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
180
180
  }, z.ZodTypeAny, "passthrough">;
181
- slug: string;
182
181
  category: string;
182
+ slug: string;
183
+ views: number;
183
184
  tags: string[];
184
185
  isFeatured: boolean;
185
186
  excerpt: string;
186
187
  authorId: string;
187
188
  authorName: string;
188
189
  readTimeMinutes: number;
189
- views: number;
190
190
  publishedAt?: string | Date | z.objectInputType<{
191
191
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
192
192
  }, z.ZodTypeAny, "passthrough"> | undefined;
@@ -358,8 +358,8 @@ export declare const blogPostSchema: z.ZodObject<{
358
358
  status: "draft" | "published" | "archived";
359
359
  id: string;
360
360
  title: string;
361
- slug: string;
362
361
  category: "news" | "tips" | "guides" | "updates" | "community";
362
+ slug: string;
363
363
  coverImage: {
364
364
  type: "video" | "image" | "file";
365
365
  url: string;
@@ -393,14 +393,14 @@ export declare const blogPostSchema: z.ZodObject<{
393
393
  content?: string | undefined;
394
394
  createdAt?: string | undefined;
395
395
  updatedAt?: string | undefined;
396
- tags?: string[] | undefined;
397
396
  publishedAt?: string | undefined;
397
+ views?: number | undefined;
398
+ tags?: string[] | undefined;
398
399
  isFeatured?: boolean | undefined;
399
400
  excerpt?: string | undefined;
400
401
  authorId?: string | undefined;
401
402
  authorName?: string | undefined;
402
403
  readTimeMinutes?: number | undefined;
403
- views?: number | undefined;
404
404
  metaTitle?: string | undefined;
405
405
  metaDescription?: string | undefined;
406
406
  authorAvatar?: string | undefined;
@@ -408,13 +408,14 @@ export declare const blogPostSchema: z.ZodObject<{
408
408
  status: "draft" | "published" | "archived";
409
409
  id: string;
410
410
  title: string;
411
- slug: string;
412
411
  category: "news" | "tips" | "guides" | "updates" | "community";
412
+ slug: string;
413
413
  content?: string | undefined;
414
414
  createdAt?: string | undefined;
415
415
  updatedAt?: string | undefined;
416
- tags?: string[] | undefined;
417
416
  publishedAt?: string | undefined;
417
+ views?: number | undefined;
418
+ tags?: string[] | undefined;
418
419
  isFeatured?: boolean | undefined;
419
420
  excerpt?: string | undefined;
420
421
  coverImage?: string | {
@@ -429,7 +430,6 @@ export declare const blogPostSchema: z.ZodObject<{
429
430
  authorId?: string | undefined;
430
431
  authorName?: string | undefined;
431
432
  readTimeMinutes?: number | undefined;
432
- views?: number | undefined;
433
433
  additionalImages?: {
434
434
  type: "video" | "image" | "file";
435
435
  url: string;
@@ -57,8 +57,8 @@ export declare const cartItemSchema: z.ZodObject<{
57
57
  addedAt: z.ZodOptional<z.ZodString>;
58
58
  }, "strip", z.ZodTypeAny, {
59
59
  id: string;
60
- productId: string;
61
60
  quantity: number;
61
+ productId: string;
62
62
  meta?: {
63
63
  currency: string;
64
64
  title: string;
@@ -113,8 +113,8 @@ export declare const cartSummarySchema: z.ZodObject<{
113
113
  addedAt: z.ZodOptional<z.ZodString>;
114
114
  }, "strip", z.ZodTypeAny, {
115
115
  id: string;
116
- productId: string;
117
116
  quantity: number;
117
+ productId: string;
118
118
  meta?: {
119
119
  currency: string;
120
120
  title: string;
@@ -147,8 +147,8 @@ export declare const cartSummarySchema: z.ZodObject<{
147
147
  currency: string;
148
148
  items: {
149
149
  id: string;
150
- productId: string;
151
150
  quantity: number;
151
+ productId: string;
152
152
  meta?: {
153
153
  currency: string;
154
154
  title: string;
@@ -12,25 +12,25 @@ export declare const createCatalogueItemSchema: z.ZodObject<{
12
12
  visibility: z.ZodDefault<z.ZodEnum<["public", "private"]>>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  title: string;
15
- images: string[];
16
15
  quantity: number;
16
+ images: string[];
17
17
  visibility: "public" | "private";
18
+ price?: number | undefined;
19
+ brandSlug?: string | undefined;
18
20
  description?: string | undefined;
19
21
  categorySlugs?: string[] | undefined;
20
- brandSlug?: string | undefined;
21
- price?: number | undefined;
22
22
  mainImage?: string | undefined;
23
23
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
24
24
  }, {
25
25
  title: string;
26
+ price?: number | undefined;
27
+ brandSlug?: string | undefined;
28
+ quantity?: number | undefined;
26
29
  description?: string | undefined;
27
30
  categorySlugs?: string[] | undefined;
28
- brandSlug?: string | undefined;
29
- price?: number | undefined;
30
31
  mainImage?: string | undefined;
31
32
  images?: string[] | undefined;
32
33
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
33
- quantity?: number | undefined;
34
34
  visibility?: "public" | "private" | undefined;
35
35
  }>;
36
36
  export declare const updateCatalogueItemSchema: z.ZodObject<{
@@ -46,25 +46,25 @@ export declare const updateCatalogueItemSchema: z.ZodObject<{
46
46
  visibility: z.ZodOptional<z.ZodDefault<z.ZodEnum<["public", "private"]>>>;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  title?: string | undefined;
49
+ price?: number | undefined;
50
+ brandSlug?: string | undefined;
51
+ quantity?: number | undefined;
49
52
  description?: string | undefined;
50
53
  categorySlugs?: string[] | undefined;
51
- brandSlug?: string | undefined;
52
- price?: number | undefined;
53
54
  mainImage?: string | undefined;
54
55
  images?: string[] | undefined;
55
56
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
56
- quantity?: number | undefined;
57
57
  visibility?: "public" | "private" | undefined;
58
58
  }, {
59
59
  title?: string | undefined;
60
+ price?: number | undefined;
61
+ brandSlug?: string | undefined;
62
+ quantity?: number | undefined;
60
63
  description?: string | undefined;
61
64
  categorySlugs?: string[] | undefined;
62
- brandSlug?: string | undefined;
63
- price?: number | undefined;
64
65
  mainImage?: string | undefined;
65
66
  images?: string[] | undefined;
66
67
  condition?: "new" | "used" | "refurbished" | "like_new" | "good" | "fair" | "poor" | "broken" | "graded" | undefined;
67
- quantity?: number | undefined;
68
68
  visibility?: "public" | "private" | undefined;
69
69
  }>;
70
70
  export type CreateCatalogueItemInput = z.infer<typeof createCatalogueItemSchema>;
@@ -106,35 +106,35 @@ export declare const bundleQueryRuleSchema: z.ZodDiscriminatedUnion<"type", [z.Z
106
106
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
107
107
  listingType: z.ZodOptional<z.ZodEnum<["standard", "pre-order", "prize-draw"]>>;
108
108
  }, "strip", z.ZodTypeAny, {
109
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
109
110
  categorySlug?: string | undefined;
110
111
  brandSlug?: string | undefined;
111
112
  tags?: string[] | undefined;
112
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
113
113
  }, {
114
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
114
115
  categorySlug?: string | undefined;
115
116
  brandSlug?: string | undefined;
116
117
  tags?: string[] | undefined;
117
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
118
118
  }>;
119
119
  orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
120
120
  limit: z.ZodNumber;
121
121
  }, "strip", z.ZodTypeAny, {
122
122
  type: "dynamic";
123
123
  filter: {
124
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
124
125
  categorySlug?: string | undefined;
125
126
  brandSlug?: string | undefined;
126
127
  tags?: string[] | undefined;
127
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
128
128
  };
129
129
  limit: number;
130
130
  orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
131
131
  }, {
132
132
  type: "dynamic";
133
133
  filter: {
134
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
134
135
  categorySlug?: string | undefined;
135
136
  brandSlug?: string | undefined;
136
137
  tags?: string[] | undefined;
137
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
138
138
  };
139
139
  limit: number;
140
140
  orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
@@ -260,35 +260,35 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
260
260
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
261
261
  listingType: z.ZodOptional<z.ZodEnum<["standard", "pre-order", "prize-draw"]>>;
262
262
  }, "strip", z.ZodTypeAny, {
263
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
263
264
  categorySlug?: string | undefined;
264
265
  brandSlug?: string | undefined;
265
266
  tags?: string[] | undefined;
266
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
267
267
  }, {
268
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
268
269
  categorySlug?: string | undefined;
269
270
  brandSlug?: string | undefined;
270
271
  tags?: string[] | undefined;
271
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
272
272
  }>;
273
273
  orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
274
274
  limit: z.ZodNumber;
275
275
  }, "strip", z.ZodTypeAny, {
276
276
  type: "dynamic";
277
277
  filter: {
278
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
278
279
  categorySlug?: string | undefined;
279
280
  brandSlug?: string | undefined;
280
281
  tags?: string[] | undefined;
281
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
282
282
  };
283
283
  limit: number;
284
284
  orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
285
285
  }, {
286
286
  type: "dynamic";
287
287
  filter: {
288
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
288
289
  categorySlug?: string | undefined;
289
290
  brandSlug?: string | undefined;
290
291
  tags?: string[] | undefined;
291
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
292
292
  };
293
293
  limit: number;
294
294
  orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
@@ -394,9 +394,9 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
394
394
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
395
395
  }, z.ZodTypeAny, "passthrough">;
396
396
  slug: string;
397
+ createdBy: string;
397
398
  isActive: boolean;
398
399
  order: number;
399
- createdBy: string;
400
400
  isFeatured: boolean;
401
401
  rootId: string;
402
402
  tier: number;
@@ -430,12 +430,12 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
430
430
  name: string;
431
431
  tier: number;
432
432
  }[];
433
+ brandSlug?: string | undefined;
433
434
  faqs?: {
434
435
  question: string;
435
436
  answer: string;
436
437
  }[] | undefined;
437
438
  description?: string | undefined;
438
- brandSlug?: string | undefined;
439
439
  showOnHomepage?: boolean | undefined;
440
440
  categoryType?: "brand" | "category" | "sublisting" | "bundle" | undefined;
441
441
  bundleKind?: "brand" | "special" | undefined;
@@ -452,7 +452,7 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
452
452
  }, z.ZodTypeAny, "passthrough"> | undefined;
453
453
  featuredPriority?: number | undefined;
454
454
  isBrand?: boolean | undefined;
455
- createdByType?: "admin" | "store" | undefined;
455
+ createdByType?: "store" | "admin" | undefined;
456
456
  createdByStoreId?: string | undefined;
457
457
  itemCode?: string | undefined;
458
458
  brandWebsite?: string | undefined;
@@ -466,10 +466,10 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
466
466
  } | {
467
467
  type: "dynamic";
468
468
  filter: {
469
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
469
470
  categorySlug?: string | undefined;
470
471
  brandSlug?: string | undefined;
471
472
  tags?: string[] | undefined;
472
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
473
473
  };
474
474
  limit: number;
475
475
  orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
@@ -493,9 +493,9 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
493
493
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
494
494
  }, z.ZodTypeAny, "passthrough">;
495
495
  slug: string;
496
+ createdBy: string;
496
497
  isActive: boolean;
497
498
  order: number;
498
- createdBy: string;
499
499
  isFeatured: boolean;
500
500
  rootId: string;
501
501
  tier: number;
@@ -529,12 +529,12 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
529
529
  name: string;
530
530
  tier: number;
531
531
  }[];
532
+ brandSlug?: string | undefined;
532
533
  faqs?: {
533
534
  question: string;
534
535
  answer: string;
535
536
  }[] | undefined;
536
537
  description?: string | undefined;
537
- brandSlug?: string | undefined;
538
538
  showOnHomepage?: boolean | undefined;
539
539
  categoryType?: "brand" | "category" | "sublisting" | "bundle" | undefined;
540
540
  bundleKind?: "brand" | "special" | undefined;
@@ -551,7 +551,7 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
551
551
  }, z.ZodTypeAny, "passthrough"> | undefined;
552
552
  featuredPriority?: number | undefined;
553
553
  isBrand?: boolean | undefined;
554
- createdByType?: "admin" | "store" | undefined;
554
+ createdByType?: "store" | "admin" | undefined;
555
555
  createdByStoreId?: string | undefined;
556
556
  itemCode?: string | undefined;
557
557
  brandWebsite?: string | undefined;
@@ -565,10 +565,10 @@ export declare const categoryFirestoreSchema: z.ZodObject<{
565
565
  } | {
566
566
  type: "dynamic";
567
567
  filter: {
568
+ listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
568
569
  categorySlug?: string | undefined;
569
570
  brandSlug?: string | undefined;
570
571
  tags?: string[] | undefined;
571
- listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
572
572
  };
573
573
  limit: number;
574
574
  orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
@@ -26,14 +26,14 @@ export declare const collectionItemSchema: z.ZodObject<{
26
26
  }, "strip", z.ZodTypeAny, {
27
27
  title: string;
28
28
  sortOrder: number;
29
- active: boolean;
30
29
  slug: string;
30
+ active: boolean;
31
31
  image?: string | undefined;
32
32
  createdAt?: string | undefined;
33
- description?: string | undefined;
34
33
  brandSlug?: string | undefined;
35
- subtitle?: string | undefined;
36
34
  productCount?: number | undefined;
35
+ description?: string | undefined;
36
+ subtitle?: string | undefined;
37
37
  bannerImage?: string | undefined;
38
38
  franchiseSlug?: string | undefined;
39
39
  manualProductIds?: string[] | undefined;
@@ -43,11 +43,11 @@ export declare const collectionItemSchema: z.ZodObject<{
43
43
  image?: string | undefined;
44
44
  createdAt?: string | undefined;
45
45
  sortOrder?: number | undefined;
46
+ brandSlug?: string | undefined;
47
+ productCount?: number | undefined;
46
48
  active?: boolean | undefined;
47
49
  description?: string | undefined;
48
- brandSlug?: string | undefined;
49
50
  subtitle?: string | undefined;
50
- productCount?: number | undefined;
51
51
  bannerImage?: string | undefined;
52
52
  franchiseSlug?: string | undefined;
53
53
  manualProductIds?: string[] | undefined;
@@ -61,16 +61,16 @@ export declare const collectionListItemSchema: z.ZodObject<{
61
61
  active: z.ZodDefault<z.ZodBoolean>;
62
62
  }, "strip", z.ZodTypeAny, {
63
63
  title: string;
64
- active: boolean;
65
64
  slug: string;
65
+ active: boolean;
66
66
  image?: string | undefined;
67
- subtitle?: string | undefined;
68
67
  productCount?: number | undefined;
68
+ subtitle?: string | undefined;
69
69
  }, {
70
70
  title: string;
71
71
  slug: string;
72
72
  image?: string | undefined;
73
+ productCount?: number | undefined;
73
74
  active?: boolean | undefined;
74
75
  subtitle?: string | undefined;
75
- productCount?: number | undefined;
76
76
  }>;