/
Automation.interfaces.ts
107 lines (101 loc) · 2.16 KB
/
Automation.interfaces.ts
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
98
99
100
101
102
103
104
105
106
107
export interface IAutomationRunDetailResponseObject {
data: object; //???
guid: string;
error: object; //???
title: string;
inputs: object; //???
status:
| "failed"
| "finished"
| "finished with warnings"
| "must stop"
| "not started"
| "running"
| "starting"
| "stopped";
context:
| "test_run"
| "editor"
| "detail"
| "api_sync"
| "api_async"
| "webhook"
| "lookup";
stopTime: string;
createdAt: string;
isTestRun: boolean;
startTime: string;
updatedAt: string;
isArchived: boolean;
expectedInputs: object; //???
scheduledStartTime: string;
}
export interface IAutomationScheduleBase {
stopAt: string;
startAt: string;
interval: number;
timezone: string;
}
export interface IAutomationScheduleResponseObject
extends IAutomationScheduleBase {
id: number;
guid: string;
lastStartedAt: string;
}
export interface IAutomation {
id: string;
state: "available" | "unavailable" | "disabled";
title: string;
lastRun: IAutomationRunDetailResponseObject;
ownerId: string;
runMode: "manual" | "scheduled" | "triggered" | "webhook";
createdAt: string;
lastRunAt: string;
schedules: IAutomationScheduleResponseObject[];
updatedAt: string;
workspace: object; //???
description: string;
snippetGuids: string[];
endpointGuids: string[];
lastRunStatus:
| "failed"
| "finished"
| "finished with warnings"
| "must stop"
| "not started"
| "paused"
| "running"
| "starting"
| "stopped";
connectorGuids: string[];
executionToken: string[];
}
export interface IAutomationCreate {
name: string;
state: "available" | "unavailable" | "disabled";
schedules: IAutomationScheduleBase[];
workspace: object; // ???
description: string;
}
export interface IAutomationUsage {
data: {
name:
| "runs"
| "scheduledRun"
| "triggeredRun"
| "webhookRuns"
| "duration"
| "bandwidthIn"
| "bandwidthOut";
date: string;
value: number;
automation: {
guid: string;
name: string;
ownerId: string;
};
};
}
export interface IAutomationsSettings {
automationsEnabled: boolean;
}