@fleetless/contracts 14.0.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 +163 -0
- package/artifacts/openapi.json +19842 -11398
- package/artifacts/routes.json +1160 -39
- 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-deletion-summary.schema.json +15 -1
- package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
- package/artifacts/schema/cloud-config.schema.json +5 -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 +5 -5
- package/artifacts/schema/config-version-response.schema.json +5 -5
- package/artifacts/schema/confirmation-required-details.schema.json +13 -0
- package/artifacts/schema/dangling-reference.schema.json +7 -6
- package/artifacts/schema/datapoint-list-response.schema.json +2 -2
- package/artifacts/schema/effective-rights-response.schema.json +87 -1
- 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 +8 -7
- package/artifacts/schema/org-role.schema.json +1 -1
- 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/put-collections-draft-request.schema.json +16 -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 +7 -6
- package/artifacts/schema/required-missing-details.schema.json +19 -0
- package/artifacts/schema/robot-config-doc.schema.json +5 -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-rename-preview.schema.json +7 -6
- package/dist/apps.d.ts +18 -2
- package/dist/apps.js +12 -2
- package/dist/audit.d.ts +32 -2
- package/dist/audit.js +40 -2
- 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/config.d.ts +8 -8
- package/dist/config.js +13 -13
- package/dist/errors.d.ts +50 -1
- package/dist/errors.js +115 -0
- package/dist/index.d.ts +24 -8
- package/dist/index.js +13 -3
- package/dist/org-roles.d.ts +4 -0
- package/dist/org-roles.js +10 -9
- package/dist/plans.d.ts +19 -1
- package/dist/plans.js +21 -1
- package/dist/realtime.d.ts +166 -0
- package/dist/realtime.js +163 -0
- package/dist/rest.d.ts +28 -28
- package/dist/rest.js +39 -27
- package/dist/rights.d.ts +2 -2
- package/dist/rights.js +1 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +495 -21
- package/package.json +1 -1
- 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
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"version": {
|
|
6
|
+
"anyOf": [
|
|
7
|
+
{
|
|
8
|
+
"type": "integer",
|
|
9
|
+
"minimum": 1,
|
|
10
|
+
"maximum": 9007199254740991
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "null"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"description": "The published schema version. Null before anything was published."
|
|
17
|
+
},
|
|
18
|
+
"collections": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"key": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^[a-z][a-z0-9_]{0,62}$",
|
|
26
|
+
"description": "A collection key or a field key: `^[a-z][a-z0-9_]{0,62}$`. Keys appear in URLs, filters and record bodies; `label` is the text people read."
|
|
27
|
+
},
|
|
28
|
+
"label": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"binding": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": [
|
|
34
|
+
"global",
|
|
35
|
+
"per_robot",
|
|
36
|
+
"one_per_robot"
|
|
37
|
+
],
|
|
38
|
+
"description": "`global`: records belong to the app and no robot. `per_robot`: every record belongs to one robot (system field `robot_id`, fixed when the record is created). `one_per_robot`: every robot of the app has exactly one record, which Fleetless creates itself."
|
|
39
|
+
},
|
|
40
|
+
"records": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 9007199254740991,
|
|
44
|
+
"description": "Records the collection holds now."
|
|
45
|
+
},
|
|
46
|
+
"fields": {
|
|
47
|
+
"type": "integer",
|
|
48
|
+
"minimum": 0,
|
|
49
|
+
"maximum": 9007199254740991
|
|
50
|
+
},
|
|
51
|
+
"read_roles": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"items": {
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"description": "The roles that may read the records."
|
|
57
|
+
},
|
|
58
|
+
"warnings": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"enum": [
|
|
63
|
+
"no_role_access",
|
|
64
|
+
"history_growing",
|
|
65
|
+
"unknown_role"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"description": "`no_role_access`: no role may read these records. `unknown_role`: `access` names a role the organization does not have. `history_growing`: the history is far larger than the records, which often means a client writing in a loop."
|
|
69
|
+
},
|
|
70
|
+
"revisions": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 0,
|
|
73
|
+
"maximum": 9007199254740991,
|
|
74
|
+
"description": "Entries in the history of all the collection's records."
|
|
75
|
+
},
|
|
76
|
+
"history_bytes": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"maximum": 9007199254740991,
|
|
80
|
+
"description": "The size of that history in bytes."
|
|
81
|
+
},
|
|
82
|
+
"updated_at": {
|
|
83
|
+
"anyOf": [
|
|
84
|
+
{
|
|
85
|
+
"type": "string",
|
|
86
|
+
"format": "date-time",
|
|
87
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "null"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"description": "When a record of the collection last changed. Null if it never held one."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"required": [
|
|
97
|
+
"key",
|
|
98
|
+
"label",
|
|
99
|
+
"binding",
|
|
100
|
+
"records",
|
|
101
|
+
"fields",
|
|
102
|
+
"read_roles",
|
|
103
|
+
"warnings",
|
|
104
|
+
"revisions",
|
|
105
|
+
"history_bytes",
|
|
106
|
+
"updated_at"
|
|
107
|
+
],
|
|
108
|
+
"additionalProperties": false,
|
|
109
|
+
"description": "A collection as the developer's overview shows it."
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": [
|
|
114
|
+
"version",
|
|
115
|
+
"collections"
|
|
116
|
+
],
|
|
117
|
+
"additionalProperties": false,
|
|
118
|
+
"description": "The collections of an app."
|
|
119
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"expand": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1,
|
|
8
|
+
"description": "Reference fields to embed as records, separated by commas. Only one hop is followed. The embedded records are not counted in the size of a page."
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"additionalProperties": false
|
|
12
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"limit": {
|
|
6
|
+
"description": "The most revisions to return, 1 to 500. A page can hold fewer: see `next_before_seq`.",
|
|
7
|
+
"anyOf": [
|
|
8
|
+
{
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^\\d{1,4}$"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"minimum": -9007199254740991,
|
|
15
|
+
"maximum": 9007199254740991
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
"before_seq": {
|
|
20
|
+
"description": "Only revisions older than this `seq`: the next page, since the history is read newest first.",
|
|
21
|
+
"anyOf": [
|
|
22
|
+
{
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^\\d{1,19}$"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "integer",
|
|
28
|
+
"minimum": -9007199254740991,
|
|
29
|
+
"maximum": 9007199254740991
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"revisions": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"seq": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"exclusiveMinimum": 0,
|
|
13
|
+
"maximum": 9007199254740991,
|
|
14
|
+
"description": "The position of this revision in the history. Use it to page (`before_seq`) and to restore (`seq`)."
|
|
15
|
+
},
|
|
16
|
+
"op": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": [
|
|
19
|
+
"create",
|
|
20
|
+
"update",
|
|
21
|
+
"delete",
|
|
22
|
+
"restore"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"at": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"format": "date-time",
|
|
28
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
29
|
+
},
|
|
30
|
+
"actor": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"kind": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": [
|
|
36
|
+
"developer",
|
|
37
|
+
"app_user",
|
|
38
|
+
"server_key",
|
|
39
|
+
"fleetless"
|
|
40
|
+
],
|
|
41
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
42
|
+
},
|
|
43
|
+
"id": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"format": "uuid",
|
|
46
|
+
"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)$",
|
|
47
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
48
|
+
},
|
|
49
|
+
"label": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"maxLength": 200,
|
|
53
|
+
"description": "A name to show: the person's display name, the name of a server key, `Fleetless`, `Deleted user` when the user no longer exists, or `Deleted key` when the key does. A person without a display name reads as their email address to a developer or a server key and to themselves, and to an app user reading someone else as `Team member` (a developer) or `User` (an app user): an app user never learns another person's address."
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": [
|
|
57
|
+
"kind",
|
|
58
|
+
"id",
|
|
59
|
+
"label"
|
|
60
|
+
],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"description": "Who or what made a change to a record."
|
|
63
|
+
},
|
|
64
|
+
"reason": {
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "null"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"description": "Why a change was made when it was not an ordinary write: `schema v5`, `import`, `restore v4`. Null otherwise."
|
|
74
|
+
},
|
|
75
|
+
"revision": {
|
|
76
|
+
"type": "integer",
|
|
77
|
+
"minimum": 1,
|
|
78
|
+
"maximum": 9007199254740991,
|
|
79
|
+
"description": "The record's revision number after this change."
|
|
80
|
+
},
|
|
81
|
+
"changes": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"propertyNames": {
|
|
84
|
+
"type": "string"
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"properties": {
|
|
89
|
+
"old": {},
|
|
90
|
+
"new": {}
|
|
91
|
+
},
|
|
92
|
+
"required": [
|
|
93
|
+
"old",
|
|
94
|
+
"new"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
},
|
|
98
|
+
"description": "The fields this change touched by key, each with its value before and after. `null` means no value."
|
|
99
|
+
},
|
|
100
|
+
"record": {
|
|
101
|
+
"anyOf": [
|
|
102
|
+
{
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"id": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"format": "uuid",
|
|
108
|
+
"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)$"
|
|
109
|
+
},
|
|
110
|
+
"robot_id": {
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"type": "string",
|
|
114
|
+
"format": "uuid",
|
|
115
|
+
"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)$"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "null"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"description": "The robot a record of a `per_robot` or `one_per_robot` collection belongs to; null in a `global` collection."
|
|
122
|
+
},
|
|
123
|
+
"created_at": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"format": "date-time",
|
|
126
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
127
|
+
},
|
|
128
|
+
"created_by": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"kind": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"enum": [
|
|
134
|
+
"developer",
|
|
135
|
+
"app_user",
|
|
136
|
+
"server_key",
|
|
137
|
+
"fleetless"
|
|
138
|
+
],
|
|
139
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
140
|
+
},
|
|
141
|
+
"id": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"format": "uuid",
|
|
144
|
+
"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)$",
|
|
145
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
146
|
+
},
|
|
147
|
+
"label": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1,
|
|
150
|
+
"maxLength": 200,
|
|
151
|
+
"description": "A name to show: the person's display name, the name of a server key, `Fleetless`, `Deleted user` when the user no longer exists, or `Deleted key` when the key does. A person without a display name reads as their email address to a developer or a server key and to themselves, and to an app user reading someone else as `Team member` (a developer) or `User` (an app user): an app user never learns another person's address."
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"required": [
|
|
155
|
+
"kind",
|
|
156
|
+
"id",
|
|
157
|
+
"label"
|
|
158
|
+
],
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"description": "Who or what made a change to a record."
|
|
161
|
+
},
|
|
162
|
+
"updated_at": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"format": "date-time",
|
|
165
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
166
|
+
},
|
|
167
|
+
"updated_by": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"kind": {
|
|
171
|
+
"type": "string",
|
|
172
|
+
"enum": [
|
|
173
|
+
"developer",
|
|
174
|
+
"app_user",
|
|
175
|
+
"server_key",
|
|
176
|
+
"fleetless"
|
|
177
|
+
],
|
|
178
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
179
|
+
},
|
|
180
|
+
"id": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"format": "uuid",
|
|
183
|
+
"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)$",
|
|
184
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
185
|
+
},
|
|
186
|
+
"label": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"minLength": 1,
|
|
189
|
+
"maxLength": 200,
|
|
190
|
+
"description": "A name to show: the person's display name, the name of a server key, `Fleetless`, `Deleted user` when the user no longer exists, or `Deleted key` when the key does. A person without a display name reads as their email address to a developer or a server key and to themselves, and to an app user reading someone else as `Team member` (a developer) or `User` (an app user): an app user never learns another person's address."
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": [
|
|
194
|
+
"kind",
|
|
195
|
+
"id",
|
|
196
|
+
"label"
|
|
197
|
+
],
|
|
198
|
+
"additionalProperties": false,
|
|
199
|
+
"description": "Who or what made a change to a record."
|
|
200
|
+
},
|
|
201
|
+
"revision": {
|
|
202
|
+
"type": "integer",
|
|
203
|
+
"minimum": 1,
|
|
204
|
+
"maximum": 9007199254740991,
|
|
205
|
+
"description": "Starts at 1 and grows by one with every change. Send it as `expected_revision` to refuse a write that would overwrite a newer one."
|
|
206
|
+
},
|
|
207
|
+
"display": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "The collection's display template filled in for this record."
|
|
210
|
+
},
|
|
211
|
+
"missing_required": {
|
|
212
|
+
"type": "array",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string"
|
|
215
|
+
},
|
|
216
|
+
"description": "Required fields that are empty because the schema changed after the record was written. The record can still be updated in its other fields. Absent when nothing is missing."
|
|
217
|
+
},
|
|
218
|
+
"values": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"propertyNames": {
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
"additionalProperties": {},
|
|
224
|
+
"description": "The record's fields by key. A field without a value is absent. With `expand`, a reference field holds the referenced record in this same shape instead of its id, when the caller may read that collection."
|
|
225
|
+
},
|
|
226
|
+
"deleted_at": {
|
|
227
|
+
"type": "string",
|
|
228
|
+
"format": "date-time",
|
|
229
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
230
|
+
"description": "When the record was deleted. Present only in the list of deleted records (`deleted=true`); absent on a live record."
|
|
231
|
+
},
|
|
232
|
+
"deleted_by": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"properties": {
|
|
235
|
+
"kind": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"enum": [
|
|
238
|
+
"developer",
|
|
239
|
+
"app_user",
|
|
240
|
+
"server_key",
|
|
241
|
+
"fleetless"
|
|
242
|
+
],
|
|
243
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
244
|
+
},
|
|
245
|
+
"id": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"format": "uuid",
|
|
248
|
+
"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)$",
|
|
249
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
250
|
+
},
|
|
251
|
+
"label": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"minLength": 1,
|
|
254
|
+
"maxLength": 200,
|
|
255
|
+
"description": "A name to show: the person's display name, the name of a server key, `Fleetless`, `Deleted user` when the user no longer exists, or `Deleted key` when the key does. A person without a display name reads as their email address to a developer or a server key and to themselves, and to an app user reading someone else as `Team member` (a developer) or `User` (an app user): an app user never learns another person's address."
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"required": [
|
|
259
|
+
"kind",
|
|
260
|
+
"id",
|
|
261
|
+
"label"
|
|
262
|
+
],
|
|
263
|
+
"additionalProperties": false,
|
|
264
|
+
"description": "Who deleted the record. Present only in the list of deleted records (`deleted=true`); absent on a live record."
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": [
|
|
268
|
+
"id",
|
|
269
|
+
"robot_id",
|
|
270
|
+
"created_at",
|
|
271
|
+
"created_by",
|
|
272
|
+
"updated_at",
|
|
273
|
+
"updated_by",
|
|
274
|
+
"revision",
|
|
275
|
+
"display",
|
|
276
|
+
"values"
|
|
277
|
+
],
|
|
278
|
+
"additionalProperties": false,
|
|
279
|
+
"description": "A record of a collection: its system fields and its values."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"type": "null"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"description": "The whole record, on a `delete` revision. Null on every other operation."
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": [
|
|
289
|
+
"seq",
|
|
290
|
+
"op",
|
|
291
|
+
"at",
|
|
292
|
+
"actor",
|
|
293
|
+
"reason",
|
|
294
|
+
"revision",
|
|
295
|
+
"changes",
|
|
296
|
+
"record"
|
|
297
|
+
],
|
|
298
|
+
"additionalProperties": false,
|
|
299
|
+
"description": "One change in the history of a record."
|
|
300
|
+
},
|
|
301
|
+
"description": "The revisions of the page, newest first. A page is cut short at 4 MiB of stored revisions, since the changes of a revision keep the old and the new value and a `delete` the whole record. It always holds at least one revision, and a history of ordinary size is never cut."
|
|
302
|
+
},
|
|
303
|
+
"next_before_seq": {
|
|
304
|
+
"anyOf": [
|
|
305
|
+
{
|
|
306
|
+
"type": "integer",
|
|
307
|
+
"exclusiveMinimum": 0,
|
|
308
|
+
"maximum": 9007199254740991
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"type": "null"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"description": "Send it as `before_seq` to read older revisions; it names the last revision this page holds, also when the page was cut short. Null when there are none."
|
|
315
|
+
},
|
|
316
|
+
"purged": {
|
|
317
|
+
"anyOf": [
|
|
318
|
+
{
|
|
319
|
+
"type": "object",
|
|
320
|
+
"properties": {
|
|
321
|
+
"before": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"format": "date-time",
|
|
324
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
325
|
+
"description": "Revisions older than this were removed."
|
|
326
|
+
},
|
|
327
|
+
"by": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"properties": {
|
|
330
|
+
"kind": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"enum": [
|
|
333
|
+
"developer",
|
|
334
|
+
"app_user",
|
|
335
|
+
"server_key",
|
|
336
|
+
"fleetless"
|
|
337
|
+
],
|
|
338
|
+
"description": "What made the change: a developer, a user of the app, a server key of the app, or the platform itself."
|
|
339
|
+
},
|
|
340
|
+
"id": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"format": "uuid",
|
|
343
|
+
"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)$",
|
|
344
|
+
"description": "The id of the developer, app user or server key. The nil id for the platform."
|
|
345
|
+
},
|
|
346
|
+
"label": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"minLength": 1,
|
|
349
|
+
"maxLength": 200,
|
|
350
|
+
"description": "A name to show: the person's display name, the name of a server key, `Fleetless`, `Deleted user` when the user no longer exists, or `Deleted key` when the key does. A person without a display name reads as their email address to a developer or a server key and to themselves, and to an app user reading someone else as `Team member` (a developer) or `User` (an app user): an app user never learns another person's address."
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
"required": [
|
|
354
|
+
"kind",
|
|
355
|
+
"id",
|
|
356
|
+
"label"
|
|
357
|
+
],
|
|
358
|
+
"additionalProperties": false,
|
|
359
|
+
"description": "Who or what made a change to a record."
|
|
360
|
+
},
|
|
361
|
+
"at": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"format": "date-time",
|
|
364
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
|
|
365
|
+
"description": "When they were removed."
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"required": [
|
|
369
|
+
"before",
|
|
370
|
+
"by",
|
|
371
|
+
"at"
|
|
372
|
+
],
|
|
373
|
+
"additionalProperties": false
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"type": "null"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
"description": "Set when an organization owner removed the older part of this history: the history then starts with that note."
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
"required": [
|
|
383
|
+
"revisions",
|
|
384
|
+
"next_before_seq",
|
|
385
|
+
"purged"
|
|
386
|
+
],
|
|
387
|
+
"additionalProperties": false,
|
|
388
|
+
"description": "A page of a record's history, newest first."
|
|
389
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"filter": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"minLength": 1,
|
|
8
|
+
"description": "A filter as JSON text, for example `{\"location.name\":{\"eq\":\"XTD1\"}}`. A condition names a field of the collection, one of the system fields `id`, `robot_id`, `created_at`, `updated_at` and `created_by`, or a field of a referenced record written `reference.field`. `created_by` is compared with the id of the developer, user or key that created the record."
|
|
9
|
+
},
|
|
10
|
+
"search": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Words that must all occur, in any letter case, in at least one searchable field of the record. At most 10 words, separated by whitespace."
|
|
13
|
+
},
|
|
14
|
+
"sort": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"description": "Up to 3 fields separated by commas; a leading `-` sorts descending, for example `-position_m,name`. A field is named as in `filter`: a field of the collection, one of the system fields `id`, `robot_id`, `created_at`, `updated_at` and `created_by`, or `reference.field`. Ties are broken by `id`."
|
|
18
|
+
},
|
|
19
|
+
"expand": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"minLength": 1,
|
|
22
|
+
"description": "Reference fields to embed as records, separated by commas. Only one hop is followed. The embedded records are not counted in the size of a page."
|
|
23
|
+
},
|
|
24
|
+
"limit": {
|
|
25
|
+
"description": "The most records to return, 1 to 500. Default 50. A page can hold fewer: see `next_cursor`.",
|
|
26
|
+
"anyOf": [
|
|
27
|
+
{
|
|
28
|
+
"type": "string",
|
|
29
|
+
"pattern": "^\\d{1,4}$"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum": -9007199254740991,
|
|
34
|
+
"maximum": 9007199254740991
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"cursor": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"minLength": 1,
|
|
41
|
+
"description": "The `next_cursor` of the previous page."
|
|
42
|
+
},
|
|
43
|
+
"count": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"enum": [
|
|
46
|
+
"true",
|
|
47
|
+
"false"
|
|
48
|
+
],
|
|
49
|
+
"description": "`true` adds `total`, the number of records that match."
|
|
50
|
+
},
|
|
51
|
+
"deleted": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"enum": [
|
|
54
|
+
"true",
|
|
55
|
+
"false"
|
|
56
|
+
],
|
|
57
|
+
"description": "`true` lists deleted records instead, newest deletion first. Needs the right to create records."
|
|
58
|
+
},
|
|
59
|
+
"robot": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"format": "uuid",
|
|
62
|
+
"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)$",
|
|
63
|
+
"description": "Only the records of this robot, in a collection that belongs to robots."
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"additionalProperties": false
|
|
67
|
+
}
|