@fleetless/contracts 14.0.0 → 15.0.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 (126) hide show
  1. package/CHANGELOG.md +184 -0
  2. package/artifacts/openapi.json +20210 -11764
  3. package/artifacts/routes.json +1160 -39
  4. package/artifacts/schema/addon-catalogue-entry.schema.json +3 -1
  5. package/artifacts/schema/admin-plan-change-request.schema.json +26 -0
  6. package/artifacts/schema/app-deletion-summary.schema.json +15 -1
  7. package/artifacts/schema/asset-plan-limit-details.schema.json +3 -1
  8. package/artifacts/schema/billing-change-response.schema.json +9 -8
  9. package/artifacts/schema/checkout-response.schema.json +6 -6
  10. package/artifacts/schema/cloud-config.schema.json +5 -5
  11. package/artifacts/schema/collection-actor.schema.json +35 -0
  12. package/artifacts/schema/collection-definitions-response.schema.json +612 -0
  13. package/artifacts/schema/collection-event.schema.json +216 -0
  14. package/artifacts/schema/collection-export-query.schema.json +56 -0
  15. package/artifacts/schema/collection-filter.schema.json +9 -0
  16. package/artifacts/schema/collection-import-preview.schema.json +143 -0
  17. package/artifacts/schema/collection-import-request.schema.json +105 -0
  18. package/artifacts/schema/collection-import-result.schema.json +38 -0
  19. package/artifacts/schema/collection-list-response.schema.json +119 -0
  20. package/artifacts/schema/collection-record-get-query.schema.json +12 -0
  21. package/artifacts/schema/collection-record-history-query.schema.json +35 -0
  22. package/artifacts/schema/collection-record-history-response.schema.json +389 -0
  23. package/artifacts/schema/collection-record-list-query.schema.json +67 -0
  24. package/artifacts/schema/collection-record-list-response.schema.json +212 -0
  25. package/artifacts/schema/collection-record-restore-request.schema.json +14 -0
  26. package/artifacts/schema/collection-record-write.schema.json +31 -0
  27. package/artifacts/schema/collection-record.schema.json +180 -0
  28. package/artifacts/schema/collection-revision.schema.json +295 -0
  29. package/artifacts/schema/collection-subscribe-error.schema.json +31 -0
  30. package/artifacts/schema/collection-subscribe.schema.json +48 -0
  31. package/artifacts/schema/collection-subscribed.schema.json +22 -0
  32. package/artifacts/schema/collection-summary.schema.json +92 -0
  33. package/artifacts/schema/collection-unsubscribe.schema.json +22 -0
  34. package/artifacts/schema/collections-access-change.schema.json +34 -0
  35. package/artifacts/schema/collections-document.schema.json +732 -0
  36. package/artifacts/schema/collections-draft-response.schema.json +845 -0
  37. package/artifacts/schema/collections-effect.schema.json +384 -0
  38. package/artifacts/schema/collections-issue.schema.json +36 -0
  39. package/artifacts/schema/collections-publish-request.schema.json +18 -0
  40. package/artifacts/schema/collections-publish-response.schema.json +450 -0
  41. package/artifacts/schema/collections-purge-preview.schema.json +60 -0
  42. package/artifacts/schema/collections-purge-request.schema.json +27 -0
  43. package/artifacts/schema/collections-purge-response.schema.json +30 -0
  44. package/artifacts/schema/collections-restore-preview-query.schema.json +20 -0
  45. package/artifacts/schema/collections-restore-preview.schema.json +581 -0
  46. package/artifacts/schema/collections-restore-request.schema.json +27 -0
  47. package/artifacts/schema/collections-restore-response.schema.json +455 -0
  48. package/artifacts/schema/collections-schema-preview.schema.json +519 -0
  49. package/artifacts/schema/collections-schema-published.schema.json +22 -0
  50. package/artifacts/schema/collections-version-response.schema.json +869 -0
  51. package/artifacts/schema/collections-version-summary.schema.json +139 -0
  52. package/artifacts/schema/collections-versions-response.schema.json +167 -0
  53. package/artifacts/schema/config-draft-response.schema.json +5 -5
  54. package/artifacts/schema/config-version-response.schema.json +5 -5
  55. package/artifacts/schema/confirmation-required-details.schema.json +13 -0
  56. package/artifacts/schema/dangling-reference.schema.json +7 -6
  57. package/artifacts/schema/datapoint-list-response.schema.json +2 -2
  58. package/artifacts/schema/effective-rights-response.schema.json +87 -1
  59. package/artifacts/schema/org-plan.schema.json +29 -1
  60. package/artifacts/schema/org-quota-usage-counts.schema.json +18 -0
  61. package/artifacts/schema/org-quota-usage.schema.json +47 -1
  62. package/artifacts/schema/org-quotas.schema.json +29 -1
  63. package/artifacts/schema/org-role-list-response.schema.json +8 -7
  64. package/artifacts/schema/org-role.schema.json +1 -1
  65. package/artifacts/schema/plan-catalogue-entry.schema.json +29 -1
  66. package/artifacts/schema/plan-change-decision-status-response.schema.json +29 -1
  67. package/artifacts/schema/plan-limit-details.schema.json +3 -1
  68. package/artifacts/schema/plan-limits.schema.json +29 -1
  69. package/artifacts/schema/plan-overrides.schema.json +26 -0
  70. package/artifacts/schema/purchase-conflict-details.schema.json +6 -6
  71. package/artifacts/schema/purchase-intent-draft.schema.json +5 -5
  72. package/artifacts/schema/purchase-intent-payment-started.schema.json +1 -1
  73. package/artifacts/schema/purchase-intent-response.schema.json +10 -9
  74. package/artifacts/schema/put-collections-draft-request.schema.json +16 -0
  75. package/artifacts/schema/record-changed-details.schema.json +16 -0
  76. package/artifacts/schema/record-referenced-details.schema.json +35 -0
  77. package/artifacts/schema/reference-invalid-details.schema.json +25 -0
  78. package/artifacts/schema/reference-place.schema.json +7 -6
  79. package/artifacts/schema/required-missing-details.schema.json +19 -0
  80. package/artifacts/schema/robot-config-doc.schema.json +5 -5
  81. package/artifacts/schema/robot-deletion-summary.schema.json +33 -1
  82. package/artifacts/schema/role-collection-rights.schema.json +82 -0
  83. package/artifacts/schema/role-rename-preview.schema.json +7 -6
  84. package/dist/apps.d.ts +18 -2
  85. package/dist/apps.js +12 -2
  86. package/dist/audit.d.ts +32 -2
  87. package/dist/audit.js +40 -2
  88. package/dist/billing.js +12 -3
  89. package/dist/collections-issues.d.ts +67 -0
  90. package/dist/collections-issues.js +340 -0
  91. package/dist/collections-records.d.ts +562 -0
  92. package/dist/collections-records.js +525 -0
  93. package/dist/collections-rights.d.ts +17 -0
  94. package/dist/collections-rights.js +41 -0
  95. package/dist/collections-schema.d.ts +1064 -0
  96. package/dist/collections-schema.js +386 -0
  97. package/dist/collections-templates.d.ts +55 -0
  98. package/dist/collections-templates.js +137 -0
  99. package/dist/collections-transfer.d.ts +101 -0
  100. package/dist/collections-transfer.js +206 -0
  101. package/dist/collections-values.d.ts +67 -0
  102. package/dist/collections-values.js +284 -0
  103. package/dist/collections.d.ts +568 -0
  104. package/dist/collections.js +332 -0
  105. package/dist/config.d.ts +8 -8
  106. package/dist/config.js +13 -13
  107. package/dist/errors.d.ts +50 -1
  108. package/dist/errors.js +117 -2
  109. package/dist/index.d.ts +24 -8
  110. package/dist/index.js +13 -3
  111. package/dist/org-roles.d.ts +4 -0
  112. package/dist/org-roles.js +10 -9
  113. package/dist/plans.d.ts +22 -2
  114. package/dist/plans.js +26 -4
  115. package/dist/realtime.d.ts +166 -0
  116. package/dist/realtime.js +163 -0
  117. package/dist/rest.d.ts +28 -28
  118. package/dist/rest.js +39 -27
  119. package/dist/rights.d.ts +2 -2
  120. package/dist/rights.js +1 -1
  121. package/dist/routes.d.ts +1 -1
  122. package/dist/routes.js +495 -21
  123. package/package.json +1 -1
  124. package/artifacts/schema/put-robot-details-request.schema.json +0 -41
  125. package/artifacts/schema/put-robot-details-response.schema.json +0 -43
  126. package/artifacts/schema/robot-details-doc.schema.json +0 -33
