@visulima/storage-client 1.0.0-alpha.1
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 +10 -0
- package/LICENSE.md +27 -0
- package/README.md +71 -0
- package/dist/core/chunked-rest-adapter.d.ts +43 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/multipart-adapter.d.ts +34 -0
- package/dist/core/query-client.d.ts +57 -0
- package/dist/core/query-keys.d.ts +34 -0
- package/dist/core/tus-adapter.d.ts +43 -0
- package/dist/core/uploader.d.ts +183 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/packem_shared/createAbortAll-B5vFFliA.js +1 -0
- package/dist/packem_shared/createAbortAll-D-x-LWNg.js +1 -0
- package/dist/packem_shared/createAbortBatch-CYtSbWfz.js +1 -0
- package/dist/packem_shared/createAbortBatch-zA0PTnOB.js +1 -0
- package/dist/packem_shared/createAbortItem-0f0bigbq.js +1 -0
- package/dist/packem_shared/createAbortItem-CIRlRD4X.js +1 -0
- package/dist/packem_shared/createAllAbortListener-CDrnG87k.js +1 -0
- package/dist/packem_shared/createAllAbortListener-CYLEWan0.js +1 -0
- package/dist/packem_shared/createBatchCancelledListener-Deq8lrIn.js +1 -0
- package/dist/packem_shared/createBatchCancelledListener-l9c0mi15.js +1 -0
- package/dist/packem_shared/createBatchDeleteFiles-B0SYSdYj.js +1 -0
- package/dist/packem_shared/createBatchDeleteFiles-Z4S-30eN.js +1 -0
- package/dist/packem_shared/createBatchErrorListener-CGJPEngL.js +1 -0
- package/dist/packem_shared/createBatchErrorListener-CJQFdXW2.js +1 -0
- package/dist/packem_shared/createBatchFinalizeListener-B2rEps7g.js +1 -0
- package/dist/packem_shared/createBatchFinalizeListener-Og0rELSL.js +1 -0
- package/dist/packem_shared/createBatchFinishListener-BeE6-b6E.js +1 -0
- package/dist/packem_shared/createBatchFinishListener-D9AOd6Cl.js +1 -0
- package/dist/packem_shared/createBatchProgressListener-1KpCpw7e.js +1 -0
- package/dist/packem_shared/createBatchProgressListener-BWW_tnse.js +1 -0
- package/dist/packem_shared/createBatchRetry-6E_Ivzh4.js +1 -0
- package/dist/packem_shared/createBatchRetry-D_F4v9oA.js +1 -0
- package/dist/packem_shared/createBatchStartListener-CkcMX3tq.js +1 -0
- package/dist/packem_shared/createBatchStartListener-DBHjoANG.js +1 -0
- package/dist/packem_shared/createBatchUpload-8yahZiID.js +1 -0
- package/dist/packem_shared/createBatchUpload-DWcVWF9h.js +1 -0
- package/dist/packem_shared/createChunkedRestAdapter-Df1E_Adn.js +1 -0
- package/dist/packem_shared/createChunkedRestUpload-CJNQp68Z.js +1 -0
- package/dist/packem_shared/createChunkedRestUpload-DZIOry7M.js +1 -0
- package/dist/packem_shared/createDeleteFile-DsUMoSxn.js +1 -0
- package/dist/packem_shared/createDeleteFile-_Znrnika.js +1 -0
- package/dist/packem_shared/createFileInput-B7WPz_-r.js +1 -0
- package/dist/packem_shared/createFileInput-TTI-EsSq.js +1 -0
- package/dist/packem_shared/createGetFile-BOV5S7mX.js +1 -0
- package/dist/packem_shared/createGetFile-CY2ohQF-.js +1 -0
- package/dist/packem_shared/createGetFileList-DGZQymc5.js +1 -0
- package/dist/packem_shared/createGetFileList-ZF0Luf6h.js +1 -0
- package/dist/packem_shared/createGetFileMeta-50LymNvf.js +1 -0
- package/dist/packem_shared/createGetFileMeta-DmC_OvP4.js +1 -0
- package/dist/packem_shared/createHeadFile-CGD6bHDS.js +1 -0
- package/dist/packem_shared/createHeadFile-DYb9FeQ1.js +1 -0
- package/dist/packem_shared/createMultipartAdapter-CoJpvX9z.js +1 -0
- package/dist/packem_shared/createMultipartUpload-CTats5BN.js +1 -0
- package/dist/packem_shared/createMultipartUpload-DF3XyOX3.js +1 -0
- package/dist/packem_shared/createPasteUpload-BS7pMOvb.js +1 -0
- package/dist/packem_shared/createPasteUpload-DemCREgp.js +1 -0
- package/dist/packem_shared/createPatchChunk-DqCMbHjI.js +1 -0
- package/dist/packem_shared/createPatchChunk-Zy6I60LN.js +1 -0
- package/dist/packem_shared/createPutFile-D8hN-9Ai.js +1 -0
- package/dist/packem_shared/createPutFile-DJraow7z.js +1 -0
- package/dist/packem_shared/createRetry-DPaN9i_a.js +1 -0
- package/dist/packem_shared/createRetry-D_fXIQUj.js +1 -0
- package/dist/packem_shared/createRetryListener-DonB2P-g.js +1 -0
- package/dist/packem_shared/createRetryListener-bMqMm13Y.js +1 -0
- package/dist/packem_shared/createTransformFile-C2fVfiwL.js +1 -0
- package/dist/packem_shared/createTransformFile-CJXLJEfg.js +1 -0
- package/dist/packem_shared/createTransformMetadata-BImjFF_i.js +1 -0
- package/dist/packem_shared/createTransformMetadata-zyl5UymO.js +1 -0
- package/dist/packem_shared/createTusAdapter-DM31lujI.js +1 -0
- package/dist/packem_shared/createTusUpload-BoM0S0Or.js +1 -0
- package/dist/packem_shared/createTusUpload-ClmXqmcz.js +1 -0
- package/dist/packem_shared/createUpload-CuZqq0nu.js +1 -0
- package/dist/packem_shared/createUpload-LRQ4N_cF.js +1 -0
- package/dist/packem_shared/createUploader-B_IjjBxw.js +1 -0
- package/dist/packem_shared/parseApiError-CUagSahh.js +1 -0
- package/dist/packem_shared/storageQueryKeys-cD4rL4b1.js +1 -0
- package/dist/packem_shared/useAbortAll-DeTTc8gX.js +1 -0
- package/dist/packem_shared/useAbortAll-DrHBz3kQ.js +1 -0
- package/dist/packem_shared/useAbortBatch-BoXLZH9d.js +1 -0
- package/dist/packem_shared/useAbortBatch-gVI48Gqa.js +1 -0
- package/dist/packem_shared/useAbortItem-Blw0eI13.js +1 -0
- package/dist/packem_shared/useAbortItem-DOVDiZFG.js +1 -0
- package/dist/packem_shared/useAllAbortListener-CadZ6Ohd.js +1 -0
- package/dist/packem_shared/useAllAbortListener-DiliYPra.js +1 -0
- package/dist/packem_shared/useBatchCancelledListener-CADhAnT8.js +1 -0
- package/dist/packem_shared/useBatchCancelledListener-CD0CULd_.js +1 -0
- package/dist/packem_shared/useBatchDeleteFiles-ASYuAVXn.js +1 -0
- package/dist/packem_shared/useBatchDeleteFiles-KthW4bon.js +1 -0
- package/dist/packem_shared/useBatchErrorListener-C3KwlH_D.js +1 -0
- package/dist/packem_shared/useBatchErrorListener-D-M1xGbQ.js +1 -0
- package/dist/packem_shared/useBatchFinalizeListener-BjnW3Lst.js +1 -0
- package/dist/packem_shared/useBatchFinalizeListener-CuVe9PGl.js +1 -0
- package/dist/packem_shared/useBatchFinishListener-4RjAPVhl.js +1 -0
- package/dist/packem_shared/useBatchFinishListener-DedP4Rm_.js +1 -0
- package/dist/packem_shared/useBatchProgressListener-CBAjGzmu.js +1 -0
- package/dist/packem_shared/useBatchProgressListener-CoYeF3Zj.js +1 -0
- package/dist/packem_shared/useBatchRetry-C53msBuL.js +1 -0
- package/dist/packem_shared/useBatchRetry-CAqFm7V8.js +1 -0
- package/dist/packem_shared/useBatchStartListener-BAOxxo1Y.js +1 -0
- package/dist/packem_shared/useBatchStartListener-DwAzFph7.js +1 -0
- package/dist/packem_shared/useBatchUpload-DLQNW410.js +1 -0
- package/dist/packem_shared/useBatchUpload-xPQlYOIK.js +1 -0
- package/dist/packem_shared/useChunkedRestUpload-DmXiSpyb.js +1 -0
- package/dist/packem_shared/useChunkedRestUpload-cKHvYQN3.js +1 -0
- package/dist/packem_shared/useDeleteFile-CND-6aNW.js +1 -0
- package/dist/packem_shared/useDeleteFile-CZUMjbYV.js +1 -0
- package/dist/packem_shared/useFileInput-Dvy2fNU7.js +1 -0
- package/dist/packem_shared/useFileInput-hIbzJ_JN.js +1 -0
- package/dist/packem_shared/useGetFile-CuST4rUN.js +1 -0
- package/dist/packem_shared/useGetFile-DvgluPgA.js +1 -0
- package/dist/packem_shared/useGetFileList-BiYDlEAl.js +1 -0
- package/dist/packem_shared/useGetFileList-D0tKDYAc.js +1 -0
- package/dist/packem_shared/useGetFileMeta-C2U1PExr.js +1 -0
- package/dist/packem_shared/useGetFileMeta-Ekre98Sg.js +1 -0
- package/dist/packem_shared/useHeadFile-CCu61b-B.js +1 -0
- package/dist/packem_shared/useHeadFile-DBQdkWZG.js +1 -0
- package/dist/packem_shared/useMultipartUpload-B9Vi7f5z.js +1 -0
- package/dist/packem_shared/useMultipartUpload-CIp4NLzf.js +1 -0
- package/dist/packem_shared/usePasteUpload-COdUC9xU.js +1 -0
- package/dist/packem_shared/usePasteUpload-_YqkCkrL.js +1 -0
- package/dist/packem_shared/usePatchChunk-BO3S0Tx4.js +1 -0
- package/dist/packem_shared/usePatchChunk-DoKsCbBH.js +1 -0
- package/dist/packem_shared/usePutFile-B6cFjClD.js +1 -0
- package/dist/packem_shared/usePutFile-bQl10v42.js +1 -0
- package/dist/packem_shared/useRetry-Dsq4jvkt.js +1 -0
- package/dist/packem_shared/useRetry-mkTUERYR.js +1 -0
- package/dist/packem_shared/useRetryListener-B45dL00Q.js +1 -0
- package/dist/packem_shared/useRetryListener-BEONt1sx.js +1 -0
- package/dist/packem_shared/useTransformFile-DmfsqTjp.js +1 -0
- package/dist/packem_shared/useTransformFile-sIkJLAwo.js +1 -0
- package/dist/packem_shared/useTransformMetadata-B0JbX1Ni.js +1 -0
- package/dist/packem_shared/useTransformMetadata-DK1561-K.js +1 -0
- package/dist/packem_shared/useTusUpload-CDRjQl0e.js +1 -0
- package/dist/packem_shared/useTusUpload-Cn1UeWo4.js +1 -0
- package/dist/packem_shared/useUpload-B_RxNnHC.js +1 -0
- package/dist/packem_shared/useUpload-CjLWLpyn.js +1 -0
- package/dist/react/index.d.ts +61 -0
- package/dist/react/index.js +1 -0
- package/dist/react/types.d.ts +65 -0
- package/dist/react/use-abort-all.d.ts +16 -0
- package/dist/react/use-abort-batch.d.ts +16 -0
- package/dist/react/use-abort-item.d.ts +16 -0
- package/dist/react/use-all-abort-listener.d.ts +14 -0
- package/dist/react/use-batch-cancelled-listener.d.ts +14 -0
- package/dist/react/use-batch-delete-files.d.ts +32 -0
- package/dist/react/use-batch-error-listener.d.ts +14 -0
- package/dist/react/use-batch-finalize-listener.d.ts +15 -0
- package/dist/react/use-batch-finish-listener.d.ts +14 -0
- package/dist/react/use-batch-progress-listener.d.ts +14 -0
- package/dist/react/use-batch-retry.d.ts +16 -0
- package/dist/react/use-batch-start-listener.d.ts +14 -0
- package/dist/react/use-batch-upload.d.ts +42 -0
- package/dist/react/use-chunked-rest-upload.d.ts +55 -0
- package/dist/react/use-delete-file.d.ts +25 -0
- package/dist/react/use-file-input.d.ts +32 -0
- package/dist/react/use-get-file-list.d.ts +46 -0
- package/dist/react/use-get-file-meta.d.ts +29 -0
- package/dist/react/use-get-file.d.ts +34 -0
- package/dist/react/use-head-file.d.ts +49 -0
- package/dist/react/use-multipart-upload.d.ts +35 -0
- package/dist/react/use-paste-upload.d.ts +20 -0
- package/dist/react/use-patch-chunk.d.ts +29 -0
- package/dist/react/use-put-file.d.ts +32 -0
- package/dist/react/use-retry-listener.d.ts +15 -0
- package/dist/react/use-retry.d.ts +16 -0
- package/dist/react/use-transform-file.d.ts +48 -0
- package/dist/react/use-transform-metadata.d.ts +33 -0
- package/dist/react/use-tus-upload.d.ts +55 -0
- package/dist/react/use-upload.d.ts +69 -0
- package/dist/solid/create-abort-all.d.ts +8 -0
- package/dist/solid/create-abort-batch.d.ts +8 -0
- package/dist/solid/create-abort-item.d.ts +8 -0
- package/dist/solid/create-all-abort-listener.d.ts +7 -0
- package/dist/solid/create-batch-cancelled-listener.d.ts +7 -0
- package/dist/solid/create-batch-delete-files.d.ts +29 -0
- package/dist/solid/create-batch-error-listener.d.ts +7 -0
- package/dist/solid/create-batch-finalize-listener.d.ts +7 -0
- package/dist/solid/create-batch-finish-listener.d.ts +7 -0
- package/dist/solid/create-batch-progress-listener.d.ts +7 -0
- package/dist/solid/create-batch-retry.d.ts +8 -0
- package/dist/solid/create-batch-start-listener.d.ts +7 -0
- package/dist/solid/create-batch-upload.d.ts +43 -0
- package/dist/solid/create-chunked-rest-upload.d.ts +56 -0
- package/dist/solid/create-delete-file.d.ts +22 -0
- package/dist/solid/create-file-input.d.ts +20 -0
- package/dist/solid/create-get-file-list.d.ts +46 -0
- package/dist/solid/create-get-file-meta.d.ts +29 -0
- package/dist/solid/create-get-file.d.ts +38 -0
- package/dist/solid/create-head-file.d.ts +46 -0
- package/dist/solid/create-multipart-upload.d.ts +36 -0
- package/dist/solid/create-paste-upload.d.ts +11 -0
- package/dist/solid/create-patch-chunk.d.ts +26 -0
- package/dist/solid/create-put-file.d.ts +29 -0
- package/dist/solid/create-retry-listener.d.ts +7 -0
- package/dist/solid/create-retry.d.ts +8 -0
- package/dist/solid/create-transform-file.d.ts +45 -0
- package/dist/solid/create-transform-metadata.d.ts +30 -0
- package/dist/solid/create-tus-upload.d.ts +56 -0
- package/dist/solid/create-upload.d.ts +70 -0
- package/dist/solid/index.d.ts +60 -0
- package/dist/solid/index.js +1 -0
- package/dist/svelte/create-abort-all.d.ts +8 -0
- package/dist/svelte/create-abort-batch.d.ts +8 -0
- package/dist/svelte/create-abort-item.d.ts +8 -0
- package/dist/svelte/create-all-abort-listener.d.ts +7 -0
- package/dist/svelte/create-batch-cancelled-listener.d.ts +7 -0
- package/dist/svelte/create-batch-delete-files.d.ts +29 -0
- package/dist/svelte/create-batch-error-listener.d.ts +7 -0
- package/dist/svelte/create-batch-finalize-listener.d.ts +7 -0
- package/dist/svelte/create-batch-finish-listener.d.ts +7 -0
- package/dist/svelte/create-batch-progress-listener.d.ts +7 -0
- package/dist/svelte/create-batch-retry.d.ts +8 -0
- package/dist/svelte/create-batch-start-listener.d.ts +7 -0
- package/dist/svelte/create-batch-upload.d.ts +23 -0
- package/dist/svelte/create-chunked-rest-upload.d.ts +56 -0
- package/dist/svelte/create-delete-file.d.ts +26 -0
- package/dist/svelte/create-file-input.d.ts +19 -0
- package/dist/svelte/create-get-file-list.d.ts +43 -0
- package/dist/svelte/create-get-file-meta.d.ts +26 -0
- package/dist/svelte/create-get-file.d.ts +41 -0
- package/dist/svelte/create-head-file.d.ts +46 -0
- package/dist/svelte/create-multipart-upload.d.ts +36 -0
- package/dist/svelte/create-paste-upload.d.ts +11 -0
- package/dist/svelte/create-patch-chunk.d.ts +26 -0
- package/dist/svelte/create-put-file.d.ts +29 -0
- package/dist/svelte/create-retry-listener.d.ts +7 -0
- package/dist/svelte/create-retry.d.ts +8 -0
- package/dist/svelte/create-transform-file.d.ts +45 -0
- package/dist/svelte/create-transform-metadata.d.ts +30 -0
- package/dist/svelte/create-tus-upload.d.ts +56 -0
- package/dist/svelte/create-upload.d.ts +68 -0
- package/dist/svelte/index.d.ts +60 -0
- package/dist/svelte/index.js +1 -0
- package/dist/vue/index.d.ts +60 -0
- package/dist/vue/index.js +1 -0
- package/dist/vue/use-abort-all.d.ts +16 -0
- package/dist/vue/use-abort-batch.d.ts +16 -0
- package/dist/vue/use-abort-item.d.ts +16 -0
- package/dist/vue/use-all-abort-listener.d.ts +14 -0
- package/dist/vue/use-batch-cancelled-listener.d.ts +14 -0
- package/dist/vue/use-batch-delete-files.d.ts +29 -0
- package/dist/vue/use-batch-error-listener.d.ts +14 -0
- package/dist/vue/use-batch-finalize-listener.d.ts +15 -0
- package/dist/vue/use-batch-finish-listener.d.ts +14 -0
- package/dist/vue/use-batch-progress-listener.d.ts +14 -0
- package/dist/vue/use-batch-retry.d.ts +16 -0
- package/dist/vue/use-batch-start-listener.d.ts +14 -0
- package/dist/vue/use-batch-upload.d.ts +43 -0
- package/dist/vue/use-chunked-rest-upload.d.ts +56 -0
- package/dist/vue/use-delete-file.d.ts +22 -0
- package/dist/vue/use-file-input.d.ts +33 -0
- package/dist/vue/use-get-file-list.d.ts +43 -0
- package/dist/vue/use-get-file-meta.d.ts +26 -0
- package/dist/vue/use-get-file.d.ts +35 -0
- package/dist/vue/use-head-file.d.ts +46 -0
- package/dist/vue/use-multipart-upload.d.ts +36 -0
- package/dist/vue/use-paste-upload.d.ts +21 -0
- package/dist/vue/use-patch-chunk.d.ts +26 -0
- package/dist/vue/use-put-file.d.ts +29 -0
- package/dist/vue/use-retry-listener.d.ts +15 -0
- package/dist/vue/use-retry.d.ts +16 -0
- package/dist/vue/use-transform-file.d.ts +45 -0
- package/dist/vue/use-transform-metadata.d.ts +30 -0
- package/dist/vue/use-tus-upload.d.ts +56 -0
- package/dist/vue/use-upload.d.ts +68 -0
- package/package.json +101 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export type { CreateAbortAllOptions, CreateAbortAllReturn } from "./create-abort-all.d.ts";
|
|
2
|
+
export { createAbortAll } from "./create-abort-all.d.ts";
|
|
3
|
+
export type { CreateAbortBatchOptions, CreateAbortBatchReturn } from "./create-abort-batch.d.ts";
|
|
4
|
+
export { createAbortBatch } from "./create-abort-batch.d.ts";
|
|
5
|
+
export type { CreateAbortItemOptions, CreateAbortItemReturn } from "./create-abort-item.d.ts";
|
|
6
|
+
export { createAbortItem } from "./create-abort-item.d.ts";
|
|
7
|
+
export type { CreateAllAbortListenerOptions } from "./create-all-abort-listener.d.ts";
|
|
8
|
+
export { createAllAbortListener } from "./create-all-abort-listener.d.ts";
|
|
9
|
+
export type { CreateBatchCancelledListenerOptions } from "./create-batch-cancelled-listener.d.ts";
|
|
10
|
+
export { createBatchCancelledListener } from "./create-batch-cancelled-listener.d.ts";
|
|
11
|
+
export type { BatchDeleteResult, CreateBatchDeleteFilesOptions, CreateBatchDeleteFilesReturn } from "./create-batch-delete-files.d.ts";
|
|
12
|
+
export { createBatchDeleteFiles } from "./create-batch-delete-files.d.ts";
|
|
13
|
+
export type { CreateBatchErrorListenerOptions } from "./create-batch-error-listener.d.ts";
|
|
14
|
+
export { createBatchErrorListener } from "./create-batch-error-listener.d.ts";
|
|
15
|
+
export type { CreateBatchFinalizeListenerOptions } from "./create-batch-finalize-listener.d.ts";
|
|
16
|
+
export { createBatchFinalizeListener } from "./create-batch-finalize-listener.d.ts";
|
|
17
|
+
export type { CreateBatchFinishListenerOptions } from "./create-batch-finish-listener.d.ts";
|
|
18
|
+
export { createBatchFinishListener } from "./create-batch-finish-listener.d.ts";
|
|
19
|
+
export type { CreateBatchProgressListenerOptions } from "./create-batch-progress-listener.d.ts";
|
|
20
|
+
export { createBatchProgressListener } from "./create-batch-progress-listener.d.ts";
|
|
21
|
+
export type { CreateBatchRetryOptions, CreateBatchRetryReturn } from "./create-batch-retry.d.ts";
|
|
22
|
+
export { createBatchRetry } from "./create-batch-retry.d.ts";
|
|
23
|
+
export type { CreateBatchStartListenerOptions } from "./create-batch-start-listener.d.ts";
|
|
24
|
+
export { createBatchStartListener } from "./create-batch-start-listener.d.ts";
|
|
25
|
+
export type { CreateBatchUploadOptions, CreateBatchUploadReturn } from "./create-batch-upload.d.ts";
|
|
26
|
+
export { createBatchUpload } from "./create-batch-upload.d.ts";
|
|
27
|
+
export type { CreateChunkedRestUploadOptions, CreateChunkedRestUploadReturn } from "./create-chunked-rest-upload.d.ts";
|
|
28
|
+
export { createChunkedRestUpload } from "./create-chunked-rest-upload.d.ts";
|
|
29
|
+
export type { CreateDeleteFileOptions, CreateDeleteFileReturn } from "./create-delete-file.d.ts";
|
|
30
|
+
export { createDeleteFile } from "./create-delete-file.d.ts";
|
|
31
|
+
export type { CreateFileInputOptions, CreateFileInputReturn } from "./create-file-input.d.ts";
|
|
32
|
+
export { createFileInput } from "./create-file-input.d.ts";
|
|
33
|
+
export type { CreateGetFileOptions, CreateGetFileReturn } from "./create-get-file.d.ts";
|
|
34
|
+
export { createGetFile } from "./create-get-file.d.ts";
|
|
35
|
+
export type { CreateGetFileListOptions, CreateGetFileListReturn, FileListResponse } from "./create-get-file-list.d.ts";
|
|
36
|
+
export { createGetFileList } from "./create-get-file-list.d.ts";
|
|
37
|
+
export type { CreateGetFileMetaOptions, CreateGetFileMetaReturn } from "./create-get-file-meta.d.ts";
|
|
38
|
+
export { createGetFileMeta } from "./create-get-file-meta.d.ts";
|
|
39
|
+
export type { CreateHeadFileOptions, CreateHeadFileReturn, FileHeadMetadata } from "./create-head-file.d.ts";
|
|
40
|
+
export { createHeadFile } from "./create-head-file.d.ts";
|
|
41
|
+
export type { CreateMultipartUploadOptions, CreateMultipartUploadReturn } from "./create-multipart-upload.d.ts";
|
|
42
|
+
export { createMultipartUpload } from "./create-multipart-upload.d.ts";
|
|
43
|
+
export type { CreatePasteUploadOptions, CreatePasteUploadReturn } from "./create-paste-upload.d.ts";
|
|
44
|
+
export { createPasteUpload } from "./create-paste-upload.d.ts";
|
|
45
|
+
export type { CreatePatchChunkOptions, CreatePatchChunkReturn } from "./create-patch-chunk.d.ts";
|
|
46
|
+
export { createPatchChunk } from "./create-patch-chunk.d.ts";
|
|
47
|
+
export type { CreatePutFileOptions, CreatePutFileReturn } from "./create-put-file.d.ts";
|
|
48
|
+
export { createPutFile } from "./create-put-file.d.ts";
|
|
49
|
+
export type { CreateRetryOptions, CreateRetryReturn } from "./create-retry.d.ts";
|
|
50
|
+
export { createRetry } from "./create-retry.d.ts";
|
|
51
|
+
export type { CreateRetryListenerOptions } from "./create-retry-listener.d.ts";
|
|
52
|
+
export { createRetryListener } from "./create-retry-listener.d.ts";
|
|
53
|
+
export type { CreateTransformFileOptions, CreateTransformFileReturn, TransformOptions } from "./create-transform-file.d.ts";
|
|
54
|
+
export { createTransformFile } from "./create-transform-file.d.ts";
|
|
55
|
+
export type { CreateTransformMetadataOptions, CreateTransformMetadataReturn, TransformMetadata } from "./create-transform-metadata.d.ts";
|
|
56
|
+
export { createTransformMetadata } from "./create-transform-metadata.d.ts";
|
|
57
|
+
export type { CreateTusUploadOptions, CreateTusUploadReturn } from "./create-tus-upload.d.ts";
|
|
58
|
+
export { createTusUpload } from "./create-tus-upload.d.ts";
|
|
59
|
+
export type { CreateUploadOptions, CreateUploadReturn } from "./create-upload.d.ts";
|
|
60
|
+
export { createUpload } from "./create-upload.d.ts";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createAbortAll as t}from"../packem_shared/createAbortAll-B5vFFliA.js";import{createAbortBatch as a}from"../packem_shared/createAbortBatch-zA0PTnOB.js";import{createAbortItem as p}from"../packem_shared/createAbortItem-CIRlRD4X.js";import{createAllAbortListener as f}from"../packem_shared/createAllAbortListener-CYLEWan0.js";import{createBatchCancelledListener as l}from"../packem_shared/createBatchCancelledListener-l9c0mi15.js";import{createBatchDeleteFiles as s}from"../packem_shared/createBatchDeleteFiles-B0SYSdYj.js";import{createBatchErrorListener as h}from"../packem_shared/createBatchErrorListener-CJQFdXW2.js";import{createBatchFinalizeListener as d}from"../packem_shared/createBatchFinalizeListener-Og0rELSL.js";import{createBatchFinishListener as L}from"../packem_shared/createBatchFinishListener-BeE6-b6E.js";import{createBatchProgressListener as A}from"../packem_shared/createBatchProgressListener-1KpCpw7e.js";import{createBatchRetry as b}from"../packem_shared/createBatchRetry-D_F4v9oA.js";import{createBatchStartListener as R}from"../packem_shared/createBatchStartListener-CkcMX3tq.js";import{createBatchUpload as C}from"../packem_shared/createBatchUpload-DWcVWF9h.js";import{createChunkedRestUpload as M}from"../packem_shared/createChunkedRestUpload-CJNQp68Z.js";import{createDeleteFile as k}from"../packem_shared/createDeleteFile-_Znrnika.js";import{createFileInput as I}from"../packem_shared/createFileInput-B7WPz_-r.js";import{createGetFile as z}from"../packem_shared/createGetFile-CY2ohQF-.js";import{createGetFileList as H}from"../packem_shared/createGetFileList-DGZQymc5.js";import{createGetFileMeta as j}from"../packem_shared/createGetFileMeta-50LymNvf.js";import{createHeadFile as v}from"../packem_shared/createHeadFile-CGD6bHDS.js";import{createMultipartUpload as J}from"../packem_shared/createMultipartUpload-CTats5BN.js";import{createPasteUpload as N}from"../packem_shared/createPasteUpload-DemCREgp.js";import{createPatchChunk as Q}from"../packem_shared/createPatchChunk-Zy6I60LN.js";import{createPutFile as W}from"../packem_shared/createPutFile-D8hN-9Ai.js";import{createRetry as Y}from"../packem_shared/createRetry-DPaN9i_a.js";import{createRetryListener as _}from"../packem_shared/createRetryListener-bMqMm13Y.js";import{createTransformFile as ee}from"../packem_shared/createTransformFile-CJXLJEfg.js";import{createTransformMetadata as te}from"../packem_shared/createTransformMetadata-zyl5UymO.js";import{createTusUpload as ae}from"../packem_shared/createTusUpload-ClmXqmcz.js";import{createUpload as pe}from"../packem_shared/createUpload-LRQ4N_cF.js";export{t as createAbortAll,a as createAbortBatch,p as createAbortItem,f as createAllAbortListener,l as createBatchCancelledListener,s as createBatchDeleteFiles,h as createBatchErrorListener,d as createBatchFinalizeListener,L as createBatchFinishListener,A as createBatchProgressListener,b as createBatchRetry,R as createBatchStartListener,C as createBatchUpload,M as createChunkedRestUpload,k as createDeleteFile,I as createFileInput,z as createGetFile,H as createGetFileList,j as createGetFileMeta,v as createHeadFile,J as createMultipartUpload,N as createPasteUpload,Q as createPatchChunk,W as createPutFile,Y as createRetry,_ as createRetryListener,ee as createTransformFile,te as createTransformMetadata,ae as createTusUpload,pe as createUpload};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CreateAbortAllOptions {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
metadata?: Record<string, string>;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateAbortAllReturn {
|
|
6
|
+
abortAll: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const createAbortAll: (options: CreateAbortAllOptions) => CreateAbortAllReturn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CreateAbortBatchOptions {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
metadata?: Record<string, string>;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateAbortBatchReturn {
|
|
6
|
+
abortBatch: (batchId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const createAbortBatch: (options: CreateAbortBatchOptions) => CreateAbortBatchReturn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CreateAbortItemOptions {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
metadata?: Record<string, string>;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateAbortItemReturn {
|
|
6
|
+
abortItem: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const createAbortItem: (options: CreateAbortItemOptions) => CreateAbortItemReturn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UploadItem } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateAllAbortListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onAbort: (item: UploadItem) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createAllAbortListener: (options: CreateAllAbortListenerOptions) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchState } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateBatchCancelledListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onBatchCancelled: (batch: BatchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createBatchCancelledListener: (options: CreateBatchCancelledListenerOptions) => void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
export interface BatchDeleteResult {
|
|
3
|
+
/** Number of files that failed to delete */
|
|
4
|
+
failed?: number;
|
|
5
|
+
/** Number of files successfully deleted */
|
|
6
|
+
successful?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface CreateBatchDeleteFilesOptions {
|
|
9
|
+
/** Base endpoint URL for file operations */
|
|
10
|
+
endpoint: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateBatchDeleteFilesReturn {
|
|
13
|
+
/** Delete multiple files by IDs */
|
|
14
|
+
batchDeleteFiles: (ids: string[]) => Promise<BatchDeleteResult>;
|
|
15
|
+
/** Last request error, if any */
|
|
16
|
+
error: Readable<Error | undefined>;
|
|
17
|
+
/** Whether a request is currently in progress */
|
|
18
|
+
isLoading: Readable<boolean>;
|
|
19
|
+
/** Reset mutation state */
|
|
20
|
+
reset: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Svelte store-based utility for batch deleting files using TanStack Query.
|
|
24
|
+
* Supports both query parameter and JSON body methods.
|
|
25
|
+
* Automatically invalidates related queries.
|
|
26
|
+
* @param options Hook configuration options
|
|
27
|
+
* @returns Batch file deletion functions and state stores
|
|
28
|
+
*/
|
|
29
|
+
export declare const createBatchDeleteFiles: (options: CreateBatchDeleteFilesOptions) => CreateBatchDeleteFilesReturn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchState } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateBatchErrorListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onBatchError: (batch: BatchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createBatchErrorListener: (options: CreateBatchErrorListenerOptions) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchState } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateBatchFinalizeListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onBatchFinalize: (batch: BatchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createBatchFinalizeListener: (options: CreateBatchFinalizeListenerOptions) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchState } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateBatchFinishListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onBatchFinish: (batch: BatchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createBatchFinishListener: (options: CreateBatchFinishListenerOptions) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchState } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateBatchProgressListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onBatchProgress: (batch: BatchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createBatchProgressListener: (options: CreateBatchProgressListenerOptions) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CreateBatchRetryOptions {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
metadata?: Record<string, string>;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateBatchRetryReturn {
|
|
6
|
+
retryBatch: (batchId: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const createBatchRetry: (options: CreateBatchRetryOptions) => CreateBatchRetryReturn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BatchState } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateBatchStartListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onBatchStart: (batch: BatchState) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createBatchStartListener: (options: CreateBatchStartListenerOptions) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { UploadItem } from "../core/uploader.d.ts";
|
|
3
|
+
import type { UploadResult } from "../react/types.d.ts";
|
|
4
|
+
export interface CreateBatchUploadOptions {
|
|
5
|
+
endpoint: string;
|
|
6
|
+
metadata?: Record<string, string>;
|
|
7
|
+
onError?: (error: Error, batchId: string) => void;
|
|
8
|
+
onProgress?: (progress: number, batchId: string) => void;
|
|
9
|
+
onStart?: (batchId: string) => void;
|
|
10
|
+
onSuccess?: (results: UploadResult[], batchId: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface CreateBatchUploadReturn {
|
|
13
|
+
abortBatch: (batchId: string) => void;
|
|
14
|
+
completedCount: Readable<number>;
|
|
15
|
+
error: Readable<Error | undefined>;
|
|
16
|
+
errorCount: Readable<number>;
|
|
17
|
+
isUploading: Readable<boolean>;
|
|
18
|
+
items: Readable<UploadItem[]>;
|
|
19
|
+
progress: Readable<number>;
|
|
20
|
+
reset: () => void;
|
|
21
|
+
uploadBatch: (files: File[]) => string[];
|
|
22
|
+
}
|
|
23
|
+
export declare const createBatchUpload: (options: CreateBatchUploadOptions) => CreateBatchUploadReturn;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { UploadResult } from "../react/types.d.ts";
|
|
3
|
+
export interface CreateChunkedRestUploadOptions {
|
|
4
|
+
/** Chunk size for chunked REST uploads (default: 5MB) */
|
|
5
|
+
chunkSize?: number;
|
|
6
|
+
/** Chunked REST upload endpoint URL */
|
|
7
|
+
endpoint: string;
|
|
8
|
+
/** Maximum number of retry attempts */
|
|
9
|
+
maxRetries?: number;
|
|
10
|
+
/** Additional metadata to include with the upload */
|
|
11
|
+
metadata?: Record<string, string>;
|
|
12
|
+
/** Callback when upload fails */
|
|
13
|
+
onError?: (error: Error) => void;
|
|
14
|
+
/** Callback when upload is paused */
|
|
15
|
+
onPause?: () => void;
|
|
16
|
+
/** Callback when upload progress updates */
|
|
17
|
+
onProgress?: (progress: number, offset: number) => void;
|
|
18
|
+
/** Callback when upload is resumed */
|
|
19
|
+
onResume?: () => void;
|
|
20
|
+
/** Callback when upload starts */
|
|
21
|
+
onStart?: () => void;
|
|
22
|
+
/** Callback when upload completes successfully */
|
|
23
|
+
onSuccess?: (file: UploadResult) => void;
|
|
24
|
+
/** Enable automatic retry on failure */
|
|
25
|
+
retry?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface CreateChunkedRestUploadReturn {
|
|
28
|
+
/** Abort the current upload */
|
|
29
|
+
abort: () => void;
|
|
30
|
+
/** Last upload error, if any */
|
|
31
|
+
error: Readable<Error | undefined>;
|
|
32
|
+
/** Whether the upload is paused */
|
|
33
|
+
isPaused: Readable<boolean>;
|
|
34
|
+
/** Whether an upload is currently in progress */
|
|
35
|
+
isUploading: Readable<boolean>;
|
|
36
|
+
/** Current upload offset (bytes uploaded) */
|
|
37
|
+
offset: Readable<number>;
|
|
38
|
+
/** Pause the current upload */
|
|
39
|
+
pause: () => void;
|
|
40
|
+
/** Current upload progress (0-100) */
|
|
41
|
+
progress: Readable<number>;
|
|
42
|
+
/** Reset upload state */
|
|
43
|
+
reset: () => void;
|
|
44
|
+
/** Last upload result, if any */
|
|
45
|
+
result: Readable<UploadResult | undefined>;
|
|
46
|
+
/** Resume a paused upload */
|
|
47
|
+
resume: () => Promise<void>;
|
|
48
|
+
/** Upload a file using chunked REST protocol */
|
|
49
|
+
upload: (file: File) => Promise<UploadResult>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Svelte store-based utility for chunked REST file uploads.
|
|
53
|
+
* @param options Upload configuration options
|
|
54
|
+
* @returns Upload functions and state stores
|
|
55
|
+
*/
|
|
56
|
+
export declare const createChunkedRestUpload: (options: CreateChunkedRestUploadOptions) => CreateChunkedRestUploadReturn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
export interface CreateDeleteFileOptions {
|
|
3
|
+
/** Base endpoint URL for file operations */
|
|
4
|
+
endpoint: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CreateDeleteFileReturn {
|
|
7
|
+
/** Delete a file by ID */
|
|
8
|
+
deleteFile: (id: string) => Promise<void>;
|
|
9
|
+
/** Last request error, if any */
|
|
10
|
+
error: Readable<Error | undefined>;
|
|
11
|
+
/** Whether a request is currently in progress */
|
|
12
|
+
isLoading: Readable<boolean>;
|
|
13
|
+
/** Reset mutation state */
|
|
14
|
+
reset: () => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Svelte store-based utility for deleting a single file using TanStack Query.
|
|
18
|
+
* Automatically invalidates related queries.
|
|
19
|
+
*
|
|
20
|
+
* IMPORTANT: Due to TanStack Query Svelte requirements, createMutation must be called
|
|
21
|
+
* at the component's top level, not inside utility functions. For proper usage, call
|
|
22
|
+
* createMutation directly in your component and use the returned stores.
|
|
23
|
+
* @param options Hook configuration options
|
|
24
|
+
* @returns File deletion functions and state stores
|
|
25
|
+
*/
|
|
26
|
+
export declare const createDeleteFile: (options: CreateDeleteFileOptions) => CreateDeleteFileReturn;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
export interface CreateFileInputOptions {
|
|
3
|
+
accept?: string;
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
onFilesSelected?: (files: File[]) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface CreateFileInputReturn {
|
|
8
|
+
files: Readable<File[]>;
|
|
9
|
+
handleDragLeave: (event: DragEvent) => void;
|
|
10
|
+
handleDragOver: (event: DragEvent) => void;
|
|
11
|
+
handleDrop: (event: DragEvent) => void;
|
|
12
|
+
handleFileChange: (event: Event) => void;
|
|
13
|
+
inputRef: {
|
|
14
|
+
current: HTMLInputElement | undefined;
|
|
15
|
+
};
|
|
16
|
+
openFileDialog: () => void;
|
|
17
|
+
reset: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const createFileInput: (options?: CreateFileInputOptions) => CreateFileInputReturn;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { FileMeta } from "../react/types.d.ts";
|
|
3
|
+
export interface FileListResponse {
|
|
4
|
+
data: FileMeta[];
|
|
5
|
+
meta?: {
|
|
6
|
+
firstPage?: number;
|
|
7
|
+
firstPageUrl?: string;
|
|
8
|
+
lastPage?: number;
|
|
9
|
+
lastPageUrl?: string;
|
|
10
|
+
nextPageUrl?: string | undefined;
|
|
11
|
+
page?: number;
|
|
12
|
+
perPage?: number;
|
|
13
|
+
previousPageUrl?: string | undefined;
|
|
14
|
+
total?: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface CreateGetFileListOptions {
|
|
18
|
+
/** Whether to enable the query */
|
|
19
|
+
enabled?: Readable<boolean> | boolean;
|
|
20
|
+
/** Base endpoint URL for file operations */
|
|
21
|
+
endpoint: string;
|
|
22
|
+
/** Maximum number of elements to retrieve */
|
|
23
|
+
limit?: Readable<number> | number;
|
|
24
|
+
/** Page number for pagination */
|
|
25
|
+
page?: Readable<number> | number;
|
|
26
|
+
}
|
|
27
|
+
export interface CreateGetFileListReturn {
|
|
28
|
+
/** File list data */
|
|
29
|
+
data: Readable<FileListResponse | undefined>;
|
|
30
|
+
/** Last request error, if any */
|
|
31
|
+
error: Readable<Error | undefined>;
|
|
32
|
+
/** Whether a request is currently in progress */
|
|
33
|
+
isLoading: Readable<boolean>;
|
|
34
|
+
/** Refetch the file list */
|
|
35
|
+
refetch: () => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Svelte store-based utility for fetching a list of files using TanStack Query.
|
|
39
|
+
* Supports pagination via query parameters.
|
|
40
|
+
* @param options Hook configuration options
|
|
41
|
+
* @returns File list fetching functions and state stores
|
|
42
|
+
*/
|
|
43
|
+
export declare const createGetFileList: (options: CreateGetFileListOptions) => CreateGetFileListReturn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { FileMeta } from "../react/types.d.ts";
|
|
3
|
+
export interface CreateGetFileMetaOptions {
|
|
4
|
+
/** Whether to enable the query */
|
|
5
|
+
enabled?: Readable<boolean> | boolean;
|
|
6
|
+
/** Base endpoint URL for file operations */
|
|
7
|
+
endpoint: string;
|
|
8
|
+
/** File ID to fetch metadata for */
|
|
9
|
+
id: Readable<string> | string;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateGetFileMetaReturn {
|
|
12
|
+
/** File metadata */
|
|
13
|
+
data: Readable<FileMeta | undefined>;
|
|
14
|
+
/** Last request error, if any */
|
|
15
|
+
error: Readable<Error | undefined>;
|
|
16
|
+
/** Whether a request is currently in progress */
|
|
17
|
+
isLoading: Readable<boolean>;
|
|
18
|
+
/** Refetch the file metadata */
|
|
19
|
+
refetch: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Svelte store-based utility for fetching file metadata using TanStack Query.
|
|
23
|
+
* @param options Hook configuration options
|
|
24
|
+
* @returns File metadata fetching functions and state stores
|
|
25
|
+
*/
|
|
26
|
+
export declare const createGetFileMeta: (options: CreateGetFileMetaOptions) => CreateGetFileMetaReturn;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { FileMeta } from "../react/types.d.ts";
|
|
3
|
+
type TransformParams = Record<string, string | number | boolean> | undefined;
|
|
4
|
+
export interface CreateGetFileOptions {
|
|
5
|
+
/** Whether to enable the query */
|
|
6
|
+
enabled?: Readable<boolean> | boolean;
|
|
7
|
+
/** Base endpoint URL for file operations */
|
|
8
|
+
endpoint: string;
|
|
9
|
+
/** File ID to fetch */
|
|
10
|
+
id: Readable<string> | string;
|
|
11
|
+
/** Callback when request fails */
|
|
12
|
+
onError?: (error: Error) => void;
|
|
13
|
+
/** Callback when request succeeds */
|
|
14
|
+
onSuccess?: (data: Blob, meta: FileMeta | undefined) => void;
|
|
15
|
+
/** Transformation parameters for media files */
|
|
16
|
+
transform?: Readable<TransformParams> | TransformParams;
|
|
17
|
+
}
|
|
18
|
+
export interface CreateGetFileReturn {
|
|
19
|
+
/** File data as Blob */
|
|
20
|
+
data: Readable<Blob | undefined>;
|
|
21
|
+
/** Last request error, if any */
|
|
22
|
+
error: Readable<Error | undefined>;
|
|
23
|
+
/** Whether a request is currently in progress */
|
|
24
|
+
isLoading: Readable<boolean>;
|
|
25
|
+
/** File metadata from response headers */
|
|
26
|
+
meta: Readable<FileMeta | undefined>;
|
|
27
|
+
/** Refetch the file */
|
|
28
|
+
refetch: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Svelte store-based utility for fetching/downloading files using TanStack Query.
|
|
32
|
+
* Supports optional transformation parameters for media files.
|
|
33
|
+
*
|
|
34
|
+
* IMPORTANT: Due to TanStack Query Svelte requirements, createQuery must be called
|
|
35
|
+
* at the component's top level, not inside utility functions. For proper usage, call
|
|
36
|
+
* createQuery directly in your component and use the returned stores.
|
|
37
|
+
* @param options Hook configuration options
|
|
38
|
+
* @returns File fetching functions and state stores
|
|
39
|
+
*/
|
|
40
|
+
export declare const createGetFile: (options: CreateGetFileOptions) => CreateGetFileReturn;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
export interface FileHeadMetadata {
|
|
3
|
+
/** Whether this is a chunked upload session */
|
|
4
|
+
chunkedUpload?: boolean;
|
|
5
|
+
/** Content length in bytes */
|
|
6
|
+
contentLength?: number;
|
|
7
|
+
/** Content type */
|
|
8
|
+
contentType?: string;
|
|
9
|
+
/** Entity tag for caching */
|
|
10
|
+
etag?: string;
|
|
11
|
+
/** Last modified date */
|
|
12
|
+
lastModified?: string;
|
|
13
|
+
/** Received chunk offsets (chunked uploads) */
|
|
14
|
+
receivedChunks?: number[];
|
|
15
|
+
/** Whether upload is complete (chunked uploads) */
|
|
16
|
+
uploadComplete?: boolean;
|
|
17
|
+
/** Upload expiration date */
|
|
18
|
+
uploadExpires?: string;
|
|
19
|
+
/** Upload offset for chunked uploads */
|
|
20
|
+
uploadOffset?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateHeadFileOptions {
|
|
23
|
+
/** Whether to enable the query */
|
|
24
|
+
enabled?: Readable<boolean> | boolean;
|
|
25
|
+
/** Base endpoint URL for file operations */
|
|
26
|
+
endpoint: string;
|
|
27
|
+
/** File ID to fetch metadata for */
|
|
28
|
+
id: Readable<string> | string;
|
|
29
|
+
}
|
|
30
|
+
export interface CreateHeadFileReturn {
|
|
31
|
+
/** File metadata from HEAD request */
|
|
32
|
+
data: Readable<FileHeadMetadata | undefined>;
|
|
33
|
+
/** Last request error, if any */
|
|
34
|
+
error: Readable<Error | undefined>;
|
|
35
|
+
/** Whether a request is currently in progress */
|
|
36
|
+
isLoading: Readable<boolean>;
|
|
37
|
+
/** Refetch the file metadata */
|
|
38
|
+
refetch: () => void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Svelte store-based utility for fetching file metadata via HEAD request using TanStack Query.
|
|
42
|
+
* Useful for checking upload progress and file status without downloading.
|
|
43
|
+
* @param options Hook configuration options
|
|
44
|
+
* @returns File HEAD request functions and state stores
|
|
45
|
+
*/
|
|
46
|
+
export declare const createHeadFile: (options: CreateHeadFileOptions) => CreateHeadFileReturn;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { UploadResult } from "../react/types.d.ts";
|
|
3
|
+
export interface CreateMultipartUploadOptions {
|
|
4
|
+
/** Upload endpoint URL */
|
|
5
|
+
endpoint: string;
|
|
6
|
+
/** Additional metadata to include with the upload */
|
|
7
|
+
metadata?: Record<string, string>;
|
|
8
|
+
/** Callback when upload fails */
|
|
9
|
+
onError?: (error: Error) => void;
|
|
10
|
+
/** Callback when upload progress updates */
|
|
11
|
+
onProgress?: (progress: number) => void;
|
|
12
|
+
/** Callback when upload starts */
|
|
13
|
+
onStart?: () => void;
|
|
14
|
+
/** Callback when upload completes successfully */
|
|
15
|
+
onSuccess?: (file: UploadResult) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface CreateMultipartUploadReturn {
|
|
18
|
+
/** Last upload error, if any */
|
|
19
|
+
error: Readable<Error | undefined>;
|
|
20
|
+
/** Whether an upload is currently in progress */
|
|
21
|
+
isUploading: Readable<boolean>;
|
|
22
|
+
/** Current upload progress (0-100) */
|
|
23
|
+
progress: Readable<number>;
|
|
24
|
+
/** Reset upload state */
|
|
25
|
+
reset: () => void;
|
|
26
|
+
/** Last upload result, if any */
|
|
27
|
+
result: Readable<UploadResult | undefined>;
|
|
28
|
+
/** Upload a file using multipart/form-data */
|
|
29
|
+
upload: (file: File) => Promise<UploadResult>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Svelte store-based utility for multipart/form-data file uploads using rpldy uploader core.
|
|
33
|
+
* @param options Upload configuration options
|
|
34
|
+
* @returns Upload functions and state stores
|
|
35
|
+
*/
|
|
36
|
+
export declare const createMultipartUpload: (options: CreateMultipartUploadOptions) => CreateMultipartUploadReturn;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
export interface CreatePasteUploadOptions {
|
|
3
|
+
filter?: (file: File) => boolean;
|
|
4
|
+
onFilesPasted?: (files: File[]) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface CreatePasteUploadReturn {
|
|
7
|
+
handlePaste: (event: ClipboardEvent) => void;
|
|
8
|
+
pastedFiles: Readable<File[]>;
|
|
9
|
+
reset: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const createPasteUpload: (options?: CreatePasteUploadOptions) => CreatePasteUploadReturn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { UploadResult } from "../react/types.d.ts";
|
|
3
|
+
export interface CreatePatchChunkOptions {
|
|
4
|
+
/** Base endpoint URL for file operations */
|
|
5
|
+
endpoint: string;
|
|
6
|
+
}
|
|
7
|
+
export interface CreatePatchChunkReturn {
|
|
8
|
+
/** Last upload result, if any */
|
|
9
|
+
data: Readable<UploadResult | undefined>;
|
|
10
|
+
/** Last request error, if any */
|
|
11
|
+
error: Readable<Error | undefined>;
|
|
12
|
+
/** Whether a request is currently in progress */
|
|
13
|
+
isLoading: Readable<boolean>;
|
|
14
|
+
/** Upload a chunk for chunked uploads */
|
|
15
|
+
patchChunk: (id: string, chunk: Blob, offset: number, checksum?: string) => Promise<UploadResult>;
|
|
16
|
+
/** Reset mutation state */
|
|
17
|
+
reset: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Svelte store-based utility for uploading chunks in chunked uploads using TanStack Query.
|
|
21
|
+
* Requires X-Chunk-Offset header and chunk data.
|
|
22
|
+
* Automatically invalidates related queries when upload is complete.
|
|
23
|
+
* @param options Hook configuration options
|
|
24
|
+
* @returns Chunk upload functions and state stores
|
|
25
|
+
*/
|
|
26
|
+
export declare const createPatchChunk: (options: CreatePatchChunkOptions) => CreatePatchChunkReturn;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Readable } from "svelte/store";
|
|
2
|
+
import type { UploadResult } from "../react/types.d.ts";
|
|
3
|
+
export interface CreatePutFileOptions {
|
|
4
|
+
/** Base endpoint URL for file operations */
|
|
5
|
+
endpoint: string;
|
|
6
|
+
/** Callback when upload progress updates */
|
|
7
|
+
onProgress?: (progress: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface CreatePutFileReturn {
|
|
10
|
+
/** Last upload result, if any */
|
|
11
|
+
data: Readable<UploadResult | undefined>;
|
|
12
|
+
/** Last request error, if any */
|
|
13
|
+
error: Readable<Error | undefined>;
|
|
14
|
+
/** Whether a request is currently in progress */
|
|
15
|
+
isLoading: Readable<boolean>;
|
|
16
|
+
/** Current upload progress (0-100) */
|
|
17
|
+
progress: Readable<number>;
|
|
18
|
+
/** Create or update a file by ID */
|
|
19
|
+
putFile: (id: string, file: File | Blob) => Promise<UploadResult>;
|
|
20
|
+
/** Reset mutation state */
|
|
21
|
+
reset: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Svelte store-based utility for creating or updating files via PUT request using TanStack Query.
|
|
25
|
+
* Automatically invalidates related queries.
|
|
26
|
+
* @param options Hook configuration options
|
|
27
|
+
* @returns File PUT functions and state stores
|
|
28
|
+
*/
|
|
29
|
+
export declare const createPutFile: (options: CreatePutFileOptions) => CreatePutFileReturn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { UploadItem } from "../core/uploader.d.ts";
|
|
2
|
+
export interface CreateRetryListenerOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
metadata?: Record<string, string>;
|
|
5
|
+
onRetry: (item: UploadItem) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const createRetryListener: (options: CreateRetryListenerOptions) => void;
|