@panneau/protocol 0.0.0-stage → 5.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +31 -2
  2. package/dist/conditions.d.ts +7 -0
  3. package/dist/conditions.d.ts.map +1 -0
  4. package/dist/conditions.js +21 -0
  5. package/dist/conditions.js.map +1 -0
  6. package/dist/conformance/index.d.ts +42 -0
  7. package/dist/conformance/index.d.ts.map +1 -0
  8. package/dist/conformance/index.js +243 -0
  9. package/dist/conformance/index.js.map +1 -0
  10. package/dist/index.d.ts +10 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +19 -0
  13. package/dist/lint.d.ts +8 -0
  14. package/dist/lint.d.ts.map +1 -0
  15. package/dist/lint.js +73 -0
  16. package/dist/lint.js.map +1 -0
  17. package/dist/mock/example.d.ts +8 -0
  18. package/dist/mock/example.d.ts.map +1 -0
  19. package/dist/mock/example.js +186 -0
  20. package/dist/mock/example.js.map +1 -0
  21. package/dist/mock/index.d.ts +24 -0
  22. package/dist/mock/index.d.ts.map +1 -0
  23. package/dist/mock/index.js +250 -0
  24. package/dist/mock/index.js.map +1 -0
  25. package/dist/openapi.d.ts +11 -0
  26. package/dist/openapi.d.ts.map +1 -0
  27. package/dist/openapi.js +540 -0
  28. package/dist/openapi.js.map +1 -0
  29. package/dist/query.d.ts +17 -0
  30. package/dist/query.d.ts.map +1 -0
  31. package/dist/query.js +49 -0
  32. package/dist/query.js.map +1 -0
  33. package/dist/rules.d.ts +29 -0
  34. package/dist/rules.d.ts.map +1 -0
  35. package/dist/rules.js +143 -0
  36. package/dist/rules.js.map +1 -0
  37. package/dist/schemas/action.d.ts +166 -0
  38. package/dist/schemas/action.d.ts.map +1 -0
  39. package/dist/schemas/action.js +66 -0
  40. package/dist/schemas/action.js.map +1 -0
  41. package/dist/schemas/api.d.ts +371 -0
  42. package/dist/schemas/api.d.ts.map +1 -0
  43. package/dist/schemas/api.js +140 -0
  44. package/dist/schemas/api.js.map +1 -0
  45. package/dist/schemas/boot.d.ts +19 -0
  46. package/dist/schemas/boot.d.ts.map +1 -0
  47. package/dist/schemas/boot.js +21 -0
  48. package/dist/schemas/boot.js.map +1 -0
  49. package/dist/schemas/common.d.ts +28 -0
  50. package/dist/schemas/common.d.ts.map +1 -0
  51. package/dist/schemas/common.js +35 -0
  52. package/dist/schemas/common.js.map +1 -0
  53. package/dist/schemas/definition.d.ts +462 -0
  54. package/dist/schemas/definition.d.ts.map +1 -0
  55. package/dist/schemas/definition.js +101 -0
  56. package/dist/schemas/definition.js.map +1 -0
  57. package/dist/schemas/field.d.ts +145 -0
  58. package/dist/schemas/field.d.ts.map +1 -0
  59. package/dist/schemas/field.js +127 -0
  60. package/dist/schemas/field.js.map +1 -0
  61. package/dist/schemas/index.d.ts +1536 -0
  62. package/dist/schemas/index.d.ts.map +1 -0
  63. package/dist/schemas/index.js +68 -0
  64. package/dist/schemas/index.js.map +1 -0
  65. package/dist/schemas/layout.d.ts +29 -0
  66. package/dist/schemas/layout.d.ts.map +1 -0
  67. package/dist/schemas/layout.js +35 -0
  68. package/dist/schemas/layout.js.map +1 -0
  69. package/dist/schemas/list.d.ts +72 -0
  70. package/dist/schemas/list.d.ts.map +1 -0
  71. package/dist/schemas/list.js +48 -0
  72. package/dist/schemas/list.js.map +1 -0
  73. package/dist/schemas/resource.d.ts +328 -0
  74. package/dist/schemas/resource.d.ts.map +1 -0
  75. package/dist/schemas/resource.js +38 -0
  76. package/dist/schemas/resource.js.map +1 -0
  77. package/dist/validate.d.ts +31 -0
  78. package/dist/validate.d.ts.map +1 -0
  79. package/dist/validate.js +57 -0
  80. package/dist/validate.js.map +1 -0
  81. package/dist/values.d.ts +7 -0
  82. package/dist/values.d.ts.map +1 -0
  83. package/dist/values.js +29 -0
  84. package/dist/values.js.map +1 -0
  85. package/dist/version.d.ts +5 -0
  86. package/dist/version.d.ts.map +1 -0
  87. package/dist/version.js +9 -0
  88. package/dist/version.js.map +1 -0
  89. package/package.json +48 -5
  90. package/schema/boot.schema.json +1229 -0
  91. package/schema/definition.schema.json +1195 -0
  92. package/schema/openapi.json +3838 -0
