@orvello/sdk 0.6.0 → 0.7.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/CONTRACT_SHA256 +1 -1
- package/README.md +10 -0
- package/dist/contract.cjs +13 -0
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +138 -2
- package/dist/contract.d.ts +138 -2
- package/dist/contract.js +13 -0
- package/dist/contract.js.map +1 -1
- package/dist/index.cjs +46 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +46 -4
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +788 -2
- package/package.json +1 -1
package/CONTRACT_SHA256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bab3c1b429c28f8ac8aea5f9325c1205c6a29e2481efc868ad47a74d6587cc3d
|
package/README.md
CHANGED
|
@@ -456,3 +456,13 @@ This initial contract rejects `paidAt` combined with a key. Existing unkeyed cal
|
|
|
456
456
|
retain their behavior and do not gain idempotency. A standalone HTTP Idempotency-Key
|
|
457
457
|
header is not sufficient for this endpoint; the canonical field is in the body.
|
|
458
458
|
Available from SDK 0.6.0. Deploy Bills migration 0042 before using keyed creation.
|
|
459
|
+
|
|
460
|
+
### Agreed gross prices and accounting preview (0.7.0)
|
|
461
|
+
|
|
462
|
+
Invoice lines accept exactly one `unitPriceNet` or `unitPriceGross` (EUR, two decimal
|
|
463
|
+
places). Bills derives the tax component from its accounting rules without changing
|
|
464
|
+
the gross customer price. `client.invoices.preview(body)` returns dated net, VAT and
|
|
465
|
+
gross amounts as decimal strings, per-line explanations and `quoteHash`/`quoteVersion`.
|
|
466
|
+
Supply those quote fields to creation to detect changes. Missing tax facts fail closed.
|
|
467
|
+
A quote does not create an invoice, confirm payment or calculate spendable cash.
|
|
468
|
+
Requires the matching Bills gross-price API; no new database migration.
|
package/dist/contract.cjs
CHANGED
|
@@ -3876,6 +3876,19 @@ var apiRoutes_invoices = {
|
|
|
3876
3876
|
|
|
3877
3877
|
// src/generated/api/features/routes.invoices_external.ts
|
|
3878
3878
|
var apiRoutes_invoices_external = {
|
|
3879
|
+
// Contract source: explicit
|
|
3880
|
+
"invoices_preview_external": {
|
|
3881
|
+
method: "POST",
|
|
3882
|
+
path: "/invoices/external/preview",
|
|
3883
|
+
auth: { "type": "unified_bearer", "allowUserSession": false, "allowOAuth2": true, "allowApiKey": true, "requireRole": "viewer", "scopes": ["invoices:read"] },
|
|
3884
|
+
meta: {
|
|
3885
|
+
tags: ["invoices-external"],
|
|
3886
|
+
summary: "Calculate net, VAT and gross using current accounting facts",
|
|
3887
|
+
description: "Same calculation as invoice creation. Accepts exactly one net or gross unit price. Gross prices keep the agreed EUR total. No invoice or payment is created. The quote is a dated observation; creation revalidates quoteHash and quoteVersion. Missing tax facts fail closed.",
|
|
3888
|
+
validated: { "params": false, "query": false, "body": true }
|
|
3889
|
+
},
|
|
3890
|
+
types: null
|
|
3891
|
+
},
|
|
3879
3892
|
// Contract source: explicit
|
|
3880
3893
|
"invoices_payment_events_external": {
|
|
3881
3894
|
method: "GET",
|