@getpeppr/cli 0.5.2 → 0.5.4
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 +7 -7
- package/dist/index.js +28 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ getpeppr init --credit-note # credit note template
|
|
|
26
26
|
getpeppr init --force # overwrite existing file
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
The generated template includes a Belgian seller,
|
|
29
|
+
The generated template includes a Belgian seller, the sandbox test receiver as buyer, and two invoice lines — ready to edit, validate, convert, and send from a sandbox account.
|
|
30
30
|
|
|
31
31
|
### `getpeppr validate` — Validate an invoice
|
|
32
32
|
|
|
@@ -218,12 +218,12 @@ The input file must be a JSON object matching the getpeppr `InvoiceInput` type.
|
|
|
218
218
|
"country": "BE"
|
|
219
219
|
},
|
|
220
220
|
"to": {
|
|
221
|
-
"name": "
|
|
222
|
-
"peppolId": "
|
|
223
|
-
"street": "
|
|
224
|
-
"city": "
|
|
225
|
-
"postalCode": "
|
|
226
|
-
"country": "
|
|
221
|
+
"name": "SPF Economie (test receiver)",
|
|
222
|
+
"peppolId": "9925:BE0314595348",
|
|
223
|
+
"street": "Rue du Progrès 50",
|
|
224
|
+
"city": "Brussels",
|
|
225
|
+
"postalCode": "1210",
|
|
226
|
+
"country": "BE"
|
|
227
227
|
},
|
|
228
228
|
"lines": [
|
|
229
229
|
{
|
package/dist/index.js
CHANGED
|
@@ -1161,7 +1161,7 @@ function statusFamily(status) {
|
|
|
1161
1161
|
var TERMINAL_FAILURE_STATUSES = STATUS_PRECEDENCE.filter((e) => e.family === "terminal-failure").map((e) => e.status);
|
|
1162
1162
|
|
|
1163
1163
|
// ../sdk/dist/version.js
|
|
1164
|
-
var SDK_VERSION = "2.
|
|
1164
|
+
var SDK_VERSION = "2.5.0";
|
|
1165
1165
|
|
|
1166
1166
|
// ../sdk/dist/core/client.js
|
|
1167
1167
|
function findHeaderCaseInsensitive(headers, name) {
|
|
@@ -1408,7 +1408,18 @@ var GetpepprAdapter = class {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
async searchDirectory(params) {
|
|
1410
1410
|
const query = new URLSearchParams(params).toString();
|
|
1411
|
-
|
|
1411
|
+
const result = await this.request("GET", `/directory/search?${query}`);
|
|
1412
|
+
const data = result.data ?? [];
|
|
1413
|
+
const meta = result.meta;
|
|
1414
|
+
return {
|
|
1415
|
+
data,
|
|
1416
|
+
meta: {
|
|
1417
|
+
totalCount: Number(meta?.total_count ?? meta?.totalCount ?? data.length),
|
|
1418
|
+
offset: Number(meta?.offset ?? params.offset ?? 0),
|
|
1419
|
+
limit: Number(meta?.limit ?? params.limit ?? 20),
|
|
1420
|
+
hasMore: meta?.has_more != null || meta?.hasMore != null ? Boolean(meta.has_more ?? meta.hasMore) : Number(meta?.total_count ?? meta?.totalCount ?? 0) > Number(meta?.offset ?? 0) + Number(meta?.limit ?? 0)
|
|
1421
|
+
}
|
|
1422
|
+
};
|
|
1412
1423
|
}
|
|
1413
1424
|
async getInvoiceAs(id, format) {
|
|
1414
1425
|
const { maxRetries, initialDelayMs, maxDelayMs } = this.retryConfig;
|
|
@@ -3171,13 +3182,15 @@ var INVOICE_TEMPLATE = {
|
|
|
3171
3182
|
postalCode: "1050",
|
|
3172
3183
|
country: "BE"
|
|
3173
3184
|
},
|
|
3185
|
+
// Sandbox test receiver (GPR-828): the only recipient guaranteed reachable on
|
|
3186
|
+
// the Storecove test network -- real directory companies make sandbox sends fail.
|
|
3174
3187
|
to: {
|
|
3175
|
-
name: "
|
|
3176
|
-
peppolId: "
|
|
3177
|
-
street: "
|
|
3178
|
-
city: "
|
|
3179
|
-
postalCode: "
|
|
3180
|
-
country: "
|
|
3188
|
+
name: "SPF Economie (test receiver)",
|
|
3189
|
+
peppolId: "9925:BE0314595348",
|
|
3190
|
+
street: "Rue du Progr\xE8s 50",
|
|
3191
|
+
city: "Brussels",
|
|
3192
|
+
postalCode: "1210",
|
|
3193
|
+
country: "BE"
|
|
3181
3194
|
},
|
|
3182
3195
|
lines: [
|
|
3183
3196
|
{
|
|
@@ -3213,13 +3226,14 @@ var CREDIT_NOTE_TEMPLATE = {
|
|
|
3213
3226
|
postalCode: "1050",
|
|
3214
3227
|
country: "BE"
|
|
3215
3228
|
},
|
|
3229
|
+
// Sandbox test receiver (GPR-828) \u2014 keep in sync with templates/invoice.ts.
|
|
3216
3230
|
to: {
|
|
3217
|
-
name: "
|
|
3218
|
-
peppolId: "
|
|
3219
|
-
street: "
|
|
3220
|
-
city: "
|
|
3221
|
-
postalCode: "
|
|
3222
|
-
country: "
|
|
3231
|
+
name: "SPF Economie (test receiver)",
|
|
3232
|
+
peppolId: "9925:BE0314595348",
|
|
3233
|
+
street: "Rue du Progr\xE8s 50",
|
|
3234
|
+
city: "Brussels",
|
|
3235
|
+
postalCode: "1210",
|
|
3236
|
+
country: "BE"
|
|
3223
3237
|
},
|
|
3224
3238
|
lines: [
|
|
3225
3239
|
{
|