@panneau/protocol 5.0.0-alpha.3 → 5.0.0-alpha.5

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 (67) hide show
  1. package/dist/conformance/index.d.ts.map +1 -1
  2. package/dist/conformance/index.js +151 -1
  3. package/dist/conformance/index.js.map +1 -1
  4. package/dist/constants.d.ts +2 -2
  5. package/dist/constants.d.ts.map +1 -1
  6. package/dist/constants.js +3 -1
  7. package/dist/constants.js.map +1 -1
  8. package/dist/index.js +5 -2
  9. package/dist/libraries.d.ts +16 -0
  10. package/dist/libraries.d.ts.map +1 -0
  11. package/dist/libraries.js +15 -0
  12. package/dist/libraries.js.map +1 -0
  13. package/dist/lint.d.ts +2 -1
  14. package/dist/lint.d.ts.map +1 -1
  15. package/dist/lint.js +34 -2
  16. package/dist/lint.js.map +1 -1
  17. package/dist/mock/example.d.ts +2 -1
  18. package/dist/mock/example.d.ts.map +1 -1
  19. package/dist/mock/example.js +227 -143
  20. package/dist/mock/example.js.map +1 -1
  21. package/dist/mock/index.d.ts +9 -1
  22. package/dist/mock/index.d.ts.map +1 -1
  23. package/dist/mock/index.js +257 -11
  24. package/dist/mock/index.js.map +1 -1
  25. package/dist/openapi.d.ts.map +1 -1
  26. package/dist/openapi.js +55 -101
  27. package/dist/openapi.js.map +1 -1
  28. package/dist/rules.d.ts.map +1 -1
  29. package/dist/rules.js +17 -0
  30. package/dist/rules.js.map +1 -1
  31. package/dist/runtime/index.d.ts +3 -0
  32. package/dist/runtime/index.d.ts.map +1 -1
  33. package/dist/runtime/index.js +4 -1
  34. package/dist/schemas/action.d.ts +17 -1
  35. package/dist/schemas/action.d.ts.map +1 -1
  36. package/dist/schemas/api.d.ts +155 -37
  37. package/dist/schemas/api.d.ts.map +1 -1
  38. package/dist/schemas/api.js +89 -28
  39. package/dist/schemas/api.js.map +1 -1
  40. package/dist/schemas/definition.d.ts +39 -2
  41. package/dist/schemas/definition.d.ts.map +1 -1
  42. package/dist/schemas/definition.js +4 -3
  43. package/dist/schemas/definition.js.map +1 -1
  44. package/dist/schemas/field.d.ts +24 -1
  45. package/dist/schemas/field.d.ts.map +1 -1
  46. package/dist/schemas/field.js +22 -4
  47. package/dist/schemas/field.js.map +1 -1
  48. package/dist/schemas/index.d.ts +262 -40
  49. package/dist/schemas/index.d.ts.map +1 -1
  50. package/dist/schemas/index.js +13 -5
  51. package/dist/schemas/index.js.map +1 -1
  52. package/dist/schemas/resource.d.ts +37 -2
  53. package/dist/schemas/resource.d.ts.map +1 -1
  54. package/dist/schemas/resource.js +4 -1
  55. package/dist/schemas/resource.js.map +1 -1
  56. package/dist/search.d.ts +51 -0
  57. package/dist/search.d.ts.map +1 -0
  58. package/dist/search.js +53 -0
  59. package/dist/search.js.map +1 -0
  60. package/dist/transforms.d.ts +17 -0
  61. package/dist/transforms.d.ts.map +1 -0
  62. package/dist/transforms.js +34 -0
  63. package/dist/transforms.js.map +1 -0
  64. package/package.json +1 -1
  65. package/schema/boot.schema.json +84 -1
  66. package/schema/definition.schema.json +84 -1
  67. package/schema/openapi.json +771 -605
@@ -686,6 +686,94 @@
686
686
  }
687
687
  }
688
688
  },
689
+ "/resources/{resource}/fields/{field}/check": {
690
+ "parameters": [
691
+ {
692
+ "name": "resource",
693
+ "in": "path",
694
+ "required": true,
695
+ "description": "Resource id.",
696
+ "schema": {
697
+ "type": "string"
698
+ }
699
+ },
700
+ {
701
+ "name": "field",
702
+ "in": "path",
703
+ "required": true,
704
+ "description": "Name of a field with `check`.",
705
+ "schema": {
706
+ "type": "string"
707
+ }
708
+ }
709
+ ],
710
+ "post": {
711
+ "operationId": "checkField",
712
+ "summary": "Checks a value as it is typed: whether a slug is available, and its URL. With the permission to create, or to update the item `id`.",
713
+ "requestBody": {
714
+ "required": true,
715
+ "content": {
716
+ "application/json": {
717
+ "schema": {
718
+ "$ref": "#/components/schemas/FieldCheckRequest"
719
+ }
720
+ }
721
+ }
722
+ },
723
+ "responses": {
724
+ "200": {
725
+ "description": "What the backend says about the value.",
726
+ "content": {
727
+ "application/json": {
728
+ "schema": {
729
+ "$ref": "#/components/schemas/FieldCheckResponse"
730
+ }
731
+ }
732
+ }
733
+ },
734
+ "401": {
735
+ "description": "Not authenticated.",
736
+ "content": {
737
+ "application/problem+json": {
738
+ "schema": {
739
+ "$ref": "#/components/schemas/Problem"
740
+ }
741
+ }
742
+ }
743
+ },
744
+ "403": {
745
+ "description": "Not allowed.",
746
+ "content": {
747
+ "application/problem+json": {
748
+ "schema": {
749
+ "$ref": "#/components/schemas/Problem"
750
+ }
751
+ }
752
+ }
753
+ },
754
+ "404": {
755
+ "description": "Not found.",
756
+ "content": {
757
+ "application/problem+json": {
758
+ "schema": {
759
+ "$ref": "#/components/schemas/Problem"
760
+ }
761
+ }
762
+ }
763
+ },
764
+ "422": {
765
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
766
+ "content": {
767
+ "application/problem+json": {
768
+ "schema": {
769
+ "$ref": "#/components/schemas/Problem"
770
+ }
771
+ }
772
+ }
773
+ }
774
+ }
775
+ }
776
+ },
689
777
  "/actions/runs": {
690
778
  "get": {
691
779
  "operationId": "listActionRuns",
@@ -831,77 +919,27 @@
831
919
  }
832
920
  }
833
921
  },
