@fleetless/contracts 6.0.0 → 6.1.0-next.2

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 (41) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/artifacts/openapi.json +692 -1
  3. package/artifacts/routes.json +101 -0
  4. package/artifacts/schema/addon-catalogue-entry.schema.json +81 -0
  5. package/artifacts/schema/addon-key.schema.json +11 -0
  6. package/artifacts/schema/admin-plan-change-request.schema.json +189 -0
  7. package/artifacts/schema/asset-plan-limit-details.schema.json +115 -0
  8. package/artifacts/schema/audit-actor.schema.json +2 -1
  9. package/artifacts/schema/audit-event.schema.json +2 -1
  10. package/artifacts/schema/audit-list-response.schema.json +2 -1
  11. package/artifacts/schema/org-addons.schema.json +44 -0
  12. package/artifacts/schema/org-lock.schema.json +25 -0
  13. package/artifacts/schema/org-locked-details.schema.json +18 -0
  14. package/artifacts/schema/org-plan-usage.schema.json +51 -0
  15. package/artifacts/schema/org-plan.schema.json +500 -0
  16. package/artifacts/schema/pending-plan-change.schema.json +123 -0
  17. package/artifacts/schema/plan-catalogue-entry.schema.json +249 -0
  18. package/artifacts/schema/plan-change-keep.schema.json +49 -0
  19. package/artifacts/schema/plan-change-reason.schema.json +10 -0
  20. package/artifacts/schema/plan-change-request.schema.json +77 -0
  21. package/artifacts/schema/plan-currency.schema.json +8 -0
  22. package/artifacts/schema/plan-features.schema.json +44 -0
  23. package/artifacts/schema/plan-id.schema.json +10 -0
  24. package/artifacts/schema/plan-limit-details.schema.json +94 -0
  25. package/artifacts/schema/plan-limits.schema.json +121 -0
  26. package/artifacts/schema/plan-overrides.schema.json +111 -0
  27. package/artifacts/schema/plan-prices.schema.json +37 -0
  28. package/artifacts/schema/plan-required-details.schema.json +45 -0
  29. package/dist/audit.d.ts +10 -0
  30. package/dist/audit.js +8 -1
  31. package/dist/errors.d.ts +138 -1
  32. package/dist/errors.js +104 -0
  33. package/dist/index.d.ts +6 -2
  34. package/dist/index.js +11 -1
  35. package/dist/plans.d.ts +507 -0
  36. package/dist/plans.js +487 -0
  37. package/dist/realtime.d.ts +2 -0
  38. package/dist/realtime.js +6 -0
  39. package/dist/routes.d.ts +5 -1
  40. package/dist/routes.js +59 -0
  41. package/package.json +1 -1
