@fleetless/contracts 16.0.0-next.2 → 16.1.0-next.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
@@ -11,6 +11,26 @@ version.
11
11
 
12
12
  ### Changed
13
13
 
14
+ - **The plan catalogue** (fleetless/fleetless#1175). `PLANS` keeps its shape
15
+ and changes its values. Pro holds ten robots, ten apps, fifteen developer
16
+ seats, 500 app users and 500 hours of live video a month
17
+ (`live_video_ms_per_month` 1,800,000,000). Plus holds five seats and 100
18
+ app users. `features.two_factor` is `true` on Basic, so
19
+ `requiredPlanFor('two_factor')` answers `basic`; requiring it for the
20
+ organization (`require_two_factor`) stays with Pro. Prices: Plus
21
+ `eur_month` 3000 and `eur_year` 30600, Pro 15000 and 153000. Both yearly
22
+ prices divide by twelve to the cent.
23
+ - **`asset_bytes_per_robot` is 1,000,000,000 on Basic, Plus and Pro.** Asset
24
+ storage is no plan differentiator any more. No plan below Enterprise
25
+ raises it; an organization that needs more gets an override
26
+ (`planOverrides.asset_bytes_per_robot`). A consumer that names the way up
27
+ from this limit must not read it off `nextPlanRaising`, which answers
28
+ `enterprise`.
29
+
30
+ ## [16.0.0] — 2026-11-19
31
+
32
+ ### Changed
33
+
14
34
  - **BREAKING: one consent sentence and one button label per C.4 action**
15
35
  (fleetless/fleetless#1168). `billingDecisionSnapshot.declaration` gains a
16
36
  required `action_label`, and `text_id` is one of `C4_TEXT_IDS`, one per
@@ -9966,7 +9966,7 @@
9966
9966
  }
9967
9967
  }
9968
9968
  },
9969
- "description": "Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT.",
9969
+ "description": "Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT. A cancellation to Basic never waits for the VAT treatment; a lower paid plan names its gross, so while the account's VAT treatment is unresolved this route and the PUT answer 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`.",
9970
9970
  "requestBody": {
9971
9971
  "required": true,
9972
9972
  "content": {
@@ -10352,7 +10352,7 @@
10352
10352
  }
10353
10353
  }
10354
10354
  },
10355
- "description": "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision's action (`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 € with Mollie`, `Pay 95 € and switch`, `Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus` or `Cancel at period end`. Render both as sent. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs.",
10355
+ "description": "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision's action (`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 € with Mollie`, `Pay 95 € and switch`, `Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus`, `Cancel at period end` or `Delete the rest and stay on Basic`. Render both as sent. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs.",
10356
10356
  "requestBody": {
10357
10357
  "required": true,
10358
10358
  "content": {
@@ -10410,7 +10410,7 @@
10410
10410
  }
10411
10411
  }
10412
10412
  },
10413
- "description": "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay returns the original result without another payment or acceptance. After 502 payment_provider_unavailable the same key and proof may be sent again: the payment is created with the same idempotency key, so at most one exists. While another first payment of the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. Foreign ownership answers 404 without disclosure; held cannot charge.",
10413
+ "description": "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay returns the original result without another payment or acceptance. For a checkout, after 502 payment_provider_unavailable the same key and proof may be sent again within 50 minutes: the payment is created with the same idempotency key, so at most one exists. A paid change after a 502 answers charge_in_progress until the earlier charge is settled (within about an hour), then the same key and proof charge once more. While another first payment of the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. After the Lexware issuer cutover, a paid change that charges something while the billing details lack a company name or a full address answers 409 target_state_conflict with `{ field: billing, rule: purchase_eligibility_pending }` before the proof is consumed: nothing is charged until they are complete. Foreign ownership answers 404 without disclosure; held cannot charge.",
10414
10414
  "requestBody": {
10415
10415
  "required": true,
10416
10416
  "content": {
@@ -6711,7 +6711,7 @@
6711
6711
  "plan_purchase_closed"
6712
6712
  ],
6713
6713
  "transport": "http",
6714
- "notes": "Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT."
6714
+ "notes": "Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT. A cancellation to Basic never waits for the VAT treatment; a lower paid plan names its gross, so while the account's VAT treatment is unresolved this route and the PUT answer 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`."
6715
6715
  },
