UNPKG

1.67 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// TODO:: clean up this method signature for next major release
17// eslint-disable-next-line max-len
18_File.prototype.getSharingInformation = async function (request = null, expands, selects) {
19 const item = await this.getItem();
20 return item.getSharingInformation(request, expands, selects);
21};
22_File.prototype.getObjectSharingSettings = async function (useSimplifiedRoles = true) {
23 const item = await this.getItem();
24 return item.getObjectSharingSettings(useSimplifiedRoles);
25};
26_File.prototype.unshare = async function () {
27 const item = await this.getItem();
28 return item.unshare();
29};
30_File.prototype.deleteSharingLinkByKind = async function (linkKind) {
31 const item = await this.getItem();
32 return item.deleteSharingLinkByKind(linkKind);
33};
34_File.prototype.unshareLink = async function unshareLink(linkKind, shareId = emptyGuid) {
35 const item = await this.getItem();
36 return item.unshareLink(linkKind, shareId);
37};
38//# sourceMappingURL=file.js.map
\No newline at end of file