From 98152df63a99063a4fd34f3893f8c78c75db52dd Mon Sep 17 00:00:00 2001 From: Lawrence Wagerfield Date: Wed, 24 Apr 2024 17:18:00 +0100 Subject: [PATCH] Make "UploadResult" type public --- src/private/UploadManagerBase.ts | 3 +-- src/private/model/UploadResult.ts | 8 -------- src/public/shared/CommonTypes.ts | 9 ++++++++- 3 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 src/private/model/UploadResult.ts diff --git a/src/private/UploadManagerBase.ts b/src/private/UploadManagerBase.ts index 6182143..d379609 100644 --- a/src/private/UploadManagerBase.ts +++ b/src/private/UploadManagerBase.ts @@ -13,8 +13,7 @@ import { PreUploadInfo } from "./model/PreUploadInfo"; import { UploadSourceBlob } from "./model/UploadSourceProcessed"; import { PutUploadPartResult } from "./model/PutUploadPartResult"; import { AddCancellationHandler } from "./model/AddCancellationHandler"; -import { UploadResult } from "./model/UploadResult"; -import { UploadManagerParams, UploadProgress, UploadSource } from "../public/shared/CommonTypes"; +import { UploadManagerParams, UploadProgress, UploadSource, UploadResult } from "../public/shared/CommonTypes"; /** * Methods common to UploadManagerNode and UploadManagerBrowser. diff --git a/src/private/model/UploadResult.ts b/src/private/model/UploadResult.ts deleted file mode 100644 index 61aa0f4..0000000 --- a/src/private/model/UploadResult.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { FileDetails } from "../../public/shared/generated"; - -export type UploadResult = Omit & { - /** - * The file's ETag, short for "entity tag", reflects the file's version and changes whenever the file is modified. - */ - etag: string; -}; diff --git a/src/public/shared/CommonTypes.ts b/src/public/shared/CommonTypes.ts index 35a50ab..0998be5 100644 --- a/src/public/shared/CommonTypes.ts +++ b/src/public/shared/CommonTypes.ts @@ -1,4 +1,4 @@ -import { BeginMultipartUploadRequest } from "./generated"; +import { BeginMultipartUploadRequest, FileDetails } from "./generated"; /** * Workaround for tsc aliases, where we cannot export implementation-less modules in our dists. @@ -23,6 +23,13 @@ export interface UploadProgress { progress: number; } +export type UploadResult = Omit & { + /** + * The file's ETag, short for "entity tag", reflects the file's version and changes whenever the file is modified. + */ + etag: string; +}; + export type UploadSource = NodeJS.ReadableStream | BlobLike | Buffer | string; export interface UploadManagerParams extends Omit {