6716
6716
  {
6717
6717
  "method": "PUT",
@@ -6950,7 +6950,7 @@
6950
6950
  "plan_purchase_closed"
6951
6951
  ],
6952
6952
  "transport": "http",
6953
- "notes": "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision's action (`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 € with Mollie`, `Pay 95 € and switch`, `Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus` or `Cancel at period end`. Render both as sent. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs."
6953
+ "notes": "Owner only, Cache-Control: no-store. Cloud persists the snapshot and proof hash for an eligible current checkout or paid-change intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision's action (`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 € with Mollie`, `Pay 95 € and switch`, `Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus`, `Cancel at period end` or `Delete the rest and stay on Basic`. Render both as sent. Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs."
6954
6954
  },
6955
6955
  {
6956
6956
  "method": "POST",
@@ -6986,7 +6986,7 @@
6986
6986
  "payment_provider_unavailable"
6987
6987
  ],
6988
6988
  "transport": "http",
6989
- "notes": "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay returns the original result without another payment or acceptance. After 502 payment_provider_unavailable the same key and proof may be sent again: the payment is created with the same idempotency key, so at most one exists. While another first payment of the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. Foreign ownership answers 404 without disclosure; held cannot charge."
6989
+ "notes": "Checkout and paid-change decisions require confirmation_proof along with the operation key, quote revision and buyer fingerprint shown in the persisted C.4 display. Cloud rechecks buyer, quote, selection, legal references, period and current state under the org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay returns the original result without another payment or acceptance. For a checkout, after 502 payment_provider_unavailable the same key and proof may be sent again within 50 minutes: the payment is created with the same idempotency key, so at most one exists. A paid change after a 502 answers charge_in_progress until the earlier charge is settled (within about an hour), then the same key and proof charge once more. While another first payment of the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at `checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an earlier charge is unresolved; it does not start another charge. After the Lexware issuer cutover, a paid change that charges something while the billing details lack a company name or a full address answers 409 target_state_conflict with `{ field: billing, rule: purchase_eligibility_pending }` before the proof is consumed: nothing is charged until they are complete. Foreign ownership answers 404 without disclosure; held cannot charge."
6990
6990
  },
