@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.
Files changed (182) hide show
  1. package/CHANGELOG.md +304 -0
  2. package/artifacts/openapi.json +20156 -10513
  3. package/artifacts/routes.json +1429 -292
  4. package/artifacts/schema/access-warning.schema.json +51 -0
  5. package/artifacts/schema/action-config.schema.json +35 -0
  6. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  7. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  8. package/artifacts/schema/app-access-response.schema.json +136 -0
  9. package/artifacts/schema/app-access.schema.json +80 -0
  10. package/artifacts/schema/app-deletion-summary.schema.json +15 -8
  11. package/artifacts/schema/app-invitation-list-response.schema.json +13 -6
  12. package/artifacts/schema/app-invitation.schema.json +5 -5
  13. package/artifacts/schema/app-list-response.schema.json +6 -6
  14. package/artifacts/schema/app-lock.schema.json +30 -0
  15. package/artifacts/schema/app-user-list-response.schema.json +13 -6
  16. package/artifacts/schema/app-user.schema.json +13 -6
  17. package/artifacts/schema/app.schema.json +6 -6
  18. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  19. package/artifacts/schema/auth-ok.schema.json +20 -6
  20. package/artifacts/schema/camera-list-response.schema.json +1 -1
  21. package/artifacts/schema/client-identity.schema.json +21 -6
  22. package/artifacts/schema/cloud-config.schema.json +359 -5
  23. package/artifacts/schema/collection-actor.schema.json +35 -0
  24. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  25. package/artifacts/schema/collection-event.schema.json +216 -0
  26. package/artifacts/schema/collection-export-query.schema.json +56 -0
  27. package/artifacts/schema/collection-filter.schema.json +9 -0
  28. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  29. package/artifacts/schema/collection-import-request.schema.json +105 -0
  30. package/artifacts/schema/collection-import-result.schema.json +38 -0
  31. package/artifacts/schema/collection-list-response.schema.json +119 -0
  32. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  33. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  34. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  35. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  36. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  37. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  38. package/artifacts/schema/collection-record-write.schema.json +31 -0
  39. package/artifacts/schema/collection-record.schema.json +180 -0
  40. package/artifacts/schema/collection-revision.schema.json +295 -0
  41. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  42. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  43. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  44. package/artifacts/schema/collection-summary.schema.json +92 -0
  45. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  46. package/artifacts/schema/collections-access-change.schema.json +34 -0
  47. package/artifacts/schema/collections-document.schema.json +732 -0
  48. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  49. package/artifacts/schema/collections-effect.schema.json +384 -0
  50. package/artifacts/schema/collections-issue.schema.json +36 -0
  51. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  52. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  53. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  54. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  55. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  56. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  57. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  58. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  59. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  60. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  61. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  62. package/artifacts/schema/collections-version-response.schema.json +869 -0
  63. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  64. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  65. package/artifacts/schema/config-draft-response.schema.json +359 -5
  66. package/artifacts/schema/config-version-response.schema.json +359 -5
  67. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  68. package/artifacts/schema/create-app-invitation-request.schema.json +4 -4
  69. package/artifacts/schema/create-app-user-request.schema.json +4 -4
  70. package/artifacts/schema/create-org-role-request.schema.json +33 -0
  71. package/artifacts/schema/dangling-reference.schema.json +130 -0
  72. package/artifacts/schema/datapoint-config.schema.json +35 -0
  73. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  74. package/artifacts/schema/effective-capability.schema.json +104 -0
  75. package/artifacts/schema/effective-rights-query.schema.json +19 -0
  76. package/artifacts/schema/effective-rights-response.schema.json +396 -0
  77. package/artifacts/schema/effective-robot-rights.schema.json +266 -0
  78. package/artifacts/schema/invoke-or-service-response.schema.json +1 -1
  79. package/artifacts/schema/invoke-response.schema.json +1 -1
  80. package/artifacts/schema/journal-intent-v2-body.schema.json +74 -0
  81. package/artifacts/schema/journal-intent-v2.schema.json +84 -0
  82. package/artifacts/schema/journal-replay-receipt-body.schema.json +1 -0
  83. package/artifacts/schema/journal-replay-receipt.schema.json +1 -0
  84. package/artifacts/schema/mcp-robot-datasheet.schema.json +2 -2
  85. package/artifacts/schema/org-plan.schema.json +29 -1
  86. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  87. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  88. package/artifacts/schema/org-quotas.schema.json +29 -1
  89. package/artifacts/schema/org-role-list-response.schema.json +206 -0
  90. package/artifacts/schema/org-role.schema.json +59 -0
  91. package/artifacts/schema/patch-app-user-request.schema.json +4 -4
  92. package/artifacts/schema/patch-org-role-request.schema.json +38 -0
  93. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  94. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  95. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  96. package/artifacts/schema/plan-limits.schema.json +29 -1
  97. package/artifacts/schema/plan-overrides.schema.json +26 -0
  98. package/artifacts/schema/publish-config-response.schema.json +48 -1
  99. package/artifacts/schema/publisher-config.schema.json +35 -0
  100. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  101. package/artifacts/schema/put-role-defaults-request.schema.json +127 -0
  102. package/artifacts/schema/record-changed-details.schema.json +16 -0
  103. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  104. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  105. package/artifacts/schema/reference-place.schema.json +112 -0
  106. package/artifacts/schema/rename-slug-response.schema.json +4 -3
  107. package/artifacts/schema/required-missing-details.schema.json +19 -0
  108. package/artifacts/schema/robot-config-doc.schema.json +359 -5
  109. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  110. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  111. package/artifacts/schema/role-cycle-details.schema.json +18 -0
  112. package/artifacts/schema/role-defaults-response.schema.json +59 -0
  113. package/artifacts/schema/role-rename-preview.schema.json +147 -0
  114. package/artifacts/schema/service-config.schema.json +35 -0
  115. package/artifacts/schema/slug-usage-response.schema.json +4 -3
  116. package/artifacts/schema/update-app-request.schema.json +0 -12
  117. package/dist/app-users.d.ts +11 -8
  118. package/dist/app-users.js +18 -10
  119. package/dist/apps.d.ts +258 -71
  120. package/dist/apps.js +215 -151
  121. package/dist/audit.d.ts +35 -5
  122. package/dist/audit.js +40 -2
  123. package/dist/billing.d.ts +10 -10
  124. package/dist/client-auth.d.ts +5 -2
  125. package/dist/client-auth.js +11 -3
  126. package/dist/client-robots.d.ts +1 -1
  127. package/dist/client-robots.js +1 -1
  128. package/dist/collections-issues.d.ts +67 -0
  129. package/dist/collections-issues.js +340 -0
  130. package/dist/collections-records.d.ts +562 -0
  131. package/dist/collections-records.js +525 -0
  132. package/dist/collections-rights.d.ts +17 -0
  133. package/dist/collections-rights.js +41 -0
  134. package/dist/collections-schema.d.ts +1064 -0
  135. package/dist/collections-schema.js +386 -0
  136. package/dist/collections-templates.d.ts +55 -0
  137. package/dist/collections-templates.js +137 -0
  138. package/dist/collections-transfer.d.ts +101 -0
  139. package/dist/collections-transfer.js +206 -0
  140. package/dist/collections-values.d.ts +67 -0
  141. package/dist/collections-values.js +284 -0
  142. package/dist/collections.d.ts +568 -0
  143. package/dist/collections.js +332 -0
  144. package/dist/common.d.ts +1 -1
  145. package/dist/common.js +1 -1
  146. package/dist/config-issues.d.ts +1 -1
  147. package/dist/config-issues.js +1 -1
  148. package/dist/config.d.ts +78 -12
  149. package/dist/config.js +109 -15
  150. package/dist/errors.d.ts +63 -5
  151. package/dist/errors.js +152 -24
  152. package/dist/index.d.ts +40 -14
  153. package/dist/index.js +27 -7
  154. package/dist/journal-intents.d.ts +30 -0
  155. package/dist/journal-intents.js +3 -0
  156. package/dist/legal-acceptances.d.ts +2 -2
  157. package/dist/mcp.d.ts +5 -37
  158. package/dist/mcp.js +4 -14
  159. package/dist/org-roles.d.ts +186 -0
  160. package/dist/org-roles.js +199 -0
  161. package/dist/plans.d.ts +25 -7
  162. package/dist/plans.js +21 -1
  163. package/dist/protocol.d.ts +19 -1
  164. package/dist/realtime.d.ts +172 -3
  165. package/dist/realtime.js +164 -1
  166. package/dist/rest.d.ts +104 -53
  167. package/dist/rest.js +79 -55
  168. package/dist/rights.d.ts +197 -0
  169. package/dist/rights.js +396 -0
  170. package/dist/routes.d.ts +1 -1
  171. package/dist/routes.js +675 -150
  172. package/package.json +1 -1
  173. package/artifacts/schema/mcp-role-preview-response.schema.json +0 -134
  174. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  175. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  176. package/artifacts/schema/robot-details-doc.schema.json +0 -33
  177. package/artifacts/schema/role-delete-query.schema.json +0 -13
  178. package/artifacts/schema/role-in-use-details.schema.json +0 -28
  179. package/artifacts/schema/role-list-response.schema.json +0 -48
  180. package/artifacts/schema/role-permissions.schema.json +0 -61
  181. package/artifacts/schema/role-rename-request.schema.json +0 -16
  182. package/artifacts/schema/role.schema.json +0 -35
