-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathtypeDefs.ts
More file actions
78 lines (73 loc) · 1.55 KB
/
typeDefs.ts
File metadata and controls
78 lines (73 loc) · 1.55 KB
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
72
73
74
75
76
77
78
export type CallbackDoc = {
downloadUrl?: string
uploadState?: string
description: string
driveSuccess: boolean
embedUrl: string
iconUrl: string
id: string
isShared: boolean
lastEditedUtc: number
mimeType: string
name: string
rotation: number
rotationDegree: number
serviceId: string
sizeBytes: number
type: string
url: string
}
export type PickerCallback = {
action: string
docs: CallbackDoc[]
}
export type authResult = {
access_token: string;
token_type: string;
expires_in: number;
scope: string;
authuser: string;
prompt: string;
}
type ViewIdOptions =
| 'DOCS'
| 'DOCS_IMAGES'
| 'DOCS_IMAGES_AND_VIDEOS'
| 'DOCS_VIDEOS'
| 'DOCUMENTS'
| 'DRAWINGS'
| 'FOLDERS'
| 'FORMS'
| 'PDFS'
| 'SPREADSHEETS'
| 'PRESENTATIONS'
export type PickerConfiguration = {
clientId: string
developerKey: string
viewId?: ViewIdOptions
viewMimeTypes?: string
setIncludeFolders?: boolean
setOwnedByMe?: boolean
setSelectFolderEnabled?: boolean
disableDefaultView?: boolean
token?: string
setOrigin?: string
multiselect?: boolean
disabled?: boolean
appId?: string
supportDrives?: boolean
showUploadView?: boolean
showUploadFolders?: boolean
setParentFolder?: string
// eslint-disable-next-line @typescript-eslint/no-explicit-any
customViews?: any[]
locale?: string
customScopes?: string[]
callbackFunction: (data: PickerCallback) => any
}
export const defaultConfiguration: PickerConfiguration = {
clientId: '',
developerKey: '',
viewId: 'DOCS',
callbackFunction: () => null,
}