@beliq/sdk 0.4.4 → 0.4.5

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 CHANGED
@@ -4,6 +4,25 @@
4
4
  resolves 0.4.x and never reaches 0.5.0. Additive spec syncs ship as patches for
5
5
  that reason, and a minor is reserved for a change that needs consumers to opt in.
6
6
 
7
+ ## 0.4.5 - 2026-10-03
8
+
9
+ - `LIVE_GENERATE_STANDARDS` carries all eight standards `POST /v1/generate`
10
+ accepts, where it had carried four. The four added are the national XSD
11
+ formats: `fatturapa`, `facturae`, `eslog` and `ksef`. Each is Schema-checked,
12
+ meaning structure only and no business rules, because its authority publishes
13
+ no machine-readable rule pack, and `GET /v1/rulesets` carries the badge.
14
+ `LIVE_PROFILES_BY_STANDARD` gains the one profile each allows: `ordinaria`
15
+ for `fatturapa` and `facturae`, `eracun` for `eslog`, `fa3` for `ksef`. The
16
+ map stays narrower than the engine in one place, the Factur-X `minimum` and
17
+ `basic` profiles, for FNFE-MPE source gating. `LIVE_GENERATE_PRESETS` is
18
+ unchanged at five entries: it mirrors what beliq.eu's own generator offers.
19
+ - The vendored `openapi.json` carries the corrected `/v1/validate` description.
20
+ It had said that matching a verdict's `rulesetArtifacts` rows against the
21
+ `GET /v1/rulesets` catalog covers publicly-supported formats only, and that a
22
+ national format's components are kept off the catalog. Both were false: the
23
+ catalog publishes every format beliq carries and the component rows each
24
+ ruleset is built from.
25
+
7
26
  ## 0.4.4 - 2026-10-02
8
27
 
9
28
  - Invoices carry additional supporting documents (BG-24) as
@@ -20,7 +20,13 @@ declare const DEFAULT_BASE_URL = "https://api.beliq.eu";
20
20
  declare const DEFAULT_TIMEOUT_MS = 90000;
21
21
  /** Extra attempts after the first, for 429 / 502 / 503 only. */
22
22
  declare const DEFAULT_MAX_RETRIES = 3;
23
- declare const LIVE_GENERATE_STANDARDS: readonly ["xrechnung", "zugferd", "facturx", "peppol-bis"];
23
+ /**
24
+ * Every `standard` POST /v1/generate accepts, in the order its enum lists them.
25
+ * The four national formats are Schema-checked: their authority publishes a
26
+ * schema and no machine-readable business rules, so beliq checks structure and
27
+ * says so. GET /v1/rulesets carries each one's badge.
28
+ */
29
+ declare const LIVE_GENERATE_STANDARDS: readonly ["xrechnung", "zugferd", "facturx", "peppol-bis", "fatturapa", "facturae", "eslog", "ksef"];
24
30
  /** A named generate target: the API `standard` plus the `profile`/`facturxProfile`/`output` it needs. */
