1 | import { _SPQueryable, ISPQueryable, SPInit } from "../spqueryable.js";
|
2 | import { IPrincipalInfo, PrincipalType, PrincipalSource } from "../types.js";
|
3 | export declare class _Utilities extends _SPQueryable implements IUtilities {
|
4 | constructor(base: string | ISPQueryable, methodName?: string);
|
5 | excute<T>(props: any): Promise<T>;
|
6 | sendEmail(properties: IEmailProperties): Promise<void>;
|
7 | getCurrentUserEmailAddresses(): Promise<string>;
|
8 | resolvePrincipal(input: string, scopes: PrincipalType, sources: PrincipalSource, inputIsEmailOnly: boolean, addToUserInfoList: boolean, matchUserInfoList?: boolean): Promise<IPrincipalInfo>;
|
9 | searchPrincipals(input: string, scopes: PrincipalType, sources: PrincipalSource, groupName: string, maxCount: number): Promise<IPrincipalInfo[]>;
|
10 | createEmailBodyForInvitation(pageAddress: string): Promise<string>;
|
11 | expandGroupsToPrincipals(inputs: string[], maxCount?: number): Promise<IPrincipalInfo[]>;
|
12 | }
|
13 | /**
|
14 | * Describes the SharePoint utility methods
|
15 | */
|
16 | export interface IUtilities {
|
17 | /**
|
18 | * This methods will send an e-mail based on the incoming properties of the IEmailProperties parameter.
|
19 | * @param props IEmailProperties object
|
20 | */
|
21 | sendEmail(props: IEmailProperties): Promise<void>;
|
22 | /**
|
23 | * This method returns the current user's email addresses known to SharePoint.
|
24 | */
|
25 | getCurrentUserEmailAddresses(): Promise<string>;
|
26 | /**
|
27 | * Gets information about a principal that matches the specified Search criteria.
|
28 | * @param email E-mail address
|
29 | * @param scopes Specifies the type to be used when searching for a principal
|
30 | * @param sources Specifies the source to be used when searching for a principal.
|
31 | * @param inputIsEmailOnly Specifies whether only the e-mail address will be used when searching for a principal.
|
32 | * @param addToUserInfoList Specifies whether the user should be added to the hidden user info list.
|
33 | * @param matchUserInfoList [Optional] By default false
|
34 | */
|
35 | resolvePrincipal(email: string, scopes: PrincipalType, sources: PrincipalSource, inputIsEmailOnly: boolean, addToUserInfoList: boolean, matchUserInfoList?: boolean): Promise<IPrincipalInfo>;
|
36 | /**
|
37 | * Gets information about the principals that match the specified search criteria.
|
38 | * @param input Specifies the value to be used when searching for a principal.
|
39 | * @param scopes Specifies the type to be used when searching for a principal.
|
40 | * @param sources Specifies the source to be used when searching for a principal.
|
41 | * @param groupName Specifies the collection of users to be used when searching for a principal.
|
42 | * @param maxCount Specifies the maximum number of principals to be returned in the list.
|
43 | */
|
44 | searchPrincipals(input: string, scopes: PrincipalType, sources: PrincipalSource, groupName: string, maxCount: number): Promise<IPrincipalInfo[]>;
|
45 | /**
|
46 | * Gets the external (outside the firewall) URL to a document or resource in a site.
|
47 | * @param pageAddress Specifies the URI for the document or resource. It must be a URL.
|
48 | */
|
49 | createEmailBodyForInvitation(pageAddress: string): Promise<string>;
|
50 | /**
|
51 | * Resolves the principals contained within the supplied groups.
|
52 | * @param inputs A collection of groups to be expanded.
|
53 | * @param maxCount Specifies the maximum number of principals to be returned.
|
54 | */
|
55 | expandGroupsToPrincipals(inputs: string[], maxCount?: number): Promise<IPrincipalInfo[]>;
|
56 | }
|
57 | export declare const Utilities: (base: SPInit, path?: string) => IUtilities;
|
58 | export interface IEmailProperties {
|
59 | /**
|
60 | * The list of receivers represented by a string array.
|
61 | */
|
62 | To: string[];
|
63 | /**
|
64 | * The list of receivers as CC (carbon copy) represented by a string array.
|
65 | * This is optional.
|
66 | */
|
67 | CC?: string[];
|
68 | /**
|
69 | * The list of receivers as BCC (blind carbon copy) represented by a string array.
|
70 | * This is optional.
|
71 | */
|
72 | BCC?: string[];
|
73 | /**
|
74 | * The subject of the email.
|
75 | */
|
76 | Subject: string;
|
77 | /**
|
78 | * The body of the email.
|
79 | */
|
80 | Body: string;
|
81 | /**
|
82 | * The additional headers appened to the request in key/value pairs.
|
83 | */
|
84 | AdditionalHeaders?: Record<string, string>;
|
85 | /**
|
86 | * The from address of the email.
|
87 | * This is optional.
|
88 | */
|
89 | From?: string;
|
90 | }
|
91 | export interface IWikiPageCreationInfo {
|
92 | /**
|
93 | * The server-relative-url of the wiki page to be created.
|
94 | */
|
95 | ServerRelativeUrl: string;
|
96 | /**
|
97 | * The wiki content to be set in the wiki page.
|
98 | */
|
99 | WikiHtmlContent: string;
|
100 | }
|
101 | //# sourceMappingURL=types.d.ts.map |
\ | No newline at end of file |