@firmenakte/api-client 2.46.0 → 2.48.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.
@@ -831,7 +831,7 @@ class FirmenakteApi extends HeyApiClient {
831
831
  /**
832
832
  * Send letter
833
833
  *
834
- * Posts the Brief to all its recipients through Pingen. Recipients without a deliverable address, deleted ones, those that already received it (unless resendReceived is true) and, for Werbung, Robinson entries are skipped at no cost. Each letter is paid by the workspace: the plan's included Briefe of the month first, the rest from the Guthaben; not enough refuses the whole send. dryRun returns the counts and the price only.
834
+ * Posts the Brief to all its recipients through Pingen. Recipients without a deliverable address, deleted ones, those that already received it (unless resendReceived is true) and Robinson entries (every Brief counts as Werbung) are skipped at no cost. Each letter is paid by the workspace: the plan's included Briefe of the month first, the rest from the Guthaben; not enough refuses the whole send. dryRun returns the counts and the price only.
835
835
  */
836
836
  createLetterSendings(options) {
837
837
  return (options.client ?? this.client).post({
@@ -847,7 +847,7 @@ class FirmenakteApi extends HeyApiClient {
847
847
  /**
848
848
  * Send template
849
849
  *
850
- * Sends a Brief by post to companies, a table or some of its entries at the letter prices, skipping companies without a deliverable address, deleted ones, Robinson entries for Werbung and those that already received it (unless resendReceived). dryRun returns the plan only.
850
+ * Sends a Brief by post to companies, a list or some of its entries at the letter prices, skipping companies without a deliverable address, deleted ones, Robinson entries (every Brief counts as Werbung) and those that already received it (unless resendReceived). dryRun returns the plan only.
851
851
  */
852
852
  sendTemplate(options) {
853
853
  return (options.client ?? this.client).post({
@@ -943,7 +943,7 @@ class FirmenakteApi extends HeyApiClient {
943
943
  /**
944
944
  * List billing partners
945
945
  *
946
- * Kunden und Lieferanten mit offenen Beträgen und Umsatz im laufenden Jahr sehen. The Geschäftspartner of the Buchhaltung with Rolle, Kunden- and Lieferantennummer, what each still owes or is owed, the year's revenue and expenses, and whether one is archived.
946
+ * Kunden und Lieferanten mit offenen Beträgen und Umsatz im laufenden Jahr sehen. The Geschäftspartner of the Buchhaltung with Kunden- and Lieferantennummer and the role they give (Kunde, Lieferant or both), what each still owes or is owed, the year's revenue and expenses, and whether one is archived.
947
947
  */
948
948
  listBillingPartners(options) {
949
949
  return (options?.client ?? this.client).get({
@@ -955,7 +955,7 @@ class FirmenakteApi extends HeyApiClient {
955
955
  /**
956
956
  * Add billing partner
957
957
  *
958
- * Eine Firma aus dem Register oder einen Partner ohne Firmenbuch als Kunden oder Lieferanten anlegen. Make a company (companyId) or a new own entry (name) a customer or supplier: Rolle and the next Kunden- or Lieferantennummer. A supplier who becomes a customer is Kunde und Lieferant; an archived partner comes back.
958
+ * Eine Firma aus dem Register oder einen Partner ohne Firmenbuch als Kunden oder Lieferanten anlegen. Make a company (companyId) or a new own entry (name) a customer or supplier: the next Kunden- or Lieferantennummer. A supplier who becomes a customer has both; an archived partner comes back.
959
959
  */
960
960
  addBillingPartner(options) {
961
961
  return (options.client ?? this.client).post({
@@ -971,7 +971,7 @@ class FirmenakteApi extends HeyApiClient {
971
971
  /**
972
972
  * Delete billing partner
973
973
  *
974
- * Einen Kunden oder Lieferanten ohne Rechnungen und Belege entfernen. Take a Geschäftspartner without invoices or receipts out of the Buchhaltung with his Rolle and numbers. One with invoices or receipts is refused: archive him instead.
974
+ * Einen Kunden oder Lieferanten ohne Rechnungen und Belege entfernen. Take a Geschäftspartner without invoices or receipts out of the Buchhaltung with his numbers. One with invoices or receipts is refused: archive him instead.
975
975
  */
976
976
  deleteBillingPartner(options) {
977
977
  return (options.client ?? this.client).delete({
@@ -1107,7 +1107,7 @@ class FirmenakteApi extends HeyApiClient {
1107
1107
  /**
1108
1108
  * Get billing setup
1109
1109
  *
1110
- * Vor dem Rechnungschreiben nachsehen, als wer Rechnungen ausgestellt werden können, mit welchen Artikeln und welcher nächsten Nummer. The Absender this workspace may issue invoices as (its Unternehmen) with their Rechnungsdaten and next number, the Artikel, the fields of the Geschäftspartner used for Rolle and Kunden- and Lieferantennummer, and the system lists Geschäftspartner, Artikel and Ausgang. Read it before *Create invoice*.
1110
+ * Vor dem Rechnungschreiben nachsehen, als wer Rechnungen ausgestellt werden können, mit welchen Artikeln und welcher nächsten Nummer. The Absender this workspace may issue invoices as (its Unternehmen) with their Rechnungsdaten and next number, the Artikel, the fields of the Geschäftspartner used for Kunden- and Lieferantennummer (a Kundennummer makes a Kunde, a Lieferantennummer a Lieferant), and the system lists Geschäftspartner, Artikel and Ausgang. Read it before *Create invoice*.
1111
1111
  */
1112
1112
  getBillingSetup(options) {
1113
1113
  return (options?.client ?? this.client).get({
@@ -1215,7 +1215,7 @@ class FirmenakteApi extends HeyApiClient {
1215
1215
  /**
1216
1216
  * Issue invoice
1217
1217
  *
1218
- * Einen fertigen Entwurf als gültige Rechnung mit Nummer und PDF festschreiben. Issue a draft after the checks of § 11 UStG: it gets the next number of its Absender, a new customer becomes a Geschäftspartner with Rolle Kunde and a Kundennummer, and the PDF is frozen. Afterwards it never changes and is never deleted. Only with the user's explicit consent. Sends nothing.
1218
+ * Einen fertigen Entwurf als gültige Rechnung mit Nummer und PDF festschreiben. Issue a draft after the checks of § 11 UStG: it gets the next number of its Absender, a new customer becomes a Geschäftspartner with a Kundennummer, and the PDF is frozen. Afterwards it never changes and is never deleted. Only with the user's explicit consent. Sends nothing.
1219
1219
  */
1220
1220
  issueInvoice(options) {
1221
1221
  return (options.client ?? this.client).post({
@@ -1255,7 +1255,7 @@ class FirmenakteApi extends HeyApiClient {
1255
1255
  /**
1256
1256
  * Send invoice
1257
1257
  *
1258
- * Eine ausgestellte Rechnung dem Kunden per E-Mail schicken oder an eine offene erinnern. Send an issued invoice by e-mail to the Geschäftspartner's Rechnungs-E-Mail: fixed text, the PDF attached and one link to the customer page. reminder sends it again as Erinnerung for an open invoice; note adds one sentence without links. Only for an Absender the member may send as (*Get invoice* email.state ready). Only with the user's explicit consent.
1258
+ * Eine ausgestellte Rechnung dem Kunden per E-Mail schicken oder an eine offene erinnern. Send an issued invoice by e-mail to the Geschäftspartner's Rechnungs-E-Mail: fixed text in the Absender's name, the PDF attached and one link that downloads it. reminder sends it again as Erinnerung for an open invoice; note adds one sentence without links. Only for an Absender the member may send as (*Get invoice* email.state ready). Only with the user's explicit consent.
1259
1259
  */
1260
1260
  sendInvoice(options) {
1261
1261
  return (options.client ?? this.client).post({
@@ -1335,7 +1335,7 @@ class FirmenakteApi extends HeyApiClient {
1335
1335
  /**
1336
1336
  * Sync bank connection
1337
1337
  *
1338
- * 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.
1338
+ * 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 booked by category bank (their Beleg is the Konto's Kontoauszug of the month, filed with *File bank statement*), 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.
1339
1339
  */
1340
1340
  runBankSync(options) {
1341
1341
  return (options.client ?? this.client).post({
@@ -1344,6 +1344,34 @@ class FirmenakteApi extends HeyApiClient {
1344
1344
  ...options
1345
1345
  });
1346
1346
  }
1347
+ /**
1348
+ * List payments of an invoice or receipt
1349
+ *
1350
+ * Sehen, welche Buchung eine Rechnung oder einen Beleg bezahlt oder bezahlen kann. The bookings of an invoice or receipt (targetKind, targetId): those assigned to it (state assigned), a proposal for it (proposed), then the waiting bookings that can pay it, best first, each with reasons as in *List bank match candidates* (candidate). With q the waiting bookings whose counterparty or reference holds the text, or whose amount it is (59,90). Assign one with *Assign bank transaction*, confirm a proposal with *Confirm bank match*.
1351
+ */
1352
+ listBankTargetPayments(options) {
1353
+ return (options?.client ?? this.client).get({
1354
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1355
+ url: '/api/v2/me/billing/payments',
1356
+ ...options
1357
+ });
1358
+ }
1359
+ /**
1360
+ * Create cash or private payment
1361
+ *
1362
+ * Eine bar oder privat bezahlte Rechnung oder einen Beleg als bezahlt erfassen. Record that an invoice or receipt was paid without a bank: method cash books it on the workspace's Kassa, private on its Konto Privat (the owner's money: an Einlage when a receipt is paid, an Entnahme when an invoice is paid into it); a missing Kassa or Konto Privat is created. The booking by hand carries date, amount (signed like a booking), the target's partner and number, and is assigned to the target at once.
1363
+ */
1364
+ createBankTargetPayment(options) {
1365
+ return (options.client ?? this.client).post({
1366
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1367
+ url: '/api/v2/me/billing/payments',
1368
+ ...options,
1369
+ headers: {
1370
+ 'Content-Type': 'application/json',
1371
+ ...options.headers
1372
+ }
1373
+ });
1374
+ }
1347
1375
  /**
1348
1376
  * List bank match candidates
1349
1377
  *
@@ -1415,7 +1443,7 @@ class FirmenakteApi extends HeyApiClient {
1415
1443
  /**
1416
1444
  * List bank transactions
1417
1445
  *
1418
- * Die Buchungen eines Kontos sehen, etwa alle noch nicht zugeordneten. Bookings newest first, of one Konto or all, by status (open, suggested, assigned) or text in counterparty and reference, each with what it is assigned to or proposed for.
1446
+ * Die Buchungen eines Kontos sehen, etwa alle noch nicht zugeordneten. Bookings newest first, of one Konto or all, by status (open, suggested, missing, todo, assigned) or text in counterparty and reference, each with what it is assigned to or proposed for and its Beleg: what it is and whether it is there.
1419
1447
  */
1420
1448
  listBankTransactions(options) {
1421
1449
  return (options?.client ?? this.client).get({
@@ -1499,7 +1527,7 @@ class FirmenakteApi extends HeyApiClient {
1499
1527
  /**
1500
1528
  * Assign bank transaction
1501
1529
  *
1502
- * Eine Buchung einer Rechnung oder einem Beleg zuordnen oder als privat markieren. Assign a booking by hand: to an invoice or receipt (targetId), as a private booking, as noReceipt with a reason, or as a transfer to an own Konto. Replaces any assignment or proposal.
1530
+ * Eine Buchung einer Rechnung oder einem Beleg zuordnen oder als privat markieren. Assign a booking by hand: to an invoice or receipt (targetId), as a private booking (its Beleg is an Eigenbeleg the export writes), as noReceipt with its category (bank, social, staff, tax: the payment then waits for its Beleg, the Kontoauszug, Vorschreibung, Buchungsmitteilung or Lohnabrechnung), as a receipt with category social, staff or tax (the receipt is that Beleg), or as a transfer to an own Konto. Replaces any assignment or proposal.
1503
1531
  */
1504
1532
  setBankMatch(options) {
1505
1533
  return (options.client ?? this.client).put({
@@ -1551,7 +1579,7 @@ class FirmenakteApi extends HeyApiClient {
1551
1579
  /**
1552
1580
  * Match bank transactions
1553
1581
  *
1554
- * 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).
1582
+ * Offene Buchungen mit Rechnungen und Belegen abgleichen lassen. Run the rules of the Abgleich over open bookings again; matched counts what they assigned. The Abgleich also runs by itself: the rules at every import and booking by hand, and within a minute, for bookings whose best candidates changed, a new invoice or receipt among them, the AI if it is on (one of five candidates per booking, or for a booking without any a category: bank, social, staff, tax, private, transfer; sicher or eventuell), then a weaker proposal by rule (amount or number together with the name). Sure rules: amount and number in the reference, a known partner's IBAN, transfers between own IBANs.
1555
1583
  */
1556
1584
  runBankMatching(options) {
1557
1585
  return (options.client ?? this.client).post({
@@ -1580,6 +1608,22 @@ class FirmenakteApi extends HeyApiClient {
1580
1608
  }
1581
1609
  });
1582
1610
  }
1611
+ /**
1612
+ * File bank statement
1613
+ *
1614
+ * Den Kontoauszug eines Kontos für einen Monat als PDF oder Foto ablegen: er ist der Beleg der Bankspesen. File a Kontoauszug (PDF or photo, base64) of a Konto for a month (YYYY-MM) or a period. It is kept as a file and is the Beleg of every bank fee (category bank) of that Konto in the period, which then no longer waits. Nothing is booked: a CAMT.053 file is read with *Import bank statement* or *Preview bank statement* and *Create bank transactions*, which keep their file too. The same file for the same Konto and period is filed once.
1615
+ */
1616
+ fileBankStatement(options) {
1617
+ return (options.client ?? this.client).post({
1618
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1619
+ url: '/api/v2/me/billing/statements/file',
1620
+ ...options,
1621
+ headers: {
1622
+ 'Content-Type': 'application/json',
1623
+ ...options.headers
1624
+ }
1625
+ });
1626
+ }
1583
1627
  /**
1584
1628
  * Preview bank statement
1585
1629
  *