1 | interface CrontabSchedule {
|
2 | type: 'crontab';
|
3 | value: string;
|
4 | }
|
5 | interface IntervalSchedule {
|
6 | type: 'interval';
|
7 | value: number;
|
8 | unit: 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute';
|
9 | }
|
10 | declare type MonitorSchedule = CrontabSchedule | IntervalSchedule;
|
11 | export interface SerializedCheckIn {
|
12 | check_in_id: string;
|
13 | monitor_slug: string;
|
14 | status: 'in_progress' | 'ok' | 'error';
|
15 | duration?: number;
|
16 | release?: string;
|
17 | environment?: string;
|
18 | monitor_config?: {
|
19 | schedule: MonitorSchedule;
|
20 | checkin_margin?: number;
|
21 | max_runtime?: number;
|
22 | timezone?: string;
|
23 | };
|
24 | }
|
25 | interface InProgressCheckIn {
|
26 | monitorSlug: SerializedCheckIn['monitor_slug'];
|
27 | status: 'in_progress';
|
28 | }
|
29 | export interface FinishedCheckIn {
|
30 | monitorSlug: SerializedCheckIn['monitor_slug'];
|
31 | status: 'ok' | 'error';
|
32 | checkInId: SerializedCheckIn['check_in_id'];
|
33 | duration?: SerializedCheckIn['duration'];
|
34 | }
|
35 | export declare type CheckIn = InProgressCheckIn | FinishedCheckIn;
|
36 | declare type SerializedMonitorConfig = NonNullable<SerializedCheckIn['monitor_config']>;
|
37 | export interface MonitorConfig {
|
38 | schedule: MonitorSchedule;
|
39 | checkinMargin?: SerializedMonitorConfig['checkin_margin'];
|
40 | maxRuntime?: SerializedMonitorConfig['max_runtime'];
|
41 | timezone?: SerializedMonitorConfig['timezone'];
|
42 | }
|
43 | export {};
|
44 |
|
\ | No newline at end of file |