UNPKG

3.87 kBTypeScriptView Raw
1import { _SPInstance, _SPCollection, SPInit } from "../spqueryable.js";
2import { SharepointIds, ResourceVisualization } from "@microsoft/microsoft-graph-types";
3export declare class _Favorites extends _SPInstance implements IFavorites {
4 get followedSites(): IFollowedSites;
5 get followedListItems(): IFollowedListItems;
6}
7export declare const Favorites: (baseUrl: SPInit) => IFavorites;
8export declare class _FollowedSites extends _SPCollection<IFollowedSiteInfo[]> {
9 /**
10 * Adds a site to user's followed sites
11 *
12 * @param tenantUrl Name of a tenant (e.g. yourtenant.sharepoint.com).
13 * @param siteId Id of a site collection.
14 * @param webId Id of a site.
15 * @param webUrl Absolute URL of a site.
16 */
17 add(tenantUrl: string, siteId: string, webId: string, webUrl: string): Promise<IFollowedSiteInfo[]>;
18 /**
19 * Removes a site from user's followed sites
20 *
21 * @param tenantUrl Name of a tenant (e.g. yourtenant.sharepoint.com).
22 * @param siteId Id of a site collection.
23 * @param webId Id of a site.
24 * @param webUrl Absolute URL of a site.
25 */
26 remove(tenantUrl: string, siteId: string, webId: string, webUrl: string): Promise<void>;
27}
28export interface IFollowedSites extends _FollowedSites {
29}
30export declare const FollowedSites: import("../spqueryable.js").ISPInvokableFactory<IFollowedSites>;
31export declare class _FollowedListItems extends _SPCollection<IFollowedListItemInfo[]> {
32 /**
33 * Adds an item to user's _saved for later_ list
34 *
35 * @param siteId Id of a site collection of an item to add
36 * @param webId Id of a site of an item to add
37 * @param listId Id of a list of an item to add
38 * @param listItemUniqueId Unique id of an item to add
39 */
40 add(siteId: string, webId: string, listId: string, listItemUniqueId: string): Promise<IFollowedListItemInfo>;
41 /**
42 * Removes an item from user's _saved for later_ list
43 *
44 * @param siteId Id of a site collection of an item to remove
45 * @param webId Id of a site of an item to remove
46 * @param listId Id of a list of an item to remove
47 * @param listItemUniqueId Unique id of an item to remove
48 */
49 remove(siteId: string, webId: string, listId: string, listItemUniqueId: string): Promise<void>;
50}
51export interface IFollowedListItems extends _FollowedListItems {
52}
53export declare const FollowedListItems: import("../spqueryable.js").ISPInvokableFactory<IFollowedListItems>;
54export interface IFavorites {
55 readonly followedSites: IFollowedSites;
56 readonly followedListItems: IFollowedListItems;
57}
58export interface IFollowedSiteInfo {
59 id: string;
60 webUrl: string;
61 title: string;
62 sharepointIds: SharepointIds;
63 siteCollection: {
64 hostName: string;
65 };
66 template: any;
67 exchangeIds: IFollowedExchangeId;
68 resourceVisualization: {
69 color: string;
70 };
71}
72export interface IFollowedListItemInfo {
73 description: string;
74 id: string;
75 lastModifiedDateTime: string;
76 name: string;
77 size: number;
78 webUrl: string;
79 serverRedirectedUrl: string;
80 contentClass: string;
81 lastModifiedBy: {
82 user: IFavoritesUser;
83 };
84 sharepointIds: SharepointIds;
85 contentType: {
86 id: string;
87 };
88 resourceVisualization: IFavoritesResourceVisualization;
89 exchangeIds: IFollowedExchangeId;
90 followed: {
91 followedDateTime: string;
92 };
93 file: {
94 fileExtension: string;
95 };
96 news: {
97 publishedDateTime: string;
98 newsType: string;
99 author: IFavoritesUser;
100 };
101}
102export interface IFavoritesResourceVisualization extends ResourceVisualization {
103 color: string;
104}
105export interface IFollowedExchangeId {
106 id: string;
107 documentId: string;
108}
109export interface IFavoritesUser {
110 displayName: string;
111 userPrincipalName: string;
112}
113//# sourceMappingURL=types.d.ts.map
\No newline at end of file