@@ -756,6 +756,80 @@
756
756
  ],
757
757
  "additionalProperties": false
758
758
  },
759
+ {
760
+ "type": "object",
761
+ "properties": {
762
+ "schema": {
763
+ "type": "string",
764
+ "const": "fleetless.deletion-intent.v2"
765
+ },
766
+ "environment": {
767
+ "type": "string",
768
+ "minLength": 1
769
+ },
770
+ "generation": {
771
+ "type": "string",
772
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
773
+ },
774
+ "sequence": {
775
+ "type": "integer",
776
+ "minimum": 1,
777
+ "maximum": 9007199254740991
778
+ },
779
+ "operation_id": {
780
+ "type": "string",
781
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
782
+ },
783
+ "intent_at": {
784
+ "type": "string",
785
+ "format": "date-time",
786
+ "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{3}(?:Z))$"
787
+ },
788
+ "previous_hash": {
789
+ "type": "string",
790
+ "pattern": "^[0-9a-f]{64}$"
791
+ },
792
+ "signing_key_id": {
793
+ "type": "string",
794
+ "minLength": 1
795
+ },
796
+ "kind": {
797
+ "type": "string",
798
+ "const": "org_role.delete"
799
+ },
800
+ "ids": {
801
+ "type": "object",
802
+ "properties": {
803
+ "org_id": {
804
+ "type": "string",
805
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
806
+ },
807
+ "role_id": {
808
+ "type": "string",
809
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
810
+ }
811
+ },
812
+ "required": [
813
+ "org_id",
814
+ "role_id"
815
+ ],
816
+ "additionalProperties": false
817
+ }
818
+ },
819
+ "required": [
820
+ "schema",
821
+ "environment",
822
+ "generation",
823
+ "sequence",
824
+ "operation_id",
825
+ "intent_at",
826
+ "previous_hash",
827
+ "signing_key_id",
828
+ "kind",
829
+ "ids"
830
+ ],
831
+ "additionalProperties": false
832
+ },
759
833
  {
760
834
  "type": "object",
761
835
  "properties": {
@@ -836,6 +836,90 @@
836
836
  ],
837
837
  "additionalProperties": false
838
838
  },
