@fleetless/contracts 1.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 +26 -0
- package/LICENSE +202 -0
- package/NOTICE +17 -0
- package/README.md +88 -0
- package/artifacts/constants.json +24 -0
- package/artifacts/openapi.json +17219 -0
- package/artifacts/routes.json +4605 -0
- package/artifacts/schema/accept-team-invite-request.schema.json +22 -0
- package/artifacts/schema/action-config.schema.json +198 -0
- package/artifacts/schema/alert-list-response.schema.json +172 -0
- package/artifacts/schema/api-error.schema.json +20 -0
- package/artifacts/schema/app-auth-config.schema.json +106 -0
- package/artifacts/schema/app-invitation-list-response.schema.json +57 -0
- package/artifacts/schema/app-invitation.schema.json +69 -0
- package/artifacts/schema/app-list-response.schema.json +82 -0
- package/artifacts/schema/app-mail-template-list-response.schema.json +68 -0
- package/artifacts/schema/app-mail-template.schema.json +54 -0
- package/artifacts/schema/app-oidc-provider-list-response.schema.json +93 -0
- package/artifacts/schema/app-oidc-provider.schema.json +80 -0
- package/artifacts/schema/app-user-list-response.schema.json +111 -0
- package/artifacts/schema/app-user.schema.json +98 -0
- package/artifacts/schema/app.schema.json +69 -0
- package/artifacts/schema/apply-error.schema.json +41 -0
- package/artifacts/schema/asset-list-response.schema.json +288 -0
- package/artifacts/schema/asset-sync-request.schema.json +17 -0
- package/artifacts/schema/asset-sync-response.schema.json +16 -0
- package/artifacts/schema/asset-sync-status.schema.json +136 -0
- package/artifacts/schema/asset.schema.json +68 -0
- package/artifacts/schema/audit-actor.schema.json +32 -0
- package/artifacts/schema/audit-event.schema.json +119 -0
- package/artifacts/schema/audit-list-response.schema.json +144 -0
- package/artifacts/schema/audit-query.schema.json +79 -0
- package/artifacts/schema/auth-error.schema.json +23 -0
- package/artifacts/schema/auth-me-response.schema.json +99 -0
- package/artifacts/schema/auth-ok.schema.json +115 -0
- package/artifacts/schema/authorization-server-metadata.schema.json +80 -0
- package/artifacts/schema/bridge-asset-progress.schema.json +99 -0
- package/artifacts/schema/bridge-assets-available.schema.json +25 -0
- package/artifacts/schema/bridge-camera-state.schema.json +78 -0
- package/artifacts/schema/bridge-config-applied.schema.json +67 -0
- package/artifacts/schema/bridge-hello.schema.json +65 -0
- package/artifacts/schema/bridge-introspect.schema.json +114 -0
- package/artifacts/schema/bridge-job-lost.schema.json +22 -0
- package/artifacts/schema/bridge-job-update.schema.json +100 -0
- package/artifacts/schema/bridge-pong.schema.json +19 -0
- package/artifacts/schema/bridge-pressure.schema.json +292 -0
- package/artifacts/schema/bridge-state.schema.json +24 -0
- package/artifacts/schema/bridge-type-definitions.schema.json +169 -0
- package/artifacts/schema/busy-details.schema.json +115 -0
- package/artifacts/schema/camera-descriptor.schema.json +45 -0
- package/artifacts/schema/camera-list-response.schema.json +58 -0
- package/artifacts/schema/camera-source.schema.json +240 -0
- package/artifacts/schema/cancel-request.schema.json +20 -0
- package/artifacts/schema/client-accept-invitation-request.schema.json +35 -0
- package/artifacts/schema/client-auth.schema.json +18 -0
- package/artifacts/schema/client-cancel.schema.json +45 -0
- package/artifacts/schema/client-identity.schema.json +103 -0
- package/artifacts/schema/client-invoke.schema.json +45 -0
- package/artifacts/schema/client-login-request.schema.json +29 -0
- package/artifacts/schema/client-logout-request.schema.json +14 -0
- package/artifacts/schema/client-mcp-interaction-decision-response.schema.json +15 -0
- package/artifacts/schema/client-mcp-interaction.schema.json +59 -0
- package/artifacts/schema/client-oidc-callback-query.schema.json +28 -0
- package/artifacts/schema/client-oidc-exchange-request.schema.json +21 -0
- package/artifacts/schema/client-oidc-start-query.schema.json +36 -0
- package/artifacts/schema/client-password-reset-confirm-request.schema.json +22 -0
- package/artifacts/schema/client-password-reset-request.schema.json +24 -0
- package/artifacts/schema/client-provider-list-query.schema.json +17 -0
- package/artifacts/schema/client-provider-list-response.schema.json +34 -0
- package/artifacts/schema/client-publish.schema.json +40 -0
- package/artifacts/schema/client-refresh-request.schema.json +14 -0
- package/artifacts/schema/client-register-request.schema.json +44 -0
- package/artifacts/schema/client-resend-verification-request.schema.json +24 -0
- package/artifacts/schema/client-subscribe.schema.json +43 -0
- package/artifacts/schema/client-unsubscribe.schema.json +26 -0
- package/artifacts/schema/client-verify-email-request.schema.json +15 -0
- package/artifacts/schema/cloud-asset-request.schema.json +37 -0
- package/artifacts/schema/cloud-camera-start.schema.json +41 -0
- package/artifacts/schema/cloud-camera-stop.schema.json +26 -0
- package/artifacts/schema/cloud-cancel.schema.json +33 -0
- package/artifacts/schema/cloud-config.schema.json +1635 -0
- package/artifacts/schema/cloud-hello-error.schema.json +23 -0
- package/artifacts/schema/cloud-hello-ok.schema.json +19 -0
- package/artifacts/schema/cloud-introspect-request.schema.json +19 -0
- package/artifacts/schema/cloud-invoke.schema.json +40 -0
- package/artifacts/schema/cloud-ping.schema.json +19 -0
- package/artifacts/schema/cloud-publish.schema.json +28 -0
- package/artifacts/schema/cloud-type-request.schema.json +30 -0
- package/artifacts/schema/command-result.schema.json +175 -0
- package/artifacts/schema/config-draft-response.schema.json +1695 -0
- package/artifacts/schema/config-state.schema.json +124 -0
- package/artifacts/schema/config-version-response.schema.json +1641 -0
- package/artifacts/schema/config-versions-response.schema.json +33 -0
- package/artifacts/schema/create-app-invitation-request.schema.json +40 -0
- package/artifacts/schema/create-app-oidc-provider-request.schema.json +70 -0
- package/artifacts/schema/create-app-request.schema.json +30 -0
- package/artifacts/schema/create-app-user-request.schema.json +42 -0
- package/artifacts/schema/create-robot-request.schema.json +14 -0
- package/artifacts/schema/create-robot-response.schema.json +44 -0
- package/artifacts/schema/create-server-key-response.schema.json +65 -0
- package/artifacts/schema/create-team-invite-request.schema.json +43 -0
- package/artifacts/schema/datapoint-alert-row.schema.json +160 -0
- package/artifacts/schema/datapoint-config.schema.json +366 -0
- package/artifacts/schema/datapoint-display.schema.json +31 -0
- package/artifacts/schema/datapoint-event.schema.json +34 -0
- package/artifacts/schema/datapoint-frame.schema.json +28 -0
- package/artifacts/schema/datapoint-list-response.schema.json +61 -0
- package/artifacts/schema/datapoint-value.schema.json +28 -0
- package/artifacts/schema/developer-login-request.schema.json +19 -0
- package/artifacts/schema/dynamic-client-registration-request.schema.json +60 -0
- package/artifacts/schema/dynamic-client-registration-response.schema.json +68 -0
- package/artifacts/schema/error-frame.schema.json +23 -0
- package/artifacts/schema/exposure-counts.schema.json +39 -0
- package/artifacts/schema/exposure-list-response.schema.json +43 -0
- package/artifacts/schema/fetch-types-request.schema.json +19 -0
- package/artifacts/schema/fetch-types-response.schema.json +163 -0
- package/artifacts/schema/fleetless-user-list-response.schema.json +73 -0
- package/artifacts/schema/fleetless-user.schema.json +60 -0
- package/artifacts/schema/history-buckets-response.schema.json +79 -0
- package/artifacts/schema/history-query.schema.json +58 -0
- package/artifacts/schema/history-response.schema.json +150 -0
- package/artifacts/schema/history-samples-response.schema.json +68 -0
- package/artifacts/schema/introspection-response.schema.json +118 -0
- package/artifacts/schema/invoke-or-service-response.schema.json +141 -0
- package/artifacts/schema/invoke-request.schema.json +23 -0
- package/artifacts/schema/invoke-response.schema.json +125 -0
- package/artifacts/schema/job-actor.schema.json +34 -0
- package/artifacts/schema/job-event.schema.json +158 -0
- package/artifacts/schema/job-response.schema.json +123 -0
- package/artifacts/schema/job-run-list-response.schema.json +222 -0
- package/artifacts/schema/job-run-query.schema.json +95 -0
- package/artifacts/schema/job-run-summary-query.schema.json +23 -0
- package/artifacts/schema/job-run-summary.schema.json +33 -0
- package/artifacts/schema/job-run.schema.json +195 -0
- package/artifacts/schema/job-state.schema.json +11 -0
- package/artifacts/schema/job.schema.json +106 -0
- package/artifacts/schema/latency-bucket.schema.json +63 -0
- package/artifacts/schema/live-session-response.schema.json +41 -0
- package/artifacts/schema/mail-outcome.schema.json +20 -0
- package/artifacts/schema/mail-template-preview-request.schema.json +35 -0
- package/artifacts/schema/mail-template-preview-response.schema.json +31 -0
- package/artifacts/schema/mail-template-problem-details.schema.json +24 -0
- package/artifacts/schema/mcp-consent-grant-list-response.schema.json +52 -0
- package/artifacts/schema/mcp-consent-grant.schema.json +39 -0
- package/artifacts/schema/mcp-robot-datasheet.schema.json +115 -0
- package/artifacts/schema/mcp-role-preview-response.schema.json +134 -0
- package/artifacts/schema/missing-asset-query.schema.json +11 -0
- package/artifacts/schema/oauth-authorize-query.schema.json +47 -0
- package/artifacts/schema/oauth-redirect-response.schema.json +15 -0
- package/artifacts/schema/oauth-token-request.schema.json +47 -0
- package/artifacts/schema/oauth-token-response.schema.json +38 -0
- package/artifacts/schema/org-alerts-query.schema.json +15 -0
- package/artifacts/schema/org-event-dropped.schema.json +26 -0
- package/artifacts/schema/org-event-replay.schema.json +97 -0
- package/artifacts/schema/org-event-subscribe.schema.json +14 -0
- package/artifacts/schema/org-event-unsubscribe.schema.json +14 -0
- package/artifacts/schema/org-event.schema.json +75 -0
- package/artifacts/schema/org-firing-alerts-response.schema.json +178 -0
- package/artifacts/schema/org-health-query.schema.json +13 -0
- package/artifacts/schema/org-latency-query.schema.json +42 -0
- package/artifacts/schema/org-latency-response.schema.json +124 -0
- package/artifacts/schema/org-quota-usage-counts.schema.json +42 -0
- package/artifacts/schema/org-quota-usage.schema.json +102 -0
- package/artifacts/schema/org-quotas.schema.json +51 -0
- package/artifacts/schema/org-usage-query.schema.json +19 -0
- package/artifacts/schema/org-usage-response.schema.json +77 -0
- package/artifacts/schema/org.schema.json +30 -0
- package/artifacts/schema/parameter-invalid-details.schema.json +37 -0
- package/artifacts/schema/parameter-spec.schema.json +120 -0
- package/artifacts/schema/parameter-violation.schema.json +24 -0
- package/artifacts/schema/password-change-request.schema.json +21 -0
- package/artifacts/schema/password-reset-confirm.schema.json +19 -0
- package/artifacts/schema/password-reset-request.schema.json +14 -0
- package/artifacts/schema/patch-app-oidc-provider-request.schema.json +50 -0
- package/artifacts/schema/patch-app-user-request.schema.json +34 -0
- package/artifacts/schema/patch-auth-me-request.schema.json +22 -0
- package/artifacts/schema/patch-fleetless-user-request.schema.json +20 -0
- package/artifacts/schema/patch-org-request.schema.json +15 -0
- package/artifacts/schema/patch-org-response.schema.json +40 -0
- package/artifacts/schema/patch-robot-request.schema.json +15 -0
- package/artifacts/schema/patch-robot-response.schema.json +40 -0
- package/artifacts/schema/pending-team-invite-list-response.schema.json +52 -0
- package/artifacts/schema/pending-team-invite.schema.json +39 -0
- package/artifacts/schema/protected-resource-metadata.schema.json +41 -0
- package/artifacts/schema/publish-config-response.schema.json +21 -0
- package/artifacts/schema/publish-request.schema.json +17 -0
- package/artifacts/schema/publisher-config.schema.json +285 -0
- package/artifacts/schema/put-app-auth-config-request.schema.json +93 -0
- package/artifacts/schema/put-app-mail-template-request.schema.json +35 -0
- package/artifacts/schema/put-config-draft-request.schema.json +13 -0
- package/artifacts/schema/put-datapoint-display-request.schema.json +31 -0
- package/artifacts/schema/put-robot-details-request.schema.json +41 -0
- package/artifacts/schema/put-robot-details-response.schema.json +43 -0
- package/artifacts/schema/rate-limit-details.schema.json +15 -0
- package/artifacts/schema/refresh-request.schema.json +13 -0
- package/artifacts/schema/release-live-query.schema.json +13 -0
- package/artifacts/schema/rename-slug-request.schema.json +23 -0
- package/artifacts/schema/rename-slug-response.schema.json +24 -0
- package/artifacts/schema/resource-health-event.schema.json +72 -0
- package/artifacts/schema/resource-health-list-response.schema.json +80 -0
- package/artifacts/schema/resource-health-state.schema.json +68 -0
- package/artifacts/schema/robot-config-doc.schema.json +1616 -0
- package/artifacts/schema/robot-delete-query.schema.json +12 -0
- package/artifacts/schema/robot-deletion-summary.schema.json +63 -0
- package/artifacts/schema/robot-detail-response.schema.json +262 -0
- package/artifacts/schema/robot-details-doc.schema.json +33 -0
- package/artifacts/schema/robot-jobs-response.schema.json +119 -0
- package/artifacts/schema/robot-latency-series.schema.json +81 -0
- package/artifacts/schema/robot-list-item.schema.json +94 -0
- package/artifacts/schema/robot-list-response.schema.json +106 -0
- package/artifacts/schema/robot.schema.json +30 -0
- package/artifacts/schema/role-list-response.schema.json +48 -0
- package/artifacts/schema/role-permissions.schema.json +61 -0
- package/artifacts/schema/role.schema.json +35 -0
- package/artifacts/schema/ros-graph.schema.json +99 -0
- package/artifacts/schema/server-key-list-response.schema.json +64 -0
- package/artifacts/schema/server-key.schema.json +51 -0
- package/artifacts/schema/service-call-response.schema.json +13 -0
- package/artifacts/schema/service-config.schema.json +198 -0
- package/artifacts/schema/session-tokens.schema.json +28 -0
- package/artifacts/schema/sign-up-request.schema.json +26 -0
- package/artifacts/schema/sign-up-response.schema.json +127 -0
- package/artifacts/schema/slug-usage-response.schema.json +32 -0
- package/artifacts/schema/snapshot-header.schema.json +44 -0
- package/artifacts/schema/snapshot-meta-response.schema.json +85 -0
- package/artifacts/schema/subscribe-error.schema.json +31 -0
- package/artifacts/schema/team-invite.schema.json +57 -0
- package/artifacts/schema/tier-change-request.schema.json +17 -0
- package/artifacts/schema/type-definition.schema.json +144 -0
- package/artifacts/schema/types-response.schema.json +156 -0
- package/artifacts/schema/update-app-request.schema.json +32 -0
- package/artifacts/schema/urdf-completeness.schema.json +50 -0
- package/artifacts/schema/validation-issue.schema.json +43 -0
- package/artifacts/schema/waitlist-request.schema.json +15 -0
- package/artifacts/schema-outgoing/bridge-asset-progress.schema.json +102 -0
- package/artifacts/schema-outgoing/bridge-assets-available.schema.json +26 -0
- package/artifacts/schema-outgoing/bridge-camera-state.schema.json +80 -0
- package/artifacts/schema-outgoing/bridge-config-applied.schema.json +69 -0
- package/artifacts/schema-outgoing/bridge-hello.schema.json +68 -0
- package/artifacts/schema-outgoing/bridge-introspect.schema.json +119 -0
- package/artifacts/schema-outgoing/bridge-job-lost.schema.json +23 -0
- package/artifacts/schema-outgoing/bridge-job-update.schema.json +102 -0
- package/artifacts/schema-outgoing/bridge-pong.schema.json +20 -0
- package/artifacts/schema-outgoing/bridge-type-definitions.schema.json +174 -0
- package/artifacts/schema-outgoing/datapoint-frame.schema.json +29 -0
- package/artifacts/schema-outgoing/snapshot-header.schema.json +45 -0
- package/dist/alerts.d.ts +255 -0
- package/dist/alerts.js +193 -0
- package/dist/app-users.d.ts +606 -0
- package/dist/app-users.js +696 -0
- package/dist/apps.d.ts +175 -0
- package/dist/apps.js +267 -0
- package/dist/assets.d.ts +434 -0
- package/dist/assets.js +546 -0
- package/dist/audit.d.ts +129 -0
- package/dist/audit.js +238 -0
- package/dist/client-auth.d.ts +409 -0
- package/dist/client-auth.js +487 -0
- package/dist/common.d.ts +186 -0
- package/dist/common.js +199 -0
- package/dist/config-issues.d.ts +175 -0
- package/dist/config-issues.js +339 -0
- package/dist/config.d.ts +862 -0
- package/dist/config.js +1988 -0
- package/dist/errors.d.ts +52 -0
- package/dist/errors.js +786 -0
- package/dist/identity.d.ts +549 -0
- package/dist/identity.js +503 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +51 -0
- package/dist/introspection.d.ts +99 -0
- package/dist/introspection.js +97 -0
- package/dist/jobs.d.ts +334 -0
- package/dist/jobs.js +345 -0
- package/dist/mcp.d.ts +239 -0
- package/dist/mcp.js +153 -0
- package/dist/oauth.d.ts +344 -0
- package/dist/oauth.js +488 -0
- package/dist/protocol.d.ts +781 -0
- package/dist/protocol.js +715 -0
- package/dist/realtime.d.ts +494 -0
- package/dist/realtime.js +512 -0
- package/dist/rest.d.ts +1989 -0
- package/dist/rest.js +1963 -0
- package/dist/routes.d.ts +94 -0
- package/dist/routes.js +2298 -0
- package/package.json +61 -0
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* **Fleetless users: the org's team, and the only people who reach the
|
|
4
|
+
* console** (spec `2026-09-05-app-user-auth`, D1).
|
|
5
|
+
*
|
|
6
|
+
* There are two identity spaces now and **nothing joins them**:
|
|
7
|
+
*
|
|
8
|
+
* - *Fleetless users*, this file. The people who configure robots in the
|
|
9
|
+
* console. Email globally unique, tier `owner | developer`, a Fleetless
|
|
10
|
+
* password, login through the auth portal. They always have MCP access, at
|
|
11
|
+
* the one central endpoint.
|
|
12
|
+
* - *app users*, `app-users.ts`. The people who use a developer's app. One app
|
|
13
|
+
* each, email unique per app, authenticated through the JSON client-auth
|
|
14
|
+
* API that the developer's own UI calls.
|
|
15
|
+
*
|
|
16
|
+
* A Fleetless user who wants to use an app registers or is invited like
|
|
17
|
+
* anybody else; there is no path from one space to the other.
|
|
18
|
+
*
|
|
19
|
+
* **What that deleted, with no successor** (D1): groups and the Org Admins
|
|
20
|
+
* group, app assignments, impersonation, the per-user MCP override and the
|
|
21
|
+
* org-level federation policy. The 2026-08-29 model had put developers and end
|
|
22
|
+
* users into one pool per org and connected them with all of the above; in use
|
|
23
|
+
* it turned out to model the wrong thing — the two populations have different
|
|
24
|
+
* lifecycles, and every mechanism joining them was cost without a product
|
|
25
|
+
* reason.
|
|
26
|
+
*
|
|
27
|
+
* What did **not** change: the password rules, the session and token shapes,
|
|
28
|
+
* and the enumeration-oracle reasoning on password reset. None of those was
|
|
29
|
+
* ever a statement about which space a person lived in.
|
|
30
|
+
*
|
|
31
|
+
* **Email is globally unique here** — `lower(email)` unique across all orgs, so
|
|
32
|
+
* one address is exactly one Fleetless user in exactly one org. Every shape
|
|
33
|
+
* that identifies a person by a bare address (`developerLoginRequest`,
|
|
34
|
+
* `passwordResetRequest`) therefore resolves to at most one account with no org
|
|
35
|
+
* context needed. App users are the opposite and say so on their own shape:
|
|
36
|
+
* unique **per app**, so one address may be several unrelated app accounts.
|
|
37
|
+
*/
|
|
38
|
+
/**
|
|
39
|
+
* The password rule, stated once so the cloud, the console and the SDK refuse
|
|
40
|
+
* the same inputs for the same reason. Length only: a rule a user cannot
|
|
41
|
+
* predict is a rule they work around.
|
|
42
|
+
*
|
|
43
|
+
* Shared by both identity spaces on purpose. A weaker rule for app users would
|
|
44
|
+
* be a second policy for one decision, and the weaker one always wins by
|
|
45
|
+
* accident.
|
|
46
|
+
*/
|
|
47
|
+
export declare const password: z.ZodString;
|
|
48
|
+
/** The bound on a Fleetless user's display name; `APP_USER_DISPLAY_NAME_MAX` matches it, so a rename cannot be legal in one space and refused in the other. */
|
|
49
|
+
export declare const USER_DISPLAY_NAME_MAX = 120;
|
|
50
|
+
/**
|
|
51
|
+
* **The two tiers a Fleetless user can hold** (D1). Owner-exclusive: delete
|
|
52
|
+
* the org, edit org settings, promote to owner, and later billing. Everything
|
|
53
|
+
* else a Fleetless user may do, a `developer` may do.
|
|
54
|
+
*
|
|
55
|
+
* `member` was renamed to `developer` in the 2026-08-29 redesign and is **not**
|
|
56
|
+
* accepted as an alias anywhere — a wire that took both would leave two names
|
|
57
|
+
* for one tier in every log, every audit detail and every console fixture, and
|
|
58
|
+
* the older one would keep arriving forever.
|
|
59
|
+
*
|
|
60
|
+
* **Every Fleetless user has one.** It used to be optional, because the pool
|
|
61
|
+
* also held people who were not org admins and had no console powers to grade.
|
|
62
|
+
* That pool is gone: a Fleetless user *is* a member of the team, so the field
|
|
63
|
+
* is required and an absent one is a mapper bug rather than a state.
|
|
64
|
+
*/
|
|
65
|
+
export declare const orgAdminTier: z.ZodEnum<{
|
|
66
|
+
owner: "owner";
|
|
67
|
+
developer: "developer";
|
|
68
|
+
}>;
|
|
69
|
+
export type OrgAdminTier = z.infer<typeof orgAdminTier>;
|
|
70
|
+
export declare const org: z.ZodObject<{
|
|
71
|
+
id: z.ZodUUID;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
created_at: z.ZodISODateTime;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type Org = z.infer<typeof org>;
|
|
76
|
+
/** What `PATCH /api/org` answers: the org as it now stands. */
|
|
77
|
+
export declare const patchOrgResponse: z.ZodObject<{
|
|
78
|
+
org: z.ZodObject<{
|
|
79
|
+
id: z.ZodUUID;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
created_at: z.ZodISODateTime;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
export type PatchOrgResponse = z.infer<typeof patchOrgResponse>;
|
|
85
|
+
/**
|
|
86
|
+
* **A member of the org's team.** Console access, a tier, a Fleetless
|
|
87
|
+
* password, and no relationship whatsoever to any app's users.
|
|
88
|
+
*
|
|
89
|
+
* `email` is **globally unique** — `lower(email)` unique across every org, a
|
|
90
|
+
* constraint the cloud enforces in the database; a schema cannot see two rows
|
|
91
|
+
* at once and this one makes no claim to. One address is one Fleetless user:
|
|
92
|
+
* no two orgs may hold the same one.
|
|
93
|
+
*
|
|
94
|
+
* **What this shape lost with the two-space cut**: `group_id` (there are no
|
|
95
|
+
* groups), `mcp_access` (a Fleetless user always has MCP access, at the
|
|
96
|
+
* central endpoint), and `has_password`. The last is the interesting one — it
|
|
97
|
+
* existed because a pool user might have been provisioned by an identity
|
|
98
|
+
* provider and hold no Fleetless credential. A Fleetless user always holds
|
|
99
|
+
* one: the console is password-only by design (D1), which removes the
|
|
100
|
+
* IdP-lockout class entirely, so a field reporting whether the credential
|
|
101
|
+
* exists would have exactly one value forever.
|
|
102
|
+
*/
|
|
103
|
+
export declare const fleetlessUser: z.ZodObject<{
|
|
104
|
+
id: z.ZodUUID;
|
|
105
|
+
org_id: z.ZodUUID;
|
|
106
|
+
email: z.ZodEmail;
|
|
107
|
+
display_name: z.ZodNullable<z.ZodString>;
|
|
108
|
+
tier: z.ZodEnum<{
|
|
109
|
+
owner: "owner";
|
|
110
|
+
developer: "developer";
|
|
111
|
+
}>;
|
|
112
|
+
created_at: z.ZodISODateTime;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
export type FleetlessUser = z.infer<typeof fleetlessUser>;
|
|
115
|
+
/** `GET /api/org/users` — the whole team. Never null: an org always has at least its owner. */
|
|
116
|
+
export declare const fleetlessUserListResponse: z.ZodObject<{
|
|
117
|
+
users: z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.ZodUUID;
|
|
119
|
+
org_id: z.ZodUUID;
|
|
120
|
+
email: z.ZodEmail;
|
|
121
|
+
display_name: z.ZodNullable<z.ZodString>;
|
|
122
|
+
tier: z.ZodEnum<{
|
|
123
|
+
owner: "owner";
|
|
124
|
+
developer: "developer";
|
|
125
|
+
}>;
|
|
126
|
+
created_at: z.ZodISODateTime;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export type FleetlessUserListResponse = z.infer<typeof fleetlessUserListResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Access plus refresh (spec §3.4). The access token is short-lived; the
|
|
132
|
+
* refresh token rotates on every use, so a stolen one is detectable when the
|
|
133
|
+
* original is presented again.
|
|
134
|
+
*
|
|
135
|
+
* One shape for both identity spaces: a session is a session, and the claims
|
|
136
|
+
* inside the token are what differ.
|
|
137
|
+
*/
|
|
138
|
+
export declare const sessionTokens: z.ZodObject<{
|
|
139
|
+
access_token: z.ZodString;
|
|
140
|
+
refresh_token: z.ZodString;
|
|
141
|
+
expires_in: z.ZodNumber;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type SessionTokens = z.infer<typeof sessionTokens>;
|
|
144
|
+
export declare const refreshRequest: z.ZodObject<{
|
|
145
|
+
refresh_token: z.ZodString;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type RefreshRequest = z.infer<typeof refreshRequest>;
|
|
148
|
+
/**
|
|
149
|
+
* Registering an org creates the org and its first owner in one step
|
|
150
|
+
* (André, 2026-08-10): whoever registers the organisation is the owner.
|
|
151
|
+
*/
|
|
152
|
+
export declare const signUpRequest: z.ZodObject<{
|
|
153
|
+
org_name: z.ZodString;
|
|
154
|
+
email: z.ZodEmail;
|
|
155
|
+
password: z.ZodString;
|
|
156
|
+
}, z.core.$strip>;
|
|
157
|
+
export type SignUpRequest = z.infer<typeof signUpRequest>;
|
|
158
|
+
/**
|
|
159
|
+
* Registering answers with the founding **Fleetless user**, tier `owner`.
|
|
160
|
+
*
|
|
161
|
+
* The key is `user` rather than `member` or `owner`, and it has stayed `user`
|
|
162
|
+
* through two identity redesigns deliberately: a renamed shape under a
|
|
163
|
+
* renamed key would typecheck in every consumer that reads `.user.id` and mean
|
|
164
|
+
* something subtly different, which is the quietest way for a cut like this to
|
|
165
|
+
* go wrong.
|
|
166
|
+
*/
|
|
167
|
+
export declare const signUpResponse: z.ZodObject<{
|
|
168
|
+
org: z.ZodObject<{
|
|
169
|
+
id: z.ZodUUID;
|
|
170
|
+
name: z.ZodString;
|
|
171
|
+
created_at: z.ZodISODateTime;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
user: z.ZodObject<{
|
|
174
|
+
id: z.ZodUUID;
|
|
175
|
+
org_id: z.ZodUUID;
|
|
176
|
+
email: z.ZodEmail;
|
|
177
|
+
display_name: z.ZodNullable<z.ZodString>;
|
|
178
|
+
tier: z.ZodEnum<{
|
|
179
|
+
owner: "owner";
|
|
180
|
+
developer: "developer";
|
|
181
|
+
}>;
|
|
182
|
+
created_at: z.ZodISODateTime;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
tokens: z.ZodObject<{
|
|
185
|
+
access_token: z.ZodString;
|
|
186
|
+
refresh_token: z.ZodString;
|
|
187
|
+
expires_in: z.ZodNumber;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
export type SignUpResponse = z.infer<typeof signUpResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* The landing page's waiting list (public site, 2026-09-04): one address,
|
|
193
|
+
* posted from fleetless.dev while sign-up is closed. The route answers
|
|
194
|
+
* `202` whether or not the address was already listed.
|
|
195
|
+
*
|
|
196
|
+
* The address is bounded at 254 characters, the RFC 5321 forward-path limit.
|
|
197
|
+
* `z.email()` alone is length-unbounded, and `waitlist.email` carries a unique
|
|
198
|
+
* btree index, which raises above roughly 2704 bytes — so an unbounded address
|
|
199
|
+
* turns an unauthenticated public route into a `500`.
|
|
200
|
+
*/
|
|
201
|
+
export declare const waitlistRequest: z.ZodObject<{
|
|
202
|
+
email: z.ZodEmail;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export type WaitlistRequest = z.infer<typeof waitlistRequest>;
|
|
205
|
+
/**
|
|
206
|
+
* Console login. Fleetless users only, always the Fleetless password — the
|
|
207
|
+
* console has no federated door at all (D1), which removes the IdP-lockout
|
|
208
|
+
* class entirely.
|
|
209
|
+
*
|
|
210
|
+
* This resolves a person by address alone, and a Fleetless user's email is
|
|
211
|
+
* **globally unique**, so a bare address names at most one account and no org
|
|
212
|
+
* context is needed to disambiguate. An org selector was never needed and
|
|
213
|
+
* would have told an unauthenticated caller which org an address belongs to.
|
|
214
|
+
*
|
|
215
|
+
* **It cannot be reached by an app user**, whatever their address: the two
|
|
216
|
+
* spaces have separate tables and separate routes, and a credential from one
|
|
217
|
+
* never authenticates the other.
|
|
218
|
+
*/
|
|
219
|
+
export declare const developerLoginRequest: z.ZodObject<{
|
|
220
|
+
email: z.ZodEmail;
|
|
221
|
+
password: z.ZodString;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
export type DeveloperLoginRequest = z.infer<typeof developerLoginRequest>;
|
|
224
|
+
/**
|
|
225
|
+
* What happened to the mail, in four words instead of one (W6c).
|
|
226
|
+
*
|
|
227
|
+
* `mail_sent: boolean` could not tell **"we have no SMTP configured"** from
|
|
228
|
+
* **"we tried and the server refused"**, so the console had to pick a sentence
|
|
229
|
+
* for a cause it could not know — and picked the reassuring one, because a
|
|
230
|
+
* link-only invitation is a normal outcome and a bounced one is not. The two
|
|
231
|
+
* need opposite actions from whoever reads them: configure a mail server, or
|
|
232
|
+
* go and look at why the existing one rejected the message.
|
|
233
|
+
*
|
|
234
|
+
* - `sent` — the SMTP server accepted the message. Not "delivered":
|
|
235
|
+
* no sender can promise that, and this value must never
|
|
236
|
+
* be rendered as if it could.
|
|
237
|
+
* - `not_requested` — no mail was attempted: the caller asked for none
|
|
238
|
+
* (`send_mail: false`), or there was no link for one to
|
|
239
|
+
* carry (the app has configured no `invite_url`, which
|
|
240
|
+
* the `null` `accept_url` beside it says). **A fourth
|
|
241
|
+
* word rather than a reuse of `not_configured`**: the
|
|
242
|
+
* deployment's mailer is irrelevant in both cases, and a
|
|
243
|
+
* console reading "mail server not configured" beside an
|
|
244
|
+
* invitation whose mail checkbox was off would send a
|
|
245
|
+
* developer to fix something that is not broken.
|
|
246
|
+
* - `not_configured` — no SMTP is set up. **An expected state, not a failure**
|
|
247
|
+
* (invitations work without mail; the link is the primary
|
|
248
|
+
* path). The console must not show it as an error.
|
|
249
|
+
* - `failed` — SMTP was configured, was tried, and refused or was
|
|
250
|
+
* unreachable. This one is worth someone's attention.
|
|
251
|
+
*
|
|
252
|
+
* Shared with `appInvitation`, which answers the same four facts about the
|
|
253
|
+
* same mailer.
|
|
254
|
+
*/
|
|
255
|
+
export declare const mailStatus: z.ZodEnum<{
|
|
256
|
+
sent: "sent";
|
|
257
|
+
not_requested: "not_requested";
|
|
258
|
+
not_configured: "not_configured";
|
|
259
|
+
failed: "failed";
|
|
260
|
+
}>;
|
|
261
|
+
export type MailStatus = z.infer<typeof mailStatus>;
|
|
262
|
+
/**
|
|
263
|
+
* **Inviting somebody onto the team** — the only way a Fleetless user appears.
|
|
264
|
+
*
|
|
265
|
+
* `tier` is **required**, and that is the one decision this shape exists to
|
|
266
|
+
* force. An optional tier would make *"I did not think about it"* and *"I meant
|
|
267
|
+
* developer"* the same request, on the field that decides who can remove whom.
|
|
268
|
+
* Inviting an owner is owner-only, checked by the route: the response hands
|
|
269
|
+
* back the accept link, so an owner-tier invitation is a promotion with one
|
|
270
|
+
* extra step.
|
|
271
|
+
*/
|
|
272
|
+
export declare const createTeamInviteRequest: z.ZodObject<{
|
|
273
|
+
email: z.ZodEmail;
|
|
274
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
|
+
tier: z.ZodEnum<{
|
|
276
|
+
owner: "owner";
|
|
277
|
+
developer: "developer";
|
|
278
|
+
}>;
|
|
279
|
+
send_mail: z.ZodBoolean;
|
|
280
|
+
}, z.core.$strict>;
|
|
281
|
+
export type CreateTeamInviteRequest = z.infer<typeof createTeamInviteRequest>;
|
|
282
|
+
/**
|
|
283
|
+
* The invitation as issued. The **link is the primary path** and mail is the
|
|
284
|
+
* second, so this is complete and usable with `mail: 'not_configured'` — a
|
|
285
|
+
* deployment with no SMTP still issues invitations, it just cannot send them
|
|
286
|
+
* and says so.
|
|
287
|
+
*/
|
|
288
|
+
export declare const teamInvite: z.ZodObject<{
|
|
289
|
+
id: z.ZodUUID;
|
|
290
|
+
email: z.ZodEmail;
|
|
291
|
+
tier: z.ZodEnum<{
|
|
292
|
+
owner: "owner";
|
|
293
|
+
developer: "developer";
|
|
294
|
+
}>;
|
|
295
|
+
expires_at: z.ZodISODateTime;
|
|
296
|
+
accept_url: z.ZodURL;
|
|
297
|
+
mail: z.ZodEnum<{
|
|
298
|
+
sent: "sent";
|
|
299
|
+
not_requested: "not_requested";
|
|
300
|
+
not_configured: "not_configured";
|
|
301
|
+
failed: "failed";
|
|
302
|
+
}>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
export type TeamInvite = z.infer<typeof teamInvite>;
|
|
305
|
+
/**
|
|
306
|
+
* A pending invitation as the team sees it in the list — **without its
|
|
307
|
+
* `accept_url`**, and that omission is the point.
|
|
308
|
+
*
|
|
309
|
+
* The list exists so a team can see what is outstanding and revoke it. Neither
|
|
310
|
+
* needs the token, and a list that carries it turns every screenshot, every log
|
|
311
|
+
* line and every browser history entry of that page into live credentials for
|
|
312
|
+
* somebody else's account. It is the same rule `auditEvent.details` already
|
|
313
|
+
* states — never credentials, never tokens — applied to a read surface.
|
|
314
|
+
*
|
|
315
|
+
* There is no escalation either way: an owner can already create an invitation
|
|
316
|
+
* for any address. The reason to withhold it is not what an owner could do with
|
|
317
|
+
* it, but that a page nobody thinks of as sensitive stops being sensitive.
|
|
318
|
+
*
|
|
319
|
+
* `mail` is omitted for a duller reason: it described what happened at creation
|
|
320
|
+
* time, and re-serving it in a list invites a reader to take it as current.
|
|
321
|
+
*/
|
|
322
|
+
export declare const pendingTeamInvite: z.ZodObject<{
|
|
323
|
+
id: z.ZodUUID;
|
|
324
|
+
email: z.ZodEmail;
|
|
325
|
+
tier: z.ZodEnum<{
|
|
326
|
+
owner: "owner";
|
|
327
|
+
developer: "developer";
|
|
328
|
+
}>;
|
|
329
|
+
expires_at: z.ZodISODateTime;
|
|
330
|
+
}, z.core.$strip>;
|
|
331
|
+
export type PendingTeamInvite = z.infer<typeof pendingTeamInvite>;
|
|
332
|
+
export declare const pendingTeamInviteListResponse: z.ZodObject<{
|
|
333
|
+
invitations: z.ZodArray<z.ZodObject<{
|
|
334
|
+
id: z.ZodUUID;
|
|
335
|
+
email: z.ZodEmail;
|
|
336
|
+
tier: z.ZodEnum<{
|
|
337
|
+
owner: "owner";
|
|
338
|
+
developer: "developer";
|
|
339
|
+
}>;
|
|
340
|
+
expires_at: z.ZodISODateTime;
|
|
341
|
+
}, z.core.$strip>>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
export type PendingTeamInviteListResponse = z.infer<typeof pendingTeamInviteListResponse>;
|
|
344
|
+
/** Accepting it: the token proves the invitation, the password creates the login. */
|
|
345
|
+
export declare const acceptTeamInviteRequest: z.ZodObject<{
|
|
346
|
+
token: z.ZodString;
|
|
347
|
+
password: z.ZodString;
|
|
348
|
+
}, z.core.$strict>;
|
|
349
|
+
export type AcceptTeamInviteRequest = z.infer<typeof acceptTeamInviteRequest>;
|
|
350
|
+
/**
|
|
351
|
+
* `PATCH /api/org/users/:id` — **what an admin may change about a team member,
|
|
352
|
+
* and the two things that are absent rather than merely un-required.**
|
|
353
|
+
*
|
|
354
|
+
* `email` is not here. It is the identifier of the account, the value every
|
|
355
|
+
* invitation, reset link and audit line names, and a PATCH that could change it
|
|
356
|
+
* is both an account-takeover surface and a uniqueness race. *Immutable after
|
|
357
|
+
* create* is a sentence a strict schema can actually keep: offering `email` is
|
|
358
|
+
* a refusal, not a silently ignored field — which is the failure mode this
|
|
359
|
+
* project has already paid for once (`toHaveBeenCalledWith` could not tell
|
|
360
|
+
* *field sent* from *field missing*).
|
|
361
|
+
*
|
|
362
|
+
* `tier` is not here either. A tier change is owner-only with a last-owner
|
|
363
|
+
* guard (`tierChangeRequest`), and merging it in would give one route two
|
|
364
|
+
* refusal reasons and one audit event.
|
|
365
|
+
*
|
|
366
|
+
* So exactly one field remains, and the shape is kept rather than collapsed
|
|
367
|
+
* into a bare string: the next thing a team member gains will be optional here,
|
|
368
|
+
* and a route whose body is a naked value has nowhere to put it.
|
|
369
|
+
*/
|
|
370
|
+
export declare const patchFleetlessUserRequest: z.ZodObject<{
|
|
371
|
+
display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
372
|
+
}, z.core.$strict>;
|
|
373
|
+
export type PatchFleetlessUserRequest = z.infer<typeof patchFleetlessUserRequest>;
|
|
374
|
+
/**
|
|
375
|
+
* `PUT /api/org/users/:id/tier` — **owner-only, and the last owner is
|
|
376
|
+
* neither demotable nor deletable** (refused with 409 `last_owner`).
|
|
377
|
+
*
|
|
378
|
+
* `tier_required` keeps its exact semantics — it says what the *caller's* tier
|
|
379
|
+
* is and what was needed, and nothing about the target.
|
|
380
|
+
*/
|
|
381
|
+
export declare const tierChangeRequest: z.ZodObject<{
|
|
382
|
+
tier: z.ZodEnum<{
|
|
383
|
+
owner: "owner";
|
|
384
|
+
developer: "developer";
|
|
385
|
+
}>;
|
|
386
|
+
}, z.core.$strict>;
|
|
387
|
+
export type TierChangeRequest = z.infer<typeof tierChangeRequest>;
|
|
388
|
+
/**
|
|
389
|
+
* What a `forbidden` refusal carries when the reason is the caller's **tier**
|
|
390
|
+
* rather than a missing grant (W6c).
|
|
391
|
+
*
|
|
392
|
+
* §3.3 makes `forbidden` deliberately silent about *existence*, and that stays
|
|
393
|
+
* true — this says nothing about what the target is. But "your role does not
|
|
394
|
+
* permit this" and "there is no such thing" are the same answer today, and a
|
|
395
|
+
* developer cannot tell *ask an owner* from *you have the wrong id*. Naming
|
|
396
|
+
* the required tier reveals only what the caller could read off the docs.
|
|
397
|
+
*/
|
|
398
|
+
export declare const tierRequiredDetails: z.ZodObject<{
|
|
399
|
+
required: z.ZodEnum<{
|
|
400
|
+
owner: "owner";
|
|
401
|
+
developer: "developer";
|
|
402
|
+
}>;
|
|
403
|
+
actual: z.ZodEnum<{
|
|
404
|
+
owner: "owner";
|
|
405
|
+
developer: "developer";
|
|
406
|
+
}>;
|
|
407
|
+
}, z.core.$strip>;
|
|
408
|
+
export type TierRequiredDetails = z.infer<typeof tierRequiredDetails>;
|
|
409
|
+
/**
|
|
410
|
+
* Changing your own password while logged in.
|
|
411
|
+
*
|
|
412
|
+
* `current_password` is required even though the session already proves
|
|
413
|
+
* identity: it is what makes a stolen *session* insufficient to take the
|
|
414
|
+
* *account*. Every other session is revoked on success; the one that made the
|
|
415
|
+
* change survives, because logging someone out of the tab they just used is
|
|
416
|
+
* indistinguishable from the change having failed.
|
|
417
|
+
*
|
|
418
|
+
* Shared with the app-user surface (`POST /api/client/password/change`): the
|
|
419
|
+
* argument is about credentials and sessions, not about which space the person
|
|
420
|
+
* lives in.
|
|
421
|
+
*/
|
|
422
|
+
export declare const passwordChangeRequest: z.ZodObject<{
|
|
423
|
+
current_password: z.ZodString;
|
|
424
|
+
new_password: z.ZodString;
|
|
425
|
+
}, z.core.$strip>;
|
|
426
|
+
export type PasswordChangeRequest = z.infer<typeof passwordChangeRequest>;
|
|
427
|
+
/**
|
|
428
|
+
* Asking for a reset link, **as a Fleetless user**.
|
|
429
|
+
*
|
|
430
|
+
* **The response never says whether the address exists.** It is unauthenticated
|
|
431
|
+
* and would otherwise be an account-enumeration oracle — the one place where
|
|
432
|
+
* §3.3's "reveal nothing about what exists" is not a preference but the whole
|
|
433
|
+
* point. So this answers the same way for a known and an unknown address, in
|
|
434
|
+
* status, body **and timing**, and any consumer that renders "no such account"
|
|
435
|
+
* from it has reintroduced the oracle.
|
|
436
|
+
*
|
|
437
|
+
* A bare address resolves to at most one account: a Fleetless user's email is
|
|
438
|
+
* **globally unique**, so the reset mails the one match, if any, with a token
|
|
439
|
+
* bound to that account.
|
|
440
|
+
*
|
|
441
|
+
* The app-user equivalent is `clientPasswordResetRequest` in `client-auth.ts`
|
|
442
|
+
* and carries an `app_identifier`, because on that surface a person is
|
|
443
|
+
* identified by app *and* address. Two shapes rather than one, because the two
|
|
444
|
+
* surfaces identify a person differently — not because the reasoning differs.
|
|
445
|
+
*/
|
|
446
|
+
export declare const passwordResetRequest: z.ZodObject<{
|
|
447
|
+
email: z.ZodEmail;
|
|
448
|
+
}, z.core.$strip>;
|
|
449
|
+
export type PasswordResetRequest = z.infer<typeof passwordResetRequest>;
|
|
450
|
+
/**
|
|
451
|
+
* Using the link. The token is **single-use and expires**; spending it revokes
|
|
452
|
+
* every session of that subject, because a forgotten password is one of the
|
|
453
|
+
* two states where somebody else may be holding one. `token_spent` covers used
|
|
454
|
+
* and expired alike — telling them apart tells a stranger whether a token ever
|
|
455
|
+
* existed.
|
|
456
|
+
*/
|
|
457
|
+
export declare const passwordResetConfirm: z.ZodObject<{
|
|
458
|
+
token: z.ZodString;
|
|
459
|
+
new_password: z.ZodString;
|
|
460
|
+
}, z.core.$strip>;
|
|
461
|
+
export type PasswordResetConfirm = z.infer<typeof passwordResetConfirm>;
|
|
462
|
+
/**
|
|
463
|
+
* An IdP issuer URL — **an attacker-supplied string that decides where the
|
|
464
|
+
* *server* connects.**
|
|
465
|
+
*
|
|
466
|
+
* `redirectUri` in `oauth.ts` got a parsed scheme check and an explicit
|
|
467
|
+
* loopback allow-list, with the reasoning written down, because it decides
|
|
468
|
+
* where a *credential* goes. This field got `z.url()` — in the same file, in
|
|
469
|
+
* the same wave. Argus-W7b found it and stored `file:///etc/passwd`,
|
|
470
|
+
* `http://169.254.169.254/latest/meta-data` and `http://infra-postgres-1:5432`
|
|
471
|
+
* through the app's IdP route, then caught the outbound discovery fetch on a
|
|
472
|
+
* listener he stood up. **That is this project's own question — which rules
|
|
473
|
+
* have we already written down, and where else do they apply — answered badly,
|
|
474
|
+
* one field over.**
|
|
475
|
+
*
|
|
476
|
+
* **What this shape can decide, it now decides:** http(s) only (so no `file:`,
|
|
477
|
+
* `gopher:`, `data:`), no credentials in the URL, no fragment, no query. RFC
|
|
478
|
+
* 8414 §3 builds the discovery URL from the issuer's path, so a query string
|
|
479
|
+
* there is meaningless and a `@` is a redirect trick.
|
|
480
|
+
*
|
|
481
|
+
* **What it cannot decide, stated rather than implied:** it cannot tell
|
|
482
|
+
* `http://localhost:8081/realms/fleetless-test` — the dev IdP this project
|
|
483
|
+
* ships — from `http://127.0.0.1:5432`. Both are loopback http. So **this is
|
|
484
|
+
* not the SSRF defence and must not be mistaken for one.** The defence belongs
|
|
485
|
+
* at the fetch, in the cloud: refuse loopback, link-local and private ranges
|
|
486
|
+
* unless something explicitly opts in for development, and it names DNS
|
|
487
|
+
* rebinding as its own residual. A schema that quietly looked sufficient here
|
|
488
|
+
* would be worse than one that says where the real check has to live.
|
|
489
|
+
*
|
|
490
|
+
* It lives in this file rather than beside its one consumer because it is a
|
|
491
|
+
* rule about URLs the server dereferences, and the next such field should find
|
|
492
|
+
* it already written down. `appOidcProvider` is that consumer today.
|
|
493
|
+
*/
|
|
494
|
+
export declare const idpIssuer: z.ZodURL;
|
|
495
|
+
export type IdpIssuer = z.infer<typeof idpIssuer>;
|
|
496
|
+
/**
|
|
497
|
+
* **The federated callback error vocabulary is deleted, with no successor
|
|
498
|
+
* here.** `oidcCallbackErrorCode` and `oidcCallbackError` described the page
|
|
499
|
+
* `GET /mcp/oauth/idp-callback` rendered when a group's identity provider sent
|
|
500
|
+
* a browser back — `jit_disabled` and `email_collision` name provisioning steps
|
|
501
|
+
* only a group provider had. D1 makes Fleetless users password-only and deletes
|
|
502
|
+
* group providers, so the flow that produced these codes cannot start; the
|
|
503
|
+
* route is gone from this manifest and from the cloud.
|
|
504
|
+
*
|
|
505
|
+
* The per-app OIDC vocabulary is `clientOidcErrorCode` in `client-auth.ts`: a
|
|
506
|
+
* different list, for a different flow, redirected to the developer's own page
|
|
507
|
+
* rather than rendered by Fleetless. Two callback error enums coexisting is how
|
|
508
|
+
* the wrong one gets picked up by the train that adds per-app OIDC, which is
|
|
509
|
+
* why this one is deleted rather than left standing for it.
|
|
510
|
+
*/
|
|
511
|
+
/**
|
|
512
|
+
* `GET /api/auth/me` — named so the console can validate it.
|
|
513
|
+
*
|
|
514
|
+
* `user` is a `fleetlessUser`, and its `tier` is required, so this response
|
|
515
|
+
* always states the caller's console powers. It used to be an `orgUser` whose
|
|
516
|
+
* tier was optional and *always present in practice on this route* — a
|
|
517
|
+
* guarantee the route made and the schema could not, which is exactly the kind
|
|
518
|
+
* of gap this file keeps finding. The two-space cut closed it by making the
|
|
519
|
+
* field required on the shape itself.
|
|
520
|
+
*/
|
|
521
|
+
export declare const authMeResponse: z.ZodObject<{
|
|
522
|
+
org: z.ZodObject<{
|
|
523
|
+
id: z.ZodUUID;
|
|
524
|
+
name: z.ZodString;
|
|
525
|
+
created_at: z.ZodISODateTime;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
user: z.ZodObject<{
|
|
528
|
+
id: z.ZodUUID;
|
|
529
|
+
org_id: z.ZodUUID;
|
|
530
|
+
email: z.ZodEmail;
|
|
531
|
+
display_name: z.ZodNullable<z.ZodString>;
|
|
532
|
+
tier: z.ZodEnum<{
|
|
533
|
+
owner: "owner";
|
|
534
|
+
developer: "developer";
|
|
535
|
+
}>;
|
|
536
|
+
created_at: z.ZodISODateTime;
|
|
537
|
+
}, z.core.$strip>;
|
|
538
|
+
}, z.core.$strip>;
|
|
539
|
+
export type AuthMeResponse = z.infer<typeof authMeResponse>;
|
|
540
|
+
/** `PATCH /api/org` — rename the org. Owner only. Same bounds as signup's `org_name`. */
|
|
541
|
+
export declare const patchOrgRequest: z.ZodObject<{
|
|
542
|
+
name: z.ZodString;
|
|
543
|
+
}, z.core.$strict>;
|
|
544
|
+
export type PatchOrgRequest = z.infer<typeof patchOrgRequest>;
|
|
545
|
+
/** `PATCH /api/auth/me` — the caller updates their own display name (null clears it). */
|
|
546
|
+
export declare const patchAuthMeRequest: z.ZodObject<{
|
|
547
|
+
display_name: z.ZodNullable<z.ZodString>;
|
|
548
|
+
}, z.core.$strict>;
|
|
549
|
+
export type PatchAuthMeRequest = z.infer<typeof patchAuthMeRequest>;
|