@fleetless/contracts 6.0.0-next.3 → 6.1.0-next.1

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 +636 -1
  3. package/artifacts/routes.json +101 -0
  4. package/artifacts/schema/addon-catalogue-entry.schema.json +75 -0
  5. package/artifacts/schema/addon-key.schema.json +11 -0
  6. package/artifacts/schema/admin-plan-change-request.schema.json +171 -0
  7. package/artifacts/schema/asset-plan-limit-details.schema.json +108 -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 +39 -0
  12. package/artifacts/schema/org-lock.schema.json +23 -0
  13. package/artifacts/schema/org-locked-details.schema.json +17 -0
  14. package/artifacts/schema/org-plan-usage.schema.json +45 -0
  15. package/artifacts/schema/org-plan.schema.json +450 -0
  16. package/artifacts/schema/pending-plan-change.schema.json +112 -0
  17. package/artifacts/schema/plan-catalogue-entry.schema.json +226 -0
  18. package/artifacts/schema/plan-change-keep.schema.json +45 -0
  19. package/artifacts/schema/plan-change-reason.schema.json +10 -0
  20. package/artifacts/schema/plan-change-request.schema.json +71 -0
  21. package/artifacts/schema/plan-currency.schema.json +8 -0
  22. package/artifacts/schema/plan-features.schema.json +37 -0
  23. package/artifacts/schema/plan-id.schema.json +10 -0
  24. package/artifacts/schema/plan-limit-details.schema.json +87 -0
  25. package/artifacts/schema/plan-limits.schema.json +113 -0
  26. package/artifacts/schema/plan-overrides.schema.json +103 -0
  27. package/artifacts/schema/plan-prices.schema.json +33 -0
  28. package/artifacts/schema/plan-required-details.schema.json +42 -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 +94 -0
  33. package/dist/index.d.ts +6 -2
  34. package/dist/index.js +11 -1
  35. package/dist/plans.d.ts +525 -0
  36. package/dist/plans.js +442 -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 +58 -0
  41. package/package.json +1 -1
