@mohasinac/appkit 4.63.3 → 4.63.5
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/.build-stamp.json +3 -3
- package/dist/_internal/server/features/checkout/actions.d.ts +2 -0
- package/dist/_internal/server/features/checkout/actions.js +22 -5
- package/dist/_internal/server/features/orders/adapters.js +3 -1
- package/dist/_internal/server/features/promotions/adapters.d.ts +25 -0
- package/dist/_internal/server/features/promotions/adapters.js +43 -0
- package/dist/_internal/server/features/promotions/data.d.ts +26 -0
- package/dist/_internal/server/features/promotions/data.js +45 -0
- package/dist/_internal/server/features/promotions/index.d.ts +2 -1
- package/dist/_internal/server/features/promotions/index.js +2 -1
- package/dist/_internal/server/features/site-settings/adapters.js +20 -2
- package/dist/_internal/server/features/stores/adapters.d.ts +1 -1
- package/dist/_internal/server/features/stores/adapters.js +1 -0
- package/dist/_internal/server/jobs/core/analyticsAlertEvaluate.js +5 -2
- package/dist/_internal/server/jobs/core/jobRunners.js +5 -0
- package/dist/_internal/server/jobs/core/onOrderCreate.js +104 -10
- package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +2 -0
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +1 -0
- package/dist/_internal/server/jobs/core/onScamReportCreate.js +1 -0
- package/dist/_internal/server/jobs/core/onScamReportRejected.js +1 -0
- package/dist/_internal/server/jobs/core/onScamReportVerified.js +1 -0
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +1 -0
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +1 -0
- package/dist/_internal/server/jobs/core/triggerEventRaffle.js +45 -14
- package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +35 -0
- package/dist/_internal/server/jobs/core/whatsappNotify.js +140 -0
- package/dist/_internal/server/notifications/channel-health.d.ts +8 -6
- package/dist/_internal/server/notifications/channel-health.js +2 -2
- package/dist/_internal/server/notifications/send-guard.d.ts +1 -1
- package/dist/_internal/server/notifications/send-guard.js +4 -2
- package/dist/_internal/shared/actions/action-registry.js +28 -0
- package/dist/_internal/shared/checkout/order-math.d.ts +1 -1
- package/dist/_internal/shared/checkout/order-math.js +1 -1
- package/dist/_internal/shared/features/checkout/config.d.ts +2 -0
- package/dist/_internal/shared/features/checkout/config.js +2 -0
- package/dist/_internal/shared/features/messaging/config.d.ts +5 -7
- package/dist/_internal/shared/features/messaging/config.js +4 -1
- package/dist/_internal/shared/features/site-settings/fees.d.ts +2 -0
- package/dist/_internal/shared/features/site-settings/fees.js +2 -0
- package/dist/_internal/shared/features/site-settings/types.d.ts +27 -2
- package/dist/_internal/shared/fees/calculator.d.ts +8 -0
- package/dist/_internal/shared/fees/calculator.js +7 -0
- package/dist/cli/index.js +2 -0
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1 -1
- package/dist/constants/api-endpoints.d.ts +15 -0
- package/dist/constants/api-endpoints.js +8 -0
- package/dist/constants/field-names.d.ts +4 -0
- package/dist/constants/field-names.js +4 -0
- package/dist/constants/notification-types.d.ts +1 -1
- package/dist/constants/notification-types.js +1 -1
- package/dist/core/integration-keys.d.ts +5 -0
- package/dist/core/integration-keys.js +10 -0
- package/dist/features/about/components/FeesView.js +6 -0
- package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
- package/dist/features/account/components/NotificationPreferencesPanel.js +4 -3
- package/dist/features/account/components/UserSidebar.js +1 -1
- package/dist/features/account/types/index.d.ts +2 -0
- package/dist/features/admin/actions/notification-actions.d.ts +17 -2
- package/dist/features/admin/actions/notification-actions.js +154 -9
- package/dist/features/admin/components/AdminBlogEditorView.js +10 -2
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +1 -1
- package/dist/features/admin/components/AdminOrdersView.js +2 -0
- package/dist/features/admin/components/AdminSiteSettingsView.js +66 -6
- package/dist/features/admin/components/AdminStoreEditorView.js +1 -0
- package/dist/features/admin/constants/site-settings-tabs.d.ts +12 -7
- package/dist/features/admin/constants/site-settings-tabs.js +12 -6
- package/dist/features/admin/repository/site-settings.repository.js +1 -1
- package/dist/features/admin/schemas/admin-user-form.d.ts +61 -0
- package/dist/features/admin/schemas/admin-user-form.js +44 -3
- package/dist/features/admin/schemas/firestore.d.ts +73 -0
- package/dist/features/admin/schemas/firestore.js +8 -3
- package/dist/features/auth/checkout-value-otp.d.ts +1 -1
- package/dist/features/auth/checkout-value-otp.js +1 -1
- package/dist/features/auth/permissions/constants.d.ts +2 -2
- package/dist/features/auth/permissions/constants.js +2 -1
- package/dist/features/blog/schemas/blog-form.d.ts +3 -0
- package/dist/features/blog/schemas/blog-form.js +14 -0
- package/dist/features/blog/schemas/firestore.d.ts +17 -0
- package/dist/features/blog/schemas/firestore.js +1 -0
- package/dist/features/blog/schemas/index.d.ts +6 -0
- package/dist/features/blog/schemas/index.js +3 -0
- package/dist/features/blog/types/index.d.ts +2 -0
- package/dist/features/cart/components/CartPriceBreakdown.d.ts +2 -0
- package/dist/features/cart/components/CartPriceBreakdown.js +1 -1
- package/dist/features/cart/components/StoreAddonsPicker.d.ts +5 -2
- package/dist/features/cart/components/StoreAddonsPicker.js +5 -4
- package/dist/features/cart/repository/cart.repository.js +2 -1
- package/dist/features/cart/schemas/firestore.d.ts +2 -1
- package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +5 -10
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +88 -2
- package/dist/features/events/components/AdminEventEditorView.js +64 -9
- package/dist/features/events/components/EventOfferCard.js +3 -18
- package/dist/features/events/components/EventRaffleWinnerView.d.ts +6 -0
- package/dist/features/events/components/EventRaffleWinnerView.js +11 -1
- package/dist/features/events/schemas/event-form.d.ts +10 -0
- package/dist/features/events/schemas/event-form.js +19 -0
- package/dist/features/events/schemas/firestore.d.ts +68 -0
- package/dist/features/events/schemas/firestore.js +25 -0
- package/dist/features/events/schemas/index.d.ts +7 -0
- package/dist/features/events/schemas/index.js +5 -0
- package/dist/features/events/types/index.d.ts +4 -0
- package/dist/features/homepage/lib/section-renderer.js +1 -1
- package/dist/features/orders/actions/refund-actions.js +1 -0
- package/dist/features/orders/components/OrderAddonBadges.d.ts +3 -1
- package/dist/features/orders/components/OrderAddonBadges.js +4 -3
- package/dist/features/orders/repository/orders.repository.d.ts +8 -0
- package/dist/features/orders/repository/orders.repository.js +2 -0
- package/dist/features/orders/schemas/firestore.d.ts +4 -0
- package/dist/features/orders/types/index.d.ts +5 -2
- package/dist/features/promotions/components/AttachedCouponsSection.d.ts +30 -0
- package/dist/features/promotions/components/AttachedCouponsSection.js +99 -0
- package/dist/features/promotions/components/CouponCodeCopyRow.d.ts +19 -0
- package/dist/features/promotions/components/CouponCodeCopyRow.js +39 -0
- package/dist/features/promotions/components/index.d.ts +4 -0
- package/dist/features/promotions/components/index.js +2 -0
- package/dist/features/promotions/constants/attached-coupons.d.ts +55 -0
- package/dist/features/promotions/constants/attached-coupons.js +24 -0
- package/dist/features/promotions/repository/coupons.repository.d.ts +20 -0
- package/dist/features/promotions/repository/coupons.repository.js +39 -0
- package/dist/features/promotions/schemas/attached-coupons.d.ts +39 -0
- package/dist/features/promotions/schemas/attached-coupons.js +66 -0
- package/dist/features/search/action-index/settings-entries.js +9 -0
- package/dist/features/store-extensions/repository/store-extensions.repositories.d.ts +6 -1
- package/dist/features/store-extensions/repository/store-extensions.repositories.js +10 -1
- package/dist/features/store-extensions/schemas/firestore.d.ts +17 -1
- package/dist/features/store-extensions/schemas/firestore.js +10 -0
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -0
- package/dist/features/stores/components/StoreGuideHubView.js +1 -1
- package/dist/features/stores/components/StoreSettingsGuideView.js +6 -2
- package/dist/features/stores/repository/store.repository.d.ts +23 -1
- package/dist/features/stores/repository/store.repository.js +29 -1
- package/dist/features/stores/schemas/firestore.d.ts +16 -6
- package/dist/features/stores/schemas/firestore.js +3 -6
- package/dist/features/stores/schemas/index.d.ts +86 -0
- package/dist/features/stores/schemas/index.js +14 -0
- package/dist/features/whatsapp-bot/api/send-status/route.d.ts +12 -0
- package/dist/features/whatsapp-bot/api/send-status/route.js +38 -0
- package/dist/features/whatsapp-bot/api/webhook/route.d.ts +12 -0
- package/dist/features/whatsapp-bot/api/webhook/route.js +43 -0
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.d.ts +57 -0
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +76 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +9 -0
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +7 -0
- package/dist/features/whatsapp-bot/components/index.d.ts +3 -0
- package/dist/features/whatsapp-bot/components/index.js +2 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +52 -0
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +288 -0
- package/dist/features/whatsapp-bot/index.d.ts +3 -0
- package/dist/features/whatsapp-bot/index.js +3 -0
- package/dist/features/whatsapp-bot/manifest.d.ts +2 -0
- package/dist/features/whatsapp-bot/manifest.js +13 -0
- package/dist/features/whatsapp-bot/messages/en.json +7 -0
- package/dist/features/whatsapp-bot/server.d.ts +7 -0
- package/dist/features/whatsapp-bot/server.js +7 -0
- package/dist/features/whatsapp-bot/types/index.d.ts +126 -0
- package/dist/features/whatsapp-bot/types/index.js +1 -0
- package/dist/index.d.ts +23 -6
- package/dist/index.js +38 -12
- package/dist/next/routing/route-map.d.ts +3 -0
- package/dist/next/routing/route-map.js +1 -0
- package/dist/providers/db-firebase/base.repository.d.ts +1 -1
- package/dist/providers/db-firebase/base.repository.js +1 -1
- package/dist/repositories/index.d.ts +1 -1
- package/dist/repositories/index.js +1 -1
- package/dist/schemas/registry.d.ts +121 -0
- package/dist/schemas/registry.js +2 -1
- package/dist/security/pii-encrypt.js +1 -1
- package/dist/server-entry.d.ts +1 -0
- package/dist/server-entry.js +2 -0
- package/dist/server.d.ts +11 -2
- package/dist/server.js +26 -2
- package/dist/styles.css +1 -1
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/NavigationLoader.d.ts +14 -1
- package/dist/ui/components/NavigationLoader.js +79 -30
- package/package.json +1 -1
- package/dist/features/orders/utils/order-announcement-message.d.ts +0 -18
- package/dist/features/orders/utils/order-announcement-message.js +0 -16
|
@@ -169,6 +169,7 @@ export declare const SCHEMAS: {
|
|
|
169
169
|
}>, "many">>;
|
|
170
170
|
category: import("zod").ZodString;
|
|
171
171
|
tags: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
172
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
172
173
|
isFeatured: import("zod").ZodBoolean;
|
|
173
174
|
isPinned: import("zod").ZodBoolean;
|
|
174
175
|
status: import("zod").ZodEnum<["draft", "published", "archived"]>;
|
|
@@ -210,6 +211,7 @@ export declare const SCHEMAS: {
|
|
|
210
211
|
publishedAt?: string | Date | import("zod").objectOutputType<{
|
|
211
212
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
212
213
|
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
214
|
+
couponIds?: string[] | undefined;
|
|
213
215
|
coverImage?: {
|
|
214
216
|
type: "video" | "image" | "file";
|
|
215
217
|
url: string;
|
|
@@ -264,6 +266,7 @@ export declare const SCHEMAS: {
|
|
|
264
266
|
publishedAt?: string | Date | import("zod").objectInputType<{
|
|
265
267
|
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
266
268
|
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
269
|
+
couponIds?: string[] | undefined;
|
|
267
270
|
coverImage?: {
|
|
268
271
|
type: "video" | "image" | "file";
|
|
269
272
|
url: string;
|
|
@@ -4283,6 +4286,60 @@ export declare const SCHEMAS: {
|
|
|
4283
4286
|
defaultProviderId: string;
|
|
4284
4287
|
}>>;
|
|
4285
4288
|
emiEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
4289
|
+
whatsappConfig: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
4290
|
+
phoneNumber: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4291
|
+
wabaId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4292
|
+
catalogId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4293
|
+
accessToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
4294
|
+
catalogSyncEnabled: import("zod").ZodBoolean;
|
|
4295
|
+
lastCatalogSyncAt: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodDate, import("zod").ZodString, import("zod").ZodObject<{
|
|
4296
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4297
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
4298
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4299
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
4300
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4301
|
+
}, import("zod").ZodTypeAny, "passthrough">>]>>;
|
|
4302
|
+
lastSyncCount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
4303
|
+
lastSyncStatus: import("zod").ZodOptional<import("zod").ZodEnum<["success", "partial", "failed"]>>;
|
|
4304
|
+
connected: import("zod").ZodBoolean;
|
|
4305
|
+
connectedAt: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodDate, import("zod").ZodString, import("zod").ZodObject<{
|
|
4306
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4307
|
+
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
4308
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4309
|
+
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
4310
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4311
|
+
}, import("zod").ZodTypeAny, "passthrough">>]>>;
|
|
4312
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
4313
|
+
catalogSyncEnabled: boolean;
|
|
4314
|
+
connected: boolean;
|
|
4315
|
+
phoneNumber?: string | undefined;
|
|
4316
|
+
accessToken?: string | undefined;
|
|
4317
|
+
wabaId?: string | undefined;
|
|
4318
|
+
catalogId?: string | undefined;
|
|
4319
|
+
lastCatalogSyncAt?: string | Date | import("zod").objectOutputType<{
|
|
4320
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4321
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4322
|
+
lastSyncCount?: number | undefined;
|
|
4323
|
+
lastSyncStatus?: "success" | "failed" | "partial" | undefined;
|
|
4324
|
+
connectedAt?: string | Date | import("zod").objectOutputType<{
|
|
4325
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4326
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4327
|
+
}, {
|
|
4328
|
+
catalogSyncEnabled: boolean;
|
|
4329
|
+
connected: boolean;
|
|
4330
|
+
phoneNumber?: string | undefined;
|
|
4331
|
+
accessToken?: string | undefined;
|
|
4332
|
+
wabaId?: string | undefined;
|
|
4333
|
+
catalogId?: string | undefined;
|
|
4334
|
+
lastCatalogSyncAt?: string | Date | import("zod").objectInputType<{
|
|
4335
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4336
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4337
|
+
lastSyncCount?: number | undefined;
|
|
4338
|
+
lastSyncStatus?: "success" | "failed" | "partial" | undefined;
|
|
4339
|
+
connectedAt?: string | Date | import("zod").objectInputType<{
|
|
4340
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4341
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4342
|
+
}>>;
|
|
4286
4343
|
}, "strip", import("zod").ZodTypeAny, {
|
|
4287
4344
|
status: "pending" | "active" | "rejected" | "suspended";
|
|
4288
4345
|
id: string;
|
|
@@ -4352,6 +4409,22 @@ export declare const SCHEMAS: {
|
|
|
4352
4409
|
maxReviews?: number | undefined;
|
|
4353
4410
|
minRating?: number | undefined;
|
|
4354
4411
|
} | undefined;
|
|
4412
|
+
whatsappConfig?: {
|
|
4413
|
+
catalogSyncEnabled: boolean;
|
|
4414
|
+
connected: boolean;
|
|
4415
|
+
phoneNumber?: string | undefined;
|
|
4416
|
+
accessToken?: string | undefined;
|
|
4417
|
+
wabaId?: string | undefined;
|
|
4418
|
+
catalogId?: string | undefined;
|
|
4419
|
+
lastCatalogSyncAt?: string | Date | import("zod").objectOutputType<{
|
|
4420
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4421
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4422
|
+
lastSyncCount?: number | undefined;
|
|
4423
|
+
lastSyncStatus?: "success" | "failed" | "partial" | undefined;
|
|
4424
|
+
connectedAt?: string | Date | import("zod").objectOutputType<{
|
|
4425
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4426
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4427
|
+
} | undefined;
|
|
4355
4428
|
}, {
|
|
4356
4429
|
status: "pending" | "active" | "rejected" | "suspended";
|
|
4357
4430
|
id: string;
|
|
@@ -4421,6 +4494,22 @@ export declare const SCHEMAS: {
|
|
|
4421
4494
|
maxReviews?: number | undefined;
|
|
4422
4495
|
minRating?: number | undefined;
|
|
4423
4496
|
} | undefined;
|
|
4497
|
+
whatsappConfig?: {
|
|
4498
|
+
catalogSyncEnabled: boolean;
|
|
4499
|
+
connected: boolean;
|
|
4500
|
+
phoneNumber?: string | undefined;
|
|
4501
|
+
accessToken?: string | undefined;
|
|
4502
|
+
wabaId?: string | undefined;
|
|
4503
|
+
catalogId?: string | undefined;
|
|
4504
|
+
lastCatalogSyncAt?: string | Date | import("zod").objectInputType<{
|
|
4505
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4506
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4507
|
+
lastSyncCount?: number | undefined;
|
|
4508
|
+
lastSyncStatus?: "success" | "failed" | "partial" | undefined;
|
|
4509
|
+
connectedAt?: string | Date | import("zod").objectInputType<{
|
|
4510
|
+
toDate: import("zod").ZodFunction<import("zod").ZodTuple<[], import("zod").ZodUnknown>, import("zod").ZodDate>;
|
|
4511
|
+
}, import("zod").ZodTypeAny, "passthrough"> | undefined;
|
|
4512
|
+
} | undefined;
|
|
4424
4513
|
}>;
|
|
4425
4514
|
readonly supportTickets: import("zod").ZodObject<{
|
|
4426
4515
|
createdAt: import("zod").ZodUnion<[import("zod").ZodDate, import("zod").ZodString, import("zod").ZodObject<{
|
|
@@ -4895,6 +4984,7 @@ export declare const SCHEMAS: {
|
|
|
4895
4984
|
authorName: import("zod").ZodString;
|
|
4896
4985
|
isFeatured: import("zod").ZodBoolean;
|
|
4897
4986
|
isPinned: import("zod").ZodBoolean;
|
|
4987
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
4898
4988
|
}, "strip", import("zod").ZodTypeAny, {
|
|
4899
4989
|
status: "published" | "draft" | "archived";
|
|
4900
4990
|
title: string;
|
|
@@ -4911,6 +5001,7 @@ export declare const SCHEMAS: {
|
|
|
4911
5001
|
isPinned: boolean;
|
|
4912
5002
|
metaTitle: string;
|
|
4913
5003
|
metaDescription: string;
|
|
5004
|
+
couponIds?: string[] | undefined;
|
|
4914
5005
|
}, {
|
|
4915
5006
|
status: "published" | "draft" | "archived";
|
|
4916
5007
|
title: string;
|
|
@@ -4927,6 +5018,7 @@ export declare const SCHEMAS: {
|
|
|
4927
5018
|
isPinned: boolean;
|
|
4928
5019
|
metaTitle: string;
|
|
4929
5020
|
metaDescription: string;
|
|
5021
|
+
couponIds?: string[] | undefined;
|
|
4930
5022
|
}>;
|
|
4931
5023
|
readonly event: import("zod").ZodEffects<import("zod").ZodObject<{
|
|
4932
5024
|
type: import("zod").ZodString;
|
|
@@ -4945,6 +5037,8 @@ export declare const SCHEMAS: {
|
|
|
4945
5037
|
id: string;
|
|
4946
5038
|
label: string;
|
|
4947
5039
|
}>, "many">;
|
|
5040
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
5041
|
+
rafflePrizeCouponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
4948
5042
|
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
4949
5043
|
type: import("zod").ZodString;
|
|
4950
5044
|
title: import("zod").ZodString;
|
|
@@ -4962,6 +5056,8 @@ export declare const SCHEMAS: {
|
|
|
4962
5056
|
id: string;
|
|
4963
5057
|
label: string;
|
|
4964
5058
|
}>, "many">;
|
|
5059
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
5060
|
+
rafflePrizeCouponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
4965
5061
|
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
4966
5062
|
type: import("zod").ZodString;
|
|
4967
5063
|
title: import("zod").ZodString;
|
|
@@ -4979,6 +5075,8 @@ export declare const SCHEMAS: {
|
|
|
4979
5075
|
id: string;
|
|
4980
5076
|
label: string;
|
|
4981
5077
|
}>, "many">;
|
|
5078
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
5079
|
+
rafflePrizeCouponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
4982
5080
|
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").objectOutputType<{
|
|
4983
5081
|
type: import("zod").ZodString;
|
|
4984
5082
|
title: import("zod").ZodString;
|
|
@@ -4996,6 +5094,8 @@ export declare const SCHEMAS: {
|
|
|
4996
5094
|
id: string;
|
|
4997
5095
|
label: string;
|
|
4998
5096
|
}>, "many">;
|
|
5097
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
5098
|
+
rafflePrizeCouponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
4999
5099
|
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
5000
5100
|
type: import("zod").ZodString;
|
|
5001
5101
|
title: import("zod").ZodString;
|
|
@@ -5013,6 +5113,8 @@ export declare const SCHEMAS: {
|
|
|
5013
5113
|
id: string;
|
|
5014
5114
|
label: string;
|
|
5015
5115
|
}>, "many">;
|
|
5116
|
+
couponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
5117
|
+
rafflePrizeCouponIds: import("zod").ZodType<string[] | undefined, import("zod").ZodTypeDef, string[] | undefined>;
|
|
5016
5118
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
5017
5119
|
readonly productFeature: import("zod").ZodEffects<import("zod").ZodObject<{
|
|
5018
5120
|
label: import("zod").ZodString;
|
|
@@ -6086,6 +6188,25 @@ export declare const SCHEMAS: {
|
|
|
6086
6188
|
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6087
6189
|
}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
6088
6190
|
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
6191
|
+
readonly whatsappSettings: import("zod").ZodObject<{
|
|
6192
|
+
catalogSyncEnabled: import("zod").ZodBoolean;
|
|
6193
|
+
phoneNumber: import("zod").ZodUnion<[import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodLiteral<"">]>;
|
|
6194
|
+
wabaId: import("zod").ZodUnion<[import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodLiteral<"">]>;
|
|
6195
|
+
catalogId: import("zod").ZodUnion<[import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodLiteral<"">]>;
|
|
6196
|
+
accessToken: import("zod").ZodUnion<[import("zod").ZodOptional<import("zod").ZodString>, import("zod").ZodLiteral<"">]>;
|
|
6197
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
6198
|
+
catalogSyncEnabled: boolean;
|
|
6199
|
+
phoneNumber?: string | undefined;
|
|
6200
|
+
accessToken?: string | undefined;
|
|
6201
|
+
wabaId?: string | undefined;
|
|
6202
|
+
catalogId?: string | undefined;
|
|
6203
|
+
}, {
|
|
6204
|
+
catalogSyncEnabled: boolean;
|
|
6205
|
+
phoneNumber?: string | undefined;
|
|
6206
|
+
accessToken?: string | undefined;
|
|
6207
|
+
wabaId?: string | undefined;
|
|
6208
|
+
catalogId?: string | undefined;
|
|
6209
|
+
}>;
|
|
6089
6210
|
readonly orderCancel: import("zod").ZodObject<{
|
|
6090
6211
|
reason: import("zod").ZodString;
|
|
6091
6212
|
}, "strip", import("zod").ZodTypeAny, {
|
package/dist/schemas/registry.js
CHANGED
|
@@ -139,7 +139,7 @@ import { reportReviewFormSchema } from "../features/store-extensions/schemas/rep
|
|
|
139
139
|
import { adminStoreUpdateSchema } from "../features/admin/schemas/admin-editor-forms.js";
|
|
140
140
|
import { adminAddressCreateSchema } from "../features/addresses/schemas/address-form.js";
|
|
141
141
|
import { adminOrderUpdateSchema, employeeInviteSchema, adminAdFormSchema } from "../features/admin/schemas/admin-ops-forms.js";
|
|
142
|
-
import { adminUserUpdateSchema, lotteryPullSchema } from "../features/admin/schemas/admin-user-form.js";
|
|
142
|
+
import { adminUserUpdateSchema, whatsappSettingsSchema, lotteryPullSchema } from "../features/admin/schemas/admin-user-form.js";
|
|
143
143
|
import { siteSettingsFormSchema } from "../features/admin/schemas/site-settings-form.js";
|
|
144
144
|
import { orderCancelSchema, paymentProofSchema } from "../features/orders/schemas/buyer-forms.js";
|
|
145
145
|
import { scamReportFormSchema } from "../features/scams/schemas/report-form.js";
|
|
@@ -186,6 +186,7 @@ const forms = {
|
|
|
186
186
|
employeeInvite: employeeInviteSchema,
|
|
187
187
|
adminAd: adminAdFormSchema,
|
|
188
188
|
siteSettings: siteSettingsFormSchema,
|
|
189
|
+
whatsappSettings: whatsappSettingsSchema,
|
|
189
190
|
orderCancel: orderCancelSchema,
|
|
190
191
|
paymentProof: paymentProofSchema,
|
|
191
192
|
scamReport: scamReportFormSchema,
|
|
@@ -163,7 +163,7 @@ function setPath(obj, path, value) {
|
|
|
163
163
|
*
|
|
164
164
|
* 🛑 That dotted-path support is also what made it possible to point this
|
|
165
165
|
* function at a field belonging to the OTHER crypto system. A store's
|
|
166
|
-
*
|
|
166
|
+
* `whatsappConfig.accessToken` is encrypted with SETTINGS_ENCRYPTION_KEY;
|
|
167
167
|
* passing it here would encrypt it with the PII key while
|
|
168
168
|
* `StoreRepository.decryptSecrets` kept decrypting with the settings one.
|
|
169
169
|
* Only ever pass fields from this file's own `*_PII_FIELDS` lists.
|
package/dist/server-entry.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export { listPublicProducts, parsePublicProductParams, defaultAvailabilityForLis
|
|
|
52
52
|
export { getAuctionForDetail, getProductFeaturesForAuction, } from "./_internal/server/features/auctions/index";
|
|
53
53
|
export { getPreOrderForDetail, getProductFeaturesForPreOrder, } from "./_internal/server/features/pre-orders/index";
|
|
54
54
|
export { getBrandForDetail, getBrandCategoryForDetail, createBrandAction, updateBrandAction, deleteBrandAction, toggleBrandActiveAction, } from "./_internal/server/features/brands/index";
|
|
55
|
+
export { getAttachedCoupons, toAttachedCoupon } from "./_internal/server/features/promotions/index";
|
|
55
56
|
export { getBlogPostForDetail, getBlogPostById, createBlogPostAction, updateBlogPostAction, deleteBlogPostAction, publishBlogPostAction, unpublishBlogPostAction, } from "./_internal/server/features/blog/index";
|
|
56
57
|
export { getEventForDetail, registerForEventAction, cancelEventRegistrationAction, createEventAction, updateEventAction, } from "./_internal/server/features/events/index";
|
|
57
58
|
export { createProductAction, createAuctionAction, createPreOrderAction, updateProductAction, deleteProductAction, setProductStatusAction, setProductFeaturedAction, } from "./_internal/server/features/products/index";
|
package/dist/server-entry.js
CHANGED
|
@@ -61,6 +61,8 @@ export { getAuctionForDetail, getProductFeaturesForAuction, } from "./_internal/
|
|
|
61
61
|
export { getPreOrderForDetail, getProductFeaturesForPreOrder, } from "./_internal/server/features/pre-orders/index.js";
|
|
62
62
|
// S3: brands data layer + actions
|
|
63
63
|
export { getBrandForDetail, getBrandCategoryForDetail, createBrandAction, updateBrandAction, deleteBrandAction, toggleBrandActiveAction, } from "./_internal/server/features/brands/index.js";
|
|
64
|
+
// Promotional coupons attached to content (events + blog posts)
|
|
65
|
+
export { getAttachedCoupons, toAttachedCoupon } from "./_internal/server/features/promotions/index.js";
|
|
64
66
|
// S3: blog data layer + actions
|
|
65
67
|
export { getBlogPostForDetail, getBlogPostById, createBlogPostAction, updateBlogPostAction, deleteBlogPostAction, publishBlogPostAction, unpublishBlogPostAction, } from "./_internal/server/features/blog/index.js";
|
|
66
68
|
// S3: events data layer + actions
|
package/dist/server.d.ts
CHANGED
|
@@ -260,14 +260,14 @@ export { updateEvent } from "./features/events/server";
|
|
|
260
260
|
export { triggerEventRaffleAction, assignSpinPrizeAction, resolveEventIdAction, } from "./_internal/server/features/raffle/actions";
|
|
261
261
|
export { reasonToHttp, EVENT_DRAW_REASON, type EventDrawReason, type EventDrawHttpMapping, } from "./_internal/server/jobs/core/event-draw-reasons";
|
|
262
262
|
export { processRefundAction, type ProcessRefundInput, } from "./_internal/server/features/refunds/actions";
|
|
263
|
-
export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, } from "./_internal/shared/fees/calculator";
|
|
263
|
+
export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeWhatsAppNotifyFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, } from "./_internal/shared/fees/calculator";
|
|
264
264
|
export { searchPriceIndex, getPriceIndexBandsForIds, PRICE_INDEX_SEARCH_LIMIT, PRICE_INDEX_MIN_QUERY_LENGTH } from "./_internal/server/features/price-index/search";
|
|
265
265
|
export type { PriceIndexSearchResponse, PriceIndexSearchResult, PriceIndexSearchResultBand, } from "./_internal/server/features/price-index/search";
|
|
266
266
|
export { getPriceIndexMarketForIds } from "./_internal/server/features/price-index/market";
|
|
267
267
|
export type { PriceIndexMarketRow } from "./_internal/server/features/price-index/market";
|
|
268
268
|
export { protectionAvailability, computeProtectionFees, adjudicateClaim, badgesFor, showsRiskNotice, showsSafetyBadge, returnDestination, rtoDestination, PROTECTION_KINDS, } from "./_internal/shared/features/shipping/protections";
|
|
269
269
|
export type { ProtectionKind, ProtectionAvailability, ProtectionTierInput, ProtectionUnavailableReason, ClaimFinding, ClaimOutcome, } from "./_internal/shared/features/shipping/protections";
|
|
270
|
-
export type { FeeCommissionRates, CheckoutFees, PayoutDeduction, CodHandlingFeeRates, GiftWrapFeeRates, ShipmentProtectionFeeRates, SaleProtectionFeeRates, } from "./_internal/shared/fees/calculator";
|
|
270
|
+
export type { FeeCommissionRates, CheckoutFees, PayoutDeduction, CodHandlingFeeRates, WhatsAppNotifyFeeRates, GiftWrapFeeRates, ShipmentProtectionFeeRates, SaleProtectionFeeRates, } from "./_internal/shared/fees/calculator";
|
|
271
271
|
export { applyRefundDeductionAction, type ApplyRefundDeductionInput, type ApplyRefundDeductionResult, } from "./_internal/server/features/payouts/actions";
|
|
272
272
|
export { createFaq } from "./features/faq/server";
|
|
273
273
|
export { deleteFaq } from "./features/faq/server";
|
|
@@ -399,6 +399,14 @@ export { storeProductsGET } from "./features/stores/server";
|
|
|
399
399
|
export { storeReviewsGET } from "./features/stores/server";
|
|
400
400
|
export { storeSlugGET } from "./features/stores/server";
|
|
401
401
|
export { updateStoreAddressForSeller } from "./features/stores/server";
|
|
402
|
+
export { buildCheckoutMessageURL } from "./features/whatsapp-bot/server";
|
|
403
|
+
export { buildStatusMessage } from "./features/whatsapp-bot/server";
|
|
404
|
+
export { buildStatusNotificationURL } from "./features/whatsapp-bot/server";
|
|
405
|
+
export { isAdminNumber } from "./features/whatsapp-bot/server";
|
|
406
|
+
export { parseIncomingWebhookPayload } from "./features/whatsapp-bot/server";
|
|
407
|
+
export { sendWhatsAppMessage } from "./features/whatsapp-bot/server";
|
|
408
|
+
export { sendWhatsAppBusinessMessage, syncProductsToCatalog, buildPurchaseAnnouncementMessage, buildGroupShareLink } from "./features/whatsapp-bot/server";
|
|
409
|
+
export type { WaBusinessSendInput, CatalogSyncProduct, CatalogSyncInput, CatalogSyncResult, PurchaseAnnouncementInput } from "./features/whatsapp-bot/server";
|
|
402
410
|
export { addToWishlist } from "./features/wishlist/server";
|
|
403
411
|
export { getWishlistForUser } from "./features/wishlist/server";
|
|
404
412
|
export { removeFromWishlist } from "./features/wishlist/server";
|
|
@@ -478,6 +486,7 @@ export { getBrandForDetail } from "./_internal/server/features/brands/index";
|
|
|
478
486
|
export { getFranchiseForDetail, listActiveFranchises, renderFranchiseOg, } from "./_internal/server/features/franchises/index";
|
|
479
487
|
export { getBlogPostForDetail } from "./_internal/server/features/blog/index";
|
|
480
488
|
export { getEventForDetail } from "./_internal/server/features/events/index";
|
|
489
|
+
export { getAttachedCoupons, toAttachedCoupon } from "./_internal/server/features/promotions/index";
|
|
481
490
|
export { getSublistingCategoryForDetail } from "./_internal/server/features/sublisting-categories/index";
|
|
482
491
|
export { getCategoryForDetail, listRootCategories, listFeaturedCategories, listMenuCategories, getCategoryTree, listSitemapCategories } from "./_internal/server/features/categories/index";
|
|
483
492
|
export { renderProductOg, renderProductOgImage, type ProductOgData, type OgOptions } from "./_internal/server/features/products/og";
|
package/dist/server.js
CHANGED
|
@@ -860,8 +860,8 @@ resolveEventIdAction, } from "./_internal/server/features/raffle/actions.js";
|
|
|
860
860
|
export { reasonToHttp, EVENT_DRAW_REASON, } from "./_internal/server/jobs/core/event-draw-reasons.js";
|
|
861
861
|
// [SERVER-ONLY] S-SBUNI-RULES — refund action (Razorpay + manual paths)
|
|
862
862
|
export { processRefundAction, } from "./_internal/server/features/refunds/actions.js";
|
|
863
|
-
// [SERVER-ONLY] Shared fee calculator — platform/gateway/GST/COD handling/addon fee math.
|
|
864
|
-
export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, } from "./_internal/shared/fees/calculator.js";
|
|
863
|
+
// [SERVER-ONLY] Shared fee calculator — platform/gateway/GST/COD handling/WhatsApp-addon fee math.
|
|
864
|
+
export { computeCheckoutFees, allocateCheckoutFees, computePayoutDeduction, computeCodHandlingFee, computeWhatsAppNotifyFee, computeGiftWrapFee, computeShipmentProtectionFee, computeSaleProtectionFee, } from "./_internal/shared/fees/calculator.js";
|
|
865
865
|
// C5e buyer protections — the pure three-tier gate plus the one fee pair
|
|
866
866
|
// every money path must agree on. Public API because the capture route
|
|
867
867
|
// (/api/payment/create-order) is one of the three sites that must agree.
|
|
@@ -1274,6 +1274,26 @@ export { storeSlugGET } from "./features/stores/server.js";
|
|
|
1274
1274
|
// updateStoreAddressForSeller - Helper for update store address for seller.
|
|
1275
1275
|
export { updateStoreAddressForSeller } from "./features/stores/server.js";
|
|
1276
1276
|
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1277
|
+
// buildCheckoutMessageURL - Helper for build checkout message url.
|
|
1278
|
+
export { buildCheckoutMessageURL } from "./features/whatsapp-bot/server.js";
|
|
1279
|
+
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1280
|
+
// buildStatusMessage - Helper for build status message.
|
|
1281
|
+
export { buildStatusMessage } from "./features/whatsapp-bot/server.js";
|
|
1282
|
+
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1283
|
+
// buildStatusNotificationURL - Helper for build status notification url.
|
|
1284
|
+
export { buildStatusNotificationURL } from "./features/whatsapp-bot/server.js";
|
|
1285
|
+
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1286
|
+
// isAdminNumber - Shared export for is admin number.
|
|
1287
|
+
export { isAdminNumber } from "./features/whatsapp-bot/server.js";
|
|
1288
|
+
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1289
|
+
// parseIncomingWebhookPayload - Helper for parse incoming webhook payload.
|
|
1290
|
+
export { parseIncomingWebhookPayload } from "./features/whatsapp-bot/server.js";
|
|
1291
|
+
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1292
|
+
// sendWhatsAppMessage - Shared export for send whats app message.
|
|
1293
|
+
export { sendWhatsAppMessage } from "./features/whatsapp-bot/server.js";
|
|
1294
|
+
// [SERVER-ONLY]-Server-only — Meta Cloud API helpers (WA3).
|
|
1295
|
+
export { sendWhatsAppBusinessMessage, syncProductsToCatalog, buildPurchaseAnnouncementMessage, buildGroupShareLink } from "./features/whatsapp-bot/server.js";
|
|
1296
|
+
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
1277
1297
|
// addToWishlist - Helper for add to wishlist.
|
|
1278
1298
|
export { addToWishlist } from "./features/wishlist/server.js";
|
|
1279
1299
|
// [SERVER-ONLY]-Server-only — uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
@@ -1402,6 +1422,10 @@ export { getBrandForDetail } from "./_internal/server/features/brands/index.js";
|
|
|
1402
1422
|
export { getFranchiseForDetail, listActiveFranchises, renderFranchiseOg, } from "./_internal/server/features/franchises/index.js";
|
|
1403
1423
|
export { getBlogPostForDetail } from "./_internal/server/features/blog/index.js";
|
|
1404
1424
|
export { getEventForDetail } from "./_internal/server/features/events/index.js";
|
|
1425
|
+
// Attached promotional coupons — shared by the event detail page and the blog
|
|
1426
|
+
// post page, which is why it lives in its own feature rather than inside
|
|
1427
|
+
// either one.
|
|
1428
|
+
export { getAttachedCoupons, toAttachedCoupon } from "./_internal/server/features/promotions/index.js";
|
|
1405
1429
|
export { getSublistingCategoryForDetail } from "./_internal/server/features/sublisting-categories/index.js";
|
|
1406
1430
|
export { getCategoryForDetail, listRootCategories, listFeaturedCategories, listMenuCategories, getCategoryTree, listSitemapCategories } from "./_internal/server/features/categories/index.js";
|
|
1407
1431
|
// OG image renderers — high-level (renderXOg) + low-level primitive (renderXOgImage)
|