@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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"key": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "A key that names no role of the organization, because the role was deleted or renamed or never existed."
|
|
8
|
+
},
|
|
9
|
+
"places": {
|
|
10
|
+
"type": "array",
|
|
11
|
+
"items": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"properties": {
|
|
14
|
+
"kind": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"enum": [
|
|
17
|
+
"config",
|
|
18
|
+
"collection_schema",
|
|
19
|
+
"app_user",
|
|
20
|
+
"invitation",
|
|
21
|
+
"app_default",
|
|
22
|
+
"role_inherits",
|
|
23
|
+
"org_default"
|
|
24
|
+
],
|
|
25
|
+
"description": "What writes the key: `config` is a `role` or `access` value in a robot's `fleetless.yaml`, `collection_schema` an `access` entry of a collection in an app's collections schema, `app_user` an app user who holds it, `invitation` an invitation that carries it, `app_default` an app's default role, `role_inherits` another role that inherits from it, and `org_default` one of the organization's defaults."
|
|
26
|
+
},
|
|
27
|
+
"label": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "What a person reads to find the place: the robot name (`config`), the app name (`collection_schema`, `app_default`), the e-mail address of the app user or of the invitee (`app_user`, `invitation`), the name of the inheriting role (`role_inherits`), or the access kind of an organization default (`org_default`)."
|
|
30
|
+
},
|
|
31
|
+
"path": {
|
|
32
|
+
"anyOf": [
|
|
33
|
+
{
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"description": "Where the key is written. For `config`, the place in the YAML, such as `services.arm_home.role` or `access.rules[1].role`; for `collection_schema`, the place in the collections schema, such as `collections.notes.access.update.own[1]`; for `role_inherits`, the key of the role that inherits from it, because display names are not unique; `null` for every other kind."
|
|
41
|
+
},
|
|
42
|
+
"robot_id": {
|
|
43
|
+
"anyOf": [
|
|
44
|
+
{
|
|
45
|
+
"type": "string",
|
|
46
|
+
"format": "uuid",
|
|
47
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "null"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"description": "The robot whose document holds the key (`config`); `null` for every other kind."
|
|
54
|
+
},
|
|
55
|
+
"app_id": {
|
|
56
|
+
"anyOf": [
|
|
57
|
+
{
|
|
58
|
+
"type": "string",
|
|
59
|
+
"format": "uuid",
|
|
60
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "null"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"description": "The app the key belongs to: the app whose collections schema holds it (`collection_schema`), or the app of the user, invitation or default role (`app_user`, `invitation`, `app_default`); `null` for every other kind."
|
|
67
|
+
},
|
|
68
|
+
"user_id": {
|
|
69
|
+
"anyOf": [
|
|
70
|
+
{
|
|
71
|
+
"type": "string",
|
|
72
|
+
"format": "uuid",
|
|
73
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "null"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"description": "The app user who holds the key (`app_user`); `null` for every other kind."
|
|
80
|
+
},
|
|
81
|
+
"document": {
|
|
82
|
+
"anyOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": [
|
|
86
|
+
"published",
|
|
87
|
+
"draft"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "null"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"description": "Which version of the document holds the key (`config`: the robot's configuration, `collection_schema`: the app's collections schema): the published one or the draft; `null` for every other kind."
|
|
95
|
+
},
|
|
96
|
+
"new_version": {
|
|
97
|
+
"anyOf": [
|
|
98
|
+
{
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"exclusiveMinimum": 0,
|
|
101
|
+
"maximum": 9007199254740991
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "null"
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"description": "For a published document (`config` or `collection_schema`), the version number a rename with `update_references` would give it, a copy that differs only in the key; `null` for a draft and for every place that is no document."
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"kind",
|
|
112
|
+
"label",
|
|
113
|
+
"path",
|
|
114
|
+
"robot_id",
|
|
115
|
+
"app_id",
|
|
116
|
+
"user_id",
|
|
117
|
+
"document",
|
|
118
|
+
"new_version"
|
|
119
|
+
],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
},
|
|
122
|
+
"description": "Every place that writes the key. It grants nothing wherever it is written; creating a role with this key makes the places count again."
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": [
|
|
126
|
+
"key",
|
|
127
|
+
"places"
|
|
128
|
+
],
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
}
|
|
@@ -325,6 +325,41 @@
|
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
327
|
]
|
|
328
|
+
},
|
|
329
|
+
"role": {
|
|
330
|
+
"anyOf": [
|
|
331
|
+
{
|
|
332
|
+
"type": "string",
|
|
333
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
334
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"minItems": 1,
|
|
338
|
+
"maxItems": 50,
|
|
339
|
+
"type": "array",
|
|
340
|
+
"items": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
343
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"defaultSnippets": [
|
|
348
|
+
{
|
|
349
|
+
"label": "one role",
|
|
350
|
+
"description": "The role that may use this; a role that inherits from it may too.",
|
|
351
|
+
"body": "${1:operate}"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"label": "any of several roles",
|
|
355
|
+
"description": "A list of roles; holding one of them, or inheriting from one, is enough.",
|
|
356
|
+
"body": [
|
|
357
|
+
"${1:operate}",
|
|
358
|
+
"${2:admin}"
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"description": "Which role may read this datapoint: one role key, or a list of keys when several roles qualify. A role qualifies when it, or a role it inherits from, is named. Without this, the first rule of `access.rules` that fits the entry decides, and without a fitting rule the organization's default for `read` applies. A key that names no role of the organization is a warning when you publish, never an error, and grants nothing. The robot ignores it; the cloud enforces it."
|
|
328
363
|
}
|
|
329
364
|
},
|
|
330
365
|
"required": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"builtin": {
|
|
18
18
|
"type": "boolean",
|
|
19
|
-
"description": "`true` for the
|
|
19
|
+
"description": "`true` for the datapoint every robot has, `bridge_state`, and `false` for everything the published configuration adds."
|
|
20
20
|
},
|
|
21
21
|
"unit": {
|
|
22
22
|
"anyOf": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"additionalProperties": false
|
|
53
53
|
},
|
|
54
|
-
"description": "Everything a client may read on this robot: the
|
|
54
|
+
"description": "Everything a client may read on this robot: the built-in `bridge_state`, plus every datapoint the published configuration exposes and the caller's role may read."
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"required": [
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"name": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 2,
|
|
8
|
+
"maxLength": 63,
|
|
9
|
+
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$",
|
|
10
|
+
"description": "The exposure's slug, or `assets` or `job_history` for the capabilities that belong to the robot as a whole."
|
|
11
|
+
},
|
|
12
|
+
"kind": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"read",
|
|
16
|
+
"invoke",
|
|
17
|
+
"publish",
|
|
18
|
+
"assets",
|
|
19
|
+
"job_history"
|
|
20
|
+
],
|
|
21
|
+
"description": "The kind of access the capability needs."
|
|
22
|
+
},
|
|
23
|
+
"granted": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"description": "Whether the role may use it: its requirement is met and the app has not locked it."
|
|
26
|
+
},
|
|
27
|
+
"requirement": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
"description": "The role keys that qualify, from the entry, the rule or the default that decided. Holding one of them, or inheriting from one, is enough. Empty when nobody qualifies."
|
|
33
|
+
},
|
|
34
|
+
"source": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": [
|
|
37
|
+
"entry",
|
|
38
|
+
"rule",
|
|
39
|
+
"robot",
|
|
40
|
+
"org_default"
|
|
41
|
+
],
|
|
42
|
+
"description": "Where the requirement came from: `entry` is the entry's own `role`, `rule` the first matching rule of `access.rules`, `robot` the robot's `access.assets` or `access.job_history`, and `org_default` the organization's default for the kind."
|
|
43
|
+
},
|
|
44
|
+
"rule_index": {
|
|
45
|
+
"anyOf": [
|
|
46
|
+
{
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"minimum": 0,
|
|
49
|
+
"maximum": 9007199254740991
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "null"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"description": "For `rule`, the position of the deciding rule in `access.rules`, counted from zero; `null` otherwise."
|
|
56
|
+
},
|
|
57
|
+
"rule_match": {
|
|
58
|
+
"anyOf": [
|
|
59
|
+
{
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "null"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"description": "For `rule`, that rule's `match` glob; `null` otherwise."
|
|
67
|
+
},
|
|
68
|
+
"satisfied_by": {
|
|
69
|
+
"anyOf": [
|
|
70
|
+
{
|
|
71
|
+
"type": "string"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"type": "null"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"description": "The key from `requirement` that the role holds through inheritance. `null` when the role is named in the requirement itself, and when it does not meet the requirement at all. Independent of locks."
|
|
78
|
+
},
|
|
79
|
+
"locked": {
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"description": "Whether the app locks this capability, as a kind or as a single lock. A lock wins over the requirement."
|
|
82
|
+
},
|
|
83
|
+
"unknown_roles": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
},
|
|
88
|
+
"description": "Keys in the requirement that name no role of the organization. They grant nothing."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"name",
|
|
93
|
+
"kind",
|
|
94
|
+
"granted",
|
|
95
|
+
"requirement",
|
|
96
|
+
"source",
|
|
97
|
+
"rule_index",
|
|
98
|
+
"rule_match",
|
|
99
|
+
"satisfied_by",
|
|
100
|
+
"locked",
|
|
101
|
+
"unknown_roles"
|
|
102
|
+
],
|
|
103
|
+
"additionalProperties": false
|
|
104
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"role": {
|
|
6
|
+
"description": "A role key to look at the app as. A key that names no role is not an error: the answer says `role_known: false` and grants nothing.",
|
|
7
|
+
"type": "string",
|
|
8
|
+
"pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
|
|
9
|
+
"patternErrorMessage": "A role key is lower-case: it starts with a letter and continues with letters, digits and underscores, up to 63 characters in all — `operate`, `night_shift`. A capital, a dash, a dot, a space or a leading digit is refused, and `defaults` is reserved."
|
|
10
|
+
},
|
|
11
|
+
"user": {
|
|
12
|
+
"description": "An app user of this app, to look at the app as that user's role. A user of another app answers `404`.",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "uuid",
|
|
15
|
+
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|