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