This repository was archived by the owner on Oct 1, 2020. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathindex.d.ts
More file actions
97 lines (72 loc) · 2.11 KB
/
Copy pathindex.d.ts
File metadata and controls
97 lines (72 loc) · 2.11 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
declare module "@nearform/react-native-exposure-notification-service" {
import { EventSubscriptionVendor } from "react-native"
export enum AuthorisedStatus {
granted = "granted",
denied = "denied",
blocked = "blocked",
unavailable = "unavailable",
unknown = "unknown",
}
export interface ConfigurationOptions {
exposureCheckFrequency: number
serverURL: string
authToken: string
refreshToken: string
storeExposuresFor: number
fileLimit: number
version: string
notificationTitle: string
notificationDesc: string
callbackNumber: string
analyticsOptin: boolean
}
export interface DiagnosisKey {
keyData: string
}
export interface CloseContact {
exposureAlertDate: string
attenuationDurations: number[]
daysSinceLastExposure: number
matchedKeyCount: number
maxRiskScore: number
summationRiskScore: number
}
export enum StatusState {
unknown = "unknown",
restricted = "restricted",
disabled = "disabled",
active = "active",
}
export enum StatusType {
bluetooth = "bluetooth",
exposure = "exposure",
resolution = "resolution",
}
interface Status {
state: StatusState
type?: StatusType[]
}
const ExposureNotificationModuleInstance: ExposureNotificationModule
export default ExposureNotificationModuleInstance
interface ExposureNotificationModule extends EventSubscriptionVendor {
canSupport(): Promise<boolean>
isSupported(): Promise<boolean>
exposureEnabled(): Promise<boolean>
isAuthorised(): Promise<AuthorisedStatus>
authoriseExposure(): Promise<boolean>
configure(options: ConfigurationOptions): void
start(): Promise<boolean>
stop(): Promise<boolean>
deleteAllData(): Promise<boolean>
deleteExposureData(): Promise<boolean>
getDiagnosisKeys(): Promise<DiagnosisKey[]>
checkExposure(readDetails?: boolean, skipTimeCheck?: boolean): void
getCloseContacts(): Promise<CloseContact[]>
status(): Promise<Status>
getLogData(): Promise<any>
/**
* @platform android
*/
triggerUpdate(): Promise<string>
}
}