1 | import { _Folder, } from "../folders/types.js";
|
2 | import { SharingRole, } from "./types.js";
|
3 | const field = "odata.id";
|
4 | _Folder.prototype.shareWith = async function (loginNames, role = SharingRole.View, requireSignin = false, emailData) {
|
5 | const shareable = await this.getItem(field);
|
6 | return shareable.shareWith(loginNames, role, requireSignin, emailData);
|
7 | };
|
8 | _Folder.prototype.getShareLink = async function (kind, expiration = null) {
|
9 | const shareable = await this.getItem(field);
|
10 | return shareable.getShareLink(kind, expiration);
|
11 | };
|
12 | _Folder.prototype.checkSharingPermissions = async function (recipients) {
|
13 | const shareable = await this.getItem(field);
|
14 | return shareable.checkSharingPermissions(recipients);
|
15 | };
|
16 | _Folder.prototype.getSharingInformation = async function (request, expands, selects) {
|
17 | const shareable = await this.getItem(field);
|
18 | return shareable.getSharingInformation(request, expands, selects);
|
19 | };
|
20 | _Folder.prototype.getObjectSharingSettings = async function (useSimplifiedRoles = true) {
|
21 | const shareable = await this.getItem(field);
|
22 | return shareable.getObjectSharingSettings(useSimplifiedRoles);
|
23 | };
|
24 | _Folder.prototype.unshare = async function () {
|
25 | const shareable = await this.getItem(field);
|
26 | return shareable.unshare();
|
27 | };
|
28 | _Folder.prototype.deleteSharingLinkByKind = async function (kind) {
|
29 | const shareable = await this.getItem(field);
|
30 | return shareable.deleteSharingLinkByKind(kind);
|
31 | };
|
32 | _Folder.prototype.unshareLink = async function (kind, shareId) {
|
33 | const shareable = await this.getItem(field);
|
34 | return shareable.unshareLink(kind, shareId);
|
35 | };
|
36 |
|
\ | No newline at end of file |