-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69ac2ee
commit 62caa46
Showing
39 changed files
with
597 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...board/src/api/endpoints/authentication.ts → ...src/api/endpoints/authentication/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./changelogs"; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
import client from "../../client"; | ||
|
||
/* | ||
Shared | ||
*/ | ||
|
||
export interface Check { | ||
id: string; | ||
statusCode: number; | ||
timing: Timing; | ||
tls: TLS; | ||
createdAt: string; | ||
} | ||
export interface Timing { | ||
dnsLookup: number; | ||
tcpConnection: number; | ||
tlsHandshake: number; | ||
serverProcessing: number; | ||
contentTransfer: number; | ||
total: number; | ||
} | ||
|
||
export interface TLS { | ||
version: string; | ||
cipher: string; | ||
issuer: string; | ||
subject: string; | ||
notBefore: Date; | ||
notAfter: Date; | ||
} | ||
|
||
/* | ||
Get Monitor Checks | ||
*/ | ||
|
||
export interface GetMonitorChecksResponse { | ||
checks: Check[]; | ||
} | ||
|
||
export async function getMonitorChecks( | ||
teamId: number, | ||
monitorId: number, | ||
offset?: number, | ||
limit?: number, | ||
): Promise<GetMonitorChecksResponse> { | ||
const response = await client.get( | ||
`/v1/teams/${teamId}/monitors/${monitorId}/checks`, | ||
{ | ||
params: { | ||
offset, | ||
limit, | ||
}, | ||
}, | ||
); | ||
|
||
return response?.data; | ||
} | ||
|
||
/* | ||
Get Monitor Check | ||
*/ | ||
|
||
export async function getMonitorCheck( | ||
teamId: number, | ||
monitorId: number, | ||
checkId: number, | ||
): Promise<Check> { | ||
const response = await client.get( | ||
`/v1/teams/${teamId}/monitors/${monitorId}/checks/${checkId}`, | ||
); | ||
|
||
return response?.data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./checks"; | ||
export * from "./metrics"; | ||
export * from "./monitors"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import client from "../../client"; | ||
|
||
/* | ||
Shared | ||
*/ | ||
|
||
export interface Metric { | ||
name: string; | ||
timing: MetricTiming[]; | ||
} | ||
|
||
export interface MetricTiming { | ||
timing: number; | ||
start: string; | ||
} | ||
|
||
/* | ||
Get monitor metrics | ||
*/ | ||
|
||
export interface getMonitorMetricsResponse { | ||
metrics: Metric[]; | ||
} | ||
|
||
export async function getMonitorMetrics( | ||
teamId: number, | ||
monitorId: number, | ||
): Promise<getMonitorMetricsResponse> { | ||
const response = await client.get( | ||
`/v1/teams/${teamId}/monitors/${monitorId}/metrics`, | ||
); | ||
return response?.data; | ||
} |
Oops, something went wrong.