@visulima/storage 1.0.0-alpha.1 → 1.0.0-alpha.3
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/CHANGELOG.md +30 -0
- package/README.md +33 -14
- package/dist/adapter/nuxt/module.d.ts +39 -0
- package/dist/adapter/nuxt/module.js +93 -0
- package/dist/adapter/nuxt/package.json +20 -0
- package/dist/handler/base/base-handler-core.d.ts +91 -0
- package/dist/handler/base/base-handler-fetch.d.ts +76 -0
- package/dist/handler/base/base-handler-node.d.ts +137 -0
- package/dist/handler/http/fetch/index.d.ts +4 -0
- package/dist/handler/http/fetch/index.js +4 -0
- package/dist/handler/http/hono/index.d.ts +67 -0
- package/dist/handler/http/hono/index.js +65 -0
- package/dist/handler/http/nextjs/index.d.ts +61 -0
- package/dist/handler/http/nextjs/index.js +37 -0
- package/dist/handler/http/node/index.d.ts +4 -0
- package/dist/handler/http/node/index.js +4 -0
- package/dist/handler/http/solid-start/index.d.ts +60 -0
- package/dist/handler/http/solid-start/index.js +44 -0
- package/dist/handler/multipart/multipart-base.d.ts +84 -0
- package/dist/handler/multipart/multipart-fetch.d.ts +64 -0
- package/dist/handler/multipart/multipart.d.ts +49 -0
- package/dist/handler/rest/rest-base.d.ts +106 -0
- package/dist/handler/rest/rest-fetch.d.ts +88 -0
- package/dist/handler/rest/rest.d.ts +93 -0
- package/dist/handler/tus/tus-base.d.ts +152 -0
- package/dist/handler/tus/tus-fetch.d.ts +72 -0
- package/dist/handler/tus/tus.d.ts +78 -0
- package/dist/handler/types.d.ts +53 -0
- package/dist/handler/utils/request-parser.d.ts +72 -0
- package/dist/handler/utils/response-builder.d.ts +83 -0
- package/dist/handler/utils/storage-utils.d.ts +10 -0
- package/dist/handler/utils/stream-utils.d.ts +29 -0
- package/dist/handler/utils/upload-handlers.d.ts +76 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +13 -0
- package/dist/metrics/index.d.ts +2 -0
- package/dist/metrics/no-op-metrics.d.ts +15 -0
- package/dist/metrics/opentelemetry-metrics.d.ts +55 -0
- package/dist/openapi/index.d.ts +5 -0
- package/dist/openapi/index.js +5 -0
- package/dist/openapi/rest.d.ts +7 -0
- package/dist/openapi/shared.d.ts +13 -0
- package/dist/openapi/transform.d.ts +3 -0
- package/dist/openapi/tus.d.ts +7 -0
- package/dist/openapi/xhr.d.ts +7 -0
- package/dist/packem_shared/AwsLightFile-tTneXZgG.js +11 -0
- package/dist/packem_shared/AwsLightMetaStorage-BWSOtVaN.js +4 -0
- package/dist/packem_shared/AwsLightStorage-Blv-GP4v.js +133 -0
- package/dist/packem_shared/AzureFile-CesgFzps.js +8 -0
- package/dist/packem_shared/AzureSMetaStorage-CFs-OYJT.js +88 -0
- package/dist/packem_shared/AzureStorage-B0v048hG.js +357 -0
- package/dist/packem_shared/BaseTransformer-C2gLib6v.js +82 -0
- package/dist/packem_shared/DiskStorage-BlltBst6.js +12 -0
- package/dist/packem_shared/DiskStorageWithChecksum-BJTmMklc.js +238 -0
- package/dist/packem_shared/ERRORS-D0apMqnc.js +97 -0
- package/dist/packem_shared/File-Bb3P23dr.js +69 -0
- package/dist/packem_shared/GCSConfig-vPP22kN6.js +11 -0
- package/dist/packem_shared/GCSFile-BIEunhAN.js +8 -0
- package/dist/packem_shared/GCSMetaStorage-BMFEdzJ7.js +7 -0
- package/dist/packem_shared/GCStorage-DnhiwaS9.js +406 -0
- package/dist/packem_shared/LocalMetaStorage-CZHhKkMd.js +7 -0
- package/dist/packem_shared/MediaTransformer-D6658DL1.js +1197 -0
- package/dist/packem_shared/MetaStorage-pECeFOad.js +46 -0
- package/dist/packem_shared/Metadata-DRLXeJ0F.js +89 -0
- package/dist/packem_shared/Multipart-CNFK_Okz.js +163 -0
- package/dist/packem_shared/Multipart-CtUL7BQw.js +128 -0
- package/dist/packem_shared/NetlifyBlobFile-CXzyjqrD.js +14 -0
- package/dist/packem_shared/NetlifyBlobMetaStorage-DxZ5aDvD.js +9 -0
- package/dist/packem_shared/NetlifyBlobStorage-CLPtjHqd.js +376 -0
- package/dist/packem_shared/NoOpMetrics-DhAk5rXc.js +10 -0
- package/dist/packem_shared/OpenTelemetryMetrics-BnxhqIaH.js +67 -0
- package/dist/packem_shared/Rest-CAOAEkOj.js +267 -0
- package/dist/packem_shared/Rest-DNuLwBrK.js +228 -0
- package/dist/packem_shared/S3File-DZiyk9Qt.js +11 -0
- package/dist/packem_shared/S3MetaStorage-Dz9aDabA.js +76 -0
- package/dist/packem_shared/S3Storage-DHmTk-hU.js +316 -0
- package/dist/packem_shared/TUS_RESUMABLE-GJzZ9R-f.js +434 -0
- package/dist/packem_shared/Tus-B8PmlMgR.js +200 -0
- package/dist/packem_shared/Tus-C4F1aYOl.js +195 -0
- package/dist/packem_shared/ValidationError-BfF1aE4h.js +26 -0
- package/dist/packem_shared/VercelBlobFile-BCg4aTEq.js +18 -0
- package/dist/packem_shared/VercelBlobMetaStorage-Bd9F-VFm.js +9 -0
- package/dist/packem_shared/VercelBlobStorage-DD9LMOS6.js +261 -0
- package/dist/packem_shared/_commonjsHelpers-B85MJLTf.js +5 -0
- package/dist/packem_shared/aws-light-meta-storage-DKJBgbR6.js +446 -0
- package/dist/packem_shared/backblaze-BlMnIcBC.js +20 -0
- package/dist/packem_shared/base-handler-core-BKuf4YLT.js +303 -0
- package/dist/packem_shared/base-handler-fetch-Cr0hLiqg.js +291 -0
- package/dist/packem_shared/base-handler-node-gk5aN9Cx.js +730 -0
- package/dist/packem_shared/cache-B88MXQ_2.js +18 -0
- package/dist/packem_shared/cloudflare-Bi1q8wXE.js +21 -0
- package/dist/packem_shared/defaultCloudStorageFileNameValidation-DUuacjWv.js +11 -0
- package/dist/packem_shared/digitalOcean-CWQRJM3L.js +21 -0
- package/dist/packem_shared/disk-storage-Bh2wy3YW.js +810 -0
- package/dist/packem_shared/gcs-meta-storage-0tgMNnPO.js +158 -0
- package/dist/packem_shared/has-content-CY66ehMK.js +3 -0
- package/dist/packem_shared/headers-DoS5nwM-.js +3220 -0
- package/dist/packem_shared/is-expired-CTThU1q5.js +8 -0
- package/dist/packem_shared/isRetryableError-Dycp7127.js +82 -0
- package/dist/packem_shared/isValidMediaType-BeDgiObq.js +35 -0
- package/dist/packem_shared/local-meta-storage-By-3SNBI.js +649 -0
- package/dist/packem_shared/minio-C2YBZQOw.js +22 -0
- package/dist/packem_shared/multipart-base-B3i67SSX.js +102 -0
- package/dist/packem_shared/part-match-BMNqHDYD.js +96 -0
- package/dist/packem_shared/path-CR6YkPXX-7R1-9CMk.js +161 -0
- package/dist/packem_shared/response-builder-BtnRiBUI.js +45 -0
- package/dist/packem_shared/rest-base-GRCcnan7.js +457 -0
- package/dist/packem_shared/restOpenApiSpec-CwcHHY2C.js +800 -0
- package/dist/packem_shared/s3-base-storage-C1DIHTYY.js +510 -0
- package/dist/packem_shared/sharedGet-Cpo7QUyu.js +1019 -0
- package/dist/packem_shared/storage-C6NSXb8h.js +1175 -0
- package/dist/packem_shared/tigris-Hac8TKnX.js +21 -0
- package/dist/packem_shared/transformOpenApiSpec-DWM5WtnN.js +975 -0
- package/dist/packem_shared/tusOpenApiSpec-6ohiToBy.js +740 -0
- package/dist/packem_shared/update-size-CCGm6i1J.js +8 -0
- package/dist/packem_shared/validator-BeX_lJet.js +78 -0
- package/dist/packem_shared/waitForStorage-Cscw85sx.js +18 -0
- package/dist/packem_shared/wasabi-DIyflHSd.js +21 -0
- package/dist/packem_shared/xhrOpenApiSpec-DS17brnx.js +264 -0
- package/dist/storage/aws/clients/backblaze.d.ts +12 -0
- package/dist/storage/aws/clients/cloudflare.d.ts +13 -0
- package/dist/storage/aws/clients/digital-ocean.d.ts +12 -0
- package/dist/storage/aws/clients/index.d.ts +6 -0
- package/dist/storage/aws/clients/index.js +6 -0
- package/dist/storage/aws/clients/minio.d.ts +13 -0
- package/dist/storage/aws/clients/tigris.d.ts +12 -0
- package/dist/storage/aws/clients/types.d.ts +95 -0
- package/dist/storage/aws/clients/wasabi.d.ts +12 -0
- package/dist/storage/aws/index.d.ts +4 -0
- package/dist/storage/aws/index.js +3 -0
- package/dist/storage/aws/s3-base-storage.d.ts +248 -0
- package/dist/storage/aws/s3-client-adapter.d.ts +110 -0
- package/dist/storage/aws/s3-file.d.ts +10 -0
- package/dist/storage/aws/s3-meta-storage.d.ts +15 -0
- package/dist/storage/aws/s3-storage.d.ts +70 -0
- package/dist/storage/aws/types.d.ts +119 -0
- package/dist/storage/aws-light/aws-light-api-adapter.d.ts +130 -0
- package/dist/storage/aws-light/aws-light-file.d.ts +10 -0
- package/dist/storage/aws-light/aws-light-meta-storage.d.ts +19 -0
- package/dist/storage/aws-light/aws-light-storage.d.ts +65 -0
- package/dist/storage/aws-light/index.d.ts +4 -0
- package/dist/storage/aws-light/index.js +3 -0
- package/dist/storage/aws-light/types.d.ts +37 -0
- package/dist/storage/azure/azure-file.d.ts +6 -0
- package/dist/storage/azure/azure-meta-storage.d.ts +15 -0
- package/dist/storage/azure/azure-storage.d.ts +69 -0
- package/dist/storage/azure/index.d.ts +4 -0
- package/dist/storage/azure/index.js +3 -0
- package/dist/storage/azure/types.d.ts +62 -0
- package/dist/storage/gcs/fetch-error.d.ts +11 -0
- package/dist/storage/gcs/gcs-config.d.ts +2 -0
- package/dist/storage/gcs/gcs-file.d.ts +6 -0
- package/dist/storage/gcs/gcs-meta-storage.d.ts +27 -0
- package/dist/storage/gcs/gcs-storage.d.ts +91 -0
- package/dist/storage/gcs/index.d.ts +5 -0
- package/dist/storage/gcs/index.js +4 -0
- package/dist/storage/gcs/types.d.ts +55 -0
- package/dist/storage/gcs/utils.d.ts +7 -0
- package/dist/storage/local/disk-storage-with-checksum.d.ts +15 -0
- package/dist/storage/local/disk-storage.d.ts +135 -0
- package/dist/storage/local/index.d.ts +4 -0
- package/dist/storage/local/index.js +3 -0
- package/dist/storage/local/local-meta-storage.d.ts +32 -0
- package/dist/storage/meta-storage.d.ts +30 -0
- package/dist/storage/netlify-blob/index.d.ts +4 -0
- package/dist/storage/netlify-blob/index.js +3 -0
- package/dist/storage/netlify-blob/netlify-blob-file.d.ts +12 -0
- package/dist/storage/netlify-blob/netlify-blob-meta-storage.d.ts +7 -0
- package/dist/storage/netlify-blob/netlify-blob-storage.d.ts +93 -0
- package/dist/storage/netlify-blob/types.d.ts +30 -0
- package/dist/storage/storage.d.ts +353 -0
- package/dist/storage/types.d.ts +221 -0
- package/dist/storage/utils/file/file.d.ts +25 -0
- package/dist/storage/utils/file/get-file-status.d.ts +9 -0
- package/dist/storage/utils/file/has-content.d.ts +9 -0
- package/dist/storage/utils/file/index.d.ts +10 -0
- package/dist/storage/utils/file/is-expired.d.ts +8 -0
- package/dist/storage/utils/file/metadata.d.ts +18 -0
- package/dist/storage/utils/file/part-match.d.ts +11 -0
- package/dist/storage/utils/file/types.d.ts +37 -0
- package/dist/storage/utils/file/update-metadata.d.ts +10 -0
- package/dist/storage/utils/file/update-size.d.ts +10 -0
- package/dist/storage/vercel-blob/index.d.ts +4 -0
- package/dist/storage/vercel-blob/index.js +3 -0
- package/dist/storage/vercel-blob/types.d.ts +32 -0
- package/dist/storage/vercel-blob/vercel-blob-file.d.ts +16 -0
- package/dist/storage/vercel-blob/vercel-blob-meta-storage.d.ts +7 -0
- package/dist/storage/vercel-blob/vercel-blob-storage.d.ts +76 -0
- package/dist/transformer/audio-transformer.d.ts +128 -0
- package/dist/transformer/audio-transformer.js +278 -0
- package/dist/transformer/base-transformer.d.ts +63 -0
- package/dist/transformer/image-transformer.d.ts +571 -0
- package/dist/transformer/image-transformer.js +1100 -0
- package/dist/transformer/index.d.ts +5 -0
- package/dist/transformer/index.js +4 -0
- package/dist/transformer/media-transformer.d.ts +332 -0
- package/dist/transformer/types.d.ts +652 -0
- package/dist/transformer/utils.d.ts +33 -0
- package/dist/transformer/validation-error.d.ts +23 -0
- package/dist/transformer/video-transformer.d.ts +145 -0
- package/dist/transformer/video-transformer.js +310 -0
- package/dist/utils/cache.d.ts +32 -0
- package/dist/utils/chunked-upload.d.ts +65 -0
- package/dist/utils/detect-file-type.d.ts +28 -0
- package/dist/utils/errors.d.ts +74 -0
- package/dist/utils/file-path-url-matcher.d.ts +18 -0
- package/dist/utils/headers.d.ts +111 -0
- package/dist/utils/http.d.ts +92 -0
- package/dist/utils/locker.d.ts +26 -0
- package/dist/utils/pipes/stream-checksum.d.ts +47 -0
- package/dist/utils/pipes/stream-length.d.ts +22 -0
- package/dist/utils/primitives/get-last-one.d.ts +3 -0
- package/dist/utils/primitives/is-record.d.ts +2 -0
- package/dist/utils/primitives/map-values.d.ts +9 -0
- package/dist/utils/primitives/pick.d.ts +2 -0
- package/dist/utils/primitives/to-milliseconds.d.ts +12 -0
- package/dist/utils/primitives/to-seconds.d.ts +12 -0
- package/dist/utils/range-checksum.d.ts +33 -0
- package/dist/utils/range-hasher.d.ts +46 -0
- package/dist/utils/retry.d.ts +64 -0
- package/dist/utils/types.d.ts +108 -0
- package/dist/utils/validation-error.d.ts +22 -0
- package/dist/utils/validator.d.ts +36 -0
- package/package.json +5 -5
|
@@ -0,0 +1,800 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createPaginationMetaSchemaObject, createPaginationSchemaObject } from '@visulima/pagination';
|
|
3
|
+
import { sharedGetList, sharedGet, sharedGetMeta, sharedFileMetaSchemaObject, sharedErrorSchemaObject, sharedFileMetaExampleObject } from './sharedGet-Cpo7QUyu.js';
|
|
4
|
+
|
|
5
|
+
const swaggerSpec = (origin, path, options) => {
|
|
6
|
+
const { supportedTransformerFormat, tags, transformer } = { tags: ["REST"], transformer: false, ...options };
|
|
7
|
+
const pathHash = createHash("sha256").update(path).digest("base64");
|
|
8
|
+
return {
|
|
9
|
+
components: {
|
|
10
|
+
examples: sharedFileMetaExampleObject,
|
|
11
|
+
parameters: {
|
|
12
|
+
UploadIDinPath: {
|
|
13
|
+
description: "Upload ID",
|
|
14
|
+
in: "path",
|
|
15
|
+
name: "id",
|
|
16
|
+
schema: {
|
|
17
|
+
type: "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
404: {
|
|
23
|
+
content: {
|
|
24
|
+
"application/json": {
|
|
25
|
+
example: {
|
|
26
|
+
error: {
|
|
27
|
+
code: "FileNotFound",
|
|
28
|
+
message: "Not found"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
schema: {
|
|
32
|
+
$ref: "#/components/schemas/Error"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
description: "Not Found"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
schemas: {
|
|
40
|
+
"X-Chunk-Checksum": {
|
|
41
|
+
description: "SHA256 checksum of the chunk data for validation. Format: 'sha256 <base64-encoded-checksum>'.",
|
|
42
|
+
type: "string"
|
|
43
|
+
},
|
|
44
|
+
"X-Chunk-Offset": {
|
|
45
|
+
description: "Byte offset for the chunk being uploaded. Required for PATCH requests in chunked uploads.",
|
|
46
|
+
type: "integer"
|
|
47
|
+
},
|
|
48
|
+
"X-Chunked-Upload": {
|
|
49
|
+
description: "Header to indicate chunked upload initialization. Set to 'true' to initialize a chunked upload session.",
|
|
50
|
+
enum: ["true"],
|
|
51
|
+
type: "string"
|
|
52
|
+
},
|
|
53
|
+
"X-Chunked-Upload-Response": {
|
|
54
|
+
description: "Indicates this is a chunked upload session. Returned in HEAD responses.",
|
|
55
|
+
enum: ["true"],
|
|
56
|
+
type: "string"
|
|
57
|
+
},
|
|
58
|
+
"X-Received-Chunks": {
|
|
59
|
+
description: "JSON array of received chunk offsets. Used for resumable uploads.",
|
|
60
|
+
type: "string"
|
|
61
|
+
},
|
|
62
|
+
"X-Total-Size": {
|
|
63
|
+
description: "Total size of the file in bytes for chunked uploads. Required when X-Chunked-Upload is 'true'.",
|
|
64
|
+
type: "integer"
|
|
65
|
+
},
|
|
66
|
+
"X-Upload-Complete": {
|
|
67
|
+
description: "Indicates if the upload is complete. Set to 'true' when all chunks have been uploaded.",
|
|
68
|
+
enum: ["true", "false"],
|
|
69
|
+
type: "string"
|
|
70
|
+
},
|
|
71
|
+
"X-Upload-Offset": {
|
|
72
|
+
description: "Current upload offset in bytes. Returned in responses for chunked uploads.",
|
|
73
|
+
type: "integer"
|
|
74
|
+
},
|
|
75
|
+
...createPaginationSchemaObject(
|
|
76
|
+
"FileMetaPagination",
|
|
77
|
+
{
|
|
78
|
+
$ref: "#/components/schemas/PaginationMeta"
|
|
79
|
+
},
|
|
80
|
+
"#/components/schemas/PaginationMeta"
|
|
81
|
+
),
|
|
82
|
+
...createPaginationMetaSchemaObject("PaginationMeta"),
|
|
83
|
+
...sharedErrorSchemaObject,
|
|
84
|
+
...sharedFileMetaSchemaObject
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
paths: {
|
|
88
|
+
[`${path.replace(/\/$/, "")}/{id}/metadata`]: {
|
|
89
|
+
get: sharedGetMeta(`${pathHash}RestGetFileMeta`, tags)
|
|
90
|
+
},
|
|
91
|
+
[`${path.replace(/\/$/, "")}/{id}`]: {
|
|
92
|
+
delete: {
|
|
93
|
+
description: "Delete a single file",
|
|
94
|
+
operationId: `${pathHash}RestDeleteFile`,
|
|
95
|
+
parameters: [
|
|
96
|
+
{
|
|
97
|
+
$ref: "#/components/parameters/UploadIDinPath"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
responses: {
|
|
101
|
+
204: {
|
|
102
|
+
description: "No Content - File deleted successfully"
|
|
103
|
+
},
|
|
104
|
+
404: {
|
|
105
|
+
$ref: "#/components/responses/404"
|
|
106
|
+
},
|
|
107
|
+
default: {
|
|
108
|
+
content: {
|
|
109
|
+
"application/json": {
|
|
110
|
+
schema: {
|
|
111
|
+
$ref: "#/components/schemas/Error"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
description: "Error"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
summary: "Delete file",
|
|
119
|
+
tags
|
|
120
|
+
},
|
|
121
|
+
get: sharedGet(`${pathHash}RestGetFile`, tags, transformer, supportedTransformerFormat),
|
|
122
|
+
head: {
|
|
123
|
+
description: "Get file metadata and upload progress. For chunked uploads, returns progress information including current offset and completion status.",
|
|
124
|
+
operationId: `${pathHash}RestHeadFile`,
|
|
125
|
+
parameters: [
|
|
126
|
+
{
|
|
127
|
+
$ref: "#/components/parameters/UploadIDinPath"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
responses: {
|
|
131
|
+
200: {
|
|
132
|
+
description: "OK",
|
|
133
|
+
headers: {
|
|
134
|
+
"Content-Length": {
|
|
135
|
+
description: "File size in bytes",
|
|
136
|
+
schema: {
|
|
137
|
+
type: "integer"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"Content-Type": {
|
|
141
|
+
description: "MIME type of the file",
|
|
142
|
+
schema: {
|
|
143
|
+
type: "string"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
ETag: {
|
|
147
|
+
description: "Entity tag for caching",
|
|
148
|
+
schema: {
|
|
149
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
150
|
+
type: "string"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"Last-Modified": {
|
|
154
|
+
description: "Last modified date",
|
|
155
|
+
schema: {
|
|
156
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
157
|
+
format: "date-time",
|
|
158
|
+
type: "string"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"X-Chunked-Upload": {
|
|
162
|
+
description: "Indicates this is a chunked upload session",
|
|
163
|
+
schema: {
|
|
164
|
+
$ref: "#/components/schemas/X-Chunked-Upload-Response"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"X-Received-Chunks": {
|
|
168
|
+
description: "JSON array of received chunk offsets (chunked uploads only)",
|
|
169
|
+
schema: {
|
|
170
|
+
$ref: "#/components/schemas/X-Received-Chunks"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"X-Upload-Complete": {
|
|
174
|
+
description: "Indicates if upload is complete (chunked uploads only)",
|
|
175
|
+
schema: {
|
|
176
|
+
$ref: "#/components/schemas/X-Upload-Complete"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"X-Upload-Expires": {
|
|
180
|
+
description: "Upload expiration date",
|
|
181
|
+
schema: {
|
|
182
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
183
|
+
format: "date-time",
|
|
184
|
+
type: "string"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"X-Upload-Offset": {
|
|
188
|
+
description: "Current upload offset in bytes (chunked uploads only)",
|
|
189
|
+
schema: {
|
|
190
|
+
$ref: "#/components/schemas/X-Upload-Offset"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
404: {
|
|
196
|
+
$ref: "#/components/responses/404"
|
|
197
|
+
},
|
|
198
|
+
default: {
|
|
199
|
+
content: {
|
|
200
|
+
"application/json": {
|
|
201
|
+
schema: {
|
|
202
|
+
$ref: "#/components/schemas/Error"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
description: "Error"
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
summary: "Get file metadata",
|
|
210
|
+
tags
|
|
211
|
+
},
|
|
212
|
+
patch: {
|
|
213
|
+
description: "Upload a chunk for chunked uploads. Requires X-Chunk-Offset header and chunk data in the request body.",
|
|
214
|
+
operationId: `${pathHash}RestPatchChunk`,
|
|
215
|
+
parameters: [
|
|
216
|
+
{
|
|
217
|
+
$ref: "#/components/parameters/UploadIDinPath"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
description: "Byte offset for this chunk",
|
|
221
|
+
in: "header",
|
|
222
|
+
name: "X-Chunk-Offset",
|
|
223
|
+
required: true,
|
|
224
|
+
schema: {
|
|
225
|
+
$ref: "#/components/schemas/X-Chunk-Offset"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
description: "SHA256 checksum of the chunk (optional)",
|
|
230
|
+
in: "header",
|
|
231
|
+
name: "X-Chunk-Checksum",
|
|
232
|
+
required: false,
|
|
233
|
+
schema: {
|
|
234
|
+
$ref: "#/components/schemas/X-Chunk-Checksum"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
requestBody: {
|
|
239
|
+
content: {
|
|
240
|
+
"application/octet-stream": {
|
|
241
|
+
description: "Chunk data as raw binary",
|
|
242
|
+
schema: {
|
|
243
|
+
format: "binary",
|
|
244
|
+
type: "string"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
description: "Chunk data",
|
|
249
|
+
required: true
|
|
250
|
+
},
|
|
251
|
+
responses: {
|
|
252
|
+
200: {
|
|
253
|
+
description: "Chunk uploaded successfully",
|
|
254
|
+
headers: {
|
|
255
|
+
ETag: {
|
|
256
|
+
description: "Upload ETag",
|
|
257
|
+
schema: {
|
|
258
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
259
|
+
type: "string"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
Location: {
|
|
263
|
+
description: "File URL",
|
|
264
|
+
schema: {
|
|
265
|
+
example: `${origin}${path}/file-id`,
|
|
266
|
+
format: "uri",
|
|
267
|
+
type: "string"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"X-Upload-Complete": {
|
|
271
|
+
description: "Indicates if upload is complete",
|
|
272
|
+
schema: {
|
|
273
|
+
$ref: "#/components/schemas/X-Upload-Complete"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"X-Upload-Expires": {
|
|
277
|
+
description: "Upload expiration date",
|
|
278
|
+
schema: {
|
|
279
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
280
|
+
format: "date-time",
|
|
281
|
+
type: "string"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"X-Upload-Offset": {
|
|
285
|
+
description: "Current upload offset after this chunk",
|
|
286
|
+
schema: {
|
|
287
|
+
$ref: "#/components/schemas/X-Upload-Offset"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
201: {
|
|
293
|
+
description: "Upload completed (all chunks received)",
|
|
294
|
+
headers: {
|
|
295
|
+
ETag: {
|
|
296
|
+
description: "Upload ETag",
|
|
297
|
+
schema: {
|
|
298
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
299
|
+
type: "string"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
Location: {
|
|
303
|
+
description: "File URL",
|
|
304
|
+
schema: {
|
|
305
|
+
example: `${origin}${path}/file-id`,
|
|
306
|
+
format: "uri",
|
|
307
|
+
type: "string"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"X-Upload-Complete": {
|
|
311
|
+
description: "Upload is complete",
|
|
312
|
+
schema: {
|
|
313
|
+
enum: ["true"],
|
|
314
|
+
type: "string"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"X-Upload-Expires": {
|
|
318
|
+
description: "Upload expiration date",
|
|
319
|
+
schema: {
|
|
320
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
321
|
+
format: "date-time",
|
|
322
|
+
type: "string"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
400: {
|
|
328
|
+
content: {
|
|
329
|
+
"application/json": {
|
|
330
|
+
example: {
|
|
331
|
+
error: {
|
|
332
|
+
code: "BadRequest",
|
|
333
|
+
message: "X-Chunk-Offset header is required"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
schema: {
|
|
337
|
+
$ref: "#/components/schemas/Error"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
description: "Bad Request"
|
|
342
|
+
},
|
|
343
|
+
404: {
|
|
344
|
+
content: {
|
|
345
|
+
"application/json": {
|
|
346
|
+
example: {
|
|
347
|
+
error: {
|
|
348
|
+
code: "FileNotFound",
|
|
349
|
+
message: "Upload session not found"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
schema: {
|
|
353
|
+
$ref: "#/components/schemas/Error"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
description: "Not Found"
|
|
358
|
+
},
|
|
359
|
+
413: {
|
|
360
|
+
content: {
|
|
361
|
+
"application/json": {
|
|
362
|
+
example: {
|
|
363
|
+
error: {
|
|
364
|
+
code: "RequestEntityTooLarge",
|
|
365
|
+
message: "Chunk size exceeds maximum allowed size of 104857600 bytes"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
schema: {
|
|
369
|
+
$ref: "#/components/schemas/Error"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
description: "Request Entity Too Large"
|
|
374
|
+
},
|
|
375
|
+
default: {
|
|
376
|
+
content: {
|
|
377
|
+
"application/json": {
|
|
378
|
+
schema: {
|
|
379
|
+
$ref: "#/components/schemas/Error"
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
description: "Error"
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
summary: "Upload chunk",
|
|
387
|
+
tags
|
|
388
|
+
},
|
|
389
|
+
put: {
|
|
390
|
+
description: "Create or update a file. Requires file ID in the URL path. If file exists, it will be overwritten.",
|
|
391
|
+
operationId: `${pathHash}RestPutFile`,
|
|
392
|
+
parameters: [
|
|
393
|
+
{
|
|
394
|
+
$ref: "#/components/parameters/UploadIDinPath"
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
requestBody: {
|
|
398
|
+
content: {
|
|
399
|
+
"application/octet-stream": {
|
|
400
|
+
description: "File data as raw binary",
|
|
401
|
+
schema: {
|
|
402
|
+
format: "binary",
|
|
403
|
+
type: "string"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
description: "File data",
|
|
408
|
+
required: true
|
|
409
|
+
},
|
|
410
|
+
responses: {
|
|
411
|
+
200: {
|
|
412
|
+
description: "File updated successfully",
|
|
413
|
+
headers: {
|
|
414
|
+
ETag: {
|
|
415
|
+
description: "Upload ETag",
|
|
416
|
+
schema: {
|
|
417
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
418
|
+
type: "string"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
Location: {
|
|
422
|
+
description: "File URL",
|
|
423
|
+
schema: {
|
|
424
|
+
example: `${origin}${path}/file-id`,
|
|
425
|
+
format: "uri",
|
|
426
|
+
type: "string"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"X-Upload-Expires": {
|
|
430
|
+
description: "Upload expiration date",
|
|
431
|
+
schema: {
|
|
432
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
433
|
+
format: "date-time",
|
|
434
|
+
type: "string"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
201: {
|
|
440
|
+
description: "File created successfully",
|
|
441
|
+
headers: {
|
|
442
|
+
ETag: {
|
|
443
|
+
description: "Upload ETag",
|
|
444
|
+
schema: {
|
|
445
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
446
|
+
type: "string"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
Location: {
|
|
450
|
+
description: "File URL",
|
|
451
|
+
schema: {
|
|
452
|
+
example: `${origin}${path}/file-id`,
|
|
453
|
+
format: "uri",
|
|
454
|
+
type: "string"
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"X-Upload-Expires": {
|
|
458
|
+
description: "Upload expiration date",
|
|
459
|
+
schema: {
|
|
460
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
461
|
+
format: "date-time",
|
|
462
|
+
type: "string"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
400: {
|
|
468
|
+
content: {
|
|
469
|
+
"application/json": {
|
|
470
|
+
example: {
|
|
471
|
+
error: {
|
|
472
|
+
code: "BadRequest",
|
|
473
|
+
message: "Request body is required"
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
schema: {
|
|
477
|
+
$ref: "#/components/schemas/Error"
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
description: "Bad Request"
|
|
482
|
+
},
|
|
483
|
+
413: {
|
|
484
|
+
content: {
|
|
485
|
+
"application/json": {
|
|
486
|
+
example: {
|
|
487
|
+
error: {
|
|
488
|
+
code: "RequestEntityTooLarge",
|
|
489
|
+
message: "File size exceeds maximum allowed size"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
schema: {
|
|
493
|
+
$ref: "#/components/schemas/Error"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
description: "Request Entity Too Large"
|
|
498
|
+
},
|
|
499
|
+
default: {
|
|
500
|
+
content: {
|
|
501
|
+
"application/json": {
|
|
502
|
+
schema: {
|
|
503
|
+
$ref: "#/components/schemas/Error"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
description: "Error"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
summary: "Create or update file",
|
|
511
|
+
tags
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
[path.trimEnd()]: {
|
|
515
|
+
delete: {
|
|
516
|
+
description: 'Delete multiple files. Supports batch delete via query parameter (?ids=id1,id2,id3) or JSON body ({ids: ["id1", "id2"]} or ["id1", "id2"]).',
|
|
517
|
+
operationId: `${pathHash}RestBatchDelete`,
|
|
518
|
+
parameters: [
|
|
519
|
+
{
|
|
520
|
+
description: "Comma-separated list of file IDs to delete",
|
|
521
|
+
in: "query",
|
|
522
|
+
name: "ids",
|
|
523
|
+
required: false,
|
|
524
|
+
schema: {
|
|
525
|
+
example: "id1,id2,id3",
|
|
526
|
+
type: "string"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
requestBody: {
|
|
531
|
+
content: {
|
|
532
|
+
"application/json": {
|
|
533
|
+
schema: {
|
|
534
|
+
oneOf: [
|
|
535
|
+
{
|
|
536
|
+
properties: {
|
|
537
|
+
ids: {
|
|
538
|
+
description: "Array of file IDs to delete",
|
|
539
|
+
items: {
|
|
540
|
+
type: "string"
|
|
541
|
+
},
|
|
542
|
+
type: "array"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
required: ["ids"],
|
|
546
|
+
type: "object"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
description: "Array of file IDs to delete",
|
|
550
|
+
items: {
|
|
551
|
+
type: "string"
|
|
552
|
+
},
|
|
553
|
+
type: "array"
|
|
554
|
+
}
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
description: "File IDs to delete (optional if using query parameter)",
|
|
560
|
+
required: false
|
|
561
|
+
},
|
|
562
|
+
responses: {
|
|
563
|
+
204: {
|
|
564
|
+
description: "All files deleted successfully"
|
|
565
|
+
},
|
|
566
|
+
207: {
|
|
567
|
+
description: "Multi-Status - Some files deleted successfully",
|
|
568
|
+
headers: {
|
|
569
|
+
"X-Delete-Errors": {
|
|
570
|
+
description: "JSON array of deletion errors",
|
|
571
|
+
schema: {
|
|
572
|
+
type: "string"
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"X-Delete-Failed": {
|
|
576
|
+
description: "Number of files that failed to delete",
|
|
577
|
+
schema: {
|
|
578
|
+
type: "integer"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
"X-Delete-Successful": {
|
|
582
|
+
description: "Number of files successfully deleted",
|
|
583
|
+
schema: {
|
|
584
|
+
type: "integer"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
400: {
|
|
590
|
+
content: {
|
|
591
|
+
"application/json": {
|
|
592
|
+
example: {
|
|
593
|
+
error: {
|
|
594
|
+
code: "BadRequest",
|
|
595
|
+
message: "No file IDs provided"
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
schema: {
|
|
599
|
+
$ref: "#/components/schemas/Error"
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
description: "Bad Request"
|
|
604
|
+
},
|
|
605
|
+
404: {
|
|
606
|
+
content: {
|
|
607
|
+
"application/json": {
|
|
608
|
+
example: {
|
|
609
|
+
error: {
|
|
610
|
+
code: "FileNotFound",
|
|
611
|
+
message: "Failed to delete files: id1, id2"
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
schema: {
|
|
615
|
+
$ref: "#/components/schemas/Error"
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
},
|
|
619
|
+
description: "Not Found"
|
|
620
|
+
},
|
|
621
|
+
default: {
|
|
622
|
+
content: {
|
|
623
|
+
"application/json": {
|
|
624
|
+
schema: {
|
|
625
|
+
$ref: "#/components/schemas/Error"
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
description: "Error"
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
summary: "Batch delete files",
|
|
633
|
+
tags
|
|
634
|
+
},
|
|
635
|
+
get: sharedGetList(`${pathHash}RestGetList`, tags),
|
|
636
|
+
post: {
|
|
637
|
+
description: "Upload a file with raw binary data or initialize a chunked upload session. For chunked uploads, set X-Chunked-Upload: true and X-Total-Size headers.",
|
|
638
|
+
operationId: `${pathHash}RestPostFile`,
|
|
639
|
+
parameters: [
|
|
640
|
+
{
|
|
641
|
+
description: "Set to 'true' to initialize a chunked upload session",
|
|
642
|
+
in: "header",
|
|
643
|
+
name: "X-Chunked-Upload",
|
|
644
|
+
required: false,
|
|
645
|
+
schema: {
|
|
646
|
+
$ref: "#/components/schemas/X-Chunked-Upload"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
description: "Total size of the file in bytes (required for chunked uploads)",
|
|
651
|
+
in: "header",
|
|
652
|
+
name: "X-Total-Size",
|
|
653
|
+
required: false,
|
|
654
|
+
schema: {
|
|
655
|
+
$ref: "#/components/schemas/X-Total-Size"
|
|
656
|
+
}
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
description: "Optional filename",
|
|
660
|
+
in: "header",
|
|
661
|
+
name: "Content-Disposition",
|
|
662
|
+
required: false,
|
|
663
|
+
schema: {
|
|
664
|
+
example: 'attachment; filename="photo.jpg"',
|
|
665
|
+
type: "string"
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
description: "Optional JSON metadata",
|
|
670
|
+
in: "header",
|
|
671
|
+
name: "X-File-Metadata",
|
|
672
|
+
required: false,
|
|
673
|
+
schema: {
|
|
674
|
+
example: '{"description":"My photo"}',
|
|
675
|
+
type: "string"
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
],
|
|
679
|
+
requestBody: {
|
|
680
|
+
content: {
|
|
681
|
+
"application/octet-stream": {
|
|
682
|
+
description: "File data as raw binary. For chunked upload initialization, body can be empty.",
|
|
683
|
+
schema: {
|
|
684
|
+
format: "binary",
|
|
685
|
+
type: "string"
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
description: "File data (optional for chunked upload initialization)",
|
|
690
|
+
required: false
|
|
691
|
+
},
|
|
692
|
+
responses: {
|
|
693
|
+
200: {
|
|
694
|
+
description: "The file already exists, send a resume request",
|
|
695
|
+
headers: {
|
|
696
|
+
ETag: {
|
|
697
|
+
description: "Upload ETag",
|
|
698
|
+
schema: {
|
|
699
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
700
|
+
type: "string"
|
|
701
|
+
}
|
|
702
|
+
},
|
|
703
|
+
Location: {
|
|
704
|
+
description: "File URL",
|
|
705
|
+
schema: {
|
|
706
|
+
example: `${origin}${path}/file-id`,
|
|
707
|
+
format: "uri",
|
|
708
|
+
type: "string"
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"X-Upload-Expires": {
|
|
712
|
+
description: "Upload expiration date",
|
|
713
|
+
schema: {
|
|
714
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
715
|
+
format: "date-time",
|
|
716
|
+
type: "string"
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
},
|
|
721
|
+
201: {
|
|
722
|
+
description: "File uploaded successfully or chunked upload session initialized",
|
|
723
|
+
headers: {
|
|
724
|
+
ETag: {
|
|
725
|
+
description: "Upload ETag",
|
|
726
|
+
schema: {
|
|
727
|
+
example: "d41d8cd98f00b204e9800998ecf8427e",
|
|
728
|
+
type: "string"
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
Location: {
|
|
732
|
+
description: "File URL or chunked upload session URL",
|
|
733
|
+
schema: {
|
|
734
|
+
example: `${origin}${path}/file-id`,
|
|
735
|
+
format: "uri",
|
|
736
|
+
type: "string"
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
"X-Upload-Expires": {
|
|
740
|
+
description: "Upload expiration date",
|
|
741
|
+
schema: {
|
|
742
|
+
example: "2021-08-25T11:12:26.635Z",
|
|
743
|
+
format: "date-time",
|
|
744
|
+
type: "string"
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
400: {
|
|
750
|
+
content: {
|
|
751
|
+
"application/json": {
|
|
752
|
+
example: {
|
|
753
|
+
error: {
|
|
754
|
+
code: "BadRequest",
|
|
755
|
+
message: "Request body is required for non-chunked uploads"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
schema: {
|
|
759
|
+
$ref: "#/components/schemas/Error"
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
description: "Bad Request"
|
|
764
|
+
},
|
|
765
|
+
413: {
|
|
766
|
+
content: {
|
|
767
|
+
"application/json": {
|
|
768
|
+
example: {
|
|
769
|
+
error: {
|
|
770
|
+
code: "RequestEntityTooLarge",
|
|
771
|
+
message: "File size exceeds maximum allowed size"
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
schema: {
|
|
775
|
+
$ref: "#/components/schemas/Error"
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
description: "Request Entity Too Large"
|
|
780
|
+
},
|
|
781
|
+
default: {
|
|
782
|
+
content: {
|
|
783
|
+
"application/json": {
|
|
784
|
+
schema: {
|
|
785
|
+
$ref: "#/components/schemas/Error"
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
},
|
|
789
|
+
description: "Error"
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
summary: "Upload file or initialize chunked upload",
|
|
793
|
+
tags
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
export { swaggerSpec as default };
|