@fleetless/contracts 6.4.0-next.1 → 6.4.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 +9 -26
- package/CONTRIBUTING.md +11 -1
- package/README.md +4 -0
- package/artifacts/routes.json +0 -133
- package/dist/app-users.d.ts +3 -3
- package/dist/billing.d.ts +12 -12
- package/dist/errors.d.ts +7 -7
- package/dist/errors.js +0 -14
- package/dist/index.d.ts +2 -8
- package/dist/index.js +1 -5
- package/dist/plans.d.ts +16 -16
- package/dist/routes.d.ts +1 -20
- package/dist/routes.js +0 -75
- package/package.json +1 -1
- package/artifacts/schema/admin-org-detail.schema.json +0 -641
- package/artifacts/schema/admin-search-query.schema.json +0 -14
- package/artifacts/schema/admin-search-response.schema.json +0 -219
- package/artifacts/schema/noop-command-request.schema.json +0 -75
- package/artifacts/schema/noop-command-response.schema.json +0 -134
- package/artifacts/schema/operator-audit-ref.schema.json +0 -28
- package/artifacts/schema/operator-preview.schema.json +0 -66
- package/artifacts/schema/preview-stale-details.schema.json +0 -80
- package/dist/admin.d.ts +0 -217
- package/dist/admin.js +0 -39
- package/dist/operator-commands.d.ts +0 -137
- package/dist/operator-commands.js +0 -51
- package/dist/operator.d.ts +0 -63
- package/dist/operator.js +0 -48
package/CHANGELOG.md
CHANGED
|
@@ -9,33 +9,16 @@ version.
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## [6.4.0] — 2026-10-09
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
13
15
|
|
|
14
|
-
- **
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
`audience: 'internal'` and carries a `RouteEntry.operator` block (roles,
|
|
21
|
-
and a `confirmationLevel` on a command), looked up by `operatorAccess`
|
|
22
|
-
and written into `routes.json` as `operator`.
|
|
23
|
-
- **The command protocol.** `operatorCommandRequest`/`operatorCommandResponse`
|
|
24
|
-
describe a preview-reason-execute cycle: a `preview` mode answering
|
|
25
|
-
`operatorPreview` and a token, an `execute` mode taking a `reason`, that
|
|
26
|
-
token and an `idempotency_key`, and a result carrying `operatorAuditRef`.
|
|
27
|
-
`409 preview_stale` carries a fresh preview in `previewStaleDetails`.
|
|
28
|
-
The no-op command (`POST /api/admin/commands/noop`,
|
|
29
|
-
`noopCommandRequest`/`noopCommandResponse`) proves the protocol without
|
|
30
|
-
changing anything.
|
|
31
|
-
- **Search and org reads.** `GET /api/admin/search`
|
|
32
|
-
(`adminSearchQuery`/`adminSearchResponse`, hit kinds org, person, invoice,
|
|
33
|
-
payment, robot), `GET /api/admin/orgs/:id` (`adminOrgDetail`) and
|
|
34
|
-
`GET /api/admin/orgs/:id/usage`, identical to the developer's own usage
|
|
35
|
-
read for the named org.
|
|
36
|
-
- **Two error codes**: `preview_stale` (409, an execute's preview is no
|
|
37
|
-
longer current) and `idempotency_key_reused` (409, the key was already
|
|
38
|
-
used for a different command, input or operator).
|
|
16
|
+
- **Final releases publish under the npm dist-tag `staging`;** `latest` moves
|
|
17
|
+
when the release is promoted to production, and never backwards. `npm i
|
|
18
|
+
@fleetless/contracts` therefore installs what runs in production. A release
|
|
19
|
+
that is still being tested is installable by its version number or as
|
|
20
|
+
`@fleetless/contracts@staging`. Pre-releases stay under `next`. No wire
|
|
21
|
+
shape changes.
|
|
39
22
|
|
|
40
23
|
## [6.3.0] — 2026-10-05
|
|
41
24
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -135,6 +135,15 @@ itself once the required `verify` check passes; the merge commit is tagged,
|
|
|
135
135
|
`verify.yml` runs again on it and packs the tarball, and `publish` ships
|
|
136
136
|
exactly that tarball.
|
|
137
137
|
|
|
138
|
+
**A release does not move `latest`.** It is published under the npm dist-tag
|
|
139
|
+
`staging`, and the run ends by asking the ops repository to record the
|
|
140
|
+
version for the staging environment. `latest` — what `npm i
|
|
141
|
+
@fleetless/contracts` installs — moves when the staging generation that
|
|
142
|
+
carries the release is promoted to production, and never backwards. Until
|
|
143
|
+
then the version is installable by its number or as
|
|
144
|
+
`@fleetless/contracts@staging`. The trusted publisher of this workflow may
|
|
145
|
+
publish only; it has no permission to move a dist-tag.
|
|
146
|
+
|
|
138
147
|
A person still writes the `## [Unreleased]` entries — in the feature's own
|
|
139
148
|
pull request, as the change goes in — because the release only renames that
|
|
140
149
|
heading to a version; it never writes prose. An empty `## [Unreleased]`
|
|
@@ -165,7 +174,8 @@ no `.npmrc` anywhere.
|
|
|
165
174
|
again.** It sees that npm already has the version and does not publish
|
|
166
175
|
twice — npm refuses to republish a version, and a second attempt would only
|
|
167
176
|
read like a broken run. The rerun continues from there: it waits for the
|
|
168
|
-
registry to serve it,
|
|
177
|
+
registry to serve it, asks the ops repository to record it for staging again,
|
|
178
|
+
then finishes. Check `npm view
|
|
169
179
|
@fleetless/contracts@<version>` first if you want to see for yourself before
|
|
170
180
|
pressing anything.
|
|
171
181
|
|
package/README.md
CHANGED
|
@@ -36,6 +36,10 @@ client in another language, or a bridge of your own.
|
|
|
36
36
|
npm i @fleetless/contracts
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
That installs `latest`, the version the Fleetless cloud runs in production. A
|
|
40
|
+
newer release may already be on npm under the dist-tag `staging` while it is
|
|
41
|
+
being tested; `next` carries pre-releases.
|
|
42
|
+
|
|
39
43
|
TypeScript imports the schemas and the types inferred from them, all from the
|
|
40
44
|
package root:
|
|
41
45
|
|
package/artifacts/routes.json
CHANGED
|
@@ -6475,139 +6475,6 @@
|
|
|
6475
6475
|
"transport": "http",
|
|
6476
6476
|
"notes": "Every public host answers `404 not_found` for every `/api/admin/*` path — this route is reachable only on the cloud's private address — and that same address answers `404` here too while `OPS_API_TOKEN` is not configured, so a door with no key behind it reads exactly like one nobody opened. An unknown `:id` is the same `404`. Applies at once, never queued as a `pending_change`, and only when the org's current usage fits the result: `409 plan_limit` when a lower plan, a lowered override or a removed add-on would leave the org over a limit — the operator never deletes an org's things, only the owner's own choice does. On success it also withdraws any `pending_change`, ends a beta org's wait for the switch and lifts a lock. Audited as `org.plan_changed` with the `fleetless` actor, never a developer's — the row names what an operator did, not who in the org asked for it. `409 target_state_conflict` names `currency` or `period_ends_at` with rule `billed` when the org has a billing account in `active` or `past_due` and the request names either field: both are fixed at the first payment and billing, not the operator, owns them from then on. The plan itself keeps working on a billed org — a plan, an add-on or an override the operator sets here is charged from the next renewal, except `enterprise` and `basic`, which the sweep cancels the billing account for instead."
|
|
6477
6477
|
},
|
|
6478
|
-
{
|
|
6479
|
-
"method": "POST",
|
|
6480
|
-
"path": "/api/admin/commands/noop",
|
|
6481
|
-
"section": "org",
|
|
6482
|
-
"summary": "Runs the no-op command: proves the preview-reason-execute protocol without changing anything.",
|
|
6483
|
-
"audience": "internal",
|
|
6484
|
-
"auth": "operator",
|
|
6485
|
-
"rateLimited": true,
|
|
6486
|
-
"ownerTier": false,
|
|
6487
|
-
"status": 200,
|
|
6488
|
-
"params": [],
|
|
6489
|
-
"query": null,
|
|
6490
|
-
"request": "noop-command-request",
|
|
6491
|
-
"response": "noop-command-response",
|
|
6492
|
-
"errors": [
|
|
6493
|
-
"unauthorized",
|
|
6494
|
-
"forbidden",
|
|
6495
|
-
"not_found",
|
|
6496
|
-
"validation_error",
|
|
6497
|
-
"preview_stale",
|
|
6498
|
-
"idempotency_key_reused",
|
|
6499
|
-
"rate_limited"
|
|
6500
|
-
],
|
|
6501
|
-
"transport": "http",
|
|
6502
|
-
"notes": "Reachable only where the cloud enables it (`OPERATOR_NOOP_COMMAND=true`; refused in production). Proves the command path end to end without a real effect: a preview always answers one `keeps` effect, and an execute writes the operator audit plus an `operator.noop` row in the named org's audit, and nothing else. Every public host, and the private address while the operator API is not enabled, answers `404 not_found` for this path like any other unregistered one. A role the route does not list is refused with `403 forbidden`: a command says no where a read stays silent.",
|
|
6503
|
-
"operator": {
|
|
6504
|
-
"roles": [
|
|
6505
|
-
"operator-admin",
|
|
6506
|
-
"operator-finance",
|
|
6507
|
-
"operator-support"
|
|
6508
|
-
],
|
|
6509
|
-
"confirmation": "click"
|
|
6510
|
-
}
|
|
6511
|
-
},
|
|
6512
|
-
{
|
|
6513
|
-
"method": "GET",
|
|
6514
|
-
"path": "/api/admin/search",
|
|
6515
|
-
"section": "org",
|
|
6516
|
-
"summary": "Finds an org, person, invoice, payment or robot by a literal, case-insensitive match.",
|
|
6517
|
-
"audience": "internal",
|
|
6518
|
-
"auth": "operator",
|
|
6519
|
-
"rateLimited": true,
|
|
6520
|
-
"ownerTier": false,
|
|
6521
|
-
"status": 200,
|
|
6522
|
-
"params": [],
|
|
6523
|
-
"query": "admin-search-query",
|
|
6524
|
-
"request": null,
|
|
6525
|
-
"response": "admin-search-response",
|
|
6526
|
-
"errors": [
|
|
6527
|
-
"unauthorized",
|
|
6528
|
-
"not_found",
|
|
6529
|
-
"validation_error",
|
|
6530
|
-
"rate_limited"
|
|
6531
|
-
],
|
|
6532
|
-
"transport": "http",
|
|
6533
|
-
"notes": "`q` is matched literally — `%`, `_` and `\\` carry no wildcard meaning — never as an `ILIKE` pattern, so a two-character query never dumps a table. At most `ADMIN_SEARCH_LIMIT` hits come back; `truncated` says whether more exist. A hit kind the caller's role may not see is left out rather than refused: `operator-support` gets no `invoice` or `payment` hits. Every public host, and the private address while the operator API is not enabled, answers `404 not_found` for this path. A role the route does not list gets that same `404 not_found`, so a read never reveals that it exists.",
|
|
6534
|
-
"operator": {
|
|
6535
|
-
"roles": [
|
|
6536
|
-
"operator-admin",
|
|
6537
|
-
"operator-finance",
|
|
6538
|
-
"operator-support"
|
|
6539
|
-
]
|
|
6540
|
-
}
|
|
6541
|
-
},
|
|
6542
|
-
{
|
|
6543
|
-
"method": "GET",
|
|
6544
|
-
"path": "/api/admin/orgs/:id",
|
|
6545
|
-
"section": "org",
|
|
6546
|
-
"summary": "Reads an org's detail as the operator: its owner, plan, billing state and counts.",
|
|
6547
|
-
"audience": "internal",
|
|
6548
|
-
"auth": "operator",
|
|
6549
|
-
"rateLimited": true,
|
|
6550
|
-
"ownerTier": false,
|
|
6551
|
-
"status": 200,
|
|
6552
|
-
"params": [
|
|
6553
|
-
{
|
|
6554
|
-
"name": "id",
|
|
6555
|
-
"description": "The org's uuid, whose detail the operator is reading."
|
|
6556
|
-
}
|
|
6557
|
-
],
|
|
6558
|
-
"query": null,
|
|
6559
|
-
"request": null,
|
|
6560
|
-
"response": "admin-org-detail",
|
|
6561
|
-
"errors": [
|
|
6562
|
-
"unauthorized",
|
|
6563
|
-
"not_found",
|
|
6564
|
-
"rate_limited"
|
|
6565
|
-
],
|
|
6566
|
-
"transport": "http",
|
|
6567
|
-
"notes": "`billing` carries the account's state and next charge only — never the payer, address or payment method. An unknown `:id` is `404 not_found`, the same every public host and the private address answer for this path while the operator API is not enabled. A role the route does not list gets that same `404 not_found`, so a read never reveals that it exists.",
|
|
6568
|
-
"operator": {
|
|
6569
|
-
"roles": [
|
|
6570
|
-
"operator-admin",
|
|
6571
|
-
"operator-finance",
|
|
6572
|
-
"operator-support"
|
|
6573
|
-
]
|
|
6574
|
-
}
|
|
6575
|
-
},
|
|
6576
|
-
{
|
|
6577
|
-
"method": "GET",
|
|
6578
|
-
"path": "/api/admin/orgs/:id/usage",
|
|
6579
|
-
"section": "org",
|
|
6580
|
-
"summary": "Reads what an org consumed per day, per app and per metric, as the operator.",
|
|
6581
|
-
"audience": "internal",
|
|
6582
|
-
"auth": "operator",
|
|
6583
|
-
"rateLimited": true,
|
|
6584
|
-
"ownerTier": false,
|
|
6585
|
-
"status": 200,
|
|
6586
|
-
"params": [
|
|
6587
|
-
{
|
|
6588
|
-
"name": "id",
|
|
6589
|
-
"description": "The org's uuid, whose usage the operator is reading."
|
|
6590
|
-
}
|
|
6591
|
-
],
|
|
6592
|
-
"query": "org-usage-query",
|
|
6593
|
-
"request": null,
|
|
6594
|
-
"response": "org-usage-response",
|
|
6595
|
-
"errors": [
|
|
6596
|
-
"unauthorized",
|
|
6597
|
-
"not_found",
|
|
6598
|
-
"validation_error",
|
|
6599
|
-
"rate_limited"
|
|
6600
|
-
],
|
|
6601
|
-
"transport": "http",
|
|
6602
|
-
"notes": "Identical to `GET /api/org/usage` for the named org: the same window rule, the same `from_day <= to_day` cross-field check, and the same echoed window. An unknown `:id` is `404 not_found`, the same every public host and the private address answer for this path while the operator API is not enabled. A role the route does not list gets that same `404 not_found`, so a read never reveals that it exists.",
|
|
6603
|
-
"operator": {
|
|
6604
|
-
"roles": [
|
|
6605
|
-
"operator-admin",
|
|
6606
|
-
"operator-finance",
|
|
6607
|
-
"operator-support"
|
|
6608
|
-
]
|
|
6609
|
-
}
|
|
6610
|
-
},
|
|
6611
6478
|
{
|
|
6612
6479
|
"method": "GET",
|
|
6613
6480
|
"path": "/api/billing",
|
package/dist/app-users.d.ts
CHANGED
|
@@ -62,8 +62,8 @@ export declare const providerSlug: z.ZodString;
|
|
|
62
62
|
* mailed token, which is why `patchAppUserRequest` cannot set it: see there.
|
|
63
63
|
*/
|
|
64
64
|
export declare const appUserStatus: z.ZodEnum<{
|
|
65
|
-
active: "active";
|
|
66
65
|
pending_verification: "pending_verification";
|
|
66
|
+
active: "active";
|
|
67
67
|
blocked: "blocked";
|
|
68
68
|
}>;
|
|
69
69
|
export type AppUserStatus = z.infer<typeof appUserStatus>;
|
|
@@ -80,8 +80,8 @@ export declare const appUser: z.ZodObject<{
|
|
|
80
80
|
display_name: z.ZodNullable<z.ZodString>;
|
|
81
81
|
role_id: z.ZodUUID;
|
|
82
82
|
status: z.ZodEnum<{
|
|
83
|
-
active: "active";
|
|
84
83
|
pending_verification: "pending_verification";
|
|
84
|
+
active: "active";
|
|
85
85
|
blocked: "blocked";
|
|
86
86
|
}>;
|
|
87
87
|
has_password: z.ZodBoolean;
|
|
@@ -104,8 +104,8 @@ export declare const appUserListResponse: z.ZodObject<{
|
|
|
104
104
|
display_name: z.ZodNullable<z.ZodString>;
|
|
105
105
|
role_id: z.ZodUUID;
|
|
106
106
|
status: z.ZodEnum<{
|
|
107
|
-
active: "active";
|
|
108
107
|
pending_verification: "pending_verification";
|
|
108
|
+
active: "active";
|
|
109
109
|
blocked: "blocked";
|
|
110
110
|
}>;
|
|
111
111
|
has_password: z.ZodBoolean;
|
package/dist/billing.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export declare function isEuCountry(country: string): boolean;
|
|
|
26
26
|
export declare function currencyForCountry(country: string): PlanCurrency;
|
|
27
27
|
/** Who is paying: a company (may hold a VAT ID) or a person (a full name, never a VAT ID). */
|
|
28
28
|
export declare const payerKind: z.ZodEnum<{
|
|
29
|
-
person: "person";
|
|
30
29
|
company: "company";
|
|
30
|
+
person: "person";
|
|
31
31
|
}>;
|
|
32
32
|
export type PayerKind = z.infer<typeof payerKind>;
|
|
33
33
|
/** The billing cycle: monthly, or yearly at twelve months for 15 % off (#103). */
|
|
@@ -295,16 +295,16 @@ export type CheckoutResponse = z.infer<typeof checkoutResponse>;
|
|
|
295
295
|
export declare const checkoutStatus: z.ZodObject<{
|
|
296
296
|
checkout_id: z.ZodUUID;
|
|
297
297
|
status: z.ZodEnum<{
|
|
298
|
-
pending: "pending";
|
|
299
|
-
canceled: "canceled";
|
|
300
298
|
failed: "failed";
|
|
299
|
+
pending: "pending";
|
|
301
300
|
paid: "paid";
|
|
301
|
+
canceled: "canceled";
|
|
302
302
|
expired: "expired";
|
|
303
303
|
}>;
|
|
304
304
|
purpose: z.ZodEnum<{
|
|
305
|
-
invoice: "invoice";
|
|
306
305
|
upgrade: "upgrade";
|
|
307
306
|
payment_method: "payment_method";
|
|
307
|
+
invoice: "invoice";
|
|
308
308
|
}>;
|
|
309
309
|
plan: z.ZodEnum<{
|
|
310
310
|
basic: "basic";
|
|
@@ -397,10 +397,10 @@ export declare const paymentMethodChangeRequest: z.ZodObject<{
|
|
|
397
397
|
export type PaymentMethodChangeRequest = z.infer<typeof paymentMethodChangeRequest>;
|
|
398
398
|
/** The billing account's own status, distinct from the org's plan: `billing_accounts` holds no plan, currency or period of its own. */
|
|
399
399
|
export declare const billingAccountStatus: z.ZodEnum<{
|
|
400
|
-
pending: "pending";
|
|
401
400
|
active: "active";
|
|
402
|
-
|
|
401
|
+
pending: "pending";
|
|
403
402
|
canceled: "canceled";
|
|
403
|
+
past_due: "past_due";
|
|
404
404
|
}>;
|
|
405
405
|
export type BillingAccountStatus = z.infer<typeof billingAccountStatus>;
|
|
406
406
|
/** The payment method on file, read from the active Mollie mandate — never a card or bank number, only its display fields. */
|
|
@@ -500,10 +500,10 @@ export declare const billingAccount: z.ZodObject<{
|
|
|
500
500
|
yearly: "yearly";
|
|
501
501
|
}>;
|
|
502
502
|
status: z.ZodEnum<{
|
|
503
|
-
pending: "pending";
|
|
504
503
|
active: "active";
|
|
505
|
-
|
|
504
|
+
pending: "pending";
|
|
506
505
|
canceled: "canceled";
|
|
506
|
+
past_due: "past_due";
|
|
507
507
|
}>;
|
|
508
508
|
period_starts_at: z.ZodNullable<z.ZodISODateTime>;
|
|
509
509
|
period_ends_at: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -586,10 +586,10 @@ export declare const billingView: z.ZodObject<{
|
|
|
586
586
|
yearly: "yearly";
|
|
587
587
|
}>;
|
|
588
588
|
status: z.ZodEnum<{
|
|
589
|
-
pending: "pending";
|
|
590
589
|
active: "active";
|
|
591
|
-
|
|
590
|
+
pending: "pending";
|
|
592
591
|
canceled: "canceled";
|
|
592
|
+
past_due: "past_due";
|
|
593
593
|
}>;
|
|
594
594
|
period_starts_at: z.ZodNullable<z.ZodISODateTime>;
|
|
595
595
|
period_ends_at: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -714,10 +714,10 @@ export declare const billingChangeResponse: z.ZodObject<{
|
|
|
714
714
|
yearly: "yearly";
|
|
715
715
|
}>;
|
|
716
716
|
status: z.ZodEnum<{
|
|
717
|
-
pending: "pending";
|
|
718
717
|
active: "active";
|
|
719
|
-
|
|
718
|
+
pending: "pending";
|
|
720
719
|
canceled: "canceled";
|
|
720
|
+
past_due: "past_due";
|
|
721
721
|
}>;
|
|
722
722
|
period_starts_at: z.ZodNullable<z.ZodISODateTime>;
|
|
723
723
|
period_ends_at: z.ZodNullable<z.ZodISODateTime>;
|
package/dist/errors.d.ts
CHANGED
|
@@ -87,9 +87,9 @@ export type InvalidCodeDetails = z.infer<typeof invalidCodeDetails>;
|
|
|
87
87
|
*/
|
|
88
88
|
export declare const planLimitDetails: z.ZodObject<{
|
|
89
89
|
limit: z.ZodEnum<{
|
|
90
|
+
apps: "apps";
|
|
90
91
|
seats: "seats";
|
|
91
92
|
robots: "robots";
|
|
92
|
-
apps: "apps";
|
|
93
93
|
app_users: "app_users";
|
|
94
94
|
live_video_ms_per_month: "live_video_ms_per_month";
|
|
95
95
|
asset_bytes_per_robot: "asset_bytes_per_robot";
|
|
@@ -110,9 +110,9 @@ export declare const planLimitDetails: z.ZodObject<{
|
|
|
110
110
|
enterprise: "enterprise";
|
|
111
111
|
}>>;
|
|
112
112
|
addon: z.ZodNullable<z.ZodEnum<{
|
|
113
|
+
apps: "apps";
|
|
113
114
|
seats: "seats";
|
|
114
115
|
robots: "robots";
|
|
115
|
-
apps: "apps";
|
|
116
116
|
app_user_packs: "app_user_packs";
|
|
117
117
|
live_video_packs: "live_video_packs";
|
|
118
118
|
}>>;
|
|
@@ -141,9 +141,9 @@ export type PlanLimitDetails = z.infer<typeof planLimitDetails>;
|
|
|
141
141
|
*/
|
|
142
142
|
export declare const assetPlanLimitDetails: z.ZodObject<{
|
|
143
143
|
limit: z.ZodEnum<{
|
|
144
|
+
apps: "apps";
|
|
144
145
|
seats: "seats";
|
|
145
146
|
robots: "robots";
|
|
146
|
-
apps: "apps";
|
|
147
147
|
app_users: "app_users";
|
|
148
148
|
live_video_ms_per_month: "live_video_ms_per_month";
|
|
149
149
|
asset_bytes_per_robot: "asset_bytes_per_robot";
|
|
@@ -164,9 +164,9 @@ export declare const assetPlanLimitDetails: z.ZodObject<{
|
|
|
164
164
|
enterprise: "enterprise";
|
|
165
165
|
}>>;
|
|
166
166
|
addon: z.ZodNullable<z.ZodEnum<{
|
|
167
|
+
apps: "apps";
|
|
167
168
|
seats: "seats";
|
|
168
169
|
robots: "robots";
|
|
169
|
-
apps: "apps";
|
|
170
170
|
app_user_packs: "app_user_packs";
|
|
171
171
|
live_video_packs: "live_video_packs";
|
|
172
172
|
}>>;
|
|
@@ -179,9 +179,9 @@ export type AssetPlanLimitDetails = z.infer<typeof assetPlanLimitDetails>;
|
|
|
179
179
|
/** The `details` of a `403 plan_required` refusal: the feature, the org's own plan, and the cheapest plan that has it (`requiredPlanFor`). */
|
|
180
180
|
export declare const planRequiredDetails: z.ZodObject<{
|
|
181
181
|
feature: z.ZodEnum<{
|
|
182
|
-
app_mcp: "app_mcp";
|
|
183
|
-
two_factor: "two_factor";
|
|
184
182
|
require_two_factor: "require_two_factor";
|
|
183
|
+
two_factor: "two_factor";
|
|
184
|
+
app_mcp: "app_mcp";
|
|
185
185
|
app_oidc: "app_oidc";
|
|
186
186
|
hosted_logo: "hosted_logo";
|
|
187
187
|
audit_export: "audit_export";
|
|
@@ -242,5 +242,5 @@ export type PaymentProviderUnavailableDetails = z.infer<typeof paymentProviderUn
|
|
|
242
242
|
* list is the shared vocabulary, not a closed set, so a new refusal never
|
|
243
243
|
* needs a contracts release before it can be reported honestly.
|
|
244
244
|
*/
|
|
245
|
-
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating"
|
|
245
|
+
export declare const ERROR_CODES: readonly ["not_found", "validation_error", "bad_request", "unknown_datapoint", "invalid_token", "protocol_mismatch", "bridge_too_old", "invalid_frame", "duplicate_slug", "reserved_slug", "unknown_slug", "unknown_field_path", "unknown_type", "unknown_topic", "invalid_rate", "invalid_range", "config_conflict", "no_data", "robot_offline", "bridge_timeout", "unauthorized", "forbidden", "invalid_credentials", "token_expired", "token_revoked", "email_taken", "identifier_taken", "weak_password", "account_blocked", "busy", "parameter_invalid", "cancel_rejected", "job_lost", "job_unknown_to_bridge", "action_server_lost", "action_failed", "goal_rejected", "goal_send_failed", "result_failed", "goal_uncontrollable", "bridge_disconnected", "config_changed", "publisher_busy", "unknown_command", "not_subscribable", "camera_offline", "no_snapshot_yet", "live_unavailable", "wrong_kind", "not_recorded", "not_aggregatable", "quota_exceeded", "credential_in_use", "goal_timeout", "robot_in_use", "robot_deletion_partial", "job_queue_full", "invalid_uuid", "rate_limited", "tier_required", "token_spent", "service_timeout", "asset_missing", "dynamic_registration_disabled", "client_limit_reached", "idp_unavailable", "mcp_disabled", "tool_not_available", "capability_required", "last_owner", "role_name_taken", "role_in_use", "last_role", "target_state_conflict", "signup_closed", "draft_not_a_document", "internal_error", "not_cancellable", "unsupported_media_type", "wrong_browser", "invalid_yaml", "unstorable_yaml", "registration_closed", "domain_not_allowed", "email_unverified", "origin_not_allowed", "template_invalid", "provider_disabled", "provider_misconfigured", "invalid_redirect_uri", "interaction_expired", "invalid_code", "method_not_allowed", "plan_limit", "plan_required", "org_locked", "file_too_large", "billing_unavailable", "payment_provider_unavailable", "history_migrating"];
|
|
246
246
|
export type ErrorCode = (typeof ERROR_CODES)[number];
|
package/dist/errors.js
CHANGED
|
@@ -1069,18 +1069,4 @@ export const ERROR_CODES = [
|
|
|
1069
1069
|
* finished. Retry later; nothing in the request needs to change.
|
|
1070
1070
|
*/
|
|
1071
1071
|
'history_migrating',
|
|
1072
|
-
// 2026-10 — the operator's admin API (fleetless/fleetless#268).
|
|
1073
|
-
/**
|
|
1074
|
-
* `409`: an execute named a preview that is no longer true — the state it
|
|
1075
|
-
* read has changed, or it is older than ten minutes. Nothing was done.
|
|
1076
|
-
* `details` (`previewStaleDetails`) carries a fresh preview and its token;
|
|
1077
|
-
* confirm that one instead.
|
|
1078
|
-
*/
|
|
1079
|
-
'preview_stale',
|
|
1080
|
-
/**
|
|
1081
|
-
* `409`: the `idempotency_key` was already used for a different command,
|
|
1082
|
-
* input or operator. Nothing was done. A retry of the same execute reuses
|
|
1083
|
-
* its key and gets the first answer; anything else needs a new key.
|
|
1084
|
-
*/
|
|
1085
|
-
'idempotency_key_reused',
|
|
1086
1072
|
];
|
package/dist/index.d.ts
CHANGED
|
@@ -51,14 +51,8 @@ export { apiError, parameterViolation, parameterInvalidDetails, cancelRejectedDe
|
|
|
51
51
|
export type { ApiError, ParameterViolation, ParameterInvalidDetails, CancelRejectedDetails, InvalidCodeDetails, ErrorCode, PlanLimitDetails, AssetPlanLimitDetails, PlanRequiredDetails, OrgLockedDetails, FileTooLargeDetails, PaymentProviderUnavailableDetails, } from './errors.js';
|
|
52
52
|
export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
|
|
53
53
|
export type { OauthErrorCode, OauthError, OauthRedirectResponse, OauthCodeTokenRequest, OauthRefreshTokenRequest, OauthTokenRequest, OauthTokenResponse, RedirectUri, OauthAuthorizeQuery, DynamicClientRegistrationRequest, DynamicClientRegistrationResponse, AuthorizationServerMetadata, ProtectedResourceMetadata, } from './oauth.js';
|
|
54
|
-
export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes
|
|
55
|
-
export type { RouteEntry, RouteParam, RouteAudience, RouteAuth, RouteSection, RouteMethod, RouteTransport,
|
|
56
|
-
export { OPERATOR_ROLES, operatorRole, CONFIRMATION_LEVELS, confirmationLevel, OPERATOR_ASSERTION_ISSUER, OPERATOR_AUTH_SCHEME, OPERATOR_ASSERTION_MAX_LIFETIME_SECONDS, OPERATOR_ASSERTION_MAX_FUTURE_SKEW_SECONDS, OPERATOR_ASSERTION_REPLAY_WINDOW_SECONDS, OPERATOR_REASON_MIN_LENGTH, OPERATOR_REASON_MAX_LENGTH, OPERATOR_PREVIEW_MAX_AGE_MS, operatorAssertionClaims, } from './operator.js';
|
|
57
|
-
export type { OperatorRole, ConfirmationLevel, OperatorAssertionClaims, } from './operator.js';
|
|
58
|
-
export { previewEffect, operatorPreview, operatorCommandRequest, operatorAuditRef, operatorCommandResponse, previewStaleDetails, noopCommandInput, noopCommandResult, noopCommandRequest, noopCommandResponse, } from './operator-commands.js';
|
|
59
|
-
export type { PreviewEffect, OperatorPreview, OperatorAuditRef, PreviewStaleDetails, NoopCommandInput, NoopCommandResult, } from './operator-commands.js';
|
|
60
|
-
export { ADMIN_SEARCH_KINDS, ADMIN_SEARCH_LIMIT, adminSearchQuery, adminSearchHit, adminSearchResponse, adminOrgBillingState, adminOrgDetail, } from './admin.js';
|
|
61
|
-
export type { AdminSearchQuery, AdminSearchHit, AdminSearchResponse, AdminOrgBillingState, AdminOrgDetail, } from './admin.js';
|
|
54
|
+
export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
|
|
55
|
+
export type { RouteEntry, RouteParam, RouteAudience, RouteAuth, RouteSection, RouteMethod, RouteTransport, } from './routes.js';
|
|
62
56
|
export { planId, PLAN_ORDER, planLimitKey, planLimits, planFeature, planFeatures, planPrices, planSupport, planCatalogueEntry, addonKey, addonCatalogueEntry, usdCentsFromEurCents, yearlyEurCents, pricesFromEurMonth, PLANS, ADDONS, requiredPlanFor, nextPlanRaising, } from './plans.js';
|
|
63
57
|
export type { PlanId, PlanLimitKey, PlanLimits, PlanFeature, PlanFeatures, PlanPrices, PlanSupport, PlanCatalogueEntry, AddonKey, AddonCatalogueEntry, } from './plans.js';
|
|
64
58
|
export { planCurrency, orgAddons, orgPlanUsage, planChangeKeep, planChangeReason, pendingPlanChange, orgLock, orgPlan, planChangeRequest, planOverrides, adminPlanChangeRequest, } from './plans.js';
|
package/dist/index.js
CHANGED
|
@@ -60,11 +60,7 @@ fileTooLargeDetails,
|
|
|
60
60
|
// 2026-10-04 — billing through Mollie (#104).
|
|
61
61
|
paymentProviderUnavailableDetails, } from './errors.js';
|
|
62
62
|
export { oauthErrorCode, oauthError, oauthRedirectResponse, oauthCodeTokenRequest, oauthRefreshTokenRequest, oauthTokenRequest, oauthTokenResponse, redirectUri, codeChallengeMethod, oauthAuthorizeQuery, dynamicClientRegistrationRequest, MCP_DCR_MAX_REDIRECT_URIS, dynamicClientRegistrationResponse, authorizationServerMetadata, protectedResourceMetadata, } from './oauth.js';
|
|
63
|
-
export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes
|
|
64
|
-
// fleetless/fleetless#268 — the operator platform's admin API foundation.
|
|
65
|
-
export { OPERATOR_ROLES, operatorRole, CONFIRMATION_LEVELS, confirmationLevel, OPERATOR_ASSERTION_ISSUER, OPERATOR_AUTH_SCHEME, OPERATOR_ASSERTION_MAX_LIFETIME_SECONDS, OPERATOR_ASSERTION_MAX_FUTURE_SKEW_SECONDS, OPERATOR_ASSERTION_REPLAY_WINDOW_SECONDS, OPERATOR_REASON_MIN_LENGTH, OPERATOR_REASON_MAX_LENGTH, OPERATOR_PREVIEW_MAX_AGE_MS, operatorAssertionClaims, } from './operator.js';
|
|
66
|
-
export { previewEffect, operatorPreview, operatorCommandRequest, operatorAuditRef, operatorCommandResponse, previewStaleDetails, noopCommandInput, noopCommandResult, noopCommandRequest, noopCommandResponse, } from './operator-commands.js';
|
|
67
|
-
export { ADMIN_SEARCH_KINDS, ADMIN_SEARCH_LIMIT, adminSearchQuery, adminSearchHit, adminSearchResponse, adminOrgBillingState, adminOrgDetail, } from './admin.js';
|
|
63
|
+
export { ROUTES, ROUTE_SECTIONS, IN_HANDLER_ROUTES, developerSignInRoutes } from './routes.js';
|
|
68
64
|
// 2026-10-02 — plans (#103). The catalogue (I-1) only: `PLANS` and `ADDONS`
|
|
69
65
|
// are deliberately not constants exports (`constants.json` is vendored by
|
|
70
66
|
// the bridge and must stay unchanged) but are exported values of this
|
package/dist/plans.d.ts
CHANGED
|
@@ -28,9 +28,9 @@ export declare const PLAN_ORDER: readonly PlanId[];
|
|
|
28
28
|
* off the same catalogue row.
|
|
29
29
|
*/
|
|
30
30
|
export declare const planLimitKey: z.ZodEnum<{
|
|
31
|
+
apps: "apps";
|
|
31
32
|
seats: "seats";
|
|
32
33
|
robots: "robots";
|
|
33
|
-
apps: "apps";
|
|
34
34
|
app_users: "app_users";
|
|
35
35
|
live_video_ms_per_month: "live_video_ms_per_month";
|
|
36
36
|
asset_bytes_per_robot: "asset_bytes_per_robot";
|
|
@@ -58,9 +58,9 @@ export type PlanLimits = z.infer<typeof planLimits>;
|
|
|
58
58
|
* may be bought at all — `pro` and `enterprise`).
|
|
59
59
|
*/
|
|
60
60
|
export declare const planFeature: z.ZodEnum<{
|
|
61
|
-
app_mcp: "app_mcp";
|
|
62
|
-
two_factor: "two_factor";
|
|
63
61
|
require_two_factor: "require_two_factor";
|
|
62
|
+
two_factor: "two_factor";
|
|
63
|
+
app_mcp: "app_mcp";
|
|
64
64
|
app_oidc: "app_oidc";
|
|
65
65
|
hosted_logo: "hosted_logo";
|
|
66
66
|
audit_export: "audit_export";
|
|
@@ -68,9 +68,9 @@ export declare const planFeature: z.ZodEnum<{
|
|
|
68
68
|
}>;
|
|
69
69
|
export type PlanFeature = z.infer<typeof planFeature>;
|
|
70
70
|
export declare const planFeatures: z.ZodObject<{
|
|
71
|
-
app_mcp: z.ZodBoolean;
|
|
72
|
-
two_factor: z.ZodBoolean;
|
|
73
71
|
require_two_factor: z.ZodBoolean;
|
|
72
|
+
two_factor: z.ZodBoolean;
|
|
73
|
+
app_mcp: z.ZodBoolean;
|
|
74
74
|
app_oidc: z.ZodBoolean;
|
|
75
75
|
hosted_logo: z.ZodBoolean;
|
|
76
76
|
audit_export: z.ZodBoolean;
|
|
@@ -85,8 +85,8 @@ export declare const planPrices: z.ZodObject<{
|
|
|
85
85
|
}, z.core.$strip>;
|
|
86
86
|
export type PlanPrices = z.infer<typeof planPrices>;
|
|
87
87
|
export declare const planSupport: z.ZodEnum<{
|
|
88
|
-
community: "community";
|
|
89
88
|
email: "email";
|
|
89
|
+
community: "community";
|
|
90
90
|
priority: "priority";
|
|
91
91
|
named_contact: "named_contact";
|
|
92
92
|
}>;
|
|
@@ -110,9 +110,9 @@ export declare const planCatalogueEntry: z.ZodObject<{
|
|
|
110
110
|
audit_days: z.ZodNullable<z.ZodNumber>;
|
|
111
111
|
}, z.core.$strip>;
|
|
112
112
|
features: z.ZodObject<{
|
|
113
|
-
app_mcp: z.ZodBoolean;
|
|
114
|
-
two_factor: z.ZodBoolean;
|
|
115
113
|
require_two_factor: z.ZodBoolean;
|
|
114
|
+
two_factor: z.ZodBoolean;
|
|
115
|
+
app_mcp: z.ZodBoolean;
|
|
116
116
|
app_oidc: z.ZodBoolean;
|
|
117
117
|
hosted_logo: z.ZodBoolean;
|
|
118
118
|
audit_export: z.ZodBoolean;
|
|
@@ -125,8 +125,8 @@ export declare const planCatalogueEntry: z.ZodObject<{
|
|
|
125
125
|
usd_year: z.ZodNumber;
|
|
126
126
|
}, z.core.$strip>>;
|
|
127
127
|
support: z.ZodEnum<{
|
|
128
|
-
community: "community";
|
|
129
128
|
email: "email";
|
|
129
|
+
community: "community";
|
|
130
130
|
priority: "priority";
|
|
131
131
|
named_contact: "named_contact";
|
|
132
132
|
}>;
|
|
@@ -138,25 +138,25 @@ export type PlanCatalogueEntry = z.infer<typeof planCatalogueEntry>;
|
|
|
138
138
|
* buy them (`planFeature.addons`: `pro` and `enterprise`).
|
|
139
139
|
*/
|
|
140
140
|
export declare const addonKey: z.ZodEnum<{
|
|
141
|
+
apps: "apps";
|
|
141
142
|
seats: "seats";
|
|
142
143
|
robots: "robots";
|
|
143
|
-
apps: "apps";
|
|
144
144
|
app_user_packs: "app_user_packs";
|
|
145
145
|
live_video_packs: "live_video_packs";
|
|
146
146
|
}>;
|
|
147
147
|
export type AddonKey = z.infer<typeof addonKey>;
|
|
148
148
|
export declare const addonCatalogueEntry: z.ZodObject<{
|
|
149
149
|
key: z.ZodEnum<{
|
|
150
|
+
apps: "apps";
|
|
150
151
|
seats: "seats";
|
|
151
152
|
robots: "robots";
|
|
152
|
-
apps: "apps";
|
|
153
153
|
app_user_packs: "app_user_packs";
|
|
154
154
|
live_video_packs: "live_video_packs";
|
|
155
155
|
}>;
|
|
156
156
|
raises: z.ZodEnum<{
|
|
157
|
+
apps: "apps";
|
|
157
158
|
seats: "seats";
|
|
158
159
|
robots: "robots";
|
|
159
|
-
apps: "apps";
|
|
160
160
|
app_users: "app_users";
|
|
161
161
|
live_video_ms_per_month: "live_video_ms_per_month";
|
|
162
162
|
asset_bytes_per_robot: "asset_bytes_per_robot";
|
|
@@ -367,9 +367,9 @@ export declare const orgPlan: z.ZodObject<{
|
|
|
367
367
|
audit_days: z.ZodNullable<z.ZodNumber>;
|
|
368
368
|
}, z.core.$strip>;
|
|
369
369
|
features: z.ZodObject<{
|
|
370
|
-
app_mcp: z.ZodBoolean;
|
|
371
|
-
two_factor: z.ZodBoolean;
|
|
372
370
|
require_two_factor: z.ZodBoolean;
|
|
371
|
+
two_factor: z.ZodBoolean;
|
|
372
|
+
app_mcp: z.ZodBoolean;
|
|
373
373
|
app_oidc: z.ZodBoolean;
|
|
374
374
|
hosted_logo: z.ZodBoolean;
|
|
375
375
|
audit_export: z.ZodBoolean;
|
|
@@ -454,9 +454,9 @@ export type PlanChangeRequest = z.infer<typeof planChangeRequest>;
|
|
|
454
454
|
* optional — omitted and `null` are two different instructions.
|
|
455
455
|
*/
|
|
456
456
|
export declare const planOverrides: z.ZodObject<{
|
|
457
|
+
apps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
457
458
|
seats: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
458
459
|
robots: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
459
|
-
apps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
460
460
|
app_users: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
461
461
|
live_video_ms_per_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
462
462
|
asset_bytes_per_robot: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -489,9 +489,9 @@ export declare const adminPlanChangeRequest: z.ZodObject<{
|
|
|
489
489
|
live_video_packs: z.ZodOptional<z.ZodNumber>;
|
|
490
490
|
}, z.core.$strict>>;
|
|
491
491
|
overrides: z.ZodOptional<z.ZodObject<{
|
|
492
|
+
apps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
492
493
|
seats: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
493
494
|
robots: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
494
|
-
apps: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
495
495
|
app_users: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
496
496
|
live_video_ms_per_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
497
497
|
asset_bytes_per_robot: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
package/dist/routes.d.ts
CHANGED
|
@@ -28,17 +28,13 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import type { ZodType } from 'zod';
|
|
30
30
|
import type { ErrorCode } from './errors.js';
|
|
31
|
-
import type { ConfirmationLevel, OperatorRole } from './operator.js';
|
|
32
31
|
export type RouteMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
33
32
|
export type RouteAudience = 'developer' | 'client' | 'internal';
|
|
34
33
|
/**
|
|
35
34
|
* `ops` (2026-10-02, fleetless/fleetless#103): a bearer token the operator
|
|
36
35
|
* holds (`OPS_API_TOKEN`); never reachable through a public host.
|
|
37
|
-
*
|
|
38
|
-
* `operator` (fleetless/fleetless#268): a short-lived assertion naming the
|
|
39
|
-
* acting person and their roles; the roles a route needs are in `operator`.
|
|
40
36
|
*/
|
|
41
|
-
export type RouteAuth = 'developer' | 'developer_or_client' | 'none' | 'robot_upload' | 'in_handler' | 'ops'
|
|
37
|
+
export type RouteAuth = 'developer' | 'developer_or_client' | 'none' | 'robot_upload' | 'in_handler' | 'ops';
|
|
42
38
|
export type RouteTransport = 'http' | 'websocket';
|
|
43
39
|
export type RouteSection = 'health' | 'developer-auth' | 'client-auth' | 'org' | 'billing' | 'users' | 'apps' | 'robots' | 'config' | 'alerts' | 'commands' | 'cameras' | 'assets' | 'mcp' | 'transports';
|
|
44
40
|
export interface RouteParam {
|
|
@@ -46,13 +42,6 @@ export interface RouteParam {
|
|
|
46
42
|
/** One sentence: what the segment identifies and where a caller gets it. */
|
|
47
43
|
readonly description: string;
|
|
48
44
|
}
|
|
49
|
-
/** Set exactly when `auth` is `operator` (fleetless/fleetless#268). */
|
|
50
|
-
export interface RouteOperatorAccess {
|
|
51
|
-
/** The roles that may call this route (fleetless/fleetless#268). Never empty. */
|
|
52
|
-
readonly roles: readonly OperatorRole[];
|
|
53
|
-
/** Set on command routes only: how the operator app confirms an execute. */
|
|
54
|
-
readonly confirmation?: ConfirmationLevel;
|
|
55
|
-
}
|
|
56
45
|
export interface RouteEntry {
|
|
57
46
|
readonly method: RouteMethod;
|
|
58
47
|
/** The display path with `:name` params and no inline regex. */
|
|
@@ -100,8 +89,6 @@ export interface RouteEntry {
|
|
|
100
89
|
readonly transport: RouteTransport;
|
|
101
90
|
/** Markdown rendered under the route; the place for what the schema cannot say. */
|
|
102
91
|
readonly notes?: string;
|
|
103
|
-
/** Set exactly when `auth` is `operator`. */
|
|
104
|
-
readonly operator?: RouteOperatorAccess;
|
|
105
92
|
}
|
|
106
93
|
export declare const ROUTE_SECTIONS: readonly {
|
|
107
94
|
readonly id: RouteSection;
|
|
@@ -136,9 +123,3 @@ export declare const IN_HANDLER_ROUTES: readonly string[];
|
|
|
136
123
|
*/
|
|
137
124
|
export declare function developerSignInRoutes(prefix: '/console/oauth' | '/mcp/oauth'): RouteEntry[];
|
|
138
125
|
export declare const ROUTES: readonly RouteEntry[];
|
|
139
|
-
/**
|
|
140
|
-
* The roles (and, for a command, the confirmation level) a caller of this
|
|
141
|
-
* operator route needs, looked up by method and path (fleetless/fleetless#268).
|
|
142
|
-
* Throws for a route that is not `auth: 'operator'`.
|
|
143
|
-
*/
|
|
144
|
-
export declare function operatorAccess(method: RouteMethod, path: string): RouteOperatorAccess;
|