From 4fa515d1bfc3f0a8ae33ff4775bab48690c89f56 Mon Sep 17 00:00:00 2001 From: Andres Pinto Date: Fri, 8 Sep 2023 09:59:00 -0400 Subject: [PATCH] feat: added get user role --- package.json | 2 +- src/drive/share/index.ts | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8eb44c0..4087532 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/drive/share/index.ts b/src/drive/share/index.ts index cb5ea00..d1ee6f9 100644 --- a/src/drive/share/index.ts +++ b/src/drive/share/index.ts @@ -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} A promise containing the role of the current user in the sharing. + */ + public getUserRole(sharingId : string): Promise { + return this.client.get( + `sharings/${sharingId}/role`, + this.headers(), + ); + } + /** * Update the role of a user on a folder. *