@@ -0,0 +1,249 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "enum": [
8
+ "basic",
9
+ "plus",
10
+ "pro",
11
+ "enterprise"
12
+ ],
13
+ "description": "The plan."
14
+ },
15
+ "name": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "description": "The plan's display name: Basic, Plus, Pro or Enterprise."
19
+ },
20
+ "limits": {
21
+ "type": "object",
22
+ "properties": {
23
+ "seats": {
24
+ "anyOf": [
25
+ {
26
+ "type": "integer",
27
+ "exclusiveMinimum": 0,
28
+ "maximum": 9007199254740991
29
+ },
30
+ {
31
+ "type": "null"
32
+ }
33
+ ],
34
+ "description": "Developers, owners included, plus pending team invitations."
35
+ },
36
+ "robots": {
37
+ "anyOf": [
38
+ {
39
+ "type": "integer",
40
+ "exclusiveMinimum": 0,
41
+ "maximum": 9007199254740991
42
+ },
43
+ {
44
+ "type": "null"
45
+ }
46
+ ],
47
+ "description": "Robots in the org."
48
+ },
49
+ "apps": {
50
+ "anyOf": [
51
+ {
52
+ "type": "integer",
53
+ "exclusiveMinimum": 0,
54
+ "maximum": 9007199254740991
55
+ },
56
+ {
57
+ "type": "null"
58
+ }
59
+ ],
60
+ "description": "Apps in the org."
61
+ },
62
+ "app_users": {
63
+ "anyOf": [
64
+ {
65
+ "type": "integer",
66
+ "exclusiveMinimum": 0,
67
+ "maximum": 9007199254740991
68
+ },
69
+ {
70
+ "type": "null"
71
+ }
72
+ ],
73
+ "description": "App users across every app of the org, plus pending app-user invitations."
74
+ },
75
+ "live_video_ms_per_month": {
76
+ "anyOf": [
77
+ {
78
+ "type": "integer",
79
+ "exclusiveMinimum": 0,
80
+ "maximum": 9007199254740991
81
+ },
82
+ {
83
+ "type": "null"
84
+ }
85
+ ],
86
+ "description": "Live video watched by app users in one UTC calendar month, in milliseconds, across the org. Console sessions do not count."
87
+ },
88
+ "asset_bytes_per_robot": {
89
+ "anyOf": [
90
+ {
91
+ "type": "integer",
92
+ "exclusiveMinimum": 0,
93
+ "maximum": 9007199254740991
94
+ },
95
+ {
96
+ "type": "null"
97
+ }
98
+ ],
99
+ "description": "Asset storage per robot, in bytes (decimal: 1 GB = 1,000,000,000). The org stores up to robots × this value in total."
100
+ },
101
+ "history_days": {
102
+ "anyOf": [
103
+ {
104
+ "type": "integer",
105
+ "exclusiveMinimum": 0,
106
+ "maximum": 9007199254740991
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
111
+ ],
112
+ "description": "Days the org's robot history is kept."
113
+ },
114
+ "audit_days": {
115
+ "anyOf": [
116
+ {
117
+ "type": "integer",
118
+ "exclusiveMinimum": 0,
119
+ "maximum": 9007199254740991
120
+ },
121
+ {
122
+ "type": "null"
123
+ }
124
+ ],
125
+ "description": "Days the org's audit log is kept."
126
+ }
127
+ },
128
+ "required": [
129
+ "seats",
130
+ "robots",
131
+ "apps",
132
+ "app_users",
133
+ "live_video_ms_per_month",
134
+ "asset_bytes_per_robot",
135
+ "history_days",
136
+ "audit_days"
137
+ ],
138
+ "additionalProperties": false,
139
+ "description": "What the plan allows. `null` means by contract."
140
+ },
141
+ "features": {
142
+ "type": "object",
143
+ "properties": {
144
+ "app_mcp": {
145
+ "type": "boolean",
146
+ "description": "An app's own MCP endpoint, for its app users."
147
+ },
148
+ "two_factor": {
149
+ "type": "boolean",
150
+ "description": "Two-factor sign-in for developers."
151
+ },
152
+ "require_two_factor": {
153
+ "type": "boolean",
154
+ "description": "An owner may require two-factor sign-in for every developer of the org."
155
+ },
156
+ "app_oidc": {
157
+ "type": "boolean",
158
+ "description": "An app may let its users sign in through an OpenID Connect identity provider."
159
+ },
160
+ "hosted_logo": {
161
+ "type": "boolean",
162
+ "description": "An app's hosted pages show its logo and accent colour, not only its name."
163
+ },
164
+ "audit_export": {
165
+ "type": "boolean",
166
+ "description": "The audit log can be exported as CSV."
167
+ },
168
+ "addons": {
169
+ "type": "boolean",
170
+ "description": "Add-ons can be bought on top of the plan."
171
+ }
172
+ },
173
+ "required": [
174
+ "app_mcp",
175
+ "two_factor",
176
+ "require_two_factor",
177
+ "app_oidc",
178
+ "hosted_logo",
179
+ "audit_export",
180
+ "addons"
181
+ ],
182
+ "additionalProperties": false,
183
+ "description": "What the plan unlocks."
184
+ },
185
+ "prices": {
186
+ "anyOf": [
187
+ {
188
+ "type": "object",
189
+ "properties": {
190
+ "eur_month": {
191
+ "type": "integer",
192
+ "minimum": 0,
193
+ "maximum": 9007199254740991,
194
+ "description": "Per month in euro cents, excluding VAT."
195
+ },
196
+ "usd_month": {
197
+ "type": "integer",
198
+ "minimum": 0,
199
+ "maximum": 9007199254740991,
200
+ "description": "Per month in US dollar cents, excluding VAT: the euro price × 1.15, rounded up to a whole dollar."
201
+ },
202
+ "eur_year": {
203
+ "type": "integer",
204
+ "minimum": 0,
205
+ "maximum": 9007199254740991,
206
+ "description": "Per year in euro cents, excluding VAT: twelve months less 15 %."
207
+ },
208
+ "usd_year": {
209
+ "type": "integer",
210
+ "minimum": 0,
211
+ "maximum": 9007199254740991,
212
+ "description": "Per year in US dollar cents, excluding VAT: the yearly euro price × 1.15, rounded up to a whole dollar."
213
+ }
214
+ },
215
+ "required": [
216
+ "eur_month",
217
+ "usd_month",
218
+ "eur_year",
219
+ "usd_year"
220
+ ],
221
+ "additionalProperties": false
222
+ },
223
+ {
224
+ "type": "null"
225
+ }
226
+ ],
227
+ "description": "`null` for Enterprise: sold by contract, on request."
228
+ },
229
+ "support": {
230
+ "type": "string",
231
+ "enum": [
232
+ "community",
233
+ "email",
234
+ "priority",
235
+ "named_contact"
236
+ ],
237
+ "description": "The support that comes with the plan."
238
+ }
239
+ },
240
+ "required": [
241
+ "id",
242
+ "name",
243
+ "limits",
244
+ "features",
245
+ "prices",
246
+ "support"
247
+ ],
248
+ "additionalProperties": false
249
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "robots": {
6
+ "type": "array",
7
+ "items": {
8
+ "type": "string",
9
+ "format": "uuid",
10
+ "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)$"
11
+ },
12
+ "description": "The robots that stay, by id. Every other robot is deleted when the change takes effect."
13
+ },
14
+ "apps": {
15
+ "type": "array",
16
+ "items": {
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
+ "description": "The apps that stay, by id. Every other app is deleted when the change takes effect."
22
+ },
23
+ "app_users": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "string",
27
+ "format": "uuid",
28
+ "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)$"
29
+ },
30
+ "description": "The app users that stay, by id, across every app. Every other app user is deleted when the change takes effect."
31
+ },
32
+ "developers": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string",
36
+ "format": "uuid",
37
+ "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)$"
38
+ },
39
+ "description": "The developers that stay, by user id, owners never among them: every owner stays. Every other developer is removed from the org when the change takes effect."
40
+ }
41
+ },
42
+ "required": [
43
+ "robots",
44
+ "apps",
45
+ "app_users",
46
+ "developers"
47
+ ],
48
+ "additionalProperties": false
49
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "string",
4
+ "enum": [
5
+ "downgrade",
6
+ "cancel",
7
+ "migration",
8
+ "lock"
9
+ ]
10
+ }
@@ -0,0 +1,77 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "target_plan": {
6
+ "type": "string",
7
+ "enum": [
8
+ "basic",
9
+ "plus",
10
+ "pro",
11
+ "enterprise"
12
+ ],
13
+ "description": "The lower plan to move to; `basic` cancels."
14
+ },
15
+ "keep": {
16
+ "anyOf": [
17
+ {
18
+ "type": "object",
19
+ "properties": {
20
+ "robots": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "string",
24
+ "format": "uuid",
25
+ "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)$"
26
+ },
27
+ "description": "The robots that stay, by id. Every other robot is deleted when the change takes effect."
28
+ },
29
+ "apps": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "string",
33
+ "format": "uuid",
34
+ "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)$"
35
+ },
36
+ "description": "The apps that stay, by id. Every other app is deleted when the change takes effect."
37
+ },
38
+ "app_users": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string",
42
+ "format": "uuid",
43
+ "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)$"
44
+ },
45
+ "description": "The app users that stay, by id, across every app. Every other app user is deleted when the change takes effect."
46
+ },
47
+ "developers": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string",
51
+ "format": "uuid",
52
+ "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)$"
53
+ },
54
+ "description": "The developers that stay, by user id, owners never among them: every owner stays. Every other developer is removed from the org when the change takes effect."
55
+ }
56
+ },
57
+ "required": [
58
+ "robots",
59
+ "apps",
60
+ "app_users",
61
+ "developers"
62
+ ],
63
+ "additionalProperties": false
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ],
69
+ "description": "What stays. `null` when the org already fits the target plan, so nothing is deleted."
70
+ }
71
+ },
72
+ "required": [
73
+ "target_plan",
74
+ "keep"
75
+ ],
76
+ "additionalProperties": false
77
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "string",
4
+ "enum": [
5
+ "eur",
6
+ "usd"
7
+ ]
8
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "app_mcp": {
6
+ "type": "boolean",
7
+ "description": "An app's own MCP endpoint, for its app users."
8
+ },
9
+ "two_factor": {
10
+ "type": "boolean",
11
+ "description": "Two-factor sign-in for developers."
12
+ },
13
+ "require_two_factor": {
14
+ "type": "boolean",
15
+ "description": "An owner may require two-factor sign-in for every developer of the org."
16
+ },
17
+ "app_oidc": {
18
+ "type": "boolean",
19
+ "description": "An app may let its users sign in through an OpenID Connect identity provider."
20
+ },
21
+ "hosted_logo": {
22
+ "type": "boolean",
23
+ "description": "An app's hosted pages show its logo and accent colour, not only its name."
24
+ },
25
+ "audit_export": {
26
+ "type": "boolean",
27
+ "description": "The audit log can be exported as CSV."
28
+ },
29
+ "addons": {
30
+ "type": "boolean",
31
+ "description": "Add-ons can be bought on top of the plan."
32
+ }
33
+ },
34
+ "required": [
35
+ "app_mcp",
36
+ "two_factor",
37
+ "require_two_factor",
38
+ "app_oidc",
39
+ "hosted_logo",
40
+ "audit_export",
41
+ "addons"
42
+ ],
43
+ "additionalProperties": false
44
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "string",
4
+ "enum": [
5
+ "basic",
6
+ "plus",
7
+ "pro",
8
+ "enterprise"
9
+ ]
10
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "limit": {
6
+ "type": "string",
7
+ "enum": [
8
+ "seats",
9
+ "robots",
10
+ "apps",
11
+ "app_users",
12
+ "live_video_ms_per_month",
13
+ "asset_bytes_per_robot"
14
+ ],
15
+ "description": "The limit the action would exceed."
16
+ },
17
+ "used": {
18
+ "type": "integer",
19
+ "minimum": 0,
20
+ "maximum": 9007199254740991,
21
+ "description": "How much of the limit the org uses now."
22
+ },
23
+ "max": {
24
+ "type": "integer",
25
+ "minimum": 0,
26
+ "maximum": 9007199254740991,
27
+ "description": "The limit. For `asset_bytes_per_robot`, the org's whole pool: robots × the plan's bytes per robot."
28
+ },
29
+ "plan": {
30
+ "type": "string",
31
+ "enum": [
32
+ "basic",
33
+ "plus",
34
+ "pro",
35
+ "enterprise"
36
+ ],
37
+ "description": "The plan whose limit refused: the target plan while a move to a lower plan is pending."
38
+ },
39
+ "lifted_by": {
40
+ "type": "object",
41
+ "properties": {
42
+ "plan": {
43
+ "anyOf": [
44
+ {
45
+ "type": "string",
46
+ "enum": [
47
+ "basic",
48
+ "plus",
49
+ "pro",
50
+ "enterprise"
51
+ ]
52
+ },
53
+ {
54
+ "type": "null"
55
+ }
56
+ ],
57
+ "description": "The cheapest higher plan that raises this limit, or `null` when none does."
58
+ },
59
+ "addon": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string",
63
+ "enum": [
64
+ "seats",
65
+ "robots",
66
+ "apps",
67
+ "app_user_packs",
68
+ "live_video_packs"
69
+ ]
70
+ },
71
+ {
72
+ "type": "null"
73
+ }
74
+ ],
75
+ "description": "The add-on that raises this limit, when the org's plan can buy add-ons; otherwise `null`."
76
+ }
77
+ },
78
+ "required": [
79
+ "plan",
80
+ "addon"
81
+ ],
82
+ "additionalProperties": false,
83
+ "description": "What would lift the limit."
84
+ }
85
+ },
86
+ "required": [
87
+ "limit",
88
+ "used",
89
+ "max",
90
+ "plan",
91
+ "lifted_by"
92
+ ],
93
+ "additionalProperties": false
94
+ }
@@ -0,0 +1,121 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "seats": {
6
+ "anyOf": [
7
+ {
8
+ "type": "integer",
9
+ "exclusiveMinimum": 0,
10
+ "maximum": 9007199254740991
11
+ },
12
+ {
13
+ "type": "null"
14
+ }
15
+ ],
16
+ "description": "Developers, owners included, plus pending team invitations."
17
+ },
18
+ "robots": {
19
+ "anyOf": [
20
+ {
21
+ "type": "integer",
22
+ "exclusiveMinimum": 0,
23
+ "maximum": 9007199254740991
24
+ },
25
+ {
26
+ "type": "null"
27
+ }
28
+ ],
29
+ "description": "Robots in the org."
30
+ },
31
+ "apps": {
32
+ "anyOf": [
33
+ {
34
+ "type": "integer",
35
+ "exclusiveMinimum": 0,
36
+ "maximum": 9007199254740991
37
+ },
38
+ {
39
+ "type": "null"
40
+ }
41
+ ],
42
+ "description": "Apps in the org."
43
+ },
44
+ "app_users": {
45
+ "anyOf": [
46
+ {
47
+ "type": "integer",
48
+ "exclusiveMinimum": 0,
49
+ "maximum": 9007199254740991
50
+ },
51
+ {
52
+ "type": "null"
53
+ }
54
+ ],
55
+ "description": "App users across every app of the org, plus pending app-user invitations."
56
+ },
57
+ "live_video_ms_per_month": {
58
+ "anyOf": [
59
+ {
60
+ "type": "integer",
61
+ "exclusiveMinimum": 0,
62
+ "maximum": 9007199254740991
63
+ },
64
+ {
65
+ "type": "null"
66
+ }
67
+ ],
68
+ "description": "Live video watched by app users in one UTC calendar month, in milliseconds, across the org. Console sessions do not count."
69
+ },
70
+ "asset_bytes_per_robot": {
71
+ "anyOf": [
72
+ {
73
+ "type": "integer",
74
+ "exclusiveMinimum": 0,
75
+ "maximum": 9007199254740991
76
+ },
77
+ {
78
+ "type": "null"
79
+ }
80
+ ],
81
+ "description": "Asset storage per robot, in bytes (decimal: 1 GB = 1,000,000,000). The org stores up to robots × this value in total."
82
+ },
83
+ "history_days": {
84
+ "anyOf": [
85
+ {
86
+ "type": "integer",
87
+ "exclusiveMinimum": 0,
88
+ "maximum": 9007199254740991
89
+ },
90
+ {
91
+ "type": "null"
92
+ }
93
+ ],
94
+ "description": "Days the org's robot history is kept."
95
+ },
96
+ "audit_days": {
97
+ "anyOf": [
98
+ {
99
+ "type": "integer",
100
+ "exclusiveMinimum": 0,
101
+ "maximum": 9007199254740991
102
+ },
103
+ {
104
+ "type": "null"
105
+ }
106
+ ],
107
+ "description": "Days the org's audit log is kept."
108
+ }
109
+ },
110
+ "required": [
111
+ "seats",
112
+ "robots",
113
+ "apps",
114
+ "app_users",
115
+ "live_video_ms_per_month",
116
+ "asset_bytes_per_robot",
117
+ "history_days",
118
+ "audit_days"
119
+ ],
120
+ "additionalProperties": false
121
+ }