@epilot/sdk 2.11.4 → 2.11.6

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.
Files changed (145) hide show
  1. package/definitions/billing-runtime.json +1 -1
  2. package/definitions/billing.json +1571 -198
  3. package/definitions/snapshot-runtime.json +1 -1
  4. package/definitions/snapshot.json +214 -46
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +8 -8
  20. package/dist/apis/billing.d.cts +2 -2
  21. package/dist/apis/billing.d.ts +2 -2
  22. package/dist/apis/billing.js +2 -2
  23. package/dist/apis/blueprint-manifest.cjs +6 -6
  24. package/dist/apis/blueprint-manifest.js +1 -1
  25. package/dist/apis/calendar.cjs +6 -6
  26. package/dist/apis/calendar.js +1 -1
  27. package/dist/apis/configuration-hub.cjs +6 -6
  28. package/dist/apis/configuration-hub.js +1 -1
  29. package/dist/apis/consent.cjs +6 -6
  30. package/dist/apis/consent.js +1 -1
  31. package/dist/apis/customer-portal.cjs +6 -6
  32. package/dist/apis/customer-portal.js +1 -1
  33. package/dist/apis/dashboard.cjs +6 -6
  34. package/dist/apis/dashboard.js +1 -1
  35. package/dist/apis/data-governance.cjs +6 -6
  36. package/dist/apis/data-governance.js +1 -1
  37. package/dist/apis/deduplication.cjs +6 -6
  38. package/dist/apis/deduplication.js +1 -1
  39. package/dist/apis/design.cjs +6 -6
  40. package/dist/apis/design.js +1 -1
  41. package/dist/apis/document.cjs +6 -6
  42. package/dist/apis/document.js +1 -1
  43. package/dist/apis/email-settings.cjs +6 -6
  44. package/dist/apis/email-settings.js +1 -1
  45. package/dist/apis/email-template.cjs +6 -6
  46. package/dist/apis/email-template.js +1 -1
  47. package/dist/apis/entity-mapping.cjs +6 -6
  48. package/dist/apis/entity-mapping.js +1 -1
  49. package/dist/apis/entity.cjs +6 -6
  50. package/dist/apis/entity.js +1 -1
  51. package/dist/apis/environments.cjs +6 -6
  52. package/dist/apis/environments.js +1 -1
  53. package/dist/apis/event-catalog.cjs +6 -6
  54. package/dist/apis/event-catalog.js +1 -1
  55. package/dist/apis/file.cjs +6 -6
  56. package/dist/apis/file.js +1 -1
  57. package/dist/apis/iban.cjs +6 -6
  58. package/dist/apis/iban.js +1 -1
  59. package/dist/apis/integration-toolkit.cjs +6 -6
  60. package/dist/apis/integration-toolkit.js +1 -1
  61. package/dist/apis/journey.cjs +6 -6
  62. package/dist/apis/journey.js +1 -1
  63. package/dist/apis/kanban.cjs +6 -6
  64. package/dist/apis/kanban.js +1 -1
  65. package/dist/apis/message.cjs +6 -6
  66. package/dist/apis/message.js +1 -1
  67. package/dist/apis/metering.cjs +6 -6
  68. package/dist/apis/metering.js +1 -1
  69. package/dist/apis/notes.cjs +6 -6
  70. package/dist/apis/notes.js +1 -1
  71. package/dist/apis/notification.cjs +6 -6
  72. package/dist/apis/notification.js +1 -1
  73. package/dist/apis/organization.cjs +6 -6
  74. package/dist/apis/organization.js +1 -1
  75. package/dist/apis/partner-directory.cjs +6 -6
  76. package/dist/apis/partner-directory.js +1 -1
  77. package/dist/apis/permissions.cjs +6 -6
  78. package/dist/apis/permissions.js +1 -1
  79. package/dist/apis/pricing-tier.cjs +6 -6
  80. package/dist/apis/pricing-tier.js +1 -1
  81. package/dist/apis/pricing.cjs +6 -6
  82. package/dist/apis/pricing.js +1 -1
  83. package/dist/apis/purpose.cjs +6 -6
  84. package/dist/apis/purpose.js +1 -1
  85. package/dist/apis/query.cjs +6 -6
  86. package/dist/apis/query.js +1 -1
  87. package/dist/apis/sandbox.cjs +6 -6
  88. package/dist/apis/sandbox.js +1 -1
  89. package/dist/apis/sharing.cjs +6 -6
  90. package/dist/apis/sharing.js +1 -1
  91. package/dist/apis/snapshot.cjs +8 -8
  92. package/dist/apis/snapshot.d.cts +2 -2
  93. package/dist/apis/snapshot.d.ts +2 -2
  94. package/dist/apis/snapshot.js +2 -2
  95. package/dist/apis/submission.cjs +6 -6
  96. package/dist/apis/submission.js +1 -1
  97. package/dist/apis/target.cjs +6 -6
  98. package/dist/apis/target.js +1 -1
  99. package/dist/apis/targeting.cjs +6 -6
  100. package/dist/apis/targeting.js +1 -1
  101. package/dist/apis/template-variables.cjs +6 -6
  102. package/dist/apis/template-variables.js +1 -1
  103. package/dist/apis/user.cjs +6 -6
  104. package/dist/apis/user.js +1 -1
  105. package/dist/apis/validation-rules.cjs +6 -6
  106. package/dist/apis/validation-rules.js +1 -1
  107. package/dist/apis/webhooks.cjs +6 -6
  108. package/dist/apis/webhooks.js +1 -1
  109. package/dist/apis/workflow-definition.cjs +6 -6
  110. package/dist/apis/workflow-definition.js +1 -1
  111. package/dist/apis/workflow.cjs +6 -6
  112. package/dist/apis/workflow.js +1 -1
  113. package/dist/billing-C45UEPBV.cjs +7 -0
  114. package/dist/billing-IV5ABNW4.js +7 -0
  115. package/dist/{billing-runtime-C6BMGWCX.js → billing-runtime-3OCFZU2K.js} +1 -1
  116. package/dist/{billing-runtime-L4Y7MLM3.cjs → billing-runtime-PKKLWPQY.cjs} +2 -2
  117. package/dist/billing.d-N_1F759g.d.cts +3673 -0
  118. package/dist/billing.d-N_1F759g.d.ts +3673 -0
  119. package/dist/chunk-4XOJVIUQ.cjs +14 -0
  120. package/dist/{chunk-O4C7IU7J.cjs → chunk-F4KDYDCB.cjs} +4 -4
  121. package/dist/{chunk-PCK46M32.js → chunk-H72QGQR6.js} +4 -4
  122. package/dist/chunk-U5XZ4ERL.js +14 -0
  123. package/dist/{chunk-54QNWEPZ.js → chunk-UXY7SWNP.js} +1 -1
  124. package/dist/{chunk-YXJ4PBFQ.cjs → chunk-VDMPIKAN.cjs} +1 -1
  125. package/dist/index.cjs +12 -12
  126. package/dist/index.d.cts +2 -2
  127. package/dist/index.d.ts +2 -2
  128. package/dist/index.js +3 -3
  129. package/dist/snapshot-5XHTEB2U.js +7 -0
  130. package/dist/snapshot-NKK6BNQB.cjs +7 -0
  131. package/dist/{snapshot-runtime-6DV42FVY.cjs → snapshot-runtime-AQJSSXRV.cjs} +2 -2
  132. package/dist/{snapshot-runtime-IW57MINC.js → snapshot-runtime-AY7YYSFQ.js} +1 -1
  133. package/dist/{snapshot.d-CqefmvuB.d.ts → snapshot.d-DT0zg2CS.d.cts} +258 -39
  134. package/dist/{snapshot.d-CqefmvuB.d.cts → snapshot.d-DT0zg2CS.d.ts} +258 -39
  135. package/docs/billing.md +1200 -292
  136. package/docs/snapshot.md +179 -21
  137. package/package.json +1 -1
  138. package/dist/billing-DUWDISHP.cjs +0 -7
  139. package/dist/billing-IPALEAG2.js +0 -7
  140. package/dist/billing.d-Bs8Ku9qE.d.cts +0 -993
  141. package/dist/billing.d-Bs8Ku9qE.d.ts +0 -993
  142. package/dist/chunk-CSK5ZUTS.js +0 -14
  143. package/dist/chunk-G5FKTWUC.cjs +0 -14
  144. package/dist/snapshot-2HFERXRQ.js +0 -7
  145. package/dist/snapshot-UHCQAT4R.cjs +0 -7
