From fb026cd5ba5bf403acc23de38ab45500d90002b9 Mon Sep 17 00:00:00 2001 From: jzunigax2 <125698953+jzunigax2@users.noreply.github.com> Date: Fri, 23 Oct 2026 09:35:40 -0600 Subject: [PATCH 1/3] fix!: type getFolderMeta and getFolderByPath from the API schema --- src/drive/storage/index.ts | 18 ++++++++++++------ src/drive/storage/types.ts | 6 ++++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/drive/storage/index.ts b/src/drive/storage/index.ts index d41f0559..40b069f2 100644 --- a/src/drive/storage/index.ts +++ b/src/drive/storage/index.ts @@ -24,6 +24,8 @@ import { FetchFolderContentResponse, FetchFolderFilesCursorResponse, FetchFolderFoldersCursorResponse, + FetchFolderByPathResponse, + FetchFolderMetaResponse, FetchFoldersSyncResponse, FetchLimitResponse, FetchPaginatedFilesContent, @@ -831,16 +833,20 @@ export class Storage { * Gets the meta of a given folder UUID * * @param {string} folderUUID - UUID of the folder. - * @returns {Promise} + * @returns {Promise} */ - public getFolderMeta(uuid: string, workspacesToken?: string, resourcesToken?: string): Promise { + public getFolderMeta( + uuid: string, + workspacesToken?: string, + resourcesToken?: string, + ): Promise { const customHeaders = workspacesToken ? { 'x-internxt-workspace': workspacesToken, } : undefined; - return this.client.get( + return this.client.get( `folders/${uuid}/meta`, addResourcesTokenToHeaders(this.headers(customHeaders), resourcesToken), ); @@ -947,11 +953,11 @@ export class Storage { * Gets the folder meta from a given path (e.g. "/folder1/folder2") * * @param {string} folderPath - The path of the folder. - * @returns {Promise} A promise that resolves the folder on that path. + * @returns {Promise} A promise that resolves the folder on that path. */ - public getFolderByPath(folderPath: string): Promise { + public getFolderByPath(folderPath: string): Promise { const query = new URLSearchParams({ path: folderPath }); - return this.client.get(`folders/meta?${query}`, this.headers()); + return this.client.get(`folders/meta?${query}`, this.headers()); } /** diff --git a/src/drive/storage/types.ts b/src/drive/storage/types.ts index 104dd061..4f66e7f1 100644 --- a/src/drive/storage/types.ts +++ b/src/drive/storage/types.ts @@ -193,6 +193,12 @@ export type FetchFolderFilesCursorResponse = export type FetchFolderFoldersCursorResponse = paths['/folders/v2/content/{uuid}/folders']['get']['responses']['200']['content']['application/json']; +export type FetchFolderMetaResponse = + paths['/folders/{uuid}/meta']['get']['responses']['200']['content']['application/json']; + +export type FetchFolderByPathResponse = + paths['/folders/meta']['get']['responses']['200']['content']['application/json']; + export type FilesSyncQuery = NonNullable; export type FoldersSyncQuery = NonNullable; From 16b4a89ed494d506868c9c799d5c49fee3709a71 Mon Sep 17 00:00:00 2001 From: jzunigax2 <125698953+jzunigax2@users.noreply.github.com> Date: Fri, 23 Oct 2026 09:43:54 -0600 Subject: [PATCH 2/3] chore: bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 087c7596..4a574c1a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@internxt/sdk", "author": "Internxt ", - "version": "1.23.3", + "version": "1.24.0", "description": "An sdk for interacting with Internxt's services", "repository": { "type": "git", From b6cd6180eb641ed7659caf47270b50cdb94fab01 Mon Sep 17 00:00:00 2001 From: jzunigax2 <125698953+jzunigax2@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:11:04 -0600 Subject: [PATCH 3/3] refactor: update checkDuplicatedFolders return type to FetchExistentFoldersResponse --- src/drive/storage/index.ts | 6 +++--- src/drive/storage/types.ts | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/drive/storage/index.ts b/src/drive/storage/index.ts index 40b069f2..5adb8a35 100644 --- a/src/drive/storage/index.ts +++ b/src/drive/storage/index.ts @@ -9,7 +9,6 @@ import { CheckDuplicatedFilesPayload, CheckDuplicatedFilesResponse, CheckDuplicatedFolderPayload, - CheckDuplicatedFoldersResponse, CreateFolderByUuidPayload, CreateFolderPayload, CreateFolderResponse, @@ -24,6 +23,7 @@ import { FetchFolderContentResponse, FetchFolderFilesCursorResponse, FetchFolderFoldersCursorResponse, + FetchExistentFoldersResponse, FetchFolderByPathResponse, FetchFolderMetaResponse, FetchFoldersSyncResponse, @@ -934,12 +934,12 @@ export class Storage { * Checks if the given folders names already exist in the given folder * * @param {CheckDuplicatedFolderPayload} payload - Payload containing the folder UUID and the list of folders to check. - * @return {Promise} - Promise that contains the duplicated folders in a list. + * @return {Promise} - Promise that contains the duplicated folders in a list. */ public checkDuplicatedFolders({ folderUuid, folderNamesList, - }: CheckDuplicatedFolderPayload): Promise { + }: CheckDuplicatedFolderPayload): Promise { return this.client.post( `/folders/content/${folderUuid}/folders/existence`, { diff --git a/src/drive/storage/types.ts b/src/drive/storage/types.ts index 4f66e7f1..190a01f0 100644 --- a/src/drive/storage/types.ts +++ b/src/drive/storage/types.ts @@ -199,6 +199,9 @@ export type FetchFolderMetaResponse = export type FetchFolderByPathResponse = paths['/folders/meta']['get']['responses']['200']['content']['application/json']; +export type FetchExistentFoldersResponse = + paths['/folders/content/{uuid}/folders/existence']['post']['responses']['200']['content']['application/json']; + export type FilesSyncQuery = NonNullable; export type FoldersSyncQuery = NonNullable;