-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
82 lines (74 loc) · 1.68 KB
/
Copy pathtypes.ts
File metadata and controls
82 lines (74 loc) · 1.68 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
export interface DNSRecord {
name: string;
type: number;
TTL: number;
data: string;
}
export interface DNSResponse {
Status: number;
TC: boolean;
RD: boolean;
RA: boolean;
AD: boolean;
CD: boolean;
Question: { name: string; type: number }[];
Answer?: DNSRecord[];
Authority?: DNSRecord[];
Additional?: DNSRecord[];
latency?: number;
}
export interface IPIntelligence {
ip: string;
org: string;
asn: string;
country: string;
city: string;
latitude: number;
longitude: number;
/**
* True when the IP belongs to a known anycast CDN/network.
* Geolocation for anycast IPs reflects the registry address, not the
* actual PoP your TCP connection reaches — callers should use the
* user's location as the terminal map node instead.
*/
isAnycast: boolean;
}
export interface CertificateInfo {
subject: string;
issuer: string;
validFrom: string;
validTo: string;
cipher: string;
protocol: string;
keyExchange: string;
}
export interface SecurityHeader {
key: string;
value: string;
status: 'secure' | 'warning' | 'missing';
description: string;
}
export enum StepStatus {
IDLE = 'IDLE',
ACTIVE = 'ACTIVE',
COMPLETED = 'COMPLETED',
ERROR = 'ERROR'
}
export type ServerType = 'client' | 'resolver' | 'root' | 'tld' | 'authoritative' | 'tcp' | 'tls' | 'http';
export interface TraceStep {
id: string;
title: string;
description: string;
status: StepStatus;
serverType: ServerType;
liveResult?: string[];
latency?: number;
}
// Represents a geolocation point in the live route trace on the map
export interface RoutePoint {
stepIndex: number;
label: string;
lat: number;
lng: number;
status: StepStatus;
}