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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
import { Union, Record } from "../fable_modules/fable-library-js.4.24.0/Types.js";
import { bool_type, array_type, int64_type, union_type, option_type, int32_type, class_type, record_type, string_type } from "../fable_modules/fable-library-js.4.24.0/Reflection.js";
import { isMatch, create } from "../fable_modules/fable-library-js.4.24.0/RegExp.js";
import { FSharpResult$2 } from "../fable_modules/fable-library-js.4.24.0/Result.js";
export class RunIds extends Record {
constructor(ProjectId, RunId, BaseId, TargetId) {
super();
this.ProjectId = ProjectId;
this.RunId = RunId;
this.BaseId = BaseId;
this.TargetId = TargetId;
}
}
export function RunIds_$reflection() {
return record_type("SomhairlesDream.Shared.RunIds", [], RunIds, () => [["ProjectId", string_type], ["RunId", string_type], ["BaseId", string_type], ["TargetId", string_type]]);
}
const Ids_resourcePattern = create("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$", 512);
const Ids_objectPattern = create("^[a-z0-9]+(?:[._-][a-z0-9]+)*$", 512);
export function Ids_validateResourceId(value) {
if ((value == null) ? true : !isMatch(Ids_resourcePattern, value)) {
return new FSharpResult$2(1, ["resource id must contain only lower-case letters, digits, and hyphens"]);
}
else {
return new FSharpResult$2(0, [undefined]);
}
}
export function Ids_validateObjectId(value) {
if ((value == null) ? true : !isMatch(Ids_objectPattern, value)) {
return new FSharpResult$2(1, ["object id must use the dotted lower-case namespace"]);
}
else {
return new FSharpResult$2(0, [undefined]);
}
}
export class RunStart extends Record {
constructor(Ids, At, TotalSteps) {
super();
this.Ids = Ids;
this.At = At;
this.TotalSteps = (TotalSteps | 0);
}
}
export function RunStart_$reflection() {
return record_type("SomhairlesDream.Shared.RunStart", [], RunStart, () => [["Ids", RunIds_$reflection()], ["At", class_type("System.DateTimeOffset")], ["TotalSteps", int32_type]]);
}
export class RunHeartbeat extends Record {
constructor(Ids, At, Message) {
super();
this.Ids = Ids;
this.At = At;
this.Message = Message;
}
}
export function RunHeartbeat_$reflection() {
return record_type("SomhairlesDream.Shared.RunHeartbeat", [], RunHeartbeat, () => [["Ids", RunIds_$reflection()], ["At", class_type("System.DateTimeOffset")], ["Message", string_type]]);
}
export class RunCheckpoint extends Record {
constructor(Ids, At, StepId, StepIndex, TotalSteps, Message, ArtifactPath) {
super();
this.Ids = Ids;
this.At = At;
this.StepId = StepId;
this.StepIndex = (StepIndex | 0);
this.TotalSteps = (TotalSteps | 0);
this.Message = Message;
this.ArtifactPath = ArtifactPath;
}
}
export function RunCheckpoint_$reflection() {
return record_type("SomhairlesDream.Shared.RunCheckpoint", [], RunCheckpoint, () => [["Ids", RunIds_$reflection()], ["At", class_type("System.DateTimeOffset")], ["StepId", string_type], ["StepIndex", int32_type], ["TotalSteps", int32_type], ["Message", string_type], ["ArtifactPath", string_type]]);
}
export class RunComplete extends Record {
constructor(Ids, At, ManifestPath) {
super();
this.Ids = Ids;
this.At = At;
this.ManifestPath = ManifestPath;
}
}
export function RunComplete_$reflection() {
return record_type("SomhairlesDream.Shared.RunComplete", [], RunComplete, () => [["Ids", RunIds_$reflection()], ["At", class_type("System.DateTimeOffset")], ["ManifestPath", string_type]]);
}
export class RunFail extends Record {
constructor(Ids, At, StepId, Message) {
super();
this.Ids = Ids;
this.At = At;
this.StepId = StepId;
this.Message = Message;
}
}
export function RunFail_$reflection() {
return record_type("SomhairlesDream.Shared.RunFail", [], RunFail, () => [["Ids", RunIds_$reflection()], ["At", class_type("System.DateTimeOffset")], ["StepId", option_type(string_type)], ["Message", string_type]]);
}
export class RunEvent extends Union {
constructor(tag, fields) {
super();
this.tag = tag;
this.fields = fields;
}
cases() {
return ["Start", "Heartbeat", "Checkpoint", "Complete", "Fail"];
}
}
export function RunEvent_$reflection() {
return union_type("SomhairlesDream.Shared.RunEvent", [], RunEvent, () => [[["Item", RunStart_$reflection()]], [["Item", RunHeartbeat_$reflection()]], [["Item", RunCheckpoint_$reflection()]], [["Item", RunComplete_$reflection()]], [["Item", RunFail_$reflection()]]]);
}
export class RunEventWire extends Record {
constructor(Kind, At, ProjectId, RunId, BaseId, TargetId, TotalSteps, StepId, StepIndex, Message, ArtifactPath, ManifestPath) {
super();
this.Kind = Kind;
this.At = At;
this.ProjectId = ProjectId;
this.RunId = RunId;
this.BaseId = BaseId;
this.TargetId = TargetId;
this.TotalSteps = TotalSteps;
this.StepId = StepId;
this.StepIndex = StepIndex;
this.Message = Message;
this.ArtifactPath = ArtifactPath;
this.ManifestPath = ManifestPath;
}
}
export function RunEventWire_$reflection() {
return record_type("SomhairlesDream.Shared.RunEventWire", [], RunEventWire, () => [["Kind", string_type], ["At", class_type("System.DateTimeOffset")], ["ProjectId", string_type], ["RunId", string_type], ["BaseId", string_type], ["TargetId", string_type], ["TotalSteps", option_type(int32_type)], ["StepId", option_type(string_type)], ["StepIndex", option_type(int32_type)], ["Message", option_type(string_type)], ["ArtifactPath", option_type(string_type)], ["ManifestPath", option_type(string_type)]]);
}
function RunEventModule_ids(value) {
return [value.ProjectId, value.RunId, value.BaseId, value.TargetId];
}
export function RunEventModule_toWire(event) {
let patternInput;
switch (event.tag) {
case 1: {
const value_1 = event.fields[0];
patternInput = ["heartbeat", value_1.Ids, value_1.At, undefined, undefined, undefined, value_1.Message, undefined, undefined];
break;
}
case 2: {
const value_2 = event.fields[0];
patternInput = ["checkpoint", value_2.Ids, value_2.At, value_2.TotalSteps, value_2.StepId, value_2.StepIndex, value_2.Message, value_2.ArtifactPath, undefined];
break;
}
case 3: {
const value_3 = event.fields[0];
patternInput = ["complete", value_3.Ids, value_3.At, undefined, undefined, undefined, undefined, undefined, value_3.ManifestPath];
break;
}
case 4: {
const value_4 = event.fields[0];
patternInput = ["fail", value_4.Ids, value_4.At, undefined, value_4.StepId, undefined, value_4.Message, undefined, undefined];
break;
}
default: {
const value = event.fields[0];
patternInput = ["start", value.Ids, value.At, value.TotalSteps, undefined, undefined, undefined, undefined, undefined];
}
}
const patternInput_1 = RunEventModule_ids(patternInput[1]);
return new RunEventWire(patternInput[0], patternInput[2], patternInput_1[0], patternInput_1[1], patternInput_1[2], patternInput_1[3], patternInput[3], patternInput[4], patternInput[5], patternInput[6], patternInput[7], patternInput[8]);
}
export class ArtifactChange extends Record {
constructor(ObjectId, Kind, Summary) {
super();
this.ObjectId = ObjectId;
this.Kind = Kind;
this.Summary = Summary;
}
}
export function ArtifactChange_$reflection() {
return record_type("SomhairlesDream.Shared.ArtifactChange", [], ArtifactChange, () => [["ObjectId", string_type], ["Kind", string_type], ["Summary", string_type]]);
}
export class RenderArtifact extends Record {
constructor(ArtifactPath, Sha256, Bytes, ExportedAt) {
super();
this.ArtifactPath = ArtifactPath;
this.Sha256 = Sha256;
this.Bytes = Bytes;
this.ExportedAt = ExportedAt;
}
}
export function RenderArtifact_$reflection() {
return record_type("SomhairlesDream.Shared.RenderArtifact", [], RenderArtifact, () => [["ArtifactPath", string_type], ["Sha256", string_type], ["Bytes", int64_type], ["ExportedAt", class_type("System.DateTimeOffset")]]);
}
export class StepArtifact extends Record {
constructor(StepId, StepIndex, ArtifactPath, LogPath, Sha256, Bytes, ExportedAt, ObjectIds, VerifiedObjectIds, Changes, Render) {
super();
this.StepId = StepId;
this.StepIndex = (StepIndex | 0);
this.ArtifactPath = ArtifactPath;
this.LogPath = LogPath;
this.Sha256 = Sha256;
this.Bytes = Bytes;
this.ExportedAt = ExportedAt;
this.ObjectIds = ObjectIds;
this.VerifiedObjectIds = VerifiedObjectIds;
this.Changes = Changes;
this.Render = Render;
}
}
export function StepArtifact_$reflection() {
return record_type("SomhairlesDream.Shared.StepArtifact", [], StepArtifact, () => [["StepId", string_type], ["StepIndex", int32_type], ["ArtifactPath", string_type], ["LogPath", string_type], ["Sha256", string_type], ["Bytes", int64_type], ["ExportedAt", class_type("System.DateTimeOffset")], ["ObjectIds", array_type(string_type)], ["VerifiedObjectIds", array_type(string_type)], ["Changes", array_type(ArtifactChange_$reflection())], ["Render", option_type(RenderArtifact_$reflection())]]);
}
export class ArtifactManifest extends Record {
constructor(SchemaVersion, ProjectId, RunId, BaseId, TargetId, Status, StartedAt, CompletedAt, BlenderVersion, Steps) {
super();
this.SchemaVersion = (SchemaVersion | 0);
this.ProjectId = ProjectId;
this.RunId = RunId;
this.BaseId = BaseId;
this.TargetId = TargetId;
this.Status = Status;
this.StartedAt = StartedAt;
this.CompletedAt = CompletedAt;
this.BlenderVersion = BlenderVersion;
this.Steps = Steps;
}
}
export function ArtifactManifest_$reflection() {
return record_type("SomhairlesDream.Shared.ArtifactManifest", [], ArtifactManifest, () => [["SchemaVersion", int32_type], ["ProjectId", string_type], ["RunId", string_type], ["BaseId", string_type], ["TargetId", string_type], ["Status", string_type], ["StartedAt", class_type("System.DateTimeOffset")], ["CompletedAt", class_type("System.DateTimeOffset")], ["BlenderVersion", string_type], ["Steps", array_type(StepArtifact_$reflection())]]);
}
export class RunSnapshot extends Record {
constructor(ProjectId, RunId, BaseId, TargetId, Status, CurrentStepId, CurrentStepIndex, TotalSteps, CompletedSteps, LastHeartbeatAt, UpdatedAt, Message, ManifestPath, ManifestUrl, Error$, IsStale) {
super();
this.ProjectId = ProjectId;
this.RunId = RunId;
this.BaseId = BaseId;
this.TargetId = TargetId;
this.Status = Status;
this.CurrentStepId = CurrentStepId;
this.CurrentStepIndex = (CurrentStepIndex | 0);
this.TotalSteps = (TotalSteps | 0);
this.CompletedSteps = CompletedSteps;
this.LastHeartbeatAt = LastHeartbeatAt;
this.UpdatedAt = UpdatedAt;
this.Message = Message;
this.ManifestPath = ManifestPath;
this.ManifestUrl = ManifestUrl;
this.Error = Error$;
this.IsStale = IsStale;
}
}
export function RunSnapshot_$reflection() {
return record_type("SomhairlesDream.Shared.RunSnapshot", [], RunSnapshot, () => [["ProjectId", string_type], ["RunId", string_type], ["BaseId", string_type], ["TargetId", string_type], ["Status", string_type], ["CurrentStepId", option_type(string_type)], ["CurrentStepIndex", int32_type], ["TotalSteps", int32_type], ["CompletedSteps", array_type(string_type)], ["LastHeartbeatAt", option_type(class_type("System.DateTimeOffset"))], ["UpdatedAt", class_type("System.DateTimeOffset")], ["Message", string_type], ["ManifestPath", option_type(string_type)], ["ManifestUrl", option_type(string_type)], ["Error", option_type(string_type)], ["IsStale", bool_type]]);
}
|