@fleetless/contracts 13.3.0 → 15.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 +304 -0
- package/artifacts/openapi.json +20156 -10513
- package/artifacts/routes.json +1429 -292
- package/artifacts/schema/access-warning.schema.json +51 -0
- package/artifacts/schema/action-config.schema.json +35 -0
- package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
- package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
- package/artifacts/schema/app-access-response.schema.json +136 -0
- package/artifacts/schema/app-access.schema.json +80 -0
- package/artifacts/schema/app-deletion-summary.schema.json +15 -8
- package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
- package/artifacts/schema/app-invitation.schema.json +5 -5
- package/artifacts/schema/app-list-response.schema.json +6 -6
- package/artifacts/schema/app-lock.schema.json +30 -0
- package/artifacts/schema/app-user-list-response.schema.json +13 -6
- package/artifacts/schema/app-user.schema.json +13 -6
- package/artifacts/schema/app.schema.json +6 -6
- package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
- package/artifacts/schema/auth-ok.schema.json +20 -6
- package/artifacts/schema/camera-list-response.schema.json +1 -1
- package/artifacts/schema/client-identity.schema.json +21 -6
- package/artifacts/schema/cloud-config.schema.json +359 -5
- package/artifacts/schema/collection-actor.schema.json +35 -0
- package/artifacts/schema/collection-definitions-response.schema.json +612 -0
- package/artifacts/schema/collection-event.schema.json +216 -0
- package/artifacts/schema/collection-export-query.schema.json +56 -0
- package/artifacts/schema/collection-filter.schema.json +9 -0
- package/artifacts/schema/collection-import-preview.schema.json +143 -0
- package/artifacts/schema/collection-import-request.schema.json +105 -0
- package/artifacts/schema/collection-import-result.schema.json +38 -0
- package/artifacts/schema/collection-list-response.schema.json +119 -0
- package/artifacts/schema/collection-record-get-query.schema.json +12 -0
- package/artifacts/schema/collection-record-history-query.schema.json +35 -0
- package/artifacts/schema/collection-record-history-response.schema.json +389 -0
- package/artifacts/schema/collection-record-list-query.schema.json +67 -0
- package/artifacts/schema/collection-record-list-response.schema.json +212 -0
- package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
- package/artifacts/schema/collection-record-write.schema.json +31 -0
- package/artifacts/schema/collection-record.schema.json +180 -0
- package/artifacts/schema/collection-revision.schema.json +295 -0
- package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
- package/artifacts/schema/collection-subscribe.schema.json +48 -0
- package/artifacts/schema/collection-subscribed.schema.json +22 -0
- package/artifacts/schema/collection-summary.schema.json +92 -0
- package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
- package/artifacts/schema/collections-access-change.schema.json +34 -0
- package/artifacts/schema/collections-document.schema.json +732 -0
- package/artifacts/schema/collections-draft-response.schema.json +845 -0
- package/artifacts/schema/collections-effect.schema.json +384 -0
- package/artifacts/schema/collections-issue.schema.json +36 -0
- package/artifacts/schema/collections-publish-request.schema.json +18 -0
- package/artifacts/schema/collections-publish-response.schema.json +450 -0
- package/artifacts/schema/collections-purge-preview.schema.json +60 -0
- package/artifacts/schema/collections-purge-request.schema.json +27 -0
- package/artifacts/schema/collections-purge-response.schema.json +30 -0
- package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
- package/artifacts/schema/collections-restore-preview.schema.json +581 -0
- package/artifacts/schema/collections-restore-request.schema.json +27 -0
- package/artifacts/schema/collections-restore-response.schema.json +455 -0
- package/artifacts/schema/collections-schema-preview.schema.json +519 -0
- package/artifacts/schema/collections-schema-published.schema.json +22 -0
- package/artifacts/schema/collections-version-response.schema.json +869 -0
- package/artifacts/schema/collections-version-summary.schema.json +139 -0
- package/artifacts/schema/collections-versions-response.schema.json +167 -0
- package/artifacts/schema/config-draft-response.schema.json +359 -5
- package/artifacts/schema/config-version-response.schema.json +359 -5
- package/artifacts/schema/confirmation-required-details.schema.json +13 -0
- package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
- package/artifacts/schema/create-app-user-request.schema.json +4 -4
- package/artifacts/schema/create-org-role-request.schema.json +33 -0
- package/artifacts/schema/dangling-reference.schema.json +130 -0
- package/artifacts/schema/datapoint-config.schema.json +35 -0
- package/artifacts/schema/datapoint-list-response.schema.json +2 -2
- package/artifacts/schema/effective-capability.schema.json +104 -0
- package/artifacts/schema/effective-rights-query.schema.json +19 -0
- package/artifacts/schema/effective-rights-response.schema.json +396 -0
- package/artifacts/schema/effective-robot-rights.schema.json +266 -0
- package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
- package/artifacts/schema/invoke-response.schema.json +1 -1
- package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
- package/artifacts/schema/journal-intent-v2.schema.json +84 -0
- package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
- package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
- package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
- package/artifacts/schema/org-plan.schema.json +29 -1
- package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
- package/artifacts/schema/org-quota-usage.schema.json +47 -1
- package/artifacts/schema/org-quotas.schema.json +29 -1
- package/artifacts/schema/org-role-list-response.schema.json +206 -0
- package/artifacts/schema/org-role.schema.json +59 -0
- package/artifacts/schema/patch-app-user-request.schema.json +4 -4
- package/artifacts/schema/patch-org-role-request.schema.json +38 -0
- package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
- package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
- package/artifacts/schema/plan-limit-details.schema.json +3 -1
- package/artifacts/schema/plan-limits.schema.json +29 -1
- package/artifacts/schema/plan-overrides.schema.json +26 -0
- package/artifacts/schema/publish-config-response.schema.json +48 -1
- package/artifacts/schema/publisher-config.schema.json +35 -0
- package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
- package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
- package/artifacts/schema/record-changed-details.schema.json +16 -0
- package/artifacts/schema/record-referenced-details.schema.json +35 -0
- package/artifacts/schema/reference-invalid-details.schema.json +25 -0
- package/artifacts/schema/reference-place.schema.json +112 -0
- package/artifacts/schema/rename-slug-response.schema.json +4 -3
- package/artifacts/schema/required-missing-details.schema.json +19 -0
- package/artifacts/schema/robot-config-doc.schema.json +359 -5
- package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
- package/artifacts/schema/role-collection-rights.schema.json +82 -0
- package/artifacts/schema/role-cycle-details.schema.json +18 -0
- package/artifacts/schema/role-defaults-response.schema.json +59 -0
- package/artifacts/schema/role-rename-preview.schema.json +147 -0
- package/artifacts/schema/service-config.schema.json +35 -0
- package/artifacts/schema/slug-usage-response.schema.json +4 -3
- package/artifacts/schema/update-app-request.schema.json +0 -12
- package/dist/app-users.d.ts +11 -8
- package/dist/app-users.js +18 -10
- package/dist/apps.d.ts +258 -71
- package/dist/apps.js +215 -151
- package/dist/audit.d.ts +35 -5
- package/dist/audit.js +40 -2
- package/dist/billing.d.ts +10 -10
- package/dist/client-auth.d.ts +5 -2
- package/dist/client-auth.js +11 -3
- package/dist/client-robots.d.ts +1 -1
- package/dist/client-robots.js +1 -1
- package/dist/collections-issues.d.ts +67 -0
- package/dist/collections-issues.js +340 -0
- package/dist/collections-records.d.ts +562 -0
- package/dist/collections-records.js +525 -0
- package/dist/collections-rights.d.ts +17 -0
- package/dist/collections-rights.js +41 -0
- package/dist/collections-schema.d.ts +1064 -0
- package/dist/collections-schema.js +386 -0
- package/dist/collections-templates.d.ts +55 -0
- package/dist/collections-templates.js +137 -0
- package/dist/collections-transfer.d.ts +101 -0
- package/dist/collections-transfer.js +206 -0
- package/dist/collections-values.d.ts +67 -0
- package/dist/collections-values.js +284 -0
- package/dist/collections.d.ts +568 -0
- package/dist/collections.js +332 -0
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/config-issues.d.ts +1 -1
- package/dist/config-issues.js +1 -1
- package/dist/config.d.ts +78 -12
- package/dist/config.js +109 -15
- package/dist/errors.d.ts +63 -5
- package/dist/errors.js +152 -24
- package/dist/index.d.ts +40 -14
- package/dist/index.js +27 -7
- package/dist/journal-intents.d.ts +30 -0
- package/dist/journal-intents.js +3 -0
- package/dist/legal-acceptances.d.ts +2 -2
- package/dist/mcp.d.ts +5 -37
- package/dist/mcp.js +4 -14
- package/dist/org-roles.d.ts +186 -0
- package/dist/org-roles.js +199 -0
- package/dist/plans.d.ts +25 -7
- package/dist/plans.js +21 -1
- package/dist/protocol.d.ts +19 -1
- package/dist/realtime.d.ts +172 -3
- package/dist/realtime.js +164 -1
- package/dist/rest.d.ts +104 -53
- package/dist/rest.js +79 -55
- package/dist/rights.d.ts +197 -0
- package/dist/rights.js +396 -0
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +675 -150
- package/package.json +1 -1
- package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
- package/artifacts/schema/put-robot-details-request.schema.json +0 -41
- package/artifacts/schema/put-robot-details-response.schema.json +0 -43
- package/artifacts/schema/robot-details-doc.schema.json +0 -33
- package/artifacts/schema/role-delete-query.schema.json +0 -13
- package/artifacts/schema/role-in-use-details.schema.json +0 -28
- package/artifacts/schema/role-list-response.schema.json +0 -48
- package/artifacts/schema/role-permissions.schema.json +0 -61
- package/artifacts/schema/role-rename-request.schema.json +0 -16
- package/artifacts/schema/role.schema.json +0 -35
package/dist/apps.d.ts
CHANGED
|
@@ -3,11 +3,14 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* Apps, roles and rights.
|
|
5
5
|
*
|
|
6
|
-
* The rule that shapes all of this: **
|
|
7
|
-
* assigned to an app
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* The rule that shapes all of this: **a role is the only thing that grants**.
|
|
7
|
+
* A robot assigned to an app is reachable through it, and what a user may use
|
|
8
|
+
* on that robot is decided by the user's role against what the robot's
|
|
9
|
+
* `fleetless.yaml` and the organization's defaults require; what the role does
|
|
10
|
+
* not grant does not exist for that user. An app can only take rights away: its
|
|
11
|
+
* locks win over every role and never grant anything. So there are two places
|
|
12
|
+
* to look when someone cannot see something, the requirement and the lock, and
|
|
13
|
+
* no third.
|
|
11
14
|
*/
|
|
12
15
|
/**
|
|
13
16
|
* The app identifier a client sends at login. Same rule as a service slug:
|
|
@@ -25,7 +28,7 @@ export declare const app: z.ZodObject<{
|
|
|
25
28
|
name: z.ZodString;
|
|
26
29
|
identifier: z.ZodString;
|
|
27
30
|
robot_ids: z.ZodArray<z.ZodUUID>;
|
|
28
|
-
|
|
31
|
+
default_role: z.ZodNullable<z.ZodString>;
|
|
29
32
|
created_at: z.ZodISODateTime;
|
|
30
33
|
}, z.core.$strip>;
|
|
31
34
|
export type App = z.infer<typeof app>;
|
|
@@ -37,7 +40,7 @@ export declare const appListResponse: z.ZodObject<{
|
|
|
37
40
|
name: z.ZodString;
|
|
38
41
|
identifier: z.ZodString;
|
|
39
42
|
robot_ids: z.ZodArray<z.ZodUUID>;
|
|
40
|
-
|
|
43
|
+
default_role: z.ZodNullable<z.ZodString>;
|
|
41
44
|
created_at: z.ZodISODateTime;
|
|
42
45
|
}, z.core.$strip>>;
|
|
43
46
|
}, z.core.$strip>;
|
|
@@ -46,22 +49,26 @@ export type AppListResponse = z.infer<typeof appListResponse>;
|
|
|
46
49
|
* What deleting an app would destroy — read before the irreversible click,
|
|
47
50
|
* and carried again by the `app.deleted` audit event.
|
|
48
51
|
*
|
|
49
|
-
* **
|
|
52
|
+
* **Seven numbers, never a sum**, for the reason `robotDeletionSummary` states
|
|
50
53
|
* at length: the console reads this aloud as one sentence, and a total would
|
|
51
|
-
* describe
|
|
54
|
+
* describe seven unrelated magnitudes with one figure on the one screen whose
|
|
52
55
|
* entire justification is naming what cannot be undone.
|
|
53
56
|
*
|
|
57
|
+
* Roles are not here: they belong to the organization, so deleting an app
|
|
58
|
+
* deletes none of them. What the app locks goes with its settings.
|
|
59
|
+
*
|
|
54
60
|
* Robots are not here because they do not go: they belong to the
|
|
55
61
|
* organization, not to the app. The audit trail is not here either — a record
|
|
56
62
|
* of what happened outlives the thing it happened to.
|
|
57
63
|
*/
|
|
58
64
|
export declare const appDeletionSummary: z.ZodObject<{
|
|
59
65
|
user_count: z.ZodNumber;
|
|
60
|
-
role_count: z.ZodNumber;
|
|
61
66
|
server_key_count: z.ZodNumber;
|
|
62
67
|
invitation_count: z.ZodNumber;
|
|
63
68
|
oidc_provider_count: z.ZodNumber;
|
|
64
69
|
mail_template_count: z.ZodNumber;
|
|
70
|
+
collection_count: z.ZodNumber;
|
|
71
|
+
record_count: z.ZodNumber;
|
|
65
72
|
}, z.core.$strip>;
|
|
66
73
|
export type AppDeletionSummary = z.infer<typeof appDeletionSummary>;
|
|
67
74
|
/**
|
|
@@ -103,6 +110,11 @@ export type CreateAppRequest = z.infer<typeof createAppRequest>;
|
|
|
103
110
|
* remains only for MCP. `group_id` named a group that owned the app; who may
|
|
104
111
|
* log into an app is the app's own user list.
|
|
105
112
|
*
|
|
113
|
+
* The id-based default role is absent too, and it does have a successor: the
|
|
114
|
+
* default role is part of the app's access, replaced together with its locks by
|
|
115
|
+
* `PUT /api/apps/:id/access` and read as `app.default_role`. A patch that still
|
|
116
|
+
* names the old field is refused rather than dropped.
|
|
117
|
+
*
|
|
106
118
|
* The route keeps its own check as belt-and-braces; a schema and a handler
|
|
107
119
|
* agreeing is not two policies, it is one policy stated where each half can
|
|
108
120
|
* enforce it.
|
|
@@ -110,7 +122,6 @@ export type CreateAppRequest = z.infer<typeof createAppRequest>;
|
|
|
110
122
|
export declare const updateAppRequest: z.ZodObject<{
|
|
111
123
|
name: z.ZodOptional<z.ZodString>;
|
|
112
124
|
robot_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
113
|
-
default_role_id: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
114
125
|
}, z.core.$strict>;
|
|
115
126
|
export type UpdateAppRequest = z.infer<typeof updateAppRequest>;
|
|
116
127
|
/**
|
|
@@ -150,79 +161,255 @@ export declare const createServerKeyResponse: z.ZodObject<{
|
|
|
150
161
|
}, z.core.$strip>;
|
|
151
162
|
export type CreateServerKeyResponse = z.infer<typeof createServerKeyResponse>;
|
|
152
163
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* from.
|
|
164
|
+
* The most exposures one robot's datasheet lists, so the most slugs a lock on
|
|
165
|
+
* one robot can name. Exported for whoever grows a lock (a slug rename adds
|
|
166
|
+
* the new name beside the old one) and must know when there is no room left.
|
|
157
167
|
*/
|
|
158
|
-
export declare const
|
|
159
|
-
id: z.ZodUUID;
|
|
160
|
-
app_id: z.ZodUUID;
|
|
161
|
-
name: z.ZodString;
|
|
162
|
-
builtin: z.ZodBoolean;
|
|
163
|
-
}, z.core.$strip>;
|
|
164
|
-
export type Role = z.infer<typeof role>;
|
|
165
|
-
/** What `GET /api/apps/:id/roles` answers: the app's roles, builtin and custom alike. */
|
|
166
|
-
export declare const roleListResponse: z.ZodObject<{
|
|
167
|
-
roles: z.ZodArray<z.ZodObject<{
|
|
168
|
-
id: z.ZodUUID;
|
|
169
|
-
app_id: z.ZodUUID;
|
|
170
|
-
name: z.ZodString;
|
|
171
|
-
builtin: z.ZodBoolean;
|
|
172
|
-
}, z.core.$strip>>;
|
|
173
|
-
}, z.core.$strip>;
|
|
174
|
-
export type RoleListResponse = z.infer<typeof roleListResponse>;
|
|
175
|
-
/**
|
|
176
|
-
* The body of `PATCH /api/apps/:id/roles/:roleId`: the role's new name.
|
|
177
|
-
*
|
|
178
|
-
* The same bounds as `role.name`, trimmed. Names are unique per app, compared
|
|
179
|
-
* exactly as stored after trimming; a clash answers `409 role_name_taken`.
|
|
180
|
-
*/
|
|
181
|
-
export declare const roleRenameRequest: z.ZodObject<{
|
|
182
|
-
name: z.ZodString;
|
|
183
|
-
}, z.core.$strict>;
|
|
184
|
-
export type RoleRenameRequest = z.infer<typeof roleRenameRequest>;
|
|
168
|
+
export declare const MAX_LOCK_SLUGS = 2000;
|
|
185
169
|
/**
|
|
186
|
-
*
|
|
170
|
+
* **What an app locks, and what it falls back on.** Roles decide who may use
|
|
171
|
+
* what; an app can only take rights away from them, never add any. A lock wins
|
|
172
|
+
* over every role and over the organization's defaults, and applies to the
|
|
173
|
+
* app's users and to its server keys alike.
|
|
187
174
|
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* held role answers `409 role_in_use` with `roleInUseDetails`, so a client
|
|
192
|
-
* can ask where they should go instead of guessing.
|
|
175
|
+
* Two ways to lock: a whole kind of access on every robot the app reaches
|
|
176
|
+
* (`locked_kinds`), or single capabilities of single robots (`locked`). The
|
|
177
|
+
* robot-wide `assets` and `job_history` can only be locked as a kind.
|
|
193
178
|
*/
|
|
194
|
-
export declare const
|
|
195
|
-
|
|
179
|
+
export declare const appLock: z.ZodObject<{
|
|
180
|
+
robot_id: z.ZodUUID;
|
|
181
|
+
slugs: z.ZodArray<z.ZodString>;
|
|
196
182
|
}, z.core.$strict>;
|
|
197
|
-
export type
|
|
183
|
+
export type AppLock = z.infer<typeof appLock>;
|
|
198
184
|
/**
|
|
199
|
-
* `
|
|
185
|
+
* `PUT /api/apps/:id/access`: the whole access of one app, **replaced**. Every
|
|
186
|
+
* field is named on every write, so the body is exactly what the app has
|
|
187
|
+
* afterwards; strict, so a field this route does not take is refused rather
|
|
188
|
+
* than dropped.
|
|
200
189
|
*
|
|
201
|
-
*
|
|
202
|
-
* from
|
|
190
|
+
* `revision` is the one field that is not part of the access: it says which
|
|
191
|
+
* state this body was composed from. A caller that read before it wrote sends
|
|
192
|
+
* it back, and a write composed from a stale read is refused instead of
|
|
193
|
+
* lifting a lock that landed in between.
|
|
203
194
|
*/
|
|
204
|
-
export declare const
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
195
|
+
export declare const appAccess: z.ZodObject<{
|
|
196
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
197
|
+
default_role: z.ZodNullable<z.ZodString>;
|
|
198
|
+
locked_kinds: z.ZodArray<z.ZodEnum<{
|
|
199
|
+
read: "read";
|
|
200
|
+
invoke: "invoke";
|
|
201
|
+
publish: "publish";
|
|
202
|
+
assets: "assets";
|
|
203
|
+
job_history: "job_history";
|
|
204
|
+
}>>;
|
|
205
|
+
locked: z.ZodArray<z.ZodObject<{
|
|
206
|
+
robot_id: z.ZodUUID;
|
|
207
|
+
slugs: z.ZodArray<z.ZodString>;
|
|
208
|
+
}, z.core.$strict>>;
|
|
208
209
|
}, z.core.$strict>;
|
|
209
|
-
export type
|
|
210
|
+
export type AppAccess = z.infer<typeof appAccess>;
|
|
210
211
|
/**
|
|
211
|
-
*
|
|
212
|
-
* the
|
|
213
|
-
* below says which of them are enforced today and which is still a switch
|
|
214
|
-
* that changes nothing.
|
|
212
|
+
* Something in an app's access that grants or locks nothing as written. Never
|
|
213
|
+
* a refusal: the access is stored as sent, and these say what is out of step.
|
|
215
214
|
*/
|
|
216
|
-
export declare const
|
|
217
|
-
|
|
218
|
-
|
|
215
|
+
export declare const accessWarning: z.ZodObject<{
|
|
216
|
+
code: z.ZodEnum<{
|
|
217
|
+
unknown_default_role: "unknown_default_role";
|
|
218
|
+
unknown_lock_slug: "unknown_lock_slug";
|
|
219
|
+
lock_robot_not_attached: "lock_robot_not_attached";
|
|
220
|
+
}>;
|
|
221
|
+
message: z.ZodString;
|
|
222
|
+
robot_id: z.ZodNullable<z.ZodUUID>;
|
|
223
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
224
|
+
}, z.core.$strip>;
|
|
225
|
+
export type AccessWarning = z.infer<typeof accessWarning>;
|
|
226
|
+
/** What `GET` and `PUT /api/apps/:id/access` answer: the access as it stands, its revision, and what is out of step in it. */
|
|
227
|
+
export declare const appAccessResponse: z.ZodObject<{
|
|
228
|
+
revision: z.ZodString;
|
|
229
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
230
|
+
code: z.ZodEnum<{
|
|
231
|
+
unknown_default_role: "unknown_default_role";
|
|
232
|
+
unknown_lock_slug: "unknown_lock_slug";
|
|
233
|
+
lock_robot_not_attached: "lock_robot_not_attached";
|
|
234
|
+
}>;
|
|
235
|
+
message: z.ZodString;
|
|
236
|
+
robot_id: z.ZodNullable<z.ZodUUID>;
|
|
237
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
238
|
+
}, z.core.$strip>>;
|
|
239
|
+
default_role: z.ZodNullable<z.ZodString>;
|
|
240
|
+
locked_kinds: z.ZodArray<z.ZodEnum<{
|
|
241
|
+
read: "read";
|
|
242
|
+
invoke: "invoke";
|
|
243
|
+
publish: "publish";
|
|
244
|
+
assets: "assets";
|
|
245
|
+
job_history: "job_history";
|
|
246
|
+
}>>;
|
|
247
|
+
locked: z.ZodArray<z.ZodObject<{
|
|
219
248
|
robot_id: z.ZodUUID;
|
|
220
249
|
slugs: z.ZodArray<z.ZodString>;
|
|
250
|
+
}, z.core.$strict>>;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
export type AppAccessResponse = z.infer<typeof appAccessResponse>;
|
|
253
|
+
/**
|
|
254
|
+
* `GET /api/apps/:id/effective-rights`: look at the app as one role sees it,
|
|
255
|
+
* or as one app user does. Exactly one of the two.
|
|
256
|
+
*
|
|
257
|
+
* The cross-field rule is a `.refine()`, which JSON Schema cannot express, so
|
|
258
|
+
* `effective-rights-query.schema.json` describes two independent optional
|
|
259
|
+
* parameters; the cloud is the only place both-or-neither is refused.
|
|
260
|
+
*/
|
|
261
|
+
export declare const effectiveRightsQuery: z.ZodObject<{
|
|
262
|
+
role: z.ZodOptional<z.ZodString>;
|
|
263
|
+
user: z.ZodOptional<z.ZodUUID>;
|
|
264
|
+
}, z.core.$strict>;
|
|
265
|
+
export type EffectiveRightsQuery = z.infer<typeof effectiveRightsQuery>;
|
|
266
|
+
/** One capability of one robot as a role sees it: granted or not, and why. */
|
|
267
|
+
export declare const effectiveCapability: z.ZodObject<{
|
|
268
|
+
name: z.ZodString;
|
|
269
|
+
kind: z.ZodEnum<{
|
|
270
|
+
read: "read";
|
|
271
|
+
invoke: "invoke";
|
|
272
|
+
publish: "publish";
|
|
273
|
+
assets: "assets";
|
|
274
|
+
job_history: "job_history";
|
|
275
|
+
}>;
|
|
276
|
+
granted: z.ZodBoolean;
|
|
277
|
+
requirement: z.ZodArray<z.ZodString>;
|
|
278
|
+
source: z.ZodEnum<{
|
|
279
|
+
entry: "entry";
|
|
280
|
+
rule: "rule";
|
|
281
|
+
robot: "robot";
|
|
282
|
+
org_default: "org_default";
|
|
283
|
+
}>;
|
|
284
|
+
rule_index: z.ZodNullable<z.ZodNumber>;
|
|
285
|
+
rule_match: z.ZodNullable<z.ZodString>;
|
|
286
|
+
satisfied_by: z.ZodNullable<z.ZodString>;
|
|
287
|
+
locked: z.ZodBoolean;
|
|
288
|
+
unknown_roles: z.ZodArray<z.ZodString>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
export type EffectiveCapability = z.infer<typeof effectiveCapability>;
|
|
291
|
+
/** One attached robot as a role sees it. */
|
|
292
|
+
export declare const effectiveRobotRights: z.ZodObject<{
|
|
293
|
+
robot_id: z.ZodUUID;
|
|
294
|
+
robot_name: z.ZodString;
|
|
295
|
+
published_version: z.ZodNullable<z.ZodNumber>;
|
|
296
|
+
reachable: z.ZodBoolean;
|
|
297
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
kind: z.ZodEnum<{
|
|
300
|
+
read: "read";
|
|
301
|
+
invoke: "invoke";
|
|
302
|
+
publish: "publish";
|
|
303
|
+
assets: "assets";
|
|
304
|
+
job_history: "job_history";
|
|
305
|
+
}>;
|
|
306
|
+
granted: z.ZodBoolean;
|
|
307
|
+
requirement: z.ZodArray<z.ZodString>;
|
|
308
|
+
source: z.ZodEnum<{
|
|
309
|
+
entry: "entry";
|
|
310
|
+
rule: "rule";
|
|
311
|
+
robot: "robot";
|
|
312
|
+
org_default: "org_default";
|
|
313
|
+
}>;
|
|
314
|
+
rule_index: z.ZodNullable<z.ZodNumber>;
|
|
315
|
+
rule_match: z.ZodNullable<z.ZodString>;
|
|
316
|
+
satisfied_by: z.ZodNullable<z.ZodString>;
|
|
317
|
+
locked: z.ZodBoolean;
|
|
318
|
+
unknown_roles: z.ZodArray<z.ZodString>;
|
|
221
319
|
}, z.core.$strip>>;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
320
|
+
datasheet: z.ZodObject<{
|
|
321
|
+
robot_id: z.ZodUUID;
|
|
322
|
+
robot_name: z.ZodString;
|
|
323
|
+
capabilities: z.ZodObject<{
|
|
324
|
+
job_history: z.ZodBoolean;
|
|
325
|
+
assets: z.ZodBoolean;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
exposures: z.ZodArray<z.ZodObject<{
|
|
328
|
+
slug: z.ZodString;
|
|
329
|
+
kind: z.ZodEnum<{
|
|
330
|
+
datapoint: "datapoint";
|
|
331
|
+
action: "action";
|
|
332
|
+
service: "service";
|
|
333
|
+
publisher: "publisher";
|
|
334
|
+
camera: "camera";
|
|
335
|
+
}>;
|
|
336
|
+
description: z.ZodNullable<z.ZodString>;
|
|
337
|
+
unit: z.ZodNullable<z.ZodString>;
|
|
338
|
+
decimals: z.ZodNullable<z.ZodNumber>;
|
|
339
|
+
input_schema: z.ZodNullable<z.ZodUnknown>;
|
|
340
|
+
}, z.core.$strip>>;
|
|
226
341
|
}, z.core.$strip>;
|
|
227
342
|
}, z.core.$strip>;
|
|
228
|
-
export type
|
|
343
|
+
export type EffectiveRobotRights = z.infer<typeof effectiveRobotRights>;
|
|
344
|
+
/** What `GET /api/apps/:id/effective-rights` answers. */
|
|
345
|
+
export declare const effectiveRightsResponse: z.ZodObject<{
|
|
346
|
+
role: z.ZodNullable<z.ZodString>;
|
|
347
|
+
role_known: z.ZodBoolean;
|
|
348
|
+
user_id: z.ZodNullable<z.ZodUUID>;
|
|
349
|
+
robots: z.ZodArray<z.ZodObject<{
|
|
350
|
+
robot_id: z.ZodUUID;
|
|
351
|
+
robot_name: z.ZodString;
|
|
352
|
+
published_version: z.ZodNullable<z.ZodNumber>;
|
|
353
|
+
reachable: z.ZodBoolean;
|
|
354
|
+
capabilities: z.ZodArray<z.ZodObject<{
|
|
355
|
+
name: z.ZodString;
|
|
356
|
+
kind: z.ZodEnum<{
|
|
357
|
+
read: "read";
|
|
358
|
+
invoke: "invoke";
|
|
359
|
+
publish: "publish";
|
|
360
|
+
assets: "assets";
|
|
361
|
+
job_history: "job_history";
|
|
362
|
+
}>;
|
|
363
|
+
granted: z.ZodBoolean;
|
|
364
|
+
requirement: z.ZodArray<z.ZodString>;
|
|
365
|
+
source: z.ZodEnum<{
|
|
366
|
+
entry: "entry";
|
|
367
|
+
rule: "rule";
|
|
368
|
+
robot: "robot";
|
|
369
|
+
org_default: "org_default";
|
|
370
|
+
}>;
|
|
371
|
+
rule_index: z.ZodNullable<z.ZodNumber>;
|
|
372
|
+
rule_match: z.ZodNullable<z.ZodString>;
|
|
373
|
+
satisfied_by: z.ZodNullable<z.ZodString>;
|
|
374
|
+
locked: z.ZodBoolean;
|
|
375
|
+
unknown_roles: z.ZodArray<z.ZodString>;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
datasheet: z.ZodObject<{
|
|
378
|
+
robot_id: z.ZodUUID;
|
|
379
|
+
robot_name: z.ZodString;
|
|
380
|
+
capabilities: z.ZodObject<{
|
|
381
|
+
job_history: z.ZodBoolean;
|
|
382
|
+
assets: z.ZodBoolean;
|
|
383
|
+
}, z.core.$strip>;
|
|
384
|
+
exposures: z.ZodArray<z.ZodObject<{
|
|
385
|
+
slug: z.ZodString;
|
|
386
|
+
kind: z.ZodEnum<{
|
|
387
|
+
datapoint: "datapoint";
|
|
388
|
+
action: "action";
|
|
389
|
+
service: "service";
|
|
390
|
+
publisher: "publisher";
|
|
391
|
+
camera: "camera";
|
|
392
|
+
}>;
|
|
393
|
+
description: z.ZodNullable<z.ZodString>;
|
|
394
|
+
unit: z.ZodNullable<z.ZodString>;
|
|
395
|
+
decimals: z.ZodNullable<z.ZodNumber>;
|
|
396
|
+
input_schema: z.ZodNullable<z.ZodUnknown>;
|
|
397
|
+
}, z.core.$strip>>;
|
|
398
|
+
}, z.core.$strip>;
|
|
399
|
+
}, z.core.$strip>>;
|
|
400
|
+
collections: z.ZodArray<z.ZodObject<{
|
|
401
|
+
collection: z.ZodString;
|
|
402
|
+
label: z.ZodString;
|
|
403
|
+
binding: z.ZodEnum<{
|
|
404
|
+
global: "global";
|
|
405
|
+
per_robot: "per_robot";
|
|
406
|
+
one_per_robot: "one_per_robot";
|
|
407
|
+
}>;
|
|
408
|
+
read: z.ZodBoolean;
|
|
409
|
+
create: z.ZodBoolean;
|
|
410
|
+
update: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"own">, z.ZodLiteral<false>]>;
|
|
411
|
+
delete: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"own">, z.ZodLiteral<false>]>;
|
|
412
|
+
robot_filter: z.ZodBoolean;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
export type EffectiveRightsResponse = z.infer<typeof effectiveRightsResponse>;
|