@asteby/storefront 0.20.0 → 0.21.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/{account-settings-eGXCcSzz.d.cts → account-settings-BkShqX2k.d.cts} +20 -1
- package/dist/{account-settings-BNDoVH3W.d.ts → account-settings-quulZwuF.d.ts} +20 -1
- package/dist/cli.js +1 -1
- package/dist/fiscal-document.d.cts +2 -2
- package/dist/fiscal-document.d.ts +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/mock.cjs +4 -1
- package/dist/mock.cjs.map +1 -1
- package/dist/mock.d.cts +1 -1
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +4 -1
- package/dist/mock.js.map +1 -1
- package/dist/mockup.d.cts +1 -1
- package/dist/mockup.d.ts +1 -1
- package/dist/node.cjs +1 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
package/dist/mock.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bO as SubjectKind, a6 as IdentityRulesV1, bi as RegionFiscalId, a4 as IdentityDocumentSpec, bg as Region, bz as Shop, b1 as Product, y as Collection, bR as Theme, aI as Page, aq as Menu, c as Article, C as Cart, a as Address, ag as InvoiceRequest, B as Customer, $ as FiscalProfile, bI as Subject, ax as Order, aL as PaymentAttemptResult, a_ as PendingPayment, ai as InvoiceStage, D as CustomerCapabilities, b8 as PromotionAnnouncement, by as ShippingRate, aS as PaymentMethod } from './account-settings-BkShqX2k.cjs';
|
|
2
2
|
import './geo.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/mock.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bO as SubjectKind, a6 as IdentityRulesV1, bi as RegionFiscalId, a4 as IdentityDocumentSpec, bg as Region, bz as Shop, b1 as Product, y as Collection, bR as Theme, aI as Page, aq as Menu, c as Article, C as Cart, a as Address, ag as InvoiceRequest, B as Customer, $ as FiscalProfile, bI as Subject, ax as Order, aL as PaymentAttemptResult, a_ as PendingPayment, ai as InvoiceStage, D as CustomerCapabilities, b8 as PromotionAnnouncement, by as ShippingRate, aS as PaymentMethod } from './account-settings-quulZwuF.js';
|
|
2
2
|
import './geo.js';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/mock.js
CHANGED
|
@@ -53,6 +53,9 @@ function buildAccountOrders(currency) {
|
|
|
53
53
|
folio_number: "1042",
|
|
54
54
|
total: money(129900, currency),
|
|
55
55
|
issued_at: "2026-08-13T10:00:00.000Z",
|
|
56
|
+
payment_method: "PUE",
|
|
57
|
+
payment_form: "04",
|
|
58
|
+
receiver: { rfc: "XAXX010101000", name: "P\xFAblico en general", tax_regime: "616", cfdi_use: "S01", postal_code: "76000" },
|
|
56
59
|
test_mode: false,
|
|
57
60
|
environment: "production"
|
|
58
61
|
};
|
|
@@ -2501,12 +2504,12 @@ function createMockStorefront(options = {}) {
|
|
|
2501
2504
|
const text = (v) => typeof v === "string" && v.trim() ? v.trim() : null;
|
|
2502
2505
|
const first_name = text(body.first_name);
|
|
2503
2506
|
const last_name = text(body.last_name);
|
|
2504
|
-
if (state.passwords.has(email)) throw new HttpError(409, "conflict", "An account with this email already exists", "email");
|
|
2505
2507
|
if (capabilities.email_verification) {
|
|
2506
2508
|
state.pendingRegistrations.set(email, { password, first_name, last_name });
|
|
2507
2509
|
state.otps.set(`email:${email}`, otpCode);
|
|
2508
2510
|
return { status: 202, body: { status: "verification_required" }, cache: "private" };
|
|
2509
2511
|
}
|
|
2512
|
+
if (state.passwords.has(email)) throw new HttpError(409, "conflict", "An account with this email already exists", "email");
|
|
2510
2513
|
state.passwords.set(email, password);
|
|
2511
2514
|
return { status: 201, body: sessionFor(email, { first_name, last_name }), cache: "private" };
|
|
2512
2515
|
});
|