UNPKG

3 kBTypeScriptView Raw
1import { ShareableQueryable, ISharingResult, SharingRole, IShareObjectOptions, SharingLinkKind, IShareLinkResponse, ISharingInformationRequest, ISharingRecipient, ISharingEntityPermission, ISharingInformation, IObjectSharingSettings, ISharingEmailData } from "./types.js";
2/**
3 * Shares an object based on the supplied options
4 *
5 * @param options The set of options to send to the ShareObject method
6 * @param bypass If true any processing is skipped and the options are sent directly to the ShareObject method
7 */
8export declare function shareObject(o: ShareableQueryable, options: IShareObjectOptions, bypass?: boolean): Promise<ISharingResult>;
9/**
10 * Gets a sharing link for the supplied
11 *
12 * @param kind The kind of link to share
13 * @param expiration The optional expiration for this link
14 */
15export declare function getShareLink(this: ShareableQueryable, kind: SharingLinkKind, expiration?: Date): Promise<IShareLinkResponse>;
16/**
17 * Checks Permissions on the list of Users and returns back role the users have on the Item.
18 *
19 * @param recipients The array of Entities for which Permissions need to be checked.
20 */
21export declare function checkPermissions(this: ShareableQueryable, recipients: ISharingRecipient[]): Promise<ISharingEntityPermission[]>;
22/**
23 * Get Sharing Information.
24 *
25 * @param request The SharingInformationRequest Object.
26 * @param expands Expand more fields.
27 *
28 */
29export declare function getSharingInformation(this: ShareableQueryable, request?: ISharingInformationRequest, expands?: string[]): Promise<ISharingInformation>;
30/**
31 * Gets the sharing settings of an item.
32 *
33 * @param useSimplifiedRoles Determines whether to use simplified roles.
34 */
35export declare function getObjectSharingSettings(this: ShareableQueryable, useSimplifiedRoles?: boolean): Promise<IObjectSharingSettings>;
36/**
37 * Unshares this object
38 */
39export declare function unshareObject(this: ShareableQueryable): Promise<ISharingResult>;
40/**
41 * Deletes a link by type
42 *
43 * @param kind Deletes a sharing link by the kind of link
44 */
45export declare function deleteLinkByKind(this: ShareableQueryable, linkKind: SharingLinkKind): Promise<void>;
46/**
47 * Removes the specified link to the item.
48 *
49 * @param kind The kind of link to be deleted.
50 * @param shareId
51 */
52export declare function unshareLink(this: ShareableQueryable, linkKind: SharingLinkKind, shareId?: string): Promise<void>;
53/**
54 * Shares this instance with the supplied users
55 *
56 * @param loginNames Resolved login names to share
57 * @param role The role
58 * @param requireSignin True to require the user is authenticated, otherwise false
59 * @param propagateAcl True to apply this share to all children
60 * @param emailData If supplied an email will be sent with the indicated properties
61 */
62export declare function shareWith(o: ShareableQueryable, loginNames: string | string[], role: SharingRole, requireSignin?: boolean, propagateAcl?: boolean, emailData?: ISharingEmailData): Promise<ISharingResult>;
63//# sourceMappingURL=funcs.d.ts.map
\No newline at end of file