-
Notifications
You must be signed in to change notification settings - Fork 157
/
types.ts
71 lines (63 loc) · 1.97 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { Identity, SharingLinkType, UnifiedRoleDefinition } from '../../graph/generated'
import { Resource } from '../resource'
export enum GraphSharePermission {
createUpload = 'libre.graph/driveItem/upload/create',
createPermissions = 'libre.graph/driveItem/permissions/create',
createChildren = 'libre.graph/driveItem/children/create',
readBasic = 'libre.graph/driveItem/basic/read',
readPath = 'libre.graph/driveItem/path/read',
readQuota = 'libre.graph/driveItem/quota/read',
readContent = 'libre.graph/driveItem/content/read',
readChildren = 'libre.graph/driveItem/children/read',
readDeleted = 'libre.graph/driveItem/deleted/read',
updatePath = 'libre.graph/driveItem/path/update',
updateDeleted = 'libre.graph/driveItem/deleted/update',
deleteStandard = 'libre.graph/driveItem/standard/delete'
}
export interface ShareResource extends Resource {
sharedWith: Array<{ shareType: number } & Identity>
sharedBy: Identity[]
sdate: string
outgoing: boolean
driveId: string
}
export interface OutgoingShareResource extends ShareResource {}
export interface IncomingShareResource extends ShareResource {
hidden: boolean
syncEnabled: boolean
shareRoles: UnifiedRoleDefinition[]
sharePermissions: GraphSharePermission[]
}
export interface ShareRole extends UnifiedRoleDefinition {
icon?: string
label?: string
}
export interface Share {
id: string
resourceId: string
indirect: boolean
sharedBy: Identity
shareType: number
createdDateTime: string
expirationDateTime?: string
}
export interface CollaboratorShare extends Share {
permissions: GraphSharePermission[]
sharedWith: Identity
role: ShareRole
}
export interface LinkShare extends Share {
displayName: string
hasPassword: boolean
isQuickLink: boolean
type: SharingLinkType
webUrl: string
preventsDownload?: boolean
}
export interface CollaboratorAutoCompleteItem {
id: string
displayName: string
shareType: number
mail?: string
onPremisesSamAccountName?: string
}