@@ -0,0 +1,562 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { z } from 'zod';
3
+ /**
4
+ * Who made a change. `fleetless` is the platform itself (a schema change, an
5
+ * automatic record) and always carries the nil id. `label` is worked out when
6
+ * the record is read, from the person's display name, so a user who has since
7
+ * been deleted reads `Deleted user` instead of leaving the record with a
8
+ * dangling id. An email address is the fallback only for a reader who may see
9
+ * it: a developer or a server key reading a person without a name, and an app
10
+ * user reading their own label.
11
+ */
12
+ export declare const collectionActor: z.ZodObject<{
13
+ kind: z.ZodEnum<{
14
+ developer: "developer";
15
+ fleetless: "fleetless";
16
+ server_key: "server_key";
17
+ app_user: "app_user";
18
+ }>;
19
+ id: z.ZodUUID;
20
+ label: z.ZodString;
21
+ }, z.core.$strip>;
22
+ export type CollectionActor = z.infer<typeof collectionActor>;
23
+ /**
24
+ * One record. `display` is the collection's display template rendered for this
25
+ * record, so a list can name its rows without knowing the template.
26
+ */
27
+ export declare const collectionRecord: z.ZodObject<{
28
+ id: z.ZodUUID;
29
+ robot_id: z.ZodNullable<z.ZodUUID>;
30
+ created_at: z.ZodISODateTime;
31
+ created_by: z.ZodObject<{
32
+ kind: z.ZodEnum<{
33
+ developer: "developer";
34
+ fleetless: "fleetless";
35
+ server_key: "server_key";
36
+ app_user: "app_user";
37
+ }>;
38
+ id: z.ZodUUID;
39
+ label: z.ZodString;
40
+ }, z.core.$strip>;
41
+ updated_at: z.ZodISODateTime;
42
+ updated_by: z.ZodObject<{
43
+ kind: z.ZodEnum<{
44
+ developer: "developer";
45
+ fleetless: "fleetless";
46
+ server_key: "server_key";
47
+ app_user: "app_user";
48
+ }>;
49
+ id: z.ZodUUID;
50
+ label: z.ZodString;
51
+ }, z.core.$strip>;
52
+ revision: z.ZodNumber;
53
+ display: z.ZodString;
54
+ missing_required: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
56
+ deleted_at: z.ZodOptional<z.ZodISODateTime>;
57
+ deleted_by: z.ZodOptional<z.ZodObject<{
58
+ kind: z.ZodEnum<{
59
+ developer: "developer";
60
+ fleetless: "fleetless";
61
+ server_key: "server_key";
62
+ app_user: "app_user";
63
+ }>;
64
+ id: z.ZodUUID;
65
+ label: z.ZodString;
66
+ }, z.core.$strip>>;
67
+ }, z.core.$strip>;
68
+ export type CollectionRecord = z.infer<typeof collectionRecord>;
69
+ /** The operators a filter condition can use. */
70
+ export declare const COLLECTION_FILTER_OPS: readonly ["eq", "ne", "lt", "lte", "gt", "gte", "contains", "in", "empty"];
71
+ export type CollectionFilterOp = (typeof COLLECTION_FILTER_OPS)[number];
72
+ /**
73
+ * The system fields a filter or sort may name. The other system values
74
+ * (`revision`, `updated_by`, `robot`) are not filterable; a robot is chosen
75
+ * with the `robot` parameter of a list.
76
+ */
77
+ export declare const COLLECTION_FILTER_SYSTEM_KEYS: readonly ["id", "robot_id", "created_at", "updated_at", "created_by"];
78
+ /** A filter on the wire: a JSON object. Its grammar is checked by `parseCollectionFilter`. */
79
+ export declare const collectionFilter: z.ZodRecord<z.ZodString, z.ZodUnknown>;
80
+ export type CollectionFilter = z.infer<typeof collectionFilter>;
81
+ /** A filter once its shape has been checked. */
82
+ export type CollectionFilterNode = {
83
+ kind: 'and' | 'or';
84
+ children: CollectionFilterNode[];
85
+ } | {
86
+ kind: 'condition';
87
+ field: string;
88
+ op: CollectionFilterOp;
89
+ value: unknown;
90
+ };
91
+ /** One thing wrong with a filter: `path` is a JSON Pointer (RFC 6901) into it, empty for the filter as a whole. */
92
+ export type CollectionFilterIssue = {
93
+ path: string;
94
+ message: string;
95
+ };
96
+ export type CollectionFilterParse = {
97
+ ok: true;
98
+ node: CollectionFilterNode;
99
+ } | {
100
+ ok: false;
101
+ issues: CollectionFilterIssue[];
102
+ };
103
+ /**
104
+ * Checks the shape of a filter and turns it into a tree.
105
+ *
106
+ * **What is checked.** An object is either a combination, `{ "and": [...] }`
107
+ * or `{ "or": [...] }`, which has no other keys, or a condition, `{ "<field>":
108
+ * { "<operator>": value } }`, which names one field and holds one operator.
109
+ * Nesting goes at most 3 levels deep and the filter has at most 50 conditions.
110
+ * Every operator checks its value: `eq` and `ne` take text, a number or
111
+ * `true`/`false`, the four order operators take a number or text (dates are
112
+ * text), `contains` takes text, `in` takes 1 to 100 of those values and `empty`
113
+ * takes `true` or `false`. Values keep their type; nothing is coerced.
114
+ *
115
+ * **What is not checked.** Whether the fields exist, and whether a value suits
116
+ * the type of its field, need the document. The tree keeps the field and the
117
+ * value exactly as written for the cloud to judge.
118
+ *
119
+ * `and`/`or` are always combinations, so a field called `and` or `or` cannot
120
+ * be filtered by. An empty object and an empty `and`/`or` list are refused
121
+ * rather than given a meaning; leave the filter out to list everything.
122
+ */
123
+ export declare function parseCollectionFilter(input: unknown): CollectionFilterParse;
124
+ export type CollectionSortField = {
125
+ field: string;
126
+ descending: boolean;
127
+ };
128
+ export type CollectionSortParse = {
129
+ ok: true;
130
+ sort: CollectionSortField[];
131
+ } | {
132
+ ok: false;
133
+ message: string;
134
+ };
135
+ /**
136
+ * Checks the entries of a `sort` and reads them: `name` ascending, `-name`
137
+ * descending. A sort names at most 3 fields, each once, and each follows the
138
+ * rule a filter's field does (a key, `reference.field`, or a system field).
139
+ *
140
+ * The final tie-break on `id` that makes a page boundary exact is the cloud's;
141
+ * a sort need not and does not have to name it.
142
+ */
143
+ export declare function parseCollectionSort(specs: string[]): CollectionSortParse;
144
+ /**
145
+ * The query string of a record list. `filter` is the JSON text of a filter,
146
+ * `sort` and `expand` are comma-separated lists; the cloud parses all three
147
+ * (`parseCollectionFilter`, `parseCollectionSort`) and answers a problem with
148
+ * the path of what is wrong.
149
+ */
150
+ export declare const collectionRecordListQuery: z.ZodObject<{
151
+ filter: z.ZodOptional<z.ZodString>;
152
+ search: z.ZodOptional<z.ZodString>;
153
+ sort: z.ZodOptional<z.ZodString>;
154
+ expand: z.ZodOptional<z.ZodString>;
155
+ limit: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
156
+ cursor: z.ZodOptional<z.ZodString>;
157
+ count: z.ZodOptional<z.ZodEnum<{
158
+ true: "true";
159
+ false: "false";
160
+ }>>;
161
+ deleted: z.ZodOptional<z.ZodEnum<{
162
+ true: "true";
163
+ false: "false";
164
+ }>>;
165
+ robot: z.ZodOptional<z.ZodUUID>;
166
+ }, z.core.$strict>;
167
+ export type CollectionRecordListQuery = z.infer<typeof collectionRecordListQuery>;
168
+ /**
169
+ * The query string of a single record read. `expand` means what it does on the
170
+ * list, so a record read one by one and the same record in a page look alike.
171
+ */
172
+ export declare const collectionRecordGetQuery: z.ZodObject<{
173
+ expand: z.ZodOptional<z.ZodString>;
174
+ }, z.core.$strict>;
175
+ export type CollectionRecordGetQuery = z.infer<typeof collectionRecordGetQuery>;
176
+ export declare const collectionRecordListResponse: z.ZodObject<{
177
+ records: z.ZodArray<z.ZodObject<{
178
+ id: z.ZodUUID;
179
+ robot_id: z.ZodNullable<z.ZodUUID>;
180
+ created_at: z.ZodISODateTime;
181
+ created_by: z.ZodObject<{
182
+ kind: z.ZodEnum<{
183
+ developer: "developer";
184
+ fleetless: "fleetless";
185
+ server_key: "server_key";
186
+ app_user: "app_user";
187
+ }>;
188
+ id: z.ZodUUID;
189
+ label: z.ZodString;
190
+ }, z.core.$strip>;
191
+ updated_at: z.ZodISODateTime;
192
+ updated_by: z.ZodObject<{
193
+ kind: z.ZodEnum<{
194
+ developer: "developer";
195
+ fleetless: "fleetless";
196
+ server_key: "server_key";
197
+ app_user: "app_user";
198
+ }>;
199
+ id: z.ZodUUID;
200
+ label: z.ZodString;
201
+ }, z.core.$strip>;
202
+ revision: z.ZodNumber;
203
+ display: z.ZodString;
204
+ missing_required: z.ZodOptional<z.ZodArray<z.ZodString>>;
205
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
206
+ deleted_at: z.ZodOptional<z.ZodISODateTime>;
207
+ deleted_by: z.ZodOptional<z.ZodObject<{
208
+ kind: z.ZodEnum<{
209
+ developer: "developer";
210
+ fleetless: "fleetless";
211
+ server_key: "server_key";
212
+ app_user: "app_user";
213
+ }>;
214
+ id: z.ZodUUID;
215
+ label: z.ZodString;
216
+ }, z.core.$strip>>;
217
+ }, z.core.$strip>>;
218
+ next_cursor: z.ZodNullable<z.ZodString>;
219
+ total: z.ZodOptional<z.ZodNumber>;
220
+ }, z.core.$strip>;
221
+ export type CollectionRecordListResponse = z.infer<typeof collectionRecordListResponse>;
222
+ /**
223
+ * A create or an update. Updates have `PATCH` semantics: only the fields sent
224
+ * change, and `null` clears one. `robot_id` is read on create only, because a
225
+ * record never changes its robot.
226
+ */
227
+ export declare const collectionRecordWrite: z.ZodObject<{
228
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
229
+ robot_id: z.ZodOptional<z.ZodUUID>;
230
+ expected_revision: z.ZodOptional<z.ZodNumber>;
231
+ }, z.core.$strict>;
232
+ export type CollectionRecordWrite = z.infer<typeof collectionRecordWrite>;
233
+ /**
234
+ * One entry of a record's history. `changes` holds each changed field with its
235
+ * old and new value, `null` standing for no value. A `delete` revision carries
236
+ * the whole record so that a deleted record can be seen and brought back.
237
+ */
238
+ export declare const collectionRevision: z.ZodObject<{
239
+ seq: z.ZodNumber;
240
+ op: z.ZodEnum<{
241
+ create: "create";
242
+ update: "update";
243
+ delete: "delete";
244
+ restore: "restore";
245
+ }>;
246
+ at: z.ZodISODateTime;
247
+ actor: z.ZodObject<{
248
+ kind: z.ZodEnum<{
249
+ developer: "developer";
250
+ fleetless: "fleetless";
251
+ server_key: "server_key";
252
+ app_user: "app_user";
253
+ }>;
254
+ id: z.ZodUUID;
255
+ label: z.ZodString;
256
+ }, z.core.$strip>;
257
+ reason: z.ZodNullable<z.ZodString>;
258
+ revision: z.ZodNumber;
259
+ changes: z.ZodRecord<z.ZodString, z.ZodObject<{
260
+ old: z.ZodUnknown;
261
+ new: z.ZodUnknown;
262
+ }, z.core.$strip>>;
263
+ record: z.ZodNullable<z.ZodObject<{
264
+ id: z.ZodUUID;
265
+ robot_id: z.ZodNullable<z.ZodUUID>;
266
+ created_at: z.ZodISODateTime;
267
+ created_by: z.ZodObject<{
268
+ kind: z.ZodEnum<{
269
+ developer: "developer";
270
+ fleetless: "fleetless";
271
+ server_key: "server_key";
272
+ app_user: "app_user";
273
+ }>;
274
+ id: z.ZodUUID;
275
+ label: z.ZodString;
276
+ }, z.core.$strip>;
277
+ updated_at: z.ZodISODateTime;
278
+ updated_by: z.ZodObject<{
279
+ kind: z.ZodEnum<{
280
+ developer: "developer";
281
+ fleetless: "fleetless";
282
+ server_key: "server_key";
283
+ app_user: "app_user";
284
+ }>;
285
+ id: z.ZodUUID;
286
+ label: z.ZodString;
287
+ }, z.core.$strip>;
288
+ revision: z.ZodNumber;
289
+ display: z.ZodString;
290
+ missing_required: z.ZodOptional<z.ZodArray<z.ZodString>>;
291
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
292
+ deleted_at: z.ZodOptional<z.ZodISODateTime>;
293
+ deleted_by: z.ZodOptional<z.ZodObject<{
294
+ kind: z.ZodEnum<{
295
+ developer: "developer";
296
+ fleetless: "fleetless";
297
+ server_key: "server_key";
298
+ app_user: "app_user";
299
+ }>;
300
+ id: z.ZodUUID;
301
+ label: z.ZodString;
302
+ }, z.core.$strip>>;
303
+ }, z.core.$strip>>;
304
+ }, z.core.$strip>;
305
+ export type CollectionRevision = z.infer<typeof collectionRevision>;
306
+ export declare const collectionRecordHistoryQuery: z.ZodObject<{
307
+ limit: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
308
+ before_seq: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>, z.ZodNumber>>;
309
+ }, z.core.$strict>;
310
+ export type CollectionRecordHistoryQuery = z.infer<typeof collectionRecordHistoryQuery>;
311
+ export declare const collectionRecordHistoryResponse: z.ZodObject<{
312
+ revisions: z.ZodArray<z.ZodObject<{
313
+ seq: z.ZodNumber;
314
+ op: z.ZodEnum<{
315
+ create: "create";
316
+ update: "update";
317
+ delete: "delete";
318
+ restore: "restore";
319
+ }>;
320
+ at: z.ZodISODateTime;
321
+ actor: z.ZodObject<{
322
+ kind: z.ZodEnum<{
323
+ developer: "developer";
324
+ fleetless: "fleetless";
325
+ server_key: "server_key";
326
+ app_user: "app_user";
327
+ }>;
328
+ id: z.ZodUUID;
329
+ label: z.ZodString;
330
+ }, z.core.$strip>;
331
+ reason: z.ZodNullable<z.ZodString>;
332
+ revision: z.ZodNumber;
333
+ changes: z.ZodRecord<z.ZodString, z.ZodObject<{
334
+ old: z.ZodUnknown;
335
+ new: z.ZodUnknown;
336
+ }, z.core.$strip>>;
337
+ record: z.ZodNullable<z.ZodObject<{
338
+ id: z.ZodUUID;
339
+ robot_id: z.ZodNullable<z.ZodUUID>;
340
+ created_at: z.ZodISODateTime;
341
+ created_by: z.ZodObject<{
342
+ kind: z.ZodEnum<{
343
+ developer: "developer";
344
+ fleetless: "fleetless";
345
+ server_key: "server_key";
346
+ app_user: "app_user";
347
+ }>;
348
+ id: z.ZodUUID;
349
+ label: z.ZodString;
350
+ }, z.core.$strip>;
351
+ updated_at: z.ZodISODateTime;
352
+ updated_by: z.ZodObject<{
353
+ kind: z.ZodEnum<{
354
+ developer: "developer";
355
+ fleetless: "fleetless";
356
+ server_key: "server_key";
357
+ app_user: "app_user";
358
+ }>;
359
+ id: z.ZodUUID;
360
+ label: z.ZodString;
361
+ }, z.core.$strip>;
362
+ revision: z.ZodNumber;
363
+ display: z.ZodString;
364
+ missing_required: z.ZodOptional<z.ZodArray<z.ZodString>>;
365
+ values: z.ZodRecord<z.ZodString, z.ZodUnknown>;
366
+ deleted_at: z.ZodOptional<z.ZodISODateTime>;
367
+ deleted_by: z.ZodOptional<z.ZodObject<{
368
+ kind: z.ZodEnum<{
369
+ developer: "developer";
370
+ fleetless: "fleetless";
371
+ server_key: "server_key";
372
+ app_user: "app_user";
373
+ }>;
374
+ id: z.ZodUUID;
375
+ label: z.ZodString;
376
+ }, z.core.$strip>>;
377
+ }, z.core.$strip>>;
378
+ }, z.core.$strip>>;
379
+ next_before_seq: z.ZodNullable<z.ZodNumber>;
380
+ purged: z.ZodNullable<z.ZodObject<{
381
+ before: z.ZodISODateTime;
382
+ by: z.ZodObject<{
383
+ kind: z.ZodEnum<{
384
+ developer: "developer";
385
+ fleetless: "fleetless";
386
+ server_key: "server_key";
387
+ app_user: "app_user";
388
+ }>;
389
+ id: z.ZodUUID;
390
+ label: z.ZodString;
391
+ }, z.core.$strip>;
392
+ at: z.ZodISODateTime;
393
+ }, z.core.$strip>>;
394
+ }, z.core.$strip>;
395
+ export type CollectionRecordHistoryResponse = z.infer<typeof collectionRecordHistoryResponse>;
396
+ /**
397
+ * Restores a record. With `seq` the record gets the values it had after that
398
+ * revision; without it, a deleted record comes back as it was deleted.
399
+ */
400
+ export declare const collectionRecordRestoreRequest: z.ZodObject<{
401
+ seq: z.ZodOptional<z.ZodNumber>;
402
+ }, z.core.$strict>;
403
+ export type CollectionRecordRestoreRequest = z.infer<typeof collectionRecordRestoreRequest>;
404
+ /** One collection in the developer's overview, with what it holds and what needs a look. */
405
+ export declare const collectionSummary: z.ZodObject<{
406
+ key: z.ZodString;
407
+ label: z.ZodString;
408
+ binding: z.ZodEnum<{
409
+ global: "global";
410
+ per_robot: "per_robot";
411
+ one_per_robot: "one_per_robot";
412
+ }>;
413
+ records: z.ZodNumber;
414
+ fields: z.ZodNumber;
415
+ read_roles: z.ZodArray<z.ZodString>;
416
+ warnings: z.ZodArray<z.ZodEnum<{
417
+ unknown_role: "unknown_role";
418
+ no_role_access: "no_role_access";
419
+ history_growing: "history_growing";
420
+ }>>;
421
+ revisions: z.ZodNumber;
422
+ history_bytes: z.ZodNumber;
423
+ updated_at: z.ZodNullable<z.ZodISODateTime>;
424
+ }, z.core.$strip>;
425
+ export type CollectionSummary = z.infer<typeof collectionSummary>;
426
+ export declare const collectionListResponse: z.ZodObject<{
427
+ version: z.ZodNullable<z.ZodNumber>;
428
+ collections: z.ZodArray<z.ZodObject<{
429
+ key: z.ZodString;
430
+ label: z.ZodString;
431
+ binding: z.ZodEnum<{
432
+ global: "global";
433
+ per_robot: "per_robot";
434
+ one_per_robot: "one_per_robot";
435
+ }>;
436
+ records: z.ZodNumber;
437
+ fields: z.ZodNumber;
438
+ read_roles: z.ZodArray<z.ZodString>;
439
+ warnings: z.ZodArray<z.ZodEnum<{
440
+ unknown_role: "unknown_role";
441
+ no_role_access: "no_role_access";
442
+ history_growing: "history_growing";
443
+ }>>;
444
+ revisions: z.ZodNumber;
445
+ history_bytes: z.ZodNumber;
446
+ updated_at: z.ZodNullable<z.ZodISODateTime>;
447
+ }, z.core.$strip>>;
448
+ }, z.core.$strip>;
449
+ export type CollectionListResponse = z.infer<typeof collectionListResponse>;
450
+ /** The collections the caller can read, with their fields: what a client needs to build a form. */
451
+ export declare const collectionDefinitionsResponse: z.ZodObject<{
452
+ version: z.ZodNullable<z.ZodNumber>;
453
+ collections: z.ZodArray<z.ZodObject<{
454
+ key: z.ZodString;
455
+ label: z.ZodString;
456
+ description: z.ZodString;
457
+ binding: z.ZodEnum<{
458
+ global: "global";
459
+ per_robot: "per_robot";
460
+ one_per_robot: "one_per_robot";
461
+ }>;
462
+ display: z.ZodString;
463
+ fields: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
464
+ max_length: z.ZodOptional<z.ZodNumber>;
465
+ pattern: z.ZodOptional<z.ZodString>;
466
+ searchable: z.ZodOptional<z.ZodBoolean>;
467
+ label: z.ZodOptional<z.ZodString>;
468
+ description: z.ZodOptional<z.ZodString>;
469
+ required: z.ZodOptional<z.ZodBoolean>;
470
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
471
+ default: z.ZodOptional<z.ZodUnknown>;
472
+ type: z.ZodLiteral<"text">;
473
+ }, z.core.$strict>, z.ZodObject<{
474
+ max_length: z.ZodOptional<z.ZodNumber>;
475
+ searchable: z.ZodOptional<z.ZodBoolean>;
476
+ label: z.ZodOptional<z.ZodString>;
477
+ description: z.ZodOptional<z.ZodString>;
478
+ required: z.ZodOptional<z.ZodBoolean>;
479
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
480
+ default: z.ZodOptional<z.ZodUnknown>;
481
+ type: z.ZodLiteral<"long_text">;
482
+ }, z.core.$strict>, z.ZodObject<{
483
+ integer: z.ZodOptional<z.ZodBoolean>;
484
+ min: z.ZodOptional<z.ZodNumber>;
485
+ max: z.ZodOptional<z.ZodNumber>;
486
+ unit: z.ZodOptional<z.ZodString>;
487
+ label: z.ZodOptional<z.ZodString>;
488
+ description: z.ZodOptional<z.ZodString>;
489
+ required: z.ZodOptional<z.ZodBoolean>;
490
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
491
+ default: z.ZodOptional<z.ZodUnknown>;
492
+ type: z.ZodLiteral<"number">;
493
+ }, z.core.$strict>, z.ZodObject<{
494
+ label: z.ZodOptional<z.ZodString>;
495
+ description: z.ZodOptional<z.ZodString>;
496
+ required: z.ZodOptional<z.ZodBoolean>;
497
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
498
+ default: z.ZodOptional<z.ZodUnknown>;
499
+ type: z.ZodLiteral<"boolean">;
500
+ }, z.core.$strict>, z.ZodObject<{
501
+ options: z.ZodArray<z.ZodObject<{
502
+ value: z.ZodString;
503
+ label: z.ZodOptional<z.ZodString>;
504
+ }, z.core.$strict>>;
505
+ multiple: z.ZodOptional<z.ZodBoolean>;
506
+ searchable: z.ZodOptional<z.ZodBoolean>;
507
+ label: z.ZodOptional<z.ZodString>;
508
+ description: z.ZodOptional<z.ZodString>;
509
+ required: z.ZodOptional<z.ZodBoolean>;
510
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
511
+ default: z.ZodOptional<z.ZodUnknown>;
512
+ type: z.ZodLiteral<"select">;
513
+ }, z.core.$strict>, z.ZodObject<{
514
+ label: z.ZodOptional<z.ZodString>;
515
+ description: z.ZodOptional<z.ZodString>;
516
+ required: z.ZodOptional<z.ZodBoolean>;
517
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
518
+ default: z.ZodOptional<z.ZodUnknown>;
519
+ type: z.ZodLiteral<"date">;
520
+ }, z.core.$strict>, z.ZodObject<{
521
+ label: z.ZodOptional<z.ZodString>;
522
+ description: z.ZodOptional<z.ZodString>;
523
+ required: z.ZodOptional<z.ZodBoolean>;
524
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
525
+ default: z.ZodOptional<z.ZodUnknown>;
526
+ type: z.ZodLiteral<"datetime">;
527
+ }, z.core.$strict>, z.ZodObject<{
528
+ schema: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
529
+ label: z.ZodOptional<z.ZodString>;
530
+ description: z.ZodOptional<z.ZodString>;
531
+ required: z.ZodOptional<z.ZodBoolean>;
532
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
533
+ default: z.ZodOptional<z.ZodUnknown>;
534
+ type: z.ZodLiteral<"json">;
535
+ }, z.core.$strict>, z.ZodObject<{
536
+ to: z.ZodString;
537
+ on_delete: z.ZodOptional<z.ZodEnum<{
538
+ prevent: "prevent";
539
+ clear: "clear";
540
+ }>>;
541
+ label: z.ZodOptional<z.ZodString>;
542
+ description: z.ZodOptional<z.ZodString>;
543
+ required: z.ZodOptional<z.ZodBoolean>;
544
+ unique: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"collection">]>>;
545
+ default: z.ZodOptional<z.ZodUnknown>;
546
+ type: z.ZodLiteral<"reference">;
547
+ }, z.core.$strict>], "type">>;
548
+ can: z.ZodObject<{
549
+ read: z.ZodBoolean;
550
+ create: z.ZodBoolean;
551
+ update: z.ZodUnion<readonly [z.ZodEnum<{
552
+ all: "all";
553
+ own: "own";
554
+ }>, z.ZodLiteral<false>]>;
555
+ delete: z.ZodUnion<readonly [z.ZodEnum<{
556
+ all: "all";
557
+ own: "own";
558
+ }>, z.ZodLiteral<false>]>;
559
+ }, z.core.$strip>;
560
+ }, z.core.$strip>>;
561
+ }, z.core.$strip>;
562
+ export type CollectionDefinitionsResponse = z.infer<typeof collectionDefinitionsResponse>;