@pnp/sp
Version:
pnp - provides a fluent api for working with SharePoint REST
38 lines • 1.67 kB
JavaScript
import { _File } from "../files/types.js";
import { emptyGuid } from "../types.js";
import { SharingRole, } from "./types.js";
_File.prototype.shareWith = async function (loginNames, role = SharingRole.View, requireSignin = false, emailData) {
const item = await this.getItem();
return item.shareWith(loginNames, role, requireSignin, emailData);
};
_File.prototype.getShareLink = async function (kind, expiration = null) {
const item = await this.getItem();
return item.getShareLink(kind, expiration);
};
_File.prototype.checkSharingPermissions = async function (recipients) {
const item = await this.getItem();
return item.checkSharingPermissions(recipients);
};
// TODO:: clean up this method signature for next major release
// eslint-disable-next-line max-len
_File.prototype.getSharingInformation = async function (request = null, expands, selects) {
const item = await this.getItem();
return item.getSharingInformation(request, expands, selects);
};
_File.prototype.getObjectSharingSettings = async function (useSimplifiedRoles = true) {
const item = await this.getItem();
return item.getObjectSharingSettings(useSimplifiedRoles);
};
_File.prototype.unshare = async function () {
const item = await this.getItem();
return item.unshare();
};
_File.prototype.deleteSharingLinkByKind = async function (linkKind) {
const item = await this.getItem();
return item.deleteSharingLinkByKind(linkKind);
};
_File.prototype.unshareLink = async function unshareLink(linkKind, shareId = emptyGuid) {
const item = await this.getItem();
return item.unshareLink(linkKind, shareId);
};
//# sourceMappingURL=file.js.map