Skip to content

Commit

Permalink
Merge pull request #246 from internxt/feature/folder-ancestors-shared
Browse files Browse the repository at this point in the history
[PB-2424] Feat: allow folder ancestors shared
  • Loading branch information
CandelR authored Oct 1, 2024
2 parents 3b90524 + 5f385d7 commit a2be79f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@internxt/sdk",
"version": "1.5.17",
"version": "1.5.19",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand Down
9 changes: 5 additions & 4 deletions src/drive/storage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,12 @@ export class Storage {
/**
* Gets the ancestors of a given folder UUID
*
* @param {string} folderUUID - UUID of the folder.
* @returns {Promise<FolderAncestor[]>}
* @param {string} uuid - UUID of the folder.
* @param {boolean} [isShared=false] - Whether the folder is a shared item or not.
* @returns {Promise<FolderAncestor[]>} A promise that resolves with an array of ancestors of the given folder.
*/
public getFolderAncestors(uuid: string): Promise<FolderAncestor[]> {
return this.client.get<FolderAncestor[]>(`folders/${uuid}/ancestors`, this.headers());
public getFolderAncestors(uuid: string, isShared = false): Promise<FolderAncestor[]> {
return this.client.get<FolderAncestor[]>(`folders/${uuid}/ancestors?isSharedItem=${isShared}`, this.headers());
}

/**
Expand Down

0 comments on commit a2be79f

Please sign in to comment.