@beliq/sdk 0.4.0 → 0.4.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/CHANGELOG.md +68 -0
- package/README.md +1 -1
- package/dist/index.d.cts +51 -0
- package/dist/index.d.ts +51 -0
- package/package.json +3 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
`@beliq/sdk` is on a 0.x line, so a caret range pins the minor: `^0.4.0`
|
|
4
|
+
resolves 0.4.x and never reaches 0.5.0. Additive spec syncs ship as patches for
|
|
5
|
+
that reason, and a minor is reserved for a change that needs consumers to opt in.
|
|
6
|
+
|
|
7
|
+
## 0.4.1 - 2026-09-21
|
|
8
|
+
|
|
9
|
+
- Invoice lines carry the item's price detail and identity: `grossPrice`
|
|
10
|
+
(BT-148) with the per-unit `priceDiscount` (BT-147), `priceBaseQuantity`
|
|
11
|
+
(BT-149/150), `standardItemId` (BT-157), `classifications` (BT-158),
|
|
12
|
+
`originCountryCode` (BT-159) and `attributes` (BG-32). A discount needs a
|
|
13
|
+
gross price and `unitPrice` must equal `grossPrice` minus `priceDiscount`, or
|
|
14
|
+
the API answers 400. With a base quantity the line net (BT-131) is quantity x
|
|
15
|
+
(`unitPrice` / `priceBaseQuantity`), which is what lets a caller who prices
|
|
16
|
+
per 100 units pass PEPPOL-EN16931-R120. The fatturapa, facturae and eslog
|
|
17
|
+
targets read none of these fields.
|
|
18
|
+
- The release workflow refuses a tag whose version disagrees with
|
|
19
|
+
`package.json`. Tagging v0.4.1 against a manifest reading 0.4.0 used to
|
|
20
|
+
publish 0.4.0 and exit green, leaving a tag naming a version that never
|
|
21
|
+
shipped.
|
|
22
|
+
|
|
23
|
+
## 0.4.0 - 2026-09-19
|
|
24
|
+
|
|
25
|
+
- `GET /v1/rulesets` reports retained ruleset versions, so a caller can see
|
|
26
|
+
which older rule sets are still servable rather than only the current one.
|
|
27
|
+
- Participant enrollment codes and the invoice delivery fields are typed.
|
|
28
|
+
- BT-6 (VAT accounting currency) and BT-111 (VAT amount in the accounting
|
|
29
|
+
currency) are typed on the invoice.
|
|
30
|
+
- A scheduled ruleset change reports its capabilities.
|
|
31
|
+
- The README's quick-start invoice is one the API accepts as-is.
|
|
32
|
+
- An em-dash scrub gate runs over the whole tree before publish, and the
|
|
33
|
+
release workflow carries job timeouts and refuses a tag that is not on `main`.
|
|
34
|
+
- The `js-yaml` override floor is raised above GHSA-2883-xcg3-v3hh.
|
|
35
|
+
|
|
36
|
+
## 0.3.1 - 2026-09-02
|
|
37
|
+
|
|
38
|
+
- A spent monthly quota is raised, not retried. A 429 carrying
|
|
39
|
+
`QUOTA_EXCEEDED` is terminal, so the SDK makes exactly one attempt; a 429
|
|
40
|
+
carrying `RATE_LIMITED` or `ACCOUNT_THROTTLED` still retries. Retrying an
|
|
41
|
+
exhausted quota only burned the caller's own backoff window.
|
|
42
|
+
- The France transmission verdict fields and pre-flight error codes are typed.
|
|
43
|
+
- GitHub Actions are pinned to commit SHAs.
|
|
44
|
+
|
|
45
|
+
## 0.3.0 - 2026-08-30
|
|
46
|
+
|
|
47
|
+
- A per-standard profile map: which profile each standard accepts, and which
|
|
48
|
+
standards pin their own and reject one sent by the caller.
|
|
49
|
+
- A per-attempt deadline, and transient failures are retried.
|
|
50
|
+
- The transport defaults are exported from the package entry point, so a caller
|
|
51
|
+
can read the timeout and retry values the SDK ships with.
|
|
52
|
+
- The vendored `openapi.json` is asserted byte-identical to what beliq-api
|
|
53
|
+
generates, and the drift check is directional in the code rather than only in
|
|
54
|
+
its comment. Ten Peppol emit error codes, the 413 responses, the verdict
|
|
55
|
+
verification tier and the `/v1/me` response shape are typed; two error codes
|
|
56
|
+
the API no longer declares are dropped.
|
|
57
|
+
- eslint 10 and flat config.
|
|
58
|
+
|
|
59
|
+
## 0.2.0 - 2026-07-24
|
|
60
|
+
|
|
61
|
+
- Types refreshed to API 0.2.0: the generate seal, `livemode`, and the NLCIUS
|
|
62
|
+
preset.
|
|
63
|
+
|
|
64
|
+
## 0.1.1 - 2026-06-30
|
|
65
|
+
|
|
66
|
+
- First published release. TypeScript/JavaScript SDK for the beliq e-invoice
|
|
67
|
+
API: generate, validate, parse and convert, ESM and CommonJS with bundled
|
|
68
|
+
type declarations.
|
package/README.md
CHANGED
|
@@ -192,7 +192,7 @@ BELIQ_API_KEY=blq_xxx npm run test:integration # hits the live API; draws quot
|
|
|
192
192
|
|
|
193
193
|
## Publishing
|
|
194
194
|
|
|
195
|
-
Released to npm as [`@beliq/sdk`](https://www.npmjs.com/package/@beliq/sdk). Releases run from `.github/workflows/release.yml` via npm Trusted Publishing (OIDC, with provenance): push a `v*.*.*` tag to publish. No npm token is stored in the repo.
|
|
195
|
+
Released to npm as [`@beliq/sdk`](https://www.npmjs.com/package/@beliq/sdk). Releases run from `.github/workflows/release.yml` via npm Trusted Publishing (OIDC, with provenance): bump `version` in `package.json`, run `npm install --package-lock-only`, add the release's entry to [`CHANGELOG.md`](CHANGELOG.md), merge, then push a `v*.*.*` tag on the merge commit to publish. No npm token is stored in the repo.
|
|
196
196
|
|
|
197
197
|
## License
|
|
198
198
|
|
package/dist/index.d.cts
CHANGED
|
@@ -13,6 +13,23 @@ interface components {
|
|
|
13
13
|
vatCategoryCode: string;
|
|
14
14
|
itemId?: string;
|
|
15
15
|
buyerItemId?: string;
|
|
16
|
+
grossPrice?: number;
|
|
17
|
+
priceDiscount?: number;
|
|
18
|
+
priceBaseQuantity?: number;
|
|
19
|
+
standardItemId?: {
|
|
20
|
+
id: string;
|
|
21
|
+
schemeId: string;
|
|
22
|
+
};
|
|
23
|
+
classifications?: {
|
|
24
|
+
code: string;
|
|
25
|
+
listId: string;
|
|
26
|
+
listVersionId?: string;
|
|
27
|
+
}[];
|
|
28
|
+
originCountryCode?: string;
|
|
29
|
+
attributes?: {
|
|
30
|
+
name: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
16
33
|
subLines?: components["schemas"]["InvoiceLine"][];
|
|
17
34
|
};
|
|
18
35
|
};
|
|
@@ -235,6 +252,23 @@ interface operations {
|
|
|
235
252
|
vatCategoryCode: string;
|
|
236
253
|
itemId?: string;
|
|
237
254
|
buyerItemId?: string;
|
|
255
|
+
grossPrice?: number;
|
|
256
|
+
priceDiscount?: number;
|
|
257
|
+
priceBaseQuantity?: number;
|
|
258
|
+
standardItemId?: {
|
|
259
|
+
id: string;
|
|
260
|
+
schemeId: string;
|
|
261
|
+
};
|
|
262
|
+
classifications?: {
|
|
263
|
+
code: string;
|
|
264
|
+
listId: string;
|
|
265
|
+
listVersionId?: string;
|
|
266
|
+
}[];
|
|
267
|
+
originCountryCode?: string;
|
|
268
|
+
attributes?: {
|
|
269
|
+
name: string;
|
|
270
|
+
value: string;
|
|
271
|
+
}[];
|
|
238
272
|
subLines?: components["schemas"]["InvoiceLine"][];
|
|
239
273
|
}[];
|
|
240
274
|
taxSummary?: {
|
|
@@ -1006,6 +1040,23 @@ interface operations {
|
|
|
1006
1040
|
vatCategoryCode: string;
|
|
1007
1041
|
itemId?: string;
|
|
1008
1042
|
buyerItemId?: string;
|
|
1043
|
+
grossPrice?: number;
|
|
1044
|
+
priceDiscount?: number;
|
|
1045
|
+
priceBaseQuantity?: number;
|
|
1046
|
+
standardItemId?: {
|
|
1047
|
+
id: string;
|
|
1048
|
+
schemeId: string;
|
|
1049
|
+
};
|
|
1050
|
+
classifications?: {
|
|
1051
|
+
code: string;
|
|
1052
|
+
listId: string;
|
|
1053
|
+
listVersionId?: string;
|
|
1054
|
+
}[];
|
|
1055
|
+
originCountryCode?: string;
|
|
1056
|
+
attributes?: {
|
|
1057
|
+
name: string;
|
|
1058
|
+
value: string;
|
|
1059
|
+
}[];
|
|
1009
1060
|
subLines?: components["schemas"]["InvoiceLine"][];
|
|
1010
1061
|
}[];
|
|
1011
1062
|
taxSummary?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,23 @@ interface components {
|
|
|
13
13
|
vatCategoryCode: string;
|
|
14
14
|
itemId?: string;
|
|
15
15
|
buyerItemId?: string;
|
|
16
|
+
grossPrice?: number;
|
|
17
|
+
priceDiscount?: number;
|
|
18
|
+
priceBaseQuantity?: number;
|
|
19
|
+
standardItemId?: {
|
|
20
|
+
id: string;
|
|
21
|
+
schemeId: string;
|
|
22
|
+
};
|
|
23
|
+
classifications?: {
|
|
24
|
+
code: string;
|
|
25
|
+
listId: string;
|
|
26
|
+
listVersionId?: string;
|
|
27
|
+
}[];
|
|
28
|
+
originCountryCode?: string;
|
|
29
|
+
attributes?: {
|
|
30
|
+
name: string;
|
|
31
|
+
value: string;
|
|
32
|
+
}[];
|
|
16
33
|
subLines?: components["schemas"]["InvoiceLine"][];
|
|
17
34
|
};
|
|
18
35
|
};
|
|
@@ -235,6 +252,23 @@ interface operations {
|
|
|
235
252
|
vatCategoryCode: string;
|
|
236
253
|
itemId?: string;
|
|
237
254
|
buyerItemId?: string;
|
|
255
|
+
grossPrice?: number;
|
|
256
|
+
priceDiscount?: number;
|
|
257
|
+
priceBaseQuantity?: number;
|
|
258
|
+
standardItemId?: {
|
|
259
|
+
id: string;
|
|
260
|
+
schemeId: string;
|
|
261
|
+
};
|
|
262
|
+
classifications?: {
|
|
263
|
+
code: string;
|
|
264
|
+
listId: string;
|
|
265
|
+
listVersionId?: string;
|
|
266
|
+
}[];
|
|
267
|
+
originCountryCode?: string;
|
|
268
|
+
attributes?: {
|
|
269
|
+
name: string;
|
|
270
|
+
value: string;
|
|
271
|
+
}[];
|
|
238
272
|
subLines?: components["schemas"]["InvoiceLine"][];
|
|
239
273
|
}[];
|
|
240
274
|
taxSummary?: {
|
|
@@ -1006,6 +1040,23 @@ interface operations {
|
|
|
1006
1040
|
vatCategoryCode: string;
|
|
1007
1041
|
itemId?: string;
|
|
1008
1042
|
buyerItemId?: string;
|
|
1043
|
+
grossPrice?: number;
|
|
1044
|
+
priceDiscount?: number;
|
|
1045
|
+
priceBaseQuantity?: number;
|
|
1046
|
+
standardItemId?: {
|
|
1047
|
+
id: string;
|
|
1048
|
+
schemeId: string;
|
|
1049
|
+
};
|
|
1050
|
+
classifications?: {
|
|
1051
|
+
code: string;
|
|
1052
|
+
listId: string;
|
|
1053
|
+
listVersionId?: string;
|
|
1054
|
+
}[];
|
|
1055
|
+
originCountryCode?: string;
|
|
1056
|
+
attributes?: {
|
|
1057
|
+
name: string;
|
|
1058
|
+
value: string;
|
|
1059
|
+
}[];
|
|
1009
1060
|
subLines?: components["schemas"]["InvoiceLine"][];
|
|
1010
1061
|
}[];
|
|
1011
1062
|
taxSummary?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beliq/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Official beliq SDK: generate, validate, parse, and convert EU-compliant e-invoices (XRechnung, ZUGFeRD, Factur-X, Peppol BIS) against authority-pinned, drift-checked rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"beliq",
|
|
@@ -55,7 +55,8 @@
|
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist",
|
|
58
|
-
"examples"
|
|
58
|
+
"examples",
|
|
59
|
+
"CHANGELOG.md"
|
|
59
60
|
],
|
|
60
61
|
"publishConfig": {
|
|
61
62
|
"access": "public",
|