UNPKG

12 kBTypeScriptView Raw
1import { _SPInstance, ISPQueryable, ISPCollection, ISPInstance } from "../spqueryable.js";
2import { PrincipalType, PrincipalSource } from "../types.js";
3export declare class _Profiles extends _SPInstance {
4 private clientPeoplePickerQuery;
5 private profileLoader;
6 /**
7 * Creates a new instance of the UserProfileQuery class
8 *
9 * @param baseUrl The url or SharePointQueryable which forms the parent of this user profile query
10 */
11 constructor(baseUrl: string | ISPQueryable, path?: string);
12 /**
13 * The url of the edit profile page for the current user
14 */
15 getEditProfileLink(): Promise<string>;
16 /**
17 * A boolean value that indicates whether the current user's "People I'm Following" list is public
18 */
19 getIsMyPeopleListPublic(): Promise<boolean>;
20 /**
21 * A boolean value that indicates whether the current user is being followed by the specified user
22 *
23 * @param loginName The account name of the user
24 */
25 amIFollowedBy(loginName: string): Promise<boolean>;
26 /**
27 * A boolean value that indicates whether the current user is following the specified user
28 *
29 * @param loginName The account name of the user
30 */
31 amIFollowing(loginName: string): Promise<boolean>;
32 /**
33 * Gets tags that the current user is following
34 *
35 * @param maxCount The maximum number of tags to retrieve (default is 20)
36 */
37 getFollowedTags(maxCount?: number): Promise<string[]>;
38 /**
39 * Gets the people who are following the specified user
40 *
41 * @param loginName The account name of the user
42 */
43 getFollowersFor(loginName: string): Promise<any[]>;
44 /**
45 * Gets the people who are following the current user
46 *
47 */
48 get myFollowers(): ISPCollection;
49 /**
50 * Gets user properties for the current user
51 *
52 */
53 get myProperties(): ISPInstance;
54 /**
55 * Gets the people who the specified user is following
56 *
57 * @param loginName The account name of the user.
58 */
59 getPeopleFollowedBy(loginName: string): Promise<any[]>;
60 /**
61 * Gets user properties for the specified user.
62 *
63 * @param loginName The account name of the user.
64 */
65 getPropertiesFor(loginName: string): Promise<any>;
66 /**
67 * Gets the 20 most popular hash tags over the past week, sorted so that the most popular tag appears first
68 *
69 */
70 get trendingTags(): Promise<IHashTagCollection>;
71 /**
72 * Gets the specified user profile property for the specified user
73 *
74 * @param loginName The account name of the user
75 * @param propertyName The case-sensitive name of the property to get
76 */
77 getUserProfilePropertyFor(loginName: string, propertyName: string): Promise<string>;
78 /**
79 * Removes the specified user from the user's list of suggested people to follow
80 *
81 * @param loginName The account name of the user
82 */
83 hideSuggestion(loginName: string): Promise<void>;
84 /**
85 * A boolean values that indicates whether the first user is following the second user
86 *
87 * @param follower The account name of the user who might be following the followee
88 * @param followee The account name of the user who might be followed by the follower
89 */
90 isFollowing(follower: string, followee: string): Promise<boolean>;
91 /**
92 * Uploads and sets the user profile picture (Users can upload a picture to their own profile only). Not supported for batching.
93 *
94 * @param profilePicSource Blob data representing the user's picture in BMP, JPEG, or PNG format of up to 4.76MB
95 */
96 setMyProfilePic(profilePicSource: Blob): Promise<void>;
97 /**
98 * Sets single value User Profile property
99 *
100 * @param accountName The account name of the user
101 * @param propertyName Property name
102 * @param propertyValue Property value
103 */
104 setSingleValueProfileProperty(accountName: string, propertyName: string, propertyValue: string): Promise<void>;
105 /**
106 * Sets multi valued User Profile property
107 *
108 * @param accountName The account name of the user
109 * @param propertyName Property name
110 * @param propertyValues Property values
111 */
112 setMultiValuedProfileProperty(accountName: string, propertyName: string, propertyValues: string[]): Promise<void>;
113 /**
114 * Provisions one or more users' personal sites. (My Site administrator on SharePoint Online only)
115 *
116 * @param emails The email addresses of the users to provision sites for
117 */
118 createPersonalSiteEnqueueBulk(...emails: string[]): Promise<void>;
119 /**
120 * Gets the user profile of the site owner
121 *
122 */
123 get ownerUserProfile(): Promise<IUserProfile>;
124 /**
125 * Gets the user profile for the current user
126 */
127 get userProfile(): Promise<any>;
128 /**
129 * Enqueues creating a personal site for this user, which can be used to share documents, web pages, and other files
130 *
131 * @param interactiveRequest true if interactively (web) initiated request, or false (default) if non-interactively (client) initiated request
132 */
133 createPersonalSite(interactiveRequest?: boolean): Promise<void>;
134 /**
135 * Sets the privacy settings for this profile
136 *
137 * @param share true to make all social data public; false to make all social data private
138 */
139 shareAllSocialData(share: boolean): Promise<void>;
140 /**
141 * Resolves user or group using specified query parameters
142 *
143 * @param queryParams The query parameters used to perform resolve
144 */
145 clientPeoplePickerResolveUser(queryParams: IClientPeoplePickerQueryParameters): Promise<IPeoplePickerEntity>;
146 /**
147 * Searches for users or groups using specified query parameters
148 *
149 * @param queryParams The query parameters used to perform search
150 */
151 clientPeoplePickerSearchUser(queryParams: IClientPeoplePickerQueryParameters): Promise<IPeoplePickerEntity[]>;
152}
153export interface IProfiles extends _Profiles {
154}
155export declare const Profiles: import("../spqueryable.js").ISPInvokableFactory<IProfiles>;
156/**
157 * Client people picker query parameters
158 */
159export interface IClientPeoplePickerQueryParameters {
160 /**
161 * Gets or sets a value that specifies whether e-mail addresses can be used to perform search.
162 */
163 AllowEmailAddresses?: boolean;
164 /**
165 * Gets or sets a value that specifies whether multiple entities are allowed.
166 */
167 AllowMultipleEntities?: boolean;
168 /**
169 * Gets or sets a value that specifies whether only e-mail addresses can be used to perform search.
170 */
171 AllowOnlyEmailAddresses?: boolean;
172 /**
173 * Gets or sets a value that specifies whether all URL zones are used to perform search.
174 */
175 AllUrlZones?: boolean;
176 /**
177 * Gets or sets a value that specifies claim providers that are used to perform search.
178 */
179 EnabledClaimProviders?: string;
180 /**
181 * Gets or sets a value that specifies whether claims are forced (if yes, multiple results for single entity can be returned).
182 */
183 ForceClaims?: boolean;
184 /**
185 * Gets or sets a value that specifies limit of results returned.
186 */
187 MaximumEntitySuggestions: number;
188 /**
189 * Gets or sets a value that specifies principal sources to perform search.
190 */
191 PrincipalSource?: PrincipalSource;
192 /**
193 * Gets or sets a value that specifies principal types to search for.
194 */
195 PrincipalType?: PrincipalType;
196 /**
197 * Gets or sets a value that specifies additional query settings.
198 */
199 QuerySettings?: IPeoplePickerQuerySettings;
200 /**
201 * Gets or sets a value that specifies the term to search for.
202 */
203 QueryString: string;
204 /**
205 * Gets or sets a value that specifies ID of the SharePoint Group that will be used to perform search.
206 */
207 SharePointGroupID?: number;
208 /**
209 * Gets or sets a value that specifies URL zones that are used to perform search.
210 */
211 UrlZone?: UrlZone;
212 /**
213 * Gets or sets a value that specifies whether search is limited to specific URL zone.
214 */
215 UrlZoneSpecified?: boolean;
216 /**
217 * Gets or sets a value that specifies GUID of the Web Application that is used to perform search.
218 */
219 WebApplicationID?: string;
220}
221export interface IHashTagCollection {
222 Items: IHashTag[];
223}
224/**
225 * People picker query settings
226 */
227export interface IPeoplePickerQuerySettings {
228 ExcludeAllUsersOnTenantClaim?: boolean;
229}
230/**
231 * People picker entity
232 */
233export interface IPeoplePickerEntity {
234 Description: string;
235 DisplayText: string;
236 EntityData: IPeoplePickerEntityData;
237 EntityType: string;
238 IsResolved: boolean;
239 Key: string;
240 MultipleMatches: IPeoplePickerEntityData[];
241 ProviderDisplayName: string;
242 ProviderName: string;
243}
244/**
245 * People picker entity data
246 */
247export interface IPeoplePickerEntityData {
248 AccountName?: string;
249 Department?: string;
250 Email?: string;
251 IsAltSecIdPresent?: string;
252 MobilePhone?: string;
253 ObjectId?: string;
254 OtherMails?: string;
255 PrincipalType?: string;
256 SPGroupID?: string;
257 SPUserID?: string;
258 Title?: string;
259}
260/**
261 * Specifies the originating zone of a request received.
262 */
263export declare const enum UrlZone {
264 /**
265 * Specifies the default zone used for requests unless another zone is specified.
266 */
267 DefaultZone = 0,
268 /**
269 * Specifies an intranet zone.
270 */
271 Intranet = 1,
272 /**
273 * Specifies an Internet zone.
274 */
275 Internet = 2,
276 /**
277 * Specifies a custom zone.
278 */
279 Custom = 3,
280 /**
281 * Specifies an extranet zone.
282 */
283 Extranet = 4
284}
285export interface IHashTag {
286 /**
287 * The hash tag's internal name.
288 */
289 Name?: string;
290 /**
291 * The number of times that the hash tag is used.
292 */
293 UseCount?: number;
294}
295export interface IFollowedContent {
296 FollowedDocumentsUrl: string;
297 FollowedSitesUrl: string;
298}
299export interface IUserProfile {
300 /**
301 * An object containing the user's FollowedDocumentsUrl and FollowedSitesUrl.
302 */
303 FollowedContent?: IFollowedContent;
304 /**
305 * The account name of the user. (SharePoint Online only)
306 */
307 AccountName?: string;
308 /**
309 * The display name of the user. (SharePoint Online only)
310 */
311 DisplayName?: string;
312 /**
313 * The FirstRun flag of the user. (SharePoint Online only)
314 */
315 O15FirstRunExperience?: number;
316 /**
317 * The personal site of the user.
318 */
319 PersonalSite?: string;
320 /**
321 * The capabilities of the user's personal site. Represents a bitwise PersonalSiteCapabilities value:
322 * None = 0; Profile Value = 1; Social Value = 2; Storage Value = 4; MyTasksDashboard Value = 8; Education Value = 16; Guest Value = 32.
323 */
324 PersonalSiteCapabilities?: number;
325 /**
326 * The error thrown when the user's personal site was first created, if any. (SharePoint Online only)
327 */
328 PersonalSiteFirstCreationError?: string;
329 /**
330 * The date and time when the user's personal site was first created. (SharePoint Online only)
331 */
332 PersonalSiteFirstCreationTime?: Date;
333 /**
334 * The status for the state of the personal site instantiation
335 */
336 PersonalSiteInstantiationState?: number;
337 /**
338 * The date and time when the user's personal site was last created. (SharePoint Online only)
339 */
340 PersonalSiteLastCreationTime?: Date;
341 /**
342 * The number of attempts made to create the user's personal site. (SharePoint Online only)
343 */
344 PersonalSiteNumberOfRetries?: number;
345 /**
346 * Indicates whether the user's picture is imported from Exchange.
347 */
348 PictureImportEnabled?: boolean;
349 /**
350 * The public URL of the personal site of the current user. (SharePoint Online only)
351 */
352 PublicUrl?: string;
353 /**
354 * The URL used to create the user's personal site.
355 */
356 UrlToCreatePersonalSite?: string;
357}
358//# sourceMappingURL=types.d.ts.map
\No newline at end of file