@firmenakte/api-client 2.36.0 → 2.37.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.
@@ -263,7 +263,7 @@ class FirmenakteApi extends HeyApiClient {
263
263
  /**
264
264
  * List list rules
265
265
  *
266
- * Read cursor-paged rules with typed rule configuration, revision, credits per execution and latest query run. Filter operationId to applyListQuery or notifyListEntries; keep this filter unchanged when paging.
266
+ * 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.
267
267
  */
268
268
  listRules(options) {
269
269
  return (options.client ?? this.client).get({
@@ -275,7 +275,7 @@ class FirmenakteApi extends HeyApiClient {
275
275
  /**
276
276
  * Create list rule
277
277
  *
278
- * Save one typed rule: applyListQuery for company queries, or notifyListEntries for one inApp/email channel. 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.
278
+ * 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.
279
279
  */
280
280
  createRule(options) {
281
281
  return (options.client ?? this.client).post({
@@ -984,6 +984,154 @@ class FirmenakteApi extends HeyApiClient {
984
984
  }
985
985
  });
986
986
  }
987
+ /**
988
+ * Get letter setup
989
+ *
990
+ * The Absender this workspace may send as (companies released into it), the variables a Brief can use and the letter prices in credits.
991
+ */
992
+ getLetterSetup(options) {
993
+ return (options?.client ?? this.client).get({
994
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
995
+ url: '/api/v2/me/letters/setup',
996
+ ...options
997
+ });
998
+ }
999
+ /**
1000
+ * List letters
1001
+ *
1002
+ * 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).
1003
+ */
1004
+ listLetters(options) {
1005
+ return (options?.client ?? this.client).get({
1006
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1007
+ url: '/api/v2/me/letters',
1008
+ ...options
1009
+ });
1010
+ }
1011
+ /**
1012
+ * Create letter
1013
+ *
1014
+ * 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.
1015
+ */
1016
+ createLetter(options) {
1017
+ return (options.client ?? this.client).post({
1018
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1019
+ url: '/api/v2/me/letters',
1020
+ ...options,
1021
+ headers: {
1022
+ 'Content-Type': 'application/json',
1023
+ ...options.headers
1024
+ }
1025
+ });
1026
+ }
1027
+ /**
1028
+ * List letter sendings
1029
+ *
1030
+ * Letters this workspace sent, newest first, by Brief, company or status, with the reason a skipped one was skipped.
1031
+ */
1032
+ listLetterSendings(options) {
1033
+ return (options?.client ?? this.client).get({
1034
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1035
+ url: '/api/v2/me/letters/sendings',
1036
+ ...options
1037
+ });
1038
+ }
1039
+ /**
1040
+ * Delete letter
1041
+ *
1042
+ * Removes the Brief from the editor; its sendings and their PDFs stay on the companies.
1043
+ */
1044
+ deleteLetter(options) {
1045
+ return (options.client ?? this.client).delete({
1046
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1047
+ url: '/api/v2/me/letters/{id}',
1048
+ ...options
1049
+ });
1050
+ }
1051
+ /**
1052
+ * Get letter
1053
+ *
1054
+ * One Brief with its recipients, attachments, price per letter and counts.
1055
+ */
1056
+ getLetter(options) {
1057
+ return (options.client ?? this.client).get({
1058
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1059
+ url: '/api/v2/me/letters/{id}',
1060
+ ...options
1061
+ });
1062
+ }
1063
+ /**
1064
+ * Update letter
1065
+ *
1066
+ * 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.
1067
+ */
1068
+ updateLetter(options) {
1069
+ return (options.client ?? this.client).patch({
1070
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1071
+ url: '/api/v2/me/letters/{id}',
1072
+ ...options,
1073
+ headers: {
1074
+ 'Content-Type': 'application/json',
1075
+ ...options.headers
1076
+ }
1077
+ });
1078
+ }
1079
+ /**
1080
+ * Add letter attachment
1081
+ *
1082
+ * Attaches an A4 PDF, base64, at most 10 MB and 10 per Brief.
1083
+ */
1084
+ addLetterAttachment(options) {
1085
+ return (options.client ?? this.client).post({
1086
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1087
+ url: '/api/v2/me/letters/{id}/attachments',
1088
+ ...options,
1089
+ headers: {
1090
+ 'Content-Type': 'application/json',
1091
+ ...options.headers
1092
+ }
1093
+ });
1094
+ }
1095
+ /**
1096
+ * Remove letter attachment
1097
+ *
1098
+ * Removes an attachment; letters already queued keep it.
1099
+ */
1100
+ removeLetterAttachment(options) {
1101
+ return (options.client ?? this.client).delete({
1102
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1103
+ url: '/api/v2/me/letters/{id}/attachments/{attachmentId}',
1104
+ ...options
1105
+ });
1106
+ }
1107
+ /**
1108
+ * Preview letter
1109
+ *
1110
+ * The printed first page of one recipient with the variables filled in, its Anrede, pages, sheets and price per letter.
1111
+ */
1112
+ previewLetter(options) {
1113
+ return (options.client ?? this.client).get({
1114
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1115
+ url: '/api/v2/me/letters/{id}/preview',
1116
+ ...options
1117
+ });
1118
+ }
1119
+ /**
1120
+ * Send letter
1121
+ *
1122
+ * 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 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.
1123
+ */
1124
+ createLetterSendings(options) {
1125
+ return (options.client ?? this.client).post({
1126
+ security: [{ name: 'x-api-key', type: 'apiKey' }],
1127
+ url: '/api/v2/me/letters/{id}/send',
1128
+ ...options,
1129
+ headers: {
1130
+ 'Content-Type': 'application/json',
1131
+ ...options.headers
1132
+ }
1133
+ });
1134
+ }
987
1135
  /**
988
1136
  * Get account
989
1137
  *
@@ -1087,7 +1235,7 @@ class FirmenakteApi extends HeyApiClient {
1087
1235
  /**
1088
1236
  * Search entities
1089
1237
  *
1090
- * Find companies and people, and the references they point to, whose name or code contains q: places (geography) and the reference vocabularies legalForm, court, industry, trade, functionType and keyFigure. Vocabularies also match by code, such as GmbH, 62.10 or GF; a postcode finds its place. types narrows the search to the listed types; addresses are searched only when types names address, by street, house number, postcode and town. Results rank by where q sits in the name, then name length, then companies, people, places, vocabularies and addresses, then name and ID.
1238
+ * Find companies and people, and the references they point to, whose name or code contains q: places (geography) and the reference vocabularies legalForm, court, industry, trade, functionType and keyFigure. Vocabularies also match by code, such as GmbH, 62.10 or GF; a postcode finds its place. types narrows the search to the listed types; addresses are searched only when types names address, by street, house number, postcode and town. Names of companies and people compare case-, accent- and punctuation-insensitively, with ä = ae = a, ß = ss and legal forms as one word (GmbH = Ges.m.b.H.). Results rank by where q sits in the name (the whole name, its start, a later word start, inside a word), then name length, then companies, people, places, vocabularies and addresses, then name and ID. When q finds nothing, companies and people whose name differs from q by one letter in a word of five to eight letters, or two in a longer word, come back with match: similar; a page holds only exact or only similar items.
1091
1239
  *
1092
1240
  * Deprecated: use HTTP operation `searchPublicEntities`. [Migration guide](https://docs.firmenakte.at/migrations/v2-structure.html#search). No removal date is scheduled.
1093
1241
  *
@@ -1103,7 +1251,7 @@ class FirmenakteApi extends HeyApiClient {
1103
1251
  /**
1104
1252
  * Search entities
1105
1253
  *
1106
- * Find companies and people, and the references they point to, whose name or code contains q: places (geography) and the reference vocabularies legalForm, court, industry, trade, functionType and keyFigure. Vocabularies also match by code, such as GmbH, 62.10 or GF; a postcode finds its place. types narrows the search to the listed types; addresses are searched only when types names address, by street, house number, postcode and town. Results rank by where q sits in the name, then name length, then companies, people, places, vocabularies and addresses, then name and ID.
1254
+ * Find companies and people, and the references they point to, whose name or code contains q: places (geography) and the reference vocabularies legalForm, court, industry, trade, functionType and keyFigure. Vocabularies also match by code, such as GmbH, 62.10 or GF; a postcode finds its place. types narrows the search to the listed types; addresses are searched only when types names address, by street, house number, postcode and town. Names of companies and people compare case-, accent- and punctuation-insensitively, with ä = ae = a, ß = ss and legal forms as one word (GmbH = Ges.m.b.H.). Results rank by where q sits in the name (the whole name, its start, a later word start, inside a word), then name length, then companies, people, places, vocabularies and addresses, then name and ID. When q finds nothing, companies and people whose name differs from q by one letter in a word of five to eight letters, or two in a longer word, come back with match: similar; a page holds only exact or only similar items.
1107
1255
  */
1108
1256
  searchPublicEntities(options) {
1109
1257
  return (options?.client ?? this.client).get({
@@ -1115,7 +1263,7 @@ class FirmenakteApi extends HeyApiClient {
1115
1263
  /**
1116
1264
  * Search entities (POST)
1117
1265
  *
1118
- * Find companies and people, and the references they point to, whose name or code contains q: places (geography) and the reference vocabularies legalForm, court, industry, trade, functionType and keyFigure. Vocabularies also match by code, such as GmbH, 62.10 or GF; a postcode finds its place. types narrows the search to the listed types; addresses are searched only when types names address, by street, house number, postcode and town. Results rank by where q sits in the name, then name length, then companies, people, places, vocabularies and addresses, then name and ID.
1266
+ * Find companies and people, and the references they point to, whose name or code contains q: places (geography) and the reference vocabularies legalForm, court, industry, trade, functionType and keyFigure. Vocabularies also match by code, such as GmbH, 62.10 or GF; a postcode finds its place. types narrows the search to the listed types; addresses are searched only when types names address, by street, house number, postcode and town. Names of companies and people compare case-, accent- and punctuation-insensitively, with ä = ae = a, ß = ss and legal forms as one word (GmbH = Ges.m.b.H.). Results rank by where q sits in the name (the whole name, its start, a later word start, inside a word), then name length, then companies, people, places, vocabularies and addresses, then name and ID. When q finds nothing, companies and people whose name differs from q by one letter in a word of five to eight letters, or two in a longer word, come back with match: similar; a page holds only exact or only similar items.
1119
1267
  */
1120
1268
  searchPublicEntitiesQuery(options) {
1121
1269
  return (options.client ?? this.client).post({