@fleetless/contracts 13.0.0 → 13.0.1

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 CHANGED
@@ -9,6 +9,15 @@ version.
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [13.0.1] — 2026-11-03
13
+
14
+ ### Fixed
15
+
16
+ - Corrected the `cancellation_document_url` and invoice PDF route descriptions:
17
+ Cloud always returns `null` for cancellation document URLs and does not
18
+ serve cancellation PDFs; cancellation documents are held in Lexware.
19
+ `cancelled` and the wire schemas are unchanged.
20
+
12
21
  ## [13.0.0] — 2026-11-02
13
22
 
14
23
  ### Changed
@@ -10720,7 +10720,7 @@
10720
10720
  "/api/billing/invoices/{id}/pdf": {
10721
10721
  "get": {
10722
10722
  "operationId": "get_api_billing_invoices_id_pdf",
10723
- "summary": "Downloads an invoice's original or cancellation PDF.",
10723
+ "summary": "Downloads a historical Cloud invoice's original PDF.",
10724
10724
  "tags": [
10725
10725
  "billing"
10726
10726
  ],
@@ -10744,7 +10744,7 @@
10744
10744
  "in": "query",
10745
10745
  "required": false,
10746
10746
  "schema": {
10747
- "description": "The original invoice or its stored cancellation PDF; omitted means `invoice`.",
10747
+ "description": "Omitted or `invoice` selects the original invoice PDF. `cancellation` is accepted but returns `404 not_found`: Cloud has no cancellation PDFs.",
10748
10748
  "type": "string",
10749
10749
  "enum": [
10750
10750
  "invoice",
@@ -10776,7 +10776,7 @@
10776
10776
  }
10777
10777
  }
10778
10778
  },
10779
- "description": "Owner-only. Omitted `kind` or `kind=invoice` returns the original PDF, rendered once with `pdfkit` when issued and stored as bytes. `kind=cancellation` returns the stored cancellation PDF for this same invoice id; no read renders a new PDF. `404 not_found` for an unknown id, one from another org, or a missing cancellation number or PDF. This reads historical Cloud invoices only: a due charge has no PDF of its own here — its eventual Lexware invoice is a document, read through `GET /api/billing/documents/:id/file`."
10779
+ "description": "Owner-only. Omitted `kind` or `kind=invoice` returns the original PDF, rendered once with `pdfkit` when issued and stored as bytes. `kind=cancellation` returns `404 not_found`: Cloud has no cancellation PDFs. Cancellation documents are held in Lexware. `404 not_found` also covers an unknown id or one from another org. This reads historical Cloud invoices only: a due charge has no PDF of its own here — its eventual Lexware invoice is a document, read through `GET /api/billing/documents/:id/file`."
10780
10780
  }
10781
10781
  },
10782
10782
  "/api/billing/documents": {
@@ -14694,7 +14694,7 @@
14694
14694
  "type": "null"
14695
14695
  }
14696
14696
  ],
14697
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
14697
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
14698
14698
  },
14699
14699
  "currency": {
14700
14700
  "type": "string",
@@ -15018,7 +15018,7 @@
15018
15018
  "type": "null"
15019
15019
  }
15020
15020
  ],
15021
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
15021
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
15022
15022
  },
15023
15023
  "currency": {
15024
15024
  "type": "string",
@@ -15866,7 +15866,7 @@
15866
15866
  "type": "null"
15867
15867
  }
15868
15868
  ],
15869
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
15869
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
15870
15870
  },
15871
15871
  "currency": {
15872
15872
  "type": "string",
@@ -20683,7 +20683,7 @@
20683
20683
  "type": "null"
20684
20684
  }
20685
20685
  ],
20686
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
20686
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
20687
20687
  },
20688
20688
  "currency": {
20689
20689
  "type": "string",
@@ -36841,7 +36841,7 @@
36841
36841
  "type": "null"
36842
36842
  }
36843
36843
  ],
36844
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
36844
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
36845
36845
  },
