@mohasinac/appkit 2.7.36 → 2.7.37
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.
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +1 -1
- package/dist/_internal/client/features/seller/print-center/InventoryLabel.d.ts +12 -0
- package/dist/_internal/client/features/seller/print-center/InventoryLabel.js +49 -0
- package/dist/_internal/client/features/seller/print-center/LabelDesignPicker.d.ts +7 -0
- package/dist/_internal/client/features/seller/print-center/LabelDesignPicker.js +32 -0
- package/dist/_internal/client/features/seller/print-center/OrderPackingLabel.d.ts +28 -0
- package/dist/_internal/client/features/seller/print-center/OrderPackingLabel.js +33 -0
- package/dist/_internal/client/features/seller/print-center/PhysicalLocationModal.d.ts +12 -0
- package/dist/_internal/client/features/seller/print-center/PhysicalLocationModal.js +30 -0
- package/dist/_internal/client/features/seller/print-center/PrintCenterView.d.ts +12 -0
- package/dist/_internal/client/features/seller/print-center/PrintCenterView.js +102 -0
- package/dist/_internal/client/features/seller/print-center/PrintGrid.d.ts +12 -0
- package/dist/_internal/client/features/seller/print-center/PrintGrid.js +13 -0
- package/dist/_internal/client/features/seller/print-center/StoreCard.d.ts +19 -0
- package/dist/_internal/client/features/seller/print-center/StoreCard.js +30 -0
- package/dist/_internal/client/features/seller/print-center/WebsiteCard.d.ts +11 -0
- package/dist/_internal/client/features/seller/print-center/WebsiteCard.js +25 -0
- package/dist/_internal/client/features/seller/print-center/index.d.ts +11 -0
- package/dist/_internal/client/features/seller/print-center/index.js +10 -0
- package/dist/_internal/client/features/seller/print-center/types.d.ts +20 -0
- package/dist/_internal/client/features/seller/print-center/types.js +20 -0
- package/dist/_internal/client/features/seller/print-center/useInventoryPdf.d.ts +18 -0
- package/dist/_internal/client/features/seller/print-center/useInventoryPdf.js +76 -0
- package/dist/_internal/server/jobs/core/draftPrune.d.ts +2 -0
- package/dist/_internal/server/jobs/core/draftPrune.js +15 -0
- package/dist/_internal/server/jobs/core/onBidPlaced.js +1 -1
- package/dist/_internal/server/jobs/core/promotions.d.ts +1 -0
- package/dist/_internal/server/jobs/core/promotions.js +21 -6
- package/dist/_internal/server/jobs/handlers/assignSpinPrize.js +18 -1
- package/dist/_internal/server/jobs/handlers/draftPrune.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/draftPrune.js +2 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
- package/dist/_internal/server/jobs/handlers/index.js +2 -0
- package/dist/_internal/server/jobs/handlers/triggerEventRaffle.js +15 -1
- package/dist/_internal/shared/actions/action-registry.js +32 -0
- package/dist/_internal/shared/features/blog/schema.d.ts +8 -8
- package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +10 -10
- package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
- package/dist/_internal/shared/features/products/schema.d.ts +8 -8
- package/dist/_internal/shared/features/promotions/schema.d.ts +6 -6
- package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
- package/dist/client.d.ts +11 -1
- package/dist/client.js +6 -1
- package/dist/configs/next.js +1 -0
- package/dist/constants/api-endpoints.d.ts +6 -0
- package/dist/constants/api-endpoints.js +2 -0
- package/dist/core/server-action.d.ts +4 -0
- package/dist/errors/error-codes.d.ts +18 -0
- package/dist/errors/error-codes.js +18 -0
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/messages.d.ts +1 -0
- package/dist/errors/messages.js +1 -0
- package/dist/features/account/components/UserSidebar.js +1 -1
- package/dist/features/account/schemas/index.d.ts +12 -12
- package/dist/features/admin/components/AdminSidebar.js +1 -1
- package/dist/features/auctions/actions/bid-actions.js +13 -6
- package/dist/features/auctions/components/PlaceBidFormClient.js +10 -2
- package/dist/features/auctions/repository/bid.repository.d.ts +7 -0
- package/dist/features/auctions/repository/bid.repository.js +16 -0
- package/dist/features/auctions/schemas/index.d.ts +18 -18
- package/dist/features/auth/schemas/index.d.ts +2 -2
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/actions/blog-actions.d.ts +32 -32
- package/dist/features/blog/components/BlogPostForm.js +1 -1
- package/dist/features/blog/schemas/index.d.ts +38 -38
- package/dist/features/categories/schemas/index.d.ts +10 -10
- package/dist/features/collections/schemas/index.d.ts +4 -4
- package/dist/features/consultation/schemas/index.d.ts +9 -9
- package/dist/features/corporate/schemas/index.d.ts +4 -4
- package/dist/features/events/schemas/index.d.ts +50 -50
- package/dist/features/faq/actions/faq-actions.d.ts +6 -6
- package/dist/features/faq/schemas/index.d.ts +8 -8
- package/dist/features/homepage/actions/homepage-section-actions.d.ts +4 -4
- package/dist/features/layout/AppLayoutShell.js +1 -1
- package/dist/features/layout/AutoBreadcrumbs.js +1 -1
- package/dist/features/media/AvatarUpload.js +1 -1
- package/dist/features/media/types/index.d.ts +4 -4
- package/dist/features/media/upload/ImageUpload.js +18 -9
- package/dist/features/media/upload/MediaUploadList.js +2 -2
- package/dist/features/orders/schemas/firestore.d.ts +6 -0
- package/dist/features/orders/schemas/index.d.ts +10 -10
- package/dist/features/orders/types/index.d.ts +5 -0
- package/dist/features/payments/schemas/index.d.ts +4 -4
- package/dist/features/pre-orders/schemas/index.d.ts +8 -8
- package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
- package/dist/features/products/components/ProductForm.js +20 -2
- package/dist/features/products/repository/products.repository.d.ts +3 -1
- package/dist/features/products/repository/products.repository.js +12 -1
- package/dist/features/products/schemas/firestore.d.ts +7 -0
- package/dist/features/products/schemas/index.d.ts +34 -34
- package/dist/features/products/schemas/product-features.validators.d.ts +6 -6
- package/dist/features/products/types/index.d.ts +6 -0
- package/dist/features/promotions/schemas/index.d.ts +14 -14
- package/dist/features/reviews/schemas/index.d.ts +18 -18
- package/dist/features/seller/actions/offer-actions.js +10 -1
- package/dist/features/seller/components/PhysicalLocationModal.d.ts +12 -0
- package/dist/features/seller/components/PhysicalLocationModal.js +30 -0
- package/dist/features/seller/components/PrintCenterView.d.ts +40 -0
- package/dist/features/seller/components/PrintCenterView.js +6 -0
- package/dist/features/seller/components/SellerOrdersView.js +48 -3
- package/dist/features/seller/components/SellerProductShell.d.ts +1 -0
- package/dist/features/seller/components/SellerProductShell.js +26 -4
- package/dist/features/seller/components/SellerProductsView.js +54 -13
- package/dist/features/seller/components/SellerSidebar.js +1 -1
- package/dist/features/seller/components/index.d.ts +1 -0
- package/dist/features/seller/components/index.js +1 -0
- package/dist/features/seller/schemas/firestore.d.ts +2 -0
- package/dist/features/seller/schemas/firestore.js +1 -0
- package/dist/features/seller/schemas/index.d.ts +22 -22
- package/dist/features/shell/FormShell.js +1 -1
- package/dist/features/shell/StepForm.d.ts +3 -1
- package/dist/features/shell/StepForm.js +3 -3
- package/dist/features/stores/schemas/index.d.ts +4 -4
- package/dist/index.d.ts +9 -1
- package/dist/index.js +6 -1
- package/dist/next/routing/route-map.d.ts +8 -0
- package/dist/next/routing/route-map.js +3 -0
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/RowActionMenu.js +45 -10
- package/dist/ui/components/SideDrawer.style.css +2 -2
- package/dist/ui/forms/FieldCheckbox.d.ts +13 -0
- package/dist/ui/forms/FieldCheckbox.js +25 -0
- package/dist/ui/forms/FieldInput.d.ts +11 -0
- package/dist/ui/forms/FieldInput.js +25 -0
- package/dist/ui/forms/FieldSelect.d.ts +17 -0
- package/dist/ui/forms/FieldSelect.js +25 -0
- package/dist/ui/forms/FormShell.d.ts +48 -0
- package/dist/ui/forms/FormShell.js +176 -0
- package/dist/ui/forms/FormShell.style.css +287 -0
- package/dist/ui/forms/index.d.ts +8 -0
- package/dist/ui/forms/index.js +4 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +5 -0
- package/dist/utils/action-response.d.ts +6 -0
- package/dist/utils/action-response.js +22 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/validation/schemas.d.ts +10 -10
- package/package.json +2 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState, useCallback } from "react";
|
|
3
|
+
const MM_TO_PT = 2.8346;
|
|
4
|
+
export function useInventoryPdf({ products = [], orders = [], storeCards = [], websiteCards = [], design, publicBaseUrl, brandName = "", }) {
|
|
5
|
+
const [isGenerating, setIsGenerating] = useState(false);
|
|
6
|
+
const downloadPdf = useCallback(async () => {
|
|
7
|
+
setIsGenerating(true);
|
|
8
|
+
try {
|
|
9
|
+
const [{ jsPDF }, qrcode, jsbarcodeModule] = await Promise.all([
|
|
10
|
+
import("jspdf"),
|
|
11
|
+
import("qrcode"),
|
|
12
|
+
import("jsbarcode"),
|
|
13
|
+
]);
|
|
14
|
+
const JsBarcode = jsbarcodeModule.default;
|
|
15
|
+
const wPt = design.size.widthMm * MM_TO_PT;
|
|
16
|
+
const hPt = design.size.heightMm * MM_TO_PT;
|
|
17
|
+
const pdf = new jsPDF({
|
|
18
|
+
orientation: wPt > hPt ? "landscape" : "portrait",
|
|
19
|
+
unit: "pt",
|
|
20
|
+
format: [wPt, hPt],
|
|
21
|
+
});
|
|
22
|
+
let isFirst = true;
|
|
23
|
+
const genQr = (url) => qrcode.toDataURL(url, { width: 80, margin: 1 });
|
|
24
|
+
const genBarcode = (value) => {
|
|
25
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
26
|
+
JsBarcode(svg, value, { format: "CODE128", width: 1, height: 25, displayValue: false });
|
|
27
|
+
const xml = new XMLSerializer().serializeToString(svg);
|
|
28
|
+
return "data:image/svg+xml;base64," + btoa(xml);
|
|
29
|
+
};
|
|
30
|
+
const addPage = async (title, subtitle, qrUrl, barcodeValue, id) => {
|
|
31
|
+
if (!isFirst)
|
|
32
|
+
pdf.addPage([wPt, hPt]);
|
|
33
|
+
isFirst = false;
|
|
34
|
+
const qr = await genQr(qrUrl);
|
|
35
|
+
const barSvg = genBarcode(barcodeValue);
|
|
36
|
+
pdf.setFontSize(6);
|
|
37
|
+
pdf.setTextColor(150, 150, 150);
|
|
38
|
+
if (brandName)
|
|
39
|
+
pdf.text(brandName, 5, 9);
|
|
40
|
+
pdf.setFontSize(8);
|
|
41
|
+
pdf.setTextColor(20, 20, 20);
|
|
42
|
+
pdf.text(title.slice(0, 50), 5, 18);
|
|
43
|
+
if (subtitle) {
|
|
44
|
+
pdf.setFontSize(6);
|
|
45
|
+
pdf.setTextColor(100, 100, 100);
|
|
46
|
+
pdf.text(subtitle.slice(0, 60), 5, 25);
|
|
47
|
+
}
|
|
48
|
+
if (design.show.barcode) {
|
|
49
|
+
pdf.addImage(barSvg, "SVG", 5, hPt - 20, wPt * 0.6, 12);
|
|
50
|
+
}
|
|
51
|
+
pdf.addImage(qr, "PNG", wPt - 30, hPt - 32, 26, 26);
|
|
52
|
+
pdf.setFontSize(5);
|
|
53
|
+
pdf.setTextColor(180, 180, 180);
|
|
54
|
+
pdf.text(id, wPt / 2, hPt - 3, { align: "center" });
|
|
55
|
+
};
|
|
56
|
+
for (const p of products) {
|
|
57
|
+
const priceStr = p.price != null ? `Rs.${(p.price / 100).toFixed(2)}` : "";
|
|
58
|
+
await addPage(p.title, priceStr, `${publicBaseUrl}/products/${p.id}`, p.id, p.id);
|
|
59
|
+
}
|
|
60
|
+
for (const o of orders) {
|
|
61
|
+
await addPage(`Order: ${o.id}`, `${o.items.length} item(s)`, `${publicBaseUrl}/store/orders/${o.id}/view`, o.id, o.id);
|
|
62
|
+
}
|
|
63
|
+
for (const s of storeCards) {
|
|
64
|
+
await addPage(s.storeName, s.storeDescription?.slice(0, 60) ?? "", `${publicBaseUrl}/stores/${s.id}`, s.id, s.id);
|
|
65
|
+
}
|
|
66
|
+
for (const s of websiteCards) {
|
|
67
|
+
await addPage(brandName ? `${brandName} - ${s.storeName}` : s.storeName, "Scan to shop", `${publicBaseUrl}/stores/${s.id}`, s.id, s.id);
|
|
68
|
+
}
|
|
69
|
+
pdf.save(`labels-${Date.now()}.pdf`);
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
setIsGenerating(false);
|
|
73
|
+
}
|
|
74
|
+
}, [products, orders, storeCards, websiteCards, design, publicBaseUrl]);
|
|
75
|
+
return { downloadPdf, isGenerating };
|
|
76
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { productRepository } from "../../../../repositories";
|
|
2
|
+
import { batchDelete } from "../handlers/_helpers";
|
|
3
|
+
const DRAFT_TTL_DAYS = 30;
|
|
4
|
+
export async function runDraftPrune(ctx) {
|
|
5
|
+
ctx.logger.info(`Pruning product drafts older than ${DRAFT_TTL_DAYS} days`);
|
|
6
|
+
const cutoff = new Date();
|
|
7
|
+
cutoff.setDate(cutoff.getDate() - DRAFT_TTL_DAYS);
|
|
8
|
+
const refs = await productRepository.getStaleDraftRefs(cutoff);
|
|
9
|
+
if (refs.length === 0) {
|
|
10
|
+
ctx.logger.info("No stale drafts found");
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const deleted = await batchDelete(ctx, refs);
|
|
14
|
+
ctx.logger.info("Draft prune complete", { deleted });
|
|
15
|
+
}
|
|
@@ -17,7 +17,7 @@ export async function handleBidPlaced(input, ctx) {
|
|
|
17
17
|
outbidUserId = prevWinning.data.userId;
|
|
18
18
|
bidRepository.markOutbid(batch, prevWinning.ref);
|
|
19
19
|
}
|
|
20
|
-
productRepository.incrementBidCountInBatch(batch, newBid.productId, newBid.bidAmount);
|
|
20
|
+
productRepository.incrementBidCountInBatch(batch, newBid.productId, newBid.bidAmount, newBid.userId);
|
|
21
21
|
await batch.commit();
|
|
22
22
|
if (outbidUserId) {
|
|
23
23
|
const outbidMessage = BID_MESSAGES.OUTBID_MESSAGE(newBid.productTitle, newBid.currency, newBid.bidAmount);
|
|
@@ -9,7 +9,7 @@ export async function runPromotions(_input, ctx) {
|
|
|
9
9
|
ctx.logger.info("Promotions data requested");
|
|
10
10
|
const now = new Date();
|
|
11
11
|
const nowIso = now.toISOString();
|
|
12
|
-
const [
|
|
12
|
+
const [promotedSettled, featuredSettled, couponsSettled] = await Promise.allSettled([
|
|
13
13
|
productRepository.list({
|
|
14
14
|
filters: `status==${ProductStatusValues.PUBLISHED},isPromoted==true`,
|
|
15
15
|
sorts: "-createdAt",
|
|
@@ -29,15 +29,30 @@ export async function runPromotions(_input, ctx) {
|
|
|
29
29
|
pageSize: "50",
|
|
30
30
|
}),
|
|
31
31
|
]);
|
|
32
|
-
const
|
|
32
|
+
const partial = promotedSettled.status === "rejected" ||
|
|
33
|
+
featuredSettled.status === "rejected" ||
|
|
34
|
+
couponsSettled.status === "rejected";
|
|
35
|
+
if (partial) {
|
|
36
|
+
ctx.logger.warn("Promotions partial load — some queries failed", {
|
|
37
|
+
promoted: promotedSettled.status,
|
|
38
|
+
featured: featuredSettled.status,
|
|
39
|
+
coupons: couponsSettled.status,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
const promotedItems = promotedSettled.status === "fulfilled" ? promotedSettled.value.items : [];
|
|
43
|
+
const featuredItems = featuredSettled.status === "fulfilled" ? featuredSettled.value.items : [];
|
|
44
|
+
const couponsItems = couponsSettled.status === "fulfilled" ? couponsSettled.value.items : [];
|
|
45
|
+
const activeCoupons = couponsItems.filter((c) => !c.validity?.startDate || new Date(c.validity.startDate) <= now);
|
|
33
46
|
ctx.logger.info("Promotions loaded", {
|
|
34
|
-
promoted:
|
|
35
|
-
featured:
|
|
47
|
+
promoted: promotedItems.length,
|
|
48
|
+
featured: featuredItems.length,
|
|
36
49
|
coupons: activeCoupons.length,
|
|
50
|
+
partial,
|
|
37
51
|
});
|
|
38
52
|
return {
|
|
39
|
-
promotedProducts:
|
|
40
|
-
featuredProducts:
|
|
53
|
+
promotedProducts: promotedItems,
|
|
54
|
+
featuredProducts: featuredItems,
|
|
41
55
|
activeCoupons,
|
|
56
|
+
...(partial && { partial: true }),
|
|
42
57
|
};
|
|
43
58
|
}
|
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
import { runAssignSpinPrize, } from "../core/assignSpinPrize";
|
|
2
|
-
|
|
2
|
+
function httpError(message, status) {
|
|
3
|
+
const err = new Error(message);
|
|
4
|
+
err.httpStatus = status;
|
|
5
|
+
return err;
|
|
6
|
+
}
|
|
7
|
+
export const assignSpinPrizeHandler = async (input, ctx) => {
|
|
8
|
+
const result = await runAssignSpinPrize(input, ctx);
|
|
9
|
+
if (result.reason === "event_not_found") {
|
|
10
|
+
throw httpError("Event not found", 404);
|
|
11
|
+
}
|
|
12
|
+
if (result.reason === "entry_not_found") {
|
|
13
|
+
throw httpError("No event entry found for this user", 404);
|
|
14
|
+
}
|
|
15
|
+
if (result.reason === "no_prizes_configured") {
|
|
16
|
+
throw httpError("No spin prizes configured for this event", 422);
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
};
|
|
@@ -46,3 +46,4 @@ export { onSupportTicketUpdateHandler } from "./onSupportTicketUpdate";
|
|
|
46
46
|
export { onUserBanChangeHandler } from "./onUserBanChange";
|
|
47
47
|
export { onScamReportCreateHandler } from "./onScamReportCreate";
|
|
48
48
|
export { onScamReportUpdateHandler } from "./onScamReportUpdate";
|
|
49
|
+
export { draftPruneHandler } from "./draftPrune";
|
|
@@ -53,3 +53,5 @@ export { onUserBanChangeHandler } from "./onUserBanChange";
|
|
|
53
53
|
// SCAM8 — scam report notifications
|
|
54
54
|
export { onScamReportCreateHandler } from "./onScamReportCreate";
|
|
55
55
|
export { onScamReportUpdateHandler } from "./onScamReportUpdate";
|
|
56
|
+
// SB-UNI-Y-1 — 30-day draft prune
|
|
57
|
+
export { draftPruneHandler } from "./draftPrune";
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { runTriggerEventRaffle, } from "../core/triggerEventRaffle";
|
|
2
|
-
|
|
2
|
+
function httpError(message, status) {
|
|
3
|
+
const err = new Error(message);
|
|
4
|
+
err.httpStatus = status;
|
|
5
|
+
return err;
|
|
6
|
+
}
|
|
7
|
+
export const triggerEventRaffleHandler = async (input, ctx) => {
|
|
8
|
+
const result = await runTriggerEventRaffle(input, ctx);
|
|
9
|
+
if (result.reason === "event_not_found") {
|
|
10
|
+
throw httpError("Event not found", 404);
|
|
11
|
+
}
|
|
12
|
+
if (result.reason === "no_eligible_entries") {
|
|
13
|
+
throw httpError("No eligible entries for raffle", 422);
|
|
14
|
+
}
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
@@ -305,6 +305,38 @@ export const ACTIONS = {
|
|
|
305
305
|
kind: "primary",
|
|
306
306
|
permissions: ["seller", "admin"],
|
|
307
307
|
},
|
|
308
|
+
"print-labels": {
|
|
309
|
+
id: "store.print-labels",
|
|
310
|
+
label: "Print Labels",
|
|
311
|
+
ariaLabel: "Print inventory labels for selected products",
|
|
312
|
+
description: "Open the print page for inventory labels for the selected products.",
|
|
313
|
+
kind: "secondary",
|
|
314
|
+
permissions: ["seller", "admin"],
|
|
315
|
+
},
|
|
316
|
+
"set-location": {
|
|
317
|
+
id: "store.set-location",
|
|
318
|
+
label: "Set Location",
|
|
319
|
+
ariaLabel: "Set physical storage location for selected items",
|
|
320
|
+
description: "Assign zone, shelf, and bin for the selected inventory items.",
|
|
321
|
+
kind: "ghost",
|
|
322
|
+
permissions: ["seller", "admin"],
|
|
323
|
+
},
|
|
324
|
+
"print-packing-slips": {
|
|
325
|
+
id: "store.print-packing-slips",
|
|
326
|
+
label: "Print Packing Slips",
|
|
327
|
+
ariaLabel: "Print packing slips for selected orders",
|
|
328
|
+
description: "Open the print page for packing slip labels for the selected orders.",
|
|
329
|
+
kind: "secondary",
|
|
330
|
+
permissions: ["seller", "admin"],
|
|
331
|
+
},
|
|
332
|
+
"open-print-center": {
|
|
333
|
+
id: "store.open-print-center",
|
|
334
|
+
label: "Print Center",
|
|
335
|
+
ariaLabel: "Open the Print & Label Center",
|
|
336
|
+
description: "Open the Print & Label Center for this store.",
|
|
337
|
+
kind: "ghost",
|
|
338
|
+
permissions: ["seller", "admin"],
|
|
339
|
+
},
|
|
308
340
|
},
|
|
309
341
|
BLOG: {},
|
|
310
342
|
EVENT: {
|
|
@@ -14,11 +14,11 @@ export declare const blogPostInputSchema: z.ZodObject<{
|
|
|
14
14
|
metaDescription: z.ZodOptional<z.ZodString>;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
16
|
status: "draft" | "published";
|
|
17
|
-
title: string;
|
|
18
|
-
content: string;
|
|
19
17
|
category: string;
|
|
18
|
+
title: string;
|
|
20
19
|
slug: string;
|
|
21
20
|
tags: string[];
|
|
21
|
+
content: string;
|
|
22
22
|
isFeatured: boolean;
|
|
23
23
|
youtubeId?: string | undefined;
|
|
24
24
|
coverImage?: string | undefined;
|
|
@@ -26,10 +26,10 @@ export declare const blogPostInputSchema: z.ZodObject<{
|
|
|
26
26
|
metaTitle?: string | undefined;
|
|
27
27
|
metaDescription?: string | undefined;
|
|
28
28
|
}, {
|
|
29
|
-
title: string;
|
|
30
|
-
content: string;
|
|
31
29
|
category: string;
|
|
30
|
+
title: string;
|
|
32
31
|
slug: string;
|
|
32
|
+
content: string;
|
|
33
33
|
status?: "draft" | "published" | undefined;
|
|
34
34
|
youtubeId?: string | undefined;
|
|
35
35
|
tags?: string[] | undefined;
|
|
@@ -54,11 +54,11 @@ export declare const blogPostUpdateSchema: z.ZodObject<Omit<{
|
|
|
54
54
|
metaDescription: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
55
55
|
}, "slug">, "strip", z.ZodTypeAny, {
|
|
56
56
|
status?: "draft" | "published" | undefined;
|
|
57
|
-
title?: string | undefined;
|
|
58
|
-
content?: string | undefined;
|
|
59
57
|
youtubeId?: string | undefined;
|
|
60
58
|
category?: string | undefined;
|
|
59
|
+
title?: string | undefined;
|
|
61
60
|
tags?: string[] | undefined;
|
|
61
|
+
content?: string | undefined;
|
|
62
62
|
isFeatured?: boolean | undefined;
|
|
63
63
|
coverImage?: string | undefined;
|
|
64
64
|
excerpt?: string | undefined;
|
|
@@ -66,11 +66,11 @@ export declare const blogPostUpdateSchema: z.ZodObject<Omit<{
|
|
|
66
66
|
metaDescription?: string | undefined;
|
|
67
67
|
}, {
|
|
68
68
|
status?: "draft" | "published" | undefined;
|
|
69
|
-
title?: string | undefined;
|
|
70
|
-
content?: string | undefined;
|
|
71
69
|
youtubeId?: string | undefined;
|
|
72
70
|
category?: string | undefined;
|
|
71
|
+
title?: string | undefined;
|
|
73
72
|
tags?: string[] | undefined;
|
|
73
|
+
content?: string | undefined;
|
|
74
74
|
isFeatured?: boolean | undefined;
|
|
75
75
|
coverImage?: string | undefined;
|
|
76
76
|
excerpt?: string | undefined;
|
|
@@ -39,23 +39,23 @@ export declare const bundleQueryRuleSchema: z.ZodDiscriminatedUnion<"type", [z.Z
|
|
|
39
39
|
orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
|
|
40
40
|
limit: z.ZodNumber;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
type: "dynamic";
|
|
42
43
|
filter: {
|
|
43
44
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
44
45
|
brandSlug?: string | undefined;
|
|
45
46
|
tags?: string[] | undefined;
|
|
46
47
|
categorySlug?: string | undefined;
|
|
47
48
|
};
|
|
48
|
-
type: "dynamic";
|
|
49
49
|
limit: number;
|
|
50
50
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
51
51
|
}, {
|
|
52
|
+
type: "dynamic";
|
|
52
53
|
filter: {
|
|
53
54
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
54
55
|
brandSlug?: string | undefined;
|
|
55
56
|
tags?: string[] | undefined;
|
|
56
57
|
categorySlug?: string | undefined;
|
|
57
58
|
};
|
|
58
|
-
type: "dynamic";
|
|
59
59
|
limit: number;
|
|
60
60
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
61
61
|
}>]>;
|
|
@@ -113,23 +113,23 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
113
113
|
orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
|
|
114
114
|
limit: z.ZodNumber;
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
type: "dynamic";
|
|
116
117
|
filter: {
|
|
117
118
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
118
119
|
brandSlug?: string | undefined;
|
|
119
120
|
tags?: string[] | undefined;
|
|
120
121
|
categorySlug?: string | undefined;
|
|
121
122
|
};
|
|
122
|
-
type: "dynamic";
|
|
123
123
|
limit: number;
|
|
124
124
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
125
125
|
}, {
|
|
126
|
+
type: "dynamic";
|
|
126
127
|
filter: {
|
|
127
128
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
128
129
|
brandSlug?: string | undefined;
|
|
129
130
|
tags?: string[] | undefined;
|
|
130
131
|
categorySlug?: string | undefined;
|
|
131
132
|
};
|
|
132
|
-
type: "dynamic";
|
|
133
133
|
limit: number;
|
|
134
134
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
135
135
|
}>]>;
|
|
@@ -168,13 +168,13 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
168
168
|
type: "static";
|
|
169
169
|
productIds: string[];
|
|
170
170
|
} | {
|
|
171
|
+
type: "dynamic";
|
|
171
172
|
filter: {
|
|
172
173
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
173
174
|
brandSlug?: string | undefined;
|
|
174
175
|
tags?: string[] | undefined;
|
|
175
176
|
categorySlug?: string | undefined;
|
|
176
177
|
};
|
|
177
|
-
type: "dynamic";
|
|
178
178
|
limit: number;
|
|
179
179
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
180
180
|
};
|
|
@@ -199,13 +199,13 @@ export declare const bundleCreateSchema: z.ZodObject<{
|
|
|
199
199
|
type: "static";
|
|
200
200
|
productIds: string[];
|
|
201
201
|
} | {
|
|
202
|
+
type: "dynamic";
|
|
202
203
|
filter: {
|
|
203
204
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
204
205
|
brandSlug?: string | undefined;
|
|
205
206
|
tags?: string[] | undefined;
|
|
206
207
|
categorySlug?: string | undefined;
|
|
207
208
|
};
|
|
208
|
-
type: "dynamic";
|
|
209
209
|
limit: number;
|
|
210
210
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
211
211
|
};
|
|
@@ -258,23 +258,23 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
258
258
|
orderBy: z.ZodOptional<z.ZodEnum<["price-asc", "price-desc", "createdAt-desc"]>>;
|
|
259
259
|
limit: z.ZodNumber;
|
|
260
260
|
}, "strip", z.ZodTypeAny, {
|
|
261
|
+
type: "dynamic";
|
|
261
262
|
filter: {
|
|
262
263
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
263
264
|
brandSlug?: string | undefined;
|
|
264
265
|
tags?: string[] | undefined;
|
|
265
266
|
categorySlug?: string | undefined;
|
|
266
267
|
};
|
|
267
|
-
type: "dynamic";
|
|
268
268
|
limit: number;
|
|
269
269
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
270
270
|
}, {
|
|
271
|
+
type: "dynamic";
|
|
271
272
|
filter: {
|
|
272
273
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
273
274
|
brandSlug?: string | undefined;
|
|
274
275
|
tags?: string[] | undefined;
|
|
275
276
|
categorySlug?: string | undefined;
|
|
276
277
|
};
|
|
277
|
-
type: "dynamic";
|
|
278
278
|
limit: number;
|
|
279
279
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
280
280
|
}>]>>;
|
|
@@ -319,13 +319,13 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
319
319
|
type: "static";
|
|
320
320
|
productIds: string[];
|
|
321
321
|
} | {
|
|
322
|
+
type: "dynamic";
|
|
322
323
|
filter: {
|
|
323
324
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
324
325
|
brandSlug?: string | undefined;
|
|
325
326
|
tags?: string[] | undefined;
|
|
326
327
|
categorySlug?: string | undefined;
|
|
327
328
|
};
|
|
328
|
-
type: "dynamic";
|
|
329
329
|
limit: number;
|
|
330
330
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
331
331
|
} | undefined;
|
|
@@ -349,13 +349,13 @@ export declare const bundleUpdateSchema: z.ZodObject<{
|
|
|
349
349
|
type: "static";
|
|
350
350
|
productIds: string[];
|
|
351
351
|
} | {
|
|
352
|
+
type: "dynamic";
|
|
352
353
|
filter: {
|
|
353
354
|
listingType?: "standard" | "pre-order" | "prize-draw" | undefined;
|
|
354
355
|
brandSlug?: string | undefined;
|
|
355
356
|
tags?: string[] | undefined;
|
|
356
357
|
categorySlug?: string | undefined;
|
|
357
358
|
};
|
|
358
|
-
type: "dynamic";
|
|
359
359
|
limit: number;
|
|
360
360
|
orderBy?: "price-asc" | "price-desc" | "createdAt-desc" | undefined;
|
|
361
361
|
} | undefined;
|
|
@@ -27,17 +27,17 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
27
27
|
phone: string;
|
|
28
28
|
state: string;
|
|
29
29
|
city: string;
|
|
30
|
-
pincode: string;
|
|
31
|
-
fullName: string;
|
|
32
30
|
addressLine1: string;
|
|
31
|
+
fullName: string;
|
|
32
|
+
pincode: string;
|
|
33
33
|
addressLine2?: string | undefined;
|
|
34
34
|
}, {
|
|
35
35
|
phone: string;
|
|
36
36
|
state: string;
|
|
37
37
|
city: string;
|
|
38
|
-
pincode: string;
|
|
39
|
-
fullName: string;
|
|
40
38
|
addressLine1: string;
|
|
39
|
+
fullName: string;
|
|
40
|
+
pincode: string;
|
|
41
41
|
country?: string | undefined;
|
|
42
42
|
addressLine2?: string | undefined;
|
|
43
43
|
}>;
|
|
@@ -55,9 +55,9 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
55
55
|
phone: string;
|
|
56
56
|
state: string;
|
|
57
57
|
city: string;
|
|
58
|
-
pincode: string;
|
|
59
|
-
fullName: string;
|
|
60
58
|
addressLine1: string;
|
|
59
|
+
fullName: string;
|
|
60
|
+
pincode: string;
|
|
61
61
|
addressLine2?: string | undefined;
|
|
62
62
|
};
|
|
63
63
|
couponCode?: string | undefined;
|
|
@@ -72,9 +72,9 @@ export declare const createOrderSchema: z.ZodObject<{
|
|
|
72
72
|
phone: string;
|
|
73
73
|
state: string;
|
|
74
74
|
city: string;
|
|
75
|
-
pincode: string;
|
|
76
|
-
fullName: string;
|
|
77
75
|
addressLine1: string;
|
|
76
|
+
fullName: string;
|
|
77
|
+
pincode: string;
|
|
78
78
|
country?: string | undefined;
|
|
79
79
|
addressLine2?: string | undefined;
|
|
80
80
|
};
|
|
@@ -25,8 +25,8 @@ export declare const productInputSchema: z.ZodObject<{
|
|
|
25
25
|
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
27
|
currency: string;
|
|
28
|
-
title: string;
|
|
29
28
|
category: string;
|
|
29
|
+
title: string;
|
|
30
30
|
price: number;
|
|
31
31
|
stockQuantity: number;
|
|
32
32
|
availableQuantity: number;
|
|
@@ -48,8 +48,8 @@ export declare const productInputSchema: z.ZodObject<{
|
|
|
48
48
|
allowOffers?: boolean | undefined;
|
|
49
49
|
minOfferPercent?: number | undefined;
|
|
50
50
|
}, {
|
|
51
|
-
title: string;
|
|
52
51
|
category: string;
|
|
52
|
+
title: string;
|
|
53
53
|
price: number;
|
|
54
54
|
mainImage: string;
|
|
55
55
|
currency?: string | undefined;
|
|
@@ -98,8 +98,8 @@ export declare const productUpdateSchema: z.ZodObject<{
|
|
|
98
98
|
features: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
100
|
currency?: string | undefined;
|
|
101
|
-
title?: string | undefined;
|
|
102
101
|
category?: string | undefined;
|
|
102
|
+
title?: string | undefined;
|
|
103
103
|
description?: string | undefined;
|
|
104
104
|
seoTitle?: string | undefined;
|
|
105
105
|
seoDescription?: string | undefined;
|
|
@@ -122,8 +122,8 @@ export declare const productUpdateSchema: z.ZodObject<{
|
|
|
122
122
|
minOfferPercent?: number | undefined;
|
|
123
123
|
}, {
|
|
124
124
|
currency?: string | undefined;
|
|
125
|
-
title?: string | undefined;
|
|
126
125
|
category?: string | undefined;
|
|
126
|
+
title?: string | undefined;
|
|
127
127
|
description?: string | undefined;
|
|
128
128
|
seoTitle?: string | undefined;
|
|
129
129
|
seoDescription?: string | undefined;
|
|
@@ -181,9 +181,9 @@ export declare const auctionInputSchema: z.ZodObject<{
|
|
|
181
181
|
auctionShippingPaidBy: z.ZodOptional<z.ZodEnum<["seller", "winner"]>>;
|
|
182
182
|
}, "strip", z.ZodTypeAny, {
|
|
183
183
|
currency: string;
|
|
184
|
-
title: string;
|
|
185
184
|
category: string;
|
|
186
185
|
listingType: "auction";
|
|
186
|
+
title: string;
|
|
187
187
|
price: number;
|
|
188
188
|
stockQuantity: number;
|
|
189
189
|
availableQuantity: number;
|
|
@@ -213,9 +213,9 @@ export declare const auctionInputSchema: z.ZodObject<{
|
|
|
213
213
|
allowOffers?: boolean | undefined;
|
|
214
214
|
minOfferPercent?: number | undefined;
|
|
215
215
|
}, {
|
|
216
|
-
title: string;
|
|
217
216
|
category: string;
|
|
218
217
|
listingType: "auction";
|
|
218
|
+
title: string;
|
|
219
219
|
price: number;
|
|
220
220
|
mainImage: string;
|
|
221
221
|
auctionEndDate: string;
|
|
@@ -279,9 +279,9 @@ export declare const preOrderInputSchema: z.ZodObject<{
|
|
|
279
279
|
preOrderCancellable: z.ZodDefault<z.ZodBoolean>;
|
|
280
280
|
}, "strip", z.ZodTypeAny, {
|
|
281
281
|
currency: string;
|
|
282
|
-
title: string;
|
|
283
282
|
category: string;
|
|
284
283
|
listingType: "pre-order";
|
|
284
|
+
title: string;
|
|
285
285
|
price: number;
|
|
286
286
|
stockQuantity: number;
|
|
287
287
|
availableQuantity: number;
|
|
@@ -308,9 +308,9 @@ export declare const preOrderInputSchema: z.ZodObject<{
|
|
|
308
308
|
allowOffers?: boolean | undefined;
|
|
309
309
|
minOfferPercent?: number | undefined;
|
|
310
310
|
}, {
|
|
311
|
-
title: string;
|
|
312
311
|
category: string;
|
|
313
312
|
listingType: "pre-order";
|
|
313
|
+
title: string;
|
|
314
314
|
price: number;
|
|
315
315
|
mainImage: string;
|
|
316
316
|
preOrderDeliveryDate: string;
|
|
@@ -77,10 +77,10 @@ export declare const createCouponSchema: z.ZodObject<{
|
|
|
77
77
|
applicableCategories?: string[] | undefined;
|
|
78
78
|
}>>;
|
|
79
79
|
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
code: string;
|
|
81
80
|
type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
|
|
82
|
-
|
|
81
|
+
code: string;
|
|
83
82
|
name: string;
|
|
83
|
+
scope: "seller" | "admin";
|
|
84
84
|
discount: {
|
|
85
85
|
value: number;
|
|
86
86
|
minPurchase: number;
|
|
@@ -103,10 +103,10 @@ export declare const createCouponSchema: z.ZodObject<{
|
|
|
103
103
|
applicableCategories?: string[] | undefined;
|
|
104
104
|
} | undefined;
|
|
105
105
|
}, {
|
|
106
|
-
code: string;
|
|
107
106
|
type: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y";
|
|
108
|
-
|
|
107
|
+
code: string;
|
|
109
108
|
name: string;
|
|
109
|
+
scope: "seller" | "admin";
|
|
110
110
|
discount: {
|
|
111
111
|
value: number;
|
|
112
112
|
maxDiscount?: number | undefined;
|
|
@@ -189,8 +189,8 @@ export declare const updateCouponSchema: z.ZodObject<Omit<{
|
|
|
189
189
|
}>>>;
|
|
190
190
|
}, "code">, "strip", z.ZodTypeAny, {
|
|
191
191
|
type?: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y" | undefined;
|
|
192
|
-
scope?: "seller" | "admin" | undefined;
|
|
193
192
|
name?: string | undefined;
|
|
193
|
+
scope?: "seller" | "admin" | undefined;
|
|
194
194
|
sellerId?: string | undefined;
|
|
195
195
|
discount?: {
|
|
196
196
|
value: number;
|
|
@@ -214,8 +214,8 @@ export declare const updateCouponSchema: z.ZodObject<Omit<{
|
|
|
214
214
|
} | undefined;
|
|
215
215
|
}, {
|
|
216
216
|
type?: "fixed" | "percentage" | "free_shipping" | "buy_x_get_y" | undefined;
|
|
217
|
-
scope?: "seller" | "admin" | undefined;
|
|
218
217
|
name?: string | undefined;
|
|
218
|
+
scope?: "seller" | "admin" | undefined;
|
|
219
219
|
sellerId?: string | undefined;
|
|
220
220
|
discount?: {
|
|
221
221
|
value: number;
|
|
@@ -10,8 +10,8 @@ export declare const createReviewSchema: z.ZodObject<{
|
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
storeId: string;
|
|
12
12
|
title: string;
|
|
13
|
-
body: string;
|
|
14
13
|
images: string[];
|
|
14
|
+
body: string;
|
|
15
15
|
productId: string;
|
|
16
16
|
rating: number;
|
|
17
17
|
orderId?: string | undefined;
|
|
@@ -21,8 +21,8 @@ export declare const createReviewSchema: z.ZodObject<{
|
|
|
21
21
|
body: string;
|
|
22
22
|
productId: string;
|
|
23
23
|
rating: number;
|
|
24
|
-
orderId?: string | undefined;
|
|
25
24
|
images?: string[] | undefined;
|
|
25
|
+
orderId?: string | undefined;
|
|
26
26
|
}>;
|
|
27
27
|
export declare const replyToReviewSchema: z.ZodObject<{
|
|
28
28
|
reviewId: z.ZodString;
|