@firmenakte/api-client 2.42.0 → 2.44.0

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.
@@ -1219,7 +1219,7 @@ class FirmenakteApi extends HeyApiClient {
1219
1219
  /**
1220
1220
  * List invoices
1221
1221
  *
1222
- * Die eigenen Rechnungen sehen: Entwürfe, offene, überfällige und bezahlte. The workspace's Rechnungen and Stornorechnungen, drafts first, then newest first, with number, customer, gross amount and Zahlung (draft, open, overdue, partlyPaid, paid, cancelled, cancellation). q searches number and customer.
1222
+ * Die eigenen Rechnungen sehen: Entwürfe, offene, überfällige und bezahlte. The workspace's Rechnungen and Stornorechnungen, drafts first, then newest first, with gross amount and Zahlung (draft, open, overdue, partlyPaid, paid, cancelled, cancellation), the number once issued and the customer name once chosen. q searches number and customer.
1223
1223
  */
1224
1224
  listInvoices(options) {
1225
1225
  return (options?.client ?? this.client).get({
@@ -1364,6 +1364,70 @@ class FirmenakteApi extends HeyApiClient {
1364
1364
  ...options
1365
1365
  });
1366
1366
  }
1367
+ /**
1368
+ * Delete bank connection
1369
+ *
1370
+ * Stripe von einem Konto trennen; die Buchungen bleiben. Disconnect a Konto: its stored key is deleted and an OAuth access is ended at Stripe. Its bookings stay, and statements or bookings by hand still go in.
1371
+ */
1372
+ deleteBankConnection(options) {
1373
+ return (options.client ?? this.client).delete({
1374
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1375
+ url: '/api/v2/me/billing/accounts/{id}/connection',
1376
+ ...options
1377
+ });
1378
+ }
1379
+ /**
1380
+ * Get bank connection
1381
+ *
1382
+ * Nachsehen, ob ein Konto mit Stripe verbunden ist, wann zuletzt abgerufen wurde und was fehlt. A Konto's provider connection (Stripe, read only): status none, connected or error, how it was connected, the payout Konto, the last pull and, after a failure, its code and the next step. The credential is never part of it.
1383
+ */
1384
+ getBankConnection(options) {
1385
+ return (options.client ?? this.client).get({
1386
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1387
+ url: '/api/v2/me/billing/accounts/{id}/connection',
1388
+ ...options
1389
+ });
1390
+ }
1391
+ /**
1392
+ * Update bank connection
1393
+ *
1394
+ * Festlegen, auf welches Bankkonto die Stripe-Auszahlungen gehen. Set the own Konto a connected account's payouts go to (an empty string removes it). Open payouts become transfers there, and its statement lines are paired with them.
1395
+ */
1396
+ updateBankConnection(options) {
1397
+ return (options.client ?? this.client).patch({
1398
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1399
+ url: '/api/v2/me/billing/accounts/{id}/connection',
1400
+ ...options,
1401
+ headers: {
1402
+ 'Content-Type': 'application/json',
1403
+ ...options.headers
1404
+ }
1405
+ });
1406
+ }
1407
+ /**
1408
+ * Sync bank connection
1409
+ *
1410
+ * Neue Stripe-Zahlungen, Gebühren und Auszahlungen sofort statt zur vollen Stunde holen. Pull a connected Konto's new balance transactions now instead of with the hourly pull: payments stay open for the Abgleich, fees are done as Kein Beleg (Stripe-Gebühr), payouts become transfers to the payout Konto, refunds and disputes are bookings of their own. Nothing is booked twice. A failed pull answers with the connection's error.
1411
+ */
1412
+ runBankSync(options) {
1413
+ return (options.client ?? this.client).post({
1414
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1415
+ url: '/api/v2/me/billing/accounts/{id}/connection/sync',
1416
+ ...options
1417
+ });
1418
+ }
1419
+ /**
1420
+ * List bank match candidates
1421
+ *
1422
+ * Rechnungen und Belege finden, die eine Buchung bezahlen kann, mit Begründung. The open invoices and receipts a booking can pay, best first, each with reasons (amount, number, numberPart, partner, iban, date), the text of the reference naming it and what a part payment leaves open. With q only those whose number, partner or amount (59,90) fits. Assign one with *Assign bank transaction*.
1423
+ */
1424
+ listBankMatchCandidates(options) {
1425
+ return (options.client ?? this.client).get({
1426
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1427
+ url: '/api/v2/me/billing/transactions/{id}/candidates',
1428
+ ...options
1429
+ });
1430
+ }
1367
1431
  /**
1368
1432
  * List bank accounts
1369
1433
  *
@@ -1435,7 +1499,7 @@ class FirmenakteApi extends HeyApiClient {
1435
1499
  /**
1436
1500
  * Import bank transactions
1437
1501
  *
1438
- * Buchungen aus einer Bank- oder Zahlungsanbindung in ein Konto übernehmen. Post up to 500 bookings of one Konto from any source (a bank sync, a payment provider): externalId (unique per Konto, a repeat is skipped), bookingDate, valueDate, amount in cents with sign and currency, counterparty {name, iban}, reference, endToEndId, kind (charge, refund, fee, payout), parentId (a fee's payment) and transferTo (an own Konto: a transfer). Date, amount and counterparty stay as sent. New bookings are matched right away.
1502
+ * Buchungen aus einer Bank- oder Zahlungsanbindung in ein Konto übernehmen. Post up to 500 bookings of one Konto from any source (a bank sync, a payment provider): externalId (unique per Konto, a repeat is skipped), bookingDate, valueDate, amount in cents with sign and currency, counterparty {name, iban}, reference, endToEndId, kind (charge, refund, fee, payout, dispute), parentId (a fee's payment) and transferTo (an own Konto: a transfer). Date, amount and counterparty stay as sent. New bookings are matched right away.
1439
1503
  */
1440
1504
  addBankTransactions(options) {
1441
1505
  return (options.client ?? this.client).post({
@@ -1535,7 +1599,7 @@ class FirmenakteApi extends HeyApiClient {
1535
1599
  /**
1536
1600
  * Undo bank match
1537
1601
  *
1538
- * Eine automatisch übernommene Zuordnung wieder zum Vorschlag machen. Turn a sure AI hit that was taken over automatically back into a proposal.
1602
+ * Einen übernommenen Treffer wieder zum Vorschlag machen. Turn a hit of a rule or the AI that was taken over, automatically or by a person, back into a proposal. An assignment by hand is removed with *Remove bank match*.
1539
1603
  */
1540
1604
  cancelBankAutoMatch(options) {
1541
1605
  return (options.client ?? this.client).post({
@@ -1559,7 +1623,7 @@ class FirmenakteApi extends HeyApiClient {
1559
1623
  /**
1560
1624
  * Match bank transactions
1561
1625
  *
1562
- * Offene Buchungen mit Rechnungen und Belegen abgleichen lassen. Run the Abgleich over open bookings: rules first (amount and number in the reference, a known partner's IBAN, transfers between own IBANs), then the AI if it is on (sicher or eventuell only).
1626
+ * Offene Buchungen mit Rechnungen und Belegen abgleichen lassen. Run the Abgleich over open bookings again; it also runs by itself after every import, booking by hand and new invoice or receipt. Sure rules first (amount and number in the reference, a known partner's IBAN, transfers between own IBANs), then the AI if it is on (sicher or eventuell only), then a weaker proposal by rule (amount or number together with the name).
1563
1627
  */
1564
1628
  runBankMatching(options) {
1565
1629
  return (options.client ?? this.client).post({
@@ -1588,6 +1652,38 @@ class FirmenakteApi extends HeyApiClient {
1588
1652
  }
1589
1653
  });
1590
1654
  }
1655
+ /**
1656
+ * Preview bank statement
1657
+ *
1658
+ * Einen Kontoauszug lesen, ohne zu buchen: seine Zeilen, das Konto und was schon da ist. Read a CAMT.053 file (base64) without booking: its lines with bank reference, date, amount, counterparty and reference, each marked duplicate when the Konto has it already, the Konto found by the file's IBAN (null when no Konto has it), gaps and warnings. Book the lines with *Create bank transactions*.
1659
+ */
1660
+ previewBankStatement(options) {
1661
+ return (options.client ?? this.client).post({
1662
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1663
+ url: '/api/v2/me/billing/statements/preview',
1664
+ ...options,
1665
+ headers: {
1666
+ 'Content-Type': 'application/json',
1667
+ ...options.headers
1668
+ }
1669
+ });
1670
+ }
1671
+ /**
1672
+ * Create bank transactions
1673
+ *
1674
+ * Mehrere Buchungen eines Kontos auf einmal anlegen, von Hand getippt oder aus einem Kontoauszug. Create up to 500 bookings of one Konto in one call. A row with statement is a line of a CAMT.053 statement read by *Preview bank statement* (the statement is recorded); one without is a booking by hand. externalId is unique per Konto: a row the Konto has is skipped, so a repeated call creates nothing twice. New bookings are matched right away.
1675
+ */
1676
+ createBankTransactions(options) {
1677
+ return (options.client ?? this.client).post({
1678
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1679
+ url: '/api/v2/me/billing/transactions/batch',
1680
+ ...options,
1681
+ headers: {
1682
+ 'Content-Type': 'application/json',
1683
+ ...options.headers
1684
+ }
1685
+ });
1686
+ }
1591
1687
  /**
1592
1688
  * Get bank settings
1593
1689
  *