839
+ {
840
+ "type": "object",
841
+ "properties": {
842
+ "schema": {
843
+ "type": "string",
844
+ "const": "fleetless.deletion-intent.v2"
845
+ },
846
+ "environment": {
847
+ "type": "string",
848
+ "minLength": 1
849
+ },
850
+ "generation": {
851
+ "type": "string",
852
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
853
+ },
854
+ "sequence": {
855
+ "type": "integer",
856
+ "minimum": 1,
857
+ "maximum": 9007199254740991
858
+ },
859
+ "operation_id": {
860
+ "type": "string",
861
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
862
+ },
863
+ "intent_at": {
864
+ "type": "string",
865
+ "format": "date-time",
866
+ "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{3}(?:Z))$"
867
+ },
868
+ "previous_hash": {
869
+ "type": "string",
870
+ "pattern": "^[0-9a-f]{64}$"
871
+ },
872
+ "signing_key_id": {
873
+ "type": "string",
874
+ "minLength": 1
875
+ },
876
+ "kind": {
877
+ "type": "string",
878
+ "const": "org_role.delete"
879
+ },
880
+ "ids": {
881
+ "type": "object",
882
+ "properties": {
883
+ "org_id": {
884
+ "type": "string",
885
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
886
+ },
887
+ "role_id": {
888
+ "type": "string",
889
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
890
+ }
891
+ },
892
+ "required": [
893
+ "org_id",
894
+ "role_id"
895
+ ],
896
+ "additionalProperties": false
897
+ },
898
+ "record_hash": {
899
+ "type": "string",
900
+ "pattern": "^[0-9a-f]{64}$"
901
+ },
902
+ "signature": {
903
+ "type": "string",
904
+ "pattern": "^[A-Za-z0-9_-]{85}[AQgw]$"
905
+ }
906
+ },
907
+ "required": [
908
+ "schema",
909
+ "environment",
910
+ "generation",
911
+ "sequence",
912
+ "operation_id",
913
+ "intent_at",
914
+ "previous_hash",
915
+ "signing_key_id",
916
+ "kind",
917
+ "ids",
918
+ "record_hash",
919
+ "signature"
920
+ ],
921
+ "additionalProperties": false
922
+ },
839
923
  {
840
924
  "type": "object",
841
925
  "properties": {
@@ -130,6 +130,7 @@
130
130
  "app_user.remove",
131
131
  "app_role.delete",
132
132
  "server_key.revoke",
133
+ "org_role.delete",
133
134
  "billing_document_link.remove",
134
135
  "app_oidc_provider.delete",
135
136
  "team_invitation.revoke",
@@ -130,6 +130,7 @@
130
130
  "app_user.remove",
131
131
  "app_role.delete",
132
132
  "server_key.revoke",
133
+ "org_role.delete",
133
134
  "billing_document_link.remove",
134
135
  "app_oidc_provider.delete",
135
136
  "team_invitation.revoke",
@@ -15,7 +15,7 @@
15
15
  "capabilities": {
16
16
  "type": "object",
17
17
  "properties": {
18
- "action_history": {
18
+ "job_history": {
19
19
  "type": "boolean"
20
20
  },
21
21
  "assets": {
@@ -23,7 +23,7 @@
23
23
  }
24
24
  },
25
25
  "required": [
26
- "action_history",
26
+ "job_history",
27
27
  "assets"
28
28
  ],
29
29
  "additionalProperties": false
@@ -176,6 +176,32 @@
176
176
  }
177
177
  ],
178
178
  "description": "Days the org's audit log is kept."
179
+ },
180
+ "collection_records": {
181
+ "anyOf": [
182
+ {
183
+ "type": "integer",
184
+ "exclusiveMinimum": 0,
185
+ "maximum": 9007199254740991
186
+ },
187
+ {
188
+ "type": "null"
189
+ }
190
+ ],
191
+ "description": "Records in the app collections of all the org's apps, together. Only current records count, deleted ones and the history do not. A write or an import that would add records past it is refused `409 plan_limit` naming this key; reads continue."
192
+ },
193
+ "collection_bytes": {
194
+ "anyOf": [
195
+ {
196
+ "type": "integer",
197
+ "exclusiveMinimum": 0,
198
+ "maximum": 9007199254740991
199
+ },
200
+ {
201
+ "type": "null"
202
+ }
203
+ ],
204
+ "description": "Bytes the current records of all the org's app collections occupy, as stored JSON (decimal: 1 GB = 1,000,000,000). The history is shown beside it and not limited. A write or an import that would add data past it is refused `409 plan_limit` naming this key; reads continue."
179
205
  }
180
206
  },
