@firmenakte/api-client 2.44.0 → 2.45.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.
@@ -180,110 +180,6 @@ class FirmenakteApi extends HeyApiClient {
180
180
  ...options
181
181
  });
182
182
  }
183
- /**
184
- * Preview rule for a new list
185
- *
186
- * Vor dem Erstellen einer Liste prüfen, wie viele Firmen eine Regel finden würde und was sie kostet. Validate a rule before creating a list. Returns the same price, next run, match count and bounded sample as *Preview list rule*, without requiring or creating a list. Does not save, execute or charge.
187
- */
188
- previewNewListRule(options) {
189
- return (options.client ?? this.client).post({
190
- security: [{ name: 'x-api-key', type: 'apiKey' }],
191
- url: '/api/v2/me/lists/rules/preview',
192
- ...options,
193
- headers: {
194
- 'Content-Type': 'application/json',
195
- ...options.headers
196
- }
197
- });
198
- }
199
- /**
200
- * Preview list rule
201
- *
202
- * Vor dem Speichern prüfen, wie viele Firmen eine Regel einer Liste finden würde und was sie kostet. Validate a typed rule for an existing list identified by id, before saving it to that list. Creating a new list with rules uses *Create list* and does not require this existing-list preview. Query rules return credits per execution, nextRunAt, matches (how many companies a run would newly add now, counted up to 10000) and at most five of them as a sample; neither is a reserved selection. Notification rules return zero credits, no matches and no sample. Does not save or execute.
203
- */
204
- previewRule(options) {
205
- return (options.client ?? this.client).post({
206
- security: [{ name: 'x-api-key', type: 'apiKey' }],
207
- url: '/api/v2/me/lists/{id}/rules/preview',
208
- ...options,
209
- headers: {
210
- 'Content-Type': 'application/json',
211
- ...options.headers
212
- }
213
- });
214
- }
215
- /**
216
- * List list rules
217
- *
218
- * Die Regeln einer Liste ansehen: automatische Aktualisierungen, Benachrichtigungen und Briefe. Read cursor-paged rules with typed rule configuration, revision, credits per execution and latest query run. Filter operationId to applyListQuery, notifyListEntries or sendLetter; keep this filter unchanged when paging.
219
- */
220
- listRules(options) {
221
- return (options.client ?? this.client).get({
222
- security: [{ name: 'x-api-key', type: 'apiKey' }],
223
- url: '/api/v2/me/lists/{id}/rules',
224
- ...options
225
- });
226
- }
227
- /**
228
- * Create list rule
229
- *
230
- * Eine Regel für eine Liste einrichten: neue passende Firmen automatisch aufnehmen oder bei neuen Einträgen in der App oder per E-Mail benachrichtigen. Save one typed rule: applyListQuery for company queries or notifyListEntries for one inApp/email channel; sendLetter rules start with a Brief send and save here only switched off. runNow optionally starts an enabled query at the quoted list-update price; recurrence is controlled separately by its trigger. Notification channels are unique per list. Creation is free; scheduled and manual executions charge the server list-update price.
231
- */
232
- createRule(options) {
233
- return (options.client ?? this.client).post({
234
- security: [{ name: 'x-api-key', type: 'apiKey' }],
235
- url: '/api/v2/me/lists/{id}/rules',
236
- ...options,
237
- headers: {
238
- 'Content-Type': 'application/json',
239
- ...options.headers
240
- }
241
- });
242
- }
243
- /**
244
- * Delete list rule
245
- *
246
- * Eine Regel einer Liste löschen, etwa eine automatische Aktualisierung oder Benachrichtigung. Delete one rule while keeping entries, values and historical runs. Copy its revision string from *List list rules* unchanged. Pause instead with *Update list rule*.
247
- */
248
- deleteRule(options) {
249
- return (options.client ?? this.client).delete({
250
- security: [{ name: 'x-api-key', type: 'apiKey' }],
251
- url: '/api/v2/me/lists/{id}/rules/{ruleId}',
252
- ...options
253
- });
254
- }
255
- /**
256
- * Update list rule
257
- *
258
- * Eine Regel einer Liste ändern oder pausieren. Replace a rule configuration using its unchanged revision from *List list rules*. Function and notification channel stay fixed. enabled:false pauses it; entries and values remain. Re-enabling notifications starts at the current event horizon. Changes fence older executions.
259
- */
260
- updateRule(options) {
261
- return (options.client ?? this.client).patch({
262
- security: [{ name: 'x-api-key', type: 'apiKey' }],
263
- url: '/api/v2/me/lists/{id}/rules/{ruleId}',
264
- ...options,
265
- headers: {
266
- 'Content-Type': 'application/json',
267
- ...options.headers
268
- }
269
- });
270
- }
271
- /**
272
- * Run list rule
273
- *
274
- * Eine Liste jetzt aktualisieren, also neue passende Firmen aufnehmen. Run an enabled applyListQuery rule using its unchanged revision from *List list rules*. dryRun previews; execution charges the list-update price, adds matches and preserves entries/exclusions. Notification rules run only from events. Read status with *List rule runs* and additions with *List list entries* with runId. Additions respect list-wide exclusions and never remove members.
275
- */
276
- runRule(options) {
277
- return (options.client ?? this.client).post({
278
- security: [{ name: 'x-api-key', type: 'apiKey' }],
279
- url: '/api/v2/me/lists/{id}/rules/{ruleId}/run',
280
- ...options,
281
- headers: {
282
- 'Content-Type': 'application/json',
283
- ...options.headers
284
- }
285
- });
286
- }
287
183
  /**
288
184
  * List lists
289
185
  *
@@ -299,7 +195,7 @@ class FirmenakteApi extends HeyApiClient {
299
195
  /**
300
196
  * Create list
301
197
  *
302
- * Eine neue Liste anlegen, etwa eine Merkliste, Zielgruppe oder Leadliste, auch mit Firmen oder einer Regel, die sie laufend füllt. Create a list atomically with optional items (up to 500) and rules (up to 100). Each rule contains its typed rule configuration and runNow flag. Use applyListQuery for reusable queries instead of enumerating matches. At most one enabled query may runNow; trigger manual is one-time, trigger schedule adds independent recurrence. Notification rules use notifyListEntries with one channel each.
198
+ * Eine neue Liste anlegen, etwa eine Merkliste, Zielgruppe oder Leadliste, auch gleich mit Firmen. Create a list atomically with optional items (up to 500).
303
199
  */
