@orvello/sdk 0.7.4 → 0.7.6
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/dist/contract.cjs +30 -3
- package/dist/contract.cjs.map +1 -1
- package/dist/contract.d.cts +217 -13
- package/dist/contract.d.ts +217 -13
- package/dist/contract.js +30 -3
- package/dist/contract.js.map +1 -1
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/openapi.json +421 -7
- package/package.json +1 -1
package/CONTRACT_SHA256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ae8f34552ee65c7e2759d53f5e72cde237d9ffdf9d9027e7c17eba42fbef3989
|
package/dist/contract.cjs
CHANGED
|
@@ -2244,7 +2244,21 @@ var apiRoutes_bookkeeping = {
|
|
|
2244
2244
|
meta: {
|
|
2245
2245
|
tags: ["bookkeeping", "payments-external"],
|
|
2246
2246
|
summary: "Settle invoice via external API",
|
|
2247
|
-
description: "One-shot settlement for shop/payment-provider flows:
|
|
2247
|
+
description: "One-shot settlement for shop/payment-provider flows. Preferred contract: grossAmount (customer payment, settles the invoice), feeAmount + feeProvider + feeReference (provider fee, booked as expense, never as customer discount), paidAt (actual payment time) and, for a payment currency other than the invoice currency, originalAmount/originalCurrency (documented gross in invoice currency; realized FX difference is recorded). Legacy contract (payoutAmount + bookedAt, optional closeGapStrategy=discount) keeps working unchanged; existing discounts are not reinterpreted. A changed fee for an already used reference is rejected with 409: use /settle-invoice/fee-correction.",
|
|
2248
|
+
bodyContentType: "application/json",
|
|
2249
|
+
validated: { "params": false, "query": false, "body": true }
|
|
2250
|
+
},
|
|
2251
|
+
types: null
|
|
2252
|
+
},
|
|
2253
|
+
// Contract source: explicit
|
|
2254
|
+
"bookkeeping_payments_settlement_fee_correction_external": {
|
|
2255
|
+
method: "POST",
|
|
2256
|
+
path: "/bookkeeping/payments/external/settle-invoice/fee-correction",
|
|
2257
|
+
auth: { "type": "unified_bearer", "allowUserSession": false, "allowOAuth2": true, "allowApiKey": true, "requireRole": "editor", "scopes": ["payments:write", "invoices:write"] },
|
|
2258
|
+
meta: {
|
|
2259
|
+
tags: ["bookkeeping", "payments-external"],
|
|
2260
|
+
summary: "Correct the provider fee of an external settlement",
|
|
2261
|
+
description: "Later provider fee change (e.g. fee refund) on a settlement made with grossAmount/feeAmount. The original payment stays unchanged; the difference is booked on correctedAt as its own account movement with a signed fee receipt. Idempotent per correctionRef. Legacy net-payout settlements are refused (422): their fee was never documented.",
|
|
2248
2262
|
bodyContentType: "application/json",
|
|
2249
2263
|
validated: { "params": false, "query": false, "body": true }
|
|
2250
2264
|
},
|
|
@@ -4417,7 +4431,7 @@ var apiRoutes_invoices_external = {
|
|
|
4417
4431
|
meta: {
|
|
4418
4432
|
tags: ["invoices-external"],
|
|
4419
4433
|
summary: "Update invoice status (external API)",
|
|
4420
|
-
description:
|
|
4434
|
+
description: 'Changes invoice status (e.g., mark as paid). State machine rules are enforced server-side. GoBD-safe: issued invoices cannot be cancelled directly; use credit note/cancellation endpoints instead. A paid status set here is stored with paidSource "external"; the optional source (api, sync, webhook) is kept in the audit log only.',
|
|
4421
4435
|
validated: { "params": true, "query": false, "body": true }
|
|
4422
4436
|
},
|
|
4423
4437
|
types: null
|
|
@@ -4443,7 +4457,7 @@ var apiRoutes_invoices_external = {
|
|
|
4443
4457
|
meta: {
|
|
4444
4458
|
tags: ["invoices-external"],
|
|
4445
4459
|
summary: "Issue credit note (external API)",
|
|
4446
|
-
description: "Issues a GoBD-compliant credit note or cancellation invoice. Generates PDF and creates an immutable document. Returns the new correction invoice.",
|
|
4460
|
+
description: "Issues a GoBD-compliant credit note or cancellation invoice. Generates PDF and creates an immutable document. Returns the new correction invoice. Optional idempotencyKey (max 200, e.g. the refund id): a retry with the same key on the same invoice returns the correction already issued (201, replayed: true) instead of booking a second one; the same key with a different body returns 409 IDEMPOTENCY_CONFLICT. Keys do not expire.",
|
|
4447
4461
|
validated: { "params": true, "query": false, "body": true }
|
|
4448
4462
|
},
|
|
4449
4463
|
types: null
|
|
@@ -5284,6 +5298,19 @@ var apiRoutes_managing_companies = {
|
|
|
5284
5298
|
types: null
|
|
5285
5299
|
},
|
|
5286
5300
|
// Contract source: explicit
|
|
5301
|
+
"managing_companies_transfer_owner": {
|
|
5302
|
+
method: "PUT",
|
|
5303
|
+
path: "/managing-companies/:id/owner",
|
|
5304
|
+
auth: { "type": "frontend_permission_http", "permission": "bookkeeping_access" },
|
|
5305
|
+
meta: {
|
|
5306
|
+
tags: ["managing-companies"],
|
|
5307
|
+
summary: "Besitz einer Firma uebergeben",
|
|
5308
|
+
description: "Uebergibt den Besitz einer Managing Company an einen anderen Admin. Die Firma zaehlt nur gegen den Plan ihres Besitzers (Firmenzahl, Rechnungen je Monat, Speicher). Nur der jetzige Besitzer (oder ein Plattform-Admin) darf uebergeben; der neue Besitzer muss unbefristeter Admin sein und Platz in seinem Plan haben (sonst 403 PLAN_LIMIT_REACHED). Fehler: 403 COMPANY_OWNERSHIP_FORBIDDEN, 404 COMPANY_NOT_FOUND, 422 COMPANY_OWNER_MUST_BE_ADMIN. Erfordert `bookkeeping_access`.",
|
|
5309
|
+
validated: { "params": true, "query": false, "body": true }
|
|
5310
|
+
},
|
|
5311
|
+
types: null
|
|
5312
|
+
},
|
|
5313
|
+
// Contract source: explicit
|
|
5287
5314
|
"managing_companies_delete": {
|
|
5288
5315
|
method: "DELETE",
|
|
5289
5316
|
path: "/managing-companies/:id",
|