181
207
  "required": [
@@ -186,7 +212,9 @@
186
212
  "live_video_ms_per_month",
187
213
  "asset_bytes_per_robot",
188
214
  "history_days",
189
- "audit_days"
215
+ "audit_days",
216
+ "collection_records",
217
+ "collection_bytes"
190
218
  ],
191
219
  "additionalProperties": false,
192
220
  "description": "The org's effective limits: the plan's, raised by its add-ons, or an operator's override in their place. `null` means unlimited for a count, and 90 days for `history_days` and `audit_days`."
@@ -31,6 +31,24 @@
31
31
  "type": "integer",
32
32
  "minimum": 0,
33
33
  "maximum": 9007199254740991
34
+ },
35
+ "collection_records": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991,
39
+ "description": "Current records in the app collections of all the org's apps. Deleted records do not count."
40
+ },
41
+ "collection_bytes": {
42
+ "type": "integer",
43
+ "minimum": 0,
44
+ "maximum": 9007199254740991,
45
+ "description": "Bytes the current records of the org's app collections occupy, as stored JSON."
46
+ },
47
+ "collection_history_bytes": {
48
+ "type": "integer",
49
+ "minimum": 0,
50
+ "maximum": 9007199254740991,
51
+ "description": "Bytes the history of the org's app collections occupies: revisions of current and deleted records. Information only; no limit applies to it."
34
52
  }
