Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[_]: Added notifyUser and notification message fields to payload #169

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading