@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetless/contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0",
|
|
4
4
|
"description": "Fleetless wire contracts: the bridge-cloud protocol, the REST API schemas and the error codes, as zod schemas with generated JSON Schema and OpenAPI artifacts.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dehne Robotik GmbH",
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"role_id": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "uuid",
|
|
8
|
-
"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)$"
|
|
9
|
-
},
|
|
10
|
-
"robots": {
|
|
11
|
-
"maxItems": 500,
|
|
12
|
-
"type": "array",
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"properties": {
|
|
16
|
-
"robot_id": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"format": "uuid",
|
|
19
|
-
"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)$"
|
|
20
|
-
},
|
|
21
|
-
"robot_name": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"minLength": 1,
|
|
24
|
-
"maxLength": 200
|
|
25
|
-
},
|
|
26
|
-
"capabilities": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"properties": {
|
|
29
|
-
"action_history": {
|
|
30
|
-
"type": "boolean"
|
|
31
|
-
},
|
|
32
|
-
"assets": {
|
|
33
|
-
"type": "boolean"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"required": [
|
|
37
|
-
"action_history",
|
|
38
|
-
"assets"
|
|
39
|
-
],
|
|
40
|
-
"additionalProperties": false
|
|
41
|
-
},
|
|
42
|
-
"exposures": {
|
|
43
|
-
"maxItems": 2000,
|
|
44
|
-
"type": "array",
|
|
45
|
-
"items": {
|
|
46
|
-
"type": "object",
|
|
47
|
-
"properties": {
|
|
48
|
-
"slug": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"minLength": 2,
|
|
51
|
-
"maxLength": 63,
|
|
52
|
-
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
53
|
-
},
|
|
54
|
-
"kind": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"enum": [
|
|
57
|
-
"datapoint",
|
|
58
|
-
"service",
|
|
59
|
-
"action",
|
|
60
|
-
"publisher",
|
|
61
|
-
"camera"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"description": {
|
|
65
|
-
"anyOf": [
|
|
66
|
-
{
|
|
67
|
-
"type": "string",
|
|
68
|
-
"maxLength": 2000
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"type": "null"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"unit": {
|
|
76
|
-
"anyOf": [
|
|
77
|
-
{
|
|
78
|
-
"type": "string",
|
|
79
|
-
"maxLength": 32
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"type": "null"
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
},
|
|
86
|
-
"decimals": {
|
|
87
|
-
"anyOf": [
|
|
88
|
-
{
|
|
89
|
-
"type": "integer",
|
|
90
|
-
"minimum": 0,
|
|
91
|
-
"maximum": 6
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"type": "null"
|
|
95
|
-
}
|
|
96
|
-
]
|
|
97
|
-
},
|
|
98
|
-
"input_schema": {
|
|
99
|
-
"anyOf": [
|
|
100
|
-
{},
|
|
101
|
-
{
|
|
102
|
-
"type": "null"
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"required": [
|
|
108
|
-
"slug",
|
|
109
|
-
"kind",
|
|
110
|
-
"description",
|
|
111
|
-
"unit",
|
|
112
|
-
"decimals",
|
|
113
|
-
"input_schema"
|
|
114
|
-
],
|
|
115
|
-
"additionalProperties": false
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
"required": [
|
|
120
|
-
"robot_id",
|
|
121
|
-
"robot_name",
|
|
122
|
-
"capabilities",
|
|
123
|
-
"exposures"
|
|
124
|
-
],
|
|
125
|
-
"additionalProperties": false
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
"required": [
|
|
130
|
-
"role_id",
|
|
131
|
-
"robots"
|
|
132
|
-
],
|
|
133
|
-
"additionalProperties": false
|
|
134
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"details": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"propertyNames": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
10
|
-
},
|
|
11
|
-
"additionalProperties": {
|
|
12
|
-
"anyOf": [
|
|
13
|
-
{
|
|
14
|
-
"type": "string",
|
|
15
|
-
"maxLength": 4096
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "number"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"type": "boolean"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "array",
|
|
25
|
-
"items": {}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"type": "object",
|
|
29
|
-
"propertyNames": {
|
|
30
|
-
"type": "string"
|
|
31
|
-
},
|
|
32
|
-
"additionalProperties": {}
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
"required": [
|
|
39
|
-
"details"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"details": {
|
|
6
|
-
"type": "object",
|
|
7
|
-
"propertyNames": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
10
|
-
},
|
|
11
|
-
"additionalProperties": {
|
|
12
|
-
"anyOf": [
|
|
13
|
-
{
|
|
14
|
-
"type": "string",
|
|
15
|
-
"maxLength": 4096
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "number"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"type": "boolean"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"type": "array",
|
|
25
|
-
"items": {}
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"type": "object",
|
|
29
|
-
"propertyNames": {
|
|
30
|
-
"type": "string"
|
|
31
|
-
},
|
|
32
|
-
"additionalProperties": {}
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
"description": "The stored `robot_details` document, which is the one that was just sent — this route **replaces** the document rather than merging into it. Keys are the developer's own, lowercase and at most 64 characters; a value is a string of at most 4096 characters, a number, a boolean, an array or an object."
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"required": [
|
|
40
|
-
"details"
|
|
41
|
-
],
|
|
42
|
-
"additionalProperties": false
|
|
43
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"propertyNames": {
|
|
5
|
-
"type": "string",
|
|
6
|
-
"pattern": "^[a-z][a-z0-9_-]{0,63}$"
|
|
7
|
-
},
|
|
8
|
-
"additionalProperties": {
|
|
9
|
-
"anyOf": [
|
|
10
|
-
{
|
|
11
|
-
"type": "string",
|
|
12
|
-
"maxLength": 4096
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "number"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "boolean"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"type": "array",
|
|
22
|
-
"items": {}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"type": "object",
|
|
26
|
-
"propertyNames": {
|
|
27
|
-
"type": "string"
|
|
28
|
-
},
|
|
29
|
-
"additionalProperties": {}
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"move_to": {
|
|
6
|
-
"description": "Another role of the same app that takes over the deleted role's app users, pending invitations and, when it applies, the app's default. The role itself or a role of another app answers `400 validation_error`.",
|
|
7
|
-
"type": "string",
|
|
8
|
-
"format": "uuid",
|
|
9
|
-
"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)$"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"additionalProperties": false
|
|
13
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"users": {
|
|
6
|
-
"type": "integer",
|
|
7
|
-
"minimum": 0,
|
|
8
|
-
"maximum": 9007199254740991,
|
|
9
|
-
"description": "App users whose role this is."
|
|
10
|
-
},
|
|
11
|
-
"invitations": {
|
|
12
|
-
"type": "integer",
|
|
13
|
-
"minimum": 0,
|
|
14
|
-
"maximum": 9007199254740991,
|
|
15
|
-
"description": "Pending invitations that would grant this role when accepted."
|
|
16
|
-
},
|
|
17
|
-
"is_default": {
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"description": "`true` when this is the app's `default_role_id`; the default then moves with the users to `move_to`."
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"required": [
|
|
23
|
-
"users",
|
|
24
|
-
"invitations",
|
|
25
|
-
"is_default"
|
|
26
|
-
],
|
|
27
|
-
"additionalProperties": false
|
|
28
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"roles": {
|
|
6
|
-
"type": "array",
|
|
7
|
-
"items": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": {
|
|
11
|
-
"type": "string",
|
|
12
|
-
"format": "uuid",
|
|
13
|
-
"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)$",
|
|
14
|
-
"description": "The role, and what an app user's `role_id` and an app's `default_role_id` refer to."
|
|
15
|
-
},
|
|
16
|
-
"app_id": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"format": "uuid",
|
|
19
|
-
"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)$",
|
|
20
|
-
"description": "The app this role belongs to. Roles are never shared between apps, so a role id from another app reads as `not_found`."
|
|
21
|
-
},
|
|
22
|
-
"name": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"minLength": 1,
|
|
25
|
-
"maxLength": 60,
|
|
26
|
-
"description": "The role's name, shown wherever a user's access is chosen. The two roles every app starts with are named `observe` and `operate`."
|
|
27
|
-
},
|
|
28
|
-
"builtin": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"description": "`true` for the two roles every app starts with. Their **rights may be re-scoped** exactly like a custom role's, through `PUT /api/apps/:id/roles/:roleId/permissions` — the flag exists so the console can explain where they came from, not to protect them. Built-in roles can be renamed and deleted like any other; the flag only records that the cloud seeded them."
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"required": [
|
|
34
|
-
"id",
|
|
35
|
-
"app_id",
|
|
36
|
-
"name",
|
|
37
|
-
"builtin"
|
|
38
|
-
],
|
|
39
|
-
"additionalProperties": false
|
|
40
|
-
},
|
|
41
|
-
"description": "The app's roles, built-in and custom alike, ordered by `created_at` and then by `name`. The tie-break is not cosmetic — the two built-in roles are inserted in one statement and share a creation time to the microsecond, so never read a role by position."
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"required": [
|
|
45
|
-
"roles"
|
|
46
|
-
],
|
|
47
|
-
"additionalProperties": false
|
|
48
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"role_id": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "uuid",
|
|
8
|
-
"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)$"
|
|
9
|
-
},
|
|
10
|
-
"grants": {
|
|
11
|
-
"type": "array",
|
|
12
|
-
"items": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"properties": {
|
|
15
|
-
"robot_id": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"format": "uuid",
|
|
18
|
-
"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)$"
|
|
19
|
-
},
|
|
20
|
-
"slugs": {
|
|
21
|
-
"type": "array",
|
|
22
|
-
"items": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"minLength": 2,
|
|
25
|
-
"maxLength": 63,
|
|
26
|
-
"pattern": "^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"required": [
|
|
31
|
-
"robot_id",
|
|
32
|
-
"slugs"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"capabilities": {
|
|
37
|
-
"type": "object",
|
|
38
|
-
"properties": {
|
|
39
|
-
"action_history": {
|
|
40
|
-
"type": "boolean"
|
|
41
|
-
},
|
|
42
|
-
"presence": {
|
|
43
|
-
"type": "boolean"
|
|
44
|
-
},
|
|
45
|
-
"assets": {
|
|
46
|
-
"type": "boolean"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"required": [
|
|
50
|
-
"action_history",
|
|
51
|
-
"presence",
|
|
52
|
-
"assets"
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"required": [
|
|
57
|
-
"role_id",
|
|
58
|
-
"grants",
|
|
59
|
-
"capabilities"
|
|
60
|
-
]
|
|
61
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"name": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"minLength": 1,
|
|
8
|
-
"maxLength": 60,
|
|
9
|
-
"description": "The new name, trimmed, 1 to 60 characters. Unique per app: another role of this app with the same name answers `409 role_name_taken`. The role's users keep it under its new name."
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
"required": [
|
|
13
|
-
"name"
|
|
14
|
-
],
|
|
15
|
-
"additionalProperties": false
|
|
16
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"type": "object",
|
|
4
|
-
"properties": {
|
|
5
|
-
"id": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "uuid",
|
|
8
|
-
"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)$",
|
|
9
|
-
"description": "The role, and what an app user's `role_id` and an app's `default_role_id` refer to."
|
|
10
|
-
},
|
|
11
|
-
"app_id": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"format": "uuid",
|
|
14
|
-
"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)$",
|
|
15
|
-
"description": "The app this role belongs to. Roles are never shared between apps, so a role id from another app reads as `not_found`."
|
|
16
|
-
},
|
|
17
|
-
"name": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"minLength": 1,
|
|
20
|
-
"maxLength": 60,
|
|
21
|
-
"description": "The role's name, shown wherever a user's access is chosen. The two roles every app starts with are named `observe` and `operate`."
|
|
22
|
-
},
|
|
23
|
-
"builtin": {
|
|
24
|
-
"type": "boolean",
|
|
25
|
-
"description": "`true` for the two roles every app starts with. Their **rights may be re-scoped** exactly like a custom role's, through `PUT /api/apps/:id/roles/:roleId/permissions` — the flag exists so the console can explain where they came from, not to protect them. Built-in roles can be renamed and deleted like any other; the flag only records that the cloud seeded them."
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"required": [
|
|
29
|
-
"id",
|
|
30
|
-
"app_id",
|
|
31
|
-
"name",
|
|
32
|
-
"builtin"
|
|
33
|
-
],
|
|
34
|
-
"additionalProperties": false
|
|
35
|
-
}
|