35
53
  },
36
54
  "additionalProperties": false
@@ -34,6 +34,32 @@
34
34
  "type": "integer",
35
35
  "exclusiveMinimum": 0,
36
36
  "maximum": 9007199254740991
37
+ },
38
+ "collection_records": {
39
+ "anyOf": [
40
+ {
41
+ "type": "integer",
42
+ "exclusiveMinimum": 0,
43
+ "maximum": 9007199254740991
44
+ },
45
+ {
46
+ "type": "null"
47
+ }
48
+ ],
49
+ "description": "The most records the app collections of all the org's apps may hold together: the plan limit `collection_records`, or the operator's override of it. `null` is by contract (Enterprise)."
50
+ },
51
+ "collection_bytes": {
52
+ "anyOf": [
53
+ {
54
+ "type": "integer",
55
+ "exclusiveMinimum": 0,
56
+ "maximum": 9007199254740991
57
+ },
58
+ {
59
+ "type": "null"
60
+ }
61
+ ],
62
+ "description": "The most bytes the current records of the org's app collections may occupy together: the plan limit `collection_bytes`, or the operator's override of it. `null` is by contract (Enterprise)."
37
63
  }
38
64
  },
39
65
  "required": [
@@ -42,7 +68,9 @@
42
68
  "max_end_users",
43
69
  "max_retention_bytes",
44
70
  "max_retention_writes_per_minute",
45
- "max_realtime_connections"
71
+ "max_realtime_connections",
72
+ "collection_records",
73
+ "collection_bytes"
46
74
  ],
47
75
  "additionalProperties": false
48
76
  },
@@ -78,6 +106,24 @@
78
106
  "type": "integer",
79
107
  "minimum": 0,
80
108
  "maximum": 9007199254740991
109
+ },
110
+ "collection_records": {
111
+ "type": "integer",
112
+ "minimum": 0,
113
+ "maximum": 9007199254740991,
114
+ "description": "Current records in the app collections of all the org's apps. Deleted records do not count."
115
+ },
116
+ "collection_bytes": {
117
+ "type": "integer",
118
+ "minimum": 0,
119
+ "maximum": 9007199254740991,
120
+ "description": "Bytes the current records of the org's app collections occupy, as stored JSON."
121
+ },
122
+ "collection_history_bytes": {
123
+ "type": "integer",
124
+ "minimum": 0,
125
+ "maximum": 9007199254740991,
126
+ "description": "Bytes the history of the org's app collections occupies: revisions of current and deleted records. Information only; no limit applies to it."
81
127
  }
82
128
  },
83
129
  "additionalProperties": false
@@ -31,6 +31,32 @@
31
31
  "type": "integer",
32
32
  "exclusiveMinimum": 0,
33
33
  "maximum": 9007199254740991
34
+ },
35
+ "collection_records": {
36
+ "anyOf": [
37
+ {
38
+ "type": "integer",
39
+ "exclusiveMinimum": 0,
40
+ "maximum": 9007199254740991
41
+ },
42
+ {
43
+ "type": "null"
44
+ }
45
+ ],
46
+ "description": "The most records the app collections of all the org's apps may hold together: the plan limit `collection_records`, or the operator's override of it. `null` is by contract (Enterprise)."
47
+ },
48
+ "collection_bytes": {
49
+ "anyOf": [
50
+ {
51
+ "type": "integer",
52
+ "exclusiveMinimum": 0,
53
+ "maximum": 9007199254740991
54
+ },
55
+ {
56
+ "type": "null"
57
+ }
58
+ ],
59
+ "description": "The most bytes the current records of the org's app collections may occupy together: the plan limit `collection_bytes`, or the operator's override of it. `null` is by contract (Enterprise)."
34
60
  }
