@nosana/types 0.1.13 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
- export type Reason = {
1
+ export type DiagnosticsReason = {
2
2
  hostShutDown: boolean;
3
3
  jobStopped: boolean;
4
- expired: boolean;
4
+ jobExpired: boolean;
5
+ reason?: string;
5
6
  };
@@ -1,18 +1,24 @@
1
- export type State = {
1
+ export type DiagnosticsState = {
2
2
  Status: string;
3
3
  Running: boolean;
4
4
  Paused: boolean;
5
5
  Restarting: boolean;
6
6
  OOMKilled: boolean;
7
7
  Dead: boolean;
8
+ Pid: number;
8
9
  ExitCode: number;
9
10
  Error: string;
10
11
  StartedAt: string;
11
12
  FinishedAt: string;
12
- Health: {
13
+ Health?: {
13
14
  Status: string;
14
15
  FailingStreak: number;
15
- Log: string | null;
16
- };
16
+ Log: {
17
+ Start: string;
18
+ End: string;
19
+ ExitCode: number;
20
+ Output: string;
21
+ }[];
22
+ } | undefined;
17
23
  RestartCount: number;
18
24
  };
@@ -1,5 +1,5 @@
1
- import { Reason } from "../Diagnostics/reason.js";
2
- import { State } from "../Diagnostics/state.js";
1
+ import { DiagnosticsReason } from "../Diagnostics/reason.js";
2
+ import { DiagnosticsState } from "../Diagnostics/state.js";
3
3
  import { JobDefinition } from "../JobDefinition/index.js";
4
4
  import { Log } from "../Logs/index.js";
5
5
  export type FlowState = {
@@ -42,8 +42,13 @@ export type OpState = {
42
42
  results?: {
43
43
  [key: string]: string | string[];
44
44
  };
45
+ error?: {
46
+ event: string;
47
+ message: string;
48
+ code?: number;
49
+ };
45
50
  diagnostics: {
46
- reason: Reason;
47
- state?: State;
51
+ reason: DiagnosticsReason;
52
+ state?: DiagnosticsState;
48
53
  };
49
54
  };
@@ -995,14 +995,32 @@ export const jobSchemas = {
995
995
  ]
996
996
  }
997
997
  },
998
+ error: {
999
+ type: "object",
1000
+ properties: {
1001
+ event: {
1002
+ type: "string"
1003
+ },
1004
+ message: {
1005
+ type: "string"
1006
+ },
1007
+ code: {
1008
+ type: "number"
1009
+ }
1010
+ },
1011
+ required: [
1012
+ "event",
1013
+ "message"
1014
+ ]
1015
+ },
998
1016
  diagnostics: {
999
1017
  type: "object",
1000
1018
  properties: {
1001
1019
  reason: {
1002
- $ref: "#/components/schemas/Reason"
1020
+ $ref: "#/components/schemas/DiagnosticsReason"
1003
1021
  },
1004
1022
  state: {
1005
- $ref: "#/components/schemas/State"
1023
+ $ref: "#/components/schemas/DiagnosticsState"
1006
1024
  }
1007
1025
  },
1008
1026
  required: [
@@ -1040,7 +1058,7 @@ export const jobSchemas = {
1040
1058
  "timestamp"
1041
1059
  ]
1042
1060
  },
1043
- Reason: {
1061
+ DiagnosticsReason: {
1044
1062
  type: "object",
1045
1063
  properties: {
1046
1064
  hostShutDown: {
@@ -1049,17 +1067,20 @@ export const jobSchemas = {
1049
1067
  jobStopped: {
1050
1068
  type: "boolean"
1051
1069
  },
1052
- expired: {
1070
+ jobExpired: {
1053
1071
  type: "boolean"
1072
+ },
1073
+ reason: {
1074
+ type: "string"
1054
1075
  }
1055
1076
  },
1056
1077
  required: [
1057
1078
  "hostShutDown",
1058
1079
  "jobStopped",
1059
- "expired"
1080
+ "jobExpired"
1060
1081
  ]
1061
1082
  },
1062
- State: {
1083
+ DiagnosticsState: {
1063
1084
  type: "object",
1064
1085
  properties: {
1065
1086
  Status: {
@@ -1080,6 +1101,9 @@ export const jobSchemas = {
1080
1101
  Dead: {
1081
1102
  type: "boolean"
1082
1103
  },
1104
+ Pid: {
1105
+ type: "number"
1106
+ },
1083
1107
  ExitCode: {
1084
1108
  type: "number"
1085
1109
  },
@@ -1102,8 +1126,30 @@ export const jobSchemas = {
1102
1126
  type: "number"
1103
1127
  },
1104
1128
  Log: {
1105
- type: "string",
1106
- nullable: true
1129
+ type: "array",
1130
+ items: {
1131
+ type: "object",
1132
+ properties: {
1133
+ Start: {
1134
+ type: "string"
1135
+ },
1136
+ End: {
1137
+ type: "string"
1138
+ },
1139
+ ExitCode: {
1140
+ type: "number"
1141
+ },
1142
+ Output: {
1143
+ type: "string"
1144
+ }
1145
+ },
1146
+ required: [
1147
+ "Start",
1148
+ "End",
1149
+ "ExitCode",
1150
+ "Output"
1151
+ ]
1152
+ }
1107
1153
  }
1108
1154
  },
1109
1155
  required: [
@@ -1123,11 +1169,11 @@ export const jobSchemas = {
1123
1169
  "Restarting",
1124
1170
  "OOMKilled",
1125
1171
  "Dead",
1172
+ "Pid",
1126
1173
  "ExitCode",
1127
1174
  "Error",
1128
1175
  "StartedAt",
1129
1176
  "FinishedAt",
1130
- "Health",
1131
1177
  "RestartCount"
1132
1178
  ]
1133
1179
  },
@@ -1 +1 @@
1
- {"version":3,"file":"job.js","sourceRoot":"","sources":["../../src/Schemas/job.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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