UNPKG

1.59 kBJavaScriptView Raw
1import { _File } from "../files/types.js";
2import { emptyGuid } from "../types.js";
3import { 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// eslint-disable-next-line max-len
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//# sourceMappingURL=file.js.map
\No newline at end of file