35
61
  },
36
62
  "required": [
@@ -39,7 +65,9 @@
39
65
  "max_end_users",
40
66
  "max_retention_bytes",
41
67
  "max_retention_writes_per_minute",
42
- "max_realtime_connections"
68
+ "max_realtime_connections",
69
+ "collection_records",
70
+ "collection_bytes"
43
71
  ],
44
72
  "additionalProperties": false
45
73
  }
@@ -0,0 +1,206 @@
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
+ "key": {
11
+ "type": "string",
12
+ "pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
13
+ "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.",
14
+ "description": "The role's key, as `fleetless.yaml` and every assignment write it. Unique in the organization."
15
+ },
16
+ "name": {
17
+ "type": "string",
18
+ "minLength": 1,
19
+ "maxLength": 60,
20
+ "description": "The display name, 1 to 60 characters and trimmed. Changing it changes nothing about rights."
21
+ },
22
+ "inherits": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string"
26
+ },
27
+ "description": "The keys of the roles this one inherits from. A role holds whatever its parents hold, and theirs in turn. A key that names no role is kept as written; inheritance through it grants nothing, and the key appears under `dangling`."
28
+ },
29
+ "users": {
30
+ "type": "integer",
31
+ "minimum": 0,
32
+ "maximum": 9007199254740991,
33
+ "description": "App users, in every app of the organization, who hold this role."
34
+ },
35
+ "invitations": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991,
39
+ "description": "Invitations that carry this role."
40
+ },
41
+ "app_defaults": {
42
+ "type": "integer",
43
+ "minimum": 0,
44
+ "maximum": 9007199254740991,
45
+ "description": "Apps that use this role as their default role."
46
+ },
47
+ "references": {
48
+ "type": "integer",
49
+ "minimum": 0,
50
+ "maximum": 9007199254740991,
51
+ "description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml` or an `access` entry in an app's collections schema. A rename with `update_references` rewrites them."
52
+ }
53
+ },
54
+ "required": [
55
+ "key",
56
+ "name",
57
+ "inherits",
58
+ "users",
59
+ "invitations",
60
+ "app_defaults",
61
+ "references"
62
+ ],
63
+ "additionalProperties": false
64
+ },
65
+ "description": "The organization's roles with their counts, in the order they were created: the roles every organization starts with (`observe`, `operate` and `admin`) come first."
66
+ },
67
+ "dangling": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "properties": {
72
+ "key": {
73
+ "type": "string",
74
+ "description": "A key that names no role of the organization, because the role was deleted or renamed or never existed."
75
+ },
76
+ "places": {
77
+ "type": "array",
78
+ "items": {
79
+ "type": "object",
80
+ "properties": {
81
+ "kind": {
82
+ "type": "string",
83
+ "enum": [
84
+ "config",
85
+ "collection_schema",
86
+ "app_user",
87
+ "invitation",
88
+ "app_default",
89
+ "role_inherits",
90
+ "org_default"
91
+ ],
92
+ "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."
93
+ },
94
+ "label": {
95
+ "type": "string",
96
+ "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`)."
97
+ },
98
+ "path": {
99
+ "anyOf": [
100
+ {
101
+ "type": "string"
102
+ },
103
+ {
104
+ "type": "null"
105
+ }
106
+ ],
107
+ "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."
108
+ },
109
+ "robot_id": {
110
+ "anyOf": [
111
+ {
112
+ "type": "string",
113
+ "format": "uuid",
114
+ "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)$"
115
+ },
116
+ {
117
+ "type": "null"
118
+ }
119
+ ],
120
+ "description": "The robot whose document holds the key (`config`); `null` for every other kind."
121
+ },
122
+ "app_id": {
123
+ "anyOf": [
124
+ {
125
+ "type": "string",
126
+ "format": "uuid",
127
+ "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)$"
128
+ },
129
+ {
130
+ "type": "null"
131
+ }
132
+ ],
133
+ "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."
134
+ },
135
+ "user_id": {
136
+ "anyOf": [
137
+ {
138
+ "type": "string",
139
+ "format": "uuid",
140
+ "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)$"
141
+ },
142
+ {
143
+ "type": "null"
144
+ }
145
+ ],
146
+ "description": "The app user who holds the key (`app_user`); `null` for every other kind."
147
+ },
148
+ "document": {
149
+ "anyOf": [
150
+ {
151
+ "type": "string",
152
+ "enum": [
153
+ "published",
154
+ "draft"
155
+ ]
156
+ },
157
+ {
158
+ "type": "null"
159
+ }
160
+ ],
161
+ "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."
162
+ },
163
+ "new_version": {
164
+ "anyOf": [
165
+ {
166
+ "type": "integer",
167
+ "exclusiveMinimum": 0,
168
+ "maximum": 9007199254740991
169
+ },
170
+ {
171
+ "type": "null"
172
+ }
173
+ ],
174
+ "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."
175
+ }
176
+ },
177
+ "required": [
178
+ "kind",
179
+ "label",
180
+ "path",
181
+ "robot_id",
182
+ "app_id",
183
+ "user_id",
184
+ "document",
185
+ "new_version"
186
+ ],
187
+ "additionalProperties": false
188
+ },
189
+ "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."
190
+ }
191
+ },
192
+ "required": [
193
+ "key",
194
+ "places"
195
+ ],
196
+ "additionalProperties": false
197
+ },
198
+ "description": "Keys written somewhere that are no role, each with its places. Empty when nothing is out of step."
199
+ }
200
+ },
201
+ "required": [
202
+ "roles",
203
+ "dangling"
204
+ ],
205
+ "additionalProperties": false
206
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "key": {
6
+ "type": "string",
7
+ "pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
8
+ "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.",
9
+ "description": "The role's key, as `fleetless.yaml` and every assignment write it. Unique in the organization."
10
+ },
11
+ "name": {
12
+ "type": "string",
13
+ "minLength": 1,
14
+ "maxLength": 60,
15
+ "description": "The display name, 1 to 60 characters and trimmed. Changing it changes nothing about rights."
16
+ },
17
+ "inherits": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string"
21
+ },
22
+ "description": "The keys of the roles this one inherits from. A role holds whatever its parents hold, and theirs in turn. A key that names no role is kept as written; inheritance through it grants nothing, and the key appears under `dangling`."
23
+ },
24
+ "users": {
25
+ "type": "integer",
26
+ "minimum": 0,
27
+ "maximum": 9007199254740991,
28
+ "description": "App users, in every app of the organization, who hold this role."
29
+ },
30
+ "invitations": {
31
+ "type": "integer",
32
+ "minimum": 0,
33
+ "maximum": 9007199254740991,
34
+ "description": "Invitations that carry this role."
35
+ },
36
+ "app_defaults": {
37
+ "type": "integer",
38
+ "minimum": 0,
39
+ "maximum": 9007199254740991,
40
+ "description": "Apps that use this role as their default role."
41
+ },
42
+ "references": {
43
+ "type": "integer",
44
+ "minimum": 0,
45
+ "maximum": 9007199254740991,
46
+ "description": "Places in documents that name this role, such as a `role` in a robot's `fleetless.yaml` or an `access` entry in an app's collections schema. A rename with `update_references` rewrites them."
47
+ }
48
+ },
49
+ "required": [
50
+ "key",
51
+ "name",
52
+ "inherits",
53
+ "users",
54
+ "invitations",
55
+ "app_defaults",
56
+ "references"
57
+ ],
58
+ "additionalProperties": false
59
+ }
@@ -15,11 +15,11 @@
15
15
  }
16
16
  ]
17
17
  },
18
- "role_id": {
19
- "description": "The role the user holds from now on. A role belonging to another app is `404 not_found`, the same refusal a role that never existed gets; re-roling closes the user's live subscriptions.",
18
+ "role": {
19
+ "description": "The role the user holds from now on, by key. A key that names no role is accepted and grants nothing. The change applies at once: the user's live subscriptions are re-checked against the new role, and those it no longer allows end.",
20
20
  "type": "string",
21
- "format": "uuid",
22
- "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)$"
21
+ "pattern": "^(?!defaults$)[a-z][a-z0-9_]{0,62}$",
22
+ "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."
23
23
  },
24
24
  "status": {
25
25
  "type": "string",