@mikezimm/npmfunctions
Version:
Functions used in my SPFx webparts
46 lines (45 loc) • 1.3 kB
TypeScript
export interface ISharedWithUser {
Title: string;
Name: string;
Id: number;
}
/**
* This is details of one sharing event: one person sharing with another person
* It should be nexted under the item's IItemSharingInfo which has other item relavant info for later use like FileLeafRef
* Should be nested under an item as an array of events
*/
export interface ISharingEvent {
key: string;
keys: string[];
sharedWith: string;
sharedBy: string;
DateTime: string;
TimeMS: number;
LoginName: string;
SharedTime: Date;
FileRef: string;
FileLeafRef: string;
FileSystemObjectType: number;
}
/**
* IItemSharingInfo is intended to be a sub-object on an item that has sharing.
* It is used to then contain all the sharing details in a usable object
*/
export interface IItemSharingInfo {
SharedWithDetails?: string;
sharedEvents: ISharingEvent[];
SharedWithUsers: ISharedWithUser[];
FileRef: string;
FileLeafRef: string;
FileSystemObjectType: number;
}
export interface IMySharingInfoSet {
items: any[];
elements: any[];
isLoaded: boolean;
errMessage: string;
}
export interface IMySharingInfo {
history: IMySharingInfoSet;
details: IMySharingInfoSet;
}