@@ -0,0 +1,450 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "plan": {
6
+ "type": "string",
7
+ "enum": [
8
+ "basic",
9
+ "plus",
10
+ "pro",
11
+ "enterprise"
12
+ ]
13
+ },
14
+ "currency": {
15
+ "type": "string",
16
+ "enum": [
17
+ "eur",
18
+ "usd"
19
+ ]
20
+ },
21
+ "period_ends_at": {
22
+ "type": "string",
23
+ "format": "date-time",
24
+ "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))$",
25
+ "description": "The end of the organization's current billing period; while no payment period exists yet, the end of the current UTC calendar month. A pending downward plan change normally takes effect at this exact instant — except one chosen while the org was locked, which lands at once, and the platform's own move off the beta, which lands at its switch date instead."
26
+ },
27
+ "addons": {
28
+ "type": "object",
29
+ "properties": {
30
+ "seats": {
31
+ "type": "integer",
32
+ "minimum": 0,
33
+ "maximum": 9007199254740991
34
+ },
35
+ "robots": {
36
+ "type": "integer",
37
+ "minimum": 0,
38
+ "maximum": 9007199254740991
39
+ },
40
+ "apps": {
41
+ "type": "integer",
42
+ "minimum": 0,
43
+ "maximum": 9007199254740991
44
+ },
45
+ "app_user_packs": {
46
+ "type": "integer",
47
+ "minimum": 0,
48
+ "maximum": 9007199254740991
49
+ },
50
+ "live_video_packs": {
51
+ "type": "integer",
52
+ "minimum": 0,
53
+ "maximum": 9007199254740991
54
+ }
55
+ },
56
+ "required": [
57
+ "seats",
58
+ "robots",
59
+ "apps",
60
+ "app_user_packs",
61
+ "live_video_packs"
62
+ ],
63
+ "additionalProperties": false
64
+ },
65
+ "limits": {
66
+ "type": "object",
67
+ "properties": {
68
+ "seats": {
69
+ "anyOf": [
70
+ {
71
+ "type": "integer",
72
+ "exclusiveMinimum": 0,
73
+ "maximum": 9007199254740991
74
+ },
75
+ {
76
+ "type": "null"
77
+ }
78
+ ]
79
+ },
80
+ "robots": {
81
+ "anyOf": [
82
+ {
83
+ "type": "integer",
84
+ "exclusiveMinimum": 0,
85
+ "maximum": 9007199254740991
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ]
91
+ },
92
+ "apps": {
93
+ "anyOf": [
94
+ {
95
+ "type": "integer",
96
+ "exclusiveMinimum": 0,
97
+ "maximum": 9007199254740991
98
+ },
99
+ {
100
+ "type": "null"
101
+ }
102
+ ]
103
+ },
104
+ "app_users": {
105
+ "anyOf": [
106
+ {
107
+ "type": "integer",
108
+ "exclusiveMinimum": 0,
109
+ "maximum": 9007199254740991
110
+ },
111
+ {
112
+ "type": "null"
113
+ }
114
+ ]
115
+ },
116
+ "live_video_ms_per_month": {
117
+ "anyOf": [
118
+ {
119
+ "type": "integer",
120
+ "exclusiveMinimum": 0,
121
+ "maximum": 9007199254740991
122
+ },
123
+ {
124
+ "type": "null"
125
+ }
126
+ ]
127
+ },
128
+ "asset_bytes_per_robot": {
129
+ "anyOf": [
130
+ {
131
+ "type": "integer",
132
+ "exclusiveMinimum": 0,
133
+ "maximum": 9007199254740991
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ]
139
+ },
140
+ "history_days": {
141
+ "anyOf": [
142
+ {
143
+ "type": "integer",
144
+ "exclusiveMinimum": 0,
145
+ "maximum": 9007199254740991
146
+ },
147
+ {
148
+ "type": "null"
149
+ }
150
+ ]
151
+ },
152
+ "audit_days": {
153
+ "anyOf": [
154
+ {
155
+ "type": "integer",
156
+ "exclusiveMinimum": 0,
157
+ "maximum": 9007199254740991
158
+ },
159
+ {
160
+ "type": "null"
161
+ }
162
+ ]
163
+ }
164
+ },
165
+ "required": [
166
+ "seats",
167
+ "robots",
168
+ "apps",
169
+ "app_users",
170
+ "live_video_ms_per_month",
171
+ "asset_bytes_per_robot",
172
+ "history_days",
173
+ "audit_days"
174
+ ],
175
+ "additionalProperties": false
176
+ },
177
+ "features": {
178
+ "type": "object",
179
+ "properties": {
180
+ "app_mcp": {
181
+ "type": "boolean"
182
+ },
183
+ "two_factor": {
184
+ "type": "boolean"
185
+ },
186
+ "require_two_factor": {
187
+ "type": "boolean"
188
+ },
189
+ "app_oidc": {
190
+ "type": "boolean"
191
+ },
192
+ "hosted_logo": {
193
+ "type": "boolean"
194
+ },
195
+ "audit_export": {
196
+ "type": "boolean"
197
+ },
198
+ "addons": {
199
+ "type": "boolean"
200
+ }
201
+ },
202
+ "required": [
203
+ "app_mcp",
204
+ "two_factor",
205
+ "require_two_factor",
206
+ "app_oidc",
207
+ "hosted_logo",
208
+ "audit_export",
209
+ "addons"
210
+ ],
211
+ "additionalProperties": false
212
+ },
213
+ "usage": {
214
+ "type": "object",
215
+ "properties": {
216
+ "seats": {
217
+ "type": "integer",
218
+ "minimum": 0,
219
+ "maximum": 9007199254740991
220
+ },
221
+ "robots": {
222
+ "type": "integer",
223
+ "minimum": 0,
224
+ "maximum": 9007199254740991
225
+ },
226
+ "apps": {
227
+ "type": "integer",
228
+ "minimum": 0,
229
+ "maximum": 9007199254740991
230
+ },
231
+ "app_users": {
232
+ "type": "integer",
233
+ "minimum": 0,
234
+ "maximum": 9007199254740991
235
+ },
236
+ "live_video_ms_this_month": {
237
+ "type": "integer",
238
+ "minimum": 0,
239
+ "maximum": 9007199254740991
240
+ },
241
+ "asset_bytes": {
242
+ "type": "integer",
243
+ "minimum": 0,
244
+ "maximum": 9007199254740991
245
+ }
246
+ },
247
+ "required": [
248
+ "seats",
249
+ "robots",
250
+ "apps",
251
+ "app_users",
252
+ "live_video_ms_this_month",
253
+ "asset_bytes"
254
+ ],
255
+ "additionalProperties": false
256
+ },
257
+ "pending_change": {
258
+ "anyOf": [
259
+ {
260
+ "type": "object",
261
+ "properties": {
262
+ "target_plan": {
263
+ "type": "string",
264
+ "enum": [
265
+ "basic",
266
+ "plus",
267
+ "pro",
268
+ "enterprise"
269
+ ]
270
+ },
271
+ "reason": {
272
+ "type": "string",
273
+ "enum": [
274
+ "downgrade",
275
+ "cancel",
276
+ "migration",
277
+ "lock"
278
+ ]
279
+ },
280
+ "effective_at": {
281
+ "anyOf": [
282
+ {
283
+ "type": "string",
284
+ "format": "date-time",
285
+ "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))$"
286
+ },
287
+ {
288
+ "type": "null"
289
+ }
290
+ ]
291
+ },
292
+ "keep": {
293
+ "anyOf": [
294
+ {
295
+ "type": "object",
296
+ "properties": {
297
+ "robots": {
298
+ "type": "array",
299
+ "items": {
300
+ "type": "string",
301
+ "format": "uuid",
302
+ "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)$"
303
+ }
304
+ },
305
+ "apps": {
306
+ "type": "array",
307
+ "items": {
308
+ "type": "string",
309
+ "format": "uuid",
310
+ "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)$"
311
+ }
312
+ },
313
+ "app_users": {
314
+ "type": "array",
315
+ "items": {
316
+ "type": "string",
317
+ "format": "uuid",
318
+ "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)$"
319
+ }
320
+ },
321
+ "developers": {
322
+ "type": "array",
323
+ "items": {
324
+ "type": "string",
325
+ "format": "uuid",
326
+ "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)$"
327
+ }
328
+ }
329
+ },
330
+ "required": [
331
+ "robots",
332
+ "apps",
333
+ "app_users",
334
+ "developers"
335
+ ],
336
+ "additionalProperties": false
337
+ },
338
+ {
339
+ "type": "null"
340
+ }
341
+ ]
342
+ },
343
+ "history_days_after": {
344
+ "type": "integer",
345
+ "exclusiveMinimum": 0,
346
+ "maximum": 9007199254740991
347
+ },
348
+ "chosen_by": {
349
+ "type": "string",
350
+ "format": "uuid",
351
+ "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)$"
352
+ },
353
+ "chosen_at": {
354
+ "type": "string",
355
+ "format": "date-time",
356
+ "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))$"
357
+ }
358
+ },
359
+ "required": [
360
+ "target_plan",
361
+ "reason",
362
+ "effective_at",
363
+ "keep",
364
+ "history_days_after",
365
+ "chosen_by",
366
+ "chosen_at"
367
+ ],
368
+ "additionalProperties": false
369
+ },
370
+ {
371
+ "type": "null"
372
+ }
373
+ ]
374
+ },
375
+ "lock": {
376
+ "anyOf": [
377
+ {
378
+ "type": "object",
379
+ "properties": {
380
+ "reason": {
381
+ "type": "string",
382
+ "enum": [
383
+ "payment",
384
+ "migration"
385
+ ]
386
+ },
387
+ "since": {
388
+ "type": "string",
389
+ "format": "date-time",
390
+ "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))$"
391
+ }
392
+ },
393
+ "required": [
394
+ "reason",
395
+ "since"
396
+ ],
397
+ "additionalProperties": false
398
+ },
399
+ {
400
+ "type": "null"
401
+ }
402
+ ]
403
+ },
404
+ "switch": {
405
+ "anyOf": [
406
+ {
407
+ "type": "object",
408
+ "properties": {
409
+ "at": {
410
+ "anyOf": [
411
+ {
412
+ "type": "string",
413
+ "format": "date-time",
414
+ "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))$"
415
+ },
416
+ {
417
+ "type": "null"
418
+ }
419
+ ]
420
+ },
421
+ "needs_choice": {
422
+ "type": "boolean"
423
+ }
424
+ },
425
+ "required": [
426
+ "at",
427
+ "needs_choice"
428
+ ],
429
+ "additionalProperties": false
430
+ },
431
+ {
432
+ "type": "null"
433
+ }
434
+ ]
435
+ }
436
+ },
437
+ "required": [
438
+ "plan",
439
+ "currency",
440
+ "period_ends_at",
441
+ "addons",
442
+ "limits",
443
+ "features",
444
+ "usage",
445
+ "pending_change",
446
+ "lock",
447
+ "switch"
448
+ ],
449
+ "additionalProperties": false
450
+ }
@@ -0,0 +1,112 @@
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
+ },
14
+ "reason": {
15
+ "type": "string",
16
+ "enum": [
17
+ "downgrade",
18
+ "cancel",
19
+ "migration",
20
+ "lock"
21
+ ]
22
+ },
23
+ "effective_at": {
24
+ "anyOf": [
25
+ {
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
+ {
31
+ "type": "null"
32
+ }
33
+ ]
34
+ },
35
+ "keep": {
36
+ "anyOf": [
37
+ {
38
+ "type": "object",
39
+ "properties": {
40
+ "robots": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "format": "uuid",
45
+ "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)$"
46
+ }
47
+ },
48
+ "apps": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string",
52
+ "format": "uuid",
53
+ "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)$"
54
+ }
55
+ },
56
+ "app_users": {
57
+ "type": "array",
58
+ "items": {
59
+ "type": "string",
60
+ "format": "uuid",
61
+ "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)$"
62
+ }
63
+ },
64
+ "developers": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string",
68
+ "format": "uuid",
69
+ "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)$"
70
+ }
71
+ }
72
+ },
73
+ "required": [
74
+ "robots",
75
+ "apps",
76
+ "app_users",
77
+ "developers"
78
+ ],
79
+ "additionalProperties": false
80
+ },
81
+ {
82
+ "type": "null"
83
+ }
84
+ ]
85
+ },
86
+ "history_days_after": {
87
+ "type": "integer",
88
+ "exclusiveMinimum": 0,
89
+ "maximum": 9007199254740991
90
+ },
91
+ "chosen_by": {
92
+ "type": "string",
93
+ "format": "uuid",
94
+ "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)$"
95
+ },
96
+ "chosen_at": {
97
+ "type": "string",
98
+ "format": "date-time",
99
+ "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))$"
100
+ }
101
+ },
102
+ "required": [
103
+ "target_plan",
104
+ "reason",
105
+ "effective_at",
106
+ "keep",
107
+ "history_days_after",
108
+ "chosen_by",
109
+ "chosen_at"
110
+ ],
111
+ "additionalProperties": false
112
+ }