Skip to content

v0.1.5 — ezReceipt + cross-border adopt shared input schemas

Choose a tag to compare

@linyiru linyiru released this 18 Jun 20:43
· 14 commits to main since this release

Patch release for two adapters — validation-error consistency (no breaking changes).

What changed

ezReceipt and ezPay cross-border previously skipped the shared Zod input schemas. They now adopt them where the schema is a clean fit, so their validation errors are normalized to InvoiceError (code VALIDATION) — consistent with the Amego / ECPay / ezPay adapters.

  • @paid-tw/einvoice-ezreceiptvoid / allowance / voidAllowance / query use the shared schemas.
  • @paid-tw/einvoice-ezpay-crossbordervoid / voidAllowance / query use the shared schemas.

Intentional exceptions (documented at the call sites)

  • ezReceipt issue keeps its own validator — it accepts a member id via buyer.email (carrier-info fallback), which the shared schema's email check would reject.
  • cross-border issue / allowance keep their own validator — foreign-currency sales carry 2-decimal amounts, which the integer-only amount schema would reject.

Verified against the live sandboxes: ezReceipt 15/15, ezPay cross-border 27/27.

Versions

Package Version
@paid-tw/einvoice-ezreceipt 0.1.4
@paid-tw/einvoice-ezpay-crossborder 0.1.4