@panneau/protocol 5.0.0-alpha.0 → 5.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -8
- package/dist/conditions.d.ts +1 -1
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +310 -4
- package/dist/conformance/index.js.map +1 -1
- package/dist/constants.d.ts +44 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +128 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +4 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -15
- package/dist/libraries.d.ts +16 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +15 -0
- package/dist/libraries.js.map +1 -0
- package/dist/lint.d.ts +4 -3
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +34 -2
- package/dist/lint.js.map +1 -1
- package/dist/mock/example.d.ts +3 -2
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +223 -138
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts +19 -5
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +383 -19
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +113 -109
- package/dist/openapi.js.map +1 -1
- package/dist/problem.d.ts +7 -0
- package/dist/problem.d.ts.map +1 -0
- package/dist/problem.js +22 -0
- package/dist/problem.js.map +1 -0
- package/dist/query.d.ts +40 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +47 -6
- package/dist/query.js.map +1 -1
- package/dist/rules.d.ts +6 -3
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +51 -9
- package/dist/rules.js.map +1 -1
- package/dist/runtime/index.d.ts +14 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +13 -0
- package/dist/schemas/action.d.ts +69 -13
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/action.js +21 -14
- package/dist/schemas/action.js.map +1 -1
- package/dist/schemas/api.d.ts +224 -39
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +125 -31
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/boot.d.ts +24 -6
- package/dist/schemas/boot.d.ts.map +1 -1
- package/dist/schemas/boot.js +3 -7
- package/dist/schemas/boot.js.map +1 -1
- package/dist/schemas/common.d.ts +1 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +2 -1
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/definition.d.ts +222 -20
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +16 -11
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/field.d.ts +162 -8
- package/dist/schemas/field.d.ts.map +1 -1
- package/dist/schemas/field.js +69 -49
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +955 -63
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +41 -12
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/jsonRules.d.ts +83 -0
- package/dist/schemas/jsonRules.d.ts.map +1 -0
- package/dist/schemas/jsonRules.js +46 -0
- package/dist/schemas/jsonRules.js.map +1 -0
- package/dist/schemas/layout.d.ts +1 -4
- package/dist/schemas/layout.d.ts.map +1 -1
- package/dist/schemas/layout.js +1 -13
- package/dist/schemas/layout.js.map +1 -1
- package/dist/schemas/list.d.ts +6 -3
- package/dist/schemas/list.d.ts.map +1 -1
- package/dist/schemas/list.js +3 -9
- package/dist/schemas/list.js.map +1 -1
- package/dist/schemas/resource.d.ts +144 -14
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +6 -1
- package/dist/schemas/resource.js.map +1 -1
- package/dist/schemas/theme.d.ts +179 -0
- package/dist/schemas/theme.d.ts.map +1 -0
- package/dist/schemas/theme.js +66 -0
- package/dist/schemas/theme.js.map +1 -0
- package/dist/search.d.ts +51 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +53 -0
- package/dist/search.js.map +1 -0
- package/dist/themes.d.ts +11 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +80 -0
- package/dist/themes.js.map +1 -0
- package/dist/transforms.d.ts +17 -0
- package/dist/transforms.d.ts.map +1 -0
- package/dist/transforms.js +34 -0
- package/dist/transforms.js.map +1 -0
- package/dist/validate.d.ts +4 -6
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +24 -9
- package/dist/validate.js.map +1 -1
- package/dist/values.d.ts +5 -1
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +16 -2
- package/dist/values.js.map +1 -1
- package/package.json +12 -3
- package/schema/boot.schema.json +580 -16
- package/schema/definition.schema.json +577 -16
- package/schema/openapi.json +1818 -543
- package/schema/theme.schema.json +234 -0
package/dist/schemas/api.d.ts
CHANGED
|
@@ -10,6 +10,12 @@ export declare const Pagination: z.ZodObject<{
|
|
|
10
10
|
total: z.ZodNumber;
|
|
11
11
|
lastPage: z.ZodNumber;
|
|
12
12
|
}, z.core.$loose>;
|
|
13
|
+
export declare const CursorPagination: z.ZodObject<{
|
|
14
|
+
perPage: z.ZodNumber;
|
|
15
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
16
|
+
previousCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
18
|
+
}, z.core.$loose>;
|
|
13
19
|
export declare const ItemResponse: z.ZodObject<{
|
|
14
20
|
data: z.ZodObject<{
|
|
15
21
|
id: z.ZodString;
|
|
@@ -23,12 +29,17 @@ export declare const ListResponse: z.ZodObject<{
|
|
|
23
29
|
version: z.ZodNullable<z.ZodString>;
|
|
24
30
|
abilities: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
25
31
|
}, z.core.$loose>>;
|
|
26
|
-
meta: z.ZodObject<{
|
|
32
|
+
meta: z.ZodUnion<readonly [z.ZodObject<{
|
|
27
33
|
page: z.ZodNumber;
|
|
28
34
|
perPage: z.ZodNumber;
|
|
29
35
|
total: z.ZodNumber;
|
|
30
36
|
lastPage: z.ZodNumber;
|
|
31
|
-
}, z.core.$loose
|
|
37
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
38
|
+
perPage: z.ZodNumber;
|
|
39
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
40
|
+
previousCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
42
|
+
}, z.core.$loose>]>;
|
|
32
43
|
}, z.core.$loose>;
|
|
33
44
|
export declare const Problem: z.ZodObject<{
|
|
34
45
|
type: z.ZodString;
|
|
@@ -63,6 +74,7 @@ export declare const ActionRequest: z.ZodObject<{
|
|
|
63
74
|
except: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
75
|
}, z.core.$loose>]>>;
|
|
65
76
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
77
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
66
78
|
}, z.core.$loose>;
|
|
67
79
|
export declare const ActionItemResult: z.ZodObject<{
|
|
68
80
|
id: z.ZodString;
|
|
@@ -216,22 +228,80 @@ export declare const MediaTransform: z.ZodObject<{
|
|
|
216
228
|
x: z.ZodNumber;
|
|
217
229
|
y: z.ZodNumber;
|
|
218
230
|
}, z.core.$loose>>;
|
|
231
|
+
base: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
media: "media";
|
|
233
|
+
original: "original";
|
|
234
|
+
}>>;
|
|
235
|
+
baseTransform: z.ZodOptional<typeof MediaTransform>;
|
|
219
236
|
}, z.core.$loose>;
|
|
220
|
-
export declare const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
type: z.ZodString;
|
|
237
|
+
export declare const UploadReference: z.ZodObject<{
|
|
238
|
+
upload: z.ZodString;
|
|
239
|
+
}, z.core.$loose>;
|
|
240
|
+
export declare const StoredFile: z.ZodObject<{
|
|
225
241
|
name: z.ZodString;
|
|
226
|
-
|
|
227
|
-
|
|
242
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
mime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
244
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
245
|
+
}, z.core.$loose>;
|
|
246
|
+
export declare const Upload: z.ZodObject<{
|
|
247
|
+
id: z.ZodString;
|
|
248
|
+
key: z.ZodOptional<z.ZodString>;
|
|
249
|
+
name: z.ZodOptional<z.ZodString>;
|
|
250
|
+
mime: z.ZodOptional<z.ZodString>;
|
|
251
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
252
|
+
}, z.core.$loose>;
|
|
253
|
+
export declare const UploadResponse: z.ZodObject<{
|
|
254
|
+
data: z.ZodObject<{
|
|
255
|
+
id: z.ZodString;
|
|
256
|
+
key: z.ZodOptional<z.ZodString>;
|
|
257
|
+
name: z.ZodOptional<z.ZodString>;
|
|
258
|
+
mime: z.ZodOptional<z.ZodString>;
|
|
259
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
}, z.core.$loose>;
|
|
261
|
+
}, z.core.$loose>;
|
|
262
|
+
export declare const UploadSignRequest: z.ZodObject<{
|
|
263
|
+
method: z.ZodEnum<{
|
|
264
|
+
GET: "GET";
|
|
265
|
+
POST: "POST";
|
|
266
|
+
PUT: "PUT";
|
|
267
|
+
DELETE: "DELETE";
|
|
268
|
+
}>;
|
|
269
|
+
key: z.ZodString;
|
|
270
|
+
uploadId: z.ZodOptional<z.ZodString>;
|
|
271
|
+
partNumber: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
contentType: z.ZodOptional<z.ZodString>;
|
|
273
|
+
expiresIn: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
}, z.core.$loose>;
|
|
275
|
+
export declare const UploadSignResponse: z.ZodObject<{
|
|
228
276
|
url: z.ZodString;
|
|
277
|
+
key: z.ZodOptional<z.ZodString>;
|
|
278
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
279
|
+
upload: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, z.core.$loose>;
|
|
281
|
+
export declare const MediaInfo: z.ZodObject<{
|
|
282
|
+
type: z.ZodString;
|
|
283
|
+
mime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
285
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
286
|
thumbnailUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
287
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
231
288
|
url: z.ZodString;
|
|
232
289
|
width: z.ZodOptional<z.ZodNumber>;
|
|
233
290
|
height: z.ZodOptional<z.ZodNumber>;
|
|
234
291
|
}, z.core.$loose>>>;
|
|
292
|
+
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
293
|
+
height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
294
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
295
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
296
|
+
failed: "failed";
|
|
297
|
+
pending: "pending";
|
|
298
|
+
processing: "processing";
|
|
299
|
+
ready: "ready";
|
|
300
|
+
}>>;
|
|
301
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
302
|
+
code: z.ZodString;
|
|
303
|
+
message: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$loose>>>;
|
|
235
305
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
236
306
|
transform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
237
307
|
crop: z.ZodOptional<z.ZodObject<{
|
|
@@ -247,25 +317,41 @@ export declare const Media: z.ZodObject<{
|
|
|
247
317
|
x: z.ZodNumber;
|
|
248
318
|
y: z.ZodNumber;
|
|
249
319
|
}, z.core.$loose>>;
|
|
320
|
+
base: z.ZodOptional<z.ZodEnum<{
|
|
321
|
+
media: "media";
|
|
322
|
+
original: "original";
|
|
323
|
+
}>>;
|
|
324
|
+
baseTransform: z.ZodOptional<typeof MediaTransform>;
|
|
250
325
|
}, z.core.$loose>>>;
|
|
251
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
252
326
|
}, z.core.$loose>;
|
|
253
|
-
export declare const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
327
|
+
export declare const MediaItem: z.ZodObject<{
|
|
328
|
+
id: z.ZodString;
|
|
329
|
+
version: z.ZodNullable<z.ZodString>;
|
|
330
|
+
abilities: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
331
|
+
media: z.ZodObject<{
|
|
258
332
|
type: z.ZodString;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
url: z.ZodString;
|
|
333
|
+
mime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
334
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
335
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
336
|
thumbnailUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
264
337
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
265
338
|
url: z.ZodString;
|
|
266
339
|
width: z.ZodOptional<z.ZodNumber>;
|
|
267
340
|
height: z.ZodOptional<z.ZodNumber>;
|
|
268
341
|
}, z.core.$loose>>>;
|
|
342
|
+
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
343
|
+
height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
344
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
345
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
346
|
+
failed: "failed";
|
|
347
|
+
pending: "pending";
|
|
348
|
+
processing: "processing";
|
|
349
|
+
ready: "ready";
|
|
350
|
+
}>>;
|
|
351
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
352
|
+
code: z.ZodString;
|
|
353
|
+
message: z.ZodOptional<z.ZodString>;
|
|
354
|
+
}, z.core.$loose>>>;
|
|
269
355
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
270
356
|
transform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
271
357
|
crop: z.ZodOptional<z.ZodObject<{
|
|
@@ -281,26 +367,42 @@ export declare const MediaResponse: z.ZodObject<{
|
|
|
281
367
|
x: z.ZodNumber;
|
|
282
368
|
y: z.ZodNumber;
|
|
283
369
|
}, z.core.$loose>>;
|
|
370
|
+
base: z.ZodOptional<z.ZodEnum<{
|
|
371
|
+
media: "media";
|
|
372
|
+
original: "original";
|
|
373
|
+
}>>;
|
|
374
|
+
baseTransform: z.ZodOptional<typeof MediaTransform>;
|
|
284
375
|
}, z.core.$loose>>>;
|
|
285
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
376
|
}, z.core.$loose>;
|
|
287
377
|
}, z.core.$loose>;
|
|
288
|
-
export declare const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
378
|
+
export declare const MediaReference: z.ZodObject<{
|
|
379
|
+
id: z.ZodString;
|
|
380
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
381
|
+
label: z.ZodOptional<z.ZodString>;
|
|
382
|
+
media: z.ZodOptional<z.ZodObject<{
|
|
293
383
|
type: z.ZodString;
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
url: z.ZodString;
|
|
384
|
+
mime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
385
|
+
size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
386
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
387
|
thumbnailUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
388
|
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
300
389
|
url: z.ZodString;
|
|
301
390
|
width: z.ZodOptional<z.ZodNumber>;
|
|
302
391
|
height: z.ZodOptional<z.ZodNumber>;
|
|
303
392
|
}, z.core.$loose>>>;
|
|
393
|
+
width: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
394
|
+
height: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
395
|
+
duration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
396
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
397
|
+
failed: "failed";
|
|
398
|
+
pending: "pending";
|
|
399
|
+
processing: "processing";
|
|
400
|
+
ready: "ready";
|
|
401
|
+
}>>;
|
|
402
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
403
|
+
code: z.ZodString;
|
|
404
|
+
message: z.ZodOptional<z.ZodString>;
|
|
405
|
+
}, z.core.$loose>>>;
|
|
304
406
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
305
407
|
transform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
306
408
|
crop: z.ZodOptional<z.ZodObject<{
|
|
@@ -316,15 +418,46 @@ export declare const MediaListResponse: z.ZodObject<{
|
|
|
316
418
|
x: z.ZodNumber;
|
|
317
419
|
y: z.ZodNumber;
|
|
318
420
|
}, z.core.$loose>>;
|
|
421
|
+
base: z.ZodOptional<z.ZodEnum<{
|
|
422
|
+
media: "media";
|
|
423
|
+
original: "original";
|
|
424
|
+
}>>;
|
|
425
|
+
baseTransform: z.ZodOptional<typeof MediaTransform>;
|
|
319
426
|
}, z.core.$loose>>>;
|
|
320
|
-
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
321
427
|
}, z.core.$loose>>;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
428
|
+
transform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
429
|
+
crop: z.ZodOptional<z.ZodObject<{
|
|
430
|
+
x: z.ZodNumber;
|
|
431
|
+
y: z.ZodNumber;
|
|
432
|
+
width: z.ZodNumber;
|
|
433
|
+
height: z.ZodNumber;
|
|
434
|
+
}, z.core.$loose>>;
|
|
435
|
+
rotate: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<90>, z.ZodLiteral<180>, z.ZodLiteral<270>]>>;
|
|
436
|
+
flipX: z.ZodOptional<z.ZodBoolean>;
|
|
437
|
+
flipY: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
focalPoint: z.ZodOptional<z.ZodObject<{
|
|
439
|
+
x: z.ZodNumber;
|
|
440
|
+
y: z.ZodNumber;
|
|
441
|
+
}, z.core.$loose>>;
|
|
442
|
+
base: z.ZodOptional<z.ZodEnum<{
|
|
443
|
+
media: "media";
|
|
444
|
+
original: "original";
|
|
445
|
+
}>>;
|
|
446
|
+
baseTransform: z.ZodOptional<typeof MediaTransform>;
|
|
447
|
+
}, z.core.$loose>>>;
|
|
448
|
+
}, z.core.$loose>;
|
|
449
|
+
export declare const FieldCheckRequest: z.ZodObject<{
|
|
450
|
+
value: z.ZodString;
|
|
451
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
452
|
+
id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
453
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
454
|
+
}, z.core.$loose>;
|
|
455
|
+
export declare const FieldCheckResponse: z.ZodObject<{
|
|
456
|
+
available: z.ZodBoolean;
|
|
457
|
+
suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
458
|
+
prefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
459
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
460
|
+
disabled: z.ZodOptional<z.ZodBoolean>;
|
|
328
461
|
}, z.core.$loose>;
|
|
329
462
|
export declare const Session: z.ZodObject<{
|
|
330
463
|
user: z.ZodObject<{
|
|
@@ -333,6 +466,7 @@ export declare const Session: z.ZodObject<{
|
|
|
333
466
|
email: z.ZodOptional<z.ZodString>;
|
|
334
467
|
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
335
468
|
abilities: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
469
|
+
resource: z.ZodOptional<z.ZodString>;
|
|
336
470
|
}, z.core.$loose>;
|
|
337
471
|
}, z.core.$loose>;
|
|
338
472
|
export declare const SearchResponse: z.ZodObject<{
|
|
@@ -350,9 +484,49 @@ export declare const PreviewResponse: z.ZodObject<{
|
|
|
350
484
|
url: z.ZodString;
|
|
351
485
|
expiresAt: z.ZodOptional<z.ZodString>;
|
|
352
486
|
}, z.core.$loose>;
|
|
487
|
+
export declare const EmbedValue: z.ZodObject<{
|
|
488
|
+
url: z.ZodString;
|
|
489
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
490
|
+
link: "link";
|
|
491
|
+
video: "video";
|
|
492
|
+
audio: "audio";
|
|
493
|
+
photo: "photo";
|
|
494
|
+
rich: "rich";
|
|
495
|
+
}>>;
|
|
496
|
+
title: z.ZodOptional<z.ZodString>;
|
|
497
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
498
|
+
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
499
|
+
html: z.ZodOptional<z.ZodString>;
|
|
500
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
502
|
+
}, z.core.$loose>;
|
|
503
|
+
export declare const EmbedResponse: z.ZodObject<{
|
|
504
|
+
data: z.ZodObject<{
|
|
505
|
+
url: z.ZodString;
|
|
506
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
507
|
+
link: "link";
|
|
508
|
+
video: "video";
|
|
509
|
+
audio: "audio";
|
|
510
|
+
photo: "photo";
|
|
511
|
+
rich: "rich";
|
|
512
|
+
}>>;
|
|
513
|
+
title: z.ZodOptional<z.ZodString>;
|
|
514
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
515
|
+
thumbnailUrl: z.ZodOptional<z.ZodString>;
|
|
516
|
+
html: z.ZodOptional<z.ZodString>;
|
|
517
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
518
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
519
|
+
}, z.core.$loose>;
|
|
520
|
+
}, z.core.$loose>;
|
|
521
|
+
export declare const LocationValue: z.ZodObject<{
|
|
522
|
+
lat: z.ZodNumber;
|
|
523
|
+
lng: z.ZodNumber;
|
|
524
|
+
address: z.ZodOptional<z.ZodString>;
|
|
525
|
+
}, z.core.$loose>;
|
|
353
526
|
export type Item = z.infer<typeof Item>;
|
|
354
527
|
export type Pagination = z.infer<typeof Pagination>;
|
|
355
528
|
export type ItemResponse = z.infer<typeof ItemResponse>;
|
|
529
|
+
export type CursorPagination = z.infer<typeof CursorPagination>;
|
|
356
530
|
export type ListResponse = z.infer<typeof ListResponse>;
|
|
357
531
|
export type Problem = z.infer<typeof Problem>;
|
|
358
532
|
export type Selection = z.infer<typeof Selection>;
|
|
@@ -362,10 +536,21 @@ export type ActionResult = z.infer<typeof ActionResult>;
|
|
|
362
536
|
export type ActionRun = z.infer<typeof ActionRun>;
|
|
363
537
|
export type ActionRunResponse = z.infer<typeof ActionRunResponse>;
|
|
364
538
|
export type MediaTransform = z.infer<typeof MediaTransform>;
|
|
365
|
-
export type
|
|
366
|
-
export type
|
|
367
|
-
export type
|
|
539
|
+
export type UploadReference = z.infer<typeof UploadReference>;
|
|
540
|
+
export type StoredFile = z.infer<typeof StoredFile>;
|
|
541
|
+
export type Upload = z.infer<typeof Upload>;
|
|
542
|
+
export type UploadResponse = z.infer<typeof UploadResponse>;
|
|
543
|
+
export type UploadSignRequest = z.infer<typeof UploadSignRequest>;
|
|
544
|
+
export type UploadSignResponse = z.infer<typeof UploadSignResponse>;
|
|
545
|
+
export type FieldCheckRequest = z.infer<typeof FieldCheckRequest>;
|
|
546
|
+
export type FieldCheckResponse = z.infer<typeof FieldCheckResponse>;
|
|
547
|
+
export type MediaInfo = z.infer<typeof MediaInfo>;
|
|
548
|
+
export type MediaItem = z.infer<typeof MediaItem>;
|
|
549
|
+
export type MediaReference = z.infer<typeof MediaReference>;
|
|
368
550
|
export type Session = z.infer<typeof Session>;
|
|
369
551
|
export type SearchResponse = z.infer<typeof SearchResponse>;
|
|
370
552
|
export type PreviewResponse = z.infer<typeof PreviewResponse>;
|
|
553
|
+
export type EmbedValue = z.infer<typeof EmbedValue>;
|
|
554
|
+
export type EmbedResponse = z.infer<typeof EmbedResponse>;
|
|
555
|
+
export type LocationValue = z.infer<typeof LocationValue>;
|
|
371
556
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/schemas/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,IAAI;;;;iBAUX,CAAC;AAEP,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;iBAAgC,CAAC;AAE1D,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/schemas/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,IAAI;;;;iBAUX,CAAC;AAEP,eAAO,MAAM,UAAU;;;;;iBAKrB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;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,SAAS,CAAC,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC;AAC9C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
package/dist/schemas/api.js
CHANGED
|
@@ -13,10 +13,16 @@ var Pagination = z.looseObject({
|
|
|
13
13
|
total: z.number().int().nonnegative(),
|
|
14
14
|
lastPage: z.number().int().positive()
|
|
15
15
|
});
|
|
16
|
+
var CursorPagination = z.looseObject({
|
|
17
|
+
perPage: z.number().int().positive(),
|
|
18
|
+
nextCursor: z.string().min(1).nullable().meta({ description: "The `cursor` of the next page, or `null` on the last page." }),
|
|
19
|
+
previousCursor: z.string().min(1).nullable().optional().meta({ description: "The `cursor` of the previous page, or `null` when it is the first page, which has none (and on the first page). Without it, clients go back through the cursors they followed." }),
|
|
20
|
+
total: z.number().int().nonnegative().nullable().optional().meta({ description: "How many items match, when the backend counts them." })
|
|
21
|
+
}).meta({ description: "The meta of a page of a list whose `pagination` is `cursor`: no page numbers, and no total unless the backend has one." });
|
|
16
22
|
var ItemResponse = z.looseObject({ data: Item });
|
|
17
23
|
var ListResponse = z.looseObject({
|
|
18
24
|
data: z.array(Item),
|
|
19
|
-
meta: Pagination
|
|
25
|
+
meta: z.union([Pagination, CursorPagination])
|
|
20
26
|
});
|
|
21
27
|
var Problem = z.looseObject({
|
|
22
28
|
type: z.string().meta({ description: "A URI reference that identifies the problem type." }),
|
|
@@ -29,14 +35,15 @@ var Problem = z.looseObject({
|
|
|
29
35
|
}).meta({ description: "An error, as RFC 9457 problem details (`application/problem+json`)." });
|
|
30
36
|
var Selection = z.union([z.looseObject({ ids: z.array(Id).min(1) }), z.looseObject({
|
|
31
37
|
query: z.looseObject({
|
|
32
|
-
filter: z.record(z.string(), z.unknown()).optional(),
|
|
38
|
+
filter: z.record(z.string(), z.unknown()).optional().meta({ description: "The `filter` of the list query, by filter id: a value, a list of values, or the bounds of a range (`{ \"from\": \"2026-01-01\", \"to\": \"2026-01-31\" }`)." }),
|
|
33
39
|
q: z.string().optional()
|
|
34
40
|
}),
|
|
35
41
|
except: z.array(Id).optional()
|
|
36
42
|
})]);
|
|
37
43
|
var ActionRequest = z.looseObject({
|
|
38
44
|
selection: Selection.optional().meta({ description: "Omitted for actions on the whole resource." }),
|
|
39
|
-
values: z.record(z.string(), z.unknown()).optional()
|
|
45
|
+
values: z.record(z.string(), z.unknown()).optional(),
|
|
46
|
+
dryRun: z.boolean().optional().meta({ description: "Answer what the action would do without running it: a `200` action result whose `summary` counts the items that would succeed and those that would be skipped. Only for actions with `dryRun: true`." })
|
|
40
47
|
});
|
|
41
48
|
var ActionItemResult = z.looseObject({
|
|
42
49
|
id: Id,
|
|
@@ -85,56 +92,143 @@ var ActionRun = z.looseObject({
|
|
|
85
92
|
var ActionRunResponse = z.looseObject({ run: ActionRun });
|
|
86
93
|
var MediaTransform = z.looseObject({
|
|
87
94
|
crop: z.looseObject({
|
|
88
|
-
x: z.number(),
|
|
89
|
-
y: z.number(),
|
|
90
|
-
width: z.number(),
|
|
91
|
-
height: z.number()
|
|
92
|
-
}).optional().meta({ description: "In pixels of the original image." }),
|
|
95
|
+
x: z.number().int().nonnegative(),
|
|
96
|
+
y: z.number().int().nonnegative(),
|
|
97
|
+
width: z.number().int().positive(),
|
|
98
|
+
height: z.number().int().positive()
|
|
99
|
+
}).optional().meta({ description: "In whole pixels of the upright original image (after its EXIF orientation), from its top left corner." }),
|
|
93
100
|
rotate: z.union([
|
|
94
101
|
z.literal(0),
|
|
95
102
|
z.literal(90),
|
|
96
103
|
z.literal(180),
|
|
97
104
|
z.literal(270)
|
|
98
|
-
]).optional(),
|
|
99
|
-
flipX: z.boolean().optional(),
|
|
100
|
-
flipY: z.boolean().optional(),
|
|
105
|
+
]).optional().meta({ description: "Clockwise, in degrees." }),
|
|
106
|
+
flipX: z.boolean().optional().meta({ description: "Mirrors left to right (horizontal)." }),
|
|
107
|
+
flipY: z.boolean().optional().meta({ description: "Mirrors top to bottom (vertical)." }),
|
|
101
108
|
focalPoint: z.looseObject({
|
|
102
109
|
x: z.number().min(0).max(1),
|
|
103
110
|
y: z.number().min(0).max(1)
|
|
104
|
-
}).optional().meta({ description: "
|
|
105
|
-
})
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
}).optional().meta({ description: "From 0 to 1, relative to the width and height of the upright original image, not of the crop: changing the crop does not move it. Renderers map it into the transformed image and clamp it to the crop." }),
|
|
112
|
+
base: z.enum(["media", "original"]).optional().meta({ description: "What a transform for one use starts from: the original file by default, or the media's own transform (`media`). With `media`, the crop and the focal point are relative to the media's version instead of the original (decision 0031)." }),
|
|
113
|
+
get baseTransform() {
|
|
114
|
+
return MediaTransform.optional().meta({ description: "With `base: \"media\"`: the media's own transform this one was made on. When the media's transform is no longer the same, clients ask to check the crop, and renderers clamp it." });
|
|
115
|
+
}
|
|
116
|
+
}).meta({ description: "Non-destructive edits of an image, applied in this order: crop, then rotate, then flip. Renderers ignore the keys they don't know, which editor tools can add." });
|
|
117
|
+
var UploadReference = z.looseObject({ upload: z.string().min(1) }).meta({ description: "A file uploaded directly to storage, by the id of its upload: in a file value, such as the `file` of a media, or an action parameter." });
|
|
118
|
+
var StoredFile = z.looseObject({
|
|
119
|
+
name: z.string().meta({ description: "The name of the file, as the user knows it." }),
|
|
120
|
+
url: z.string().nullable().optional().meta({ description: "Where to download it. A private file gets a temporary URL." }),
|
|
121
|
+
mime: z.string().nullable().optional(),
|
|
122
|
+
size: z.number().int().nonnegative().nullable().optional()
|
|
123
|
+
}).meta({ description: "A file stored by the backend: the value of a `file` field in items. Requests send it back to keep the file, `{ \"upload\" }` to replace it, or `null` to remove it." });
|
|
124
|
+
var Upload = z.looseObject({
|
|
125
|
+
id: z.string().min(1).meta({ description: "The id of the upload: `upl_…`." }),
|
|
126
|
+
key: z.string().optional().meta({ description: "The key of the object in storage." }),
|
|
127
|
+
name: z.string().optional(),
|
|
128
|
+
mime: z.string().optional(),
|
|
129
|
+
size: z.number().int().nonnegative().optional()
|
|
130
|
+
}).meta({ description: "A file the browser uploaded to storage, before it becomes a media, an import or another value." });
|
|
131
|
+
var UploadResponse = z.looseObject({ data: Upload });
|
|
132
|
+
var UploadSignRequest = z.looseObject({
|
|
133
|
+
method: z.enum([
|
|
134
|
+
"GET",
|
|
135
|
+
"POST",
|
|
136
|
+
"PUT",
|
|
137
|
+
"DELETE"
|
|
138
|
+
]),
|
|
139
|
+
key: z.string().min(1),
|
|
140
|
+
uploadId: z.string().optional().meta({ description: "The S3 multipart upload." }),
|
|
141
|
+
partNumber: z.number().int().positive().optional(),
|
|
142
|
+
contentType: z.string().optional(),
|
|
143
|
+
expiresIn: z.number().int().positive().optional()
|
|
144
|
+
}).meta({ description: "A request of the browser's S3 client to sign (Uppy 6's `signRequest`)." });
|
|
145
|
+
var UploadSignResponse = z.looseObject({
|
|
111
146
|
url: z.string(),
|
|
147
|
+
key: z.string().optional().meta({ description: "The key the backend chose, for the first request of a file." }),
|
|
148
|
+
headers: z.record(z.string(), z.string()).optional().meta({ description: "Headers the URL was signed with, which the browser sends." }),
|
|
149
|
+
upload: z.string().optional().meta({ description: "The upload the first request of a file created: `upl_…`." })
|
|
150
|
+
}).meta({ description: "A presigned request." });
|
|
151
|
+
var MediaInfo = z.looseObject({
|
|
152
|
+
type: z.string().meta({ description: "`image`, `video`, `audio`, `document`, `font`, or another type the backend knows." }),
|
|
153
|
+
mime: z.string().nullable().optional(),
|
|
154
|
+
size: z.number().int().nonnegative().nullable().optional(),
|
|
155
|
+
url: z.string().nullable().optional().meta({ description: "The main file to show or play: a rendition, or the original until it exists." }),
|
|
112
156
|
thumbnailUrl: z.string().nullable().optional(),
|
|
113
157
|
variants: z.record(z.string(), z.looseObject({
|
|
114
158
|
url: z.string(),
|
|
115
159
|
width: z.number().optional(),
|
|
116
160
|
height: z.number().optional()
|
|
117
|
-
})).optional(),
|
|
161
|
+
})).optional().meta({ description: "Named renditions: sizes of an image, qualities of a video." }),
|
|
162
|
+
width: z.number().nullable().optional(),
|
|
163
|
+
height: z.number().nullable().optional(),
|
|
164
|
+
duration: z.number().nullable().optional().meta({ description: "In seconds." }),
|
|
165
|
+
status: z.enum([
|
|
166
|
+
"pending",
|
|
167
|
+
"processing",
|
|
168
|
+
"ready",
|
|
169
|
+
"failed"
|
|
170
|
+
]).optional().meta({ description: "Where the processing of the file is: `pending` and `processing` until its renditions are made, then `ready` or `failed`. Without it, the media is ready." }),
|
|
171
|
+
error: z.looseObject({
|
|
172
|
+
code: z.string().meta({ description: "The code of the step that failed, such as a transcoder task code (`timeout`, `input_unreadable`)." }),
|
|
173
|
+
message: z.string().optional().meta({ description: "Why it failed, for people." })
|
|
174
|
+
}).nullable().optional().meta({ description: "Why the processing failed, when `status` is `failed`, so that editors see it without the backend's monitoring." }),
|
|
118
175
|
metadata: z.record(z.string(), z.unknown()).optional(),
|
|
119
|
-
transform: MediaTransform.nullable().optional(),
|
|
120
|
-
|
|
121
|
-
});
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
meta:
|
|
126
|
-
|
|
176
|
+
transform: MediaTransform.nullable().optional().meta({ description: "The media's own transform, from its library, which clients need to draw a transform for one use made over it (decision 0031)." })
|
|
177
|
+
}).meta({ description: "What the backend computed about the file of a media item: the `media` of the items of a `media` resource, and of the values of `media` fields. Read-only: the editable properties of a media are the fields of its resource." });
|
|
178
|
+
var MediaItem = Item.extend({ media: MediaInfo }).meta({ description: "An item of a resource of kind `media`: the values of its fields (`file`, the original, and those of the project), and the `media` the backend computed." });
|
|
179
|
+
var MediaReference = z.looseObject({
|
|
180
|
+
id: Id,
|
|
181
|
+
resource: z.string().optional().meta({ description: "The library of the media. Required for a field that allows several libraries, since ids are unique only within their resource (decision 0027)." }),
|
|
182
|
+
label: z.string().optional().meta({ description: "The `itemTitle` of the media." }),
|
|
183
|
+
media: MediaInfo.optional(),
|
|
184
|
+
transform: MediaTransform.nullable().optional().meta({ description: "The edits of the image for this use only: from the original file, or over the media's own transform with `base: \"media\"`." })
|
|
185
|
+
}).meta({ description: "The value of a `media` or `image` field in items: the media, with what lists and fields show, and its edits for this use. Requests send the id, or `{ id, resource, transform }`: `resource` is required when the field allows several libraries." });
|
|
186
|
+
var FieldCheckRequest = z.looseObject({
|
|
187
|
+
value: z.string().meta({ description: "The value to check, as it is typed." }),
|
|
188
|
+
locale: z.string().optional().meta({ description: "The locale of the value, for a localized field." }),
|
|
189
|
+
id: Id.nullable().optional().meta({ description: "The item being edited, or null when creating one." }),
|
|
190
|
+
values: z.record(z.string(), z.unknown()).optional().meta({ description: "The form's current values, as they would be sent to save, for what the check depends on (a page's parent)." })
|
|
191
|
+
}).meta({ description: "A value of a field with `check`, to check with the backend." });
|
|
192
|
+
var FieldCheckResponse = z.looseObject({
|
|
193
|
+
available: z.boolean().meta({ description: "Whether no other item of the resource, in its scope and the same locale, has the value." }),
|
|
194
|
+
suggestion: z.string().nullable().optional().meta({ description: "An available value close to the one checked, when it is taken." }),
|
|
195
|
+
prefix: z.string().nullable().optional().meta({ description: "What the field shows in front of the value: the start of its URL." }),
|
|
196
|
+
url: z.string().nullable().optional().meta({ description: "The URL the value gives the item, which the field links to." }),
|
|
197
|
+
disabled: z.boolean().optional().meta({ description: "The field doesn't apply to this item (the home page has no slug): the field is read-only." })
|
|
198
|
+
}).meta({ description: "What the backend says about a value: not authoritative, since saving still validates it." });
|
|
127
199
|
var Session = z.looseObject({ user: User });
|
|
128
200
|
var SearchResponse = z.looseObject({ data: z.array(z.looseObject({
|
|
129
|
-
resource: z.string(),
|
|
201
|
+
resource: z.string().meta({ description: "The id of the resource." }),
|
|
130
202
|
items: z.array(Item),
|
|
131
|
-
total: z.number().int().nonnegative().optional()
|
|
132
|
-
})) });
|
|
203
|
+
total: z.number().int().nonnegative().optional().meta({ description: "How many items of the resource match, when the backend counts them: the list of the resource, searched, shows them all." })
|
|
204
|
+
})) }).meta({ description: "The results of the global search: the resources with results, in the order of the definition." });
|
|
133
205
|
var PreviewResponse = z.looseObject({
|
|
134
206
|
url: z.string(),
|
|
135
207
|
expiresAt: z.string().optional()
|
|
136
208
|
});
|
|
209
|
+
var EmbedValue = z.looseObject({
|
|
210
|
+
url: z.string().meta({ description: "The URL of the video, sound or post." }),
|
|
211
|
+
type: z.enum([
|
|
212
|
+
"video",
|
|
213
|
+
"audio",
|
|
214
|
+
"photo",
|
|
215
|
+
"rich",
|
|
216
|
+
"link"
|
|
217
|
+
]).optional(),
|
|
218
|
+
title: z.string().optional(),
|
|
219
|
+
provider: z.string().optional().meta({ description: "The name of the provider." }),
|
|
220
|
+
thumbnailUrl: z.string().optional(),
|
|
221
|
+
html: z.string().optional().meta({ description: "The HTML that embeds it, from the oEmbed of its provider." }),
|
|
222
|
+
width: z.number().optional(),
|
|
223
|
+
height: z.number().optional()
|
|
224
|
+
}).meta({ description: "The value of an `embed` field: its URL, and what the backend got from its oEmbed." });
|
|
225
|
+
var EmbedResponse = z.looseObject({ data: EmbedValue });
|
|
226
|
+
var LocationValue = z.looseObject({
|
|
227
|
+
lat: z.number().min(-90).max(90),
|
|
228
|
+
lng: z.number().min(-180).max(180),
|
|
229
|
+
address: z.string().optional()
|
|
230
|
+
}).meta({ description: "The value of a `location` field: a point, and its address." });
|
|
137
231
|
//#endregion
|
|
138
|
-
export { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, Item, ItemResponse, ListResponse,
|
|
232
|
+
export { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, CursorPagination, EmbedResponse, EmbedValue, FieldCheckRequest, FieldCheckResponse, Item, ItemResponse, ListResponse, LocationValue, MediaInfo, MediaItem, MediaReference, MediaTransform, Pagination, PreviewResponse, Problem, SearchResponse, Selection, Session, StoredFile, Upload, UploadReference, UploadResponse, UploadSignRequest, UploadSignResponse };
|
|
139
233
|
|
|
140
234
|
//# sourceMappingURL=api.js.map
|