36846
36846
  "currency": {
36847
36847
  "type": "string",
@@ -37165,7 +37165,7 @@
37165
37165
  "type": "null"
37166
37166
  }
37167
37167
  ],
37168
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
37168
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
37169
37169
  },
37170
37170
  "currency": {
37171
37171
  "type": "string",
@@ -38013,7 +38013,7 @@
38013
38013
  "type": "null"
38014
38014
  }
38015
38015
  ],
38016
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
38016
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
38017
38017
  },
38018
38018
  "currency": {
38019
38019
  "type": "string",
@@ -7181,7 +7181,7 @@
7181
7181
  "method": "GET",
7182
7182
  "path": "/api/billing/invoices/:id/pdf",
7183
7183
  "section": "billing",
7184
- "summary": "Downloads an invoice's original or cancellation PDF.",
7184
+ "summary": "Downloads a historical Cloud invoice's original PDF.",
7185
7185
  "audience": "developer",
7186
7186
  "auth": "developer",
7187
7187
  "rateLimited": false,
@@ -7206,7 +7206,7 @@
7206
7206
  "not_found"
7207
7207
  ],
7208
7208
  "transport": "http",
7209
- "notes": "Owner-only. Omitted `kind` or `kind=invoice` returns the original PDF, rendered once with `pdfkit` when issued and stored as bytes. `kind=cancellation` returns the stored cancellation PDF for this same invoice id; no read renders a new PDF. `404 not_found` for an unknown id, one from another org, or a missing cancellation number or PDF. This reads historical Cloud invoices only: a due charge has no PDF of its own here — its eventual Lexware invoice is a document, read through `GET /api/billing/documents/:id/file`."
7209
+ "notes": "Owner-only. Omitted `kind` or `kind=invoice` returns the original PDF, rendered once with `pdfkit` when issued and stored as bytes. `kind=cancellation` returns `404 not_found`: Cloud has no cancellation PDFs. Cancellation documents are held in Lexware. `404 not_found` also covers an unknown id or one from another org. This reads historical Cloud invoices only: a due charge has no PDF of its own here — its eventual Lexware invoice is a document, read through `GET /api/billing/documents/:id/file`."
7210
7210
  },
7211
7211
  {
7212
7212
  "method": "GET",
@@ -1131,7 +1131,7 @@
1131
1131
  "type": "null"
1132
1132
  }
1133
1133
  ],
1134
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
1134
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
1135
1135
  },
1136
1136
  "currency": {
1137
1137
  "type": "string",
@@ -1455,7 +1455,7 @@
1455
1455
  "type": "null"
1456
1456
  }
1457
1457
  ],
1458
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
1458
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
1459
1459
  },
1460
1460
  "currency": {
1461
1461
  "type": "string",
@@ -2303,7 +2303,7 @@
2303
2303
  "type": "null"
2304
2304
  }
2305
2305
  ],
2306
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
2306
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
2307
2307
  },
2308
2308
  "currency": {
2309
2309
  "type": "string",
@@ -3,7 +3,7 @@
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "kind": {
6
- "description": "The original invoice or its stored cancellation PDF; omitted means `invoice`.",
6
+ "description": "Omitted or `invoice` selects the original invoice PDF. `cancellation` is accepted but returns `404 not_found`: Cloud has no cancellation PDFs.",
7
7
  "type": "string",
8
8
  "enum": [
9
9
  "invoice",
@@ -38,7 +38,7 @@
38
38
  "type": "null"
39
39
  }
40
40
  ],
41
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
41
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
42
42
  },
43
43
  "currency": {
44
44
  "type": "string",
@@ -695,7 +695,7 @@
695
695
  "type": "null"
696
696
  }
697
697
  ],
698
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
698
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
699
699
  },
700
700
  "currency": {
701
701
  "type": "string",
@@ -1330,7 +1330,7 @@
1330
1330
  "type": "null"
1331
1331
  }
1332
1332
  ],
1333
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
1333
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
1334
1334
  },
1335
1335
  "currency": {
1336
1336
  "type": "string",
@@ -1654,7 +1654,7 @@
1654
1654
  "type": "null"
1655
1655
  }
