@mohasinac/appkit 4.41.17 → 4.42.1
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 +2 -30
- package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +1 -1
- package/dist/_internal/server/features/checkout/actions.d.ts +16 -14
- package/dist/_internal/server/features/checkout/actions.js +145 -97
- package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +1 -1
- package/dist/_internal/server/features/checkout/index.d.ts +1 -1
- package/dist/_internal/server/features/checkout/index.js +1 -1
- package/dist/_internal/server/features/checkout/locked-lines.js +1 -1
- package/dist/_internal/server/features/checkout/source-context.js +2 -2
- package/dist/_internal/server/features/maintenance/analyze.js +1 -1
- package/dist/_internal/server/features/refunds/actions.d.ts +4 -4
- package/dist/_internal/server/features/refunds/actions.js +9 -8
- package/dist/_internal/server/functions/scheduled.d.ts +1 -2
- package/dist/_internal/server/functions/scheduled.js +1 -9
- package/dist/_internal/server/jobs/core/index.d.ts +0 -1
- package/dist/_internal/server/jobs/core/index.js +0 -1
- package/dist/_internal/server/jobs/handlers/index.d.ts +0 -1
- package/dist/_internal/server/jobs/handlers/index.js +0 -1
- package/dist/_internal/shared/actions/action-registry.js +2 -2
- 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/checkout/rules/prize-draw.rule.js +2 -2
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/cart/schema.d.ts +6 -6
- package/dist/_internal/shared/features/orders/refund-copy.d.ts +1 -1
- package/dist/_internal/shared/features/orders/refund-copy.js +1 -1
- package/dist/_internal/shared/features/orders/schema.d.ts +5 -5
- package/dist/_internal/shared/features/orders/schema.js +1 -1
- package/dist/_internal/shared/features/products/schema.d.ts +2 -2
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/configs/next.js +2 -2
- package/dist/constants/field-names.d.ts +1 -1
- package/dist/constants/field-names.js +1 -1
- package/dist/contracts/index.d.ts +0 -2
- package/dist/contracts/index.js +0 -1
- package/dist/contracts/payment.d.ts +13 -2
- package/dist/contracts/payment.js +2 -2
- package/dist/core/integration-keys.d.ts +7 -3
- package/dist/core/integration-keys.js +13 -7
- package/dist/core/money.d.ts +11 -0
- package/dist/core/money.js +15 -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/errors/{razorpay-unreachable.d.ts → payment-provider-unreachable.d.ts} +1 -1
- package/dist/errors/{razorpay-unreachable.js → payment-provider-unreachable.js} +1 -1
- package/dist/features/addresses/schemas/address-form.d.ts +20 -20
- package/dist/features/addresses/schemas/index.d.ts +2 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +32 -16
- package/dist/features/admin/constants/site-settings-tabs.d.ts +1 -1
- package/dist/features/admin/schemas/admin-ops-forms.d.ts +10 -10
- package/dist/features/admin/schemas/admin-user-form.d.ts +2 -2
- package/dist/features/admin/schemas/firestore.d.ts +17 -8
- package/dist/features/admin/schemas/firestore.js +1 -1
- package/dist/features/admin/schemas/nav-item-form.d.ts +2 -2
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- 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 +4 -4
- package/dist/features/blog/schemas/blog-form.d.ts +2 -2
- package/dist/features/blog/schemas/index.d.ts +4 -4
- package/dist/features/cart/schemas/index.d.ts +3 -3
- package/dist/features/catalogue/schemas/validation.d.ts +4 -4
- package/dist/features/categories/schemas/index.d.ts +2 -2
- package/dist/features/checkout/index.d.ts +0 -4
- package/dist/features/checkout/index.js +0 -3
- package/dist/features/checkout/types/index.d.ts +0 -25
- package/dist/features/checkout/types/index.js +1 -2
- package/dist/features/collections/schemas/index.d.ts +2 -2
- package/dist/features/consultation/schemas/index.d.ts +4 -4
- package/dist/features/corporate/schemas/index.d.ts +2 -2
- package/dist/features/events/schemas/index.d.ts +4 -4
- package/dist/features/grouped/schemas/index.d.ts +2 -2
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/layout/AppLayoutShell.js +2 -2
- package/dist/features/layout/BottomNavLayout.d.ts +9 -3
- package/dist/features/layout/BottomNavLayout.js +9 -3
- package/dist/features/lottery/schemas/zod.d.ts +4 -4
- package/dist/features/loyalty/schemas/index.d.ts +6 -6
- package/dist/features/orders/components/OrderPaymentSummary.d.ts +1 -1
- package/dist/features/orders/components/OrderPaymentSummary.js +5 -5
- package/dist/features/orders/components/RefundHistoryTable.js +1 -1
- package/dist/features/orders/repository/orders.repository.d.ts +10 -1
- package/dist/features/orders/repository/orders.repository.js +17 -1
- package/dist/features/orders/schemas/firestore.d.ts +11 -12
- package/dist/features/orders/schemas/firestore.js +0 -1
- package/dist/features/orders/schemas/index.d.ts +48 -48
- package/dist/features/orders/schemas/index.js +1 -1
- package/dist/features/orders/types/index.d.ts +1 -3
- package/dist/features/orders/types/index.js +1 -2
- package/dist/features/payments/manifest.js +1 -1
- package/dist/features/payments/repository/payout.repository.d.ts +1 -4
- package/dist/features/payments/repository/payout.repository.js +0 -29
- package/dist/features/payments/schemas/firestore.d.ts +8 -15
- package/dist/features/payments/schemas/firestore.js +7 -5
- package/dist/features/payments/schemas/index.d.ts +52 -125
- package/dist/features/payments/schemas/index.js +0 -58
- package/dist/features/payments/types/index.d.ts +2 -4
- package/dist/features/payments/types/index.js +1 -2
- package/dist/features/products/schemas/index.d.ts +14 -14
- package/dist/features/products/schemas/product-features.validators.d.ts +10 -10
- package/dist/features/promotions/schemas/index.d.ts +20 -20
- package/dist/features/reviews/schemas/index.d.ts +8 -8
- package/dist/features/scams/schemas/index.d.ts +10 -10
- package/dist/features/search/action-index/settings-entries.js +4 -4
- package/dist/features/seller/schemas/index.d.ts +12 -12
- package/dist/features/seller/schemas/order-forms.d.ts +4 -4
- package/dist/features/shipments/schemas/validation.d.ts +28 -28
- package/dist/features/store-extensions/schemas/payout-method-form.d.ts +50 -50
- package/dist/features/store-extensions/schemas/report-create-form.d.ts +2 -2
- package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +10 -10
- package/dist/features/support/schemas/index.d.ts +14 -14
- package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
- package/dist/features/tester/schemas/checklist-item-form.d.ts +2 -2
- package/dist/features/tester/seed-data/_money-flows.js +145 -0
- package/dist/features/tester/seed-data/authored/admin__site-system.js +38 -0
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +10 -10
- package/dist/features/tester/seed-data/authored/buying__offers.js +11 -10
- package/dist/features/tester/seed-data/authored/buying__user-dashboard-navigation.js +6 -5
- package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +1 -1
- package/dist/features/tester/seed-data/authored/design-ux__hand-mode-layout.js +3 -3
- package/dist/features/tester/seed-data/authored/selling__store-dashboard-navigation.js +6 -5
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +27 -15
- package/dist/features/wishlist/schemas/index.d.ts +2 -2
- package/dist/index.d.ts +6 -28
- package/dist/index.js +8 -51
- package/dist/jobs.d.ts +1 -1
- package/dist/jobs.js +1 -1
- package/dist/providers/payment-phonepe/index.d.ts +117 -0
- package/dist/providers/payment-phonepe/index.js +221 -0
- package/dist/providers.d.ts +3 -2
- package/dist/providers.js +3 -2
- package/dist/schemas/registry.d.ts +163 -2623
- package/dist/schemas/registry.js +1 -6
- package/dist/seed/faq-seed-data.js +5 -5
- package/dist/seed/payouts-seed-data.js +3 -3
- package/dist/seed/site-settings-seed-data.js +7 -4
- package/dist/server-entry.d.ts +1 -2
- package/dist/server-entry.js +1 -3
- package/dist/server.d.ts +3 -9
- package/dist/server.js +5 -23
- package/dist/validation/schemas.d.ts +2 -2
- package/package.json +5 -4
- package/dist/_internal/server/features/payments/actions.d.ts +0 -30
- package/dist/_internal/server/features/payments/actions.js +0 -45
- package/dist/_internal/server/features/payments/data.d.ts +0 -13
- package/dist/_internal/server/features/payments/data.js +0 -20
- package/dist/_internal/server/features/payments/index.d.ts +0 -3
- package/dist/_internal/server/features/payments/index.js +0 -3
- package/dist/_internal/server/jobs/core/payoutBatch.d.ts +0 -2
- package/dist/_internal/server/jobs/core/payoutBatch.js +0 -120
- package/dist/_internal/server/jobs/handlers/payoutBatch.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/payoutBatch.js +0 -2
- package/dist/_internal/shared/features/payments/config.d.ts +0 -3
- package/dist/_internal/shared/features/payments/config.js +0 -3
- package/dist/contracts/client-payment-gateway.d.ts +0 -64
- package/dist/contracts/client-payment-gateway.js +0 -25
- package/dist/features/checkout/hooks/useCheckout.d.ts +0 -9
- package/dist/features/checkout/hooks/useCheckout.js +0 -24
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -72
- package/dist/features/checkout/hooks/useCheckoutApi.js +0 -47
- package/dist/features/checkout/hooks/usePaymentCheckout.d.ts +0 -77
- package/dist/features/checkout/hooks/usePaymentCheckout.js +0 -192
- package/dist/providers/payment-razorpay/index.d.ts +0 -115
- package/dist/providers/payment-razorpay/index.js +0 -208
- package/dist/schemas/webhooks/razorpay.d.ts +0 -2634
- package/dist/schemas/webhooks/razorpay.js +0 -104
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { JsonValue } from "../schemas/types";
|
|
2
2
|
export interface PaymentOrder {
|
|
3
|
+
/** Our own order id — a merchant-order id for gateways that are order-keyed rather than payment-keyed (e.g. PhonePe). */
|
|
3
4
|
id: string;
|
|
4
5
|
amount: number;
|
|
5
6
|
currency: string;
|
|
@@ -7,6 +8,14 @@ export interface PaymentOrder {
|
|
|
7
8
|
receipt?: string;
|
|
8
9
|
metadata?: Record<string, JsonValue>;
|
|
9
10
|
createdAt: string;
|
|
11
|
+
/** The gateway's OWN order id, when distinct from `id` (PhonePe returns both its own `orderId` and echoes back our `merchantOrderId`). Optional — Razorpay's own id WAS `id`, so this stays unset for gateways where the two coincide. */
|
|
12
|
+
gatewayOrderId?: string;
|
|
13
|
+
/** URL the buyer's browser opens/embeds to complete payment (PhonePe's `redirectUrl`). Optional — gateways using a client-side modal with no hosted page (Razorpay) never set this. */
|
|
14
|
+
checkoutUrl?: string;
|
|
15
|
+
/** The gateway's own transaction id for the underlying payment attempt, when it has one distinct from `id`/`gatewayOrderId` (PhonePe's `paymentDetails[].transactionId`). */
|
|
16
|
+
transactionId?: string;
|
|
17
|
+
/** When this order/attempt expires, if the gateway reports one (PhonePe's `expireAt`). ISO-8601. */
|
|
18
|
+
expiresAt?: string;
|
|
10
19
|
}
|
|
11
20
|
export interface PaymentCapture {
|
|
12
21
|
id: string;
|
|
@@ -15,6 +24,8 @@ export interface PaymentCapture {
|
|
|
15
24
|
currency: string;
|
|
16
25
|
status: "captured" | "failed";
|
|
17
26
|
capturedAt: string;
|
|
27
|
+
/** The gateway's own transaction id for this capture attempt, when it has one distinct from `id`/`orderId` (PhonePe's `paymentDetails[].transactionId`). */
|
|
28
|
+
transactionId?: string;
|
|
18
29
|
}
|
|
19
30
|
export interface Refund {
|
|
20
31
|
id: string;
|
|
@@ -27,11 +38,11 @@ export interface Refund {
|
|
|
27
38
|
}
|
|
28
39
|
/**
|
|
29
40
|
* Payment gateway adapter contract. An abstract base class rather than a
|
|
30
|
-
* plain interface so every provider (manual,
|
|
41
|
+
* plain interface so every provider (manual, PhonePe, and any future
|
|
31
42
|
* gateway) extends one shared type — adding a new provider is a subclass,
|
|
32
43
|
* not a fresh reimplementation of the shape.
|
|
33
44
|
*
|
|
34
|
-
* Implemented by the manual provider (default)
|
|
45
|
+
* Implemented by the manual provider (default) and PhonePe.
|
|
35
46
|
*/
|
|
36
47
|
export declare abstract class IPaymentProvider {
|
|
37
48
|
/** Short discriminator used by admin dev tooling to confirm which provider is registered. */
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// --- Payment Contract -----------------------------------------------------
|
|
3
3
|
/**
|
|
4
4
|
* Payment gateway adapter contract. An abstract base class rather than a
|
|
5
|
-
* plain interface so every provider (manual,
|
|
5
|
+
* plain interface so every provider (manual, PhonePe, and any future
|
|
6
6
|
* gateway) extends one shared type — adding a new provider is a subclass,
|
|
7
7
|
* not a fresh reimplementation of the shape.
|
|
8
8
|
*
|
|
9
|
-
* Implemented by the manual provider (default)
|
|
9
|
+
* Implemented by the manual provider (default) and PhonePe.
|
|
10
10
|
*/
|
|
11
11
|
export class IPaymentProvider {
|
|
12
12
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export interface ResolvedKeys {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
phonepeClientId: string;
|
|
3
|
+
phonepeClientSecret: string;
|
|
4
|
+
phonepeClientVersion: string;
|
|
5
|
+
/** "sandbox" | "production" */
|
|
6
|
+
phonepeEnvironment: string;
|
|
7
|
+
phonepeWebhookUsername: string;
|
|
8
|
+
phonepeWebhookPassword: string;
|
|
5
9
|
resendApiKey: string;
|
|
6
10
|
whatsappApiKey: string;
|
|
7
11
|
whatsappPhoneNumberId: string;
|
|
@@ -11,14 +11,17 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Usage:
|
|
13
13
|
* const keys = await resolveKeys();
|
|
14
|
-
* const
|
|
14
|
+
* const client = StandardCheckoutClient.getInstance(keys.phonepeClientId, keys.phonepeClientSecret, Number(keys.phonepeClientVersion), env);
|
|
15
15
|
*/
|
|
16
16
|
import { siteSettingsRepository } from "../repositories";
|
|
17
17
|
import { normalizeError } from "../errors/normalize";
|
|
18
18
|
const EMPTY_KEYS = {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
phonepeClientId: "",
|
|
20
|
+
phonepeClientSecret: "",
|
|
21
|
+
phonepeClientVersion: "",
|
|
22
|
+
phonepeEnvironment: "",
|
|
23
|
+
phonepeWebhookUsername: "",
|
|
24
|
+
phonepeWebhookPassword: "",
|
|
22
25
|
resendApiKey: "",
|
|
23
26
|
whatsappApiKey: "",
|
|
24
27
|
whatsappPhoneNumberId: "",
|
|
@@ -46,9 +49,12 @@ export async function resolveKeys() {
|
|
|
46
49
|
void normalizeError(_err); // Firestore unavailable — fall through to env-based defaults for backward compatibility
|
|
47
50
|
}
|
|
48
51
|
const value = {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
phonepeClientId: db.phonepeClientId || process.env.PHONEPE_CLIENT_ID || "",
|
|
53
|
+
phonepeClientSecret: db.phonepeClientSecret || process.env.PHONEPE_CLIENT_SECRET || "",
|
|
54
|
+
phonepeClientVersion: db.phonepeClientVersion || process.env.PHONEPE_CLIENT_VERSION || "1",
|
|
55
|
+
phonepeEnvironment: db.phonepeEnvironment || process.env.PHONEPE_ENVIRONMENT || "sandbox",
|
|
56
|
+
phonepeWebhookUsername: db.phonepeWebhookUsername || process.env.PHONEPE_WEBHOOK_USERNAME || "",
|
|
57
|
+
phonepeWebhookPassword: db.phonepeWebhookPassword || process.env.PHONEPE_WEBHOOK_PASSWORD || "",
|
|
52
58
|
resendApiKey: db.resendApiKey || process.env.RESEND_API_KEY || "",
|
|
53
59
|
whatsappApiKey: db.whatsappApiKey || process.env.WHATSAPP_API_KEY || "",
|
|
54
60
|
whatsappPhoneNumberId: db.whatsappPhoneNumberId || process.env.WHATSAPP_PHONE_NUMBER_ID || "",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rupee/paise conversion helpers — gateway-agnostic.
|
|
3
|
+
*
|
|
4
|
+
* Every online payment gateway this project has integrated (Razorpay,
|
|
5
|
+
* PhonePe) bills in paise (India's smallest currency unit), so these live
|
|
6
|
+
* outside any specific provider directory.
|
|
7
|
+
*/
|
|
8
|
+
/** Convert rupees (float) → paise (integer) for a gateway's amount field. */
|
|
9
|
+
export declare function rupeesToPaise(rupees: number): number;
|
|
10
|
+
/** Convert paise (integer) → rupees (float). */
|
|
11
|
+
export declare function paiseToRupees(paise: number): number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rupee/paise conversion helpers — gateway-agnostic.
|
|
3
|
+
*
|
|
4
|
+
* Every online payment gateway this project has integrated (Razorpay,
|
|
5
|
+
* PhonePe) bills in paise (India's smallest currency unit), so these live
|
|
6
|
+
* outside any specific provider directory.
|
|
7
|
+
*/
|
|
8
|
+
/** Convert rupees (float) → paise (integer) for a gateway's amount field. */
|
|
9
|
+
export function rupeesToPaise(rupees) {
|
|
10
|
+
return Math.round(rupees * 100);
|
|
11
|
+
}
|
|
12
|
+
/** Convert paise (integer) → rupees (float). */
|
|
13
|
+
export function paiseToRupees(paise) {
|
|
14
|
+
return paise / 100;
|
|
15
|
+
}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { AuthorizationError } from "./authorization-error";
|
|
|
9
9
|
export { NotFoundError } from "./not-found-error";
|
|
10
10
|
export { ConflictError } from "./conflict-error";
|
|
11
11
|
export { DatabaseError } from "./database-error";
|
|
12
|
-
export {
|
|
12
|
+
export { PaymentProviderUnreachableError } from "./payment-provider-unreachable";
|
|
13
13
|
export { handleApiError, logError, isAppError } from "./error-handler";
|
|
14
14
|
export { mapToHttpError, HTTP_ERROR_CODES, type MappedError, type HttpErrorCode, } from "./error-mapping";
|
|
15
15
|
export { ERROR_DISPLAY_MAP, getErrorDisplay, toUserMessage, GENERIC_USER_MESSAGE, type ErrorDisplayEntry, } from "./error-display-map";
|
package/dist/errors/index.js
CHANGED
|
@@ -12,7 +12,7 @@ export { AuthorizationError } from "./authorization-error";
|
|
|
12
12
|
export { NotFoundError } from "./not-found-error";
|
|
13
13
|
export { ConflictError } from "./conflict-error";
|
|
14
14
|
export { DatabaseError } from "./database-error";
|
|
15
|
-
export {
|
|
15
|
+
export { PaymentProviderUnreachableError } from "./payment-provider-unreachable";
|
|
16
16
|
// error-handler uses `next/server` — only import in server/API-route contexts
|
|
17
17
|
export { handleApiError, logError, isAppError } from "./error-handler";
|
|
18
18
|
// Code→HTTP mapper (server) — and the i18n / inline-field map (client-safe)
|
|
@@ -282,6 +282,7 @@ export declare const ERROR_MESSAGES: {
|
|
|
282
282
|
readonly INSUFFICIENT_STOCK: "Insufficient stock for one or more items";
|
|
283
283
|
readonly PAYMENT_FAILED: "Payment processing failed";
|
|
284
284
|
readonly PAYMENT_DECLINED: "Payment was declined.";
|
|
285
|
+
readonly ORDER_PLACEMENT_IN_PROGRESS: "Your payment is still being confirmed — please wait a moment and refresh.";
|
|
285
286
|
readonly PAYMENT_TRACKING_INIT_FAILED: "Failed to initialise payment tracking. Please check your order status.";
|
|
286
287
|
readonly PAYMENT_TRACKING_CONNECTION_LOST: "Payment tracking connection lost. Please check your order status.";
|
|
287
288
|
readonly PAYMENT_TRACKING_TIMED_OUT: "Payment confirmation timed out. Please check your order status.";
|
package/dist/errors/messages.js
CHANGED
|
@@ -306,6 +306,7 @@ export const ERROR_MESSAGES = {
|
|
|
306
306
|
INSUFFICIENT_STOCK: "Insufficient stock for one or more items",
|
|
307
307
|
PAYMENT_FAILED: "Payment processing failed",
|
|
308
308
|
PAYMENT_DECLINED: "Payment was declined.",
|
|
309
|
+
ORDER_PLACEMENT_IN_PROGRESS: "Your payment is still being confirmed — please wait a moment and refresh.",
|
|
309
310
|
PAYMENT_TRACKING_INIT_FAILED: "Failed to initialise payment tracking. Please check your order status.",
|
|
310
311
|
PAYMENT_TRACKING_CONNECTION_LOST: "Payment tracking connection lost. Please check your order status.",
|
|
311
312
|
PAYMENT_TRACKING_TIMED_OUT: "Payment confirmation timed out. Please check your order status.",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AppError } from "./base-error";
|
|
2
|
-
export class
|
|
2
|
+
export class PaymentProviderUnreachableError extends AppError {
|
|
3
3
|
constructor(message = "Payment provider unreachable", data) {
|
|
4
4
|
super(503, message, "UPSTREAM_UNAVAILABLE", data);
|
|
5
5
|
}
|
|
@@ -34,13 +34,13 @@ export declare const addressFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
35
|
country: string;
|
|
36
36
|
label: string;
|
|
37
|
-
isDefault: boolean;
|
|
38
37
|
fullName: string;
|
|
39
38
|
phone: string;
|
|
40
39
|
addressLine1: string;
|
|
41
40
|
city: string;
|
|
42
41
|
state: string;
|
|
43
42
|
postalCode: string;
|
|
43
|
+
isDefault: boolean;
|
|
44
44
|
addressLine2?: string | undefined;
|
|
45
45
|
landmark?: string | undefined;
|
|
46
46
|
}, {
|
|
@@ -58,13 +58,13 @@ export declare const addressFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
58
58
|
}>, {
|
|
59
59
|
country: string;
|
|
60
60
|
label: string;
|
|
61
|
-
isDefault: boolean;
|
|
62
61
|
fullName: string;
|
|
63
62
|
phone: string;
|
|
64
63
|
addressLine1: string;
|
|
65
64
|
city: string;
|
|
66
65
|
state: string;
|
|
67
66
|
postalCode: string;
|
|
67
|
+
isDefault: boolean;
|
|
68
68
|
addressLine2?: string | undefined;
|
|
69
69
|
landmark?: string | undefined;
|
|
70
70
|
}, {
|
|
@@ -103,49 +103,49 @@ export declare const addressUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
104
|
country?: string | undefined;
|
|
105
105
|
label?: string | undefined;
|
|
106
|
-
isDefault?: boolean | undefined;
|
|
107
106
|
fullName?: string | undefined;
|
|
108
107
|
phone?: string | undefined;
|
|
109
108
|
addressLine1?: string | undefined;
|
|
110
109
|
city?: string | undefined;
|
|
111
110
|
state?: string | undefined;
|
|
112
111
|
postalCode?: string | undefined;
|
|
112
|
+
isDefault?: boolean | undefined;
|
|
113
113
|
addressLine2?: string | undefined;
|
|
114
114
|
landmark?: string | undefined;
|
|
115
115
|
}, {
|
|
116
116
|
country?: string | undefined;
|
|
117
117
|
label?: string | undefined;
|
|
118
|
-
isDefault?: boolean | undefined;
|
|
119
118
|
fullName?: string | undefined;
|
|
120
119
|
phone?: string | undefined;
|
|
121
120
|
addressLine1?: string | undefined;
|
|
122
121
|
city?: string | undefined;
|
|
123
122
|
state?: string | undefined;
|
|
124
123
|
postalCode?: string | undefined;
|
|
124
|
+
isDefault?: boolean | undefined;
|
|
125
125
|
addressLine2?: string | undefined;
|
|
126
126
|
landmark?: string | undefined;
|
|
127
127
|
}>, {
|
|
128
128
|
country?: string | undefined;
|
|
129
129
|
label?: string | undefined;
|
|
130
|
-
isDefault?: boolean | undefined;
|
|
131
130
|
fullName?: string | undefined;
|
|
132
131
|
phone?: string | undefined;
|
|
133
132
|
addressLine1?: string | undefined;
|
|
134
133
|
city?: string | undefined;
|
|
135
134
|
state?: string | undefined;
|
|
136
135
|
postalCode?: string | undefined;
|
|
136
|
+
isDefault?: boolean | undefined;
|
|
137
137
|
addressLine2?: string | undefined;
|
|
138
138
|
landmark?: string | undefined;
|
|
139
139
|
}, {
|
|
140
140
|
country?: string | undefined;
|
|
141
141
|
label?: string | undefined;
|
|
142
|
-
isDefault?: boolean | undefined;
|
|
143
142
|
fullName?: string | undefined;
|
|
144
143
|
phone?: string | undefined;
|
|
145
144
|
addressLine1?: string | undefined;
|
|
146
145
|
city?: string | undefined;
|
|
147
146
|
state?: string | undefined;
|
|
148
147
|
postalCode?: string | undefined;
|
|
148
|
+
isDefault?: boolean | undefined;
|
|
149
149
|
addressLine2?: string | undefined;
|
|
150
150
|
landmark?: string | undefined;
|
|
151
151
|
}>;
|
|
@@ -177,7 +177,6 @@ export declare const adminAddressCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
177
177
|
}, "strip", z.ZodTypeAny, {
|
|
178
178
|
country: string;
|
|
179
179
|
label: string;
|
|
180
|
-
isDefault: boolean;
|
|
181
180
|
ownerId: string;
|
|
182
181
|
ownerType: "user" | "store";
|
|
183
182
|
fullName: string;
|
|
@@ -186,6 +185,7 @@ export declare const adminAddressCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
186
185
|
city: string;
|
|
187
186
|
state: string;
|
|
188
187
|
postalCode: string;
|
|
188
|
+
isDefault: boolean;
|
|
189
189
|
addressLine2?: string | undefined;
|
|
190
190
|
landmark?: string | undefined;
|
|
191
191
|
}, {
|
|
@@ -205,7 +205,6 @@ export declare const adminAddressCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
205
205
|
}>, {
|
|
206
206
|
country: string;
|
|
207
207
|
label: string;
|
|
208
|
-
isDefault: boolean;
|
|
209
208
|
ownerId: string;
|
|
210
209
|
ownerType: "user" | "store";
|
|
211
210
|
fullName: string;
|
|
@@ -214,6 +213,7 @@ export declare const adminAddressCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
214
213
|
city: string;
|
|
215
214
|
state: string;
|
|
216
215
|
postalCode: string;
|
|
216
|
+
isDefault: boolean;
|
|
217
217
|
addressLine2?: string | undefined;
|
|
218
218
|
landmark?: string | undefined;
|
|
219
219
|
}, {
|
|
@@ -248,7 +248,6 @@ export declare const adminAddressUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
248
248
|
}, "strip", z.ZodTypeAny, {
|
|
249
249
|
country?: string | undefined;
|
|
250
250
|
label?: string | undefined;
|
|
251
|
-
isDefault?: boolean | undefined;
|
|
252
251
|
ownerId?: string | undefined;
|
|
253
252
|
ownerType?: "user" | "store" | undefined;
|
|
254
253
|
fullName?: string | undefined;
|
|
@@ -257,12 +256,12 @@ export declare const adminAddressUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
257
256
|
city?: string | undefined;
|
|
258
257
|
state?: string | undefined;
|
|
259
258
|
postalCode?: string | undefined;
|
|
259
|
+
isDefault?: boolean | undefined;
|
|
260
260
|
addressLine2?: string | undefined;
|
|
261
261
|
landmark?: string | undefined;
|
|
262
262
|
}, {
|
|
263
263
|
country?: string | undefined;
|
|
264
264
|
label?: string | undefined;
|
|
265
|
-
isDefault?: boolean | undefined;
|
|
266
265
|
ownerId?: string | undefined;
|
|
267
266
|
ownerType?: "user" | "store" | undefined;
|
|
268
267
|
fullName?: string | undefined;
|
|
@@ -271,12 +270,12 @@ export declare const adminAddressUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
271
270
|
city?: string | undefined;
|
|
272
271
|
state?: string | undefined;
|
|
273
272
|
postalCode?: string | undefined;
|
|
273
|
+
isDefault?: boolean | undefined;
|
|
274
274
|
addressLine2?: string | undefined;
|
|
275
275
|
landmark?: string | undefined;
|
|
276
276
|
}>, {
|
|
277
277
|
country?: string | undefined;
|
|
278
278
|
label?: string | undefined;
|
|
279
|
-
isDefault?: boolean | undefined;
|
|
280
279
|
ownerId?: string | undefined;
|
|
281
280
|
ownerType?: "user" | "store" | undefined;
|
|
282
281
|
fullName?: string | undefined;
|
|
@@ -285,12 +284,12 @@ export declare const adminAddressUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
285
284
|
city?: string | undefined;
|
|
286
285
|
state?: string | undefined;
|
|
287
286
|
postalCode?: string | undefined;
|
|
287
|
+
isDefault?: boolean | undefined;
|
|
288
288
|
addressLine2?: string | undefined;
|
|
289
289
|
landmark?: string | undefined;
|
|
290
290
|
}, {
|
|
291
291
|
country?: string | undefined;
|
|
292
292
|
label?: string | undefined;
|
|
293
|
-
isDefault?: boolean | undefined;
|
|
294
293
|
ownerId?: string | undefined;
|
|
295
294
|
ownerType?: "user" | "store" | undefined;
|
|
296
295
|
fullName?: string | undefined;
|
|
@@ -299,6 +298,7 @@ export declare const adminAddressUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
299
298
|
city?: string | undefined;
|
|
300
299
|
state?: string | undefined;
|
|
301
300
|
postalCode?: string | undefined;
|
|
301
|
+
isDefault?: boolean | undefined;
|
|
302
302
|
addressLine2?: string | undefined;
|
|
303
303
|
landmark?: string | undefined;
|
|
304
304
|
}>;
|
|
@@ -337,8 +337,6 @@ export declare const adminAddressPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
337
337
|
country?: string | undefined;
|
|
338
338
|
label?: string | undefined;
|
|
339
339
|
action?: "ban" | "approve_unban" | "reject_unban" | undefined;
|
|
340
|
-
isDefault?: boolean | undefined;
|
|
341
|
-
banReason?: string | undefined;
|
|
342
340
|
ownerId?: string | undefined;
|
|
343
341
|
ownerType?: "user" | "store" | undefined;
|
|
344
342
|
fullName?: string | undefined;
|
|
@@ -347,14 +345,14 @@ export declare const adminAddressPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
347
345
|
city?: string | undefined;
|
|
348
346
|
state?: string | undefined;
|
|
349
347
|
postalCode?: string | undefined;
|
|
348
|
+
isDefault?: boolean | undefined;
|
|
350
349
|
addressLine2?: string | undefined;
|
|
351
350
|
landmark?: string | undefined;
|
|
351
|
+
banReason?: string | undefined;
|
|
352
352
|
}, {
|
|
353
353
|
country?: string | undefined;
|
|
354
354
|
label?: string | undefined;
|
|
355
355
|
action?: "ban" | "approve_unban" | "reject_unban" | undefined;
|
|
356
|
-
isDefault?: boolean | undefined;
|
|
357
|
-
banReason?: string | undefined;
|
|
358
356
|
ownerId?: string | undefined;
|
|
359
357
|
ownerType?: "user" | "store" | undefined;
|
|
360
358
|
fullName?: string | undefined;
|
|
@@ -363,14 +361,14 @@ export declare const adminAddressPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
363
361
|
city?: string | undefined;
|
|
364
362
|
state?: string | undefined;
|
|
365
363
|
postalCode?: string | undefined;
|
|
364
|
+
isDefault?: boolean | undefined;
|
|
366
365
|
addressLine2?: string | undefined;
|
|
367
366
|
landmark?: string | undefined;
|
|
367
|
+
banReason?: string | undefined;
|
|
368
368
|
}>, {
|
|
369
369
|
country?: string | undefined;
|
|
370
370
|
label?: string | undefined;
|
|
371
371
|
action?: "ban" | "approve_unban" | "reject_unban" | undefined;
|
|
372
|
-
isDefault?: boolean | undefined;
|
|
373
|
-
banReason?: string | undefined;
|
|
374
372
|
ownerId?: string | undefined;
|
|
375
373
|
ownerType?: "user" | "store" | undefined;
|
|
376
374
|
fullName?: string | undefined;
|
|
@@ -379,14 +377,14 @@ export declare const adminAddressPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
379
377
|
city?: string | undefined;
|
|
380
378
|
state?: string | undefined;
|
|
381
379
|
postalCode?: string | undefined;
|
|
380
|
+
isDefault?: boolean | undefined;
|
|
382
381
|
addressLine2?: string | undefined;
|
|
383
382
|
landmark?: string | undefined;
|
|
383
|
+
banReason?: string | undefined;
|
|
384
384
|
}, {
|
|
385
385
|
country?: string | undefined;
|
|
386
386
|
label?: string | undefined;
|
|
387
387
|
action?: "ban" | "approve_unban" | "reject_unban" | undefined;
|
|
388
|
-
isDefault?: boolean | undefined;
|
|
389
|
-
banReason?: string | undefined;
|
|
390
388
|
ownerId?: string | undefined;
|
|
391
389
|
ownerType?: "user" | "store" | undefined;
|
|
392
390
|
fullName?: string | undefined;
|
|
@@ -395,8 +393,10 @@ export declare const adminAddressPatchSchema: z.ZodEffects<z.ZodObject<{
|
|
|
395
393
|
city?: string | undefined;
|
|
396
394
|
state?: string | undefined;
|
|
397
395
|
postalCode?: string | undefined;
|
|
396
|
+
isDefault?: boolean | undefined;
|
|
398
397
|
addressLine2?: string | undefined;
|
|
399
398
|
landmark?: string | undefined;
|
|
399
|
+
banReason?: string | undefined;
|
|
400
400
|
}>;
|
|
401
401
|
export type AdminAddressPatchValues = z.infer<typeof adminAddressPatchSchema>;
|
|
402
402
|
/**
|
|
@@ -41,7 +41,6 @@ export declare const addressFirestoreSchema: z.ZodObject<{
|
|
|
41
41
|
updatedAt: string | Date | z.objectOutputType<{
|
|
42
42
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
43
43
|
}, z.ZodTypeAny, "passthrough">;
|
|
44
|
-
isDefault: boolean;
|
|
45
44
|
ownerId: string;
|
|
46
45
|
ownerType: "user" | "store";
|
|
47
46
|
fullName: string;
|
|
@@ -50,6 +49,7 @@ export declare const addressFirestoreSchema: z.ZodObject<{
|
|
|
50
49
|
city: string;
|
|
51
50
|
state: string;
|
|
52
51
|
postalCode: string;
|
|
52
|
+
isDefault: boolean;
|
|
53
53
|
addressLine2?: string | undefined;
|
|
54
54
|
landmark?: string | undefined;
|
|
55
55
|
}, {
|
|
@@ -62,7 +62,6 @@ export declare const addressFirestoreSchema: z.ZodObject<{
|
|
|
62
62
|
updatedAt: string | Date | z.objectInputType<{
|
|
63
63
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
64
64
|
}, z.ZodTypeAny, "passthrough">;
|
|
65
|
-
isDefault: boolean;
|
|
66
65
|
ownerId: string;
|
|
67
66
|
ownerType: "user" | "store";
|
|
68
67
|
fullName: string;
|
|
@@ -71,6 +70,7 @@ export declare const addressFirestoreSchema: z.ZodObject<{
|
|
|
71
70
|
city: string;
|
|
72
71
|
state: string;
|
|
73
72
|
postalCode: string;
|
|
73
|
+
isDefault: boolean;
|
|
74
74
|
addressLine2?: string | undefined;
|
|
75
75
|
landmark?: string | undefined;
|
|
76
76
|
}>;
|