Skip to content

Commit

Permalink
Added notifyUser and notification message fields to payload of invite…
Browse files Browse the repository at this point in the history
… user to share a shared folder endpoint
  • Loading branch information
Ramon Candel authored and Ramon Candel committed Sep 12, 2023
1 parent 09919a4 commit beed718
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 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.4.48",
"version": "1.4.49",
"description": "An sdk for interacting with Internxt's services",
"repository": {
"type": "git",
Expand Down
13 changes: 7 additions & 6 deletions src/drive/share/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,14 @@ 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(),
);
public getUserRole(sharingId: string): Promise<Role> {
return this.client.get(`sharings/${sharingId}/role`, this.headers());
}

/**
Expand Down Expand Up @@ -357,6 +354,10 @@ export class Share {
* @param {string} options.encryptionAlgorithm - Encryption algorithm used to encrypt the encryption key. This field should not be empty if the invitation type is "OWNER".
* @param {string} options.type - Owner's encryption key encrypted with the invited user's public key.
* @param {string} options.roleId - The id of the role to assign to the user.
* @param {string} options.notifyUser - If it has to notify the users
* @param {string} options.notificationMessage - Message of the notificacion
*
*
* @returns {Promise<SharingInvite>} A promise that resolves when the folder is shared with the user.
*/

Expand Down
2 changes: 2 additions & 0 deletions src/drive/share/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ export type ListAllSharedFoldersResponse = {
export type ShareFolderWithUserPayload = {
itemId: string;
itemType: 'folder' | 'file';
notifyUser: boolean;
notificationMessage?: string;
sharedWith: string;
encryptionKey?: string;
encryptionAlgorithm?: string;
Expand Down

0 comments on commit beed718

Please sign in to comment.