@fleetless/contracts 7.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/artifacts/openapi.json +1013 -27
- package/artifacts/routes.json +37 -3
- package/artifacts/schema/billing-change-response.schema.json +469 -7
- package/artifacts/schema/billing-charge-invoice.schema.json +54 -0
- package/artifacts/schema/billing-charge.schema.json +216 -0
- package/artifacts/schema/billing-issuer.schema.json +8 -0
- package/artifacts/schema/billing-view.schema.json +232 -3
- package/artifacts/schema/checkout-response.schema.json +5 -1
- package/artifacts/schema/purchase-conflict-details.schema.json +5 -1
- package/artifacts/schema/purchase-hold-reason.schema.json +5 -1
- package/artifacts/schema/purchase-intent-response.schema.json +237 -4
- package/dist/billing.d.ts +229 -0
- package/dist/billing.js +88 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/routes.js +23 -4
- package/package.json +1 -1
|
@@ -201,7 +201,11 @@
|
|
|
201
201
|
"enum": [
|
|
202
202
|
"legacy_usd_invoice",
|
|
203
203
|
"legacy_payer_unresolved",
|
|
204
|
-
"mandate_policy_unresolved"
|
|
204
|
+
"mandate_policy_unresolved",
|
|
205
|
+
"lexware_contact_pending",
|
|
206
|
+
"lexware_contact_changed",
|
|
207
|
+
"issuer_cutover_in_progress",
|
|
208
|
+
"lexware_issuance_paused"
|
|
205
209
|
]
|
|
206
210
|
},
|
|
207
211
|
"original_amount": {
|
|
@@ -983,7 +987,7 @@
|
|
|
983
987
|
"type": "string",
|
|
984
988
|
"format": "uuid",
|
|
985
989
|
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
986
|
-
"description": "
|
|
990
|
+
"description": "What dunning is chasing: a historical open `FL-…` invoice, or a due charge. Before the issuer cutover a due charge appears here only while the payer's VAT ID is unsettled; it has no number yet, is not in `invoices`, and `POST /api/billing/invoices/:id/pay` takes either. After the cutover this is always a due charge (in `charges`): pay it with `POST /api/billing/charges/:id/pay`."
|
|
987
991
|
},
|
|
988
992
|
"gross_cents": {
|
|
989
993
|
"type": "integer",
|
|
@@ -1186,6 +1190,14 @@
|
|
|
1186
1190
|
},
|
|
1187
1191
|
"description": "What a payment-method change may offer right now, so a client offers exactly what the cloud accepts. `applepay` is absent when it needs an open invoice and none is open; `[]` when the org has no billing account."
|
|
1188
1192
|
},
|
|
1193
|
+
"issuer": {
|
|
1194
|
+
"type": "string",
|
|
1195
|
+
"enum": [
|
|
1196
|
+
"cloud",
|
|
1197
|
+
"lexware"
|
|
1198
|
+
],
|
|
1199
|
+
"description": "Which system issues this org's charges: `cloud` before the issuer cutover, or `lexware` after it."
|
|
1200
|
+
},
|
|
1189
1201
|
"invoices": {
|
|
1190
1202
|
"type": "array",
|
|
1191
1203
|
"items": {
|
|
@@ -1263,7 +1275,226 @@
|
|
|
1263
1275
|
],
|
|
1264
1276
|
"additionalProperties": false
|
|
1265
1277
|
},
|
|
1266
|
-
"description": "Newest first, at most 24."
|
|
1278
|
+
"description": "Cloud-issued invoices from before the issuer cutover; read-only, never grows after it. Newest first, at most 24."
|
|
1279
|
+
},
|
|
1280
|
+
"charges": {
|
|
1281
|
+
"type": "array",
|
|
1282
|
+
"items": {
|
|
1283
|
+
"type": "object",
|
|
1284
|
+
"properties": {
|
|
1285
|
+
"id": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"format": "uuid",
|
|
1288
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
1289
|
+
"description": "The due charge's id — never a Cloud invoice number. Pay it with `POST /api/billing/charges/:id/pay`."
|
|
1290
|
+
},
|
|
1291
|
+
"kind": {
|
|
1292
|
+
"type": "string",
|
|
1293
|
+
"enum": [
|
|
1294
|
+
"first",
|
|
1295
|
+
"renewal",
|
|
1296
|
+
"change"
|
|
1297
|
+
],
|
|
1298
|
+
"description": "What caused the charge: the first charge after checkout, a scheduled renewal, or a mid-period plan change."
|
|
1299
|
+
},
|
|
1300
|
+
"status": {
|
|
1301
|
+
"type": "string",
|
|
1302
|
+
"enum": [
|
|
1303
|
+
"due",
|
|
1304
|
+
"paid",
|
|
1305
|
+
"uncollectible",
|
|
1306
|
+
"cancelled"
|
|
1307
|
+
],
|
|
1308
|
+
"description": "The charge's own status. A charged back or manually refunded charge stays `paid` — refunds and chargebacks are handled in Mollie or Lexware by hand; this status and the invoice it names are unchanged, and the resulting Lexware credit note appears under `GET /api/billing/documents` instead."
|
|
1309
|
+
},
|
|
1310
|
+
"currency": {
|
|
1311
|
+
"type": "string",
|
|
1312
|
+
"const": "eur",
|
|
1313
|
+
"description": "Every charge billed through Lexware is EUR."
|
|
1314
|
+
},
|
|
1315
|
+
"net_cents": {
|
|
1316
|
+
"type": "integer",
|
|
1317
|
+
"minimum": 0,
|
|
1318
|
+
"maximum": 9007199254740991,
|
|
1319
|
+
"description": "The charge, excluding VAT, in integer cents."
|
|
1320
|
+
},
|
|
1321
|
+
"vat_rate_percent": {
|
|
1322
|
+
"type": "integer",
|
|
1323
|
+
"minimum": 0,
|
|
1324
|
+
"maximum": 100,
|
|
1325
|
+
"description": "The VAT rate applied, in whole percent."
|
|
1326
|
+
},
|
|
1327
|
+
"vat_cents": {
|
|
1328
|
+
"type": "integer",
|
|
1329
|
+
"minimum": 0,
|
|
1330
|
+
"maximum": 9007199254740991,
|
|
1331
|
+
"description": "VAT, in integer cents (`vatCents`)."
|
|
1332
|
+
},
|
|
1333
|
+
"gross_cents": {
|
|
1334
|
+
"type": "integer",
|
|
1335
|
+
"minimum": 0,
|
|
1336
|
+
"maximum": 9007199254740991,
|
|
1337
|
+
"description": "Net plus VAT, in integer cents."
|
|
1338
|
+
},
|
|
1339
|
+
"period_start": {
|
|
1340
|
+
"type": "string",
|
|
1341
|
+
"format": "date-time",
|
|
1342
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
1343
|
+
"description": "The covered period's start."
|
|
1344
|
+
},
|
|
1345
|
+
"period_end": {
|
|
1346
|
+
"type": "string",
|
|
1347
|
+
"format": "date-time",
|
|
1348
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
1349
|
+
"description": "The covered period's end."
|
|
1350
|
+
},
|
|
1351
|
+
"due_at": {
|
|
1352
|
+
"type": "string",
|
|
1353
|
+
"format": "date-time",
|
|
1354
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
1355
|
+
"description": "When this charge is due."
|
|
1356
|
+
},
|
|
1357
|
+
"paid_at": {
|
|
1358
|
+
"anyOf": [
|
|
1359
|
+
{
|
|
1360
|
+
"type": "string",
|
|
1361
|
+
"format": "date-time",
|
|
1362
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
1363
|
+
},
|
|
1364
|
+
{
|
|
1365
|
+
"type": "null"
|
|
1366
|
+
}
|
|
1367
|
+
],
|
|
1368
|
+
"description": "When this charge was paid, or `null` while unpaid."
|
|
1369
|
+
},
|
|
1370
|
+
"invoice": {
|
|
1371
|
+
"oneOf": [
|
|
1372
|
+
{
|
|
1373
|
+
"type": "object",
|
|
1374
|
+
"properties": {
|
|
1375
|
+
"state": {
|
|
1376
|
+
"type": "string",
|
|
1377
|
+
"const": "not_issued",
|
|
1378
|
+
"description": "Not collected (due, a failed retry, or uncollectible): no invoice exists."
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"required": [
|
|
1382
|
+
"state"
|
|
1383
|
+
],
|
|
1384
|
+
"additionalProperties": false
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"type": "object",
|
|
1388
|
+
"properties": {
|
|
1389
|
+
"state": {
|
|
1390
|
+
"type": "string",
|
|
1391
|
+
"const": "pending",
|
|
1392
|
+
"description": "Collected; the Lexware invoice is not yet confirmed."
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
"required": [
|
|
1396
|
+
"state"
|
|
1397
|
+
],
|
|
1398
|
+
"additionalProperties": false
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"type": "object",
|
|
1402
|
+
"properties": {
|
|
1403
|
+
"state": {
|
|
1404
|
+
"type": "string",
|
|
1405
|
+
"const": "issued",
|
|
1406
|
+
"description": "Lexware has confirmed the invoice."
|
|
1407
|
+
},
|
|
1408
|
+
"document_id": {
|
|
1409
|
+
"type": "string",
|
|
1410
|
+
"format": "uuid",
|
|
1411
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
|
|
1412
|
+
"description": "The Lexware document's id — read it with `GET /api/billing/documents/:id`."
|
|
1413
|
+
}
|
|
1414
|
+
},
|
|
1415
|
+
"required": [
|
|
1416
|
+
"state",
|
|
1417
|
+
"document_id"
|
|
1418
|
+
],
|
|
1419
|
+
"additionalProperties": false
|
|
1420
|
+
}
|
|
1421
|
+
],
|
|
1422
|
+
"description": "Whether a Lexware invoice exists for this charge yet, and which document it names once it does."
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
"required": [
|
|
1426
|
+
"id",
|
|
1427
|
+
"kind",
|
|
1428
|
+
"status",
|
|
1429
|
+
"currency",
|
|
1430
|
+
"net_cents",
|
|
1431
|
+
"vat_rate_percent",
|
|
1432
|
+
"vat_cents",
|
|
1433
|
+
"gross_cents",
|
|
1434
|
+
"period_start",
|
|
1435
|
+
"period_end",
|
|
1436
|
+
"due_at",
|
|
1437
|
+
"paid_at",
|
|
1438
|
+
"invoice"
|
|
1439
|
+
],
|
|
1440
|
+
"additionalProperties": false,
|
|
1441
|
+
"allOf": [
|
|
1442
|
+
{
|
|
1443
|
+
"if": {
|
|
1444
|
+
"properties": {
|
|
1445
|
+
"status": {
|
|
1446
|
+
"const": "paid"
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
"required": [
|
|
1450
|
+
"status"
|
|
1451
|
+
]
|
|
1452
|
+
},
|
|
1453
|
+
"then": {
|
|
1454
|
+
"properties": {
|
|
1455
|
+
"invoice": {
|
|
1456
|
+
"properties": {
|
|
1457
|
+
"state": {
|
|
1458
|
+
"enum": [
|
|
1459
|
+
"pending",
|
|
1460
|
+
"issued"
|
|
1461
|
+
]
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"if": {
|
|
1470
|
+
"properties": {
|
|
1471
|
+
"status": {
|
|
1472
|
+
"enum": [
|
|
1473
|
+
"due",
|
|
1474
|
+
"uncollectible",
|
|
1475
|
+
"cancelled"
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
"required": [
|
|
1480
|
+
"status"
|
|
1481
|
+
]
|
|
1482
|
+
},
|
|
1483
|
+
"then": {
|
|
1484
|
+
"properties": {
|
|
1485
|
+
"invoice": {
|
|
1486
|
+
"properties": {
|
|
1487
|
+
"state": {
|
|
1488
|
+
"const": "not_issued"
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
]
|
|
1496
|
+
},
|
|
1497
|
+
"description": "Newest first, at most 24. Lists only due charges with issuer `lexware` — never a pre-cutover charge, a legacy payment (legacy_issued/legacy_held/legacy_person/legacy_usd) or a late USD collection: none of those carry a Lexware intent, and they stay in `invoices` or nowhere. `[]` while `issuer` is `cloud`."
|
|
1267
1498
|
}
|
|
1268
1499
|
},
|
|
1269
1500
|
"required": [
|
|
@@ -1271,7 +1502,9 @@
|
|
|
1271
1502
|
"account",
|
|
1272
1503
|
"payment_method",
|
|
1273
1504
|
"payment_method_options",
|
|
1274
|
-
"
|
|
1505
|
+
"issuer",
|
|
1506
|
+
"invoices",
|
|
1507
|
+
"charges"
|
|
1275
1508
|
],
|
|
1276
1509
|
"additionalProperties": false,
|
|
1277
1510
|
"description": "The billing view after the change."
|
package/dist/billing.d.ts
CHANGED
|
@@ -333,6 +333,10 @@ export declare const purchaseHoldReason: z.ZodEnum<{
|
|
|
333
333
|
legacy_usd_invoice: "legacy_usd_invoice";
|
|
334
334
|
legacy_payer_unresolved: "legacy_payer_unresolved";
|
|
335
335
|
mandate_policy_unresolved: "mandate_policy_unresolved";
|
|
336
|
+
lexware_contact_pending: "lexware_contact_pending";
|
|
337
|
+
lexware_contact_changed: "lexware_contact_changed";
|
|
338
|
+
issuer_cutover_in_progress: "issuer_cutover_in_progress";
|
|
339
|
+
lexware_issuance_paused: "lexware_issuance_paused";
|
|
336
340
|
}>;
|
|
337
341
|
export declare const purchaseRefusalRule: z.ZodEnum<{
|
|
338
342
|
company_required: "company_required";
|
|
@@ -394,6 +398,10 @@ export declare const purchaseIntent: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
394
398
|
legacy_usd_invoice: "legacy_usd_invoice";
|
|
395
399
|
legacy_payer_unresolved: "legacy_payer_unresolved";
|
|
396
400
|
mandate_policy_unresolved: "mandate_policy_unresolved";
|
|
401
|
+
lexware_contact_pending: "lexware_contact_pending";
|
|
402
|
+
lexware_contact_changed: "lexware_contact_changed";
|
|
403
|
+
issuer_cutover_in_progress: "issuer_cutover_in_progress";
|
|
404
|
+
lexware_issuance_paused: "lexware_issuance_paused";
|
|
397
405
|
}>;
|
|
398
406
|
original_amount: z.ZodOptional<z.ZodObject<{
|
|
399
407
|
currency: z.ZodEnum<{
|
|
@@ -511,6 +519,10 @@ export declare const checkoutResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
511
519
|
legacy_usd_invoice: "legacy_usd_invoice";
|
|
512
520
|
legacy_payer_unresolved: "legacy_payer_unresolved";
|
|
513
521
|
mandate_policy_unresolved: "mandate_policy_unresolved";
|
|
522
|
+
lexware_contact_pending: "lexware_contact_pending";
|
|
523
|
+
lexware_contact_changed: "lexware_contact_changed";
|
|
524
|
+
issuer_cutover_in_progress: "issuer_cutover_in_progress";
|
|
525
|
+
lexware_issuance_paused: "lexware_issuance_paused";
|
|
514
526
|
}>;
|
|
515
527
|
original_amount: z.ZodOptional<z.ZodObject<{
|
|
516
528
|
currency: z.ZodEnum<{
|
|
@@ -664,6 +676,10 @@ export declare const purchaseConflictDetails: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
664
676
|
legacy_usd_invoice: "legacy_usd_invoice";
|
|
665
677
|
legacy_payer_unresolved: "legacy_payer_unresolved";
|
|
666
678
|
mandate_policy_unresolved: "mandate_policy_unresolved";
|
|
679
|
+
lexware_contact_pending: "lexware_contact_pending";
|
|
680
|
+
lexware_contact_changed: "lexware_contact_changed";
|
|
681
|
+
issuer_cutover_in_progress: "issuer_cutover_in_progress";
|
|
682
|
+
lexware_issuance_paused: "lexware_issuance_paused";
|
|
667
683
|
}>;
|
|
668
684
|
original_amount: z.ZodOptional<z.ZodObject<{
|
|
669
685
|
currency: z.ZodEnum<{
|
|
@@ -1013,6 +1029,71 @@ export declare const billingAccount: z.ZodObject<{
|
|
|
1013
1029
|
}, z.core.$strip>>;
|
|
1014
1030
|
}, z.core.$strip>;
|
|
1015
1031
|
export type BillingAccount = z.infer<typeof billingAccount>;
|
|
1032
|
+
/** Which system issues an org's charges: `cloud` before the issuer cutover (invoices only, in `invoices`) or `lexware` after it (due charges, in `charges`). */
|
|
1033
|
+
export declare const billingIssuer: z.ZodEnum<{
|
|
1034
|
+
cloud: "cloud";
|
|
1035
|
+
lexware: "lexware";
|
|
1036
|
+
}>;
|
|
1037
|
+
export type BillingIssuer = z.infer<typeof billingIssuer>;
|
|
1038
|
+
/**
|
|
1039
|
+
* Whether a due charge already has a confirmed Lexware invoice: `not_issued`
|
|
1040
|
+
* while the charge is not collected (`due`, a failed retry, or
|
|
1041
|
+
* `uncollectible` — there is nothing to invoice yet); `pending` once
|
|
1042
|
+
* collected but before Lexware confirms the invoice, in any intent state
|
|
1043
|
+
* short of a linked document; `issued` once Lexware's invoice is linked,
|
|
1044
|
+
* naming the document `GET /api/billing/documents/:id` reads.
|
|
1045
|
+
*/
|
|
1046
|
+
export declare const billingChargeInvoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1047
|
+
state: z.ZodLiteral<"not_issued">;
|
|
1048
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1049
|
+
state: z.ZodLiteral<"pending">;
|
|
1050
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1051
|
+
state: z.ZodLiteral<"issued">;
|
|
1052
|
+
document_id: z.ZodUUID;
|
|
1053
|
+
}, z.core.$strict>], "state">;
|
|
1054
|
+
export type BillingChargeInvoice = z.infer<typeof billingChargeInvoice>;
|
|
1055
|
+
/**
|
|
1056
|
+
* One due charge billed through Lexware after the issuer cutover, read in
|
|
1057
|
+
* `billingView.charges`. `id` is the charge's own id — never a Cloud
|
|
1058
|
+
* invoice number — and the one `POST /api/billing/charges/:id/pay` takes.
|
|
1059
|
+
*/
|
|
1060
|
+
export declare const billingCharge: z.ZodObject<{
|
|
1061
|
+
id: z.ZodUUID;
|
|
1062
|
+
kind: z.ZodEnum<{
|
|
1063
|
+
first: "first";
|
|
1064
|
+
renewal: "renewal";
|
|
1065
|
+
change: "change";
|
|
1066
|
+
}>;
|
|
1067
|
+
status: z.ZodEnum<{
|
|
1068
|
+
paid: "paid";
|
|
1069
|
+
uncollectible: "uncollectible";
|
|
1070
|
+
due: "due";
|
|
1071
|
+
cancelled: "cancelled";
|
|
1072
|
+
}>;
|
|
1073
|
+
currency: z.ZodLiteral<"eur">;
|
|
1074
|
+
net_cents: z.ZodNumber;
|
|
1075
|
+
vat_rate_percent: z.ZodNumber;
|
|
1076
|
+
vat_cents: z.ZodNumber;
|
|
1077
|
+
gross_cents: z.ZodNumber;
|
|
1078
|
+
period_start: z.ZodISODateTime;
|
|
1079
|
+
period_end: z.ZodISODateTime;
|
|
1080
|
+
due_at: z.ZodISODateTime;
|
|
1081
|
+
paid_at: z.ZodNullable<z.ZodISODateTime>;
|
|
1082
|
+
invoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1083
|
+
state: z.ZodLiteral<"not_issued">;
|
|
1084
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1085
|
+
state: z.ZodLiteral<"pending">;
|
|
1086
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1087
|
+
state: z.ZodLiteral<"issued">;
|
|
1088
|
+
document_id: z.ZodUUID;
|
|
1089
|
+
}, z.core.$strict>], "state">;
|
|
1090
|
+
}, z.core.$strict>;
|
|
1091
|
+
export type BillingCharge = z.infer<typeof billingCharge>;
|
|
1092
|
+
/** `POST /api/billing/charges/:id/pay`'s body — the same shape as `invoicePayRequest`: a stable `operation_key`. */
|
|
1093
|
+
export declare const chargePayRequest: z.ZodObject<{
|
|
1094
|
+
operation_key: z.ZodUUID;
|
|
1095
|
+
}, z.core.$strict>;
|
|
1096
|
+
export type ChargePayRequest = z.infer<typeof chargePayRequest>;
|
|
1016
1097
|
/** `GET /api/billing`'s answer, and what every other billing route hands back after a change. */
|
|
1017
1098
|
export declare const billingView: z.ZodObject<{
|
|
1018
1099
|
available: z.ZodBoolean;
|
|
@@ -1124,6 +1205,10 @@ export declare const billingView: z.ZodObject<{
|
|
|
1124
1205
|
}>;
|
|
1125
1206
|
pays_invoice: z.ZodBoolean;
|
|
1126
1207
|
}, z.core.$strip>>;
|
|
1208
|
+
issuer: z.ZodEnum<{
|
|
1209
|
+
cloud: "cloud";
|
|
1210
|
+
lexware: "lexware";
|
|
1211
|
+
}>;
|
|
1127
1212
|
invoices: z.ZodArray<z.ZodObject<{
|
|
1128
1213
|
id: z.ZodUUID;
|
|
1129
1214
|
number: z.ZodString;
|
|
@@ -1142,6 +1227,37 @@ export declare const billingView: z.ZodObject<{
|
|
|
1142
1227
|
vat_cents: z.ZodNumber;
|
|
1143
1228
|
gross_cents: z.ZodNumber;
|
|
1144
1229
|
}, z.core.$strip>>;
|
|
1230
|
+
charges: z.ZodArray<z.ZodObject<{
|
|
1231
|
+
id: z.ZodUUID;
|
|
1232
|
+
kind: z.ZodEnum<{
|
|
1233
|
+
first: "first";
|
|
1234
|
+
renewal: "renewal";
|
|
1235
|
+
change: "change";
|
|
1236
|
+
}>;
|
|
1237
|
+
status: z.ZodEnum<{
|
|
1238
|
+
paid: "paid";
|
|
1239
|
+
uncollectible: "uncollectible";
|
|
1240
|
+
due: "due";
|
|
1241
|
+
cancelled: "cancelled";
|
|
1242
|
+
}>;
|
|
1243
|
+
currency: z.ZodLiteral<"eur">;
|
|
1244
|
+
net_cents: z.ZodNumber;
|
|
1245
|
+
vat_rate_percent: z.ZodNumber;
|
|
1246
|
+
vat_cents: z.ZodNumber;
|
|
1247
|
+
gross_cents: z.ZodNumber;
|
|
1248
|
+
period_start: z.ZodISODateTime;
|
|
1249
|
+
period_end: z.ZodISODateTime;
|
|
1250
|
+
due_at: z.ZodISODateTime;
|
|
1251
|
+
paid_at: z.ZodNullable<z.ZodISODateTime>;
|
|
1252
|
+
invoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1253
|
+
state: z.ZodLiteral<"not_issued">;
|
|
1254
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1255
|
+
state: z.ZodLiteral<"pending">;
|
|
1256
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1257
|
+
state: z.ZodLiteral<"issued">;
|
|
1258
|
+
document_id: z.ZodUUID;
|
|
1259
|
+
}, z.core.$strict>], "state">;
|
|
1260
|
+
}, z.core.$strict>>;
|
|
1145
1261
|
}, z.core.$strip>;
|
|
1146
1262
|
export type BillingView = z.infer<typeof billingView>;
|
|
1147
1263
|
/**
|
|
@@ -1422,6 +1538,10 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1422
1538
|
}>;
|
|
1423
1539
|
pays_invoice: z.ZodBoolean;
|
|
1424
1540
|
}, z.core.$strip>>;
|
|
1541
|
+
issuer: z.ZodEnum<{
|
|
1542
|
+
cloud: "cloud";
|
|
1543
|
+
lexware: "lexware";
|
|
1544
|
+
}>;
|
|
1425
1545
|
invoices: z.ZodArray<z.ZodObject<{
|
|
1426
1546
|
id: z.ZodUUID;
|
|
1427
1547
|
number: z.ZodString;
|
|
@@ -1440,6 +1560,37 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1440
1560
|
vat_cents: z.ZodNumber;
|
|
1441
1561
|
gross_cents: z.ZodNumber;
|
|
1442
1562
|
}, z.core.$strip>>;
|
|
1563
|
+
charges: z.ZodArray<z.ZodObject<{
|
|
1564
|
+
id: z.ZodUUID;
|
|
1565
|
+
kind: z.ZodEnum<{
|
|
1566
|
+
first: "first";
|
|
1567
|
+
renewal: "renewal";
|
|
1568
|
+
change: "change";
|
|
1569
|
+
}>;
|
|
1570
|
+
status: z.ZodEnum<{
|
|
1571
|
+
paid: "paid";
|
|
1572
|
+
uncollectible: "uncollectible";
|
|
1573
|
+
due: "due";
|
|
1574
|
+
cancelled: "cancelled";
|
|
1575
|
+
}>;
|
|
1576
|
+
currency: z.ZodLiteral<"eur">;
|
|
1577
|
+
net_cents: z.ZodNumber;
|
|
1578
|
+
vat_rate_percent: z.ZodNumber;
|
|
1579
|
+
vat_cents: z.ZodNumber;
|
|
1580
|
+
gross_cents: z.ZodNumber;
|
|
1581
|
+
period_start: z.ZodISODateTime;
|
|
1582
|
+
period_end: z.ZodISODateTime;
|
|
1583
|
+
due_at: z.ZodISODateTime;
|
|
1584
|
+
paid_at: z.ZodNullable<z.ZodISODateTime>;
|
|
1585
|
+
invoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1586
|
+
state: z.ZodLiteral<"not_issued">;
|
|
1587
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1588
|
+
state: z.ZodLiteral<"pending">;
|
|
1589
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1590
|
+
state: z.ZodLiteral<"issued">;
|
|
1591
|
+
document_id: z.ZodUUID;
|
|
1592
|
+
}, z.core.$strict>], "state">;
|
|
1593
|
+
}, z.core.$strict>>;
|
|
1443
1594
|
}, z.core.$strip>;
|
|
1444
1595
|
charged: z.ZodNullable<z.ZodObject<{
|
|
1445
1596
|
id: z.ZodUUID;
|
|
@@ -1510,6 +1661,10 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1510
1661
|
legacy_usd_invoice: "legacy_usd_invoice";
|
|
1511
1662
|
legacy_payer_unresolved: "legacy_payer_unresolved";
|
|
1512
1663
|
mandate_policy_unresolved: "mandate_policy_unresolved";
|
|
1664
|
+
lexware_contact_pending: "lexware_contact_pending";
|
|
1665
|
+
lexware_contact_changed: "lexware_contact_changed";
|
|
1666
|
+
issuer_cutover_in_progress: "issuer_cutover_in_progress";
|
|
1667
|
+
lexware_issuance_paused: "lexware_issuance_paused";
|
|
1513
1668
|
}>;
|
|
1514
1669
|
original_amount: z.ZodOptional<z.ZodObject<{
|
|
1515
1670
|
currency: z.ZodEnum<{
|
|
@@ -1706,6 +1861,10 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1706
1861
|
}>;
|
|
1707
1862
|
pays_invoice: z.ZodBoolean;
|
|
1708
1863
|
}, z.core.$strip>>;
|
|
1864
|
+
issuer: z.ZodEnum<{
|
|
1865
|
+
cloud: "cloud";
|
|
1866
|
+
lexware: "lexware";
|
|
1867
|
+
}>;
|
|
1709
1868
|
invoices: z.ZodArray<z.ZodObject<{
|
|
1710
1869
|
id: z.ZodUUID;
|
|
1711
1870
|
number: z.ZodString;
|
|
@@ -1724,6 +1883,37 @@ export declare const billingChangeResponse: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1724
1883
|
vat_cents: z.ZodNumber;
|
|
1725
1884
|
gross_cents: z.ZodNumber;
|
|
1726
1885
|
}, z.core.$strip>>;
|
|
1886
|
+
charges: z.ZodArray<z.ZodObject<{
|
|
1887
|
+
id: z.ZodUUID;
|
|
1888
|
+
kind: z.ZodEnum<{
|
|
1889
|
+
first: "first";
|
|
1890
|
+
renewal: "renewal";
|
|
1891
|
+
change: "change";
|
|
1892
|
+
}>;
|
|
1893
|
+
status: z.ZodEnum<{
|
|
1894
|
+
paid: "paid";
|
|
1895
|
+
uncollectible: "uncollectible";
|
|
1896
|
+
due: "due";
|
|
1897
|
+
cancelled: "cancelled";
|
|
1898
|
+
}>;
|
|
1899
|
+
currency: z.ZodLiteral<"eur">;
|
|
1900
|
+
net_cents: z.ZodNumber;
|
|
1901
|
+
vat_rate_percent: z.ZodNumber;
|
|
1902
|
+
vat_cents: z.ZodNumber;
|
|
1903
|
+
gross_cents: z.ZodNumber;
|
|
1904
|
+
period_start: z.ZodISODateTime;
|
|
1905
|
+
period_end: z.ZodISODateTime;
|
|
1906
|
+
due_at: z.ZodISODateTime;
|
|
1907
|
+
paid_at: z.ZodNullable<z.ZodISODateTime>;
|
|
1908
|
+
invoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1909
|
+
state: z.ZodLiteral<"not_issued">;
|
|
1910
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1911
|
+
state: z.ZodLiteral<"pending">;
|
|
1912
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1913
|
+
state: z.ZodLiteral<"issued">;
|
|
1914
|
+
document_id: z.ZodUUID;
|
|
1915
|
+
}, z.core.$strict>], "state">;
|
|
1916
|
+
}, z.core.$strict>>;
|
|
1727
1917
|
}, z.core.$strip>;
|
|
1728
1918
|
charged: z.ZodNullable<z.ZodObject<{
|
|
1729
1919
|
id: z.ZodUUID;
|
|
@@ -1796,6 +1986,10 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
1796
1986
|
legacy_usd_invoice: "legacy_usd_invoice";
|
|
1797
1987
|
legacy_payer_unresolved: "legacy_payer_unresolved";
|
|
1798
1988
|
mandate_policy_unresolved: "mandate_policy_unresolved";
|
|
1989
|
+
lexware_contact_pending: "lexware_contact_pending";
|
|
1990
|
+
lexware_contact_changed: "lexware_contact_changed";
|
|
1991
|
+
issuer_cutover_in_progress: "issuer_cutover_in_progress";
|
|
1992
|
+
lexware_issuance_paused: "lexware_issuance_paused";
|
|
1799
1993
|
}>;
|
|
1800
1994
|
original_amount: z.ZodOptional<z.ZodObject<{
|
|
1801
1995
|
currency: z.ZodEnum<{
|
|
@@ -1991,6 +2185,10 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
1991
2185
|
}>;
|
|
1992
2186
|
pays_invoice: z.ZodBoolean;
|
|
1993
2187
|
}, z.core.$strip>>;
|
|
2188
|
+
issuer: z.ZodEnum<{
|
|
2189
|
+
cloud: "cloud";
|
|
2190
|
+
lexware: "lexware";
|
|
2191
|
+
}>;
|
|
1994
2192
|
invoices: z.ZodArray<z.ZodObject<{
|
|
1995
2193
|
id: z.ZodUUID;
|
|
1996
2194
|
number: z.ZodString;
|
|
@@ -2009,6 +2207,37 @@ export declare const purchaseIntentResponse: z.ZodUnion<readonly [z.ZodDiscrimin
|
|
|
2009
2207
|
vat_cents: z.ZodNumber;
|
|
2010
2208
|
gross_cents: z.ZodNumber;
|
|
2011
2209
|
}, z.core.$strip>>;
|
|
2210
|
+
charges: z.ZodArray<z.ZodObject<{
|
|
2211
|
+
id: z.ZodUUID;
|
|
2212
|
+
kind: z.ZodEnum<{
|
|
2213
|
+
first: "first";
|
|
2214
|
+
renewal: "renewal";
|
|
2215
|
+
change: "change";
|
|
2216
|
+
}>;
|
|
2217
|
+
status: z.ZodEnum<{
|
|
2218
|
+
paid: "paid";
|
|
2219
|
+
uncollectible: "uncollectible";
|
|
2220
|
+
due: "due";
|
|
2221
|
+
cancelled: "cancelled";
|
|
2222
|
+
}>;
|
|
2223
|
+
currency: z.ZodLiteral<"eur">;
|
|
2224
|
+
net_cents: z.ZodNumber;
|
|
2225
|
+
vat_rate_percent: z.ZodNumber;
|
|
2226
|
+
vat_cents: z.ZodNumber;
|
|
2227
|
+
gross_cents: z.ZodNumber;
|
|
2228
|
+
period_start: z.ZodISODateTime;
|
|
2229
|
+
period_end: z.ZodISODateTime;
|
|
2230
|
+
due_at: z.ZodISODateTime;
|
|
2231
|
+
paid_at: z.ZodNullable<z.ZodISODateTime>;
|
|
2232
|
+
invoice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2233
|
+
state: z.ZodLiteral<"not_issued">;
|
|
2234
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2235
|
+
state: z.ZodLiteral<"pending">;
|
|
2236
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2237
|
+
state: z.ZodLiteral<"issued">;
|
|
2238
|
+
document_id: z.ZodUUID;
|
|
2239
|
+
}, z.core.$strict>], "state">;
|
|
2240
|
+
}, z.core.$strict>>;
|
|
2012
2241
|
}, z.core.$strip>;
|
|
2013
2242
|
charged: z.ZodNullable<z.ZodObject<{
|
|
2014
2243
|
id: z.ZodUUID;
|