@@ -0,0 +1,3838 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Panneau protocol",
5
+ "version": "1",
6
+ "description": "The HTTP API between a Panneau frontend and its backend. Paths are relative to `api.baseUrl` of the definition. Authentication is up to the backend (session cookie or bearer token). Errors use `application/problem+json`."
7
+ },
8
+ "paths": {
9
+ "/definition": {
10
+ "get": {
11
+ "operationId": "getDefinition",
12
+ "summary": "The definition for the current user, in the current locale.",
13
+ "responses": {
14
+ "200": {
15
+ "description": "The definition.",
16
+ "content": {
17
+ "application/json": {
18
+ "schema": {
19
+ "$ref": "#/components/schemas/Definition"
20
+ }
21
+ }
22
+ }
23
+ },
24
+ "401": {
25
+ "description": "Not authenticated.",
26
+ "content": {
27
+ "application/problem+json": {
28
+ "schema": {
29
+ "$ref": "#/components/schemas/Problem"
30
+ }
31
+ }
32
+ }
33
+ },
34
+ "403": {
35
+ "description": "Not allowed.",
36
+ "content": {
37
+ "application/problem+json": {
38
+ "schema": {
39
+ "$ref": "#/components/schemas/Problem"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ },
47
+ "/resources/{resource}": {
48
+ "parameters": [
49
+ {
50
+ "name": "resource",
51
+ "in": "path",
52
+ "required": true,
53
+ "description": "Resource id.",
54
+ "schema": {
55
+ "type": "string"
56
+ }
57
+ }
58
+ ],
59
+ "get": {
60
+ "operationId": "listItems",
61
+ "parameters": [
62
+ {
63
+ "name": "page",
64
+ "in": "query",
65
+ "required": false,
66
+ "description": "Page number, from 1.",
67
+ "schema": {
68
+ "type": "integer",
69
+ "minimum": 1
70
+ }
71
+ },
72
+ {
73
+ "name": "perPage",
74
+ "in": "query",
75
+ "required": false,
76
+ "description": "Items per page.",
77
+ "schema": {
78
+ "type": "integer",
79
+ "minimum": 1
80
+ }
81
+ },
82
+ {
83
+ "name": "sort",
84
+ "in": "query",
85
+ "required": false,
86
+ "description": "Comma-separated fields; a `-` prefix sorts descending.",
87
+ "schema": {
88
+ "type": "string"
89
+ }
90
+ },
91
+ {
92
+ "name": "filter",
93
+ "in": "query",
94
+ "required": false,
95
+ "style": "deepObject",
96
+ "explode": true,
97
+ "description": "`filter[status]=published`, `filter[tags][]=a`.",
98
+ "schema": {
99
+ "type": "object",
100
+ "additionalProperties": true
101
+ }
102
+ },
103
+ {
104
+ "name": "q",
105
+ "in": "query",
106
+ "required": false,
107
+ "description": "Search.",
108
+ "schema": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ {
113
+ "name": "fields",
114
+ "in": "query",
115
+ "required": false,
116
+ "description": "Comma-separated fields to include in each item.",
117
+ "schema": {
118
+ "type": "string"
119
+ }
120
+ }
121
+ ],
122
+ "responses": {
123
+ "200": {
124
+ "description": "A page of items.",
125
+ "content": {
126
+ "application/json": {
127
+ "schema": {
128
+ "$ref": "#/components/schemas/ListResponse"
129
+ }
130
+ }
131
+ }
132
+ },
133
+ "401": {
134
+ "description": "Not authenticated.",
135
+ "content": {
136
+ "application/problem+json": {
137
+ "schema": {
138
+ "$ref": "#/components/schemas/Problem"
139
+ }
140
+ }
141
+ }
142
+ },
143
+ "403": {
144
+ "description": "Not allowed.",
145
+ "content": {
146
+ "application/problem+json": {
147
+ "schema": {
148
+ "$ref": "#/components/schemas/Problem"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ "404": {
154
+ "description": "Not found.",
155
+ "content": {
156
+ "application/problem+json": {
157
+ "schema": {
158
+ "$ref": "#/components/schemas/Problem"
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ },
165
+ "post": {
166
+ "operationId": "createItem",
167
+ "requestBody": {
168
+ "required": true,
169
+ "content": {
170
+ "application/json": {
171
+ "schema": {
172
+ "type": "object",
173
+ "additionalProperties": true
174
+ }
175
+ }
176
+ }
177
+ },
178
+ "responses": {
179
+ "201": {
180
+ "description": "The created item.",
181
+ "content": {
182
+ "application/json": {
183
+ "schema": {
184
+ "$ref": "#/components/schemas/ItemResponse"
185
+ }
186
+ }
187
+ },
188
+ "headers": {
189
+ "ETag": {
190
+ "description": "The version of the item.",
191
+ "schema": {
192
+ "type": "string"
193
+ }
194
+ }
195
+ }
196
+ },
197
+ "401": {
198
+ "description": "Not authenticated.",
199
+ "content": {
200
+ "application/problem+json": {
201
+ "schema": {
202
+ "$ref": "#/components/schemas/Problem"
203
+ }
204
+ }
205
+ }
206
+ },
207
+ "403": {
208
+ "description": "Not allowed.",
209
+ "content": {
210
+ "application/problem+json": {
211
+ "schema": {
212
+ "$ref": "#/components/schemas/Problem"
213
+ }
214
+ }
215
+ }
216
+ },
217
+ "404": {
218
+ "description": "Not found.",
219
+ "content": {
220
+ "application/problem+json": {
221
+ "schema": {
222
+ "$ref": "#/components/schemas/Problem"
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "409": {
228
+ "description": "Conflict with a business rule.",
229
+ "content": {
230
+ "application/problem+json": {
231
+ "schema": {
232
+ "$ref": "#/components/schemas/Problem"
233
+ }
234
+ }
235
+ }
236
+ },
237
+ "422": {
238
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
239
+ "content": {
240
+ "application/problem+json": {
241
+ "schema": {
242
+ "$ref": "#/components/schemas/Problem"
243
+ }
244
+ }
245
+ }
246
+ }
247
+ }
248
+ }
249
+ },
250
+ "/resources/{resource}/{id}": {
251
+ "parameters": [
252
+ {
253
+ "name": "resource",
254
+ "in": "path",
255
+ "required": true,
256
+ "description": "Resource id.",
257
+ "schema": {
258
+ "type": "string"
259
+ }
260
+ },
261
+ {
262
+ "name": "id",
263
+ "in": "path",
264
+ "required": true,
265
+ "description": "Item id.",
266
+ "schema": {
267
+ "type": "string"
268
+ }
269
+ }
270
+ ],
271
+ "get": {
272
+ "operationId": "getItem",
273
+ "responses": {
274
+ "200": {
275
+ "description": "The item.",
276
+ "content": {
277
+ "application/json": {
278
+ "schema": {
279
+ "$ref": "#/components/schemas/ItemResponse"
280
+ }
281
+ }
282
+ },
283
+ "headers": {
284
+ "ETag": {
285
+ "description": "The version of the item.",
286
+ "schema": {
287
+ "type": "string"
288
+ }
289
+ }
290
+ }
291
+ },
292
+ "401": {
293
+ "description": "Not authenticated.",
294
+ "content": {
295
+ "application/problem+json": {
296
+ "schema": {
297
+ "$ref": "#/components/schemas/Problem"
298
+ }
299
+ }
300
+ }
301
+ },
302
+ "403": {
303
+ "description": "Not allowed.",
304
+ "content": {
305
+ "application/problem+json": {
306
+ "schema": {
307
+ "$ref": "#/components/schemas/Problem"
308
+ }
309
+ }
310
+ }
311
+ },
312
+ "404": {
313
+ "description": "Not found.",
314
+ "content": {
315
+ "application/problem+json": {
316
+ "schema": {
317
+ "$ref": "#/components/schemas/Problem"
318
+ }
319
+ }
320
+ }
321
+ }
322
+ }
323
+ },
324
+ "patch": {
325
+ "operationId": "updateItem",
326
+ "description": "Partial update: only the values sent are changed.",
327
+ "parameters": [
328
+ {
329
+ "name": "If-Match",
330
+ "in": "header",
331
+ "required": false,
332
+ "description": "The version the client edited.",
333
+ "schema": {
334
+ "type": "string"
335
+ }
336
+ }
337
+ ],
338
+ "requestBody": {
339
+ "required": true,
340
+ "content": {
341
+ "application/json": {
342
+ "schema": {
343
+ "type": "object",
344
+ "additionalProperties": true
345
+ }
346
+ }
347
+ }
348
+ },
349
+ "responses": {
350
+ "200": {
351
+ "description": "The updated item.",
352
+ "content": {
353
+ "application/json": {
354
+ "schema": {
355
+ "$ref": "#/components/schemas/ItemResponse"
356
+ }
357
+ }
358
+ },
359
+ "headers": {
360
+ "ETag": {
361
+ "description": "The version of the item.",
362
+ "schema": {
363
+ "type": "string"
364
+ }
365
+ }
366
+ }
367
+ },
368
+ "401": {
369
+ "description": "Not authenticated.",
370
+ "content": {
371
+ "application/problem+json": {
372
+ "schema": {
373
+ "$ref": "#/components/schemas/Problem"
374
+ }
375
+ }
376
+ }
377
+ },
378
+ "403": {
379
+ "description": "Not allowed.",
380
+ "content": {
381
+ "application/problem+json": {
382
+ "schema": {
383
+ "$ref": "#/components/schemas/Problem"
384
+ }
385
+ }
386
+ }
387
+ },
388
+ "404": {
389
+ "description": "Not found.",
390
+ "content": {
391
+ "application/problem+json": {
392
+ "schema": {
393
+ "$ref": "#/components/schemas/Problem"
394
+ }
395
+ }
396
+ }
397
+ },
398
+ "409": {
399
+ "description": "Conflict with a business rule.",
400
+ "content": {
401
+ "application/problem+json": {
402
+ "schema": {
403
+ "$ref": "#/components/schemas/Problem"
404
+ }
405
+ }
406
+ }
407
+ },
408
+ "412": {
409
+ "description": "Version conflict: `If-Match` does not match the current version, which is in `current`.",
410
+ "content": {
411
+ "application/problem+json": {
412
+ "schema": {
413
+ "$ref": "#/components/schemas/Problem"
414
+ }
415
+ }
416
+ }
417
+ },
418
+ "422": {
419
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
420
+ "content": {
421
+ "application/problem+json": {
422
+ "schema": {
423
+ "$ref": "#/components/schemas/Problem"
424
+ }
425
+ }
426
+ }
427
+ }
428
+ }
429
+ },
430
+ "delete": {
431
+ "operationId": "deleteItem",
432
+ "responses": {
433
+ "204": {
434
+ "description": "Deleted."
435
+ },
436
+ "401": {
437
+ "description": "Not authenticated.",
438
+ "content": {
439
+ "application/problem+json": {
440
+ "schema": {
441
+ "$ref": "#/components/schemas/Problem"
442
+ }
443
+ }
444
+ }
445
+ },
446
+ "403": {
447
+ "description": "Not allowed.",
448
+ "content": {
449
+ "application/problem+json": {
450
+ "schema": {
451
+ "$ref": "#/components/schemas/Problem"
452
+ }
453
+ }
454
+ }
455
+ },
456
+ "404": {
457
+ "description": "Not found.",
458
+ "content": {
459
+ "application/problem+json": {
460
+ "schema": {
461
+ "$ref": "#/components/schemas/Problem"
462
+ }
463
+ }
464
+ }
465
+ },
466
+ "409": {
467
+ "description": "Conflict with a business rule.",
468
+ "content": {
469
+ "application/problem+json": {
470
+ "schema": {
471
+ "$ref": "#/components/schemas/Problem"
472
+ }
473
+ }
474
+ }
475
+ }
476
+ }
477
+ }
478
+ },
479
+ "/resources/{resource}/{id}/preview": {
480
+ "parameters": [
481
+ {
482
+ "name": "resource",
483
+ "in": "path",
484
+ "required": true,
485
+ "description": "Resource id.",
486
+ "schema": {
487
+ "type": "string"
488
+ }
489
+ },
490
+ {
491
+ "name": "id",
492
+ "in": "path",
493
+ "required": true,
494
+ "description": "Item id.",
495
+ "schema": {
496
+ "type": "string"
497
+ }
498
+ }
499
+ ],
500
+ "post": {
501
+ "operationId": "previewItem",
502
+ "requestBody": {
503
+ "required": true,
504
+ "content": {
505
+ "application/json": {
506
+ "schema": {
507
+ "type": "object",
508
+ "additionalProperties": true
509
+ }
510
+ }
511
+ }
512
+ },
513
+ "responses": {
514
+ "200": {
515
+ "description": "A short-lived preview URL.",
516
+ "content": {
517
+ "application/json": {
518
+ "schema": {
519
+ "$ref": "#/components/schemas/PreviewResponse"
520
+ }
521
+ }
522
+ }
523
+ },
524
+ "401": {
525
+ "description": "Not authenticated.",
526
+ "content": {
527
+ "application/problem+json": {
528
+ "schema": {
529
+ "$ref": "#/components/schemas/Problem"
530
+ }
531
+ }
532
+ }
533
+ },
534
+ "403": {
535
+ "description": "Not allowed.",
536
+ "content": {
537
+ "application/problem+json": {
538
+ "schema": {
539
+ "$ref": "#/components/schemas/Problem"
540
+ }
541
+ }
542
+ }
543
+ },
544
+ "404": {
545
+ "description": "Not found.",
546
+ "content": {
547
+ "application/problem+json": {
548
+ "schema": {
549
+ "$ref": "#/components/schemas/Problem"
550
+ }
551
+ }
552
+ }
553
+ },
554
+ "422": {
555
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
556
+ "content": {
557
+ "application/problem+json": {
558
+ "schema": {
559
+ "$ref": "#/components/schemas/Problem"
560
+ }
561
+ }
562
+ }
563
+ }
564
+ }
565
+ }
566
+ },
567
+ "/resources/{resource}/actions/{action}": {
568
+ "parameters": [
569
+ {
570
+ "name": "resource",
571
+ "in": "path",
572
+ "required": true,
573
+ "description": "Resource id.",
574
+ "schema": {
575
+ "type": "string"
576
+ }
577
+ },
578
+ {
579
+ "name": "action",
580
+ "in": "path",
581
+ "required": true,
582
+ "description": "Action id.",
583
+ "schema": {
584
+ "type": "string"
585
+ }
586
+ }
587
+ ],
588
+ "post": {
589
+ "operationId": "runAction",
590
+ "requestBody": {
591
+ "required": true,
592
+ "content": {
593
+ "application/json": {
594
+ "schema": {
595
+ "$ref": "#/components/schemas/ActionRequest"
596
+ }
597
+ },
598
+ "multipart/form-data": {
599
+ "schema": {
600
+ "$ref": "#/components/schemas/ActionRequest"
601
+ }
602
+ }
603
+ }
604
+ },
605
+ "responses": {
606
+ "200": {
607
+ "description": "The result.",
608
+ "content": {
609
+ "application/json": {
610
+ "schema": {
611
+ "$ref": "#/components/schemas/ActionResult"
612
+ }
613
+ }
614
+ }
615
+ },
616
+ "202": {
617
+ "description": "The action runs in the background.",
618
+ "content": {
619
+ "application/json": {
620
+ "schema": {
621
+ "$ref": "#/components/schemas/ActionRunResponse"
622
+ }
623
+ }
624
+ }
625
+ },
626
+ "401": {
627
+ "description": "Not authenticated.",
628
+ "content": {
629
+ "application/problem+json": {
630
+ "schema": {
631
+ "$ref": "#/components/schemas/Problem"
632
+ }
633
+ }
634
+ }
635
+ },
636
+ "403": {
637
+ "description": "Not allowed.",
638
+ "content": {
639
+ "application/problem+json": {
640
+ "schema": {
641
+ "$ref": "#/components/schemas/Problem"
642
+ }
643
+ }
644
+ }
645
+ },
646
+ "404": {
647
+ "description": "Not found.",
648
+ "content": {
649
+ "application/problem+json": {
650
+ "schema": {
651
+ "$ref": "#/components/schemas/Problem"
652
+ }
653
+ }
654
+ }
655
+ },
656
+ "409": {
657
+ "description": "Conflict with a business rule.",
658
+ "content": {
659
+ "application/problem+json": {
660
+ "schema": {
661
+ "$ref": "#/components/schemas/Problem"
662
+ }
663
+ }
664
+ }
665
+ },
666
+ "422": {
667
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
668
+ "content": {
669
+ "application/problem+json": {
670
+ "schema": {
671
+ "$ref": "#/components/schemas/Problem"
672
+ }
673
+ }
674
+ }
675
+ }
676
+ }
677
+ }
678
+ },
679
+ "/actions/runs": {
680
+ "get": {
681
+ "operationId": "listActionRuns",
682
+ "summary": "The current user's recent runs.",
683
+ "responses": {
684
+ "200": {
685
+ "description": "Runs, newest first.",
686
+ "content": {
687
+ "application/json": {
688
+ "schema": {
689
+ "type": "object",
690
+ "required": [
691
+ "data"
692
+ ],
693
+ "properties": {
694
+ "data": {
695
+ "type": "array",
696
+ "items": {
697
+ "$ref": "#/components/schemas/ActionRun"
698
+ }
699
+ }
700
+ }
701
+ }
702
+ }
703
+ }
704
+ },
705
+ "401": {
706
+ "description": "Not authenticated.",
707
+ "content": {
708
+ "application/problem+json": {
709
+ "schema": {
710
+ "$ref": "#/components/schemas/Problem"
711
+ }
712
+ }
713
+ }
714
+ }
715
+ }
716
+ }
717
+ },
718
+ "/actions/runs/{run}": {
719
+ "parameters": [
720
+ {
721
+ "name": "run",
722
+ "in": "path",
723
+ "required": true,
724
+ "description": "Run id.",
725
+ "schema": {
726
+ "type": "string"
727
+ }
728
+ }
729
+ ],
730
+ "get": {
731
+ "operationId": "getActionRun",
732
+ "responses": {
733
+ "200": {
734
+ "description": "The run.",
735
+ "content": {
736
+ "application/json": {
737
+ "schema": {
738
+ "$ref": "#/components/schemas/ActionRunResponse"
739
+ }
740
+ }
741
+ }
742
+ },
743
+ "401": {
744
+ "description": "Not authenticated.",
745
+ "content": {
746
+ "application/problem+json": {
747
+ "schema": {
748
+ "$ref": "#/components/schemas/Problem"
749
+ }
750
+ }
751
+ }
752
+ },
753
+ "403": {
754
+ "description": "Not allowed.",
755
+ "content": {
756
+ "application/problem+json": {
757
+ "schema": {
758
+ "$ref": "#/components/schemas/Problem"
759
+ }
760
+ }
761
+ }
762
+ },
763
+ "404": {
764
+ "description": "Not found.",
765
+ "content": {
766
+ "application/problem+json": {
767
+ "schema": {
768
+ "$ref": "#/components/schemas/Problem"
769
+ }
770
+ }
771
+ }
772
+ }
773
+ }
774
+ },
775
+ "delete": {
776
+ "operationId": "cancelActionRun",
777
+ "responses": {
778
+ "204": {
779
+ "description": "Cancelled."
780
+ },
781
+ "401": {
782
+ "description": "Not authenticated.",
783
+ "content": {
784
+ "application/problem+json": {
785
+ "schema": {
786
+ "$ref": "#/components/schemas/Problem"
787
+ }
788
+ }
789
+ }
790
+ },
791
+ "403": {
792
+ "description": "Not allowed.",
793
+ "content": {
794
+ "application/problem+json": {
795
+ "schema": {
796
+ "$ref": "#/components/schemas/Problem"
797
+ }
798
+ }
799
+ }
800
+ },
801
+ "404": {
802
+ "description": "Not found.",
803
+ "content": {
804
+ "application/problem+json": {
805
+ "schema": {
806
+ "$ref": "#/components/schemas/Problem"
807
+ }
808
+ }
809
+ }
810
+ },
811
+ "409": {
812
+ "description": "Conflict with a business rule.",
813
+ "content": {
814
+ "application/problem+json": {
815
+ "schema": {
816
+ "$ref": "#/components/schemas/Problem"
817
+ }
818
+ }
819
+ }
820
+ }
821
+ }
822
+ }
823
+ },
824
+ "/media": {
825
+ "get": {
826
+ "operationId": "listMedia",
827
+ "parameters": [
828
+ {
829
+ "name": "page",
830
+ "in": "query",
831
+ "required": false,
832
+ "description": "Page number, from 1.",
833
+ "schema": {
834
+ "type": "integer",
835
+ "minimum": 1
836
+ }
837
+ },
838
+ {
839
+ "name": "perPage",
840
+ "in": "query",
841
+ "required": false,
842
+ "description": "Items per page.",
843
+ "schema": {
844
+ "type": "integer",
845
+ "minimum": 1
846
+ }
847
+ },
848
+ {
849
+ "name": "sort",
850
+ "in": "query",
851
+ "required": false,
852
+ "description": "Comma-separated fields; a `-` prefix sorts descending.",
853
+ "schema": {
854
+ "type": "string"
855
+ }
856
+ },
857
+ {
858
+ "name": "filter",
859
+ "in": "query",
860
+ "required": false,
861
+ "style": "deepObject",
862
+ "explode": true,
863
+ "description": "`filter[status]=published`, `filter[tags][]=a`.",
864
+ "schema": {
865
+ "type": "object",
866
+ "additionalProperties": true
867
+ }
868
+ },
869
+ {
870
+ "name": "q",
871
+ "in": "query",
872
+ "required": false,
873
+ "description": "Search.",
874
+ "schema": {
875
+ "type": "string"
876
+ }
877
+ },
878
+ {
879
+ "name": "fields",
880
+ "in": "query",
881
+ "required": false,
882
+ "description": "Comma-separated fields to include in each item.",
883
+ "schema": {
884
+ "type": "string"
885
+ }
886
+ }
887
+ ],
888
+ "responses": {
889
+ "200": {
890
+ "description": "A page of media.",
891
+ "content": {
892
+ "application/json": {
893
+ "schema": {
894
+ "$ref": "#/components/schemas/MediaListResponse"
895
+ }
896
+ }
897
+ }
898
+ },
899
+ "401": {
900
+ "description": "Not authenticated.",
901
+ "content": {
902
+ "application/problem+json": {
903
+ "schema": {
904
+ "$ref": "#/components/schemas/Problem"
905
+ }
906
+ }
907
+ }
908
+ },
909
+ "403": {
910
+ "description": "Not allowed.",
911
+ "content": {
912
+ "application/problem+json": {
913
+ "schema": {
914
+ "$ref": "#/components/schemas/Problem"
915
+ }
916
+ }
917
+ }
918
+ }
919
+ }
920
+ },
921
+ "post": {
922
+ "operationId": "uploadMedia",
923
+ "requestBody": {
924
+ "required": true,
925
+ "content": {
926
+ "multipart/form-data": {
927
+ "schema": {
928
+ "type": "object",
929
+ "required": [
930
+ "file"
931
+ ],
932
+ "properties": {
933
+ "file": {
934
+ "type": "string",
935
+ "contentMediaType": "application/octet-stream"
936
+ },
937
+ "name": {
938
+ "type": "string"
939
+ },
940
+ "tags": {
941
+ "type": "array",
942
+ "items": {
943
+ "type": "string"
944
+ }
945
+ }
946
+ }
947
+ }
948
+ }
949
+ }
950
+ },
951
+ "responses": {
952
+ "201": {
953
+ "description": "The created media.",
954
+ "content": {
955
+ "application/json": {
956
+ "schema": {
957
+ "$ref": "#/components/schemas/MediaResponse"
958
+ }
959
+ }
960
+ }
961
+ },
962
+ "401": {
963
+ "description": "Not authenticated.",
964
+ "content": {
965
+ "application/problem+json": {
966
+ "schema": {
967
+ "$ref": "#/components/schemas/Problem"
968
+ }
969
+ }
970
+ }
971
+ },
972
+ "403": {
973
+ "description": "Not allowed.",
974
+ "content": {
975
+ "application/problem+json": {
976
+ "schema": {
977
+ "$ref": "#/components/schemas/Problem"
978
+ }
979
+ }
980
+ }
981
+ },
982
+ "422": {
983
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
984
+ "content": {
985
+ "application/problem+json": {
986
+ "schema": {
987
+ "$ref": "#/components/schemas/Problem"
988
+ }
989
+ }
990
+ }
991
+ }
992
+ }
993
+ }
994
+ },
995
+ "/media/tags": {
996
+ "get": {
997
+ "operationId": "listMediaTags",
998
+ "responses": {
999
+ "200": {
1000
+ "description": "Tags in use.",
1001
+ "content": {
1002
+ "application/json": {
1003
+ "schema": {
1004
+ "type": "object",
1005
+ "required": [
1006
+ "data"
1007
+ ],
1008
+ "properties": {
1009
+ "data": {
1010
+ "type": "array",
1011
+ "items": {
1012
+ "type": "string"
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+ }
1018
+ }
1019
+ },
1020
+ "401": {
1021
+ "description": "Not authenticated.",
1022
+ "content": {
1023
+ "application/problem+json": {
1024
+ "schema": {
1025
+ "$ref": "#/components/schemas/Problem"
1026
+ }
1027
+ }
1028
+ }
1029
+ },
1030
+ "403": {
1031
+ "description": "Not allowed.",
1032
+ "content": {
1033
+ "application/problem+json": {
1034
+ "schema": {
1035
+ "$ref": "#/components/schemas/Problem"
1036
+ }
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ }
1042
+ },
1043
+ "/media/{id}": {
1044
+ "parameters": [
1045
+ {
1046
+ "name": "id",
1047
+ "in": "path",
1048
+ "required": true,
1049
+ "description": "Media id.",
1050
+ "schema": {
1051
+ "type": "string"
1052
+ }
1053
+ }
1054
+ ],
1055
+ "get": {
1056
+ "operationId": "getMedia",
1057
+ "responses": {
1058
+ "200": {
1059
+ "description": "The media.",
1060
+ "content": {
1061
+ "application/json": {
1062
+ "schema": {
1063
+ "$ref": "#/components/schemas/MediaResponse"
1064
+ }
1065
+ }
1066
+ }
1067
+ },
1068
+ "401": {
1069
+ "description": "Not authenticated.",
1070
+ "content": {
1071
+ "application/problem+json": {
1072
+ "schema": {
1073
+ "$ref": "#/components/schemas/Problem"
1074
+ }
1075
+ }
1076
+ }
1077
+ },
1078
+ "403": {
1079
+ "description": "Not allowed.",
1080
+ "content": {
1081
+ "application/problem+json": {
1082
+ "schema": {
1083
+ "$ref": "#/components/schemas/Problem"
1084
+ }
1085
+ }
1086
+ }
1087
+ },
1088
+ "404": {
1089
+ "description": "Not found.",
1090
+ "content": {
1091
+ "application/problem+json": {
1092
+ "schema": {
1093
+ "$ref": "#/components/schemas/Problem"
1094
+ }
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ },
1100
+ "patch": {
1101
+ "operationId": "updateMedia",
1102
+ "description": "Updates metadata, tags or the image `transform`.",
1103
+ "requestBody": {
1104
+ "required": true,
1105
+ "content": {
1106
+ "application/json": {
1107
+ "schema": {
1108
+ "type": "object",
1109
+ "additionalProperties": true
1110
+ }
1111
+ }
1112
+ }
1113
+ },
1114
+ "responses": {
1115
+ "200": {
1116
+ "description": "The updated media.",
1117
+ "content": {
1118
+ "application/json": {
1119
+ "schema": {
1120
+ "$ref": "#/components/schemas/MediaResponse"
1121
+ }
1122
+ }
1123
+ }
1124
+ },
1125
+ "401": {
1126
+ "description": "Not authenticated.",
1127
+ "content": {
1128
+ "application/problem+json": {
1129
+ "schema": {
1130
+ "$ref": "#/components/schemas/Problem"
1131
+ }
1132
+ }
1133
+ }
1134
+ },
1135
+ "403": {
1136
+ "description": "Not allowed.",
1137
+ "content": {
1138
+ "application/problem+json": {
1139
+ "schema": {
1140
+ "$ref": "#/components/schemas/Problem"
1141
+ }
1142
+ }
1143
+ }
1144
+ },
1145
+ "404": {
1146
+ "description": "Not found.",
1147
+ "content": {
1148
+ "application/problem+json": {
1149
+ "schema": {
1150
+ "$ref": "#/components/schemas/Problem"
1151
+ }
1152
+ }
1153
+ }
1154
+ },
1155
+ "422": {
1156
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1157
+ "content": {
1158
+ "application/problem+json": {
1159
+ "schema": {
1160
+ "$ref": "#/components/schemas/Problem"
1161
+ }
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+ },
1167
+ "delete": {
1168
+ "operationId": "deleteMedia",
1169
+ "responses": {
1170
+ "204": {
1171
+ "description": "Moved to the trash."
1172
+ },
1173
+ "401": {
1174
+ "description": "Not authenticated.",
1175
+ "content": {
1176
+ "application/problem+json": {
1177
+ "schema": {
1178
+ "$ref": "#/components/schemas/Problem"
1179
+ }
1180
+ }
1181
+ }
1182
+ },
1183
+ "403": {
1184
+ "description": "Not allowed.",
1185
+ "content": {
1186
+ "application/problem+json": {
1187
+ "schema": {
1188
+ "$ref": "#/components/schemas/Problem"
1189
+ }
1190
+ }
1191
+ }
1192
+ },
1193
+ "404": {
1194
+ "description": "Not found.",
1195
+ "content": {
1196
+ "application/problem+json": {
1197
+ "schema": {
1198
+ "$ref": "#/components/schemas/Problem"
1199
+ }
1200
+ }
1201
+ }
1202
+ },
1203
+ "409": {
1204
+ "description": "Conflict with a business rule.",
1205
+ "content": {
1206
+ "application/problem+json": {
1207
+ "schema": {
1208
+ "$ref": "#/components/schemas/Problem"
1209
+ }
1210
+ }
1211
+ }
1212
+ }
1213
+ }
1214
+ }
1215
+ },
1216
+ "/media/{id}/file": {
1217
+ "parameters": [
1218
+ {
1219
+ "name": "id",
1220
+ "in": "path",
1221
+ "required": true,
1222
+ "description": "Media id.",
1223
+ "schema": {
1224
+ "type": "string"
1225
+ }
1226
+ }
1227
+ ],
1228
+ "post": {
1229
+ "operationId": "replaceMediaFile",
1230
+ "requestBody": {
1231
+ "required": true,
1232
+ "content": {
1233
+ "multipart/form-data": {
1234
+ "schema": {
1235
+ "type": "object",
1236
+ "required": [
1237
+ "file"
1238
+ ],
1239
+ "properties": {
1240
+ "file": {
1241
+ "type": "string",
1242
+ "contentMediaType": "application/octet-stream"
1243
+ }
1244
+ }
1245
+ }
1246
+ }
1247
+ }
1248
+ },
1249
+ "responses": {
1250
+ "200": {
1251
+ "description": "The media.",
1252
+ "content": {
1253
+ "application/json": {
1254
+ "schema": {
1255
+ "$ref": "#/components/schemas/MediaResponse"
1256
+ }
1257
+ }
1258
+ }
1259
+ },
1260
+ "401": {
1261
+ "description": "Not authenticated.",
1262
+ "content": {
1263
+ "application/problem+json": {
1264
+ "schema": {
1265
+ "$ref": "#/components/schemas/Problem"
1266
+ }
1267
+ }
1268
+ }
1269
+ },
1270
+ "403": {
1271
+ "description": "Not allowed.",
1272
+ "content": {
1273
+ "application/problem+json": {
1274
+ "schema": {
1275
+ "$ref": "#/components/schemas/Problem"
1276
+ }
1277
+ }
1278
+ }
1279
+ },
1280
+ "404": {
1281
+ "description": "Not found.",
1282
+ "content": {
1283
+ "application/problem+json": {
1284
+ "schema": {
1285
+ "$ref": "#/components/schemas/Problem"
1286
+ }
1287
+ }
1288
+ }
1289
+ },
1290
+ "422": {
1291
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1292
+ "content": {
1293
+ "application/problem+json": {
1294
+ "schema": {
1295
+ "$ref": "#/components/schemas/Problem"
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+ }
1302
+ },
1303
+ "/media/{id}/restore": {
1304
+ "parameters": [
1305
+ {
1306
+ "name": "id",
1307
+ "in": "path",
1308
+ "required": true,
1309
+ "description": "Media id.",
1310
+ "schema": {
1311
+ "type": "string"
1312
+ }
1313
+ }
1314
+ ],
1315
+ "post": {
1316
+ "operationId": "restoreMedia",
1317
+ "responses": {
1318
+ "200": {
1319
+ "description": "The restored media.",
1320
+ "content": {
1321
+ "application/json": {
1322
+ "schema": {
1323
+ "$ref": "#/components/schemas/MediaResponse"
1324
+ }
1325
+ }
1326
+ }
1327
+ },
1328
+ "401": {
1329
+ "description": "Not authenticated.",
1330
+ "content": {
1331
+ "application/problem+json": {
1332
+ "schema": {
1333
+ "$ref": "#/components/schemas/Problem"
1334
+ }
1335
+ }
1336
+ }
1337
+ },
1338
+ "403": {
1339
+ "description": "Not allowed.",
1340
+ "content": {
1341
+ "application/problem+json": {
1342
+ "schema": {
1343
+ "$ref": "#/components/schemas/Problem"
1344
+ }
1345
+ }
1346
+ }
1347
+ },
1348
+ "404": {
1349
+ "description": "Not found.",
1350
+ "content": {
1351
+ "application/problem+json": {
1352
+ "schema": {
1353
+ "$ref": "#/components/schemas/Problem"
1354
+ }
1355
+ }
1356
+ }
1357
+ }
1358
+ }
1359
+ }
1360
+ },
1361
+ "/auth/session": {
1362
+ "get": {
1363
+ "operationId": "getSession",
1364
+ "responses": {
1365
+ "200": {
1366
+ "description": "The current user.",
1367
+ "content": {
1368
+ "application/json": {
1369
+ "schema": {
1370
+ "$ref": "#/components/schemas/Session"
1371
+ }
1372
+ }
1373
+ }
1374
+ },
1375
+ "401": {
1376
+ "description": "Not authenticated.",
1377
+ "content": {
1378
+ "application/problem+json": {
1379
+ "schema": {
1380
+ "$ref": "#/components/schemas/Problem"
1381
+ }
1382
+ }
1383
+ }
1384
+ }
1385
+ }
1386
+ }
1387
+ },
1388
+ "/auth/login": {
1389
+ "post": {
1390
+ "operationId": "login",
1391
+ "requestBody": {
1392
+ "required": true,
1393
+ "content": {
1394
+ "application/json": {
1395
+ "schema": {
1396
+ "type": "object",
1397
+ "required": [
1398
+ "email",
1399
+ "password"
1400
+ ],
1401
+ "properties": {
1402
+ "email": {
1403
+ "type": "string"
1404
+ },
1405
+ "password": {
1406
+ "type": "string"
1407
+ },
1408
+ "remember": {
1409
+ "type": "boolean"
1410
+ }
1411
+ }
1412
+ }
1413
+ }
1414
+ }
1415
+ },
1416
+ "responses": {
1417
+ "200": {
1418
+ "description": "Logged in.",
1419
+ "content": {
1420
+ "application/json": {
1421
+ "schema": {
1422
+ "$ref": "#/components/schemas/Session"
1423
+ }
1424
+ }
1425
+ }
1426
+ },
1427
+ "202": {
1428
+ "description": "A second factor is required: answer `/auth/two-factor/challenge`.",
1429
+ "content": {
1430
+ "application/json": {
1431
+ "schema": {
1432
+ "type": "object",
1433
+ "properties": {
1434
+ "twoFactor": {
1435
+ "type": "boolean",
1436
+ "const": true
1437
+ }
1438
+ }
1439
+ }
1440
+ }
1441
+ }
1442
+ },
1443
+ "422": {
1444
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1445
+ "content": {
1446
+ "application/problem+json": {
1447
+ "schema": {
1448
+ "$ref": "#/components/schemas/Problem"
1449
+ }
1450
+ }
1451
+ }
1452
+ }
1453
+ }
1454
+ }
1455
+ },
1456
+ "/auth/logout": {
1457
+ "post": {
1458
+ "operationId": "logout",
1459
+ "responses": {
1460
+ "204": {
1461
+ "description": "Logged out."
1462
+ }
1463
+ }
1464
+ }
1465
+ },
1466
+ "/auth/providers/{provider}/redirect": {
1467
+ "parameters": [
1468
+ {
1469
+ "name": "provider",
1470
+ "in": "path",
1471
+ "required": true,
1472
+ "description": "Provider id.",
1473
+ "schema": {
1474
+ "type": "string"
1475
+ }
1476
+ }
1477
+ ],
1478
+ "get": {
1479
+ "operationId": "redirectToProvider",
1480
+ "parameters": [
1481
+ {
1482
+ "name": "next",
1483
+ "in": "query",
1484
+ "required": false,
1485
+ "description": "Local path to go to after login.",
1486
+ "schema": {
1487
+ "type": "string"
1488
+ }
1489
+ }
1490
+ ],
1491
+ "responses": {
1492
+ "302": {
1493
+ "description": "Redirect to the provider."
1494
+ },
1495
+ "404": {
1496
+ "description": "Not found.",
1497
+ "content": {
1498
+ "application/problem+json": {
1499
+ "schema": {
1500
+ "$ref": "#/components/schemas/Problem"
1501
+ }
1502
+ }
1503
+ }
1504
+ }
1505
+ }
1506
+ }
1507
+ },
1508
+ "/auth/password/forgot": {
1509
+ "post": {
1510
+ "operationId": "forgotPassword",
1511
+ "requestBody": {
1512
+ "required": true,
1513
+ "content": {
1514
+ "application/json": {
1515
+ "schema": {
1516
+ "type": "object",
1517
+ "required": [
1518
+ "email"
1519
+ ],
1520
+ "properties": {
1521
+ "email": {
1522
+ "type": "string"
1523
+ }
1524
+ }
1525
+ }
1526
+ }
1527
+ }
1528
+ },
1529
+ "responses": {
1530
+ "204": {
1531
+ "description": "A reset link was sent, if the account exists."
1532
+ },
1533
+ "422": {
1534
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1535
+ "content": {
1536
+ "application/problem+json": {
1537
+ "schema": {
1538
+ "$ref": "#/components/schemas/Problem"
1539
+ }
1540
+ }
1541
+ }
1542
+ }
1543
+ }
1544
+ }
1545
+ },
1546
+ "/auth/password/reset": {
1547
+ "post": {
1548
+ "operationId": "resetPassword",
1549
+ "requestBody": {
1550
+ "required": true,
1551
+ "content": {
1552
+ "application/json": {
1553
+ "schema": {
1554
+ "type": "object",
1555
+ "required": [
1556
+ "token",
1557
+ "email",
1558
+ "password"
1559
+ ],
1560
+ "properties": {
1561
+ "token": {
1562
+ "type": "string"
1563
+ },
1564
+ "email": {
1565
+ "type": "string"
1566
+ },
1567
+ "password": {
1568
+ "type": "string"
1569
+ }
1570
+ }
1571
+ }
1572
+ }
1573
+ }
1574
+ },
1575
+ "responses": {
1576
+ "204": {
1577
+ "description": "The password was reset."
1578
+ },
1579
+ "422": {
1580
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1581
+ "content": {
1582
+ "application/problem+json": {
1583
+ "schema": {
1584
+ "$ref": "#/components/schemas/Problem"
1585
+ }
1586
+ }
1587
+ }
1588
+ }
1589
+ }
1590
+ }
1591
+ },
1592
+ "/auth/two-factor/challenge": {
1593
+ "post": {
1594
+ "operationId": "twoFactorChallenge",
1595
+ "requestBody": {
1596
+ "required": true,
1597
+ "content": {
1598
+ "application/json": {
1599
+ "schema": {
1600
+ "type": "object",
1601
+ "properties": {
1602
+ "code": {
1603
+ "type": "string"
1604
+ },
1605
+ "recoveryCode": {
1606
+ "type": "string"
1607
+ }
1608
+ }
1609
+ }
1610
+ }
1611
+ }
1612
+ },
1613
+ "responses": {
1614
+ "200": {
1615
+ "description": "Logged in.",
1616
+ "content": {
1617
+ "application/json": {
1618
+ "schema": {
1619
+ "$ref": "#/components/schemas/Session"
1620
+ }
1621
+ }
1622
+ }
1623
+ },
1624
+ "422": {
1625
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1626
+ "content": {
1627
+ "application/problem+json": {
1628
+ "schema": {
1629
+ "$ref": "#/components/schemas/Problem"
1630
+ }
1631
+ }
1632
+ }
1633
+ }
1634
+ }
1635
+ }
1636
+ },
1637
+ "/auth/passkeys/options": {
1638
+ "post": {
1639
+ "operationId": "passkeyOptions",
1640
+ "responses": {
1641
+ "200": {
1642
+ "description": "WebAuthn request options.",
1643
+ "content": {
1644
+ "application/json": {
1645
+ "schema": {
1646
+ "type": "object",
1647
+ "additionalProperties": true
1648
+ }
1649
+ }
1650
+ }
1651
+ }
1652
+ }
1653
+ }
1654
+ },
1655
+ "/auth/passkeys/login": {
1656
+ "post": {
1657
+ "operationId": "passkeyLogin",
1658
+ "requestBody": {
1659
+ "required": true,
1660
+ "content": {
1661
+ "application/json": {
1662
+ "schema": {
1663
+ "type": "object",
1664
+ "additionalProperties": true
1665
+ }
1666
+ }
1667
+ }
1668
+ },
1669
+ "responses": {
1670
+ "200": {
1671
+ "description": "Logged in.",
1672
+ "content": {
1673
+ "application/json": {
1674
+ "schema": {
1675
+ "$ref": "#/components/schemas/Session"
1676
+ }
1677
+ }
1678
+ }
1679
+ },
1680
+ "422": {
1681
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1682
+ "content": {
1683
+ "application/problem+json": {
1684
+ "schema": {
1685
+ "$ref": "#/components/schemas/Problem"
1686
+ }
1687
+ }
1688
+ }
1689
+ }
1690
+ }
1691
+ }
1692
+ },
1693
+ "/account": {
1694
+ "get": {
1695
+ "operationId": "getAccount",
1696
+ "responses": {
1697
+ "200": {
1698
+ "description": "The current user.",
1699
+ "content": {
1700
+ "application/json": {
1701
+ "schema": {
1702
+ "type": "object",
1703
+ "required": [
1704
+ "data"
1705
+ ],
1706
+ "properties": {
1707
+ "data": {
1708
+ "$ref": "#/components/schemas/User"
1709
+ }
1710
+ }
1711
+ }
1712
+ }
1713
+ }
1714
+ },
1715
+ "401": {
1716
+ "description": "Not authenticated.",
1717
+ "content": {
1718
+ "application/problem+json": {
1719
+ "schema": {
1720
+ "$ref": "#/components/schemas/Problem"
1721
+ }
1722
+ }
1723
+ }
1724
+ }
1725
+ }
1726
+ },
1727
+ "patch": {
1728
+ "operationId": "updateAccount",
1729
+ "requestBody": {
1730
+ "required": true,
1731
+ "content": {
1732
+ "application/json": {
1733
+ "schema": {
1734
+ "type": "object",
1735
+ "additionalProperties": true
1736
+ }
1737
+ }
1738
+ }
1739
+ },
1740
+ "responses": {
1741
+ "200": {
1742
+ "description": "The updated user.",
1743
+ "content": {
1744
+ "application/json": {
1745
+ "schema": {
1746
+ "type": "object",
1747
+ "required": [
1748
+ "data"
1749
+ ],
1750
+ "properties": {
1751
+ "data": {
1752
+ "$ref": "#/components/schemas/User"
1753
+ }
1754
+ }
1755
+ }
1756
+ }
1757
+ }
1758
+ },
1759
+ "401": {
1760
+ "description": "Not authenticated.",
1761
+ "content": {
1762
+ "application/problem+json": {
1763
+ "schema": {
1764
+ "$ref": "#/components/schemas/Problem"
1765
+ }
1766
+ }
1767
+ }
1768
+ },
1769
+ "422": {
1770
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1771
+ "content": {
1772
+ "application/problem+json": {
1773
+ "schema": {
1774
+ "$ref": "#/components/schemas/Problem"
1775
+ }
1776
+ }
1777
+ }
1778
+ }
1779
+ }
1780
+ }
1781
+ },
1782
+ "/search": {
1783
+ "get": {
1784
+ "operationId": "search",
1785
+ "parameters": [
1786
+ {
1787
+ "name": "q",
1788
+ "in": "query",
1789
+ "required": true,
1790
+ "description": "Search terms.",
1791
+ "schema": {
1792
+ "type": "string"
1793
+ }
1794
+ }
1795
+ ],
1796
+ "responses": {
1797
+ "200": {
1798
+ "description": "Results grouped by resource.",
1799
+ "content": {
1800
+ "application/json": {
1801
+ "schema": {
1802
+ "$ref": "#/components/schemas/SearchResponse"
1803
+ }
1804
+ }
1805
+ }
1806
+ },
1807
+ "401": {
1808
+ "description": "Not authenticated.",
1809
+ "content": {
1810
+ "application/problem+json": {
1811
+ "schema": {
1812
+ "$ref": "#/components/schemas/Problem"
1813
+ }
1814
+ }
1815
+ }
1816
+ }
1817
+ }
1818
+ }
1819
+ },
1820
+ "/dashboard/widgets/{widget}": {
1821
+ "parameters": [
1822
+ {
1823
+ "name": "widget",
1824
+ "in": "path",
1825
+ "required": true,
1826
+ "description": "Widget id.",
1827
+ "schema": {
1828
+ "type": "string"
1829
+ }
1830
+ }
1831
+ ],
1832
+ "get": {
1833
+ "operationId": "getWidgetData",
1834
+ "responses": {
1835
+ "200": {
1836
+ "description": "The widget's data. Its shape depends on the widget type.",
1837
+ "content": {
1838
+ "application/json": {
1839
+ "schema": {
1840
+ "type": "object",
1841
+ "additionalProperties": true
1842
+ }
1843
+ }
1844
+ }
1845
+ },
1846
+ "401": {
1847
+ "description": "Not authenticated.",
1848
+ "content": {
1849
+ "application/problem+json": {
1850
+ "schema": {
1851
+ "$ref": "#/components/schemas/Problem"
1852
+ }
1853
+ }
1854
+ }
1855
+ },
1856
+ "403": {
1857
+ "description": "Not allowed.",
1858
+ "content": {
1859
+ "application/problem+json": {
1860
+ "schema": {
1861
+ "$ref": "#/components/schemas/Problem"
1862
+ }
1863
+ }
1864
+ }
1865
+ },
1866
+ "404": {
1867
+ "description": "Not found.",
1868
+ "content": {
1869
+ "application/problem+json": {
1870
+ "schema": {
1871
+ "$ref": "#/components/schemas/Problem"
1872
+ }
1873
+ }
1874
+ }
1875
+ }
1876
+ }
1877
+ }
1878
+ }
1879
+ },
1880
+ "components": {
1881
+ "schemas": {
1882
+ "Id": {
1883
+ "type": "string",
1884
+ "minLength": 1,
1885
+ "description": "Opaque identifier. Clients never parse or generate ids."
1886
+ },
1887
+ "Abilities": {
1888
+ "type": "object",
1889
+ "propertyNames": {
1890
+ "type": "string"
1891
+ },
1892
+ "additionalProperties": {
1893
+ "type": "boolean"
1894
+ },
1895
+ "description": "What the current user can do, keyed by ability (`viewAny`, `create`, `update`, `delete`, or an action id)."
1896
+ },
1897
+ "RouteReference": {
1898
+ "type": "object",
1899
+ "properties": {
1900
+ "route": {
1901
+ "type": "string",
1902
+ "minLength": 1,
1903
+ "description": "Name of a route in the definition."
1904
+ },
1905
+ "params": {
1906
+ "type": "object",
1907
+ "propertyNames": {
1908
+ "type": "string"
1909
+ },
1910
+ "additionalProperties": {
1911
+ "type": [
1912
+ "string",
1913
+ "number"
1914
+ ]
1915
+ }
1916
+ }
1917
+ },
1918
+ "required": [
1919
+ "route"
1920
+ ],
1921
+ "additionalProperties": {}
1922
+ },
1923
+ "Condition": {
1924
+ "type": "object",
1925
+ "properties": {
1926
+ "field": {
1927
+ "description": "Field name, or a dot path.",
1928
+ "type": "string",
1929
+ "minLength": 1
1930
+ },
1931
+ "equals": {},
1932
+ "in": {
1933
+ "type": "array",
1934
+ "items": {}
1935
+ },
1936
+ "notIn": {
1937
+ "type": "array",
1938
+ "items": {}
1939
+ },
1940
+ "filled": {
1941
+ "type": "boolean"
1942
+ },
1943
+ "all": {
1944
+ "type": "array",
1945
+ "items": {
1946
+ "$ref": "#/components/schemas/Condition"
1947
+ }
1948
+ },
1949
+ "any": {
1950
+ "type": "array",
1951
+ "items": {
1952
+ "$ref": "#/components/schemas/Condition"
1953
+ }
1954
+ }
1955
+ },
1956
+ "additionalProperties": {},
1957
+ "description": "A condition on form values: compare one field (`equals`, `in`, `notIn`, `filled`), or combine conditions with `all` or `any`."
1958
+ },
1959
+ "Option": {
1960
+ "type": "object",
1961
+ "properties": {
1962
+ "value": {
1963
+ "type": [
1964
+ "string",
1965
+ "number",
1966
+ "boolean"
1967
+ ]
1968
+ },
1969
+ "label": {
1970
+ "type": "string"
1971
+ },
1972
+ "description": {
1973
+ "type": "string"
1974
+ },
1975
+ "disabled": {
1976
+ "type": "boolean"
1977
+ }
1978
+ },
1979
+ "required": [
1980
+ "value",
1981
+ "label"
1982
+ ],
1983
+ "additionalProperties": {}
1984
+ },
1985
+ "Rule": {
1986
+ "anyOf": [
1987
+ {
1988
+ "type": "object",
1989
+ "properties": {
1990
+ "rule": {
1991
+ "type": "string",
1992
+ "const": "required"
1993
+ },
1994
+ "message": {
1995
+ "description": "Message shown when the rule fails, instead of the default one.",
1996
+ "type": "string"
1997
+ }
1998
+ },
1999
+ "required": [
2000
+ "rule"
2001
+ ],
2002
+ "additionalProperties": {}
2003
+ },
2004
+ {
2005
+ "type": "object",
2006
+ "properties": {
2007
+ "rule": {
2008
+ "type": "string",
2009
+ "enum": [
2010
+ "min",
2011
+ "max"
2012
+ ]
2013
+ },
2014
+ "value": {
2015
+ "type": "number"
2016
+ },
2017
+ "message": {
2018
+ "description": "Message shown when the rule fails, instead of the default one.",
2019
+ "type": "string"
2020
+ }
2021
+ },
2022
+ "required": [
2023
+ "rule",
2024
+ "value"
2025
+ ],
2026
+ "additionalProperties": {}
2027
+ },
2028
+ {
2029
+ "type": "object",
2030
+ "properties": {
2031
+ "rule": {
2032
+ "type": "string",
2033
+ "const": "pattern"
2034
+ },
2035
+ "value": {
2036
+ "type": "string"
2037
+ },
2038
+ "flags": {
2039
+ "type": "string"
2040
+ },
2041
+ "message": {
2042
+ "description": "Message shown when the rule fails, instead of the default one.",
2043
+ "type": "string"
2044
+ }
2045
+ },
2046
+ "required": [
2047
+ "rule",
2048
+ "value"
2049
+ ],
2050
+ "additionalProperties": {}
2051
+ },
2052
+ {
2053
+ "type": "object",
2054
+ "properties": {
2055
+ "rule": {
2056
+ "type": "string",
2057
+ "enum": [
2058
+ "email",
2059
+ "url"
2060
+ ]
2061
+ },
2062
+ "message": {
2063
+ "description": "Message shown when the rule fails, instead of the default one.",
2064
+ "type": "string"
2065
+ }
2066
+ },
2067
+ "required": [
2068
+ "rule"
2069
+ ],
2070
+ "additionalProperties": {}
2071
+ },
2072
+ {
2073
+ "type": "object",
2074
+ "properties": {
2075
+ "rule": {
2076
+ "type": "string",
2077
+ "const": "in"
2078
+ },
2079
+ "value": {
2080
+ "type": "array",
2081
+ "items": {
2082
+ "type": [
2083
+ "string",
2084
+ "number",
2085
+ "boolean"
2086
+ ]
2087
+ }
2088
+ },
2089
+ "message": {
2090
+ "description": "Message shown when the rule fails, instead of the default one.",
2091
+ "type": "string"
2092
+ }
2093
+ },
2094
+ "required": [
2095
+ "rule",
2096
+ "value"
2097
+ ],
2098
+ "additionalProperties": {}
2099
+ },
2100
+ {
2101
+ "type": "object",
2102
+ "properties": {
2103
+ "rule": {
2104
+ "type": "string",
2105
+ "const": "accept"
2106
+ },
2107
+ "value": {
2108
+ "type": "array",
2109
+ "items": {
2110
+ "type": "string",
2111
+ "minLength": 1
2112
+ }
2113
+ },
2114
+ "message": {
2115
+ "description": "Message shown when the rule fails, instead of the default one.",
2116
+ "type": "string"
2117
+ }
2118
+ },
2119
+ "required": [
2120
+ "rule",
2121
+ "value"
2122
+ ],
2123
+ "additionalProperties": {}
2124
+ },
2125
+ {
2126
+ "type": "object",
2127
+ "properties": {
2128
+ "rule": {
2129
+ "type": "string",
2130
+ "const": "maxSize"
2131
+ },
2132
+ "value": {
2133
+ "type": "integer",
2134
+ "exclusiveMinimum": 0,
2135
+ "maximum": 9007199254740991
2136
+ },
2137
+ "message": {
2138
+ "description": "Message shown when the rule fails, instead of the default one.",
2139
+ "type": "string"
2140
+ }
2141
+ },
2142
+ "required": [
2143
+ "rule",
2144
+ "value"
2145
+ ],
2146
+ "additionalProperties": {}
2147
+ },
2148
+ {
2149
+ "type": "object",
2150
+ "properties": {
2151
+ "rule": {
2152
+ "type": "string",
2153
+ "enum": [
2154
+ "before",
2155
+ "after"
2156
+ ]
2157
+ },
2158
+ "value": {
2159
+ "anyOf": [
2160
+ {
2161
+ "type": "string",
2162
+ "description": "An ISO 8601 date or date-time."
2163
+ },
2164
+ {
2165
+ "type": "object",
2166
+ "properties": {
2167
+ "field": {
2168
+ "type": "string",
2169
+ "minLength": 1
2170
+ }
2171
+ },
2172
+ "required": [
2173
+ "field"
2174
+ ],
2175
+ "additionalProperties": {},
2176
+ "description": "Another field of the form."
2177
+ }
2178
+ ]
2179
+ },
2180
+ "message": {
2181
+ "description": "Message shown when the rule fails, instead of the default one.",
2182
+ "type": "string"
2183
+ }
2184
+ },
2185
+ "required": [
2186
+ "rule",
2187
+ "value"
2188
+ ],
2189
+ "additionalProperties": {}
2190
+ },
2191
+ {
2192
+ "type": "object",
2193
+ "properties": {
2194
+ "rule": {
2195
+ "type": "string"
2196
+ },
2197
+ "message": {
2198
+ "description": "Message shown when the rule fails, instead of the default one.",
2199
+ "type": "string"
2200
+ }
2201
+ },
2202
+ "required": [
2203
+ "rule"
2204
+ ],
2205
+ "additionalProperties": {},
2206
+ "description": "A rule added in a later version of the protocol. Clients that don't know it ignore it; the server still enforces it."
2207
+ }
2208
+ ],
2209
+ "description": "A portable validation rule. `min` and `max` apply to numbers, and to the length of text and arrays. `accept` lists MIME types (`image/*`). `maxSize` is in bytes."
2210
+ },
2211
+ "BlockType": {
2212
+ "type": "object",
2213
+ "properties": {
2214
+ "id": {
2215
+ "type": "string",
2216
+ "minLength": 1
2217
+ },
2218
+ "label": {
2219
+ "type": "string"
2220
+ },
2221
+ "icon": {
2222
+ "type": "string"
2223
+ },
2224
+ "fields": {
2225
+ "type": "array",
2226
+ "items": {
2227
+ "$ref": "#/components/schemas/Field"
2228
+ }
2229
+ }
2230
+ },
2231
+ "required": [
2232
+ "id",
2233
+ "label",
2234
+ "fields"
2235
+ ],
2236
+ "additionalProperties": {}
2237
+ },
2238
+ "Field": {
2239
+ "type": "object",
2240
+ "properties": {
2241
+ "name": {
2242
+ "type": "string",
2243
+ "minLength": 1
2244
+ },
2245
+ "type": {
2246
+ "type": "string",
2247
+ "minLength": 1,
2248
+ "description": "A built-in field type, or a type provided by a plugin."
2249
+ },
2250
+ "label": {
2251
+ "type": "string"
2252
+ },
2253
+ "help": {
2254
+ "type": "string"
2255
+ },
2256
+ "placeholder": {
2257
+ "type": "string"
2258
+ },
2259
+ "default": {},
2260
+ "localized": {
2261
+ "description": "The value is an object keyed by locale.",
2262
+ "type": "boolean"
2263
+ },
2264
+ "readOnly": {
2265
+ "type": "boolean"
2266
+ },
2267
+ "createOnly": {
2268
+ "type": "boolean"
2269
+ },
2270
+ "updateOnly": {
2271
+ "type": "boolean"
2272
+ },
2273
+ "rules": {
2274
+ "type": "array",
2275
+ "items": {
2276
+ "$ref": "#/components/schemas/Rule"
2277
+ }
2278
+ },
2279
+ "visibleWhen": {
2280
+ "$ref": "#/components/schemas/Condition"
2281
+ },
2282
+ "options": {
2283
+ "description": "`select`: the choices.",
2284
+ "type": "array",
2285
+ "items": {
2286
+ "$ref": "#/components/schemas/Option"
2287
+ }
2288
+ },
2289
+ "multiple": {
2290
+ "description": "`select`, `relation`, `media`: the value is an array.",
2291
+ "type": "boolean"
2292
+ },
2293
+ "resource": {
2294
+ "description": "`relation`: id of the related resource.",
2295
+ "type": "string"
2296
+ },
2297
+ "accept": {
2298
+ "description": "`media`: accepted MIME types.",
2299
+ "type": "array",
2300
+ "items": {
2301
+ "type": "string"
2302
+ }
2303
+ },
2304
+ "from": {
2305
+ "description": "`slug`: the field the slug is generated from.",
2306
+ "type": "string"
2307
+ },
2308
+ "display": {
2309
+ "description": "Display used in lists, when it differs from the default one of the type.",
2310
+ "type": "string"
2311
+ },
2312
+ "fields": {
2313
+ "description": "`group` and `repeater`: the nested fields.",
2314
+ "type": "array",
2315
+ "items": {
2316
+ "$ref": "#/components/schemas/Field"
2317
+ }
2318
+ },
2319
+ "types": {
2320
+ "description": "`repeater`: typed blocks, each with its own fields.",
2321
+ "type": "array",
2322
+ "items": {
2323
+ "$ref": "#/components/schemas/BlockType"
2324
+ }
2325
+ },
2326
+ "settings": {
2327
+ "type": "object",
2328
+ "propertyNames": {
2329
+ "type": "string"
2330
+ },
2331
+ "additionalProperties": {}
2332
+ }
2333
+ },
2334
+ "required": [
2335
+ "name",
2336
+ "type"
2337
+ ],
2338
+ "additionalProperties": {},
2339
+ "description": "A field of a form."
2340
+ },
2341
+ "LayoutNode": {
2342
+ "type": "object",
2343
+ "properties": {
2344
+ "type": {
2345
+ "type": "string",
2346
+ "minLength": 1,
2347
+ "description": "A built-in node type, or a type provided by a plugin."
2348
+ },
2349
+ "name": {
2350
+ "description": "`field`: the name of the field.",
2351
+ "type": "string",
2352
+ "minLength": 1
2353
+ },
2354
+ "label": {
2355
+ "description": "`section`, `tab`: the title.",
2356
+ "type": "string"
2357
+ },
2358
+ "description": {
2359
+ "type": "string"
2360
+ },
2361
+ "text": {
2362
+ "description": "`text`: a static paragraph.",
2363
+ "type": "string"
2364
+ },
2365
+ "component": {
2366
+ "description": "`component`: a component provided by a plugin.",
2367
+ "type": "string"
2368
+ },
2369
+ "props": {
2370
+ "type": "object",
2371
+ "propertyNames": {
2372
+ "type": "string"
2373
+ },
2374
+ "additionalProperties": {}
2375
+ },
2376
+ "width": {
2377
+ "description": "Width on a 12-column grid, inside a `row`.",
2378
+ "type": "integer",
2379
+ "minimum": 1,
2380
+ "maximum": 12
2381
+ },
2382
+ "collapsible": {
2383
+ "type": "boolean"
2384
+ },
2385
+ "collapsed": {
2386
+ "type": "boolean"
2387
+ },
2388
+ "visibleWhen": {
2389
+ "$ref": "#/components/schemas/Condition"
2390
+ },
2391
+ "children": {
2392
+ "type": "array",
2393
+ "items": {
2394
+ "$ref": "#/components/schemas/LayoutNode"
2395
+ }
2396
+ }
2397
+ },
2398
+ "required": [
2399
+ "type"
2400
+ ],
2401
+ "additionalProperties": {},
2402
+ "description": "A node of a form layout. Containers (`row`, `column`, `section`, `tabs`, `tab`, `sidebar`) have `children`. Fields that no node references are appended at the end of the form."
2403
+ },
2404
+ "Column": {
2405
+ "type": "object",
2406
+ "properties": {
2407
+ "field": {
2408
+ "description": "The field shown in the column.",
2409
+ "type": "string",
2410
+ "minLength": 1
2411
+ },
2412
+ "id": {
2413
+ "description": "Id of a column that is not a field.",
2414
+ "type": "string",
2415
+ "minLength": 1
2416
+ },
2417
+ "label": {
2418
+ "type": "string"
2419
+ },
2420
+ "display": {
2421
+ "description": "How the value is displayed.",
2422
+ "type": "string"
2423
+ },
2424
+ "sortable": {
2425
+ "type": "boolean"
2426
+ },
2427
+ "width": {
2428
+ "type": [
2429
+ "number",
2430
+ "string"
2431
+ ]
2432
+ },
2433
+ "align": {
2434
+ "type": "string",
2435
+ "enum": [
2436
+ "start",
2437
+ "center",
2438
+ "end"
2439
+ ]
2440
+ }
2441
+ },
2442
+ "additionalProperties": {}
2443
+ },
2444
+ "Filter": {
2445
+ "type": "object",
2446
+ "properties": {
2447
+ "id": {
2448
+ "type": "string",
2449
+ "minLength": 1,
2450
+ "description": "Sent as `filter[id]`."
2451
+ },
2452
+ "type": {
2453
+ "type": "string",
2454
+ "minLength": 1,
2455
+ "description": "Built-in: `text`, `select`, `toggle`, `date`, `date-range`, `relation`."
2456
+ },
2457
+ "label": {
2458
+ "type": "string"
2459
+ },
2460
+ "options": {
2461
+ "type": "array",
2462
+ "items": {
2463
+ "$ref": "#/components/schemas/Option"
2464
+ }
2465
+ },
2466
+ "resource": {
2467
+ "type": "string"
2468
+ },
2469
+ "multiple": {
2470
+ "type": "boolean"
2471
+ },
2472
+ "default": {}
2473
+ },
2474
+ "required": [
2475
+ "id",
2476
+ "type"
2477
+ ],
2478
+ "additionalProperties": {}
2479
+ },
2480
+ "ListDefinition": {
2481
+ "type": "object",
2482
+ "properties": {
2483
+ "columns": {
2484
+ "type": "array",
2485
+ "items": {
2486
+ "$ref": "#/components/schemas/Column"
2487
+ }
2488
+ },
2489
+ "filters": {
2490
+ "type": "array",
2491
+ "items": {
2492
+ "$ref": "#/components/schemas/Filter"
2493
+ }
2494
+ },
2495
+ "sorts": {
2496
+ "description": "Fields the list can be sorted by.",
2497
+ "type": "array",
2498
+ "items": {
2499
+ "type": "string",
2500
+ "minLength": 1
2501
+ }
2502
+ },
2503
+ "defaultSort": {
2504
+ "description": "Same format as the `sort` query parameter: `-published_at,title`.",
2505
+ "type": "string"
2506
+ },
2507
+ "search": {
2508
+ "description": "Whether the `q` parameter is supported.",
2509
+ "type": "boolean"
2510
+ },
2511
+ "layouts": {
2512
+ "type": "array",
2513
+ "items": {
2514
+ "type": "string",
2515
+ "minLength": 1
2516
+ }
2517
+ },
2518
+ "perPage": {
2519
+ "type": "integer",
2520
+ "exclusiveMinimum": 0,
2521
+ "maximum": 9007199254740991
2522
+ },
2523
+ "perPageOptions": {
2524
+ "type": "array",
2525
+ "items": {
2526
+ "type": "integer",
2527
+ "exclusiveMinimum": 0,
2528
+ "maximum": 9007199254740991
2529
+ }
2530
+ },
2531
+ "inlineEdit": {
2532
+ "description": "Fields editable in the list.",
2533
+ "type": "array",
2534
+ "items": {
2535
+ "type": "string",
2536
+ "minLength": 1
2537
+ }
2538
+ },
2539
+ "selectable": {
2540
+ "type": "boolean"
2541
+ }
2542
+ },
2543
+ "additionalProperties": {}
2544
+ },
2545
+ "ActionScope": {
2546
+ "type": "string",
2547
+ "enum": [
2548
+ "item",
2549
+ "selection",
2550
+ "resource"
2551
+ ]
2552
+ },
2553
+ "ActionPlacement": {
2554
+ "type": "string",
2555
+ "enum": [
2556
+ "row",
2557
+ "toolbar",
2558
+ "form",
2559
+ "menu"
2560
+ ]
2561
+ },
2562
+ "ActionConfirm": {
2563
+ "anyOf": [
2564
+ {
2565
+ "type": "boolean"
2566
+ },
2567
+ {
2568
+ "type": "object",
2569
+ "properties": {
2570
+ "title": {
2571
+ "type": "string"
2572
+ },
2573
+ "message": {
2574
+ "description": "ICU message. `{count}` is the number of items.",
2575
+ "type": "string"
2576
+ },
2577
+ "confirmLabel": {
2578
+ "type": "string"
2579
+ },
2580
+ "cancelLabel": {
2581
+ "type": "string"
2582
+ }
2583
+ },
2584
+ "additionalProperties": {}
2585
+ }
2586
+ ]
2587
+ },
2588
+ "Action": {
2589
+ "type": "object",
2590
+ "properties": {
2591
+ "id": {
2592
+ "type": "string",
2593
+ "minLength": 1
2594
+ },
2595
+ "label": {
2596
+ "type": "string"
2597
+ },
2598
+ "icon": {
2599
+ "type": "string"
2600
+ },
2601
+ "kind": {
2602
+ "default": "server",
2603
+ "description": "`server` calls the action endpoint; `link` navigates; `client` runs a plugin handler.",
2604
+ "type": "string",
2605
+ "enum": [
2606
+ "server",
2607
+ "link",
2608
+ "client"
2609
+ ]
2610
+ },
2611
+ "scope": {
2612
+ "minItems": 1,
2613
+ "type": "array",
2614
+ "items": {
2615
+ "$ref": "#/components/schemas/ActionScope"
2616
+ }
2617
+ },
2618
+ "placement": {
2619
+ "type": "array",
2620
+ "items": {
2621
+ "$ref": "#/components/schemas/ActionPlacement"
2622
+ }
2623
+ },
2624
+ "destructive": {
2625
+ "type": "boolean"
2626
+ },
2627
+ "confirm": {
2628
+ "$ref": "#/components/schemas/ActionConfirm"
2629
+ },
2630
+ "fields": {
2631
+ "description": "Parameters, shown in a modal.",
2632
+ "type": "array",
2633
+ "items": {
2634
+ "$ref": "#/components/schemas/Field"
2635
+ }
2636
+ },
2637
+ "layout": {
2638
+ "type": "array",
2639
+ "items": {
2640
+ "$ref": "#/components/schemas/LayoutNode"
2641
+ }
2642
+ },
2643
+ "queued": {
2644
+ "description": "The action always answers `202` with a run.",
2645
+ "type": "boolean"
2646
+ },
2647
+ "url": {
2648
+ "description": "`link`: URL template, with `{id}` for the item.",
2649
+ "type": "string"
2650
+ },
2651
+ "route": {
2652
+ "description": "`link`: name of a route in the definition.",
2653
+ "type": "string"
2654
+ },
2655
+ "component": {
2656
+ "description": "`client`: the plugin handler.",
2657
+ "type": "string"
2658
+ },
2659
+ "abilities": {
2660
+ "description": "`run`: whether the current user can run the action on the resource.",
2661
+ "$ref": "#/components/schemas/Abilities"
2662
+ }
2663
+ },
2664
+ "required": [
2665
+ "id",
2666
+ "label",
2667
+ "scope"
2668
+ ],
2669
+ "additionalProperties": {},
2670
+ "description": "An operation on one item, a selection, or the whole resource."
2671
+ },
2672
+ "ResourceFeatures": {
2673
+ "type": "object",
2674
+ "properties": {
2675
+ "drafts": {
2676
+ "type": "boolean"
2677
+ },
2678
+ "revisions": {
2679
+ "type": "boolean"
2680
+ },
2681
+ "preview": {
2682
+ "anyOf": [
2683
+ {
2684
+ "type": "null"
2685
+ },
2686
+ {
2687
+ "type": "object",
2688
+ "properties": {
2689
+ "mode": {
2690
+ "type": "string",
2691
+ "enum": [
2692
+ "component",
2693
+ "iframe"
2694
+ ]
2695
+ },
2696
+ "component": {
2697
+ "description": "`component`: the plugin preview.",
2698
+ "type": "string"
2699
+ }
2700
+ },
2701
+ "required": [
2702
+ "mode"
2703
+ ],
2704
+ "additionalProperties": {}
2705
+ }
2706
+ ]
2707
+ },
2708
+ "search": {
2709
+ "description": "Whether the resource is in the global search.",
2710
+ "type": "boolean"
2711
+ }
2712
+ },
2713
+ "additionalProperties": {}
2714
+ },
2715
+ "Resource": {
2716
+ "type": "object",
2717
+ "properties": {
2718
+ "id": {
2719
+ "type": "string",
2720
+ "minLength": 1
2721
+ },
2722
+ "label": {
2723
+ "type": "object",
2724
+ "properties": {
2725
+ "singular": {
2726
+ "type": "string"
2727
+ },
2728
+ "plural": {
2729
+ "type": "string"
2730
+ }
2731
+ },
2732
+ "required": [
2733
+ "singular",
2734
+ "plural"
2735
+ ],
2736
+ "additionalProperties": {}
2737
+ },
2738
+ "description": {
2739
+ "type": "string"
2740
+ },
2741
+ "icon": {
2742
+ "type": "string"
2743
+ },
2744
+ "itemTitle": {
2745
+ "description": "The field used as the title of an item, in lists and pickers.",
2746
+ "type": "string"
2747
+ },
2748
+ "fields": {
2749
+ "type": "array",
2750
+ "items": {
2751
+ "$ref": "#/components/schemas/Field"
2752
+ }
2753
+ },
2754
+ "form": {
2755
+ "type": "object",
2756
+ "properties": {
2757
+ "layout": {
2758
+ "type": "array",
2759
+ "items": {
2760
+ "$ref": "#/components/schemas/LayoutNode"
2761
+ }
2762
+ }
2763
+ },
2764
+ "additionalProperties": {}
2765
+ },
2766
+ "list": {
2767
+ "$ref": "#/components/schemas/ListDefinition"
2768
+ },
2769
+ "actions": {
2770
+ "type": "array",
2771
+ "items": {
2772
+ "$ref": "#/components/schemas/Action"
2773
+ }
2774
+ },
2775
+ "abilities": {
2776
+ "$ref": "#/components/schemas/Abilities"
2777
+ },
2778
+ "features": {
2779
+ "$ref": "#/components/schemas/ResourceFeatures"
2780
+ },
2781
+ "types": {
2782
+ "description": "Variants of the resource, each with its own extra fields.",
2783
+ "type": "array",
2784
+ "items": {
2785
+ "$ref": "#/components/schemas/BlockType"
2786
+ }
2787
+ },
2788
+ "settings": {
2789
+ "type": "object",
2790
+ "propertyNames": {
2791
+ "type": "string"
2792
+ },
2793
+ "additionalProperties": {}
2794
+ }
2795
+ },
2796
+ "required": [
2797
+ "id",
2798
+ "label",
2799
+ "fields"
2800
+ ],
2801
+ "additionalProperties": {},
2802
+ "description": "A set of items managed in the admin."
2803
+ },
2804
+ "User": {
2805
+ "type": "object",
2806
+ "properties": {
2807
+ "id": {
2808
+ "$ref": "#/components/schemas/Id"
2809
+ },
2810
+ "name": {
2811
+ "type": "string"
2812
+ },
2813
+ "email": {
2814
+ "type": "string"
2815
+ },
2816
+ "avatarUrl": {
2817
+ "type": "string"
2818
+ },
2819
+ "abilities": {
2820
+ "$ref": "#/components/schemas/Abilities"
2821
+ }
2822
+ },
2823
+ "required": [
2824
+ "id",
2825
+ "name"
2826
+ ],
2827
+ "additionalProperties": {}
2828
+ },
2829
+ "AuthProvider": {
2830
+ "type": "object",
2831
+ "properties": {
2832
+ "id": {
2833
+ "type": "string",
2834
+ "minLength": 1
2835
+ },
2836
+ "label": {
2837
+ "type": "string"
2838
+ },
2839
+ "url": {
2840
+ "description": "Where the login with this provider starts.",
2841
+ "type": "string"
2842
+ },
2843
+ "icon": {
2844
+ "type": "string"
2845
+ }
2846
+ },
2847
+ "required": [
2848
+ "id",
2849
+ "label"
2850
+ ],
2851
+ "additionalProperties": {}
2852
+ },
2853
+ "Auth": {
2854
+ "type": "object",
2855
+ "properties": {
2856
+ "mode": {
2857
+ "type": "string",
2858
+ "enum": [
2859
+ "panneau",
2860
+ "external"
2861
+ ],
2862
+ "description": "`panneau`: Panneau's own login pages. `external`: the site handles login."
2863
+ },
2864
+ "loginUrl": {
2865
+ "description": "`external`: where unauthenticated users are sent.",
2866
+ "type": [
2867
+ "string",
2868
+ "null"
2869
+ ]
2870
+ },
2871
+ "password": {
2872
+ "type": "boolean"
2873
+ },
2874
+ "providers": {
2875
+ "type": "array",
2876
+ "items": {
2877
+ "$ref": "#/components/schemas/AuthProvider"
2878
+ }
2879
+ },
2880
+ "passwordReset": {
2881
+ "type": "boolean"
2882
+ },
2883
+ "twoFactor": {
2884
+ "type": "boolean"
2885
+ },
2886
+ "passkeys": {
2887
+ "type": "boolean"
2888
+ },
2889
+ "emailVerification": {
2890
+ "type": "boolean"
2891
+ }
2892
+ },
2893
+ "required": [
2894
+ "mode"
2895
+ ],
2896
+ "additionalProperties": {}
2897
+ },
2898
+ "MenuItem": {
2899
+ "type": "object",
2900
+ "properties": {
2901
+ "type": {
2902
+ "type": "string",
2903
+ "minLength": 1,
2904
+ "description": "Built-in: `resources`, `resource`, `page`, `link`, `separator`, `group`."
2905
+ },
2906
+ "label": {
2907
+ "type": "string"
2908
+ },
2909
+ "icon": {
2910
+ "type": "string"
2911
+ },
2912
+ "resource": {
2913
+ "type": "string"
2914
+ },
2915
+ "page": {
2916
+ "type": "string"
2917
+ },
2918
+ "url": {
2919
+ "type": "string"
2920
+ },
2921
+ "external": {
2922
+ "type": "boolean"
2923
+ },
2924
+ "children": {
2925
+ "type": "array",
2926
+ "items": {
2927
+ "$ref": "#/components/schemas/MenuItem"
2928
+ }
2929
+ }
2930
+ },
2931
+ "required": [
2932
+ "type"
2933
+ ],
2934
+ "additionalProperties": {},
2935
+ "description": "An entry of a menu."
2936
+ },
2937
+ "Page": {
2938
+ "type": "object",
2939
+ "properties": {
2940
+ "component": {
2941
+ "type": "string",
2942
+ "minLength": 1,
2943
+ "description": "A page provided by a plugin, or a built-in page."
2944
+ },
2945
+ "path": {
2946
+ "description": "Path of a custom page.",
2947
+ "type": "string"
2948
+ },
2949
+ "label": {
2950
+ "type": "string"
2951
+ },
2952
+ "props": {
2953
+ "type": "object",
2954
+ "propertyNames": {
2955
+ "type": "string"
2956
+ },
2957
+ "additionalProperties": {}
2958
+ }
2959
+ },
2960
+ "required": [
2961
+ "component"
2962
+ ],
2963
+ "additionalProperties": {}
2964
+ },
2965
+ "Widget": {
2966
+ "type": "object",
2967
+ "properties": {
2968
+ "id": {
2969
+ "type": "string",
2970
+ "minLength": 1
2971
+ },
2972
+ "type": {
2973
+ "type": "string",
2974
+ "minLength": 1,
2975
+ "description": "Built-in: `stat`, `chart`, `recent-items`, `shortcuts`, `welcome`."
2976
+ },
2977
+ "label": {
2978
+ "type": "string"
2979
+ },
2980
+ "width": {
2981
+ "type": "integer",
2982
+ "minimum": 1,
2983
+ "maximum": 12
2984
+ },
2985
+ "settings": {
2986
+ "type": "object",
2987
+ "propertyNames": {
2988
+ "type": "string"
2989
+ },
2990
+ "additionalProperties": {}
2991
+ }
2992
+ },
2993
+ "required": [
2994
+ "id",
2995
+ "type"
2996
+ ],
2997
+ "additionalProperties": {}
2998
+ },
2999
+ "Uploads": {
3000
+ "type": "object",
3001
+ "properties": {
3002
+ "mode": {
3003
+ "type": "string",
3004
+ "enum": [
3005
+ "multipart",
3006
+ "tus",
3007
+ "presigned"
3008
+ ]
3009
+ },
3010
+ "endpoint": {
3011
+ "type": "string"
3012
+ },
3013
+ "maxSize": {
3014
+ "type": "integer",
3015
+ "exclusiveMinimum": 0,
3016
+ "maximum": 9007199254740991
3017
+ }
3018
+ },
3019
+ "required": [
3020
+ "mode"
3021
+ ],
3022
+ "additionalProperties": {}
3023
+ },
3024
+ "Definition": {
3025
+ "type": "object",
3026
+ "properties": {
3027
+ "protocol": {
3028
+ "type": "number",
3029
+ "const": 1
3030
+ },
3031
+ "name": {
3032
+ "type": "string"
3033
+ },
3034
+ "locale": {
3035
+ "type": "string",
3036
+ "minLength": 2,
3037
+ "description": "BCP 47 locale of the labels and messages."
3038
+ },
3039
+ "locales": {
3040
+ "minItems": 1,
3041
+ "type": "array",
3042
+ "items": {
3043
+ "type": "string",
3044
+ "minLength": 2
3045
+ },
3046
+ "description": "Locales of localized content fields."
3047
+ },
3048
+ "api": {
3049
+ "type": "object",
3050
+ "properties": {
3051
+ "baseUrl": {
3052
+ "type": "string"
3053
+ }
3054
+ },
3055
+ "required": [
3056
+ "baseUrl"
3057
+ ],
3058
+ "additionalProperties": {}
3059
+ },
3060
+ "resources": {
3061
+ "type": "array",
3062
+ "items": {
3063
+ "$ref": "#/components/schemas/Resource"
3064
+ }
3065
+ },
3066
+ "pages": {
3067
+ "type": "object",
3068
+ "propertyNames": {
3069
+ "type": "string"
3070
+ },
3071
+ "additionalProperties": {
3072
+ "$ref": "#/components/schemas/Page"
3073
+ }
3074
+ },
3075
+ "menus": {
3076
+ "type": "object",
3077
+ "propertyNames": {
3078
+ "type": "string"
3079
+ },
3080
+ "additionalProperties": {
3081
+ "type": "array",
3082
+ "items": {
3083
+ "$ref": "#/components/schemas/MenuItem"
3084
+ }
3085
+ }
3086
+ },
3087
+ "routes": {
3088
+ "description": "Named paths of the frontend, for `link` actions and redirects.",
3089
+ "type": "object",
3090
+ "propertyNames": {
3091
+ "type": "string"
3092
+ },
3093
+ "additionalProperties": {
3094
+ "type": "string"
3095
+ }
3096
+ },
3097
+ "auth": {
3098
+ "$ref": "#/components/schemas/Auth"
3099
+ },
3100
+ "dashboard": {
3101
+ "type": "object",
3102
+ "properties": {
3103
+ "widgets": {
3104
+ "type": "array",
3105
+ "items": {
3106
+ "$ref": "#/components/schemas/Widget"
3107
+ }
3108
+ }
3109
+ },
3110
+ "required": [
3111
+ "widgets"
3112
+ ],
3113
+ "additionalProperties": {}
3114
+ },
3115
+ "search": {
3116
+ "type": "object",
3117
+ "properties": {
3118
+ "enabled": {
3119
+ "type": "boolean"
3120
+ }
3121
+ },
3122
+ "required": [
3123
+ "enabled"
3124
+ ],
3125
+ "additionalProperties": {}
3126
+ },
3127
+ "uploads": {
3128
+ "$ref": "#/components/schemas/Uploads"
3129
+ },
3130
+ "theme": {
3131
+ "type": "object",
3132
+ "properties": {
3133
+ "colorScheme": {
3134
+ "type": "string",
3135
+ "enum": [
3136
+ "light",
3137
+ "dark",
3138
+ "auto"
3139
+ ]
3140
+ }
3141
+ },
3142
+ "additionalProperties": {}
3143
+ },
3144
+ "user": {
3145
+ "anyOf": [
3146
+ {
3147
+ "$ref": "#/components/schemas/User"
3148
+ },
3149
+ {
3150
+ "type": "null"
3151
+ }
3152
+ ]
3153
+ }
3154
+ },
3155
+ "required": [
3156
+ "protocol",
3157
+ "name",
3158
+ "locale",
3159
+ "locales",
3160
+ "api",
3161
+ "resources"
3162
+ ],
3163
+ "additionalProperties": {},
3164
+ "description": "Everything a frontend needs to render the admin for the current user."
3165
+ },
3166
+ "Item": {
3167
+ "type": "object",
3168
+ "properties": {
3169
+ "id": {
3170
+ "$ref": "#/components/schemas/Id"
3171
+ },
3172
+ "version": {
3173
+ "description": "Changes on every update. `null` when the backend has no versions.",
3174
+ "type": [
3175
+ "string",
3176
+ "null"
3177
+ ]
3178
+ },
3179
+ "abilities": {
3180
+ "$ref": "#/components/schemas/Abilities"
3181
+ }
3182
+ },
3183
+ "required": [
3184
+ "id",
3185
+ "version",
3186
+ "abilities"
3187
+ ],
3188
+ "additionalProperties": {},
3189
+ "description": "An item of a resource. Its other properties are the values of its fields."
3190
+ },
3191
+ "Pagination": {
3192
+ "type": "object",
3193
+ "properties": {
3194
+ "page": {
3195
+ "type": "integer",
3196
+ "exclusiveMinimum": 0,
3197
+ "maximum": 9007199254740991
3198
+ },
3199
+ "perPage": {
3200
+ "type": "integer",
3201
+ "exclusiveMinimum": 0,
3202
+ "maximum": 9007199254740991
3203
+ },
3204
+ "total": {
3205
+ "type": "integer",
3206
+ "minimum": 0,
3207
+ "maximum": 9007199254740991
3208
+ },
3209
+ "lastPage": {
3210
+ "type": "integer",
3211
+ "exclusiveMinimum": 0,
3212
+ "maximum": 9007199254740991
3213
+ }
3214
+ },
3215
+ "required": [
3216
+ "page",
3217
+ "perPage",
3218
+ "total",
3219
+ "lastPage"
3220
+ ],
3221
+ "additionalProperties": {}
3222
+ },
3223
+ "ItemResponse": {
3224
+ "type": "object",
3225
+ "properties": {
3226
+ "data": {
3227
+ "$ref": "#/components/schemas/Item"
3228
+ }
3229
+ },
3230
+ "required": [
3231
+ "data"
3232
+ ],
3233
+ "additionalProperties": {}
3234
+ },
3235
+ "ListResponse": {
3236
+ "type": "object",
3237
+ "properties": {
3238
+ "data": {
3239
+ "type": "array",
3240
+ "items": {
3241
+ "$ref": "#/components/schemas/Item"
3242
+ }
3243
+ },
3244
+ "meta": {
3245
+ "$ref": "#/components/schemas/Pagination"
3246
+ }
3247
+ },
3248
+ "required": [
3249
+ "data",
3250
+ "meta"
3251
+ ],
3252
+ "additionalProperties": {}
3253
+ },
3254
+ "Problem": {
3255
+ "type": "object",
3256
+ "properties": {
3257
+ "type": {
3258
+ "type": "string",
3259
+ "description": "A URI reference that identifies the problem type."
3260
+ },
3261
+ "title": {
3262
+ "type": "string"
3263
+ },
3264
+ "status": {
3265
+ "type": "integer",
3266
+ "minimum": 400,
3267
+ "maximum": 599
3268
+ },
3269
+ "detail": {
3270
+ "type": "string"
3271
+ },
3272
+ "instance": {
3273
+ "type": "string"
3274
+ },
3275
+ "errors": {
3276
+ "description": "`422`: messages keyed by the dot path of the invalid value.",
3277
+ "type": "object",
3278
+ "propertyNames": {
3279
+ "type": "string"
3280
+ },
3281
+ "additionalProperties": {
3282
+ "type": "array",
3283
+ "items": {
3284
+ "type": "string"
3285
+ }
3286
+ }
3287
+ },
3288
+ "current": {
3289
+ "description": "`412`: the current version of the item.",
3290
+ "$ref": "#/components/schemas/Item"
3291
+ }
3292
+ },
3293
+ "required": [
3294
+ "type",
3295
+ "title",
3296
+ "status"
3297
+ ],
3298
+ "additionalProperties": {},
3299
+ "description": "An error, as RFC 9457 problem details (`application/problem+json`)."
3300
+ },
3301
+ "Selection": {
3302
+ "anyOf": [
3303
+ {
3304
+ "type": "object",
3305
+ "properties": {
3306
+ "ids": {
3307
+ "minItems": 1,
3308
+ "type": "array",
3309
+ "items": {
3310
+ "$ref": "#/components/schemas/Id"
3311
+ }
3312
+ }
3313
+ },
3314
+ "required": [
3315
+ "ids"
3316
+ ],
3317
+ "additionalProperties": {}
3318
+ },
3319
+ {
3320
+ "type": "object",
3321
+ "properties": {
3322
+ "query": {
3323
+ "type": "object",
3324
+ "properties": {
3325
+ "filter": {
3326
+ "type": "object",
3327
+ "propertyNames": {
3328
+ "type": "string"
3329
+ },
3330
+ "additionalProperties": {}
3331
+ },
3332
+ "q": {
3333
+ "type": "string"
3334
+ }
3335
+ },
3336
+ "additionalProperties": {}
3337
+ },
3338
+ "except": {
3339
+ "type": "array",
3340
+ "items": {
3341
+ "$ref": "#/components/schemas/Id"
3342
+ }
3343
+ }
3344
+ },
3345
+ "required": [
3346
+ "query"
3347
+ ],
3348
+ "additionalProperties": {}
3349
+ }
3350
+ ]
3351
+ },
3352
+ "ActionRequest": {
3353
+ "type": "object",
3354
+ "properties": {
3355
+ "selection": {
3356
+ "description": "Omitted for actions on the whole resource.",
3357
+ "$ref": "#/components/schemas/Selection"
3358
+ },
3359
+ "values": {
3360
+ "type": "object",
3361
+ "propertyNames": {
3362
+ "type": "string"
3363
+ },
3364
+ "additionalProperties": {}
3365
+ }
3366
+ },
3367
+ "additionalProperties": {}
3368
+ },
3369
+ "ActionItemResult": {
3370
+ "type": "object",
3371
+ "properties": {
3372
+ "id": {
3373
+ "$ref": "#/components/schemas/Id"
3374
+ },
3375
+ "status": {
3376
+ "type": "string",
3377
+ "enum": [
3378
+ "failed",
3379
+ "skipped"
3380
+ ]
3381
+ },
3382
+ "message": {
3383
+ "type": "string"
3384
+ },
3385
+ "reason": {
3386
+ "description": "`skipped`: `forbidden`, `not_found` or `unchanged`.",
3387
+ "type": "string"
3388
+ }
3389
+ },
3390
+ "required": [
3391
+ "id",
3392
+ "status"
3393
+ ],
3394
+ "additionalProperties": {}
3395
+ },
3396
+ "ActionResult": {
3397
+ "type": "object",
3398
+ "properties": {
3399
+ "message": {
3400
+ "type": "string"
3401
+ },
3402
+ "summary": {
3403
+ "type": "object",
3404
+ "properties": {
3405
+ "succeeded": {
3406
+ "type": "integer",
3407
+ "minimum": 0,
3408
+ "maximum": 9007199254740991
3409
+ },
3410
+ "failed": {
3411
+ "type": "integer",
3412
+ "minimum": 0,
3413
+ "maximum": 9007199254740991
3414
+ },
3415
+ "skipped": {
3416
+ "type": "integer",
3417
+ "minimum": 0,
3418
+ "maximum": 9007199254740991
3419
+ }
3420
+ },
3421
+ "required": [
3422
+ "succeeded",
3423
+ "failed",
3424
+ "skipped"
3425
+ ],
3426
+ "additionalProperties": {}
3427
+ },
3428
+ "results": {
3429
+ "description": "The items that did not succeed.",
3430
+ "type": "array",
3431
+ "items": {
3432
+ "$ref": "#/components/schemas/ActionItemResult"
3433
+ }
3434
+ },
3435
+ "refresh": {
3436
+ "type": "string",
3437
+ "enum": [
3438
+ "none",
3439
+ "items",
3440
+ "list"
3441
+ ]
3442
+ },
3443
+ "redirect": {
3444
+ "anyOf": [
3445
+ {
3446
+ "anyOf": [
3447
+ {
3448
+ "type": "string"
3449
+ },
3450
+ {
3451
+ "$ref": "#/components/schemas/RouteReference"
3452
+ }
3453
+ ]
3454
+ },
3455
+ {
3456
+ "type": "null"
3457
+ }
3458
+ ]
3459
+ },
3460
+ "download": {
3461
+ "anyOf": [
3462
+ {
3463
+ "type": "object",
3464
+ "properties": {
3465
+ "url": {
3466
+ "type": "string"
3467
+ },
3468
+ "filename": {
3469
+ "type": "string"
3470
+ },
3471
+ "expiresAt": {
3472
+ "type": "string"
3473
+ }
3474
+ },
3475
+ "required": [
3476
+ "url"
3477
+ ],
3478
+ "additionalProperties": {}
3479
+ },
3480
+ {
3481
+ "type": "null"
3482
+ }
3483
+ ]
3484
+ }
3485
+ },
3486
+ "additionalProperties": {}
3487
+ },
3488
+ "ActionRun": {
3489
+ "type": "object",
3490
+ "properties": {
3491
+ "id": {
3492
+ "$ref": "#/components/schemas/Id"
3493
+ },
3494
+ "action": {
3495
+ "type": "string"
3496
+ },
3497
+ "resource": {
3498
+ "type": "string"
3499
+ },
3500
+ "status": {
3501
+ "type": "string",
3502
+ "enum": [
3503
+ "queued",
3504
+ "running",
3505
+ "succeeded",
3506
+ "partial",
3507
+ "failed",
3508
+ "cancelled"
3509
+ ]
3510
+ },
3511
+ "progress": {
3512
+ "type": "integer",
3513
+ "minimum": 0,
3514
+ "maximum": 9007199254740991
3515
+ },
3516
+ "total": {
3517
+ "anyOf": [
3518
+ {
3519
+ "type": "integer",
3520
+ "minimum": 0,
3521
+ "maximum": 9007199254740991
3522
+ },
3523
+ {
3524
+ "type": "null"
3525
+ }
3526
+ ]
3527
+ },
3528
+ "result": {
3529
+ "description": "Set once the run has finished.",
3530
+ "$ref": "#/components/schemas/ActionResult"
3531
+ },
3532
+ "createdAt": {
3533
+ "type": "string"
3534
+ },
3535
+ "finishedAt": {
3536
+ "type": [
3537
+ "string",
3538
+ "null"
3539
+ ]
3540
+ }
3541
+ },
3542
+ "required": [
3543
+ "id",
3544
+ "action",
3545
+ "resource",
3546
+ "status",
3547
+ "progress",
3548
+ "total"
3549
+ ],
3550
+ "additionalProperties": {}
3551
+ },
3552
+ "ActionRunResponse": {
3553
+ "type": "object",
3554
+ "properties": {
3555
+ "run": {
3556
+ "$ref": "#/components/schemas/ActionRun"
3557
+ }
3558
+ },
3559
+ "required": [
3560
+ "run"
3561
+ ],
3562
+ "additionalProperties": {}
3563
+ },
3564
+ "MediaTransform": {
3565
+ "type": "object",
3566
+ "properties": {
3567
+ "crop": {
3568
+ "description": "In pixels of the original image.",
3569
+ "type": "object",
3570
+ "properties": {
3571
+ "x": {
3572
+ "type": "number"
3573
+ },
3574
+ "y": {
3575
+ "type": "number"
3576
+ },
3577
+ "width": {
3578
+ "type": "number"
3579
+ },
3580
+ "height": {
3581
+ "type": "number"
3582
+ }
3583
+ },
3584
+ "required": [
3585
+ "x",
3586
+ "y",
3587
+ "width",
3588
+ "height"
3589
+ ],
3590
+ "additionalProperties": {}
3591
+ },
3592
+ "rotate": {
3593
+ "anyOf": [
3594
+ {
3595
+ "type": "number",
3596
+ "const": 0
3597
+ },
3598
+ {
3599
+ "type": "number",
3600
+ "const": 90
3601
+ },
3602
+ {
3603
+ "type": "number",
3604
+ "const": 180
3605
+ },
3606
+ {
3607
+ "type": "number",
3608
+ "const": 270
3609
+ }
3610
+ ]
3611
+ },
3612
+ "flipX": {
3613
+ "type": "boolean"
3614
+ },
3615
+ "flipY": {
3616
+ "type": "boolean"
3617
+ },
3618
+ "focalPoint": {
3619
+ "description": "Relative to the width and height, from 0 to 1.",
3620
+ "type": "object",
3621
+ "properties": {
3622
+ "x": {
3623
+ "type": "number",
3624
+ "minimum": 0,
3625
+ "maximum": 1
3626
+ },
3627
+ "y": {
3628
+ "type": "number",
3629
+ "minimum": 0,
3630
+ "maximum": 1
3631
+ }
3632
+ },
3633
+ "required": [
3634
+ "x",
3635
+ "y"
3636
+ ],
3637
+ "additionalProperties": {}
3638
+ }
3639
+ },
3640
+ "additionalProperties": {}
3641
+ },
3642
+ "Media": {
3643
+ "type": "object",
3644
+ "properties": {
3645
+ "id": {
3646
+ "$ref": "#/components/schemas/Id"
3647
+ },
3648
+ "version": {
3649
+ "description": "Changes on every update. `null` when the backend has no versions.",
3650
+ "type": [
3651
+ "string",
3652
+ "null"
3653
+ ]
3654
+ },
3655
+ "abilities": {
3656
+ "$ref": "#/components/schemas/Abilities"
3657
+ },
3658
+ "type": {
3659
+ "type": "string",
3660
+ "description": "`image`, `video`, `audio`, `document`, `font`, or another type."
3661
+ },
3662
+ "name": {
3663
+ "type": "string"
3664
+ },
3665
+ "mime": {
3666
+ "type": "string"
3667
+ },
3668
+ "size": {
3669
+ "type": "integer",
3670
+ "minimum": 0,
3671
+ "maximum": 9007199254740991
3672
+ },
3673
+ "url": {
3674
+ "type": "string"
3675
+ },
3676
+ "thumbnailUrl": {
3677
+ "type": [
3678
+ "string",
3679
+ "null"
3680
+ ]
3681
+ },
3682
+ "variants": {
3683
+ "type": "object",
3684
+ "propertyNames": {
3685
+ "type": "string"
3686
+ },
3687
+ "additionalProperties": {
3688
+ "type": "object",
3689
+ "properties": {
3690
+ "url": {
3691
+ "type": "string"
3692
+ },
3693
+ "width": {
3694
+ "type": "number"
3695
+ },
3696
+ "height": {
3697
+ "type": "number"
3698
+ }
3699
+ },
3700
+ "required": [
3701
+ "url"
3702
+ ],
3703
+ "additionalProperties": {}
3704
+ }
3705
+ },
3706
+ "metadata": {
3707
+ "type": "object",
3708
+ "propertyNames": {
3709
+ "type": "string"
3710
+ },
3711
+ "additionalProperties": {}
3712
+ },
3713
+ "transform": {
3714
+ "anyOf": [
3715
+ {
3716
+ "$ref": "#/components/schemas/MediaTransform"
3717
+ },
3718
+ {
3719
+ "type": "null"
3720
+ }
3721
+ ]
3722
+ },
3723
+ "tags": {
3724
+ "type": "array",
3725
+ "items": {
3726
+ "type": "string"
3727
+ }
3728
+ }
3729
+ },
3730
+ "required": [
3731
+ "id",
3732
+ "version",
3733
+ "abilities",
3734
+ "type",
3735
+ "name",
3736
+ "mime",
3737
+ "size",
3738
+ "url"
3739
+ ],
3740
+ "additionalProperties": {}
3741
+ },
3742
+ "MediaResponse": {
3743
+ "type": "object",
3744
+ "properties": {
3745
+ "data": {
3746
+ "$ref": "#/components/schemas/Media"
3747
+ }
3748
+ },
3749
+ "required": [
3750
+ "data"
3751
+ ],
3752
+ "additionalProperties": {}
3753
+ },
3754
+ "MediaListResponse": {
3755
+ "type": "object",
3756
+ "properties": {
3757
+ "data": {
3758
+ "type": "array",
3759
+ "items": {
3760
+ "$ref": "#/components/schemas/Media"
3761
+ }
3762
+ },
3763
+ "meta": {
3764
+ "$ref": "#/components/schemas/Pagination"
3765
+ }
3766
+ },
3767
+ "required": [
3768
+ "data",
3769
+ "meta"
3770
+ ],
3771
+ "additionalProperties": {}
3772
+ },
3773
+ "Session": {
3774
+ "type": "object",
3775
+ "properties": {
3776
+ "user": {
3777
+ "$ref": "#/components/schemas/User"
3778
+ }
3779
+ },
3780
+ "required": [
3781
+ "user"
3782
+ ],
3783
+ "additionalProperties": {}
3784
+ },
3785
+ "SearchResponse": {
3786
+ "type": "object",
3787
+ "properties": {
3788
+ "data": {
3789
+ "type": "array",
3790
+ "items": {
3791
+ "type": "object",
3792
+ "properties": {
3793
+ "resource": {
3794
+ "type": "string"
3795
+ },
3796
+ "items": {
3797
+ "type": "array",
3798
+ "items": {
3799
+ "$ref": "#/components/schemas/Item"
3800
+ }
3801
+ },
3802
+ "total": {
3803
+ "type": "integer",
3804
+ "minimum": 0,
3805
+ "maximum": 9007199254740991
3806
+ }
3807
+ },
3808
+ "required": [
3809
+ "resource",
3810
+ "items"
3811
+ ],
3812
+ "additionalProperties": {}
3813
+ }
3814
+ }
3815
+ },
3816
+ "required": [
3817
+ "data"
3818
+ ],
3819
+ "additionalProperties": {}
3820
+ },
3821
+ "PreviewResponse": {
3822
+ "type": "object",
3823
+ "properties": {
3824
+ "url": {
3825
+ "type": "string"
3826
+ },
3827
+ "expiresAt": {
3828
+ "type": "string"
3829
+ }
3830
+ },
3831
+ "required": [
3832
+ "url"
3833
+ ],
3834
+ "additionalProperties": {}
3835
+ }
3836
+ }
3837
+ }
3838
+ }