@@ -0,0 +1,3673 @@
1
+ import { OpenAPIClient, Parameters, AxiosRequestConfig, OperationResponse, UnknownParamsObject } from 'openapi-client-axios';
2
+
3
+ /* Auto-copied from billing-client */
4
+
5
+
6
+ declare namespace Components {
7
+ namespace Parameters {
8
+ export type ConfigurationHistoryChangeType = "installment_amount_changed";
9
+ export type From = number;
10
+ export type Size = number;
11
+ }
12
+ export interface QueryParameters {
13
+ From?: Parameters.From;
14
+ Size?: Parameters.Size;
15
+ ConfigurationHistoryChangeType?: Parameters.ConfigurationHistoryChangeType;
16
+ }
17
+ namespace Responses {
18
+ export type BadRequest = /* Standard error response format */ Schemas.Error;
19
+ export type Forbidden = /* Standard error response format */ Schemas.Error;
20
+ export type InternalServerError = /* Standard error response format */ Schemas.Error;
21
+ export type NotFound = /* Standard error response format */ Schemas.Error;
22
+ export type Unauthorized = /* Standard error response format */ Schemas.Error;
23
+ export type UnprocessableEntity = /* Standard error response format */ Schemas.Error;
24
+ }
25
+ namespace Schemas {
26
+ /**
27
+ * Customer balance summary (Kontostandübersicht).
28
+ * Represents the aggregated balance across all contracts and orders for a customer.
29
+ *
30
+ */
31
+ export interface Balance {
32
+ /**
33
+ * Total customer balance in cents (Gesamtkontostand in Cent).
34
+ * Positive = customer owes money (Offener Betrag).
35
+ * Negative = customer has credit (Guthaben).
36
+ *
37
+ * example:
38
+ * 8990
39
+ */
40
+ balance?: number;
41
+ /**
42
+ * Balance as decimal string for display (Kontostand als Dezimalzahl).
43
+ * Formatted with 2 decimal places.
44
+ *
45
+ * example:
46
+ * 89.90
47
+ */
48
+ balance_decimal?: string;
49
+ balance_currency?: /**
50
+ * Currency code in ISO 4217 format (Währungscode).
51
+ * Common values: EUR (Euro), CHF (Swiss Franc)
52
+ *
53
+ * example:
54
+ * EUR
55
+ */
56
+ Currency;
57
+ }
58
+ /**
59
+ * Represents a single financial transaction entry (Buchungssatz) in the billing ledger.
60
+ * Each entry is either a debit or a credit, following double-entry accounting principles.
61
+ * Common types include Abschlagszahlung (installment), Zahlungseingang (payment), Rückerstattung (reimbursement), etc.
62
+ *
63
+ */
64
+ export interface BaseBillingEvent {
65
+ [name: string]: any;
66
+ _id?: /**
67
+ * Unique entity identifier (UUID format)
68
+ * example:
69
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
70
+ */
71
+ EntityId;
72
+ /**
73
+ * Display title of the entity (Anzeigetitel)
74
+ * example:
75
+ * Abschlagszahlung Juli 2025
76
+ */
77
+ _title?: string;
78
+ /**
79
+ * Organization ID the entity belongs to (Organisations-ID)
80
+ * example:
81
+ * 123456
82
+ */
83
+ _org?: string;
84
+ _schema?: /**
85
+ * URL-friendly identifier for the entity schema (Schema-Slug)
86
+ * example:
87
+ * billing_event
88
+ */
89
+ EntitySlug;
90
+ /**
91
+ * Tags for categorization and filtering (Schlagwörter)
92
+ * example:
93
+ * [
94
+ * "billing",
95
+ * "energy"
96
+ * ]
97
+ */
98
+ _tags?: string[];
99
+ /**
100
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
101
+ * example:
102
+ * 2025-06-15T10:30:00Z
103
+ */
104
+ _created_at?: string; // date-time
105
+ /**
106
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
107
+ * example:
108
+ * 2025-06-15T14:45:00Z
109
+ */
110
+ _updated_at?: string; // date-time
111
+ /**
112
+ * The classification of the billing transaction.
113
+ * This field is used to group financial events for reporting or reconciliation.
114
+ * Common examples:
115
+ * - installment (Abschlagszahlung)
116
+ * - payment (Zahlungseingang)
117
+ * - reimbursement (Rückerstattung)
118
+ * - dunning_fee (Mahngebühr)
119
+ * - chargeback (Lastschrift-Rückgabe)
120
+ * - final_bill (Endabrechnung)
121
+ * - bonus (Gutschrift)
122
+ * - correction (Korrekturbuchung)
123
+ *
124
+ * example:
125
+ * installment
126
+ */
127
+ type: string;
128
+ /**
129
+ * The accounting direction of the transaction:
130
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
131
+ * - credit (Haben): reduces the liability (e.g. payment received)
132
+ *
133
+ * Automatically inferred based on event type if not specified.
134
+ *
135
+ * example:
136
+ * debit
137
+ */
138
+ direction?: "debit" | "credit";
139
+ /**
140
+ * Betrag in Cent (net or gross depending on context)
141
+ * example:
142
+ * 10000
143
+ */
144
+ billing_amount: number;
145
+ /**
146
+ * Decimal representation of billing_amount for display or reporting
147
+ * example:
148
+ * 100.00
149
+ */
150
+ billing_amount_decimal: string;
151
+ billing_currency: /**
152
+ * Currency code in ISO 4217 format (Währungscode).
153
+ * Common values: EUR (Euro), CHF (Swiss Franc)
154
+ *
155
+ * example:
156
+ * EUR
157
+ */
158
+ Currency;
159
+ /**
160
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
161
+ * example:
162
+ * SAP-54321
163
+ */
164
+ external_id?: string;
165
+ /**
166
+ * Link to the associated Vertragskonto or contract object
167
+ */
168
+ contract: {
169
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
170
+ };
171
+ /**
172
+ * General ledger booking date (Buchungsdatum) for the billing event.
173
+ * Used to determine when the entry was accounted for in the system.
174
+ * Applies to all event types (debits and credits).
175
+ * Can be used together with due_date or paid_date
176
+ *
177
+ * example:
178
+ * 2025-06-15
179
+ */
180
+ booking_date: string; // date
181
+ /**
182
+ * Due date of the invoice or charge (Fälligkeitsdatum)
183
+ * example:
184
+ * 2025-06-30
185
+ */
186
+ due_date?: string; // date
187
+ /**
188
+ * Booking date (Zahlungseingang, Wertstellung)
189
+ * example:
190
+ * 2025-06-15T10:00:00Z
191
+ */
192
+ paid_date?: string; // date-time
193
+ /**
194
+ * Status of the billing event. Defaults to closed.
195
+ */
196
+ status?: "closed" | "open";
197
+ /**
198
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
199
+ * example:
200
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
201
+ */
202
+ related_event?: string;
203
+ /**
204
+ * Optional link to an external resource e.g. an invoice in a customer portal
205
+ */
206
+ external_link?: {
207
+ /**
208
+ * URL of the external resource
209
+ * example:
210
+ * https://billing.example.com/invoices/12345
211
+ */
212
+ href?: string; // uri
213
+ /**
214
+ * Title of the external resource
215
+ * example:
216
+ * Invoice 12345
217
+ */
218
+ title?: string;
219
+ };
220
+ /**
221
+ * Optional reference to e.g. an invoice file associated with the billing event
222
+ */
223
+ attachments?: {
224
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
225
+ };
226
+ /**
227
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
228
+ * example:
229
+ * Teilzahlung für Abschlag Juni
230
+ */
231
+ note?: string;
232
+ /**
233
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
234
+ * example:
235
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
236
+ */
237
+ internal_note?: string;
238
+ }
239
+ /**
240
+ * Base schema for all epilot entities with common system fields
241
+ */
242
+ export interface BaseEntity {
243
+ [name: string]: any;
244
+ _id?: /**
245
+ * Unique entity identifier (UUID format)
246
+ * example:
247
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
248
+ */
249
+ EntityId;
250
+ /**
251
+ * Display title of the entity (Anzeigetitel)
252
+ * example:
253
+ * Abschlagszahlung Juli 2025
254
+ */
255
+ _title?: string;
256
+ /**
257
+ * Organization ID the entity belongs to (Organisations-ID)
258
+ * example:
259
+ * 123456
260
+ */
261
+ _org?: string;
262
+ _schema?: /**
263
+ * URL-friendly identifier for the entity schema (Schema-Slug)
264
+ * example:
265
+ * billing_event
266
+ */
267
+ EntitySlug;
268
+ /**
269
+ * Tags for categorization and filtering (Schlagwörter)
270
+ * example:
271
+ * [
272
+ * "billing",
273
+ * "energy"
274
+ * ]
275
+ */
276
+ _tags?: string[];
277
+ /**
278
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
279
+ * example:
280
+ * 2025-06-15T10:30:00Z
281
+ */
282
+ _created_at?: string; // date-time
283
+ /**
284
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
285
+ * example:
286
+ * 2025-06-15T14:45:00Z
287
+ */
288
+ _updated_at?: string; // date-time
289
+ }
290
+ export interface BillingAccountPricingInformation {
291
+ entity_type: "billing_account";
292
+ entity_id: string;
293
+ title?: string;
294
+ balance?: PricingInformationBalance;
295
+ contracts: ContractPricingInformation[];
296
+ }
297
+ /**
298
+ * Collection of supported billing event types (Buchungsarten).
299
+ * Each type represents a different kind of financial transaction
300
+ * that affects the customer's balance.
301
+ *
302
+ */
303
+ export type BillingEvent = /**
304
+ * Collection of supported billing event types (Buchungsarten).
305
+ * Each type represents a different kind of financial transaction
306
+ * that affects the customer's balance.
307
+ *
308
+ */
309
+ /**
310
+ * Installment billing event (Abschlagszahlung).
311
+ * Represents a scheduled partial payment that the customer owes,
312
+ * typically billed monthly for utilities like electricity or gas.
313
+ *
314
+ * example:
315
+ * {
316
+ * "type": "installment",
317
+ * "direction": "debit",
318
+ * "note": "July power & gas installment payment",
319
+ * "status": "open",
320
+ * "booking_date": "2025-07-10",
321
+ * "due_date": "2025-07-10",
322
+ * "billing_amount": 5000,
323
+ * "billing_amount_decimal": "50.00",
324
+ * "billing_currency": "EUR"
325
+ * }
326
+ */
327
+ InstallmentEvent | /**
328
+ * Payment received event (Zahlungseingang).
329
+ * Represents money received from the customer, reducing their balance.
330
+ * This is a credit transaction.
331
+ *
332
+ * example:
333
+ * {
334
+ * "type": "payment",
335
+ * "direction": "credit",
336
+ * "note": "Payment reference 001234567",
337
+ * "status": "closed",
338
+ * "booking_date": "2025-06-15",
339
+ * "due_date": "2025-06-15",
340
+ * "paid_date": "2025-06-09T10:00:00Z",
341
+ * "billing_amount": 5000,
342
+ * "billing_amount_decimal": "50.00",
343
+ * "billing_currency": "EUR"
344
+ * }
345
+ */
346
+ PaymentEvent | /**
347
+ * Reimbursement event (Rückerstattung).
348
+ * Represents a refund to the customer, typically after overpayment
349
+ * or billing correction. This is a credit transaction.
350
+ *
351
+ * example:
352
+ * {
353
+ * "type": "reimbursement",
354
+ * "direction": "credit",
355
+ * "billing_amount": 10000,
356
+ * "billing_amount_decimal": "100.00",
357
+ * "billing_currency": "EUR",
358
+ * "note": "Refund due to meter correction",
359
+ * "booking_date": "2025-06-16",
360
+ * "paid_date": "2025-06-18T14:00:00Z"
361
+ * }
362
+ */
363
+ ReimbursementEvent | /**
364
+ * Dunning fee event (Mahngebühr).
365
+ * Represents a late payment fee charged to the customer
366
+ * after a payment reminder has been sent. This is a debit transaction.
367
+ *
368
+ * example:
369
+ * {
370
+ * "type": "dunning_fee",
371
+ * "direction": "debit",
372
+ * "note": "Late fee for April invoice",
373
+ * "status": "open",
374
+ * "booking_date": "2025-06-10",
375
+ * "due_date": "2025-06-10",
376
+ * "billing_amount": 1500,
377
+ * "billing_amount_decimal": "15.00",
378
+ * "billing_currency": "EUR"
379
+ * }
380
+ */
381
+ DunningFeeEvent | /**
382
+ * Represents a single financial transaction entry (Buchungssatz) in the billing ledger.
383
+ * Each entry is either a debit or a credit, following double-entry accounting principles.
384
+ * Common types include Abschlagszahlung (installment), Zahlungseingang (payment), Rückerstattung (reimbursement), etc.
385
+ *
386
+ * example:
387
+ * {
388
+ * "type": "invoice",
389
+ * "direction": "debit",
390
+ * "billing_amount": 8500,
391
+ * "billing_amount_decimal": "85.00",
392
+ * "billing_currency": "EUR",
393
+ * "note": "Einmalige Rechnung für Zusatzleistung",
394
+ * "booking_date": "2025-06-25",
395
+ * "due_date": "2025-07-01"
396
+ * }
397
+ */
398
+ InvoiceEvent | /**
399
+ * Final bill event (Endabrechnung/Schlussrechnung).
400
+ * Represents the final settlement when a contract ends,
401
+ * accounting for actual consumption vs. paid installments.
402
+ * Can be either debit (customer owes more) or credit (customer overpaid).
403
+ *
404
+ * example:
405
+ * {
406
+ * "type": "final_bill",
407
+ * "direction": "debit",
408
+ * "billing_amount": 12000,
409
+ * "billing_amount_decimal": "120.00",
410
+ * "billing_currency": "EUR",
411
+ * "note": "Final invoice after contract termination",
412
+ * "booking_date": "2025-06-30"
413
+ * }
414
+ */
415
+ FinalBillEvent | /**
416
+ * Bonus/credit event (Gutschrift/Bonus).
417
+ * Represents a promotional credit or bonus applied to the customer's account,
418
+ * such as welcome bonuses or loyalty rewards. This is a credit transaction.
419
+ *
420
+ * example:
421
+ * {
422
+ * "type": "bonus",
423
+ * "direction": "credit",
424
+ * "billing_amount": 1500,
425
+ * "billing_amount_decimal": "15.00",
426
+ * "billing_currency": "EUR",
427
+ * "note": "Welcome bonus",
428
+ * "booking_date": "2025-06-15"
429
+ * }
430
+ */
431
+ BonusEvent | /**
432
+ * Correction event (Korrekturbuchung).
433
+ * Represents an adjustment to a previous billing entry,
434
+ * such as correcting an overcharge or undercharge.
435
+ * Can be either debit or credit depending on the correction.
436
+ *
437
+ * example:
438
+ * {
439
+ * "type": "correction",
440
+ * "direction": "credit",
441
+ * "billing_amount": 200,
442
+ * "billing_amount_decimal": "2.00",
443
+ * "billing_currency": "EUR",
444
+ * "note": "Corrected previous overcharge",
445
+ * "booking_date": "2025-06-22"
446
+ * }
447
+ */
448
+ CorrectionEvent | /**
449
+ * Custom billing event (Benutzerdefinierte Buchung).
450
+ * Allows for organization-specific billing event types not covered
451
+ * by the standard types. Use a descriptive type name.
452
+ *
453
+ * example:
454
+ * {
455
+ * "type": "grid_fee_adjustment",
456
+ * "direction": "debit",
457
+ * "billing_amount": 3200,
458
+ * "billing_amount_decimal": "32.00",
459
+ * "billing_currency": "EUR",
460
+ * "note": "Netznachberechnung für Mai",
461
+ * "booking_date": "2025-06-11"
462
+ * }
463
+ */
464
+ CustomEvent;
465
+ /**
466
+ * Fields to update on an existing billing event.
467
+ */
468
+ export interface BillingEventUpdate {
469
+ /**
470
+ * Updated billing event type.
471
+ * example:
472
+ * installment
473
+ */
474
+ type?: string;
475
+ /**
476
+ * Updated accounting direction.
477
+ * example:
478
+ * debit
479
+ */
480
+ direction?: "debit" | "credit";
481
+ /**
482
+ * Updated amount in cents.
483
+ * example:
484
+ * 10000
485
+ */
486
+ billing_amount?: number;
487
+ /**
488
+ * Updated decimal representation of billing_amount.
489
+ * example:
490
+ * 100.00
491
+ */
492
+ billing_amount_decimal?: string;
493
+ billing_currency?: /**
494
+ * Currency code in ISO 4217 format (Währungscode).
495
+ * Common values: EUR (Euro), CHF (Swiss Franc)
496
+ *
497
+ * example:
498
+ * EUR
499
+ */
500
+ Currency;
501
+ /**
502
+ * Updated external system identifier.
503
+ * example:
504
+ * SAP-54321
505
+ */
506
+ external_id?: string;
507
+ /**
508
+ * Updated link to the associated contract object.
509
+ */
510
+ contract?: {
511
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
512
+ };
513
+ /**
514
+ * Updated general ledger booking date.
515
+ * example:
516
+ * 2025-06-15
517
+ */
518
+ booking_date?: string; // date
519
+ /**
520
+ * Updated due date.
521
+ * example:
522
+ * 2025-06-30
523
+ */
524
+ due_date?: string; // date
525
+ /**
526
+ * Updated payment date.
527
+ * example:
528
+ * 2025-06-15T10:00:00Z
529
+ */
530
+ paid_date?: string; // date-time
531
+ /**
532
+ * Updated billing event status.
533
+ */
534
+ status?: "closed" | "open";
535
+ /**
536
+ * Updated reference to a previous event.
537
+ * example:
538
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
539
+ */
540
+ related_event?: string;
541
+ /**
542
+ * Updated link to an external resource.
543
+ */
544
+ external_link?: {
545
+ /**
546
+ * URL of the external resource
547
+ * example:
548
+ * https://billing.example.com/invoices/12345
549
+ */
550
+ href?: string; // uri
551
+ /**
552
+ * Title of the external resource
553
+ * example:
554
+ * Invoice 12345
555
+ */
556
+ title?: string;
557
+ };
558
+ /**
559
+ * Updated invoice file relations associated with the billing event.
560
+ */
561
+ attachments?: {
562
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
563
+ };
564
+ /**
565
+ * Updated public note visible to the customer.
566
+ * example:
567
+ * Teilzahlung für Abschlag Juni
568
+ */
569
+ note?: string;
570
+ /**
571
+ * Updated internal note visible to agents only.
572
+ * example:
573
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
574
+ */
575
+ internal_note?: string;
576
+ }
577
+ /**
578
+ * Bonus/credit event (Gutschrift/Bonus).
579
+ * Represents a promotional credit or bonus applied to the customer's account,
580
+ * such as welcome bonuses or loyalty rewards. This is a credit transaction.
581
+ *
582
+ * example:
583
+ * {
584
+ * "type": "bonus",
585
+ * "direction": "credit",
586
+ * "billing_amount": 1500,
587
+ * "billing_amount_decimal": "15.00",
588
+ * "billing_currency": "EUR",
589
+ * "note": "Welcome bonus",
590
+ * "booking_date": "2025-06-15"
591
+ * }
592
+ */
593
+ export interface BonusEvent {
594
+ [name: string]: any;
595
+ _id?: /**
596
+ * Unique entity identifier (UUID format)
597
+ * example:
598
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
599
+ */
600
+ EntityId;
601
+ /**
602
+ * Display title of the entity (Anzeigetitel)
603
+ * example:
604
+ * Abschlagszahlung Juli 2025
605
+ */
606
+ _title?: string;
607
+ /**
608
+ * Organization ID the entity belongs to (Organisations-ID)
609
+ * example:
610
+ * 123456
611
+ */
612
+ _org?: string;
613
+ _schema?: /**
614
+ * URL-friendly identifier for the entity schema (Schema-Slug)
615
+ * example:
616
+ * billing_event
617
+ */
618
+ EntitySlug;
619
+ /**
620
+ * Tags for categorization and filtering (Schlagwörter)
621
+ * example:
622
+ * [
623
+ * "billing",
624
+ * "energy"
625
+ * ]
626
+ */
627
+ _tags?: string[];
628
+ /**
629
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
630
+ * example:
631
+ * 2025-06-15T10:30:00Z
632
+ */
633
+ _created_at?: string; // date-time
634
+ /**
635
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
636
+ * example:
637
+ * 2025-06-15T14:45:00Z
638
+ */
639
+ _updated_at?: string; // date-time
640
+ /**
641
+ * Event type identifier
642
+ * example:
643
+ * installment
644
+ */
645
+ type: "bonus";
646
+ /**
647
+ * The accounting direction of the transaction:
648
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
649
+ * - credit (Haben): reduces the liability (e.g. payment received)
650
+ *
651
+ * Automatically inferred based on event type if not specified.
652
+ *
653
+ * example:
654
+ * debit
655
+ */
656
+ direction?: "debit" | "credit";
657
+ /**
658
+ * Betrag in Cent (net or gross depending on context)
659
+ * example:
660
+ * 10000
661
+ */
662
+ billing_amount: number;
663
+ /**
664
+ * Decimal representation of billing_amount for display or reporting
665
+ * example:
666
+ * 100.00
667
+ */
668
+ billing_amount_decimal: string;
669
+ billing_currency: /**
670
+ * Currency code in ISO 4217 format (Währungscode).
671
+ * Common values: EUR (Euro), CHF (Swiss Franc)
672
+ *
673
+ * example:
674
+ * EUR
675
+ */
676
+ Currency;
677
+ /**
678
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
679
+ * example:
680
+ * SAP-54321
681
+ */
682
+ external_id?: string;
683
+ /**
684
+ * Link to the associated Vertragskonto or contract object
685
+ */
686
+ contract: {
687
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
688
+ };
689
+ /**
690
+ * General ledger booking date (Buchungsdatum) for the billing event.
691
+ * Used to determine when the entry was accounted for in the system.
692
+ * Applies to all event types (debits and credits).
693
+ * Can be used together with due_date or paid_date
694
+ *
695
+ * example:
696
+ * 2025-06-15
697
+ */
698
+ booking_date: string; // date
699
+ /**
700
+ * Due date of the invoice or charge (Fälligkeitsdatum)
701
+ * example:
702
+ * 2025-06-30
703
+ */
704
+ due_date?: string; // date
705
+ /**
706
+ * Booking date (Zahlungseingang, Wertstellung)
707
+ * example:
708
+ * 2025-06-15T10:00:00Z
709
+ */
710
+ paid_date?: string; // date-time
711
+ /**
712
+ * Status of the billing event. Defaults to closed.
713
+ */
714
+ status?: "closed" | "open";
715
+ /**
716
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
717
+ * example:
718
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
719
+ */
720
+ related_event?: string;
721
+ /**
722
+ * Optional link to an external resource e.g. an invoice in a customer portal
723
+ */
724
+ external_link?: {
725
+ /**
726
+ * URL of the external resource
727
+ * example:
728
+ * https://billing.example.com/invoices/12345
729
+ */
730
+ href?: string; // uri
731
+ /**
732
+ * Title of the external resource
733
+ * example:
734
+ * Invoice 12345
735
+ */
736
+ title?: string;
737
+ };
738
+ /**
739
+ * Optional reference to e.g. an invoice file associated with the billing event
740
+ */
741
+ attachments?: {
742
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
743
+ };
744
+ /**
745
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
746
+ * example:
747
+ * Teilzahlung für Abschlag Juni
748
+ */
749
+ note?: string;
750
+ /**
751
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
752
+ * example:
753
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
754
+ */
755
+ internal_note?: string;
756
+ }
757
+ export interface ConfigurationHistoryContext {
758
+ base_price?: PriceContext;
759
+ working_price?: PriceContext;
760
+ }
761
+ export interface ConfigurationHistoryResponse {
762
+ history: ConfigurationHistoryRow[];
763
+ total: number;
764
+ }
765
+ export interface ConfigurationHistoryRow {
766
+ event_id: string;
767
+ org_id: string;
768
+ entity_type: "contract" | "billing_account";
769
+ entity_id: string;
770
+ change_type: "installment_amount_changed";
771
+ /**
772
+ * example:
773
+ * 1
774
+ */
775
+ schema_version: number;
776
+ effective_at?: string; // date-time
777
+ changed_at: string; // date-time
778
+ created_at: string; // date-time
779
+ source: "portal" | "epilot" | "erp" | "system" | "api" | "external" | "journey" | "automation" | "unknown";
780
+ source_label?: string;
781
+ source_system?: string;
782
+ source_reference?: string;
783
+ previous_value?: {
784
+ /**
785
+ * Amount in cents when available or derivable.
786
+ * example:
787
+ * 10050
788
+ */
789
+ amount?: number;
790
+ /**
791
+ * Decimal amount string when available or derivable.
792
+ * example:
793
+ * 100.50
794
+ */
795
+ amount_decimal?: string;
796
+ currency?: /**
797
+ * Currency code in ISO 4217 format (Währungscode).
798
+ * Common values: EUR (Euro), CHF (Swiss Franc)
799
+ *
800
+ * example:
801
+ * EUR
802
+ */
803
+ Currency;
804
+ } | null;
805
+ new_value: InstallmentAmountValue;
806
+ context?: ConfigurationHistoryContext;
807
+ }
808
+ /**
809
+ * Represents a customer contract (Vertrag) for billing purposes.
810
+ * Contracts are the parent entities for billing events and contain
811
+ * billing configuration such as installment amounts and billing cycles.
812
+ *
813
+ */
814
+ export interface Contract {
815
+ [name: string]: any;
816
+ _id?: /**
817
+ * Unique entity identifier (UUID format)
818
+ * example:
819
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
820
+ */
821
+ EntityId;
822
+ /**
823
+ * Display title of the entity (Anzeigetitel)
824
+ * example:
825
+ * Abschlagszahlung Juli 2025
826
+ */
827
+ _title?: string;
828
+ /**
829
+ * Organization ID the entity belongs to (Organisations-ID)
830
+ * example:
831
+ * 123456
832
+ */
833
+ _org?: string;
834
+ _schema?: /**
835
+ * URL-friendly identifier for the entity schema (Schema-Slug)
836
+ * example:
837
+ * billing_event
838
+ */
839
+ EntitySlug;
840
+ /**
841
+ * Tags for categorization and filtering (Schlagwörter)
842
+ * example:
843
+ * [
844
+ * "billing",
845
+ * "energy"
846
+ * ]
847
+ */
848
+ _tags?: string[];
849
+ /**
850
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
851
+ * example:
852
+ * 2025-06-15T10:30:00Z
853
+ */
854
+ _created_at?: string; // date-time
855
+ /**
856
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
857
+ * example:
858
+ * 2025-06-15T14:45:00Z
859
+ */
860
+ _updated_at?: string; // date-time
861
+ /**
862
+ * Display name of the contract (Vertragsname)
863
+ * example:
864
+ * Stromvertrag Haushalt
865
+ */
866
+ contract_name?: string;
867
+ /**
868
+ * Unique contract identifier/number (Vertragsnummer)
869
+ * example:
870
+ * STR-2025-001234
871
+ */
872
+ contract_number?: string;
873
+ /**
874
+ * Current status of the contract (Vertragsstatus):
875
+ * - draft (Entwurf): Contract is being prepared
876
+ * - in_approval_process (In Prüfung): Awaiting approval
877
+ * - approved (Genehmigt): Approved but not yet active
878
+ * - active (Aktiv): Contract is currently active
879
+ * - deactivated (Deaktiviert): Temporarily suspended
880
+ * - revoked (Widerrufen): Cancelled by customer within cooling-off period
881
+ * - terminated (Gekündigt): Contract has been terminated
882
+ * - expired (Abgelaufen): Contract term has ended
883
+ *
884
+ * example:
885
+ * active
886
+ */
887
+ status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired";
888
+ /**
889
+ * Brief description of the contract terms (Vertragsbeschreibung)
890
+ * example:
891
+ * Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie
892
+ */
893
+ description?: string;
894
+ /**
895
+ * Customer account number (Kundennummer/Vertragskonto)
896
+ * example:
897
+ * KD-67890
898
+ */
899
+ account_number?: string;
900
+ /**
901
+ * Utility branch/commodity type (Sparte):
902
+ * - power (Strom)
903
+ * - gas (Gas)
904
+ * - water (Wasser)
905
+ * - waste_water (Abwasser)
906
+ * - district_heating (Fernwärme)
907
+ *
908
+ * example:
909
+ * power
910
+ */
911
+ branch?: "power" | "gas" | "water" | "waste_water" | "district_heating";
912
+ /**
913
+ * Billing/invoice address (Rechnungsadresse)
914
+ * example:
915
+ * Musterstraße 123, 50667 Köln
916
+ */
917
+ billing_address?: string;
918
+ /**
919
+ * Delivery/supply point address (Lieferadresse/Verbrauchsstelle)
920
+ * example:
921
+ * Musterstraße 123, 50667 Köln
922
+ */
923
+ delivery_address?: string;
924
+ /**
925
+ * Additional addresses associated with the contract (Weitere Adressen)
926
+ * example:
927
+ * Postfach 456, 50668 Köln
928
+ */
929
+ additional_addresses?: string;
930
+ /**
931
+ * Date when the contract was/will be terminated (Kündigungsdatum)
932
+ * example:
933
+ * 2025-12-31
934
+ */
935
+ termination_date?: string; // date
936
+ /**
937
+ * Reason for contract termination (Kündigungsgrund)
938
+ * example:
939
+ * Kundenkündigung
940
+ */
941
+ termination_reason?: string;
942
+ /**
943
+ * Billing cycle frequency (Abrechnungszeitraum):
944
+ * - weekly (Wöchentlich)
945
+ * - monthly (Monatlich)
946
+ * - every_quarter (Vierteljährlich)
947
+ * - every_6_months (Halbjährlich)
948
+ * - yearly (Jährlich)
949
+ *
950
+ * example:
951
+ * monthly
952
+ */
953
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
954
+ /**
955
+ * Duration amount for billing period calculation (Abrechnungsdauer)
956
+ * example:
957
+ * 30
958
+ */
959
+ billing_duration_amount?: number;
960
+ /**
961
+ * Duration of automatic contract renewal (Verlängerungsdauer)
962
+ * example:
963
+ * 12
964
+ */
965
+ renewal_duration_amount?: number;
966
+ /**
967
+ * Unit for renewal duration (Verlängerungseinheit)
968
+ * example:
969
+ * months
970
+ */
971
+ renewal_duration_unit?: "weeks" | "months" | "years";
972
+ /**
973
+ * The amount of notice required for termination of the contract.
974
+ * example:
975
+ * 30
976
+ */
977
+ notice_time_amount?: number;
978
+ /**
979
+ * Unit for notice period (Kündigungsfrist-Einheit)
980
+ * example:
981
+ * months
982
+ */
983
+ notice_time_unit?: "weeks" | "months" | "years";
984
+ /**
985
+ * Contract start date (Vertragsbeginn)
986
+ * example:
987
+ * 2025-01-01
988
+ */
989
+ start_date?: string; // date
990
+ /**
991
+ * Day of the month when installments are due (Fälligkeitstag). 0 means no fixed billing day is configured.
992
+ * example:
993
+ * 15
994
+ */
995
+ billing_due_day?: number;
996
+ /**
997
+ * Fixed installment amount in cents (Abschlagsbetrag in Cent).
998
+ * Uses integer representation with 2 decimal precision.
999
+ * Example: 10050 = 100.50 EUR
1000
+ *
1001
+ * example:
1002
+ * 8500
1003
+ */
1004
+ installment_amount?: number;
1005
+ /**
1006
+ * Current contract balance in cents (Kontostand in Cent).
1007
+ * Positive value = customer owes money (Forderung).
1008
+ * Negative value = customer has credit (Guthaben).
1009
+ *
1010
+ * example:
1011
+ * 8990
1012
+ */
1013
+ balance?: number;
1014
+ balance_currency?: /**
1015
+ * Currency code in ISO 4217 format (Währungscode).
1016
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1017
+ *
1018
+ * example:
1019
+ * EUR
1020
+ */
1021
+ Currency;
1022
+ }
1023
+ /**
1024
+ * Contract entity with all required system fields populated
1025
+ */
1026
+ export interface ContractItem {
1027
+ [name: string]: any;
1028
+ _id: /**
1029
+ * Unique entity identifier (UUID format)
1030
+ * example:
1031
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
1032
+ */
1033
+ EntityId;
1034
+ /**
1035
+ * Display title of the entity (Anzeigetitel)
1036
+ * example:
1037
+ * Abschlagszahlung Juli 2025
1038
+ */
1039
+ _title: string;
1040
+ /**
1041
+ * Organization ID the entity belongs to (Organisations-ID)
1042
+ * example:
1043
+ * 123456
1044
+ */
1045
+ _org: string;
1046
+ _schema?: /**
1047
+ * URL-friendly identifier for the entity schema (Schema-Slug)
1048
+ * example:
1049
+ * billing_event
1050
+ */
1051
+ EntitySlug;
1052
+ /**
1053
+ * Tags for categorization and filtering (Schlagwörter)
1054
+ * example:
1055
+ * [
1056
+ * "billing",
1057
+ * "energy"
1058
+ * ]
1059
+ */
1060
+ _tags?: string[];
1061
+ /**
1062
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
1063
+ * example:
1064
+ * 2025-06-15T10:30:00Z
1065
+ */
1066
+ _created_at: string; // date-time
1067
+ /**
1068
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
1069
+ * example:
1070
+ * 2025-06-15T14:45:00Z
1071
+ */
1072
+ _updated_at: string; // date-time
1073
+ /**
1074
+ * Display name of the contract (Vertragsname)
1075
+ * example:
1076
+ * Stromvertrag Haushalt
1077
+ */
1078
+ contract_name?: string;
1079
+ /**
1080
+ * Unique contract identifier/number (Vertragsnummer)
1081
+ * example:
1082
+ * STR-2025-001234
1083
+ */
1084
+ contract_number?: string;
1085
+ /**
1086
+ * Current status of the contract (Vertragsstatus):
1087
+ * - draft (Entwurf): Contract is being prepared
1088
+ * - in_approval_process (In Prüfung): Awaiting approval
1089
+ * - approved (Genehmigt): Approved but not yet active
1090
+ * - active (Aktiv): Contract is currently active
1091
+ * - deactivated (Deaktiviert): Temporarily suspended
1092
+ * - revoked (Widerrufen): Cancelled by customer within cooling-off period
1093
+ * - terminated (Gekündigt): Contract has been terminated
1094
+ * - expired (Abgelaufen): Contract term has ended
1095
+ *
1096
+ * example:
1097
+ * active
1098
+ */
1099
+ status?: "draft" | "in_approval_process" | "approved" | "active" | "deactivated" | "revoked" | "terminated" | "expired";
1100
+ /**
1101
+ * Brief description of the contract terms (Vertragsbeschreibung)
1102
+ * example:
1103
+ * Haushaltsstrom-Tarif mit 24 Monaten Preisgarantie
1104
+ */
1105
+ description?: string;
1106
+ /**
1107
+ * Customer account number (Kundennummer/Vertragskonto)
1108
+ * example:
1109
+ * KD-67890
1110
+ */
1111
+ account_number?: string;
1112
+ /**
1113
+ * Utility branch/commodity type (Sparte):
1114
+ * - power (Strom)
1115
+ * - gas (Gas)
1116
+ * - water (Wasser)
1117
+ * - waste_water (Abwasser)
1118
+ * - district_heating (Fernwärme)
1119
+ *
1120
+ * example:
1121
+ * power
1122
+ */
1123
+ branch?: "power" | "gas" | "water" | "waste_water" | "district_heating";
1124
+ /**
1125
+ * Billing/invoice address (Rechnungsadresse)
1126
+ * example:
1127
+ * Musterstraße 123, 50667 Köln
1128
+ */
1129
+ billing_address?: string;
1130
+ /**
1131
+ * Delivery/supply point address (Lieferadresse/Verbrauchsstelle)
1132
+ * example:
1133
+ * Musterstraße 123, 50667 Köln
1134
+ */
1135
+ delivery_address?: string;
1136
+ /**
1137
+ * Additional addresses associated with the contract (Weitere Adressen)
1138
+ * example:
1139
+ * Postfach 456, 50668 Köln
1140
+ */
1141
+ additional_addresses?: string;
1142
+ /**
1143
+ * Date when the contract was/will be terminated (Kündigungsdatum)
1144
+ * example:
1145
+ * 2025-12-31
1146
+ */
1147
+ termination_date?: string; // date
1148
+ /**
1149
+ * Reason for contract termination (Kündigungsgrund)
1150
+ * example:
1151
+ * Kundenkündigung
1152
+ */
1153
+ termination_reason?: string;
1154
+ /**
1155
+ * Billing cycle frequency (Abrechnungszeitraum):
1156
+ * - weekly (Wöchentlich)
1157
+ * - monthly (Monatlich)
1158
+ * - every_quarter (Vierteljährlich)
1159
+ * - every_6_months (Halbjährlich)
1160
+ * - yearly (Jährlich)
1161
+ *
1162
+ * example:
1163
+ * monthly
1164
+ */
1165
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
1166
+ /**
1167
+ * Duration amount for billing period calculation (Abrechnungsdauer)
1168
+ * example:
1169
+ * 30
1170
+ */
1171
+ billing_duration_amount?: number;
1172
+ /**
1173
+ * Duration of automatic contract renewal (Verlängerungsdauer)
1174
+ * example:
1175
+ * 12
1176
+ */
1177
+ renewal_duration_amount?: number;
1178
+ /**
1179
+ * Unit for renewal duration (Verlängerungseinheit)
1180
+ * example:
1181
+ * months
1182
+ */
1183
+ renewal_duration_unit?: "weeks" | "months" | "years";
1184
+ /**
1185
+ * The amount of notice required for termination of the contract.
1186
+ * example:
1187
+ * 30
1188
+ */
1189
+ notice_time_amount?: number;
1190
+ /**
1191
+ * Unit for notice period (Kündigungsfrist-Einheit)
1192
+ * example:
1193
+ * months
1194
+ */
1195
+ notice_time_unit?: "weeks" | "months" | "years";
1196
+ /**
1197
+ * Contract start date (Vertragsbeginn)
1198
+ * example:
1199
+ * 2025-01-01
1200
+ */
1201
+ start_date?: string; // date
1202
+ /**
1203
+ * Day of the month when installments are due (Fälligkeitstag). 0 means no fixed billing day is configured.
1204
+ * example:
1205
+ * 15
1206
+ */
1207
+ billing_due_day?: number;
1208
+ /**
1209
+ * Fixed installment amount in cents (Abschlagsbetrag in Cent).
1210
+ * Uses integer representation with 2 decimal precision.
1211
+ * Example: 10050 = 100.50 EUR
1212
+ *
1213
+ * example:
1214
+ * 8500
1215
+ */
1216
+ installment_amount?: number;
1217
+ /**
1218
+ * Current contract balance in cents (Kontostand in Cent).
1219
+ * Positive value = customer owes money (Forderung).
1220
+ * Negative value = customer has credit (Guthaben).
1221
+ *
1222
+ * example:
1223
+ * 8990
1224
+ */
1225
+ balance?: number;
1226
+ balance_currency?: /**
1227
+ * Currency code in ISO 4217 format (Währungscode).
1228
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1229
+ *
1230
+ * example:
1231
+ * EUR
1232
+ */
1233
+ Currency;
1234
+ }
1235
+ export interface ContractPricingInformation {
1236
+ entity_type: "contract";
1237
+ entity_id: string;
1238
+ title?: string;
1239
+ current_installment_amount?: InstallmentAmountValue;
1240
+ context?: ConfigurationHistoryContext;
1241
+ balance?: PricingInformationBalance;
1242
+ schedule?: ContractPricingSchedule;
1243
+ pending_installment_change?: boolean;
1244
+ history: ConfigurationHistoryRow[];
1245
+ }
1246
+ export interface ContractPricingSchedule {
1247
+ /**
1248
+ * Day of the month when installments are due. 0 means no fixed billing day is configured.
1249
+ */
1250
+ billing_due_day?: number;
1251
+ billing_period?: "weekly" | "monthly" | "every_quarter" | "every_6_months" | "yearly";
1252
+ installments_per_year?: number;
1253
+ inferred: boolean;
1254
+ }
1255
+ /**
1256
+ * Correction event (Korrekturbuchung).
1257
+ * Represents an adjustment to a previous billing entry,
1258
+ * such as correcting an overcharge or undercharge.
1259
+ * Can be either debit or credit depending on the correction.
1260
+ *
1261
+ * example:
1262
+ * {
1263
+ * "type": "correction",
1264
+ * "direction": "credit",
1265
+ * "billing_amount": 200,
1266
+ * "billing_amount_decimal": "2.00",
1267
+ * "billing_currency": "EUR",
1268
+ * "note": "Corrected previous overcharge",
1269
+ * "booking_date": "2025-06-22"
1270
+ * }
1271
+ */
1272
+ export interface CorrectionEvent {
1273
+ [name: string]: any;
1274
+ _id?: /**
1275
+ * Unique entity identifier (UUID format)
1276
+ * example:
1277
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
1278
+ */
1279
+ EntityId;
1280
+ /**
1281
+ * Display title of the entity (Anzeigetitel)
1282
+ * example:
1283
+ * Abschlagszahlung Juli 2025
1284
+ */
1285
+ _title?: string;
1286
+ /**
1287
+ * Organization ID the entity belongs to (Organisations-ID)
1288
+ * example:
1289
+ * 123456
1290
+ */
1291
+ _org?: string;
1292
+ _schema?: /**
1293
+ * URL-friendly identifier for the entity schema (Schema-Slug)
1294
+ * example:
1295
+ * billing_event
1296
+ */
1297
+ EntitySlug;
1298
+ /**
1299
+ * Tags for categorization and filtering (Schlagwörter)
1300
+ * example:
1301
+ * [
1302
+ * "billing",
1303
+ * "energy"
1304
+ * ]
1305
+ */
1306
+ _tags?: string[];
1307
+ /**
1308
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
1309
+ * example:
1310
+ * 2025-06-15T10:30:00Z
1311
+ */
1312
+ _created_at?: string; // date-time
1313
+ /**
1314
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
1315
+ * example:
1316
+ * 2025-06-15T14:45:00Z
1317
+ */
1318
+ _updated_at?: string; // date-time
1319
+ /**
1320
+ * Event type identifier
1321
+ * example:
1322
+ * installment
1323
+ */
1324
+ type: "correction";
1325
+ /**
1326
+ * The accounting direction of the transaction:
1327
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
1328
+ * - credit (Haben): reduces the liability (e.g. payment received)
1329
+ *
1330
+ * Automatically inferred based on event type if not specified.
1331
+ *
1332
+ * example:
1333
+ * debit
1334
+ */
1335
+ direction?: "debit" | "credit";
1336
+ /**
1337
+ * Betrag in Cent (net or gross depending on context)
1338
+ * example:
1339
+ * 10000
1340
+ */
1341
+ billing_amount: number;
1342
+ /**
1343
+ * Decimal representation of billing_amount for display or reporting
1344
+ * example:
1345
+ * 100.00
1346
+ */
1347
+ billing_amount_decimal: string;
1348
+ billing_currency: /**
1349
+ * Currency code in ISO 4217 format (Währungscode).
1350
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1351
+ *
1352
+ * example:
1353
+ * EUR
1354
+ */
1355
+ Currency;
1356
+ /**
1357
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
1358
+ * example:
1359
+ * SAP-54321
1360
+ */
1361
+ external_id?: string;
1362
+ /**
1363
+ * Link to the associated Vertragskonto or contract object
1364
+ */
1365
+ contract: {
1366
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1367
+ };
1368
+ /**
1369
+ * General ledger booking date (Buchungsdatum) for the billing event.
1370
+ * Used to determine when the entry was accounted for in the system.
1371
+ * Applies to all event types (debits and credits).
1372
+ * Can be used together with due_date or paid_date
1373
+ *
1374
+ * example:
1375
+ * 2025-06-15
1376
+ */
1377
+ booking_date: string; // date
1378
+ /**
1379
+ * Due date of the invoice or charge (Fälligkeitsdatum)
1380
+ * example:
1381
+ * 2025-06-30
1382
+ */
1383
+ due_date?: string; // date
1384
+ /**
1385
+ * Booking date (Zahlungseingang, Wertstellung)
1386
+ * example:
1387
+ * 2025-06-15T10:00:00Z
1388
+ */
1389
+ paid_date?: string; // date-time
1390
+ /**
1391
+ * Status of the billing event. Defaults to closed.
1392
+ */
1393
+ status?: "closed" | "open";
1394
+ /**
1395
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
1396
+ * example:
1397
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
1398
+ */
1399
+ related_event?: string;
1400
+ /**
1401
+ * Optional link to an external resource e.g. an invoice in a customer portal
1402
+ */
1403
+ external_link?: {
1404
+ /**
1405
+ * URL of the external resource
1406
+ * example:
1407
+ * https://billing.example.com/invoices/12345
1408
+ */
1409
+ href?: string; // uri
1410
+ /**
1411
+ * Title of the external resource
1412
+ * example:
1413
+ * Invoice 12345
1414
+ */
1415
+ title?: string;
1416
+ };
1417
+ /**
1418
+ * Optional reference to e.g. an invoice file associated with the billing event
1419
+ */
1420
+ attachments?: {
1421
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1422
+ };
1423
+ /**
1424
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
1425
+ * example:
1426
+ * Teilzahlung für Abschlag Juni
1427
+ */
1428
+ note?: string;
1429
+ /**
1430
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
1431
+ * example:
1432
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
1433
+ */
1434
+ internal_note?: string;
1435
+ }
1436
+ /**
1437
+ * Currency code in ISO 4217 format (Währungscode).
1438
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1439
+ *
1440
+ * example:
1441
+ * EUR
1442
+ */
1443
+ export type Currency = string;
1444
+ /**
1445
+ * Custom billing event (Benutzerdefinierte Buchung).
1446
+ * Allows for organization-specific billing event types not covered
1447
+ * by the standard types. Use a descriptive type name.
1448
+ *
1449
+ * example:
1450
+ * {
1451
+ * "type": "grid_fee_adjustment",
1452
+ * "direction": "debit",
1453
+ * "billing_amount": 3200,
1454
+ * "billing_amount_decimal": "32.00",
1455
+ * "billing_currency": "EUR",
1456
+ * "note": "Netznachberechnung für Mai",
1457
+ * "booking_date": "2025-06-11"
1458
+ * }
1459
+ */
1460
+ export interface CustomEvent {
1461
+ [name: string]: any;
1462
+ _id?: /**
1463
+ * Unique entity identifier (UUID format)
1464
+ * example:
1465
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
1466
+ */
1467
+ EntityId;
1468
+ /**
1469
+ * Display title of the entity (Anzeigetitel)
1470
+ * example:
1471
+ * Abschlagszahlung Juli 2025
1472
+ */
1473
+ _title?: string;
1474
+ /**
1475
+ * Organization ID the entity belongs to (Organisations-ID)
1476
+ * example:
1477
+ * 123456
1478
+ */
1479
+ _org?: string;
1480
+ _schema?: /**
1481
+ * URL-friendly identifier for the entity schema (Schema-Slug)
1482
+ * example:
1483
+ * billing_event
1484
+ */
1485
+ EntitySlug;
1486
+ /**
1487
+ * Tags for categorization and filtering (Schlagwörter)
1488
+ * example:
1489
+ * [
1490
+ * "billing",
1491
+ * "energy"
1492
+ * ]
1493
+ */
1494
+ _tags?: string[];
1495
+ /**
1496
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
1497
+ * example:
1498
+ * 2025-06-15T10:30:00Z
1499
+ */
1500
+ _created_at?: string; // date-time
1501
+ /**
1502
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
1503
+ * example:
1504
+ * 2025-06-15T14:45:00Z
1505
+ */
1506
+ _updated_at?: string; // date-time
1507
+ /**
1508
+ * Custom billing event type (Freitext).
1509
+ * Use a descriptive identifier for your custom event type.
1510
+ * Examples: grid_fee_adjustment, meter_rental, special_charge
1511
+ *
1512
+ * example:
1513
+ * installment
1514
+ */
1515
+ type: void;
1516
+ /**
1517
+ * The accounting direction of the transaction:
1518
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
1519
+ * - credit (Haben): reduces the liability (e.g. payment received)
1520
+ *
1521
+ * Automatically inferred based on event type if not specified.
1522
+ *
1523
+ * example:
1524
+ * debit
1525
+ */
1526
+ direction?: "debit" | "credit";
1527
+ /**
1528
+ * Betrag in Cent (net or gross depending on context)
1529
+ * example:
1530
+ * 10000
1531
+ */
1532
+ billing_amount: number;
1533
+ /**
1534
+ * Decimal representation of billing_amount for display or reporting
1535
+ * example:
1536
+ * 100.00
1537
+ */
1538
+ billing_amount_decimal: string;
1539
+ billing_currency: /**
1540
+ * Currency code in ISO 4217 format (Währungscode).
1541
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1542
+ *
1543
+ * example:
1544
+ * EUR
1545
+ */
1546
+ Currency;
1547
+ /**
1548
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
1549
+ * example:
1550
+ * SAP-54321
1551
+ */
1552
+ external_id?: string;
1553
+ /**
1554
+ * Link to the associated Vertragskonto or contract object
1555
+ */
1556
+ contract: {
1557
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1558
+ };
1559
+ /**
1560
+ * General ledger booking date (Buchungsdatum) for the billing event.
1561
+ * Used to determine when the entry was accounted for in the system.
1562
+ * Applies to all event types (debits and credits).
1563
+ * Can be used together with due_date or paid_date
1564
+ *
1565
+ * example:
1566
+ * 2025-06-15
1567
+ */
1568
+ booking_date: string; // date
1569
+ /**
1570
+ * Due date of the invoice or charge (Fälligkeitsdatum)
1571
+ * example:
1572
+ * 2025-06-30
1573
+ */
1574
+ due_date?: string; // date
1575
+ /**
1576
+ * Booking date (Zahlungseingang, Wertstellung)
1577
+ * example:
1578
+ * 2025-06-15T10:00:00Z
1579
+ */
1580
+ paid_date?: string; // date-time
1581
+ /**
1582
+ * Status of the billing event. Defaults to closed.
1583
+ */
1584
+ status?: "closed" | "open";
1585
+ /**
1586
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
1587
+ * example:
1588
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
1589
+ */
1590
+ related_event?: string;
1591
+ /**
1592
+ * Optional link to an external resource e.g. an invoice in a customer portal
1593
+ */
1594
+ external_link?: {
1595
+ /**
1596
+ * URL of the external resource
1597
+ * example:
1598
+ * https://billing.example.com/invoices/12345
1599
+ */
1600
+ href?: string; // uri
1601
+ /**
1602
+ * Title of the external resource
1603
+ * example:
1604
+ * Invoice 12345
1605
+ */
1606
+ title?: string;
1607
+ };
1608
+ /**
1609
+ * Optional reference to e.g. an invoice file associated with the billing event
1610
+ */
1611
+ attachments?: {
1612
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1613
+ };
1614
+ /**
1615
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
1616
+ * example:
1617
+ * Teilzahlung für Abschlag Juni
1618
+ */
1619
+ note?: string;
1620
+ /**
1621
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
1622
+ * example:
1623
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
1624
+ */
1625
+ internal_note?: string;
1626
+ }
1627
+ /**
1628
+ * Dunning fee event (Mahngebühr).
1629
+ * Represents a late payment fee charged to the customer
1630
+ * after a payment reminder has been sent. This is a debit transaction.
1631
+ *
1632
+ * example:
1633
+ * {
1634
+ * "type": "dunning_fee",
1635
+ * "direction": "debit",
1636
+ * "note": "Late fee for April invoice",
1637
+ * "status": "open",
1638
+ * "booking_date": "2025-06-10",
1639
+ * "due_date": "2025-06-10",
1640
+ * "billing_amount": 1500,
1641
+ * "billing_amount_decimal": "15.00",
1642
+ * "billing_currency": "EUR"
1643
+ * }
1644
+ */
1645
+ export interface DunningFeeEvent {
1646
+ [name: string]: any;
1647
+ _id?: /**
1648
+ * Unique entity identifier (UUID format)
1649
+ * example:
1650
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
1651
+ */
1652
+ EntityId;
1653
+ /**
1654
+ * Display title of the entity (Anzeigetitel)
1655
+ * example:
1656
+ * Abschlagszahlung Juli 2025
1657
+ */
1658
+ _title?: string;
1659
+ /**
1660
+ * Organization ID the entity belongs to (Organisations-ID)
1661
+ * example:
1662
+ * 123456
1663
+ */
1664
+ _org?: string;
1665
+ _schema?: /**
1666
+ * URL-friendly identifier for the entity schema (Schema-Slug)
1667
+ * example:
1668
+ * billing_event
1669
+ */
1670
+ EntitySlug;
1671
+ /**
1672
+ * Tags for categorization and filtering (Schlagwörter)
1673
+ * example:
1674
+ * [
1675
+ * "billing",
1676
+ * "energy"
1677
+ * ]
1678
+ */
1679
+ _tags?: string[];
1680
+ /**
1681
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
1682
+ * example:
1683
+ * 2025-06-15T10:30:00Z
1684
+ */
1685
+ _created_at?: string; // date-time
1686
+ /**
1687
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
1688
+ * example:
1689
+ * 2025-06-15T14:45:00Z
1690
+ */
1691
+ _updated_at?: string; // date-time
1692
+ /**
1693
+ * Event type identifier
1694
+ * example:
1695
+ * installment
1696
+ */
1697
+ type: "dunning_fee";
1698
+ /**
1699
+ * The accounting direction of the transaction:
1700
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
1701
+ * - credit (Haben): reduces the liability (e.g. payment received)
1702
+ *
1703
+ * Automatically inferred based on event type if not specified.
1704
+ *
1705
+ * example:
1706
+ * debit
1707
+ */
1708
+ direction?: "debit" | "credit";
1709
+ /**
1710
+ * Betrag in Cent (net or gross depending on context)
1711
+ * example:
1712
+ * 10000
1713
+ */
1714
+ billing_amount: number;
1715
+ /**
1716
+ * Decimal representation of billing_amount for display or reporting
1717
+ * example:
1718
+ * 100.00
1719
+ */
1720
+ billing_amount_decimal: string;
1721
+ billing_currency: /**
1722
+ * Currency code in ISO 4217 format (Währungscode).
1723
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1724
+ *
1725
+ * example:
1726
+ * EUR
1727
+ */
1728
+ Currency;
1729
+ /**
1730
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
1731
+ * example:
1732
+ * SAP-54321
1733
+ */
1734
+ external_id?: string;
1735
+ /**
1736
+ * Link to the associated Vertragskonto or contract object
1737
+ */
1738
+ contract: {
1739
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1740
+ };
1741
+ /**
1742
+ * General ledger booking date (Buchungsdatum) for the billing event.
1743
+ * Used to determine when the entry was accounted for in the system.
1744
+ * Applies to all event types (debits and credits).
1745
+ * Can be used together with due_date or paid_date
1746
+ *
1747
+ * example:
1748
+ * 2025-06-15
1749
+ */
1750
+ booking_date: string; // date
1751
+ /**
1752
+ * Due date of the invoice or charge (Fälligkeitsdatum)
1753
+ * example:
1754
+ * 2025-06-30
1755
+ */
1756
+ due_date?: string; // date
1757
+ /**
1758
+ * Booking date (Zahlungseingang, Wertstellung)
1759
+ * example:
1760
+ * 2025-06-15T10:00:00Z
1761
+ */
1762
+ paid_date?: string; // date-time
1763
+ /**
1764
+ * Status of the billing event. Defaults to closed.
1765
+ */
1766
+ status?: "closed" | "open";
1767
+ /**
1768
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
1769
+ * example:
1770
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
1771
+ */
1772
+ related_event?: string;
1773
+ /**
1774
+ * Optional link to an external resource e.g. an invoice in a customer portal
1775
+ */
1776
+ external_link?: {
1777
+ /**
1778
+ * URL of the external resource
1779
+ * example:
1780
+ * https://billing.example.com/invoices/12345
1781
+ */
1782
+ href?: string; // uri
1783
+ /**
1784
+ * Title of the external resource
1785
+ * example:
1786
+ * Invoice 12345
1787
+ */
1788
+ title?: string;
1789
+ };
1790
+ /**
1791
+ * Optional reference to e.g. an invoice file associated with the billing event
1792
+ */
1793
+ attachments?: {
1794
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1795
+ };
1796
+ /**
1797
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
1798
+ * example:
1799
+ * Teilzahlung für Abschlag Juni
1800
+ */
1801
+ note?: string;
1802
+ /**
1803
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
1804
+ * example:
1805
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
1806
+ */
1807
+ internal_note?: string;
1808
+ }
1809
+ export interface DynamicTariffPriceContext {
1810
+ mode?: string;
1811
+ interval?: string;
1812
+ average_price_decimal?: string;
1813
+ markup_amount_decimal?: string;
1814
+ markup_amount_net_decimal?: string;
1815
+ markup_amount_gross_decimal?: string;
1816
+ market_price_decimal?: string;
1817
+ market_price_currency?: /**
1818
+ * Currency code in ISO 4217 format (Währungscode).
1819
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1820
+ *
1821
+ * example:
1822
+ * EUR
1823
+ */
1824
+ Currency;
1825
+ market?: string;
1826
+ bidding_zone?: string;
1827
+ timestamp?: string;
1828
+ }
1829
+ /**
1830
+ * Unique entity identifier (UUID format)
1831
+ * example:
1832
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
1833
+ */
1834
+ export type EntityId = string;
1835
+ /**
1836
+ * Reference to a related entity
1837
+ */
1838
+ export interface EntityRelationItem {
1839
+ /**
1840
+ * Entity ID for the related entity (e.g., contract or order)
1841
+ * example:
1842
+ * f589786b-3024-43cd-9cb3-5a3c953f2896
1843
+ */
1844
+ entity_id?: string;
1845
+ }
1846
+ /**
1847
+ * URL-friendly identifier for the entity schema (Schema-Slug)
1848
+ * example:
1849
+ * billing_event
1850
+ */
1851
+ export type EntitySlug = string;
1852
+ /**
1853
+ * Standard error response format
1854
+ */
1855
+ export interface Error {
1856
+ /**
1857
+ * Error type or HTTP status text
1858
+ * example:
1859
+ * Bad Request
1860
+ */
1861
+ error: string;
1862
+ /**
1863
+ * Human-readable error description
1864
+ * example:
1865
+ * Invalid request parameters.
1866
+ */
1867
+ message: string;
1868
+ }
1869
+ /**
1870
+ * Final bill event (Endabrechnung/Schlussrechnung).
1871
+ * Represents the final settlement when a contract ends,
1872
+ * accounting for actual consumption vs. paid installments.
1873
+ * Can be either debit (customer owes more) or credit (customer overpaid).
1874
+ *
1875
+ * example:
1876
+ * {
1877
+ * "type": "final_bill",
1878
+ * "direction": "debit",
1879
+ * "billing_amount": 12000,
1880
+ * "billing_amount_decimal": "120.00",
1881
+ * "billing_currency": "EUR",
1882
+ * "note": "Final invoice after contract termination",
1883
+ * "booking_date": "2025-06-30"
1884
+ * }
1885
+ */
1886
+ export interface FinalBillEvent {
1887
+ [name: string]: any;
1888
+ _id?: /**
1889
+ * Unique entity identifier (UUID format)
1890
+ * example:
1891
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
1892
+ */
1893
+ EntityId;
1894
+ /**
1895
+ * Display title of the entity (Anzeigetitel)
1896
+ * example:
1897
+ * Abschlagszahlung Juli 2025
1898
+ */
1899
+ _title?: string;
1900
+ /**
1901
+ * Organization ID the entity belongs to (Organisations-ID)
1902
+ * example:
1903
+ * 123456
1904
+ */
1905
+ _org?: string;
1906
+ _schema?: /**
1907
+ * URL-friendly identifier for the entity schema (Schema-Slug)
1908
+ * example:
1909
+ * billing_event
1910
+ */
1911
+ EntitySlug;
1912
+ /**
1913
+ * Tags for categorization and filtering (Schlagwörter)
1914
+ * example:
1915
+ * [
1916
+ * "billing",
1917
+ * "energy"
1918
+ * ]
1919
+ */
1920
+ _tags?: string[];
1921
+ /**
1922
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
1923
+ * example:
1924
+ * 2025-06-15T10:30:00Z
1925
+ */
1926
+ _created_at?: string; // date-time
1927
+ /**
1928
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
1929
+ * example:
1930
+ * 2025-06-15T14:45:00Z
1931
+ */
1932
+ _updated_at?: string; // date-time
1933
+ /**
1934
+ * Event type identifier
1935
+ * example:
1936
+ * installment
1937
+ */
1938
+ type: "final_bill";
1939
+ /**
1940
+ * The accounting direction of the transaction:
1941
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
1942
+ * - credit (Haben): reduces the liability (e.g. payment received)
1943
+ *
1944
+ * Automatically inferred based on event type if not specified.
1945
+ *
1946
+ * example:
1947
+ * debit
1948
+ */
1949
+ direction?: "debit" | "credit";
1950
+ /**
1951
+ * Betrag in Cent (net or gross depending on context)
1952
+ * example:
1953
+ * 10000
1954
+ */
1955
+ billing_amount: number;
1956
+ /**
1957
+ * Decimal representation of billing_amount for display or reporting
1958
+ * example:
1959
+ * 100.00
1960
+ */
1961
+ billing_amount_decimal: string;
1962
+ billing_currency: /**
1963
+ * Currency code in ISO 4217 format (Währungscode).
1964
+ * Common values: EUR (Euro), CHF (Swiss Franc)
1965
+ *
1966
+ * example:
1967
+ * EUR
1968
+ */
1969
+ Currency;
1970
+ /**
1971
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
1972
+ * example:
1973
+ * SAP-54321
1974
+ */
1975
+ external_id?: string;
1976
+ /**
1977
+ * Link to the associated Vertragskonto or contract object
1978
+ */
1979
+ contract: {
1980
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
1981
+ };
1982
+ /**
1983
+ * General ledger booking date (Buchungsdatum) for the billing event.
1984
+ * Used to determine when the entry was accounted for in the system.
1985
+ * Applies to all event types (debits and credits).
1986
+ * Can be used together with due_date or paid_date
1987
+ *
1988
+ * example:
1989
+ * 2025-06-15
1990
+ */
1991
+ booking_date: string; // date
1992
+ /**
1993
+ * Due date of the invoice or charge (Fälligkeitsdatum)
1994
+ * example:
1995
+ * 2025-06-30
1996
+ */
1997
+ due_date?: string; // date
1998
+ /**
1999
+ * Booking date (Zahlungseingang, Wertstellung)
2000
+ * example:
2001
+ * 2025-06-15T10:00:00Z
2002
+ */
2003
+ paid_date?: string; // date-time
2004
+ /**
2005
+ * Status of the billing event. Defaults to closed.
2006
+ */
2007
+ status?: "closed" | "open";
2008
+ /**
2009
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
2010
+ * example:
2011
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
2012
+ */
2013
+ related_event?: string;
2014
+ /**
2015
+ * Optional link to an external resource e.g. an invoice in a customer portal
2016
+ */
2017
+ external_link?: {
2018
+ /**
2019
+ * URL of the external resource
2020
+ * example:
2021
+ * https://billing.example.com/invoices/12345
2022
+ */
2023
+ href?: string; // uri
2024
+ /**
2025
+ * Title of the external resource
2026
+ * example:
2027
+ * Invoice 12345
2028
+ */
2029
+ title?: string;
2030
+ };
2031
+ /**
2032
+ * Optional reference to e.g. an invoice file associated with the billing event
2033
+ */
2034
+ attachments?: {
2035
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2036
+ };
2037
+ /**
2038
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
2039
+ * example:
2040
+ * Teilzahlung für Abschlag Juni
2041
+ */
2042
+ note?: string;
2043
+ /**
2044
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
2045
+ * example:
2046
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
2047
+ */
2048
+ internal_note?: string;
2049
+ }
2050
+ export interface InstallmentAmountValue {
2051
+ /**
2052
+ * Amount in cents when available or derivable.
2053
+ * example:
2054
+ * 10050
2055
+ */
2056
+ amount?: number;
2057
+ /**
2058
+ * Decimal amount string when available or derivable.
2059
+ * example:
2060
+ * 100.50
2061
+ */
2062
+ amount_decimal?: string;
2063
+ currency?: /**
2064
+ * Currency code in ISO 4217 format (Währungscode).
2065
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2066
+ *
2067
+ * example:
2068
+ * EUR
2069
+ */
2070
+ Currency;
2071
+ }
2072
+ /**
2073
+ * Installment billing event (Abschlagszahlung).
2074
+ * Represents a scheduled partial payment that the customer owes,
2075
+ * typically billed monthly for utilities like electricity or gas.
2076
+ *
2077
+ * example:
2078
+ * {
2079
+ * "type": "installment",
2080
+ * "direction": "debit",
2081
+ * "note": "July power & gas installment payment",
2082
+ * "status": "open",
2083
+ * "booking_date": "2025-07-10",
2084
+ * "due_date": "2025-07-10",
2085
+ * "billing_amount": 5000,
2086
+ * "billing_amount_decimal": "50.00",
2087
+ * "billing_currency": "EUR"
2088
+ * }
2089
+ */
2090
+ export interface InstallmentEvent {
2091
+ [name: string]: any;
2092
+ _id?: /**
2093
+ * Unique entity identifier (UUID format)
2094
+ * example:
2095
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2096
+ */
2097
+ EntityId;
2098
+ /**
2099
+ * Display title of the entity (Anzeigetitel)
2100
+ * example:
2101
+ * Abschlagszahlung Juli 2025
2102
+ */
2103
+ _title?: string;
2104
+ /**
2105
+ * Organization ID the entity belongs to (Organisations-ID)
2106
+ * example:
2107
+ * 123456
2108
+ */
2109
+ _org?: string;
2110
+ _schema?: /**
2111
+ * URL-friendly identifier for the entity schema (Schema-Slug)
2112
+ * example:
2113
+ * billing_event
2114
+ */
2115
+ EntitySlug;
2116
+ /**
2117
+ * Tags for categorization and filtering (Schlagwörter)
2118
+ * example:
2119
+ * [
2120
+ * "billing",
2121
+ * "energy"
2122
+ * ]
2123
+ */
2124
+ _tags?: string[];
2125
+ /**
2126
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
2127
+ * example:
2128
+ * 2025-06-15T10:30:00Z
2129
+ */
2130
+ _created_at?: string; // date-time
2131
+ /**
2132
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
2133
+ * example:
2134
+ * 2025-06-15T14:45:00Z
2135
+ */
2136
+ _updated_at?: string; // date-time
2137
+ /**
2138
+ * Event type identifier
2139
+ * example:
2140
+ * installment
2141
+ */
2142
+ type: "installment";
2143
+ /**
2144
+ * The accounting direction of the transaction:
2145
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
2146
+ * - credit (Haben): reduces the liability (e.g. payment received)
2147
+ *
2148
+ * Automatically inferred based on event type if not specified.
2149
+ *
2150
+ * example:
2151
+ * debit
2152
+ */
2153
+ direction?: "debit" | "credit";
2154
+ /**
2155
+ * Betrag in Cent (net or gross depending on context)
2156
+ * example:
2157
+ * 10000
2158
+ */
2159
+ billing_amount: number;
2160
+ /**
2161
+ * Decimal representation of billing_amount for display or reporting
2162
+ * example:
2163
+ * 100.00
2164
+ */
2165
+ billing_amount_decimal: string;
2166
+ billing_currency: /**
2167
+ * Currency code in ISO 4217 format (Währungscode).
2168
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2169
+ *
2170
+ * example:
2171
+ * EUR
2172
+ */
2173
+ Currency;
2174
+ /**
2175
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
2176
+ * example:
2177
+ * SAP-54321
2178
+ */
2179
+ external_id?: string;
2180
+ /**
2181
+ * Link to the associated Vertragskonto or contract object
2182
+ */
2183
+ contract: {
2184
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2185
+ };
2186
+ /**
2187
+ * General ledger booking date (Buchungsdatum) for the billing event.
2188
+ * Used to determine when the entry was accounted for in the system.
2189
+ * Applies to all event types (debits and credits).
2190
+ * Can be used together with due_date or paid_date
2191
+ *
2192
+ * example:
2193
+ * 2025-06-15
2194
+ */
2195
+ booking_date: string; // date
2196
+ /**
2197
+ * Due date of the invoice or charge (Fälligkeitsdatum)
2198
+ * example:
2199
+ * 2025-06-30
2200
+ */
2201
+ due_date: string; // date
2202
+ /**
2203
+ * Booking date (Zahlungseingang, Wertstellung)
2204
+ * example:
2205
+ * 2025-06-15T10:00:00Z
2206
+ */
2207
+ paid_date?: string; // date-time
2208
+ /**
2209
+ * Status of the billing event. Defaults to closed.
2210
+ */
2211
+ status?: "closed" | "open";
2212
+ /**
2213
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
2214
+ * example:
2215
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
2216
+ */
2217
+ related_event?: string;
2218
+ /**
2219
+ * Optional link to an external resource e.g. an invoice in a customer portal
2220
+ */
2221
+ external_link?: {
2222
+ /**
2223
+ * URL of the external resource
2224
+ * example:
2225
+ * https://billing.example.com/invoices/12345
2226
+ */
2227
+ href?: string; // uri
2228
+ /**
2229
+ * Title of the external resource
2230
+ * example:
2231
+ * Invoice 12345
2232
+ */
2233
+ title?: string;
2234
+ };
2235
+ /**
2236
+ * Optional reference to e.g. an invoice file associated with the billing event
2237
+ */
2238
+ attachments?: {
2239
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2240
+ };
2241
+ /**
2242
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
2243
+ * example:
2244
+ * Teilzahlung für Abschlag Juni
2245
+ */
2246
+ note?: string;
2247
+ /**
2248
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
2249
+ * example:
2250
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
2251
+ */
2252
+ internal_note?: string;
2253
+ }
2254
+ /**
2255
+ * Represents a single financial transaction entry (Buchungssatz) in the billing ledger.
2256
+ * Each entry is either a debit or a credit, following double-entry accounting principles.
2257
+ * Common types include Abschlagszahlung (installment), Zahlungseingang (payment), Rückerstattung (reimbursement), etc.
2258
+ *
2259
+ * example:
2260
+ * {
2261
+ * "type": "invoice",
2262
+ * "direction": "debit",
2263
+ * "billing_amount": 8500,
2264
+ * "billing_amount_decimal": "85.00",
2265
+ * "billing_currency": "EUR",
2266
+ * "note": "Einmalige Rechnung für Zusatzleistung",
2267
+ * "booking_date": "2025-06-25",
2268
+ * "due_date": "2025-07-01"
2269
+ * }
2270
+ */
2271
+ export interface InvoiceEvent {
2272
+ [name: string]: any;
2273
+ _id?: /**
2274
+ * Unique entity identifier (UUID format)
2275
+ * example:
2276
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2277
+ */
2278
+ EntityId;
2279
+ /**
2280
+ * Display title of the entity (Anzeigetitel)
2281
+ * example:
2282
+ * Abschlagszahlung Juli 2025
2283
+ */
2284
+ _title?: string;
2285
+ /**
2286
+ * Organization ID the entity belongs to (Organisations-ID)
2287
+ * example:
2288
+ * 123456
2289
+ */
2290
+ _org?: string;
2291
+ _schema?: /**
2292
+ * URL-friendly identifier for the entity schema (Schema-Slug)
2293
+ * example:
2294
+ * billing_event
2295
+ */
2296
+ EntitySlug;
2297
+ /**
2298
+ * Tags for categorization and filtering (Schlagwörter)
2299
+ * example:
2300
+ * [
2301
+ * "billing",
2302
+ * "energy"
2303
+ * ]
2304
+ */
2305
+ _tags?: string[];
2306
+ /**
2307
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
2308
+ * example:
2309
+ * 2025-06-15T10:30:00Z
2310
+ */
2311
+ _created_at?: string; // date-time
2312
+ /**
2313
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
2314
+ * example:
2315
+ * 2025-06-15T14:45:00Z
2316
+ */
2317
+ _updated_at?: string; // date-time
2318
+ /**
2319
+ * The classification of the billing transaction.
2320
+ * This field is used to group financial events for reporting or reconciliation.
2321
+ * Common examples:
2322
+ * - installment (Abschlagszahlung)
2323
+ * - payment (Zahlungseingang)
2324
+ * - reimbursement (Rückerstattung)
2325
+ * - dunning_fee (Mahngebühr)
2326
+ * - chargeback (Lastschrift-Rückgabe)
2327
+ * - final_bill (Endabrechnung)
2328
+ * - bonus (Gutschrift)
2329
+ * - correction (Korrekturbuchung)
2330
+ *
2331
+ * example:
2332
+ * installment
2333
+ */
2334
+ type: "invoice";
2335
+ /**
2336
+ * The accounting direction of the transaction:
2337
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
2338
+ * - credit (Haben): reduces the liability (e.g. payment received)
2339
+ *
2340
+ * Automatically inferred based on event type if not specified.
2341
+ *
2342
+ * example:
2343
+ * debit
2344
+ */
2345
+ direction?: "debit" | "credit";
2346
+ /**
2347
+ * Betrag in Cent (net or gross depending on context)
2348
+ * example:
2349
+ * 10000
2350
+ */
2351
+ billing_amount: number;
2352
+ /**
2353
+ * Decimal representation of billing_amount for display or reporting
2354
+ * example:
2355
+ * 100.00
2356
+ */
2357
+ billing_amount_decimal: string;
2358
+ billing_currency: /**
2359
+ * Currency code in ISO 4217 format (Währungscode).
2360
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2361
+ *
2362
+ * example:
2363
+ * EUR
2364
+ */
2365
+ Currency;
2366
+ /**
2367
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
2368
+ * example:
2369
+ * SAP-54321
2370
+ */
2371
+ external_id?: string;
2372
+ /**
2373
+ * Link to the associated Vertragskonto or contract object
2374
+ */
2375
+ contract: {
2376
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2377
+ };
2378
+ /**
2379
+ * General ledger booking date (Buchungsdatum) for the billing event.
2380
+ * Used to determine when the entry was accounted for in the system.
2381
+ * Applies to all event types (debits and credits).
2382
+ * Can be used together with due_date or paid_date
2383
+ *
2384
+ * example:
2385
+ * 2025-06-15
2386
+ */
2387
+ booking_date: string; // date
2388
+ /**
2389
+ * Due date of the invoice or charge (Fälligkeitsdatum)
2390
+ * example:
2391
+ * 2025-06-30
2392
+ */
2393
+ due_date: string; // date
2394
+ /**
2395
+ * Booking date (Zahlungseingang, Wertstellung)
2396
+ * example:
2397
+ * 2025-06-15T10:00:00Z
2398
+ */
2399
+ paid_date?: string; // date-time
2400
+ /**
2401
+ * Status of the billing event. Defaults to closed.
2402
+ */
2403
+ status?: "closed" | "open";
2404
+ /**
2405
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
2406
+ * example:
2407
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
2408
+ */
2409
+ related_event?: string;
2410
+ /**
2411
+ * Optional link to an external resource e.g. an invoice in a customer portal
2412
+ */
2413
+ external_link?: {
2414
+ /**
2415
+ * URL of the external resource
2416
+ * example:
2417
+ * https://billing.example.com/invoices/12345
2418
+ */
2419
+ href?: string; // uri
2420
+ /**
2421
+ * Title of the external resource
2422
+ * example:
2423
+ * Invoice 12345
2424
+ */
2425
+ title?: string;
2426
+ };
2427
+ /**
2428
+ * Optional reference to e.g. an invoice file associated with the billing event
2429
+ */
2430
+ attachments?: {
2431
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2432
+ };
2433
+ /**
2434
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
2435
+ * example:
2436
+ * Teilzahlung für Abschlag Juni
2437
+ */
2438
+ note?: string;
2439
+ /**
2440
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
2441
+ * example:
2442
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
2443
+ */
2444
+ internal_note?: string;
2445
+ }
2446
+ /**
2447
+ * Payment received event (Zahlungseingang).
2448
+ * Represents money received from the customer, reducing their balance.
2449
+ * This is a credit transaction.
2450
+ *
2451
+ * example:
2452
+ * {
2453
+ * "type": "payment",
2454
+ * "direction": "credit",
2455
+ * "note": "Payment reference 001234567",
2456
+ * "status": "closed",
2457
+ * "booking_date": "2025-06-15",
2458
+ * "due_date": "2025-06-15",
2459
+ * "paid_date": "2025-06-09T10:00:00Z",
2460
+ * "billing_amount": 5000,
2461
+ * "billing_amount_decimal": "50.00",
2462
+ * "billing_currency": "EUR"
2463
+ * }
2464
+ */
2465
+ export interface PaymentEvent {
2466
+ [name: string]: any;
2467
+ _id?: /**
2468
+ * Unique entity identifier (UUID format)
2469
+ * example:
2470
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2471
+ */
2472
+ EntityId;
2473
+ /**
2474
+ * Display title of the entity (Anzeigetitel)
2475
+ * example:
2476
+ * Abschlagszahlung Juli 2025
2477
+ */
2478
+ _title?: string;
2479
+ /**
2480
+ * Organization ID the entity belongs to (Organisations-ID)
2481
+ * example:
2482
+ * 123456
2483
+ */
2484
+ _org?: string;
2485
+ _schema?: /**
2486
+ * URL-friendly identifier for the entity schema (Schema-Slug)
2487
+ * example:
2488
+ * billing_event
2489
+ */
2490
+ EntitySlug;
2491
+ /**
2492
+ * Tags for categorization and filtering (Schlagwörter)
2493
+ * example:
2494
+ * [
2495
+ * "billing",
2496
+ * "energy"
2497
+ * ]
2498
+ */
2499
+ _tags?: string[];
2500
+ /**
2501
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
2502
+ * example:
2503
+ * 2025-06-15T10:30:00Z
2504
+ */
2505
+ _created_at?: string; // date-time
2506
+ /**
2507
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
2508
+ * example:
2509
+ * 2025-06-15T14:45:00Z
2510
+ */
2511
+ _updated_at?: string; // date-time
2512
+ /**
2513
+ * Event type identifier
2514
+ * example:
2515
+ * installment
2516
+ */
2517
+ type: "payment";
2518
+ /**
2519
+ * The accounting direction of the transaction:
2520
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
2521
+ * - credit (Haben): reduces the liability (e.g. payment received)
2522
+ *
2523
+ * Automatically inferred based on event type if not specified.
2524
+ *
2525
+ * example:
2526
+ * debit
2527
+ */
2528
+ direction?: "debit" | "credit";
2529
+ /**
2530
+ * Betrag in Cent (net or gross depending on context)
2531
+ * example:
2532
+ * 10000
2533
+ */
2534
+ billing_amount: number;
2535
+ /**
2536
+ * Decimal representation of billing_amount for display or reporting
2537
+ * example:
2538
+ * 100.00
2539
+ */
2540
+ billing_amount_decimal: string;
2541
+ billing_currency: /**
2542
+ * Currency code in ISO 4217 format (Währungscode).
2543
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2544
+ *
2545
+ * example:
2546
+ * EUR
2547
+ */
2548
+ Currency;
2549
+ /**
2550
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
2551
+ * example:
2552
+ * SAP-54321
2553
+ */
2554
+ external_id?: string;
2555
+ /**
2556
+ * Link to the associated Vertragskonto or contract object
2557
+ */
2558
+ contract: {
2559
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2560
+ };
2561
+ /**
2562
+ * General ledger booking date (Buchungsdatum) for the billing event.
2563
+ * Used to determine when the entry was accounted for in the system.
2564
+ * Applies to all event types (debits and credits).
2565
+ * Can be used together with due_date or paid_date
2566
+ *
2567
+ * example:
2568
+ * 2025-06-15
2569
+ */
2570
+ booking_date: string; // date
2571
+ /**
2572
+ * Due date of the invoice or charge (Fälligkeitsdatum)
2573
+ * example:
2574
+ * 2025-06-30
2575
+ */
2576
+ due_date?: string; // date
2577
+ /**
2578
+ * Booking date (Zahlungseingang, Wertstellung)
2579
+ * example:
2580
+ * 2025-06-15T10:00:00Z
2581
+ */
2582
+ paid_date?: string; // date-time
2583
+ /**
2584
+ * Status of the billing event. Defaults to closed.
2585
+ */
2586
+ status?: "closed" | "open";
2587
+ /**
2588
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
2589
+ * example:
2590
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
2591
+ */
2592
+ related_event?: string;
2593
+ /**
2594
+ * Optional link to an external resource e.g. an invoice in a customer portal
2595
+ */
2596
+ external_link?: {
2597
+ /**
2598
+ * URL of the external resource
2599
+ * example:
2600
+ * https://billing.example.com/invoices/12345
2601
+ */
2602
+ href?: string; // uri
2603
+ /**
2604
+ * Title of the external resource
2605
+ * example:
2606
+ * Invoice 12345
2607
+ */
2608
+ title?: string;
2609
+ };
2610
+ /**
2611
+ * Optional reference to e.g. an invoice file associated with the billing event
2612
+ */
2613
+ attachments?: {
2614
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2615
+ };
2616
+ /**
2617
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
2618
+ * example:
2619
+ * Teilzahlung für Abschlag Juni
2620
+ */
2621
+ note?: string;
2622
+ /**
2623
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
2624
+ * example:
2625
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
2626
+ */
2627
+ internal_note?: string;
2628
+ }
2629
+ export interface PriceContext {
2630
+ price_id?: string;
2631
+ price_title?: string;
2632
+ pricing_model?: string;
2633
+ unit_amount_gross_decimal?: string;
2634
+ unit_amount_net_decimal?: string;
2635
+ before_discount_unit_amount_gross_decimal?: string;
2636
+ before_discount_unit_amount_net_decimal?: string;
2637
+ unit_discount_amount_decimal?: string;
2638
+ unit_discount_amount_net_decimal?: string;
2639
+ currency?: /**
2640
+ * Currency code in ISO 4217 format (Währungscode).
2641
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2642
+ *
2643
+ * example:
2644
+ * EUR
2645
+ */
2646
+ Currency;
2647
+ billing_period?: string;
2648
+ unit?: string;
2649
+ has_discount?: boolean;
2650
+ is_dynamic_tariff?: boolean;
2651
+ dynamic_tariff?: DynamicTariffPriceContext;
2652
+ }
2653
+ export interface PricingInformationBalance {
2654
+ /**
2655
+ * example:
2656
+ * 8990
2657
+ */
2658
+ amount?: number;
2659
+ /**
2660
+ * example:
2661
+ * 89.90
2662
+ */
2663
+ amount_decimal?: string;
2664
+ currency?: /**
2665
+ * Currency code in ISO 4217 format (Währungscode).
2666
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2667
+ *
2668
+ * example:
2669
+ * EUR
2670
+ */
2671
+ Currency;
2672
+ }
2673
+ /**
2674
+ * Reimbursement event (Rückerstattung).
2675
+ * Represents a refund to the customer, typically after overpayment
2676
+ * or billing correction. This is a credit transaction.
2677
+ *
2678
+ * example:
2679
+ * {
2680
+ * "type": "reimbursement",
2681
+ * "direction": "credit",
2682
+ * "billing_amount": 10000,
2683
+ * "billing_amount_decimal": "100.00",
2684
+ * "billing_currency": "EUR",
2685
+ * "note": "Refund due to meter correction",
2686
+ * "booking_date": "2025-06-16",
2687
+ * "paid_date": "2025-06-18T14:00:00Z"
2688
+ * }
2689
+ */
2690
+ export interface ReimbursementEvent {
2691
+ [name: string]: any;
2692
+ _id?: /**
2693
+ * Unique entity identifier (UUID format)
2694
+ * example:
2695
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2696
+ */
2697
+ EntityId;
2698
+ /**
2699
+ * Display title of the entity (Anzeigetitel)
2700
+ * example:
2701
+ * Abschlagszahlung Juli 2025
2702
+ */
2703
+ _title?: string;
2704
+ /**
2705
+ * Organization ID the entity belongs to (Organisations-ID)
2706
+ * example:
2707
+ * 123456
2708
+ */
2709
+ _org?: string;
2710
+ _schema?: /**
2711
+ * URL-friendly identifier for the entity schema (Schema-Slug)
2712
+ * example:
2713
+ * billing_event
2714
+ */
2715
+ EntitySlug;
2716
+ /**
2717
+ * Tags for categorization and filtering (Schlagwörter)
2718
+ * example:
2719
+ * [
2720
+ * "billing",
2721
+ * "energy"
2722
+ * ]
2723
+ */
2724
+ _tags?: string[];
2725
+ /**
2726
+ * Timestamp when the entity was created (Erstellungszeitpunkt)
2727
+ * example:
2728
+ * 2025-06-15T10:30:00Z
2729
+ */
2730
+ _created_at?: string; // date-time
2731
+ /**
2732
+ * Timestamp when the entity was last updated (Aktualisierungszeitpunkt)
2733
+ * example:
2734
+ * 2025-06-15T14:45:00Z
2735
+ */
2736
+ _updated_at?: string; // date-time
2737
+ /**
2738
+ * Event type identifier
2739
+ * example:
2740
+ * installment
2741
+ */
2742
+ type: "reimbursement";
2743
+ /**
2744
+ * The accounting direction of the transaction:
2745
+ * - debit (Soll): increases the customer’s liability (e.g. invoice issued)
2746
+ * - credit (Haben): reduces the liability (e.g. payment received)
2747
+ *
2748
+ * Automatically inferred based on event type if not specified.
2749
+ *
2750
+ * example:
2751
+ * debit
2752
+ */
2753
+ direction?: "debit" | "credit";
2754
+ /**
2755
+ * Betrag in Cent (net or gross depending on context)
2756
+ * example:
2757
+ * 10000
2758
+ */
2759
+ billing_amount: number;
2760
+ /**
2761
+ * Decimal representation of billing_amount for display or reporting
2762
+ * example:
2763
+ * 100.00
2764
+ */
2765
+ billing_amount_decimal: string;
2766
+ billing_currency: /**
2767
+ * Currency code in ISO 4217 format (Währungscode).
2768
+ * Common values: EUR (Euro), CHF (Swiss Franc)
2769
+ *
2770
+ * example:
2771
+ * EUR
2772
+ */
2773
+ Currency;
2774
+ /**
2775
+ * External system identifier (e.g. SAP FI/CA document number, Zahlungsavis ID)
2776
+ * example:
2777
+ * SAP-54321
2778
+ */
2779
+ external_id?: string;
2780
+ /**
2781
+ * Link to the associated Vertragskonto or contract object
2782
+ */
2783
+ contract: {
2784
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2785
+ };
2786
+ /**
2787
+ * General ledger booking date (Buchungsdatum) for the billing event.
2788
+ * Used to determine when the entry was accounted for in the system.
2789
+ * Applies to all event types (debits and credits).
2790
+ * Can be used together with due_date or paid_date
2791
+ *
2792
+ * example:
2793
+ * 2025-06-15
2794
+ */
2795
+ booking_date: string; // date
2796
+ /**
2797
+ * Due date of the invoice or charge (Fälligkeitsdatum)
2798
+ * example:
2799
+ * 2025-06-30
2800
+ */
2801
+ due_date?: string; // date
2802
+ /**
2803
+ * Booking date (Zahlungseingang, Wertstellung)
2804
+ * example:
2805
+ * 2025-06-15T10:00:00Z
2806
+ */
2807
+ paid_date?: string; // date-time
2808
+ /**
2809
+ * Status of the billing event. Defaults to closed.
2810
+ */
2811
+ status?: "closed" | "open";
2812
+ /**
2813
+ * Optional reference to a previous event e.g. a chargeback or a correction to a previous installment
2814
+ * example:
2815
+ * d4fb2a4e-3f74-4fc4-8fba-6fdaaaa3b08e
2816
+ */
2817
+ related_event?: string;
2818
+ /**
2819
+ * Optional link to an external resource e.g. an invoice in a customer portal
2820
+ */
2821
+ external_link?: {
2822
+ /**
2823
+ * URL of the external resource
2824
+ * example:
2825
+ * https://billing.example.com/invoices/12345
2826
+ */
2827
+ href?: string; // uri
2828
+ /**
2829
+ * Title of the external resource
2830
+ * example:
2831
+ * Invoice 12345
2832
+ */
2833
+ title?: string;
2834
+ };
2835
+ /**
2836
+ * Optional reference to e.g. an invoice file associated with the billing event
2837
+ */
2838
+ attachments?: {
2839
+ $relation?: /* Reference to a related entity */ EntityRelationItem[];
2840
+ };
2841
+ /**
2842
+ * Öffentliche Notiz sichtbar für den Kunden, z.B. auf der Rechnung oder im Kundenportal
2843
+ * example:
2844
+ * Teilzahlung für Abschlag Juni
2845
+ */
2846
+ note?: string;
2847
+ /**
2848
+ * Interne Notiz, nur sichtbar für Sachbearbeiter (nicht für Kunden sichtbar)
2849
+ * example:
2850
+ * Rückmeldung von SAP: Betrag aus Zahlungsavis 2025-06-14 übernommen
2851
+ */
2852
+ internal_note?: string;
2853
+ }
2854
+ }
2855
+ }
2856
+ declare namespace Paths {
2857
+ namespace CreateBillingEvent {
2858
+ export type RequestBody = /**
2859
+ * Collection of supported billing event types (Buchungsarten).
2860
+ * Each type represents a different kind of financial transaction
2861
+ * that affects the customer's balance.
2862
+ *
2863
+ */
2864
+ Components.Schemas.BillingEvent;
2865
+ namespace Responses {
2866
+ export type $201 = /**
2867
+ * Collection of supported billing event types (Buchungsarten).
2868
+ * Each type represents a different kind of financial transaction
2869
+ * that affects the customer's balance.
2870
+ *
2871
+ */
2872
+ Components.Schemas.BillingEvent;
2873
+ export type $400 = Components.Responses.BadRequest;
2874
+ export type $401 = Components.Responses.Unauthorized;
2875
+ export type $403 = Components.Responses.Forbidden;
2876
+ export type $422 = Components.Responses.UnprocessableEntity;
2877
+ export type $500 = Components.Responses.InternalServerError;
2878
+ }
2879
+ }
2880
+ namespace CreateContractEntity {
2881
+ export type RequestBody = /**
2882
+ * Represents a customer contract (Vertrag) for billing purposes.
2883
+ * Contracts are the parent entities for billing events and contain
2884
+ * billing configuration such as installment amounts and billing cycles.
2885
+ *
2886
+ */
2887
+ Components.Schemas.Contract;
2888
+ namespace Responses {
2889
+ export type $201 = /* Contract entity with all required system fields populated */ Components.Schemas.ContractItem;
2890
+ export type $400 = Components.Responses.BadRequest;
2891
+ export type $401 = Components.Responses.Unauthorized;
2892
+ export type $403 = Components.Responses.Forbidden;
2893
+ export type $422 = Components.Responses.UnprocessableEntity;
2894
+ export type $500 = Components.Responses.InternalServerError;
2895
+ }
2896
+ }
2897
+ namespace DeleteBillingEvent {
2898
+ namespace Parameters {
2899
+ /**
2900
+ * example:
2901
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2902
+ */
2903
+ export type Id = string;
2904
+ }
2905
+ export interface PathParameters {
2906
+ id: /**
2907
+ * example:
2908
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2909
+ */
2910
+ Parameters.Id;
2911
+ }
2912
+ namespace Responses {
2913
+ export interface $204 {
2914
+ }
2915
+ export type $401 = Components.Responses.Unauthorized;
2916
+ export type $403 = Components.Responses.Forbidden;
2917
+ export type $404 = Components.Responses.NotFound;
2918
+ export type $500 = Components.Responses.InternalServerError;
2919
+ }
2920
+ }
2921
+ namespace DeleteContractEntity {
2922
+ namespace Parameters {
2923
+ /**
2924
+ * example:
2925
+ * f589786b-3024-43cd-9cb3-5a3c953f2896
2926
+ */
2927
+ export type Id = string;
2928
+ }
2929
+ export interface PathParameters {
2930
+ id: /**
2931
+ * example:
2932
+ * f589786b-3024-43cd-9cb3-5a3c953f2896
2933
+ */
2934
+ Parameters.Id;
2935
+ }
2936
+ namespace Responses {
2937
+ export interface $204 {
2938
+ }
2939
+ export type $401 = Components.Responses.Unauthorized;
2940
+ export type $403 = Components.Responses.Forbidden;
2941
+ export type $404 = Components.Responses.NotFound;
2942
+ export type $500 = Components.Responses.InternalServerError;
2943
+ }
2944
+ }
2945
+ namespace GetBillingAccountConfigurationHistory {
2946
+ namespace Parameters {
2947
+ export type ChangeType = "installment_amount_changed";
2948
+ export type From = number;
2949
+ export type Id = string;
2950
+ export type Size = number;
2951
+ }
2952
+ export interface PathParameters {
2953
+ id: Parameters.Id;
2954
+ }
2955
+ export interface QueryParameters {
2956
+ change_type?: Parameters.ChangeType;
2957
+ from?: Parameters.From;
2958
+ size?: Parameters.Size;
2959
+ }
2960
+ namespace Responses {
2961
+ export type $200 = Components.Schemas.ConfigurationHistoryResponse;
2962
+ }
2963
+ }
2964
+ namespace GetBillingAccountPricingInformation {
2965
+ namespace Parameters {
2966
+ export type Id = string;
2967
+ }
2968
+ export interface PathParameters {
2969
+ id: Parameters.Id;
2970
+ }
2971
+ namespace Responses {
2972
+ export type $200 = Components.Schemas.BillingAccountPricingInformation;
2973
+ }
2974
+ }
2975
+ namespace GetBillingEvent {
2976
+ namespace Parameters {
2977
+ /**
2978
+ * example:
2979
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2980
+ */
2981
+ export type Id = string;
2982
+ }
2983
+ export interface PathParameters {
2984
+ id: /**
2985
+ * example:
2986
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
2987
+ */
2988
+ Parameters.Id;
2989
+ }
2990
+ namespace Responses {
2991
+ export type $200 = /**
2992
+ * Collection of supported billing event types (Buchungsarten).
2993
+ * Each type represents a different kind of financial transaction
2994
+ * that affects the customer's balance.
2995
+ *
2996
+ */
2997
+ Components.Schemas.BillingEvent;
2998
+ export type $401 = Components.Responses.Unauthorized;
2999
+ export type $403 = Components.Responses.Forbidden;
3000
+ export type $404 = Components.Responses.NotFound;
3001
+ export type $500 = Components.Responses.InternalServerError;
3002
+ }
3003
+ }
3004
+ namespace GetBillingEventByExternalId {
3005
+ namespace Parameters {
3006
+ /**
3007
+ * example:
3008
+ * SAP-54321
3009
+ */
3010
+ export type ExternalId = string;
3011
+ }
3012
+ export interface PathParameters {
3013
+ external_id: /**
3014
+ * example:
3015
+ * SAP-54321
3016
+ */
3017
+ Parameters.ExternalId;
3018
+ }
3019
+ namespace Responses {
3020
+ export type $200 = /**
3021
+ * Collection of supported billing event types (Buchungsarten).
3022
+ * Each type represents a different kind of financial transaction
3023
+ * that affects the customer's balance.
3024
+ *
3025
+ */
3026
+ Components.Schemas.BillingEvent;
3027
+ export type $401 = Components.Responses.Unauthorized;
3028
+ export type $403 = Components.Responses.Forbidden;
3029
+ export type $404 = Components.Responses.NotFound;
3030
+ export type $500 = Components.Responses.InternalServerError;
3031
+ }
3032
+ }
3033
+ namespace GetBillingEvents {
3034
+ namespace Parameters {
3035
+ /**
3036
+ * example:
3037
+ * 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e
3038
+ */
3039
+ export type ContactId = string;
3040
+ /**
3041
+ * example:
3042
+ * 2025-01-01T00:00:00Z
3043
+ */
3044
+ export type DateAfter = string; // date-time
3045
+ /**
3046
+ * example:
3047
+ * 2025-12-31T23:59:59Z
3048
+ */
3049
+ export type DateBefore = string; // date-time
3050
+ export type EntityId = string[];
3051
+ /**
3052
+ * example:
3053
+ * installment
3054
+ */
3055
+ export type EventType = "installment" | "reimbursement";
3056
+ /**
3057
+ * example:
3058
+ * 0
3059
+ */
3060
+ export type From = number;
3061
+ /**
3062
+ * example:
3063
+ * 100
3064
+ */
3065
+ export type Size = number;
3066
+ }
3067
+ export interface QueryParameters {
3068
+ from?: /**
3069
+ * example:
3070
+ * 0
3071
+ */
3072
+ Parameters.From;
3073
+ size?: /**
3074
+ * example:
3075
+ * 100
3076
+ */
3077
+ Parameters.Size;
3078
+ entity_id?: Parameters.EntityId;
3079
+ contact_id?: /**
3080
+ * example:
3081
+ * 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e
3082
+ */
3083
+ Parameters.ContactId;
3084
+ event_type?: /**
3085
+ * example:
3086
+ * installment
3087
+ */
3088
+ Parameters.EventType;
3089
+ date_after?: /**
3090
+ * example:
3091
+ * 2025-01-01T00:00:00Z
3092
+ */
3093
+ Parameters.DateAfter /* date-time */;
3094
+ date_before?: /**
3095
+ * example:
3096
+ * 2025-12-31T23:59:59Z
3097
+ */
3098
+ Parameters.DateBefore /* date-time */;
3099
+ }
3100
+ namespace Responses {
3101
+ export interface $200 {
3102
+ /**
3103
+ * Total number of billing events matching the query
3104
+ * example:
3105
+ * 42
3106
+ */
3107
+ hits?: number;
3108
+ /**
3109
+ * List of billing events for the current page
3110
+ */
3111
+ results?: /**
3112
+ * Collection of supported billing event types (Buchungsarten).
3113
+ * Each type represents a different kind of financial transaction
3114
+ * that affects the customer's balance.
3115
+ *
3116
+ */
3117
+ Components.Schemas.BillingEvent[];
3118
+ }
3119
+ export type $400 = Components.Responses.BadRequest;
3120
+ export type $401 = Components.Responses.Unauthorized;
3121
+ export type $403 = Components.Responses.Forbidden;
3122
+ export type $500 = Components.Responses.InternalServerError;
3123
+ }
3124
+ }
3125
+ namespace GetContractConfigurationHistory {
3126
+ namespace Parameters {
3127
+ export type ChangeType = "installment_amount_changed";
3128
+ export type From = number;
3129
+ export type Id = string;
3130
+ export type Size = number;
3131
+ }
3132
+ export interface PathParameters {
3133
+ id: Parameters.Id;
3134
+ }
3135
+ export interface QueryParameters {
3136
+ change_type?: Parameters.ChangeType;
3137
+ from?: Parameters.From;
3138
+ size?: Parameters.Size;
3139
+ }
3140
+ namespace Responses {
3141
+ export type $200 = Components.Schemas.ConfigurationHistoryResponse;
3142
+ }
3143
+ }
3144
+ namespace GetContractPricingInformation {
3145
+ namespace Parameters {
3146
+ export type Id = string;
3147
+ }
3148
+ export interface PathParameters {
3149
+ id: Parameters.Id;
3150
+ }
3151
+ namespace Responses {
3152
+ export type $200 = Components.Schemas.ContractPricingInformation;
3153
+ }
3154
+ }
3155
+ namespace GetCustomerBalance {
3156
+ namespace Parameters {
3157
+ /**
3158
+ * example:
3159
+ * 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e
3160
+ */
3161
+ export type Id = string;
3162
+ }
3163
+ export interface PathParameters {
3164
+ id: /**
3165
+ * example:
3166
+ * 1e3f0d58-69d2-4dbb-9a43-3ee63d862e8e
3167
+ */
3168
+ Parameters.Id;
3169
+ }
3170
+ namespace Responses {
3171
+ export type $200 = /**
3172
+ * Customer balance summary (Kontostandübersicht).
3173
+ * Represents the aggregated balance across all contracts and orders for a customer.
3174
+ *
3175
+ */
3176
+ Components.Schemas.Balance;
3177
+ export type $401 = Components.Responses.Unauthorized;
3178
+ export type $403 = Components.Responses.Forbidden;
3179
+ export type $404 = Components.Responses.NotFound;
3180
+ export type $500 = Components.Responses.InternalServerError;
3181
+ }
3182
+ }
3183
+ namespace UpdateBillingEvent {
3184
+ namespace Parameters {
3185
+ /**
3186
+ * example:
3187
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
3188
+ */
3189
+ export type Id = string;
3190
+ }
3191
+ export interface PathParameters {
3192
+ id: /**
3193
+ * example:
3194
+ * 5da0a718-c822-403d-9f5d-20d4584e0528
3195
+ */
3196
+ Parameters.Id;
3197
+ }
3198
+ export type RequestBody = /* Fields to update on an existing billing event. */ Components.Schemas.BillingEventUpdate;
3199
+ namespace Responses {
3200
+ export type $200 = /**
3201
+ * Collection of supported billing event types (Buchungsarten).
3202
+ * Each type represents a different kind of financial transaction
3203
+ * that affects the customer's balance.
3204
+ *
3205
+ */
3206
+ Components.Schemas.BillingEvent;
3207
+ export type $400 = Components.Responses.BadRequest;
3208
+ export type $401 = Components.Responses.Unauthorized;
3209
+ export type $403 = Components.Responses.Forbidden;
3210
+ export type $404 = Components.Responses.NotFound;
3211
+ export type $422 = Components.Responses.UnprocessableEntity;
3212
+ export type $500 = Components.Responses.InternalServerError;
3213
+ }
3214
+ }
3215
+ namespace UpdateContractEntity {
3216
+ namespace Parameters {
3217
+ /**
3218
+ * example:
3219
+ * f589786b-3024-43cd-9cb3-5a3c953f2896
3220
+ */
3221
+ export type Id = string;
3222
+ }
3223
+ export interface PathParameters {
3224
+ id: /**
3225
+ * example:
3226
+ * f589786b-3024-43cd-9cb3-5a3c953f2896
3227
+ */
3228
+ Parameters.Id;
3229
+ }
3230
+ export type RequestBody = /**
3231
+ * Represents a customer contract (Vertrag) for billing purposes.
3232
+ * Contracts are the parent entities for billing events and contain
3233
+ * billing configuration such as installment amounts and billing cycles.
3234
+ *
3235
+ */
3236
+ Components.Schemas.Contract;
3237
+ namespace Responses {
3238
+ export type $200 = /* Contract entity with all required system fields populated */ Components.Schemas.ContractItem;
3239
+ export type $400 = Components.Responses.BadRequest;
3240
+ export type $401 = Components.Responses.Unauthorized;
3241
+ export type $403 = Components.Responses.Forbidden;
3242
+ export type $404 = Components.Responses.NotFound;
3243
+ export type $422 = Components.Responses.UnprocessableEntity;
3244
+ export type $500 = Components.Responses.InternalServerError;
3245
+ }
3246
+ }
3247
+ }
3248
+
3249
+
3250
+ interface OperationMethods {
3251
+ /**
3252
+ * getBillingEvents - getBillingEvents
3253
+ *
3254
+ * Retrieve and filter billing events (Buchungssätze) such as installments (Abschlagszahlungen),
3255
+ * payments (Zahlungseingänge), and reimbursements (Rückerstattungen).
3256
+ *
3257
+ * Results are paginated and can be filtered by entity, contact, event type, or date range.
3258
+ *
3259
+ */
3260
+ 'getBillingEvents'(
3261
+ parameters?: Parameters<Paths.GetBillingEvents.QueryParameters> | null,
3262
+ data?: any,
3263
+ config?: AxiosRequestConfig
3264
+ ): OperationResponse<Paths.GetBillingEvents.Responses.$200>
3265
+ /**
3266
+ * createBillingEvent - createBillingEvent
3267
+ *
3268
+ * Create a new billing event (Buchungssatz) such as an installment (Abschlagszahlung),
3269
+ * payment (Zahlungseingang), or reimbursement (Rückerstattung).
3270
+ *
3271
+ * The billing event will be linked to a contract and will affect the customer's balance.
3272
+ *
3273
+ */
3274
+ 'createBillingEvent'(
3275
+ parameters?: Parameters<UnknownParamsObject> | null,
3276
+ data?: Paths.CreateBillingEvent.RequestBody,
3277
+ config?: AxiosRequestConfig
3278
+ ): OperationResponse<Paths.CreateBillingEvent.Responses.$201>
3279
+ /**
3280
+ * getBillingEvent - getBillingEvent
3281
+ *
3282
+ * Retrieve a single billing event (Buchungssatz) by its unique ID.
3283
+ *
3284
+ */
3285
+ 'getBillingEvent'(
3286
+ parameters?: Parameters<Paths.GetBillingEvent.PathParameters> | null,
3287
+ data?: any,
3288
+ config?: AxiosRequestConfig
3289
+ ): OperationResponse<Paths.GetBillingEvent.Responses.$200>
3290
+ /**
3291
+ * updateBillingEvent - updateBillingEvent
3292
+ *
3293
+ * Update an existing billing event (Buchungssatz).
3294
+ *
3295
+ * Only the fields provided in the request body will be updated.
3296
+ * Common use cases include updating status from "open" to "closed" after payment,
3297
+ * or correcting billing amounts.
3298
+ *
3299
+ */
3300
+ 'updateBillingEvent'(
3301
+ parameters?: Parameters<Paths.UpdateBillingEvent.PathParameters> | null,
3302
+ data?: Paths.UpdateBillingEvent.RequestBody,
3303
+ config?: AxiosRequestConfig
3304
+ ): OperationResponse<Paths.UpdateBillingEvent.Responses.$200>
3305
+ /**
3306
+ * deleteBillingEvent - deleteBillingEvent
3307
+ *
3308
+ * Delete an existing billing event (Buchungssatz).
3309
+ *
3310
+ * **Warning**: Deleting billing events affects the customer's balance calculation.
3311
+ * Consider using a correction event (Korrekturbuchung) instead for audit purposes.
3312
+ *
3313
+ */
3314
+ 'deleteBillingEvent'(
3315
+ parameters?: Parameters<Paths.DeleteBillingEvent.PathParameters> | null,
3316
+ data?: any,
3317
+ config?: AxiosRequestConfig
3318
+ ): OperationResponse<Paths.DeleteBillingEvent.Responses.$204>
3319
+ /**
3320
+ * getBillingEventByExternalId - getBillingEventByExternalId
3321
+ *
3322
+ * Retrieve a billing event (Buchungssatz) by its external system identifier.
3323
+ *
3324
+ * This endpoint is useful for integrations with external systems such as SAP FI/CA,
3325
+ * ERP systems, or payment processors that maintain their own reference IDs.
3326
+ *
3327
+ */
3328
+ 'getBillingEventByExternalId'(
3329
+ parameters?: Parameters<Paths.GetBillingEventByExternalId.PathParameters> | null,
3330
+ data?: any,
3331
+ config?: AxiosRequestConfig
3332
+ ): OperationResponse<Paths.GetBillingEventByExternalId.Responses.$200>
3333
+ /**
3334
+ * createContractEntity - createContractEntity
3335
+ *
3336
+ * Create a new contract entity (Vertrag) for billing purposes.
3337
+ *
3338
+ * Contracts serve as the parent entity for billing events and contain billing
3339
+ * settings such as installment amounts (Abschlagsbeträge), billing periods
3340
+ * (Abrechnungszeiträume), and customer addresses.
3341
+ *
3342
+ */
3343
+ 'createContractEntity'(
3344
+ parameters?: Parameters<UnknownParamsObject> | null,
3345
+ data?: Paths.CreateContractEntity.RequestBody,
3346
+ config?: AxiosRequestConfig
3347
+ ): OperationResponse<Paths.CreateContractEntity.Responses.$201>
3348
+ /**
3349
+ * updateContractEntity - updateContractEntity
3350
+ *
3351
+ * Update an existing contract entity (Vertrag).
3352
+ *
3353
+ * Only the fields provided in the request body will be updated.
3354
+ * Common use cases include updating billing settings, changing status,
3355
+ * or recording termination details.
3356
+ *
3357
+ */
3358
+ 'updateContractEntity'(
3359
+ parameters?: Parameters<Paths.UpdateContractEntity.PathParameters> | null,
3360
+ data?: Paths.UpdateContractEntity.RequestBody,
3361
+ config?: AxiosRequestConfig
3362
+ ): OperationResponse<Paths.UpdateContractEntity.Responses.$200>
3363
+ /**
3364
+ * deleteContractEntity - deleteContractEntity
3365
+ *
3366
+ * Delete an existing contract entity (Vertrag).
3367
+ *
3368
+ * **Warning**: Deleting a contract will affect all associated billing events.
3369
+ * Consider setting the contract status to "terminated" instead for audit purposes.
3370
+ *
3371
+ */
3372
+ 'deleteContractEntity'(
3373
+ parameters?: Parameters<Paths.DeleteContractEntity.PathParameters> | null,
3374
+ data?: any,
3375
+ config?: AxiosRequestConfig
3376
+ ): OperationResponse<Paths.DeleteContractEntity.Responses.$204>
3377
+ /**
3378
+ * getContractPricingInformation - getContractPricingInformation
3379
+ *
3380
+ * Get current pricing information and recent configuration history for a Contract.
3381
+ */
3382
+ 'getContractPricingInformation'(
3383
+ parameters?: Parameters<Paths.GetContractPricingInformation.PathParameters> | null,
3384
+ data?: any,
3385
+ config?: AxiosRequestConfig
3386
+ ): OperationResponse<Paths.GetContractPricingInformation.Responses.$200>
3387
+ /**
3388
+ * getBillingAccountPricingInformation - getBillingAccountPricingInformation
3389
+ *
3390
+ * Get current pricing information for the active Contracts linked to a Billing Account.
3391
+ */
3392
+ 'getBillingAccountPricingInformation'(
3393
+ parameters?: Parameters<Paths.GetBillingAccountPricingInformation.PathParameters> | null,
3394
+ data?: any,
3395
+ config?: AxiosRequestConfig
3396
+ ): OperationResponse<Paths.GetBillingAccountPricingInformation.Responses.$200>
3397
+ /**
3398
+ * getContractConfigurationHistory - getContractConfigurationHistory
3399
+ *
3400
+ * Get billing configuration history for a Contract.
3401
+ */
3402
+ 'getContractConfigurationHistory'(
3403
+ parameters?: Parameters<Paths.GetContractConfigurationHistory.QueryParameters & Paths.GetContractConfigurationHistory.PathParameters> | null,
3404
+ data?: any,
3405
+ config?: AxiosRequestConfig
3406
+ ): OperationResponse<Paths.GetContractConfigurationHistory.Responses.$200>
3407
+ /**
3408
+ * getBillingAccountConfigurationHistory - getBillingAccountConfigurationHistory
3409
+ *
3410
+ * Get merged billing configuration history for active Contracts linked to a Billing Account.
3411
+ */
3412
+ 'getBillingAccountConfigurationHistory'(
3413
+ parameters?: Parameters<Paths.GetBillingAccountConfigurationHistory.QueryParameters & Paths.GetBillingAccountConfigurationHistory.PathParameters> | null,
3414
+ data?: any,
3415
+ config?: AxiosRequestConfig
3416
+ ): OperationResponse<Paths.GetBillingAccountConfigurationHistory.Responses.$200>
3417
+ /**
3418
+ * getCustomerBalance - getCustomerBalance
3419
+ *
3420
+ * Retrieve the total balance (Kontostand) across all contracts and orders for a customer.
3421
+ *
3422
+ * The balance is calculated from the sum of all billing events (Buchungssätze) associated
3423
+ * with the customer's contracts. A positive balance indicates the customer owes money;
3424
+ * a negative balance indicates a credit (Guthaben) in the customer's favor.
3425
+ *
3426
+ */
3427
+ 'getCustomerBalance'(
3428
+ parameters?: Parameters<Paths.GetCustomerBalance.PathParameters> | null,
3429
+ data?: any,
3430
+ config?: AxiosRequestConfig
3431
+ ): OperationResponse<Paths.GetCustomerBalance.Responses.$200>
3432
+ }
3433
+
3434
+ interface PathsDictionary {
3435
+ ['/v1/billing/events']: {
3436
+ /**
3437
+ * getBillingEvents - getBillingEvents
3438
+ *
3439
+ * Retrieve and filter billing events (Buchungssätze) such as installments (Abschlagszahlungen),
3440
+ * payments (Zahlungseingänge), and reimbursements (Rückerstattungen).
3441
+ *
3442
+ * Results are paginated and can be filtered by entity, contact, event type, or date range.
3443
+ *
3444
+ */
3445
+ 'get'(
3446
+ parameters?: Parameters<Paths.GetBillingEvents.QueryParameters> | null,
3447
+ data?: any,
3448
+ config?: AxiosRequestConfig
3449
+ ): OperationResponse<Paths.GetBillingEvents.Responses.$200>
3450
+ /**
3451
+ * createBillingEvent - createBillingEvent
3452
+ *
3453
+ * Create a new billing event (Buchungssatz) such as an installment (Abschlagszahlung),
3454
+ * payment (Zahlungseingang), or reimbursement (Rückerstattung).
3455
+ *
3456
+ * The billing event will be linked to a contract and will affect the customer's balance.
3457
+ *
3458
+ */
3459
+ 'post'(
3460
+ parameters?: Parameters<UnknownParamsObject> | null,
3461
+ data?: Paths.CreateBillingEvent.RequestBody,
3462
+ config?: AxiosRequestConfig
3463
+ ): OperationResponse<Paths.CreateBillingEvent.Responses.$201>
3464
+ }
3465
+ ['/v1/billing/events/{id}']: {
3466
+ /**
3467
+ * getBillingEvent - getBillingEvent
3468
+ *
3469
+ * Retrieve a single billing event (Buchungssatz) by its unique ID.
3470
+ *
3471
+ */
3472
+ 'get'(
3473
+ parameters?: Parameters<Paths.GetBillingEvent.PathParameters> | null,
3474
+ data?: any,
3475
+ config?: AxiosRequestConfig
3476
+ ): OperationResponse<Paths.GetBillingEvent.Responses.$200>
3477
+ /**
3478
+ * updateBillingEvent - updateBillingEvent
3479
+ *
3480
+ * Update an existing billing event (Buchungssatz).
3481
+ *
3482
+ * Only the fields provided in the request body will be updated.
3483
+ * Common use cases include updating status from "open" to "closed" after payment,
3484
+ * or correcting billing amounts.
3485
+ *
3486
+ */
3487
+ 'patch'(
3488
+ parameters?: Parameters<Paths.UpdateBillingEvent.PathParameters> | null,
3489
+ data?: Paths.UpdateBillingEvent.RequestBody,
3490
+ config?: AxiosRequestConfig
3491
+ ): OperationResponse<Paths.UpdateBillingEvent.Responses.$200>
3492
+ /**
3493
+ * deleteBillingEvent - deleteBillingEvent
3494
+ *
3495
+ * Delete an existing billing event (Buchungssatz).
3496
+ *
3497
+ * **Warning**: Deleting billing events affects the customer's balance calculation.
3498
+ * Consider using a correction event (Korrekturbuchung) instead for audit purposes.
3499
+ *
3500
+ */
3501
+ 'delete'(
3502
+ parameters?: Parameters<Paths.DeleteBillingEvent.PathParameters> | null,
3503
+ data?: any,
3504
+ config?: AxiosRequestConfig
3505
+ ): OperationResponse<Paths.DeleteBillingEvent.Responses.$204>
3506
+ }
3507
+ ['/v1/billing/external/{external_id}']: {
3508
+ /**
3509
+ * getBillingEventByExternalId - getBillingEventByExternalId
3510
+ *
3511
+ * Retrieve a billing event (Buchungssatz) by its external system identifier.
3512
+ *
3513
+ * This endpoint is useful for integrations with external systems such as SAP FI/CA,
3514
+ * ERP systems, or payment processors that maintain their own reference IDs.
3515
+ *
3516
+ */
3517
+ 'get'(
3518
+ parameters?: Parameters<Paths.GetBillingEventByExternalId.PathParameters> | null,
3519
+ data?: any,
3520
+ config?: AxiosRequestConfig
3521
+ ): OperationResponse<Paths.GetBillingEventByExternalId.Responses.$200>
3522
+ }
3523
+ ['/v1/billing/contracts']: {
3524
+ /**
3525
+ * createContractEntity - createContractEntity
3526
+ *
3527
+ * Create a new contract entity (Vertrag) for billing purposes.
3528
+ *
3529
+ * Contracts serve as the parent entity for billing events and contain billing
3530
+ * settings such as installment amounts (Abschlagsbeträge), billing periods
3531
+ * (Abrechnungszeiträume), and customer addresses.
3532
+ *
3533
+ */
3534
+ 'post'(
3535
+ parameters?: Parameters<UnknownParamsObject> | null,
3536
+ data?: Paths.CreateContractEntity.RequestBody,
3537
+ config?: AxiosRequestConfig
3538
+ ): OperationResponse<Paths.CreateContractEntity.Responses.$201>
3539
+ }
3540
+ ['/v1/billing/contracts/{id}']: {
3541
+ /**
3542
+ * updateContractEntity - updateContractEntity
3543
+ *
3544
+ * Update an existing contract entity (Vertrag).
3545
+ *
3546
+ * Only the fields provided in the request body will be updated.
3547
+ * Common use cases include updating billing settings, changing status,
3548
+ * or recording termination details.
3549
+ *
3550
+ */
3551
+ 'patch'(
3552
+ parameters?: Parameters<Paths.UpdateContractEntity.PathParameters> | null,
3553
+ data?: Paths.UpdateContractEntity.RequestBody,
3554
+ config?: AxiosRequestConfig
3555
+ ): OperationResponse<Paths.UpdateContractEntity.Responses.$200>
3556
+ /**
3557
+ * deleteContractEntity - deleteContractEntity
3558
+ *
3559
+ * Delete an existing contract entity (Vertrag).
3560
+ *
3561
+ * **Warning**: Deleting a contract will affect all associated billing events.
3562
+ * Consider setting the contract status to "terminated" instead for audit purposes.
3563
+ *
3564
+ */
3565
+ 'delete'(
3566
+ parameters?: Parameters<Paths.DeleteContractEntity.PathParameters> | null,
3567
+ data?: any,
3568
+ config?: AxiosRequestConfig
3569
+ ): OperationResponse<Paths.DeleteContractEntity.Responses.$204>
3570
+ }
3571
+ ['/v1/billing/contracts/{id}/pricing_information']: {
3572
+ /**
3573
+ * getContractPricingInformation - getContractPricingInformation
3574
+ *
3575
+ * Get current pricing information and recent configuration history for a Contract.
3576
+ */
3577
+ 'get'(
3578
+ parameters?: Parameters<Paths.GetContractPricingInformation.PathParameters> | null,
3579
+ data?: any,
3580
+ config?: AxiosRequestConfig
3581
+ ): OperationResponse<Paths.GetContractPricingInformation.Responses.$200>
3582
+ }
3583
+ ['/v1/billing/billing_accounts/{id}/pricing_information']: {
3584
+ /**
3585
+ * getBillingAccountPricingInformation - getBillingAccountPricingInformation
3586
+ *
3587
+ * Get current pricing information for the active Contracts linked to a Billing Account.
3588
+ */
3589
+ 'get'(
3590
+ parameters?: Parameters<Paths.GetBillingAccountPricingInformation.PathParameters> | null,
3591
+ data?: any,
3592
+ config?: AxiosRequestConfig
3593
+ ): OperationResponse<Paths.GetBillingAccountPricingInformation.Responses.$200>
3594
+ }
3595
+ ['/v1/billing/contracts/{id}/configuration_history']: {
3596
+ /**
3597
+ * getContractConfigurationHistory - getContractConfigurationHistory
3598
+ *
3599
+ * Get billing configuration history for a Contract.
3600
+ */
3601
+ 'get'(
3602
+ parameters?: Parameters<Paths.GetContractConfigurationHistory.QueryParameters & Paths.GetContractConfigurationHistory.PathParameters> | null,
3603
+ data?: any,
3604
+ config?: AxiosRequestConfig
3605
+ ): OperationResponse<Paths.GetContractConfigurationHistory.Responses.$200>
3606
+ }
3607
+ ['/v1/billing/billing_accounts/{id}/configuration_history']: {
3608
+ /**
3609
+ * getBillingAccountConfigurationHistory - getBillingAccountConfigurationHistory
3610
+ *
3611
+ * Get merged billing configuration history for active Contracts linked to a Billing Account.
3612
+ */
3613
+ 'get'(
3614
+ parameters?: Parameters<Paths.GetBillingAccountConfigurationHistory.QueryParameters & Paths.GetBillingAccountConfigurationHistory.PathParameters> | null,
3615
+ data?: any,
3616
+ config?: AxiosRequestConfig
3617
+ ): OperationResponse<Paths.GetBillingAccountConfigurationHistory.Responses.$200>
3618
+ }
3619
+ ['/v1/billing/customers/{id}/balance']: {
3620
+ /**
3621
+ * getCustomerBalance - getCustomerBalance
3622
+ *
3623
+ * Retrieve the total balance (Kontostand) across all contracts and orders for a customer.
3624
+ *
3625
+ * The balance is calculated from the sum of all billing events (Buchungssätze) associated
3626
+ * with the customer's contracts. A positive balance indicates the customer owes money;
3627
+ * a negative balance indicates a credit (Guthaben) in the customer's favor.
3628
+ *
3629
+ */
3630
+ 'get'(
3631
+ parameters?: Parameters<Paths.GetCustomerBalance.PathParameters> | null,
3632
+ data?: any,
3633
+ config?: AxiosRequestConfig
3634
+ ): OperationResponse<Paths.GetCustomerBalance.Responses.$200>
3635
+ }
3636
+ }
3637
+
3638
+ type Client = OpenAPIClient<OperationMethods, PathsDictionary>
3639
+
3640
+
3641
+ type Balance = Components.Schemas.Balance;
3642
+ type BaseBillingEvent = Components.Schemas.BaseBillingEvent;
3643
+ type BaseEntity = Components.Schemas.BaseEntity;
3644
+ type BillingAccountPricingInformation = Components.Schemas.BillingAccountPricingInformation;
3645
+ type BillingEvent = Components.Schemas.BillingEvent;
3646
+ type BillingEventUpdate = Components.Schemas.BillingEventUpdate;
3647
+ type BonusEvent = Components.Schemas.BonusEvent;
3648
+ type ConfigurationHistoryContext = Components.Schemas.ConfigurationHistoryContext;
3649
+ type ConfigurationHistoryResponse = Components.Schemas.ConfigurationHistoryResponse;
3650
+ type ConfigurationHistoryRow = Components.Schemas.ConfigurationHistoryRow;
3651
+ type Contract = Components.Schemas.Contract;
3652
+ type ContractItem = Components.Schemas.ContractItem;
3653
+ type ContractPricingInformation = Components.Schemas.ContractPricingInformation;
3654
+ type ContractPricingSchedule = Components.Schemas.ContractPricingSchedule;
3655
+ type CorrectionEvent = Components.Schemas.CorrectionEvent;
3656
+ type Currency = Components.Schemas.Currency;
3657
+ type CustomEvent = Components.Schemas.CustomEvent;
3658
+ type DunningFeeEvent = Components.Schemas.DunningFeeEvent;
3659
+ type DynamicTariffPriceContext = Components.Schemas.DynamicTariffPriceContext;
3660
+ type EntityId = Components.Schemas.EntityId;
3661
+ type EntityRelationItem = Components.Schemas.EntityRelationItem;
3662
+ type EntitySlug = Components.Schemas.EntitySlug;
3663
+ type Error = Components.Schemas.Error;
3664
+ type FinalBillEvent = Components.Schemas.FinalBillEvent;
3665
+ type InstallmentAmountValue = Components.Schemas.InstallmentAmountValue;
3666
+ type InstallmentEvent = Components.Schemas.InstallmentEvent;
3667
+ type InvoiceEvent = Components.Schemas.InvoiceEvent;
3668
+ type PaymentEvent = Components.Schemas.PaymentEvent;
3669
+ type PriceContext = Components.Schemas.PriceContext;
3670
+ type PricingInformationBalance = Components.Schemas.PricingInformationBalance;
3671
+ type ReimbursementEvent = Components.Schemas.ReimbursementEvent;
3672
+
3673
+ export { type PricingInformationBalance as A, type Balance as B, type Client as C, type DunningFeeEvent as D, type EntityId as E, type FinalBillEvent as F, type InstallmentAmountValue as I, type OperationMethods as O, Paths as P, type ReimbursementEvent as R, Components as a, type PathsDictionary as b, type BaseBillingEvent as c, type BaseEntity as d, type BillingAccountPricingInformation as e, type BillingEvent as f, type BillingEventUpdate as g, type BonusEvent as h, type ConfigurationHistoryContext as i, type ConfigurationHistoryResponse as j, type ConfigurationHistoryRow as k, type Contract as l, type ContractItem as m, type ContractPricingInformation as n, type ContractPricingSchedule as o, type CorrectionEvent as p, type Currency as q, type CustomEvent as r, type DynamicTariffPriceContext as s, type EntityRelationItem as t, type EntitySlug as u, type Error as v, type InstallmentEvent as w, type InvoiceEvent as x, type PaymentEvent as y, type PriceContext as z };