834
- "/media": {
835
- "get": {
836
- "operationId": "listMedia",
837
- "parameters": [
838
- {
839
- "name": "page",
840
- "in": "query",
841
- "required": false,
842
- "description": "Page number, from 1.",
843
- "schema": {
844
- "type": "integer",
845
- "minimum": 1
846
- }
847
- },
848
- {
849
- "name": "perPage",
850
- "in": "query",
851
- "required": false,
852
- "description": "Items per page.",
853
- "schema": {
854
- "type": "integer",
855
- "minimum": 1
856
- }
857
- },
858
- {
859
- "name": "sort",
860
- "in": "query",
861
- "required": false,
862
- "description": "Comma-separated fields; a `-` prefix sorts descending.",
863
- "schema": {
864
- "type": "string"
865
- }
866
- },
867
- {
868
- "name": "filter",
869
- "in": "query",
870
- "required": false,
871
- "style": "deepObject",
872
- "explode": true,
873
- "description": "`filter[status]=published`; `filter[tags][]=a&filter[tags][]=b` for any of several values; `filter[published_at][from]=2026-01-01&filter[published_at][to]=2026-01-31` for the inclusive bounds of a range filter (`date-range`), without the open end.",
874
- "schema": {
875
- "type": "object",
876
- "additionalProperties": true
877
- }
878
- },
879
- {
880
- "name": "q",
881
- "in": "query",
882
- "required": false,
883
- "description": "Search.",
884
- "schema": {
885
- "type": "string"
886
- }
887
- },
888
- {
889
- "name": "fields",
890
- "in": "query",
891
- "required": false,
892
- "description": "Comma-separated fields to include in each item.",
893
- "schema": {
894
- "type": "string"
922
+ "/uploads/sign": {
923
+ "post": {
924
+ "operationId": "signUpload",
925
+ "summary": "Signs a request of the browser's S3 client. The first request of a file creates its upload.",
926
+ "requestBody": {
927
+ "required": true,
928
+ "content": {
929
+ "application/json": {
930
+ "schema": {
931
+ "$ref": "#/components/schemas/UploadSignRequest"
932
+ }
895
933
  }
896
934
  }
897
- ],
935
+ },
898
936
  "responses": {
899
937
  "200": {
900
- "description": "A page of media.",
938
+ "description": "The presigned request.",
901
939
  "content": {
902
940
  "application/json": {
903
941
  "schema": {
904
- "$ref": "#/components/schemas/MediaListResponse"
942
+ "$ref": "#/components/schemas/UploadSignResponse"
905
943
  }
906
944
  }
907
945
  }
@@ -925,33 +963,55 @@
925
963
  }
926
964
  }
927
965
  }
966
+ },
967
+ "404": {
968
+ "description": "Not found.",
969
+ "content": {
970
+ "application/problem+json": {
971
+ "schema": {
972
+ "$ref": "#/components/schemas/Problem"
973
+ }
974
+ }
975
+ }
976
+ },
977
+ "422": {
978
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
979
+ "content": {
980
+ "application/problem+json": {
981
+ "schema": {
982
+ "$ref": "#/components/schemas/Problem"
983
+ }
984
+ }
985
+ }
928
986
  }
929
987
  }
930
- },
988
+ }
989
+ },
990
+ "/uploads/{upload}/complete": {
991
+ "parameters": [
992
+ {
993
+ "name": "upload",
994
+ "in": "path",
995
+ "required": true,
996
+ "description": "Upload id: `upl_…`.",
997
+ "schema": {
998
+ "type": "string"
999
+ }
1000
+ }
1001
+ ],
931
1002
  "post": {
932
- "operationId": "uploadMedia",
1003
+ "operationId": "completeUpload",
1004
+ "summary": "Once the browser completed the upload in storage, checks the object and gives the upload, which values reference.",
933
1005
  "requestBody": {
934
- "required": true,
1006
+ "required": false,
935
1007
  "content": {
936
- "multipart/form-data": {
1008
+ "application/json": {
937
1009
  "schema": {
938
1010
  "type": "object",
939
- "required": [
940
- "file"
941
- ],
942
1011
  "properties": {
943
- "file": {
944
- "type": "string",
945
- "contentMediaType": "application/octet-stream"
946
- },
947
1012
  "name": {
948
- "type": "string"
949
- },
950
- "tags": {
951
- "type": "array",
952
- "items": {
953
- "type": "string"
954
- }
1013
+ "type": "string",
1014
+ "description": "The file's name, which the key doesn't keep, since the backend chose it."
955
1015
  }
956
1016
  }
957
1017
  }
@@ -959,12 +1019,12 @@
959
1019
  }
960
1020
  },
961
1021
  "responses": {
962
- "201": {
963
- "description": "The created media.",
1022
+ "200": {
1023
+ "description": "The upload.",
964
1024
  "content": {
965
1025
  "application/json": {
966
1026
  "schema": {
967
- "$ref": "#/components/schemas/MediaResponse"
1027
+ "$ref": "#/components/schemas/UploadResponse"
968
1028
  }
969
1029
  }
970
1030
  }
@@ -989,46 +1049,8 @@
989
1049
  }
990
1050
  }
991
1051
  },
992
- "422": {
993
- "description": "Invalid values: messages are in `errors`, keyed by dot path.",
994
- "content": {
995
- "application/problem+json": {
996
- "schema": {
997
- "$ref": "#/components/schemas/Problem"
998
- }
999
- }
1000
- }
1001
- }
1002
- }
1003
- }
1004
- },
1005
- "/media/tags": {
1006
- "get": {
1007
- "operationId": "listMediaTags",
1008
- "responses": {
1009
- "200": {
1010
- "description": "Tags in use.",
1011
- "content": {
1012
- "application/json": {
1013
- "schema": {
1014
- "type": "object",
1015
- "required": [
1016
- "data"
1017
- ],
1018
- "properties": {
1019
- "data": {
1020
- "type": "array",
1021
- "items": {
1022
- "type": "string"
1023
- }
1024
- }
1025
- }
1026
- }
1027
- }
1028
- }
1029
- },
1030
- "401": {
1031
- "description": "Not authenticated.",
1052
+ "404": {
1053
+ "description": "Not found.",
1032
1054
  "content": {
1033
1055
  "application/problem+json": {
1034
1056
  "schema": {
@@ -1037,8 +1059,8 @@
1037
1059
  }
1038
1060
  }
1039
1061
  },
1040
- "403": {
1041
- "description": "Not allowed.",
1062
+ "422": {
1063
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1042
1064
  "content": {
1043
1065
  "application/problem+json": {
1044
1066
  "schema": {
@@ -1050,334 +1072,16 @@
1050
1072
  }
1051
1073
  }
1052
1074
  },
1053
- "/media/{id}": {
1054
- "parameters": [
1055
- {
1056
- "name": "id",
1057
- "in": "path",
1058
- "required": true,
1059
- "description": "Media id.",
1060
- "schema": {
1061
- "type": "string"
1062
- }
1063
- }
1064
- ],
1075
+ "/auth/session": {
1065
1076
  "get": {
1066
- "operationId": "getMedia",
1077
+ "operationId": "getSession",
1067
1078
  "responses": {
1068
1079
  "200": {
1069
- "description": "The media.",
1080
+ "description": "The current user.",
1070
1081
  "content": {
1071
1082
  "application/json": {
1072
1083
  "schema": {
1073
- "$ref": "#/components/schemas/MediaResponse"
1074
- }
1075
- }
1076
- }
1077
- },
1078
- "401": {
1079
- "description": "Not authenticated.",
1080
- "content": {
1081
- "application/problem+json": {
1082
- "schema": {
1083
- "$ref": "#/components/schemas/Problem"
1084
- }
1085
- }
1086
- }
1087
- },
1088
- "403": {
1089
- "description": "Not allowed.",
1090
- "content": {
1091
- "application/problem+json": {
1092
- "schema": {
1093
- "$ref": "#/components/schemas/Problem"
1094
- }
1095
- }
1096
- }
1097
- },
1098
- "404": {
1099
- "description": "Not found.",
1100
- "content": {
1101
- "application/problem+json": {
1102
- "schema": {
1103
- "$ref": "#/components/schemas/Problem"
1104
- }
1105
- }
1106
- }
1107
- }
1108
- }
1109
- },
1110
- "patch": {
1111
- "operationId": "updateMedia",
1112
- "description": "Updates metadata, tags or the image `transform`.",
1113
- "requestBody": {
1114
- "required": true,
1115
- "content": {
1116
- "application/json": {
1117
- "schema": {
1118
- "type": "object",
1119
- "additionalProperties": true
1120
- }
1121
- }
1122
- }
1123
- },
1124
- "responses": {
1125
- "200": {
1126
- "description": "The updated media.",
1127
- "content": {
1128
- "application/json": {
1129
- "schema": {
1130
- "$ref": "#/components/schemas/MediaResponse"
1131
- }
1132
- }
1133
- }
1134
- },
1135
- "401": {
1136
- "description": "Not authenticated.",
1137
- "content": {
1138
- "application/problem+json": {
1139
- "schema": {
1140
- "$ref": "#/components/schemas/Problem"
1141
- }
1142
- }
1143
- }
1144
- },
1145
- "403": {
1146
- "description": "Not allowed.",
1147
- "content": {
1148
- "application/problem+json": {
1149
- "schema": {
1150
- "$ref": "#/components/schemas/Problem"
1151
- }
1152
- }
1153
- }
1154
- },
1155
- "404": {
1156
- "description": "Not found.",
1157
- "content": {
1158
- "application/problem+json": {
1159
- "schema": {
1160
- "$ref": "#/components/schemas/Problem"
1161
- }
1162
- }
1163
- }
1164
- },
1165
- "422": {
1166
- "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1167
- "content": {
1168
- "application/problem+json": {
1169
- "schema": {
1170
- "$ref": "#/components/schemas/Problem"
1171
- }
1172
- }
1173
- }
1174
- }
1175
- }
1176
- },
1177
- "delete": {
1178
- "operationId": "deleteMedia",
1179
- "responses": {
1180
- "204": {
1181
- "description": "Moved to the trash."
1182
- },
1183
- "401": {
1184
- "description": "Not authenticated.",
1185
- "content": {
1186
- "application/problem+json": {
1187
- "schema": {
1188
- "$ref": "#/components/schemas/Problem"
1189
- }
1190
- }
1191
- }
1192
- },
1193
- "403": {
1194
- "description": "Not allowed.",
1195
- "content": {
1196
- "application/problem+json": {
1197
- "schema": {
1198
- "$ref": "#/components/schemas/Problem"
1199
- }
1200
- }
1201
- }
1202
- },
1203
- "404": {
1204
- "description": "Not found.",
1205
- "content": {
1206
- "application/problem+json": {
1207
- "schema": {
1208
- "$ref": "#/components/schemas/Problem"
1209
- }
1210
- }
1211
- }
1212
- },
1213
- "409": {
1214
- "description": "Conflict with a business rule.",
1215
- "content": {
1216
- "application/problem+json": {
1217
- "schema": {
1218
- "$ref": "#/components/schemas/Problem"
1219
- }
1220
- }
1221
- }
1222
- }
1223
- }
1224
- }
1225
- },
1226
- "/media/{id}/file": {
1227
- "parameters": [
1228
- {
1229
- "name": "id",
1230
- "in": "path",
1231
- "required": true,
1232
- "description": "Media id.",
1233
- "schema": {
1234
- "type": "string"
1235
- }
1236
- }
1237
- ],
1238
- "post": {
1239
- "operationId": "replaceMediaFile",
1240
- "requestBody": {
1241
- "required": true,
1242
- "content": {
1243
- "multipart/form-data": {
1244
- "schema": {
1245
- "type": "object",
1246
- "required": [
1247
- "file"
1248
- ],
1249
- "properties": {
1250
- "file": {
1251
- "type": "string",
1252
- "contentMediaType": "application/octet-stream"
1253
- }
1254
- }
1255
- }
1256
- }
1257
- }
1258
- },
1259
- "responses": {
1260
- "200": {
1261
- "description": "The media.",
1262
- "content": {
1263
- "application/json": {
1264
- "schema": {
1265
- "$ref": "#/components/schemas/MediaResponse"
1266
- }
1267
- }
1268
- }
1269
- },
1270
- "401": {
1271
- "description": "Not authenticated.",
1272
- "content": {
1273
- "application/problem+json": {
1274
- "schema": {
1275
- "$ref": "#/components/schemas/Problem"
1276
- }
1277
- }
1278
- }
1279
- },
1280
- "403": {
1281
- "description": "Not allowed.",
1282
- "content": {
1283
- "application/problem+json": {
1284
- "schema": {
1285
- "$ref": "#/components/schemas/Problem"
1286
- }
1287
- }
1288
- }
1289
- },
1290
- "404": {
1291
- "description": "Not found.",
1292
- "content": {
1293
- "application/problem+json": {
1294
- "schema": {
1295
- "$ref": "#/components/schemas/Problem"
1296
- }
1297
- }
1298
- }
1299
- },
1300
- "422": {
1301
- "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1302
- "content": {
1303
- "application/problem+json": {
1304
- "schema": {
1305
- "$ref": "#/components/schemas/Problem"
1306
- }
1307
- }
1308
- }
1309
- }
1310
- }
1311
- }
1312
- },
1313
- "/media/{id}/restore": {
1314
- "parameters": [
1315
- {
1316
- "name": "id",
1317
- "in": "path",
1318
- "required": true,
1319
- "description": "Media id.",
1320
- "schema": {
1321
- "type": "string"
1322
- }
1323
- }
1324
- ],
1325
- "post": {
1326
- "operationId": "restoreMedia",
1327
- "responses": {
1328
- "200": {
1329
- "description": "The restored media.",
1330
- "content": {
1331
- "application/json": {
1332
- "schema": {
1333
- "$ref": "#/components/schemas/MediaResponse"
1334
- }
1335
- }
1336
- }
1337
- },
1338
- "401": {
1339
- "description": "Not authenticated.",
1340
- "content": {
1341
- "application/problem+json": {
1342
- "schema": {
1343
- "$ref": "#/components/schemas/Problem"
1344
- }
1345
- }
1346
- }
1347
- },
1348
- "403": {
1349
- "description": "Not allowed.",
1350
- "content": {
1351
- "application/problem+json": {
1352
- "schema": {
1353
- "$ref": "#/components/schemas/Problem"
1354
- }
1355
- }
1356
- }
1357
- },
1358
- "404": {
1359
- "description": "Not found.",
1360
- "content": {
1361
- "application/problem+json": {
1362
- "schema": {
1363
- "$ref": "#/components/schemas/Problem"
1364
- }
1365
- }
1366
- }
1367
- }
1368
- }
1369
- }
1370
- },
1371
- "/auth/session": {
1372
- "get": {
1373
- "operationId": "getSession",
1374
- "responses": {
1375
- "200": {
1376
- "description": "The current user.",
1377
- "content": {
1378
- "application/json": {
1379
- "schema": {
1380
- "$ref": "#/components/schemas/Session"
1084
+ "$ref": "#/components/schemas/Session"
1381
1085
  }
1382
1086
  }
1383
1087
  }
@@ -1797,7 +1501,30 @@
1797
1501
  "name": "q",
1798
1502
  "in": "query",
1799
1503
  "required": true,
1800
- "description": "Search terms.",
1504
+ "description": "Search terms, trimmed.",
1505
+ "schema": {
1506
+ "type": "string",
1507
+ "minLength": 2,
1508
+ "maxLength": 255
1509
+ }
1510
+ },
1511
+ {
1512
+ "name": "limit",
1513
+ "in": "query",
1514
+ "required": false,
1515
+ "description": "Items per resource.",
1516
+ "schema": {
1517
+ "type": "integer",
1518
+ "minimum": 1,
1519
+ "maximum": 20,
1520
+ "default": 5
1521
+ }
1522
+ },
1523
+ {
1524
+ "name": "resources",
1525
+ "in": "query",
1526
+ "required": false,
1527
+ "description": "Comma-separated ids of the searchable resources to search. Defaults to every one.",
1801
1528
  "schema": {
1802
1529
  "type": "string"
1803
1530
  }
@@ -1805,7 +1532,7 @@
1805
1532
  ],
1806
1533
  "responses": {
1807
1534
  "200": {
1808
- "description": "Results grouped by resource.",
1535
+ "description": "Results grouped by resource, in the order of the definition: at most `limit` items per resource, and 20 in all.",
1809
1536
  "content": {
1810
1537
  "application/json": {
1811
1538
  "schema": {
@@ -1823,6 +1550,26 @@
1823
1550
  }
1824
1551
  }
1825
1552
  }
1553
+ },
1554
+ "422": {
1555
+ "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1556
+ "content": {
1557
+ "application/problem+json": {
1558
+ "schema": {
1559
+ "$ref": "#/components/schemas/Problem"
1560
+ }
1561
+ }
1562
+ }
1563
+ },
1564
+ "429": {
1565
+ "description": "Too many requests: `Retry-After` gives the seconds to wait.",
1566
+ "content": {
1567
+ "application/problem+json": {
1568
+ "schema": {
1569
+ "$ref": "#/components/schemas/Problem"
1570
+ }
1571
+ }
1572
+ }
1826
1573
  }
1827
1574
  }
1828
1575
  }
@@ -2198,6 +1945,43 @@
2198
1945
  ],
2199
1946
  "additionalProperties": {}
2200
1947
  },
1948
+ {
1949
+ "type": "object",
1950
+ "properties": {
1951
+ "rule": {
1952
+ "type": "string",
1953
+ "const": "crop"
1954
+ },
1955
+ "value": {
1956
+ "type": "object",
1957
+ "properties": {
1958
+ "ratios": {
1959
+ "description": "A crop must have one of them: its height is within one pixel of its width divided by the ratio, after its rotation.",
1960
+ "type": "array",
1961
+ "items": {
1962
+ "type": "string",
1963
+ "pattern": "^[1-9][0-9]*:[1-9][0-9]*$",
1964
+ "description": "An aspect ratio, as `width:height`: `16:9`."
1965
+ }
1966
+ },
1967
+ "required": {
1968
+ "description": "Each image needs a crop for this use.",
1969
+ "type": "boolean"
1970
+ }
1971
+ },
1972
+ "additionalProperties": {}
1973
+ },
1974
+ "message": {
1975
+ "description": "Message shown when the rule fails, instead of the default one.",
1976
+ "type": "string"
1977
+ }
1978
+ },
1979
+ "required": [
1980
+ "rule",
1981
+ "value"
1982
+ ],
1983
+ "additionalProperties": {}
1984
+ },
2201
1985
  {
2202
1986
  "type": "object",
2203
1987
  "properties": {
@@ -2216,7 +2000,7 @@
2216
2000
  "description": "A rule added in a later version of the protocol. Clients that don't know it ignore it; the server still enforces it."
2217
2001
  }
2218
2002
  ],
2219
- "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."
2003
+ "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. `crop` checks the transform of each image of an `image` or `media` value (decision 0031)."
2220
2004
  },
2221
2005
  "BlockType": {
2222
2006
  "type": "object",
@@ -2280,41 +2064,84 @@
2280
2064
  "updateOnly": {
2281
2065
  "type": "boolean"
2282
2066
  },
2283
- "rules": {
2067
+ "rules": {
2068
+ "type": "array",
2069
+ "items": {
2070
+ "$ref": "#/components/schemas/Rule"
2071
+ }
2072
+ },
2073
+ "visibleWhen": {
2074
+ "$ref": "#/components/schemas/Condition"
2075
+ },
2076
+ "options": {
2077
+ "description": "`select`: the choices.",
2078
+ "type": "array",
2079
+ "items": {
2080
+ "$ref": "#/components/schemas/Option"
2081
+ }
2082
+ },
2083
+ "multiple": {
2084
+ "description": "`select`, `relation`, `media`, `image`, `file`: the value is an array.",
2085
+ "type": "boolean"
2086
+ },
2087
+ "resource": {
2088
+ "description": "`relation`: id of the related resource. `media`, `image`: id of a resource of kind `media`, or a list of them; without it, every library of the definition (decision 0027).",
2089
+ "anyOf": [
2090
+ {
2091
+ "type": "string",
2092
+ "minLength": 1
2093
+ },
2094
+ {
2095
+ "minItems": 1,
2096
+ "type": "array",
2097
+ "items": {
2098
+ "type": "string",
2099
+ "minLength": 1
2100
+ }
2101
+ }
2102
+ ]
2103
+ },
2104
+ "accept": {
2105
+ "description": "`media`, `image`, `file`: accepted MIME types. `image` defaults to `image/*`.",
2284
2106
  "type": "array",
2285
2107
  "items": {
2286
- "$ref": "#/components/schemas/Rule"
2108
+ "type": "string"
2287
2109
  }
2288
2110
  },
2289
- "visibleWhen": {
2290
- "$ref": "#/components/schemas/Condition"
2291
- },
2292
- "options": {
2293
- "description": "`select`: the choices.",
2111
+ "ratios": {
2112
+ "description": "`image`: ratios the editor suggests. The `crop` rule enforces ratios (decision 0031).",
2294
2113
  "type": "array",
2295
2114
  "items": {
2296
- "$ref": "#/components/schemas/Option"
2115
+ "type": "string",
2116
+ "pattern": "^[1-9][0-9]*:[1-9][0-9]*$",
2117
+ "description": "An aspect ratio, as `width:height`: `16:9`."
2297
2118
  }
2298
2119
  },
2299
- "multiple": {
2300
- "description": "`select`, `relation`, `media`: the value is an array.",
2120
+ "rotate": {
2121
+ "description": "`image`: whether the editor offers rotation and flips. Defaults to true.",
2301
2122
  "type": "boolean"
2302
2123
  },
2303
- "resource": {
2304
- "description": "`relation`: id of the related resource.",
2305
- "type": "string"
2124
+ "focalPoint": {
2125
+ "description": "`image`: whether the editor offers the focal point. Defaults to true.",
2126
+ "type": "boolean"
2306
2127
  },
2307
- "accept": {
2308
- "description": "`media`: accepted MIME types.",
2309
- "type": "array",
2310
- "items": {
2311
- "type": "string"
2312
- }
2128
+ "transformBase": {
2129
+ "description": "`image`: what a transform for one use starts from: the media's own transform (`media`, the default), the original file, or the user's choice in the editor (decision 0031).",
2130
+ "type": "string",
2131
+ "enum": [
2132
+ "media",
2133
+ "original",
2134
+ "choose"
2135
+ ]
2313
2136
  },
2314
2137
  "from": {
2315
2138
  "description": "`slug`: the field the slug is generated from.",
2316
2139
  "type": "string"
2317
2140
  },
2141
+ "check": {
2142
+ "description": "The client checks the value with the backend as it is typed, with `POST /resources/{resource}/fields/{field}/check`: whether a `slug` is available, and its URL. A field at the top of the resource only.",
2143
+ "type": "boolean"
2144
+ },
2318
2145
  "display": {
2319
2146
  "description": "Display used in lists, when it differs from the default one of the type.",
2320
2147
  "type": "string"
@@ -2720,7 +2547,7 @@
2720
2547
  ]
2721
2548
  },
2722
2549
  "search": {
2723
- "description": "Whether the resource is in the global search.",
2550
+ "description": "Whether the resource is in the global search. Defaults to whether its list has a search (`list.search`).",
2724
2551
  "type": "boolean"
2725
2552
  }
2726
2553
  },
@@ -2733,6 +2560,11 @@
2733
2560
  "type": "string",
2734
2561
  "minLength": 1
2735
2562
  },
2563
+ "kind": {
2564
+ "description": "What the resource is. `media`: a library of media (decision 0026), with a `file` field and a `media` on each item. Without it, an ordinary resource. Clients treat a kind they don't know as an ordinary resource.",
2565
+ "type": "string",
2566
+ "minLength": 1
2567
+ },
2736
2568
  "label": {
2737
2569
  "type": "object",
2738
2570
  "properties": {
@@ -2759,6 +2591,14 @@
2759
2591
  "description": "The field used as the title of an item, in lists and pickers.",
2760
2592
  "type": "string"
2761
2593
  },
2594
+ "itemSubtitle": {
2595
+ "description": "The field shown under the title of an item, in search results, cards and pickers.",
2596
+ "type": "string"
2597
+ },
2598
+ "itemImage": {
2599
+ "description": "The field that holds the image of an item (a media or a URL), in search results, cards and pickers.",
2600
+ "type": "string"
2601
+ },
2762
2602
  "fields": {
2763
2603
  "type": "array",
2764
2604
  "items": {
@@ -2832,6 +2672,10 @@
2832
2672
  },
2833
2673
  "abilities": {
2834
2674
  "$ref": "#/components/schemas/Abilities"
2675
+ },
2676
+ "resource": {
2677
+ "description": "The resource of users: its item with this `id` is the profile of the user. Without it, clients look for a resource `users`.",
2678
+ "type": "string"
2835
2679
  }
2836
2680
  },
2837
2681
  "required": [
@@ -3019,9 +2863,11 @@
3019
2863
  "multipart",
3020
2864
  "tus",
3021
2865
  "presigned"
3022
- ]
2866
+ ],
2867
+ "description": "`multipart`: files go through `POST /media` and the requests that take them. `presigned`: the browser also sends files to storage itself, with URLs that `POST /uploads/sign` signs, then `POST /uploads/{upload}/complete` gives an upload that values reference."
3023
2868
  },
3024
2869
  "endpoint": {
2870
+ "description": "`presigned`: the base URL of the upload routes, when they are not `{api.baseUrl}/uploads`.",
3025
2871
  "type": "string"
3026
2872
  },
3027
2873
  "maxSize": {
@@ -3950,153 +3796,418 @@
3950
3796
  }
3951
3797
  ]
3952
3798
  },
3953
- "result": {
3954
- "description": "Set once the run has finished.",
3955
- "$ref": "#/components/schemas/ActionResult"
3799
+ "result": {
3800
+ "description": "Set once the run has finished.",
3801
+ "$ref": "#/components/schemas/ActionResult"
3802
+ },
3803
+ "createdAt": {
3804
+ "type": "string"
3805
+ },
3806
+ "finishedAt": {
3807
+ "type": [
3808
+ "string",
3809
+ "null"
3810
+ ]
3811
+ }
3812
+ },
3813
+ "required": [
3814
+ "id",
3815
+ "action",
3816
+ "resource",
3817
+ "status",
3818
+ "progress",
3819
+ "total"
3820
+ ],
3821
+ "additionalProperties": {}
3822
+ },
3823
+ "ActionRunResponse": {
3824
+ "type": "object",
3825
+ "properties": {
3826
+ "run": {
3827
+ "$ref": "#/components/schemas/ActionRun"
3828
+ }
3829
+ },
3830
+ "required": [
3831
+ "run"
3832
+ ],
3833
+ "additionalProperties": {}
3834
+ },
3835
+ "MediaTransform": {
3836
+ "type": "object",
3837
+ "properties": {
3838
+ "crop": {
3839
+ "description": "In whole pixels of the upright original image (after its EXIF orientation), from its top left corner.",
3840
+ "type": "object",
3841
+ "properties": {
3842
+ "x": {
3843
+ "type": "integer",
3844
+ "minimum": 0,
3845
+ "maximum": 9007199254740991
3846
+ },
3847
+ "y": {
3848
+ "type": "integer",
3849
+ "minimum": 0,
3850
+ "maximum": 9007199254740991
3851
+ },
3852
+ "width": {
3853
+ "type": "integer",
3854
+ "exclusiveMinimum": 0,
3855
+ "maximum": 9007199254740991
3856
+ },
3857
+ "height": {
3858
+ "type": "integer",
3859
+ "exclusiveMinimum": 0,
3860
+ "maximum": 9007199254740991
3861
+ }
3862
+ },
3863
+ "required": [
3864
+ "x",
3865
+ "y",
3866
+ "width",
3867
+ "height"
3868
+ ],
3869
+ "additionalProperties": {}
3870
+ },
3871
+ "rotate": {
3872
+ "description": "Clockwise, in degrees.",
3873
+ "anyOf": [
3874
+ {
3875
+ "type": "number",
3876
+ "const": 0
3877
+ },
3878
+ {
3879
+ "type": "number",
3880
+ "const": 90
3881
+ },
3882
+ {
3883
+ "type": "number",
3884
+ "const": 180
3885
+ },
3886
+ {
3887
+ "type": "number",
3888
+ "const": 270
3889
+ }
3890
+ ]
3891
+ },
3892
+ "flipX": {
3893
+ "description": "Mirrors left to right (horizontal).",
3894
+ "type": "boolean"
3895
+ },
3896
+ "flipY": {
3897
+ "description": "Mirrors top to bottom (vertical).",
3898
+ "type": "boolean"
3899
+ },
3900
+ "focalPoint": {
3901
+ "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.",
3902
+ "type": "object",
3903
+ "properties": {
3904
+ "x": {
3905
+ "type": "number",
3906
+ "minimum": 0,
3907
+ "maximum": 1
3908
+ },
3909
+ "y": {
3910
+ "type": "number",
3911
+ "minimum": 0,
3912
+ "maximum": 1
3913
+ }
3914
+ },
3915
+ "required": [
3916
+ "x",
3917
+ "y"
3918
+ ],
3919
+ "additionalProperties": {}
3920
+ },
3921
+ "base": {
3922
+ "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).",
3923
+ "type": "string",
3924
+ "enum": [
3925
+ "media",
3926
+ "original"
3927
+ ]
3928
+ },
3929
+ "baseTransform": {
3930
+ "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.",
3931
+ "$ref": "#/components/schemas/MediaTransform"
3932
+ }
3933
+ },
3934
+ "additionalProperties": {},
3935
+ "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."
3936
+ },
3937
+ "StoredFile": {
3938
+ "type": "object",
3939
+ "properties": {
3940
+ "name": {
3941
+ "type": "string",
3942
+ "description": "The name of the file, as the user knows it."
3943
+ },
3944
+ "url": {
3945
+ "description": "Where to download it. A private file gets a temporary URL.",
3946
+ "type": [
3947
+ "string",
3948
+ "null"
3949
+ ]
3950
+ },
3951
+ "mime": {
3952
+ "type": [
3953
+ "string",
3954
+ "null"
3955
+ ]
3956
+ },
3957
+ "size": {
3958
+ "anyOf": [
3959
+ {
3960
+ "type": "integer",
3961
+ "minimum": 0,
3962
+ "maximum": 9007199254740991
3963
+ },
3964
+ {
3965
+ "type": "null"
3966
+ }
3967
+ ]
3968
+ }
3969
+ },
3970
+ "required": [
3971
+ "name"
3972
+ ],
3973
+ "additionalProperties": {},
3974
+ "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."
3975
+ },
3976
+ "UploadReference": {
3977
+ "type": "object",
3978
+ "properties": {
3979
+ "upload": {
3980
+ "type": "string",
3981
+ "minLength": 1
3982
+ }
3983
+ },
3984
+ "required": [
3985
+ "upload"
3986
+ ],
3987
+ "additionalProperties": {},
3988
+ "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."
3989
+ },
3990
+ "Upload": {
3991
+ "type": "object",
3992
+ "properties": {
3993
+ "id": {
3994
+ "type": "string",
3995
+ "minLength": 1,
3996
+ "description": "The id of the upload: `upl_…`."
3997
+ },
3998
+ "key": {
3999
+ "description": "The key of the object in storage.",
4000
+ "type": "string"
4001
+ },
4002
+ "name": {
4003
+ "type": "string"
4004
+ },
4005
+ "mime": {
4006
+ "type": "string"
4007
+ },
4008
+ "size": {
4009
+ "type": "integer",
4010
+ "minimum": 0,
4011
+ "maximum": 9007199254740991
4012
+ }
4013
+ },
4014
+ "required": [
4015
+ "id"
4016
+ ],
4017
+ "additionalProperties": {},
4018
+ "description": "A file the browser uploaded to storage, before it becomes a media, an import or another value."
4019
+ },
4020
+ "UploadResponse": {
4021
+ "type": "object",
4022
+ "properties": {
4023
+ "data": {
4024
+ "$ref": "#/components/schemas/Upload"
4025
+ }
4026
+ },
4027
+ "required": [
4028
+ "data"
4029
+ ],
4030
+ "additionalProperties": {}
4031
+ },
4032
+ "UploadSignRequest": {
4033
+ "type": "object",
4034
+ "properties": {
4035
+ "method": {
4036
+ "type": "string",
4037
+ "enum": [
4038
+ "GET",
4039
+ "POST",
4040
+ "PUT",
4041
+ "DELETE"
4042
+ ]
4043
+ },
4044
+ "key": {
4045
+ "type": "string",
4046
+ "minLength": 1
4047
+ },
4048
+ "uploadId": {
4049
+ "description": "The S3 multipart upload.",
4050
+ "type": "string"
4051
+ },
4052
+ "partNumber": {
4053
+ "type": "integer",
4054
+ "exclusiveMinimum": 0,
4055
+ "maximum": 9007199254740991
3956
4056
  },
3957
- "createdAt": {
4057
+ "contentType": {
3958
4058
  "type": "string"
3959
4059
  },
3960
- "finishedAt": {
3961
- "type": [
3962
- "string",
3963
- "null"
3964
- ]
4060
+ "expiresIn": {
4061
+ "type": "integer",
4062
+ "exclusiveMinimum": 0,
4063
+ "maximum": 9007199254740991
3965
4064
  }
3966
4065
  },
3967
4066
  "required": [
3968
- "id",
3969
- "action",
3970
- "resource",
3971
- "status",
3972
- "progress",
3973
- "total"
4067
+ "method",
4068
+ "key"
3974
4069
  ],
3975
- "additionalProperties": {}
4070
+ "additionalProperties": {},
4071
+ "description": "A request of the browser's S3 client to sign (Uppy 6's `signRequest`)."
3976
4072
  },
3977
- "ActionRunResponse": {
4073
+ "UploadSignResponse": {
3978
4074
  "type": "object",
3979
4075
  "properties": {
3980
- "run": {
3981
- "$ref": "#/components/schemas/ActionRun"
4076
+ "url": {
4077
+ "type": "string"
4078
+ },
4079
+ "key": {
4080
+ "description": "The key the backend chose, for the first request of a file.",
4081
+ "type": "string"
4082
+ },
4083
+ "headers": {
4084
+ "description": "Headers the URL was signed with, which the browser sends.",
4085
+ "type": "object",
4086
+ "propertyNames": {
4087
+ "type": "string"
4088
+ },
4089
+ "additionalProperties": {
4090
+ "type": "string"
4091
+ }
4092
+ },
4093
+ "upload": {
4094
+ "description": "The upload the first request of a file created: `upl_…`.",
4095
+ "type": "string"
3982
4096
  }
3983
4097
  },
3984
4098
  "required": [
3985
- "run"
4099
+ "url"
3986
4100
  ],
3987
- "additionalProperties": {}
4101
+ "additionalProperties": {},
4102
+ "description": "A presigned request."
3988
4103
  },
3989
- "MediaTransform": {
4104
+ "FieldCheckRequest": {
3990
4105
  "type": "object",
3991
4106
  "properties": {
3992
- "crop": {
3993
- "description": "In pixels of the original image.",
3994
- "type": "object",
3995
- "properties": {
3996
- "x": {
3997
- "type": "number"
3998
- },
3999
- "y": {
4000
- "type": "number"
4001
- },
4002
- "width": {
4003
- "type": "number"
4004
- },
4005
- "height": {
4006
- "type": "number"
4007
- }
4008
- },
4009
- "required": [
4010
- "x",
4011
- "y",
4012
- "width",
4013
- "height"
4014
- ],
4015
- "additionalProperties": {}
4107
+ "value": {
4108
+ "type": "string",
4109
+ "description": "The value to check, as it is typed."
4016
4110
  },
4017
- "rotate": {
4111
+ "locale": {
4112
+ "description": "The locale of the value, for a localized field.",
4113
+ "type": "string"
4114
+ },
4115
+ "id": {
4116
+ "description": "The item being edited, or null when creating one.",
4018
4117
  "anyOf": [
4019
4118
  {
4020
- "type": "number",
4021
- "const": 0
4022
- },
4023
- {
4024
- "type": "number",
4025
- "const": 90
4026
- },
4027
- {
4028
- "type": "number",
4029
- "const": 180
4119
+ "$ref": "#/components/schemas/Id"
4030
4120
  },
4031
4121
  {
4032
- "type": "number",
4033
- "const": 270
4122
+ "type": "null"
4034
4123
  }
4035
4124
  ]
4036
4125
  },
4037
- "flipX": {
4038
- "type": "boolean"
4039
- },
4040
- "flipY": {
4041
- "type": "boolean"
4042
- },
4043
- "focalPoint": {
4044
- "description": "Relative to the width and height, from 0 to 1.",
4126
+ "values": {
4127
+ "description": "The form's current values, as they would be sent to save, for what the check depends on (a page's parent).",
4045
4128
  "type": "object",
4046
- "properties": {
4047
- "x": {
4048
- "type": "number",
4049
- "minimum": 0,
4050
- "maximum": 1
4051
- },
4052
- "y": {
4053
- "type": "number",
4054
- "minimum": 0,
4055
- "maximum": 1
4056
- }
4129
+ "propertyNames": {
4130
+ "type": "string"
4057
4131
  },
4058
- "required": [
4059
- "x",
4060
- "y"
4061
- ],
4062
4132
  "additionalProperties": {}
4063
4133
  }
4064
4134
  },
4065
- "additionalProperties": {}
4135
+ "required": [
4136
+ "value"
4137
+ ],
4138
+ "additionalProperties": {},
4139
+ "description": "A value of a field with `check`, to check with the backend."
4066
4140
  },
4067
- "Media": {
4141
+ "FieldCheckResponse": {
4068
4142
  "type": "object",
4069
4143
  "properties": {
4070
- "id": {
4071
- "$ref": "#/components/schemas/Id"
4144
+ "available": {
4145
+ "type": "boolean",
4146
+ "description": "Whether no other item of the resource, in its scope and the same locale, has the value."
4072
4147
  },
4073
- "version": {
4074
- "description": "Changes on every update. `null` when the backend has no versions.",
4148
+ "suggestion": {
4149
+ "description": "An available value close to the one checked, when it is taken.",
4075
4150
  "type": [
4076
4151
  "string",
4077
4152
  "null"
4078
4153
  ]
4079
4154
  },
4080
- "abilities": {
4081
- "$ref": "#/components/schemas/Abilities"
4155
+ "prefix": {
4156
+ "description": "What the field shows in front of the value: the start of its URL.",
4157
+ "type": [
4158
+ "string",
4159
+ "null"
4160
+ ]
4161
+ },
4162
+ "url": {
4163
+ "description": "The URL the value gives the item, which the field links to.",
4164
+ "type": [
4165
+ "string",
4166
+ "null"
4167
+ ]
4082
4168
  },
4169
+ "disabled": {
4170
+ "description": "The field doesn't apply to this item (the home page has no slug): the field is read-only.",
4171
+ "type": "boolean"
4172
+ }
4173
+ },
4174
+ "required": [
4175
+ "available"
4176
+ ],
4177
+ "additionalProperties": {},
4178
+ "description": "What the backend says about a value: not authoritative, since saving still validates it."
4179
+ },
4180
+ "MediaInfo": {
4181
+ "type": "object",
4182
+ "properties": {
4083
4183
  "type": {
4084
4184
  "type": "string",
4085
- "description": "`image`, `video`, `audio`, `document`, `font`, or another type."
4086
- },
4087
- "name": {
4088
- "type": "string"
4185
+ "description": "`image`, `video`, `audio`, `document`, `font`, or another type the backend knows."
4089
4186
  },
4090
4187
  "mime": {
4091
- "type": "string"
4188
+ "type": [
4189
+ "string",
4190
+ "null"
4191
+ ]
4092
4192
  },
4093
4193
  "size": {
4094
- "type": "integer",
4095
- "minimum": 0,
4096
- "maximum": 9007199254740991
4194
+ "anyOf": [
4195
+ {
4196
+ "type": "integer",
4197
+ "minimum": 0,
4198
+ "maximum": 9007199254740991
4199
+ },
4200
+ {
4201
+ "type": "null"
4202
+ }
4203
+ ]
4097
4204
  },
4098
4205
  "url": {
4099
- "type": "string"
4206
+ "description": "The main file to show or play: a rendition, or the original until it exists.",
4207
+ "type": [
4208
+ "string",
4209
+ "null"
4210
+ ]
4100
4211
  },
4101
4212
  "thumbnailUrl": {
4102
4213
  "type": [
@@ -4105,6 +4216,7 @@
4105
4216
  ]
4106
4217
  },
4107
4218
  "variants": {
4219
+ "description": "Named renditions: sizes of an image, qualities of a video.",
4108
4220
  "type": "object",
4109
4221
  "propertyNames": {
4110
4222
  "type": "string"
@@ -4128,6 +4240,35 @@
4128
4240
  "additionalProperties": {}
4129
4241
  }
4130
4242
  },
4243
+ "width": {
4244
+ "type": [
4245
+ "number",
4246
+ "null"
4247
+ ]
4248
+ },
4249
+ "height": {
4250
+ "type": [
4251
+ "number",
4252
+ "null"
4253
+ ]
4254
+ },
4255
+ "duration": {
4256
+ "description": "In seconds.",
4257
+ "type": [
4258
+ "number",
4259
+ "null"
4260
+ ]
4261
+ },
4262
+ "status": {
4263
+ "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.",
4264
+ "type": "string",
4265
+ "enum": [
4266
+ "pending",
4267
+ "processing",
4268
+ "ready",
4269
+ "failed"
4270
+ ]
4271
+ },
4131
4272
  "metadata": {
4132
4273
  "type": "object",
4133
4274
  "propertyNames": {
@@ -4136,6 +4277,7 @@
4136
4277
  "additionalProperties": {}
4137
4278
  },
4138
4279
  "transform": {
4280
+ "description": "The media's own transform, from its library, which clients need to draw a transform for one use made over it (decision 0031).",
4139
4281
  "anyOf": [
4140
4282
  {
4141
4283
  "$ref": "#/components/schemas/MediaTransform"
@@ -4144,56 +4286,77 @@
4144
4286
  "type": "null"
4145
4287
  }
4146
4288
  ]
4147
- },
4148
- "tags": {
4149
- "type": "array",
4150
- "items": {
4151
- "type": "string"
4152
- }
4153
4289
  }
4154
4290
  },
4155
4291
  "required": [
4156
- "id",
4157
- "version",
4158
- "abilities",
4159
- "type",
4160
- "name",
4161
- "mime",
4162
- "size",
4163
- "url"
4292
+ "type"
4164
4293
  ],
4165
- "additionalProperties": {}
4294
+ "additionalProperties": {},
4295
+ "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."
4166
4296
  },
4167
- "MediaResponse": {
4297
+ "MediaItem": {
4168
4298
  "type": "object",
4169
4299
  "properties": {
4170
- "data": {
4171
- "$ref": "#/components/schemas/Media"
4300
+ "id": {
4301
+ "$ref": "#/components/schemas/Id"
4302
+ },
4303
+ "version": {
4304
+ "description": "Changes on every update. `null` when the backend has no versions.",
4305
+ "type": [
4306
+ "string",
4307
+ "null"
4308
+ ]
4309
+ },
4310
+ "abilities": {
4311
+ "$ref": "#/components/schemas/Abilities"
4312
+ },
4313
+ "media": {
4314
+ "$ref": "#/components/schemas/MediaInfo"
4172
4315
  }
4173
4316
  },
4174
4317
  "required": [
4175
- "data"
4318
+ "id",
4319
+ "version",
4320
+ "abilities",
4321
+ "media"
4176
4322
  ],
4177
- "additionalProperties": {}
4323
+ "additionalProperties": {},
4324
+ "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."
4178
4325
  },
4179
- "MediaListResponse": {
4326
+ "MediaReference": {
4180
4327
  "type": "object",
4181
4328
  "properties": {
4182
- "data": {
4183
- "type": "array",
4184
- "items": {
4185
- "$ref": "#/components/schemas/Media"
4186
- }
4329
+ "id": {
4330
+ "$ref": "#/components/schemas/Id"
4187
4331
  },
4188
- "meta": {
4189
- "$ref": "#/components/schemas/Pagination"
4332
+ "resource": {
4333
+ "description": "The library of the media. Required for a field that allows several libraries, since ids are unique only within their resource (decision 0027).",
4334
+ "type": "string"
4335
+ },
4336
+ "label": {
4337
+ "description": "The `itemTitle` of the media.",
4338
+ "type": "string"
4339
+ },
4340
+ "media": {
4341
+ "$ref": "#/components/schemas/MediaInfo"
4342
+ },
4343
+ "transform": {
4344
+ "description": "The edits of the image for this use only: from the original file, or over the media's own transform with `base: \"media\"`.",
4345
+ "anyOf": [
4346
+ {
4347
+ "$ref": "#/components/schemas/MediaTransform"
4348
+ },
4349
+ {
4350
+ "type": "null"
4351
+ }
4352
+ ]
4190
4353
  }
4191
4354
  },
4192
4355
  "required": [
4193
- "data",
4194
- "meta"
4356
+ "id"
4195
4357
  ],
4196
- "additionalProperties": {}
4358
+ "additionalProperties": {},
4359
+ "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."
4197
4360
  },
4198
4361
  "Session": {
4199
4362
  "type": "object",
@@ -4216,7 +4379,8 @@
4216
4379
  "type": "object",
4217
4380
  "properties": {
4218
4381
  "resource": {
4219
- "type": "string"
4382
+ "type": "string",
4383
+ "description": "The id of the resource."
4220
4384
  },
4221
4385
  "items": {
4222
4386
  "type": "array",
@@ -4225,6 +4389,7 @@
4225
4389
  }
4226
4390
  },
4227
4391
  "total": {
4392
+ "description": "How many items of the resource match, when the backend counts them: the list of the resource, searched, shows them all.",
4228
4393
  "type": "integer",
4229
4394
  "minimum": 0,
4230
4395
  "maximum": 9007199254740991
@@ -4241,7 +4406,8 @@
4241
4406
  "required": [
4242
4407
  "data"
4243
4408
  ],
4244
- "additionalProperties": {}
4409
+ "additionalProperties": {},
4410
+ "description": "The results of the global search: the resources with results, in the order of the definition."
4245
4411
  },
4246
4412
  "PreviewResponse": {
4247
4413
  "type": "object",