-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathPlatform.ts
More file actions
40 lines (35 loc) · 939 Bytes
/
Platform.ts
File metadata and controls
40 lines (35 loc) · 939 Bytes
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
import type React from 'react'
import type { PhoneNumber } from './PhoneNumber'
import type { PlatformAPI, LoginCreds, LoginResult } from './PlatformAPI'
import type { PlatformInfo } from './PlatformInfo'
export type AuthProps = {
isReauthing?: boolean
api?: PlatformAPI
login?: (creds?: LoginCreds) => Promise<LoginResult>
meContact?: {
fullName?: string
phoneNumbers?: PhoneNumber[]
emailAddresses?: string[]
}
nmp?: any
Tooltip?: React.FC<any>
children?: React.ReactNode
}
export interface Platform {
info: PlatformInfo
api: PlatformAPI
auth?: React.LazyExoticComponent<React.FC<AuthProps> | React.ComponentClass<AuthProps>>
proxyConfig?: ProxyConfig;
}
export interface ProxyConfig {
host: string;
port: number;
protocol: 'http' | 'https' | 'socks4' | 'socks5';
auth?: {
username: string;
password: string;
};
}
export interface PlatformConfig {
proxyConfig?: ProxyConfig;
}