@firmenakte/api-client 2.42.0 → 2.43.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.
@@ -219,6 +219,14 @@ export type BankAccountDto = {
219
219
  * The list of its bookings.
220
220
  */
221
221
  listId?: null | string;
222
+ /**
223
+ * bank, cash, card or provider. It only names the Konto: every kind takes statements, bookings by hand and a connection.
224
+ */
225
+ kind: string;
226
+ /**
227
+ * The last day a Kontoauszug read into this Konto covers; null before the first.
228
+ */
229
+ statementUntil?: null | string;
222
230
  };
223
231
  export type BankAssignInput = {
224
232
  /**
@@ -234,6 +242,84 @@ export type BankAssignInput = {
234
242
  */
235
243
  reason?: null | string;
236
244
  };
245
+ export type BankCandidateDto = {
246
+ /**
247
+ * invoice or receipt.
248
+ */
249
+ kind: string;
250
+ id: string;
251
+ /**
252
+ * What it is: Rechnung or Beleg with its number.
253
+ */
254
+ label: string;
255
+ number?: null | string;
256
+ /**
257
+ * The customer of an invoice, the supplier of a receipt.
258
+ */
259
+ partnerName?: null | string;
260
+ /**
261
+ * What is still open, in cents, signed like a booking: an invoice expects money in.
262
+ */
263
+ openCents: number;
264
+ currency: string;
265
+ date: string;
266
+ /**
267
+ * What fits: amount (the open amount exactly), number (its number in the reference), numberPart (the number's last digits in the reference), partner (the counterparty's name), iban (the partner's IBAN), date (booked within days of it).
268
+ */
269
+ reasons: Array<string>;
270
+ /**
271
+ * The text of the booking's reference that names it, to highlight.
272
+ */
273
+ mark?: null | string;
274
+ /**
275
+ * A part payment: what stays open after this booking, in cents.
276
+ */
277
+ remainderCents?: null | number;
278
+ };
279
+ export type BankConnectionDto = {
280
+ accountId: string;
281
+ /**
282
+ * stripe, or null while the Konto is not connected.
283
+ */
284
+ provider?: null | string;
285
+ /**
286
+ * none (not connected), connected, or error (only a person can fix it: see error).
287
+ */
288
+ status: string;
289
+ /**
290
+ * key (a restricted Stripe key) or oauth (Stripe's read_only consent).
291
+ */
292
+ method?: null | string;
293
+ /**
294
+ * The connected Stripe account (acct_…) of an oauth connection.
295
+ */
296
+ externalAccountId?: null | string;
297
+ /**
298
+ * The own Konto payouts go to: a payout is a transfer there and its statement line is matched to it.
299
+ */
300
+ payoutAccountId?: null | string;
301
+ /**
302
+ * When bookings were last pulled, successful or not.
303
+ */
304
+ lastSyncAt?: null | string;
305
+ /**
306
+ * When the last pull succeeded.
307
+ */
308
+ lastSuccessAt?: null | string;
309
+ /**
310
+ * The last pull's failure: invalid_key, missing_permission, revoked or unavailable.
311
+ */
312
+ error?: null | string;
313
+ /**
314
+ * What failed and the next step, in German.
315
+ */
316
+ errorMessage?: null | string;
317
+ /**
318
+ * Whether this server offers connecting through Stripe's consent page (startBankStripeOAuth).
319
+ */
320
+ oauthAvailable: boolean;
321
+ connectedAt?: null | string;
322
+ };
237
323
  export type BankCounterpartyDto = {
238
324
  name: null | string;
239
325
  iban: null | string;
@@ -264,13 +350,17 @@ export type BankMatchDto = {
264
350
  */
265
351
  by: string;
266
352
  /**
267
- * The AI's level: sicher or eventuell.
353
+ * How sure: sicher or eventuell. A rule's hit is sicher, its weaker proposal eventuell.
268
354
  */
269
355
  confidence?: null | string;
270
356
  /**
271
- * A sure AI hit taken over automatically: cancelBankAutoMatch turns it back into a proposal.
357
+ * A sure hit taken over without a person: cancelBankAutoMatch turns it back into a proposal.
272
358
  */
273
359
  auto: boolean;
360
+ /**
361
+ * What fits an invoice or receipt, as in BankCandidateDto.reasons; a transfer by IBAN is iban.
362
+ */
363
+ reasons: Array<string>;
274
364
  };
275
365
  export type BankSettingsDto = {
276
366
  /**
@@ -278,7 +368,7 @@ export type BankSettingsDto = {
278
368
  */
279
369
  aiMatch: boolean;
280
370
  /**
281
- * sicher: a sure AI hit is taken over (and can be undone); nie: every hit waits for a person.
371
+ * sicher: a sure hit of a rule or the AI is taken over (and can be undone); nie: every hit waits for a person.
282
372
  */
283
373
  autoAccept: string;
284
374
  };
@@ -286,7 +376,7 @@ export type BankTransactionDto = {
286
376
  id: string;
287
377
  accountId: string;
288
378
  /**
289
- * How it came in: api, camt or manual.
379
+ * How it came in: api, camt, manual or stripe (a connected Stripe account).
290
380
  */
291
381
  via: string;
292
382
  /**
@@ -304,7 +394,7 @@ export type BankTransactionDto = {
304
394
  reference?: null | string;
305
395
  endToEndId?: null | string;
306
396
  /**
307
- * charge, refund, fee, payout or transfer.
397
+ * charge, refund, fee, payout, transfer or dispute.
308
398
  */
309
399
  kind: string;
310
400
  /**
@@ -326,6 +416,10 @@ export type BankTransactionDto = {
326
416
  editable: boolean;
327
417
  match?: null | BankMatchDto;
328
418
  createdAt: string;
419
+ /**
420
+ * While nothing is assigned: the invoices and receipts it can pay, best first, at most four; a proposal's target first. Empty once assigned.
421
+ */
422
+ candidates: Array<BankCandidateDto>;
329
423
  };
330
424
  export type BankTransactionInput = {
331
425
  /**
@@ -352,7 +446,7 @@ export type BankTransactionInput = {
352
446
  reference?: null | string;
353
447
  endToEndId?: null | string;
354
448
  /**
355
- * charge (default), refund, fee or payout.
449
+ * charge (default), refund, fee, payout or dispute.
356
450
  */
357
451
  kind?: null | string;
358
452
  /**
@@ -750,6 +844,10 @@ export type CamtImportResultDto = {
750
844
  */
751
845
  gaps: Array<string>;
752
846
  warnings: Array<string>;
847
+ /**
848
+ * New bookings assigned without a person; the rest of created waits.
849
+ */
850
+ assigned: number;
753
851
  };
754
852
  export type CancelInvoiceBody = {
755
853
  /**
@@ -1447,6 +1545,10 @@ export type CreateBankAccountRequest = {
1447
1545
  * The balance before the first booking, in cents.
1448
1546
  */
1449
1547
  openingBalanceCents?: number;
1548
+ /**
1549
+ * bank (default), cash, card or provider.
1550
+ */
1551
+ kind?: null | string;
1450
1552
  };
1451
1553
  export type CreateBankTransactionRequest = {
1452
1554
  accountId: string;
@@ -1624,6 +1726,11 @@ export type CursorPageOfBankAccountDto = {
1624
1726
  nextCursor?: null | string;
1625
1727
  total?: null | number;
1626
1728
  };
1729
+ export type CursorPageOfBankCandidateDto = {
1730
+ items: Array<BankCandidateDto>;
1731
+ nextCursor?: null | string;
1732
+ total?: null | number;
1733
+ };
1627
1734
  export type CursorPageOfBankTransactionDto = {
1628
1735
  items: Array<BankTransactionDto>;
1629
1736
  nextCursor?: null | string;
@@ -2197,6 +2304,10 @@ export type ImportBankTransactionsResult = {
2197
2304
  * New bookings the matching assigned or proposed something for.
2198
2305
  */
2199
2306
  matched: number;
2307
+ /**
2308
+ * New bookings assigned without a person: nothing left to do for them.
2309
+ */
2310
+ assigned: number;
2200
2311
  };
2201
2312
  export type ImportCamtRequest = {
2202
2313
  accountId: string;
@@ -4169,6 +4280,20 @@ export type StoredResultReference = {
4169
4280
  bytes: number;
4170
4281
  expiresAt: string;
4171
4282
  };
4283
+ export type SyncBankConnectionResult = {
4284
+ /**
4285
+ * Bookings created; one already there is skipped.
4286
+ */
4287
+ created: number;
4288
+ /**
4289
+ * New bookings assigned or proposed, fees and payouts included.
4290
+ */
4291
+ matched: number;
4292
+ /**
4293
+ * The connection after the pull; error says why a pull failed.
4294
+ */
4295
+ connection: BankConnectionDto;
4296
+ };
4172
4297
  export type SyncedCell = {
4173
4298
  value: any;
4174
4299
  asOf?: null | string;
@@ -4242,6 +4367,16 @@ export type UpdateBankAccountBody = {
4242
4367
  */
4243
4368
  iban?: null | string;
4244
4369
  openingBalanceCents?: null | number;
4370
+ /**
4371
+ * bank, cash, card or provider.
4372
+ */
4373
+ kind?: null | string;
4374
+ };
4375
+ export type UpdateBankConnectionBody = {
4376
+ /**
4377
+ * The own Konto payouts go to; an empty string removes it.
4378
+ */
4379
+ payoutAccountId?: null | string;
4245
4380
  };
4246
4381
  export type UpdateBankSettingsRequest = {
4247
4382
  aiMatch?: null | boolean;
@@ -10696,12 +10831,290 @@ export type GetInvoicePdfResponses = {
10696
10831
  */
10697
10832
  200: any;
10698
10833
  };
10834
+ export type DeleteBankConnectionData = {
10835
+ body?: never;
10836
+ path: {
10837
+ /**
10838
+ * The Konto's or booking's ID.
10839
+ */
10840
+ id: string;
10841
+ };
10842
+ query?: never;
10843
+ url: '/api/v2/me/billing/accounts/{id}/connection';
10844
+ };
10845
+ export type DeleteBankConnectionErrors = {
10846
+ /**
10847
+ * Malformed request, or a cursor from another request.
10848
+ */
10849
+ 400: Problem;
10850
+ /**
10851
+ * No valid API key or session.
10852
+ */
10853
+ 401: Problem;
10854
+ /**
10855
+ * This operation needs a dashboard session.
10856
+ */
10857
+ 403: Problem;
10858
+ /**
10859
+ * Not found, or it belongs to another workspace.
10860
+ */
10861
+ 404: Problem;
10862
+ /**
10863
+ * Conflict with the current state; `code` says which.
10864
+ */
10865
+ 409: Problem;
10866
+ /**
10867
+ * Validation failed; `errors[]` names each parameter or JSON pointer.
10868
+ */
10869
+ 422: Problem;
10870
+ /**
10871
+ * Too many requests; retry after `Retry-After`.
10872
+ */
10873
+ 429: Problem;
10874
+ /**
10875
+ * Internal error; quote `requestId` to support.
10876
+ */
10877
+ 500: Problem;
10878
+ };
10879
+ export type DeleteBankConnectionError = DeleteBankConnectionErrors[keyof DeleteBankConnectionErrors];
10880
+ export type DeleteBankConnectionResponses = {
10881
+ /**
10882
+ * OK
10883
+ */
10884
+ 200: BankConnectionDto;
10885
+ };
10886
+ export type DeleteBankConnectionResponse = DeleteBankConnectionResponses[keyof DeleteBankConnectionResponses];
10887
+ export type GetBankConnectionData = {
10888
+ body?: never;
10889
+ path: {
10890
+ /**
10891
+ * The Konto's or booking's ID.
10892
+ */
10893
+ id: string;
10894
+ };
10895
+ query?: never;
10896
+ url: '/api/v2/me/billing/accounts/{id}/connection';
10897
+ };
10898
+ export type GetBankConnectionErrors = {
10899
+ /**
10900
+ * Malformed request, or a cursor from another request.
10901
+ */
10902
+ 400: Problem;
10903
+ /**
10904
+ * No valid API key or session.
10905
+ */
10906
+ 401: Problem;
10907
+ /**
10908
+ * This operation needs a dashboard session.
10909
+ */
10910
+ 403: Problem;
10911
+ /**
10912
+ * Not found, or it belongs to another workspace.
10913
+ */
10914
+ 404: Problem;
10915
+ /**
10916
+ * Conflict with the current state; `code` says which.
10917
+ */
10918
+ 409: Problem;
10919
+ /**
10920
+ * Validation failed; `errors[]` names each parameter or JSON pointer.
10921
+ */
10922
+ 422: Problem;
10923
+ /**
10924
+ * Too many requests; retry after `Retry-After`.
10925
+ */
10926
+ 429: Problem;
10927
+ /**
10928
+ * Internal error; quote `requestId` to support.
10929
+ */
10930
+ 500: Problem;
10931
+ };
10932
+ export type GetBankConnectionError = GetBankConnectionErrors[keyof GetBankConnectionErrors];
10933
+ export type GetBankConnectionResponses = {
10934
+ /**
10935
+ * OK
10936
+ */
10937
+ 200: BankConnectionDto;
10938
+ };
10939
+ export type GetBankConnectionResponse = GetBankConnectionResponses[keyof GetBankConnectionResponses];
10940
+ export type UpdateBankConnectionData = {
10941
+ body: UpdateBankConnectionBody;
10942
+ path: {
10943
+ /**
10944
+ * The Konto's or booking's ID.
10945
+ */
10946
+ id: string;
10947
+ };
10948
+ query?: never;
10949
+ url: '/api/v2/me/billing/accounts/{id}/connection';
10950
+ };
10951
+ export type UpdateBankConnectionErrors = {
10952
+ /**
10953
+ * Malformed request, or a cursor from another request.
10954
+ */
10955
+ 400: Problem;
10956
+ /**
10957
+ * No valid API key or session.
10958
+ */
10959
+ 401: Problem;
10960
+ /**
10961
+ * This operation needs a dashboard session.
10962
+ */
10963
+ 403: Problem;
10964
+ /**
10965
+ * Not found, or it belongs to another workspace.
10966
+ */
10967
+ 404: Problem;
10968
+ /**
10969
+ * Conflict with the current state; `code` says which.
10970
+ */
10971
+ 409: Problem;
10972
+ /**
10973
+ * Validation failed; `errors[]` names each parameter or JSON pointer.
10974
+ */
10975
+ 422: Problem;
10976
+ /**
10977
+ * Too many requests; retry after `Retry-After`.
10978
+ */
10979
+ 429: Problem;
10980
+ /**
10981
+ * Internal error; quote `requestId` to support.
10982
+ */
10983
+ 500: Problem;
10984
+ };
10985
+ export type UpdateBankConnectionError = UpdateBankConnectionErrors[keyof UpdateBankConnectionErrors];
10986
+ export type UpdateBankConnectionResponses = {
10987
+ /**
10988
+ * OK
10989
+ */
10990
+ 200: BankConnectionDto;
10991
+ };
10992
+ export type UpdateBankConnectionResponse = UpdateBankConnectionResponses[keyof UpdateBankConnectionResponses];
10993
+ export type RunBankSyncData = {
10994
+ body?: never;
10995
+ path: {
10996
+ /**
10997
+ * The Konto's or booking's ID.
10998
+ */
10999
+ id: string;
11000
+ };
11001
+ query?: never;
11002
+ url: '/api/v2/me/billing/accounts/{id}/connection/sync';
11003
+ };
11004
+ export type RunBankSyncErrors = {
11005
+ /**
11006
+ * Malformed request, or a cursor from another request.
11007
+ */
11008
+ 400: Problem;
11009
+ /**
11010
+ * No valid API key or session.
11011
+ */
11012
+ 401: Problem;
11013
+ /**
11014
+ * This operation needs a dashboard session.
11015
+ */
11016
+ 403: Problem;
11017
+ /**
11018
+ * Not found, or it belongs to another workspace.
11019
+ */
11020
+ 404: Problem;
11021
+ /**
11022
+ * Conflict with the current state; `code` says which.
11023
+ */
11024
+ 409: Problem;
11025
+ /**
11026
+ * Validation failed; `errors[]` names each parameter or JSON pointer.
11027
+ */
11028
+ 422: Problem;
11029
+ /**
11030
+ * Too many requests; retry after `Retry-After`.
11031
+ */
11032
+ 429: Problem;
11033
+ /**
11034
+ * Internal error; quote `requestId` to support.
11035
+ */
11036
+ 500: Problem;
11037
+ };
11038
+ export type RunBankSyncError = RunBankSyncErrors[keyof RunBankSyncErrors];
11039
+ export type RunBankSyncResponses = {
11040
+ /**
11041
+ * OK
11042
+ */
11043
+ 200: SyncBankConnectionResult;
11044
+ };
11045
+ export type RunBankSyncResponse = RunBankSyncResponses[keyof RunBankSyncResponses];
11046
+ export type ListBankMatchCandidatesData = {
11047
+ body?: never;
11048
+ path: {
11049
+ /**
11050
+ * The Konto's or booking's ID.
11051
+ */
11052
+ id: string;
11053
+ };
11054
+ query?: {
11055
+ /**
11056
+ * A number, a name or an amount such as 59,90.
11057
+ */
11058
+ q?: string;
11059
+ /**
11060
+ * Page size: bookings and Konten default 50, at most 200; candidates default 10, at most 50.
11061
+ */
11062
+ limit?: number;
11063
+ /**
11064
+ * Opaque cursor from the previous page.
11065
+ */
11066
+ cursor?: string;
11067
+ };
11068
+ url: '/api/v2/me/billing/transactions/{id}/candidates';
11069
+ };
11070
+ export type ListBankMatchCandidatesErrors = {
11071
+ /**
11072
+ * Malformed request, or a cursor from another request.
11073
+ */
11074
+ 400: Problem;
11075
+ /**
11076
+ * No valid API key or session.
11077
+ */
11078
+ 401: Problem;
11079
+ /**
11080
+ * This operation needs a dashboard session.
11081
+ */
11082
+ 403: Problem;
11083
+ /**
11084
+ * Not found, or it belongs to another workspace.
11085
+ */
11086
+ 404: Problem;
11087
+ /**
11088
+ * Conflict with the current state; `code` says which.
11089
+ */
11090
+ 409: Problem;
11091
+ /**
11092
+ * Validation failed; `errors[]` names each parameter or JSON pointer.
11093
+ */
11094
+ 422: Problem;
11095
+ /**
11096
+ * Too many requests; retry after `Retry-After`.
11097
+ */
11098
+ 429: Problem;
11099
+ /**
11100
+ * Internal error; quote `requestId` to support.
11101
+ */
11102
+ 500: Problem;
11103
+ };
11104
+ export type ListBankMatchCandidatesError = ListBankMatchCandidatesErrors[keyof ListBankMatchCandidatesErrors];
11105
+ export type ListBankMatchCandidatesResponses = {
11106
+ /**
11107
+ * OK
11108
+ */
11109
+ 200: CursorPageOfBankCandidateDto;
11110
+ };
11111
+ export type ListBankMatchCandidatesResponse = ListBankMatchCandidatesResponses[keyof ListBankMatchCandidatesResponses];
10699
11112
  export type ListBankAccountsData = {
10700
11113
  body?: never;
10701
11114
  path?: never;
10702
11115
  query?: {
10703
11116
  /**
10704
- * Page size, default 50, maximum 200.
11117
+ * Page size: bookings and Konten default 50, at most 200; candidates default 10, at most 50.
10705
11118
  */
10706
11119
  limit?: number;
10707
11120
  /**
@@ -10916,7 +11329,7 @@ export type ListBankTransactionsData = {
10916
11329
  */
10917
11330
  accountId?: string;
10918
11331
  /**
10919
- * open, suggested or assigned.
11332
+ * open, suggested, todo (open or suggested) or assigned.
10920
11333
  */
10921
11334
  status?: string;
10922
11335
  /**
@@ -10924,7 +11337,7 @@ export type ListBankTransactionsData = {
10924
11337
  */
10925
11338
  q?: string;
10926
11339
  /**
10927
- * Page size, default 50, maximum 200.
11340
+ * Page size: bookings and Konten default 50, at most 200; candidates default 10, at most 50.
10928
11341
  */
10929
11342
  limit?: number;
10930
11343
  /**