-
-
Notifications
You must be signed in to change notification settings - Fork 203
/
Copy pathgoogle.ts
44 lines (35 loc) · 954 Bytes
/
google.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
import { BaseIntegrationConfig, IntegrationId, IntegrationType } from '../integrations'
export interface GoogleTemplateSheetSettings {
documentId: string
sheetTitle: string
}
export interface GoogleCredentials {
clientId: string
clientSecret: string
redirectUri: string
accessToken?: string
refreshToken?: string
scope?: string[]
tokenType?: string
expiryDate?: number
}
export interface GoogleConfig extends BaseIntegrationConfig {
id: IntegrationId.Google
type: IntegrationType.Export
credentials: GoogleCredentials
documentId: string
dateFormat?: string
template?: GoogleTemplateSheetSettings
}
export const defaultGoogleConfig: GoogleConfig = {
name: '',
id: IntegrationId.Google,
type: IntegrationType.Export,
credentials: {
clientId: '',
clientSecret: '',
redirectUri: 'urn:ietf:wg:oauth:2.0:oob',
scope: ['https://www.googleapis.com/auth/spreadsheets'],
},
documentId: ''
}