304
200
  createList(options) {
305
201
  return (options.client ?? this.client).post({
@@ -315,7 +211,7 @@ class FirmenakteApi extends HeyApiClient {
315
211
  /**
316
212
  * Delete list
317
213
  *
318
- * Delete a workspace list, its rules and entries while keeping workspace own records.
214
+ * Delete a workspace list and its entries while keeping workspace own records.
319
215
  */
320
216
  deleteList(options) {
321
217
  return (options.client ?? this.client).delete({
@@ -327,7 +223,7 @@ class FirmenakteApi extends HeyApiClient {
327
223
  /**
328
224
  * Get list
329
225
  *
330
- * Eine Liste mit Anzahl der Einträge und letzter Aktualisierung lesen. Read list metadata, statistics, latest run and rev_ revision for *Update list*. Independent rules and their revision strings: *List list rules*.
226
+ * Eine Liste mit Anzahl der Einträge lesen. Read list metadata, statistics and the rev_ revision for *Update list*.
331
227
  */
332
228
  getList(options) {
333
229
  return (options.client ?? this.client).get({
@@ -339,7 +235,7 @@ class FirmenakteApi extends HeyApiClient {
339
235
  /**
340
236
  * Update list
341
237
  *
342
- * Eine Liste umbenennen oder ihre Farbe ändern. Rename a list or change its color. Add independent rules with *Create list rule*; edit or pause with *Update list rule*. Optional If-Match checks the revision and returns 412 revision_conflict without saving if it changed.
238
+ * Eine Liste umbenennen oder ihre Farbe ändern. Rename a list or change its color. Optional If-Match checks the revision and returns 412 revision_conflict without saving if it changed.
343
239
  */
344
240
  updateList(options) {
345
241
  return (options.client ?? this.client).patch({
@@ -383,7 +279,7 @@ class FirmenakteApi extends HeyApiClient {
383
279
  /**
384
280
  * Update list entry
385
281
  *
386
- * Set a list entry's excluded state or its typed field values. Values belong to the subject and appear on every list; exclusion prevents dynamic re-addition until lifted.
282
+ * Set a list entry's excluded state or its typed field values. Values belong to the subject and appear on every list.
387
283
  */
388
284
  updateEntry(options) {
389
285
  return (options.client ?? this.client).patch({
@@ -399,7 +295,7 @@ class FirmenakteApi extends HeyApiClient {
399
295
  /**
400
296
  * Remove list entries
401
297
  *
402
- * Exclude selected list entries by entry IDs, register IDs or a bulk selection. Excluded members do not return until explicitly re-added.
298
+ * Exclude selected list entries by entry IDs, register IDs or a bulk selection.
403
299
  */
404
300
  removeEntries(options) {
405
301
  return (options.client ?? this.client).post({
@@ -456,22 +352,10 @@ class FirmenakteApi extends HeyApiClient {
456
352
  }
457
353
  });
458
354
  }
459
- /**
460
- * List rule runs
461
- *
462
- * Return a newest-first cursor page of a list's update runs with counts, evaluation date, credits and status. Optional trigger and status filters narrow the result.
463
- */
464
- listRuns(options) {
465
- return (options.client ?? this.client).get({
466
- security: [{ name: 'x-api-key', type: 'apiKey' }],
467
- url: '/api/v2/me/lists/{id}/runs',
468
- ...options
469
- });
470
- }
471
355
  /**
472
356
  * List list events
473
357
  *
474
- * Return a list's membership, identity-correction and skipped-update events in ascending sequence order. The after sequence never expires; type and runId can narrow the events.
358
+ * Return a list's membership and identity-correction events in ascending sequence order. The after sequence never expires; type can narrow the events.
475
359
  */
476
360
  listListEvents(options) {
477
361
  return (options.client ?? this.client).get({
@@ -647,7 +531,7 @@ class FirmenakteApi extends HeyApiClient {
647
531
  /**
648
532
  * Create export
649
533
  *
650
- * Freeze a list or query selection now and write its values in the background. All entries, including workspace own records, are exported in bounded pages without a row cap. Defaults to the list's columns or name, city, industry and registration date. people exports one row per person of a query with subject person and no listId. Costs prices.exportRows per begun 1,000 frozen rows, at least prices.exportMinimum (both in GET /api/v2/me/credits); failed jobs are refunded. Poll Location for rowsDone of rows; completed files expire after 24 hours.
534
+ * Freeze a list or query selection now and write its values in the background. All entries, including workspace own records, are exported in bounded pages without a row cap. Defaults to the list's columns or name, city, industry and registration date. people exports one row per person of a query with subject person and no listId. The plan's included export rows of the month pay first, then the Guthaben at prices.exportRows credits (cents) per begun 100 frozen rows (GET /api/v2/me/credits); failed jobs are refunded. Poll Location for rowsDone of rows; completed files expire after 24 hours.
651
535
  */
652
536
  createExport(options) {
653
537
  return (options.client ?? this.client).post({
@@ -797,37 +681,37 @@ class FirmenakteApi extends HeyApiClient {
797
681
  });
798
682
  }
799
683
  /**
800
- * Set list notifications
684
+ * Get letter setup
801
685
  *
802
- * Save both channel settings atomically using reviewed rule IDs and revisions, or explicit nulls for absent channels. A concurrent change returns 409. Re-enabling starts at the current event horizon.
686
+ * The Absender this workspace may send as (companies released into it), the variables a Brief can use and the letter prices in credits.
803
687
  */
804
- setNotificationRules(options) {
805
- return (options.client ?? this.client).put({
688
+ getLetterSetup(options) {
689
+ return (options?.client ?? this.client).get({
806
690
  security: [{ name: 'x-api-key', type: 'apiKey' }],
807
- url: '/api/v2/me/lists/{id}/notification-rules',
808
- ...options,
809
- headers: {
810
- 'Content-Type': 'application/json',
811
- ...options.headers
812
- }
691
+ url: '/api/v2/me/letters/setup',
692
+ ...options
813
693
  });
814
694
  }
815
695
  /**
816
- * Get letter setup
696
+ * Update letter setup
817
697
  *
818
- * The Absender this workspace may send as (companies released into it), the variables a Brief can use and the letter prices in credits.
698
+ * Sets the budget a new Kampagne starts with: budgetCredits per calendar month, at least one letter's price; 0 credits removes it.
819
699
  */
820
- getLetterSetup(options) {
821
- return (options?.client ?? this.client).get({
700
+ updateLetterSetup(options) {
701
+ return (options.client ?? this.client).patch({
822
702
  security: [{ name: 'x-api-key', type: 'apiKey' }],
823
703
  url: '/api/v2/me/letters/setup',
824
- ...options
704
+ ...options,
705
+ headers: {
706
+ 'Content-Type': 'application/json',
707
+ ...options.headers
708
+ }
825
709
  });
826
710
  }
827
711
  /**
828
712
  * List letters
829
713
  *
830
- * The workspace's Briefe, last changed first, with where each stands (draft, running, sent), how many letters each sent and how many wait. With listId only the Briefe that send to that list, with how (once or ongoing).
714
+ * The workspace's Briefe, last changed first, with where each stands (draft, running, sent), how many letters each sent and how many wait. With listId only the Briefe that send to that list.
831
715
  */
832
716
  listLetters(options) {
833
717
  return (options?.client ?? this.client).get({
@@ -839,7 +723,7 @@ class FirmenakteApi extends HeyApiClient {
839
723
  /**
840
724
  * Create letter
841
725
  *
842
- * A draft Brief: Absender, recipients (companies, and lists once or ongoing with a budget), Betreff (its name), text with variables ({{path}} or {{path|wenn leer}}) and QR target. Without a text it starts with the Anrede and a greeting. Sends nothing.
726
+ * A draft Brief: Absender, recipients (companies and lists), Betreff (its name), text with variables ({{path}} or {{path|wenn leer}}) and QR target. Without a text it starts with the Anrede and a greeting. Sends nothing.
843
727
  */
844
728
  createLetter(options) {
845
729
  return (options.client ?? this.client).post({
@@ -891,7 +775,7 @@ class FirmenakteApi extends HeyApiClient {
891
775
  /**
892
776
  * Update letter
893
777
  *
894
- * Changes only the fields sent; recipients replaces the An field and an empty qrUrl removes the QR code. Letters already queued keep their version; a list taken out or set to once stops sending to new entries.
778
+ * Changes only the fields sent; recipients replaces the An field and an empty qrUrl removes the QR code. Letters already queued keep their version and letterhead.
895
779
  */
896
780
  updateLetter(options) {
897
781
  return (options.client ?? this.client).patch({
@@ -947,7 +831,7 @@ class FirmenakteApi extends HeyApiClient {
947
831
  /**
948
832
  * Send letter
949
833
  *
950
- * Posts the Brief to all its recipients through Pingen; each ongoing list then keeps sending it to every new entry, within its budget. 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: weekly credits up to the letters' share, the rest from topped-up credits; 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, 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.
951
835
  */
952
836
  createLetterSendings(options) {
953
837
  return (options.client ?? this.client).post({
@@ -960,6 +844,22 @@ class FirmenakteApi extends HeyApiClient {
960
844
  }
961
845
  });
962
846
  }
847
+ /**
848
+ * Send template
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.
851
+ */
852
+ sendTemplate(options) {
853
+ return (options.client ?? this.client).post({
854
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
855
+ url: '/api/v2/me/letters/{id}/dispatch',
856
+ ...options,
857
+ headers: {
858
+ 'Content-Type': 'application/json',
859
+ ...options.headers
860
+ }
861
+ });
862
+ }
963
863
  /**
964
864
  * List billing documents
965
865
  *
@@ -975,7 +875,7 @@ class FirmenakteApi extends HeyApiClient {
975
875
  /**
976
876
  * Upload billing document
977
877
  *
978
- * Stores a receipt or an invoice from outside and queues it for reading: one PDF or image, or several photos of one receipt that become one PDF. Reading costs the read price once per file; without enough credits the document is stored and marked unread. Issued by one of the workspace's own Absender it goes to the Ausgang, all else to the Eingang; its Geschäftspartner is matched or created. The same file or externalId again returns the stored document with duplicate true.
878
+ * Stores a receipt or an invoice from outside and queues it for reading: one PDF or image, or several photos of one receipt that become one PDF. Reading draws the plan's Belege of the month, then the Guthaben (prices.receiptRead per document); where neither pays, the document is stored and waits (readStatus waiting) until the 1st, an upgrade or a top-up. Issued by one of the workspace's own Absender it goes to the Ausgang, all else to the Eingang; its Geschäftspartner is matched or created. The same file or externalId again returns the stored document with duplicate true.
979
879
  */
980
880
  createBillingDocument(options) {
981
881
  return (options.client ?? this.client).post({
@@ -1111,7 +1011,7 @@ class FirmenakteApi extends HeyApiClient {
1111
1011
  /**
1112
1012
  * List billing exports
1113
1013
  *
1114
- * Welche Monate oder Quartale für die Steuerberatung bereitliegen. The months (or quarters) newest first, from the running one back to the first with documents: state running, empty, ready (ended, not downloaded yet) or downloaded, with the number of documents, bookings and unassigned bookings.
1014
+ * Welche Monate oder Quartale für die Steuerberatung bereitliegen. The months (or quarters, or years) newest first, from the running one back to the first with documents: state running, empty, ready (ended, not downloaded yet) or downloaded, with the number of documents, bookings and unassigned bookings.
1115
1015
  */
1116
1016
  listBillingExports(options) {
1117
1017
  return (options?.client ?? this.client).get({
@@ -1179,7 +1079,7 @@ class FirmenakteApi extends HeyApiClient {
1179
1079
  /**
1180
1080
  * Get billing setup
1181
1081
  *
1182
- * 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 (released companies and the caller's Rechnungsdaten ohne Firma) 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*.
1082
+ * 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*.
1183
1083
  */
1184
1084
  getBillingSetup(options) {
1185
1085
  return (options?.client ?? this.client).get({
@@ -1191,7 +1091,7 @@ class FirmenakteApi extends HeyApiClient {
1191
1091
  /**
1192
1092
  * Update billing settings
1193
1093
  *
1194
- * IBAN, Zahlungsziel, Nummernkreis, Fußzeile oder Kleinunternehmer-Regel für die eigenen Rechnungen festlegen. Change one Absender's Rechnungsdaten (IBAN, BIC, UID, payment days, number prefix, next number which only rises, footer, Kleinunternehmer) or which partner fields are Kunden- and Lieferantennummer and give payment days or IBAN. Issued invoices keep what they printed.
1094
+ * IBAN, Zahlungsziel, Nummernkreis, Fußzeile oder Kleinunternehmer-Regel für die eigenen Rechnungen festlegen. Change one Absender's Rechnungsdaten (IBAN, BIC, UID, payment days, Nummernkreis (pattern with {Jahr}, {Jahr2}, {Monat} and {Nummer}, its digits and yearly, monthly or no reset), next number which only rises, footer, Kleinunternehmer) or which partner fields are Kunden- and Lieferantennummer and give payment days or IBAN. Issued invoices keep what they printed.
1195
1095
  */
1196
1096
  updateBillingSettings(options) {
1197
1097
  return (options.client ?? this.client).patch({
@@ -1687,7 +1587,7 @@ class FirmenakteApi extends HeyApiClient {
1687
1587
  /**
1688
1588
  * Get bank settings
1689
1589
  *
1690
- * Nachsehen, ob die KI Buchungen zuordnet und sichere Treffer selbst übernimmt. Whether the AI matches bookings no rule assigns, and whether its sure hits are taken over (sicher) or always wait (nie).
1590
+ * Nachsehen, wie der KI-Abgleich eingestellt ist. The KI-Abgleich: aus (no AI, nothing taken over), pruefen (the AI proposes, every hit waits for a person) or sicher (sure hits are taken over). The rules propose in every mode.
1691
1591
  */
1692
1592
  getBankSettings(options) {
1693
1593
  return (options?.client ?? this.client).get({
@@ -1699,7 +1599,7 @@ class FirmenakteApi extends HeyApiClient {
1699
1599
  /**
1700
1600
  * Update bank settings
1701
1601
  *
1702
- * Festlegen, ob die KI Buchungen zuordnet und sichere Treffer selbst übernimmt. Switch the AI matching on or off, and set autoAccept to sicher or nie.
1602
+ * Den KI-Abgleich ausschalten, jeden Treffer prüfen lassen oder sichere Treffer übernehmen lassen. Set the KI-Abgleich: aus, pruefen or sicher.
1703
1603
  */
1704
1604
  updateBankSettings(options) {
1705
1605
  return (options.client ?? this.client).patch({
@@ -1727,7 +1627,7 @@ class FirmenakteApi extends HeyApiClient {
1727
1627
  /**
1728
1628
  * Get credits
1729
1629
  *
1730
- * This week's allowance, the credits used and topped up, the balance, when it resets and the current prices.
1630
+ * This month's included amounts per feature and what of them is used, the Guthaben, when the month resets and the current prices.
1731
1631
  */
1732
1632
  getCredits(options) {
1733
1633
  return (options?.client ?? this.client).get({