From 12f2d1d242b1ce64e483370e403fc4342723f2f0 Mon Sep 17 00:00:00 2001 From: Nico Montanari Date: Wed, 4 Sep 2024 16:01:03 +0200 Subject: [PATCH 1/2] chore: update types for file download result --- types/dropbox_types.d.ts | 16 ++++++++++++++++ types/index.d.ts | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/types/dropbox_types.d.ts b/types/dropbox_types.d.ts index 0023a191..256ec82a 100644 --- a/types/dropbox_types.d.ts +++ b/types/dropbox_types.d.ts @@ -2038,6 +2038,22 @@ rev?: Rev; } + export interface FileBinary { + /** + * The type of the file binary. + */ + type: 'Buffer'; + + /** + * The binary data of the file. + */ + data: number[]; + } + + export interface DownloadResult extends FileMetadata { + fileBinary: FileBinary + } + export interface DownloadErrorPath { '.tag': 'path'; path: LookupError; diff --git a/types/index.d.ts b/types/index.d.ts index b6a073b5..f023b823 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -936,7 +936,7 @@ export class Dropbox { * DropboxResponseError. * @param arg The request parameters. */ - public filesDownload(arg: files.DownloadArg): Promise>; + public filesDownload(arg: files.DownloadArg): Promise>; /** * Download a folder from the user's Dropbox, as a zip file. The folder must From e60569d5a323948d0bc6bea34351bbd0d09845cc Mon Sep 17 00:00:00 2001 From: Nico Montanari Date: Wed, 4 Sep 2024 18:09:55 +0200 Subject: [PATCH 2/2] Update fileBinary type --- types/dropbox_types.d.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/types/dropbox_types.d.ts b/types/dropbox_types.d.ts index 256ec82a..b9b77f5e 100644 --- a/types/dropbox_types.d.ts +++ b/types/dropbox_types.d.ts @@ -2038,20 +2038,8 @@ rev?: Rev; } - export interface FileBinary { - /** - * The type of the file binary. - */ - type: 'Buffer'; - - /** - * The binary data of the file. - */ - data: number[]; - } - export interface DownloadResult extends FileMetadata { - fileBinary: FileBinary + fileBinary: Buffer } export interface DownloadErrorPath {