@asteby/storefront 0.11.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cli.js +25 -2
- package/dist/fiscal-document.d.cts +2 -2
- package/dist/fiscal-document.d.ts +2 -2
- package/dist/index.cjs +59 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +72 -3
- package/dist/index.d.ts +72 -3
- package/dist/index.js +57 -3
- package/dist/index.js.map +1 -1
- package/dist/mock.cjs +2 -2
- 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 +2 -2
- 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/dist/{types-bsdlAumU.d.cts → types-BQ3S6VjF.d.cts} +19 -1
- package/dist/{types-B1E3GySa.d.ts → types-C_rsJRCl.d.ts} +19 -1
- package/package.json +1 -1
package/dist/mock.cjs
CHANGED
|
@@ -959,8 +959,8 @@ function validateInvoiceRequest(region, input, prefix = "invoice") {
|
|
|
959
959
|
const taxId = text(input.tax_id, input.rfc).toUpperCase();
|
|
960
960
|
const name = text(input.legal_name, input.razon_social);
|
|
961
961
|
const regime = text(input.tax_regime, input.regimen);
|
|
962
|
-
const use = text(input.use, input.uso_cfdi, input.invoice_use);
|
|
963
|
-
const postal = text(input.postal_code, input.cp);
|
|
962
|
+
const use = text(input.use, input.uso_cfdi, input.invoice_use, input.cfdi_use);
|
|
963
|
+
const postal = text(input.postal_code, input.cp, input.zip);
|
|
964
964
|
const bad = (field, message) => ({ field: `${prefix}.${field}`, message });
|
|
965
965
|
if (!taxId) return bad("tax_id", "The tax id is required");
|
|
966
966
|
if (fid?.pattern && !fid.generic_ids.includes(taxId) && !new RegExp(fid.pattern).test(taxId)) return bad("tax_id", `Not a valid ${fid.kind}`);
|