1656
1656
  ],
1657
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
1657
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
1658
1658
  },
1659
1659
  "currency": {
1660
1660
  "type": "string",
@@ -2502,7 +2502,7 @@
2502
2502
  "type": "null"
2503
2503
  }
2504
2504
  ],
2505
- "description": "Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice's id, not the cancellation number."
2505
+ "description": "Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware."
2506
2506
  },
2507
2507
  "currency": {
2508
2508
  "type": "string",
package/dist/billing.js CHANGED
@@ -705,7 +705,7 @@ export const billingInvoice = z.object({
705
705
  issued_at: z.iso.datetime().meta({ description: 'When the invoice was issued.' }),
706
706
  status: invoiceStatus.meta({ description: 'This invoice\'s own status.' }),
707
707
  cancellation_document_url: z.string().nullable().meta({
708
- description: 'Relative same-origin path `/api/billing/invoices/<id>/pdf?kind=cancellation` for a cancelled historical Cloud invoice with a stored cancellation number and PDF; otherwise `null`. The path uses this invoice\'s id, not the cancellation number.',
708
+ description: 'Cloud always returns `null` for this field, including cancelled historical Cloud invoices. Cancellation documents are held in Lexware.',
709
709
  }),
710
710
  currency: planCurrency.meta({ description: "The org's billing currency." }),
711
711
  net_cents: z.number().int().nonnegative().meta({ description: 'The charge, excluding VAT, in integer cents.' }),
@@ -715,7 +715,7 @@ export const billingInvoice = z.object({
715
715
  });
716
716
  /** Optional document kind for `GET /api/billing/invoices/:id/pdf`; omitted means the original invoice. */
717
717
  export const billingInvoicePdfQuery = z.object({
718
- kind: z.enum(['invoice', 'cancellation']).optional().meta({ description: 'The original invoice or its stored cancellation PDF; omitted means `invoice`.' }),
718
+ kind: z.enum(['invoice', 'cancellation']).optional().meta({ description: 'Omitted or `invoice` selects the original invoice PDF. `cancellation` is accepted but returns `404 not_found`: Cloud has no cancellation PDFs.' }),
719
719
  }).strict();
720
720
  /**
721
721
  * The org's billing account: the payer, the VAT treatment, the cycle and
package/dist/routes.js CHANGED
@@ -3178,14 +3178,14 @@ export const ROUTES = [
3178
3178
  },
3179
3179
  {
3180
3180
  method: 'GET', path: '/api/billing/invoices/:id/pdf', section: 'billing',
3181
- summary: "Downloads an invoice's original or cancellation PDF.",
3181
+ summary: "Downloads a historical Cloud invoice's original PDF.",
3182
3182
  audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
3183
3183
  params: [{ name: 'id', description: 'The invoice id, from `billingInvoice.id` in `GET /api/billing`\'s `invoices`.' }],
3184
3184
  query: billingInvoicePdfQuery, request: null, response: null, contentType: 'application/pdf',
3185
3185
  errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'not_found'], transport: 'http',
3186
3186
  notes: 'Owner-only. Omitted `kind` or `kind=invoice` returns the original PDF, rendered once with `pdfkit` when issued and stored as bytes. ' +
3187
- '`kind=cancellation` returns the stored cancellation PDF for this same invoice id; no read renders a new PDF. ' +
3188
- '`404 not_found` for an unknown id, one from another org, or a missing cancellation number or PDF. This reads historical Cloud ' +
3187
+ '`kind=cancellation` returns `404 not_found`: Cloud has no cancellation PDFs. Cancellation documents are held in Lexware. ' +
3188
+ '`404 not_found` also covers an unknown id or one from another org. This reads historical Cloud ' +
3189
3189
  "invoices only: a due charge has no PDF of its own here — its eventual Lexware invoice is a document, read through " +
3190
3190
  '`GET /api/billing/documents/:id/file`.',
3191
3191
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "13.0.0",
3
+ "version": "13.0.1",
4
4
  "description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Dehne Robotik GmbH",