25
31
  interface GeneratePreset {
26
32
  id: string;
@@ -56,10 +62,9 @@ declare const LIVE_PROFILES: readonly ["basicwl", "en16931", "extended", "extend
56
62
  * `peppol-bis`, and `extended-ctc-fr` is the AFNOR XP Z12-012 France CTC overlay
57
63
  * with no ZUGFeRD-branded counterpart.
58
64
  *
59
- * Narrower than the engine's own table in two places, both deliberate: the
60
- * `minimum` and `basic` Factur-X profiles are engine-supported but withheld
61
- * (FNFE-MPE source gating),
62
- * and the standards outside LIVE_GENERATE_STANDARDS are absent entirely.
65
+ * It carries every standard the API accepts. It stays narrower than the
66
+ * engine's table in one place: the `minimum` and `basic` Factur-X profiles are
67
+ * engine-supported but not offered here (FNFE-MPE source gating).
63
68
  *
64
69
  * `scripts/check-profile-drift.mjs` compares this against the engine's table.
65
70
  */
@@ -68,6 +73,10 @@ declare const LIVE_PROFILES_BY_STANDARD: {
68
73
  readonly 'peppol-bis': readonly ["peppol", "romania-ro-cius", "netherlands-nlcius"];
69
74
  readonly zugferd: readonly ["basicwl", "en16931", "extended"];
70
75
  readonly facturx: readonly ["basicwl", "en16931", "extended", "extended-ctc-fr"];
76
+ readonly fatturapa: readonly ["ordinaria"];
77
+ readonly facturae: readonly ["ordinaria"];
78
+ readonly eslog: readonly ["eracun"];
79
+ readonly ksef: readonly ["fa3"];
71
80
  };
72
81
  /** The profiles a caller may choose for `standard`; empty for an unknown standard. */
73
82
  declare function profilesForStandard(standard: string): readonly string[];
@@ -20,7 +20,13 @@ declare const DEFAULT_BASE_URL = "https://api.beliq.eu";
20
20
  declare const DEFAULT_TIMEOUT_MS = 90000;
21
21
  /** Extra attempts after the first, for 429 / 502 / 503 only. */
22
22
  declare const DEFAULT_MAX_RETRIES = 3;
23
- declare const LIVE_GENERATE_STANDARDS: readonly ["xrechnung", "zugferd", "facturx", "peppol-bis"];
23
+ /**
24
+ * Every `standard` POST /v1/generate accepts, in the order its enum lists them.
25
+ * The four national formats are Schema-checked: their authority publishes a
26
+ * schema and no machine-readable business rules, so beliq checks structure and
27
+ * says so. GET /v1/rulesets carries each one's badge.
28
+ */
29
+ declare const LIVE_GENERATE_STANDARDS: readonly ["xrechnung", "zugferd", "facturx", "peppol-bis", "fatturapa", "facturae", "eslog", "ksef"];
24
30
  /** A named generate target: the API `standard` plus the `profile`/`facturxProfile`/`output` it needs. */
25
31
  interface GeneratePreset {
26
32
  id: string;
@@ -56,10 +62,9 @@ declare const LIVE_PROFILES: readonly ["basicwl", "en16931", "extended", "extend
56
62
  * `peppol-bis`, and `extended-ctc-fr` is the AFNOR XP Z12-012 France CTC overlay
57
63
  * with no ZUGFeRD-branded counterpart.
58
64
  *
59
- * Narrower than the engine's own table in two places, both deliberate: the
60
- * `minimum` and `basic` Factur-X profiles are engine-supported but withheld
61
- * (FNFE-MPE source gating),
62
- * and the standards outside LIVE_GENERATE_STANDARDS are absent entirely.
65
+ * It carries every standard the API accepts. It stays narrower than the
66
+ * engine's table in one place: the `minimum` and `basic` Factur-X profiles are
67
+ * engine-supported but not offered here (FNFE-MPE source gating).
63
68
  *
64
69
  * `scripts/check-profile-drift.mjs` compares this against the engine's table.
65
70
  */
@@ -68,6 +73,10 @@ declare const LIVE_PROFILES_BY_STANDARD: {
68
73
  readonly 'peppol-bis': readonly ["peppol", "romania-ro-cius", "netherlands-nlcius"];
69
74
  readonly zugferd: readonly ["basicwl", "en16931", "extended"];
70
75
  readonly facturx: readonly ["basicwl", "en16931", "extended", "extended-ctc-fr"];
76
+ readonly fatturapa: readonly ["ordinaria"];
77
+ readonly facturae: readonly ["ordinaria"];
78
+ readonly eslog: readonly ["eracun"];
79
+ readonly ksef: readonly ["fa3"];
71
80
  };
72
81
  /** The profiles a caller may choose for `standard`; empty for an unknown standard. */
73
82
  declare function profilesForStandard(standard: string): readonly string[];
package/dist/helpers.cjs CHANGED
@@ -165,7 +165,16 @@ function buildRequest(params) {
165
165
 
166
166
  // src/constants.ts
167
167
  var DEFAULT_BASE_URL = "https://api.beliq.eu";
168
- var LIVE_GENERATE_STANDARDS = ["xrechnung", "zugferd", "facturx", "peppol-bis"];
168
+ var LIVE_GENERATE_STANDARDS = [
169
+ "xrechnung",
170
+ "zugferd",
171
+ "facturx",
172
+ "peppol-bis",
173
+ "fatturapa",
174
+ "facturae",
175
+ "eslog",
176
+ "ksef"
177
+ ];
169
178
  var LIVE_GENERATE_PRESETS = [
170
179
  { id: "xrechnung", label: "XRechnung", standard: "xrechnung", output: "xml" },
171
180
  { id: "factur-x", label: "Factur-X", standard: "facturx", output: "pdf", facturxProfile: "en16931" },
@@ -178,7 +187,11 @@ var LIVE_PROFILES_BY_STANDARD = {
178
187
  xrechnung: ["xrechnung"],
179
188
  "peppol-bis": ["peppol", "romania-ro-cius", "netherlands-nlcius"],
180
189
  zugferd: ["basicwl", "en16931", "extended"],
181
- facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"]
190
+ facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"],
191
+ fatturapa: ["ordinaria"],
192
+ facturae: ["ordinaria"],
193
+ eslog: ["eracun"],
194
+ ksef: ["fa3"]
182
195
  };
183
196
  function profilesForStandard(standard) {
184
197
  return LIVE_PROFILES_BY_STANDARD[standard] ?? [];
@@ -1,5 +1,5 @@
1
- import { P as PlainObject } from './constants-CIRzGHqn.cjs';
2
- export { D as DEFAULT_BASE_URL, a as DocumentInput, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, i as compactQuery, j as decodeUtf8, k as isPlainObject, l as isProfileAllowedForStandard, m as mergeDeep, p as profilesForStandard, s as sniffContentType, t as toBytes } from './constants-CIRzGHqn.cjs';
1
+ import { P as PlainObject } from './constants-DFGl_MXW.cjs';
2
+ export { D as DEFAULT_BASE_URL, a as DocumentInput, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, i as compactQuery, j as decodeUtf8, k as isPlainObject, l as isProfileAllowedForStandard, m as mergeDeep, p as profilesForStandard, s as sniffContentType, t as toBytes } from './constants-DFGl_MXW.cjs';
3
3
 
4
4
  type Operation = 'me' | 'generate' | 'validate' | 'parse' | 'convert';
5
5
  /** 'json' => parse the `{ success, data }` envelope; 'binary' => return raw bytes. */
package/dist/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PlainObject } from './constants-CIRzGHqn.js';
2
- export { D as DEFAULT_BASE_URL, a as DocumentInput, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, i as compactQuery, j as decodeUtf8, k as isPlainObject, l as isProfileAllowedForStandard, m as mergeDeep, p as profilesForStandard, s as sniffContentType, t as toBytes } from './constants-CIRzGHqn.js';
1
+ import { P as PlainObject } from './constants-DFGl_MXW.js';
2
+ export { D as DEFAULT_BASE_URL, a as DocumentInput, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, i as compactQuery, j as decodeUtf8, k as isPlainObject, l as isProfileAllowedForStandard, m as mergeDeep, p as profilesForStandard, s as sniffContentType, t as toBytes } from './constants-DFGl_MXW.js';
3
3
 
4
4
  type Operation = 'me' | 'generate' | 'validate' | 'parse' | 'convert';
5
5
  /** 'json' => parse the `{ success, data }` envelope; 'binary' => return raw bytes. */
package/dist/helpers.js CHANGED
@@ -122,7 +122,16 @@ function buildRequest(params) {
122
122
 
123
123
  // src/constants.ts
124
124
  var DEFAULT_BASE_URL = "https://api.beliq.eu";
125
- var LIVE_GENERATE_STANDARDS = ["xrechnung", "zugferd", "facturx", "peppol-bis"];
125
+ var LIVE_GENERATE_STANDARDS = [
126
+ "xrechnung",
127
+ "zugferd",
128
+ "facturx",
129
+ "peppol-bis",
130
+ "fatturapa",
131
+ "facturae",
132
+ "eslog",
133
+ "ksef"
134
+ ];
126
135
  var LIVE_GENERATE_PRESETS = [
127
136
  { id: "xrechnung", label: "XRechnung", standard: "xrechnung", output: "xml" },
128
137
  { id: "factur-x", label: "Factur-X", standard: "facturx", output: "pdf", facturxProfile: "en16931" },
@@ -135,7 +144,11 @@ var LIVE_PROFILES_BY_STANDARD = {
135
144
  xrechnung: ["xrechnung"],
136
145
  "peppol-bis": ["peppol", "romania-ro-cius", "netherlands-nlcius"],
137
146
  zugferd: ["basicwl", "en16931", "extended"],
138
- facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"]
147
+ facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"],
148
+ fatturapa: ["ordinaria"],
149
+ facturae: ["ordinaria"],
150
+ eslog: ["eracun"],
151
+ ksef: ["fa3"]
139
152
  };
140
153
  function profilesForStandard(standard) {
141
154
  return LIVE_PROFILES_BY_STANDARD[standard] ?? [];
package/dist/index.cjs CHANGED
@@ -211,7 +211,16 @@ function errorFromResponse(status, bytes) {
211
211
  var DEFAULT_BASE_URL = "https://api.beliq.eu";
212
212
  var DEFAULT_TIMEOUT_MS = 9e4;
213
213
  var DEFAULT_MAX_RETRIES = 3;
214
- var LIVE_GENERATE_STANDARDS = ["xrechnung", "zugferd", "facturx", "peppol-bis"];
214
+ var LIVE_GENERATE_STANDARDS = [
215
+ "xrechnung",
216
+ "zugferd",
217
+ "facturx",
218
+ "peppol-bis",
219
+ "fatturapa",
220
+ "facturae",
221
+ "eslog",
222
+ "ksef"
223
+ ];
215
224
  var LIVE_GENERATE_PRESETS = [
216
225
  { id: "xrechnung", label: "XRechnung", standard: "xrechnung", output: "xml" },
217
226
  { id: "factur-x", label: "Factur-X", standard: "facturx", output: "pdf", facturxProfile: "en16931" },
@@ -224,7 +233,11 @@ var LIVE_PROFILES_BY_STANDARD = {
224
233
  xrechnung: ["xrechnung"],
225
234
  "peppol-bis": ["peppol", "romania-ro-cius", "netherlands-nlcius"],
226
235
  zugferd: ["basicwl", "en16931", "extended"],
227
- facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"]
236
+ facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"],
237
+ fatturapa: ["ordinaria"],
238
+ facturae: ["ordinaria"],
239
+ eslog: ["eracun"],
240
+ ksef: ["fa3"]
228
241
  };
229
242
  function profilesForStandard(standard) {
230
243
  return LIVE_PROFILES_BY_STANDARD[standard] ?? [];
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PlainObject, a as DocumentInput } from './constants-CIRzGHqn.cjs';
2
- export { D as DEFAULT_BASE_URL, n as DEFAULT_MAX_RETRIES, o as DEFAULT_TIMEOUT_MS, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, l as isProfileAllowedForStandard, p as profilesForStandard } from './constants-CIRzGHqn.cjs';
1
+ import { P as PlainObject, a as DocumentInput } from './constants-DFGl_MXW.cjs';
2
+ export { D as DEFAULT_BASE_URL, n as DEFAULT_MAX_RETRIES, o as DEFAULT_TIMEOUT_MS, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, l as isProfileAllowedForStandard, p as profilesForStandard } from './constants-DFGl_MXW.cjs';
3
3
 
4
4
  interface components {
5
5
  schemas: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PlainObject, a as DocumentInput } from './constants-CIRzGHqn.js';
2
- export { D as DEFAULT_BASE_URL, n as DEFAULT_MAX_RETRIES, o as DEFAULT_TIMEOUT_MS, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, l as isProfileAllowedForStandard, p as profilesForStandard } from './constants-CIRzGHqn.js';
1
+ import { P as PlainObject, a as DocumentInput } from './constants-DFGl_MXW.js';
2
+ export { D as DEFAULT_BASE_URL, n as DEFAULT_MAX_RETRIES, o as DEFAULT_TIMEOUT_MS, G as GeneratePreset, L as LIVE_CONVERT_SOURCE_FORMATS, b as LIVE_CONVERT_TARGET_FORMATS, c as LIVE_GENERATE_PRESETS, d as LIVE_GENERATE_STANDARDS, e as LIVE_PARSE_FORMATS, f as LIVE_PROFILES, g as LIVE_PROFILES_BY_STANDARD, h as LIVE_VALIDATE_FORMATS, l as isProfileAllowedForStandard, p as profilesForStandard } from './constants-DFGl_MXW.js';
3
3
 
4
4
  interface components {
5
5
  schemas: {
package/dist/index.js CHANGED
@@ -171,7 +171,16 @@ function errorFromResponse(status, bytes) {
171
171
  var DEFAULT_BASE_URL = "https://api.beliq.eu";
172
172
  var DEFAULT_TIMEOUT_MS = 9e4;
173
173
  var DEFAULT_MAX_RETRIES = 3;
174
- var LIVE_GENERATE_STANDARDS = ["xrechnung", "zugferd", "facturx", "peppol-bis"];
174
+ var LIVE_GENERATE_STANDARDS = [
175
+ "xrechnung",
176
+ "zugferd",
177
+ "facturx",
178
+ "peppol-bis",
179
+ "fatturapa",
180
+ "facturae",
181
+ "eslog",
182
+ "ksef"
183
+ ];
175
184
  var LIVE_GENERATE_PRESETS = [
176
185
  { id: "xrechnung", label: "XRechnung", standard: "xrechnung", output: "xml" },
177
186
  { id: "factur-x", label: "Factur-X", standard: "facturx", output: "pdf", facturxProfile: "en16931" },
@@ -184,7 +193,11 @@ var LIVE_PROFILES_BY_STANDARD = {
184
193
  xrechnung: ["xrechnung"],
185
194
  "peppol-bis": ["peppol", "romania-ro-cius", "netherlands-nlcius"],
186
195
  zugferd: ["basicwl", "en16931", "extended"],
187
- facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"]
196
+ facturx: ["basicwl", "en16931", "extended", "extended-ctc-fr"],
197
+ fatturapa: ["ordinaria"],
198
+ facturae: ["ordinaria"],
199
+ eslog: ["eracun"],
200
+ ksef: ["fa3"]
188
201
  };
189
202
  function profilesForStandard(standard) {
190
203
  return LIVE_PROFILES_BY_STANDARD[standard] ?? [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beliq/sdk",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
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",