@panneau/protocol 5.0.0-alpha.3 → 5.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +31 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/lint.d.ts +2 -1
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +27 -1
- package/dist/lint.js.map +1 -1
- package/dist/mock/example.d.ts +2 -1
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +219 -143
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +145 -5
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +18 -94
- package/dist/openapi.js.map +1 -1
- package/dist/schemas/api.d.ts +113 -82
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +68 -26
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/definition.d.ts +1 -0
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +2 -2
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/field.js +3 -3
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +106 -79
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +11 -5
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/resource.d.ts +1 -0
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +1 -0
- package/dist/schemas/resource.js.map +1 -1
- package/package.json +1 -1
- package/schema/boot.schema.json +4 -0
- package/schema/definition.schema.json +4 -0
- package/schema/openapi.json +302 -465
package/schema/openapi.json
CHANGED
|
@@ -831,303 +831,27 @@
|
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
},
|
|
834
|
-
"/
|
|
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"
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
],
|
|
898
|
-
"responses": {
|
|
899
|
-
"200": {
|
|
900
|
-
"description": "A page of media.",
|
|
901
|
-
"content": {
|
|
902
|
-
"application/json": {
|
|
903
|
-
"schema": {
|
|
904
|
-
"$ref": "#/components/schemas/MediaListResponse"
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
},
|
|
909
|
-
"401": {
|
|
910
|
-
"description": "Not authenticated.",
|
|
911
|
-
"content": {
|
|
912
|
-
"application/problem+json": {
|
|
913
|
-
"schema": {
|
|
914
|
-
"$ref": "#/components/schemas/Problem"
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
},
|
|
919
|
-
"403": {
|
|
920
|
-
"description": "Not allowed.",
|
|
921
|
-
"content": {
|
|
922
|
-
"application/problem+json": {
|
|
923
|
-
"schema": {
|
|
924
|
-
"$ref": "#/components/schemas/Problem"
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
},
|
|
834
|
+
"/uploads/sign": {
|
|
931
835
|
"post": {
|
|
932
|
-
"operationId": "
|
|
933
|
-
"
|
|
934
|
-
"required": true,
|
|
935
|
-
"content": {
|
|
936
|
-
"multipart/form-data": {
|
|
937
|
-
"schema": {
|
|
938
|
-
"type": "object",
|
|
939
|
-
"required": [
|
|
940
|
-
"file"
|
|
941
|
-
],
|
|
942
|
-
"properties": {
|
|
943
|
-
"file": {
|
|
944
|
-
"type": "string",
|
|
945
|
-
"contentMediaType": "application/octet-stream"
|
|
946
|
-
},
|
|
947
|
-
"name": {
|
|
948
|
-
"type": "string"
|
|
949
|
-
},
|
|
950
|
-
"tags": {
|
|
951
|
-
"type": "array",
|
|
952
|
-
"items": {
|
|
953
|
-
"type": "string"
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
},
|
|
961
|
-
"responses": {
|
|
962
|
-
"201": {
|
|
963
|
-
"description": "The created media.",
|
|
964
|
-
"content": {
|
|
965
|
-
"application/json": {
|
|
966
|
-
"schema": {
|
|
967
|
-
"$ref": "#/components/schemas/MediaResponse"
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
},
|
|
972
|
-
"401": {
|
|
973
|
-
"description": "Not authenticated.",
|
|
974
|
-
"content": {
|
|
975
|
-
"application/problem+json": {
|
|
976
|
-
"schema": {
|
|
977
|
-
"$ref": "#/components/schemas/Problem"
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
},
|
|
982
|
-
"403": {
|
|
983
|
-
"description": "Not allowed.",
|
|
984
|
-
"content": {
|
|
985
|
-
"application/problem+json": {
|
|
986
|
-
"schema": {
|
|
987
|
-
"$ref": "#/components/schemas/Problem"
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
},
|
|
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.",
|
|
1032
|
-
"content": {
|
|
1033
|
-
"application/problem+json": {
|
|
1034
|
-
"schema": {
|
|
1035
|
-
"$ref": "#/components/schemas/Problem"
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
},
|
|
1040
|
-
"403": {
|
|
1041
|
-
"description": "Not allowed.",
|
|
1042
|
-
"content": {
|
|
1043
|
-
"application/problem+json": {
|
|
1044
|
-
"schema": {
|
|
1045
|
-
"$ref": "#/components/schemas/Problem"
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
}
|
|
1052
|
-
},
|
|
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
|
-
],
|
|
1065
|
-
"get": {
|
|
1066
|
-
"operationId": "getMedia",
|
|
1067
|
-
"responses": {
|
|
1068
|
-
"200": {
|
|
1069
|
-
"description": "The media.",
|
|
1070
|
-
"content": {
|
|
1071
|
-
"application/json": {
|
|
1072
|
-
"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`.",
|
|
836
|
+
"operationId": "signUpload",
|
|
837
|
+
"summary": "Signs a request of the browser's S3 client. The first request of a file creates its upload.",
|
|
1113
838
|
"requestBody": {
|
|
1114
839
|
"required": true,
|
|
1115
840
|
"content": {
|
|
1116
841
|
"application/json": {
|
|
1117
842
|
"schema": {
|
|
1118
|
-
"
|
|
1119
|
-
"additionalProperties": true
|
|
843
|
+
"$ref": "#/components/schemas/UploadSignRequest"
|
|
1120
844
|
}
|
|
1121
845
|
}
|
|
1122
846
|
}
|
|
1123
847
|
},
|
|
1124
848
|
"responses": {
|
|
1125
849
|
"200": {
|
|
1126
|
-
"description": "The
|
|
850
|
+
"description": "The presigned request.",
|
|
1127
851
|
"content": {
|
|
1128
852
|
"application/json": {
|
|
1129
853
|
"schema": {
|
|
1130
|
-
"$ref": "#/components/schemas/
|
|
854
|
+
"$ref": "#/components/schemas/UploadSignResponse"
|
|
1131
855
|
}
|
|
1132
856
|
}
|
|
1133
857
|
}
|
|
@@ -1173,83 +897,33 @@
|
|
|
1173
897
|
}
|
|
1174
898
|
}
|
|
1175
899
|
}
|
|
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
900
|
}
|
|
1225
901
|
},
|
|
1226
|
-
"/
|
|
902
|
+
"/uploads/{upload}/complete": {
|
|
1227
903
|
"parameters": [
|
|
1228
904
|
{
|
|
1229
|
-
"name": "
|
|
905
|
+
"name": "upload",
|
|
1230
906
|
"in": "path",
|
|
1231
907
|
"required": true,
|
|
1232
|
-
"description": "
|
|
908
|
+
"description": "Upload id: `upl_…`.",
|
|
1233
909
|
"schema": {
|
|
1234
910
|
"type": "string"
|
|
1235
911
|
}
|
|
1236
912
|
}
|
|
1237
913
|
],
|
|
1238
914
|
"post": {
|
|
1239
|
-
"operationId": "
|
|
915
|
+
"operationId": "completeUpload",
|
|
916
|
+
"summary": "Once the browser completed the upload in storage, checks the object and gives the upload, which values reference.",
|
|
1240
917
|
"requestBody": {
|
|
1241
|
-
"required":
|
|
918
|
+
"required": false,
|
|
1242
919
|
"content": {
|
|
1243
|
-
"
|
|
920
|
+
"application/json": {
|
|
1244
921
|
"schema": {
|
|
1245
922
|
"type": "object",
|
|
1246
|
-
"required": [
|
|
1247
|
-
"file"
|
|
1248
|
-
],
|
|
1249
923
|
"properties": {
|
|
1250
|
-
"
|
|
924
|
+
"name": {
|
|
1251
925
|
"type": "string",
|
|
1252
|
-
"
|
|
926
|
+
"description": "The file's name, which the key doesn't keep, since the backend chose it."
|
|
1253
927
|
}
|
|
1254
928
|
}
|
|
1255
929
|
}
|
|
@@ -1258,11 +932,11 @@
|
|
|
1258
932
|
},
|
|
1259
933
|
"responses": {
|
|
1260
934
|
"200": {
|
|
1261
|
-
"description": "The
|
|
935
|
+
"description": "The upload.",
|
|
1262
936
|
"content": {
|
|
1263
937
|
"application/json": {
|
|
1264
938
|
"schema": {
|
|
1265
|
-
"$ref": "#/components/schemas/
|
|
939
|
+
"$ref": "#/components/schemas/UploadResponse"
|
|
1266
940
|
}
|
|
1267
941
|
}
|
|
1268
942
|
}
|
|
@@ -1296,67 +970,9 @@
|
|
|
1296
970
|
}
|
|
1297
971
|
}
|
|
1298
972
|
}
|
|
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.",
|
|
973
|
+
},
|
|
974
|
+
"422": {
|
|
975
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
1360
976
|
"content": {
|
|
1361
977
|
"application/problem+json": {
|
|
1362
978
|
"schema": {
|
|
@@ -2297,15 +1913,15 @@
|
|
|
2297
1913
|
}
|
|
2298
1914
|
},
|
|
2299
1915
|
"multiple": {
|
|
2300
|
-
"description": "`select`, `relation`, `media`: the value is an array.",
|
|
1916
|
+
"description": "`select`, `relation`, `media`, `file`: the value is an array.",
|
|
2301
1917
|
"type": "boolean"
|
|
2302
1918
|
},
|
|
2303
1919
|
"resource": {
|
|
2304
|
-
"description": "`relation`: id of the related resource.",
|
|
1920
|
+
"description": "`relation`: id of the related resource. `media`: id of a resource of kind `media`, optional when the definition has only one.",
|
|
2305
1921
|
"type": "string"
|
|
2306
1922
|
},
|
|
2307
1923
|
"accept": {
|
|
2308
|
-
"description": "`media`: accepted MIME types.",
|
|
1924
|
+
"description": "`media`, `file`: accepted MIME types.",
|
|
2309
1925
|
"type": "array",
|
|
2310
1926
|
"items": {
|
|
2311
1927
|
"type": "string"
|
|
@@ -2733,6 +2349,11 @@
|
|
|
2733
2349
|
"type": "string",
|
|
2734
2350
|
"minLength": 1
|
|
2735
2351
|
},
|
|
2352
|
+
"kind": {
|
|
2353
|
+
"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.",
|
|
2354
|
+
"type": "string",
|
|
2355
|
+
"minLength": 1
|
|
2356
|
+
},
|
|
2736
2357
|
"label": {
|
|
2737
2358
|
"type": "object",
|
|
2738
2359
|
"properties": {
|
|
@@ -3019,9 +2640,11 @@
|
|
|
3019
2640
|
"multipart",
|
|
3020
2641
|
"tus",
|
|
3021
2642
|
"presigned"
|
|
3022
|
-
]
|
|
2643
|
+
],
|
|
2644
|
+
"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
2645
|
},
|
|
3024
2646
|
"endpoint": {
|
|
2647
|
+
"description": "`presigned`: the base URL of the upload routes, when they are not `{api.baseUrl}/uploads`.",
|
|
3025
2648
|
"type": "string"
|
|
3026
2649
|
},
|
|
3027
2650
|
"maxSize": {
|
|
@@ -3990,20 +3613,28 @@
|
|
|
3990
3613
|
"type": "object",
|
|
3991
3614
|
"properties": {
|
|
3992
3615
|
"crop": {
|
|
3993
|
-
"description": "In pixels of the original image.",
|
|
3616
|
+
"description": "In whole pixels of the upright original image (after its EXIF orientation), from its top left corner.",
|
|
3994
3617
|
"type": "object",
|
|
3995
3618
|
"properties": {
|
|
3996
3619
|
"x": {
|
|
3997
|
-
"type": "
|
|
3620
|
+
"type": "integer",
|
|
3621
|
+
"minimum": 0,
|
|
3622
|
+
"maximum": 9007199254740991
|
|
3998
3623
|
},
|
|
3999
3624
|
"y": {
|
|
4000
|
-
"type": "
|
|
3625
|
+
"type": "integer",
|
|
3626
|
+
"minimum": 0,
|
|
3627
|
+
"maximum": 9007199254740991
|
|
4001
3628
|
},
|
|
4002
3629
|
"width": {
|
|
4003
|
-
"type": "
|
|
3630
|
+
"type": "integer",
|
|
3631
|
+
"exclusiveMinimum": 0,
|
|
3632
|
+
"maximum": 9007199254740991
|
|
4004
3633
|
},
|
|
4005
3634
|
"height": {
|
|
4006
|
-
"type": "
|
|
3635
|
+
"type": "integer",
|
|
3636
|
+
"exclusiveMinimum": 0,
|
|
3637
|
+
"maximum": 9007199254740991
|
|
4007
3638
|
}
|
|
4008
3639
|
},
|
|
4009
3640
|
"required": [
|
|
@@ -4015,6 +3646,7 @@
|
|
|
4015
3646
|
"additionalProperties": {}
|
|
4016
3647
|
},
|
|
4017
3648
|
"rotate": {
|
|
3649
|
+
"description": "Clockwise, in degrees.",
|
|
4018
3650
|
"anyOf": [
|
|
4019
3651
|
{
|
|
4020
3652
|
"type": "number",
|
|
@@ -4035,13 +3667,15 @@
|
|
|
4035
3667
|
]
|
|
4036
3668
|
},
|
|
4037
3669
|
"flipX": {
|
|
3670
|
+
"description": "Mirrors left to right (horizontal).",
|
|
4038
3671
|
"type": "boolean"
|
|
4039
3672
|
},
|
|
4040
3673
|
"flipY": {
|
|
3674
|
+
"description": "Mirrors top to bottom (vertical).",
|
|
4041
3675
|
"type": "boolean"
|
|
4042
3676
|
},
|
|
4043
3677
|
"focalPoint": {
|
|
4044
|
-
"description": "
|
|
3678
|
+
"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.",
|
|
4045
3679
|
"type": "object",
|
|
4046
3680
|
"properties": {
|
|
4047
3681
|
"x": {
|
|
@@ -4062,27 +3696,73 @@
|
|
|
4062
3696
|
"additionalProperties": {}
|
|
4063
3697
|
}
|
|
4064
3698
|
},
|
|
4065
|
-
"additionalProperties": {}
|
|
3699
|
+
"additionalProperties": {},
|
|
3700
|
+
"description": "Non-destructive edits of an image, applied in this order: crop, then rotate, then flip."
|
|
4066
3701
|
},
|
|
4067
|
-
"
|
|
3702
|
+
"StoredFile": {
|
|
4068
3703
|
"type": "object",
|
|
4069
3704
|
"properties": {
|
|
4070
|
-
"
|
|
4071
|
-
"
|
|
3705
|
+
"name": {
|
|
3706
|
+
"type": "string",
|
|
3707
|
+
"description": "The name of the file, as the user knows it."
|
|
4072
3708
|
},
|
|
4073
|
-
"
|
|
4074
|
-
"description": "
|
|
3709
|
+
"url": {
|
|
3710
|
+
"description": "Where to download it. A private file gets a temporary URL.",
|
|
4075
3711
|
"type": [
|
|
4076
3712
|
"string",
|
|
4077
3713
|
"null"
|
|
4078
3714
|
]
|
|
4079
3715
|
},
|
|
4080
|
-
"
|
|
4081
|
-
"
|
|
3716
|
+
"mime": {
|
|
3717
|
+
"type": [
|
|
3718
|
+
"string",
|
|
3719
|
+
"null"
|
|
3720
|
+
]
|
|
4082
3721
|
},
|
|
4083
|
-
"
|
|
3722
|
+
"size": {
|
|
3723
|
+
"anyOf": [
|
|
3724
|
+
{
|
|
3725
|
+
"type": "integer",
|
|
3726
|
+
"minimum": 0,
|
|
3727
|
+
"maximum": 9007199254740991
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
"type": "null"
|
|
3731
|
+
}
|
|
3732
|
+
]
|
|
3733
|
+
}
|
|
3734
|
+
},
|
|
3735
|
+
"required": [
|
|
3736
|
+
"name"
|
|
3737
|
+
],
|
|
3738
|
+
"additionalProperties": {},
|
|
3739
|
+
"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."
|
|
3740
|
+
},
|
|
3741
|
+
"UploadReference": {
|
|
3742
|
+
"type": "object",
|
|
3743
|
+
"properties": {
|
|
3744
|
+
"upload": {
|
|
3745
|
+
"type": "string",
|
|
3746
|
+
"minLength": 1
|
|
3747
|
+
}
|
|
3748
|
+
},
|
|
3749
|
+
"required": [
|
|
3750
|
+
"upload"
|
|
3751
|
+
],
|
|
3752
|
+
"additionalProperties": {},
|
|
3753
|
+
"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."
|
|
3754
|
+
},
|
|
3755
|
+
"Upload": {
|
|
3756
|
+
"type": "object",
|
|
3757
|
+
"properties": {
|
|
3758
|
+
"id": {
|
|
4084
3759
|
"type": "string",
|
|
4085
|
-
"
|
|
3760
|
+
"minLength": 1,
|
|
3761
|
+
"description": "The id of the upload: `upl_…`."
|
|
3762
|
+
},
|
|
3763
|
+
"key": {
|
|
3764
|
+
"description": "The key of the object in storage.",
|
|
3765
|
+
"type": "string"
|
|
4086
3766
|
},
|
|
4087
3767
|
"name": {
|
|
4088
3768
|
"type": "string"
|
|
@@ -4094,10 +3774,130 @@
|
|
|
4094
3774
|
"type": "integer",
|
|
4095
3775
|
"minimum": 0,
|
|
4096
3776
|
"maximum": 9007199254740991
|
|
3777
|
+
}
|
|
3778
|
+
},
|
|
3779
|
+
"required": [
|
|
3780
|
+
"id"
|
|
3781
|
+
],
|
|
3782
|
+
"additionalProperties": {},
|
|
3783
|
+
"description": "A file the browser uploaded to storage, before it becomes a media, an import or another value."
|
|
3784
|
+
},
|
|
3785
|
+
"UploadResponse": {
|
|
3786
|
+
"type": "object",
|
|
3787
|
+
"properties": {
|
|
3788
|
+
"data": {
|
|
3789
|
+
"$ref": "#/components/schemas/Upload"
|
|
3790
|
+
}
|
|
3791
|
+
},
|
|
3792
|
+
"required": [
|
|
3793
|
+
"data"
|
|
3794
|
+
],
|
|
3795
|
+
"additionalProperties": {}
|
|
3796
|
+
},
|
|
3797
|
+
"UploadSignRequest": {
|
|
3798
|
+
"type": "object",
|
|
3799
|
+
"properties": {
|
|
3800
|
+
"method": {
|
|
3801
|
+
"type": "string",
|
|
3802
|
+
"enum": [
|
|
3803
|
+
"GET",
|
|
3804
|
+
"POST",
|
|
3805
|
+
"PUT",
|
|
3806
|
+
"DELETE"
|
|
3807
|
+
]
|
|
3808
|
+
},
|
|
3809
|
+
"key": {
|
|
3810
|
+
"type": "string",
|
|
3811
|
+
"minLength": 1
|
|
3812
|
+
},
|
|
3813
|
+
"uploadId": {
|
|
3814
|
+
"description": "The S3 multipart upload.",
|
|
3815
|
+
"type": "string"
|
|
3816
|
+
},
|
|
3817
|
+
"partNumber": {
|
|
3818
|
+
"type": "integer",
|
|
3819
|
+
"exclusiveMinimum": 0,
|
|
3820
|
+
"maximum": 9007199254740991
|
|
3821
|
+
},
|
|
3822
|
+
"contentType": {
|
|
3823
|
+
"type": "string"
|
|
4097
3824
|
},
|
|
3825
|
+
"expiresIn": {
|
|
3826
|
+
"type": "integer",
|
|
3827
|
+
"exclusiveMinimum": 0,
|
|
3828
|
+
"maximum": 9007199254740991
|
|
3829
|
+
}
|
|
3830
|
+
},
|
|
3831
|
+
"required": [
|
|
3832
|
+
"method",
|
|
3833
|
+
"key"
|
|
3834
|
+
],
|
|
3835
|
+
"additionalProperties": {},
|
|
3836
|
+
"description": "A request of the browser's S3 client to sign (Uppy 6's `signRequest`)."
|
|
3837
|
+
},
|
|
3838
|
+
"UploadSignResponse": {
|
|
3839
|
+
"type": "object",
|
|
3840
|
+
"properties": {
|
|
4098
3841
|
"url": {
|
|
4099
3842
|
"type": "string"
|
|
4100
3843
|
},
|
|
3844
|
+
"key": {
|
|
3845
|
+
"description": "The key the backend chose, for the first request of a file.",
|
|
3846
|
+
"type": "string"
|
|
3847
|
+
},
|
|
3848
|
+
"headers": {
|
|
3849
|
+
"description": "Headers the URL was signed with, which the browser sends.",
|
|
3850
|
+
"type": "object",
|
|
3851
|
+
"propertyNames": {
|
|
3852
|
+
"type": "string"
|
|
3853
|
+
},
|
|
3854
|
+
"additionalProperties": {
|
|
3855
|
+
"type": "string"
|
|
3856
|
+
}
|
|
3857
|
+
},
|
|
3858
|
+
"upload": {
|
|
3859
|
+
"description": "The upload the first request of a file created: `upl_…`.",
|
|
3860
|
+
"type": "string"
|
|
3861
|
+
}
|
|
3862
|
+
},
|
|
3863
|
+
"required": [
|
|
3864
|
+
"url"
|
|
3865
|
+
],
|
|
3866
|
+
"additionalProperties": {},
|
|
3867
|
+
"description": "A presigned request."
|
|
3868
|
+
},
|
|
3869
|
+
"MediaInfo": {
|
|
3870
|
+
"type": "object",
|
|
3871
|
+
"properties": {
|
|
3872
|
+
"type": {
|
|
3873
|
+
"type": "string",
|
|
3874
|
+
"description": "`image`, `video`, `audio`, `document`, `font`, or another type the backend knows."
|
|
3875
|
+
},
|
|
3876
|
+
"mime": {
|
|
3877
|
+
"type": [
|
|
3878
|
+
"string",
|
|
3879
|
+
"null"
|
|
3880
|
+
]
|
|
3881
|
+
},
|
|
3882
|
+
"size": {
|
|
3883
|
+
"anyOf": [
|
|
3884
|
+
{
|
|
3885
|
+
"type": "integer",
|
|
3886
|
+
"minimum": 0,
|
|
3887
|
+
"maximum": 9007199254740991
|
|
3888
|
+
},
|
|
3889
|
+
{
|
|
3890
|
+
"type": "null"
|
|
3891
|
+
}
|
|
3892
|
+
]
|
|
3893
|
+
},
|
|
3894
|
+
"url": {
|
|
3895
|
+
"description": "The main file to show or play: a rendition, or the original until it exists.",
|
|
3896
|
+
"type": [
|
|
3897
|
+
"string",
|
|
3898
|
+
"null"
|
|
3899
|
+
]
|
|
3900
|
+
},
|
|
4101
3901
|
"thumbnailUrl": {
|
|
4102
3902
|
"type": [
|
|
4103
3903
|
"string",
|
|
@@ -4105,6 +3905,7 @@
|
|
|
4105
3905
|
]
|
|
4106
3906
|
},
|
|
4107
3907
|
"variants": {
|
|
3908
|
+
"description": "Named renditions: sizes of an image, qualities of a video.",
|
|
4108
3909
|
"type": "object",
|
|
4109
3910
|
"propertyNames": {
|
|
4110
3911
|
"type": "string"
|
|
@@ -4128,72 +3929,108 @@
|
|
|
4128
3929
|
"additionalProperties": {}
|
|
4129
3930
|
}
|
|
4130
3931
|
},
|
|
3932
|
+
"width": {
|
|
3933
|
+
"type": [
|
|
3934
|
+
"number",
|
|
3935
|
+
"null"
|
|
3936
|
+
]
|
|
3937
|
+
},
|
|
3938
|
+
"height": {
|
|
3939
|
+
"type": [
|
|
3940
|
+
"number",
|
|
3941
|
+
"null"
|
|
3942
|
+
]
|
|
3943
|
+
},
|
|
3944
|
+
"duration": {
|
|
3945
|
+
"description": "In seconds.",
|
|
3946
|
+
"type": [
|
|
3947
|
+
"number",
|
|
3948
|
+
"null"
|
|
3949
|
+
]
|
|
3950
|
+
},
|
|
3951
|
+
"status": {
|
|
3952
|
+
"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.",
|
|
3953
|
+
"type": "string",
|
|
3954
|
+
"enum": [
|
|
3955
|
+
"pending",
|
|
3956
|
+
"processing",
|
|
3957
|
+
"ready",
|
|
3958
|
+
"failed"
|
|
3959
|
+
]
|
|
3960
|
+
},
|
|
4131
3961
|
"metadata": {
|
|
4132
3962
|
"type": "object",
|
|
4133
3963
|
"propertyNames": {
|
|
4134
3964
|
"type": "string"
|
|
4135
3965
|
},
|
|
4136
3966
|
"additionalProperties": {}
|
|
4137
|
-
},
|
|
4138
|
-
"transform": {
|
|
4139
|
-
"anyOf": [
|
|
4140
|
-
{
|
|
4141
|
-
"$ref": "#/components/schemas/MediaTransform"
|
|
4142
|
-
},
|
|
4143
|
-
{
|
|
4144
|
-
"type": "null"
|
|
4145
|
-
}
|
|
4146
|
-
]
|
|
4147
|
-
},
|
|
4148
|
-
"tags": {
|
|
4149
|
-
"type": "array",
|
|
4150
|
-
"items": {
|
|
4151
|
-
"type": "string"
|
|
4152
|
-
}
|
|
4153
3967
|
}
|
|
4154
3968
|
},
|
|
4155
3969
|
"required": [
|
|
4156
|
-
"
|
|
4157
|
-
"version",
|
|
4158
|
-
"abilities",
|
|
4159
|
-
"type",
|
|
4160
|
-
"name",
|
|
4161
|
-
"mime",
|
|
4162
|
-
"size",
|
|
4163
|
-
"url"
|
|
3970
|
+
"type"
|
|
4164
3971
|
],
|
|
4165
|
-
"additionalProperties": {}
|
|
3972
|
+
"additionalProperties": {},
|
|
3973
|
+
"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
3974
|
},
|
|
4167
|
-
"
|
|
3975
|
+
"MediaItem": {
|
|
4168
3976
|
"type": "object",
|
|
4169
3977
|
"properties": {
|
|
4170
|
-
"
|
|
4171
|
-
"$ref": "#/components/schemas/
|
|
3978
|
+
"id": {
|
|
3979
|
+
"$ref": "#/components/schemas/Id"
|
|
3980
|
+
},
|
|
3981
|
+
"version": {
|
|
3982
|
+
"description": "Changes on every update. `null` when the backend has no versions.",
|
|
3983
|
+
"type": [
|
|
3984
|
+
"string",
|
|
3985
|
+
"null"
|
|
3986
|
+
]
|
|
3987
|
+
},
|
|
3988
|
+
"abilities": {
|
|
3989
|
+
"$ref": "#/components/schemas/Abilities"
|
|
3990
|
+
},
|
|
3991
|
+
"media": {
|
|
3992
|
+
"$ref": "#/components/schemas/MediaInfo"
|
|
4172
3993
|
}
|
|
4173
3994
|
},
|
|
4174
3995
|
"required": [
|
|
4175
|
-
"
|
|
3996
|
+
"id",
|
|
3997
|
+
"version",
|
|
3998
|
+
"abilities",
|
|
3999
|
+
"media"
|
|
4176
4000
|
],
|
|
4177
|
-
"additionalProperties": {}
|
|
4001
|
+
"additionalProperties": {},
|
|
4002
|
+
"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
4003
|
},
|
|
4179
|
-
"
|
|
4004
|
+
"MediaReference": {
|
|
4180
4005
|
"type": "object",
|
|
4181
4006
|
"properties": {
|
|
4182
|
-
"
|
|
4183
|
-
"
|
|
4184
|
-
"items": {
|
|
4185
|
-
"$ref": "#/components/schemas/Media"
|
|
4186
|
-
}
|
|
4007
|
+
"id": {
|
|
4008
|
+
"$ref": "#/components/schemas/Id"
|
|
4187
4009
|
},
|
|
4188
|
-
"
|
|
4189
|
-
"
|
|
4010
|
+
"label": {
|
|
4011
|
+
"description": "The `itemTitle` of the media.",
|
|
4012
|
+
"type": "string"
|
|
4013
|
+
},
|
|
4014
|
+
"media": {
|
|
4015
|
+
"$ref": "#/components/schemas/MediaInfo"
|
|
4016
|
+
},
|
|
4017
|
+
"transform": {
|
|
4018
|
+
"description": "The edits of the image for this use only, over those of the media.",
|
|
4019
|
+
"anyOf": [
|
|
4020
|
+
{
|
|
4021
|
+
"$ref": "#/components/schemas/MediaTransform"
|
|
4022
|
+
},
|
|
4023
|
+
{
|
|
4024
|
+
"type": "null"
|
|
4025
|
+
}
|
|
4026
|
+
]
|
|
4190
4027
|
}
|
|
4191
4028
|
},
|
|
4192
4029
|
"required": [
|
|
4193
|
-
"
|
|
4194
|
-
"meta"
|
|
4030
|
+
"id"
|
|
4195
4031
|
],
|
|
4196
|
-
"additionalProperties": {}
|
|
4032
|
+
"additionalProperties": {},
|
|
4033
|
+
"description": "The value of a `media` field in items: the media, with what lists and fields show, and its edits for this use. Requests send the id, or `{ id, transform }`."
|
|
4197
4034
|
},
|
|
4198
4035
|
"Session": {
|
|
4199
4036
|
"type": "object",
|