Skip to content

Commit

Permalink
Merge pull request #168 from internxt/feat/add-get-user-role-endpoint
Browse files Browse the repository at this point in the history
[_] feat: add get user role
  • Loading branch information
CandelR authored Sep 11, 2023
2 parents 7ad8e33 + 4fa515d commit 09919a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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.4.47",
"version": "1.4.48",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand Down
13 changes: 13 additions & 0 deletions src/drive/share/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,19 @@ export class Share {
);
}

/**
* Get the role of a user on a folder.
*
* @param {string} options.sharingId - The unique identifier of the sharing.
* @returns {Promise<Role>} A promise containing the role of the current user in the sharing.
*/
public getUserRole(sharingId : string): Promise<Role> {
return this.client.get(
`sharings/${sharingId}/role`,
this.headers(),
);
}

/**
* Update the role of a user on a folder.
*
Expand Down

0 comments on commit 09919a4

Please sign in to comment.