6991
6991
  {
6992
6992
  "method": "GET",
package/dist/plans.d.ts CHANGED
@@ -197,8 +197,21 @@ export declare function yearlyEurCents(monthEurCents: number): number;
197
197
  export declare function pricesFromEurMonth(eurMonthCents: number): PlanPrices;
198
198
  /**
199
199
  * The catalogue: limits, prices and features as the decision table
200
- * (2026-09-30) states them, except that the audit export is on every plan,
201
- * as the developer docs (`plans-and-limits.md`) and the cloud have it.
200
+ * (2026-09-30) states them, with two later changes. The audit export is on
201
+ * every plan, as the developer docs (`plans-and-limits.md`) and the cloud
202
+ * have it. And fleetless/fleetless#1175 (2026-11-19) made Pro hold a fleet
203
+ * (ten robots and apps, fifteen seats, 500 app users, 500 hours of live
204
+ * video), raised Plus to five seats and 100 app users, put a developer's
205
+ * own two-factor (`two_factor`) on every plan, and set the prices to 30 €
206
+ * and 150 € a month.
207
+ *
208
+ * **Asset storage is the same on every sold plan**, one gigabyte per robot:
209
+ * what a robot's meshes need depends on its CAD, not on the plan, so it is
210
+ * no plan differentiator. An organization that needs more gets it as an
211
+ * override (`planOverrides.asset_bytes_per_robot`), and no plan below
212
+ * Enterprise raises it — a consumer that names the way up from this limit
213
+ * must not read it off `nextPlanRaising`, which answers `enterprise`.
214
+ *
202
215
  * Live video is in milliseconds, asset storage in decimal bytes per robot;
203
216
  * Enterprise's limits and features are `null` / `true` throughout because
204
217
  * they are set by contract, not read off this table.
package/dist/plans.js CHANGED
@@ -138,8 +138,21 @@ export function pricesFromEurMonth(eurMonthCents) {
138
138
  }
139
139
  /**
140
140
  * The catalogue: limits, prices and features as the decision table
141
- * (2026-09-30) states them, except that the audit export is on every plan,
142
- * as the developer docs (`plans-and-limits.md`) and the cloud have it.
141
+ * (2026-09-30) states them, with two later changes. The audit export is on
142
+ * every plan, as the developer docs (`plans-and-limits.md`) and the cloud
143
+ * have it. And fleetless/fleetless#1175 (2026-11-19) made Pro hold a fleet
144
+ * (ten robots and apps, fifteen seats, 500 app users, 500 hours of live
145
+ * video), raised Plus to five seats and 100 app users, put a developer's
146
+ * own two-factor (`two_factor`) on every plan, and set the prices to 30 €
147
+ * and 150 € a month.
148
+ *
149
+ * **Asset storage is the same on every sold plan**, one gigabyte per robot:
150
+ * what a robot's meshes need depends on its CAD, not on the plan, so it is
151
+ * no plan differentiator. An organization that needs more gets it as an
152
+ * override (`planOverrides.asset_bytes_per_robot`), and no plan below
153
+ * Enterprise raises it — a consumer that names the way up from this limit
154
+ * must not read it off `nextPlanRaising`, which answers `enterprise`.
155
+ *
143
156
  * Live video is in milliseconds, asset storage in decimal bytes per robot;
144
157
  * Enterprise's limits and features are `null` / `true` throughout because
145
158
  * they are set by contract, not read off this table.
@@ -162,7 +175,7 @@ export const PLANS = {
162
175
  },
163
176
  features: {
164
177
  app_mcp: false,
165
- two_factor: false,
178
+ two_factor: true,
166
179
  require_two_factor: false,
167
180
  app_oidc: false,
168
181
  hosted_logo: false,
@@ -176,12 +189,12 @@ export const PLANS = {
176
189
  id: 'plus',
177
190
  name: 'Plus',
178
191
  limits: {
179
- seats: 3,
192
+ seats: 5,
180
193
  robots: 3,
181
194
  apps: 3,
182
- app_users: 25,
195
+ app_users: 100,
183
196
  live_video_ms_per_month: 360_000_000,
184
- asset_bytes_per_robot: 2_000_000_000,
197
+ asset_bytes_per_robot: 1_000_000_000,
185
198
  history_days: 30,
186
199
  audit_days: 30,
187
200
  collection_records: 250_000,
@@ -196,19 +209,19 @@ export const PLANS = {
196
209
  audit_export: true,
197
210
  addons: false,
198
211
  },
199
- prices: pricesFromEurMonth(2900),
212
+ prices: pricesFromEurMonth(3000),
200
213
  support: 'email',
201
214
  },
202
215
  pro: {
203
216
  id: 'pro',
204
217
  name: 'Pro',
205
218
  limits: {
206
- seats: 5,
207
- robots: 5,
208
- apps: 5,
209
- app_users: 50,
210
- live_video_ms_per_month: 900_000_000,
211
- asset_bytes_per_robot: 3_000_000_000,
219
+ seats: 15,
220
+ robots: 10,
221
+ apps: 10,
222
+ app_users: 500,
223
+ live_video_ms_per_month: 1_800_000_000,
224
+ asset_bytes_per_robot: 1_000_000_000,
212
225
  history_days: 90,
213
226
  audit_days: 90,
214
227
  collection_records: 1_000_000,
@@ -223,7 +236,7 @@ export const PLANS = {
223
236
  audit_export: true,
224
237
  addons: true,
225
238
  },
226
- prices: pricesFromEurMonth(14900),
239
+ prices: pricesFromEurMonth(15000),
227
240
  support: 'priority',
228
241
  },
229
242
  enterprise: {
package/dist/routes.js CHANGED
@@ -3112,7 +3112,9 @@ export const ROUTES = [
3112
3112
  audience: 'developer', auth: 'developer', rateLimited: false, ownerTier: true, status: 200,
3113
3113
  params: [], query: null, request: planChangePrepareRequest, response: planChangePrepareResponse,
3114
3114
  errors: [...DEVELOPER_GUARD, 'tier_required', 'validation_error', 'plan_limit', 'target_state_conflict', 'plan_purchase_closed'], transport: 'http',
3115
- notes: 'Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT.',
3115
+ notes: 'Owner only. Persists a prepared change reference and a short-lived display, without mutating the plan, pending_change, or legal acceptance. A same-key, same-input retry while undecided returns the same change_id with a fresh display. A Basic cancellation reason belongs only in the final PUT. ' +
3116
+ 'A cancellation to Basic never waits for the VAT treatment; a lower paid plan names its gross, so while the account\'s VAT treatment ' +
3117
+ 'is unresolved this route and the PUT answer 409 target_state_conflict with `{ field: billing.vat_id, rule: purchase_eligibility_pending }`.',
3116
3118
  },
3117
3119
  {
3118
3120
  method: 'PUT', path: '/api/org/plan/change', section: 'org',
@@ -3246,7 +3248,8 @@ export const ROUTES = [
3246
3248
  'intent of this Owner and org. A checkout start already returns its display; this route issues one for a paid change, and a fresh ' +
3247
3249
  'one for an intent that is still eligible. `snapshot.declaration` carries the approved sentence of the decision\'s action ' +
3248
3250
  '(`text_id`, `text`) and the label of its one button (`action_label`): `Pay 34,51 € with Mollie`, `Pay 95 € and switch`, ' +
3249
- '`Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus` or `Cancel at period end`. Render both as sent. ' +
3251
+ '`Switch to Pro`, `Switch to monthly at period end`, `Schedule downgrade to Plus`, `Cancel at period end` or `Delete the rest and stay on Basic`. ' +
3252
+ 'Render both as sent. ' +
3250
3253
  'Pending, held, refused or accepted intents cannot mint a new proof. The proof never appears in lookup, billing views or logs.',
3251
3254
  },
3252
3255
  {
@@ -3261,11 +3264,16 @@ export const ROUTES = [
3261
3264
  'org lock. A spent, expired or stale proof answers 409 target_state_conflict with `{ field: confirmation_proof, rule: display_stale }` ' +
3262
3265
  'and changes nothing: fetch a fresh display (for a checkout, a new start with a new key) and press again; never resend the click. ' +
3263
3266
  'One decision, one legal acceptance and, for a charge, the hosted payment commit in this one request. An exact same-key replay ' +
3264
- 'returns the original result without another payment or acceptance. After 502 payment_provider_unavailable the same key and proof ' +
3265
- 'may be sent again: the payment is created with the same idempotency key, so at most one exists. While another first payment of ' +
3267
+ 'returns the original result without another payment or acceptance. For a checkout, after 502 payment_provider_unavailable the same ' +
3268
+ 'key and proof may be sent again within 50 minutes: the payment is created with the same idempotency key, so at most one exists. A ' +
3269
+ 'paid change after a 502 answers charge_in_progress until the earlier charge is settled (within about an hour), then the same key ' +
3270
+ 'and proof charge once more. While another first payment of ' +
3266
3271
  'the org is open, a checkout answers 409 target_state_conflict with `checkoutOpenDetails` (rule `checkout_open`): continue it at ' +
3267
3272
  '`checkout_url`. A paid change can return 409 target_state_conflict with field billing and rule charge_in_progress while an ' +
3268
- 'earlier charge is unresolved; it does not start another charge. Foreign ownership answers 404 without disclosure; held cannot charge.',
3273
+ 'earlier charge is unresolved; it does not start another charge. After the Lexware issuer cutover, a paid change that charges ' +
3274
+ 'something while the billing details lack a company name or a full address answers 409 target_state_conflict with ' +
3275
+ '`{ field: billing, rule: purchase_eligibility_pending }` before the proof is consumed: nothing is charged until they are complete. ' +
3276
+ 'Foreign ownership answers 404 without disclosure; held cannot charge.',
3269
3277
  },
3270
3278
  {
3271
3279
  method: 'GET', path: '/api/billing/checkout/:id', section: 'billing',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fleetless/contracts",
3
- "version": "16.0.0-next.2",
3
+ "version": "16.1.0-next.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",