@reblu/site-client 5.6.0 → 5.7.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/CHANGELOG.md +49 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# @reblu/site-client
|
|
2
2
|
|
|
3
|
+
## 5.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 614e826: Shop checkout: full-invoice opt-in and the buyer's identifier (REB-73).
|
|
8
|
+
|
|
9
|
+
`ShopCheckoutInput` gains the optional `wantsFullInvoice` flag, and
|
|
10
|
+
`ShopBillingInput` the optional `billingIdType` (`NIF` for a Spanish
|
|
11
|
+
NIF/NIE/CIF; `02` EU VAT id, `03` passport, `04` ID document of the country
|
|
12
|
+
of residence, `05` residence certificate, `06` other document) and
|
|
13
|
+
`billingIdCountry` (ISO 3166-1 alpha-2, required for `02`–`06`). A full
|
|
14
|
+
invoice needs the identifier, the billing name and a billing address; without
|
|
15
|
+
the identifier the invoice is simplified.
|
|
16
|
+
|
|
17
|
+
`ShopErrorCode` gains two checkout codes, both answered before any payment:
|
|
18
|
+
`BILLING_DATA_REQUIRED` (HTTP 422, `details.field: 'billing'`) when the
|
|
19
|
+
opt-in, or a total over the tenant's simplified-invoice cap, comes without
|
|
20
|
+
those three; and `INVOICING_NOT_READY` (HTTP 503) when the shop cannot issue
|
|
21
|
+
invoices yet. Existing clients that send only `billing.billingNif` keep
|
|
22
|
+
working: its type is derived from the billing address country.
|
|
23
|
+
|
|
24
|
+
- 614e826: Shop checkout: no full-invoice opt-in on a shop that issues no invoices (REB-73).
|
|
25
|
+
- `ShopErrorCode` gains `FULL_INVOICE_UNAVAILABLE` (HTTP 422,
|
|
26
|
+
`details.field: 'wantsFullInvoice'`): `wantsFullInvoice: true` sent to a shop
|
|
27
|
+
whose invoicing is off (`ShopConfig.simplifiedInvoiceCapCents` is `null`) is
|
|
28
|
+
refused before any payment instead of succeeding without an invoice. Clients
|
|
29
|
+
that never send the opt-in are unaffected. The union is additive: a SITE
|
|
30
|
+
with an exhaustive `switch` over `ShopErrorCode` (or a
|
|
31
|
+
`Record<ShopErrorCode, …>`) must add the new member when it upgrades.
|
|
32
|
+
- `@reblu/site-blocks`: new `shopIssuesInvoices(config)`; `FullInvoiceFields`
|
|
33
|
+
takes `issuesInvoices` (default `true`) and renders nothing when it is
|
|
34
|
+
`false`, and `toCheckoutInvoiceFields(value, overCap, issuesInvoices)`
|
|
35
|
+
returns no opt-in and no billing block then. Default Spanish copy for the
|
|
36
|
+
new code in `getShopErrorMessage`.
|
|
37
|
+
|
|
38
|
+
- 614e826: Shop: the order's invoice and the simplified-invoice cap (REB-73).
|
|
39
|
+
- `ShopOrder` gains the optional `invoice: { number, url } | null`
|
|
40
|
+
(`ShopOrderInvoice`): once the sale invoice is issued, its number and the
|
|
41
|
+
shop's authenticated client-portal route that serves it — never a signed
|
|
42
|
+
URL, so the link does not expire; the buyer signs in to open it.
|
|
43
|
+
- `ShopConfig` gains `simplifiedInvoiceCapCents` (cents, never above the legal
|
|
44
|
+
300000; `null` while the shop issues no invoices): above it, checkout needs
|
|
45
|
+
the buyer's identifier, name and billing address.
|
|
46
|
+
- `@reblu/site-blocks`: new drop-in `OrderInvoiceLink`, which
|
|
47
|
+
`OrderConfirmation` now renders under a confirmed order (labels
|
|
48
|
+
`invoiceLinkLabel`/`invoiceSignInHint`), and default Spanish copy for the
|
|
49
|
+
`BILLING_DATA_REQUIRED`/`INVOICING_NOT_READY` checkout codes in
|
|
50
|
+
`getShopErrorMessage`.
|
|
51
|
+
|
|
3
52
|
## 5.6.0
|
|
4
53
|
|
|
5
54
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reblu/site-client",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "Framework-agnostic HTTP client for the Reblu SITE API — dependency-free, injectable cache adapter, typed by @reblu/site-contracts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Reblu — Adolfo Unturbe",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@reblu/site-contracts": "^1.
|
|
50
|
+
"@reblu/site-contracts": "^1.15.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@size-limit/preset-small-lib": "^11.1.6",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vitest": "^4.0.15",
|
|
60
60
|
"@reblu/config": "0.0.1",
|
|
61
|
-
"@reblu/site-contracts": "^1.
|
|
61
|
+
"@reblu/site-contracts": "^1.15.0"
|
|
62
62
|
},
|
|
63
63
|
"size-limit": [
|
|
64
64
|
{
|