@rise-maritime/keelson-js 0.5.3 → 0.6.0-alpha.221.dev.1
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.
- package/dist/index.d.ts +524 -1
- package/dist/index.js +114 -5
- package/dist/index.test.js +57 -0
- package/dist/interfaces/AlarmAck.d.ts +62 -0
- package/dist/interfaces/AlarmAck.js +218 -0
- package/dist/interfaces/Configurable.d.ts +24 -18
- package/dist/interfaces/Configurable.js +24 -22
- package/dist/interfaces/Coordinate.d.ts +38 -0
- package/dist/interfaces/Coordinate.js +82 -0
- package/dist/interfaces/ErrorResponse.d.ts +1 -1
- package/dist/interfaces/ErrorResponse.js +1 -1
- package/dist/interfaces/MavlinkCommand.d.ts +24 -18
- package/dist/interfaces/MavlinkCommand.js +24 -22
- package/dist/interfaces/Mission.d.ts +128 -0
- package/dist/interfaces/Mission.js +800 -0
- package/dist/interfaces/NetworkPingPong.d.ts +16 -16
- package/dist/interfaces/NetworkPingPong.js +16 -16
- package/dist/interfaces/ReplayControl.d.ts +72 -30
- package/dist/interfaces/ReplayControl.js +72 -58
- package/dist/interfaces/Route.d.ts +627 -0
- package/dist/interfaces/Route.js +4148 -0
- package/dist/interfaces/RoutePlanner.d.ts +152 -0
- package/dist/interfaces/RoutePlanner.js +268 -0
- package/dist/interfaces/ScenarioCheckpoint.d.ts +154 -0
- package/dist/interfaces/ScenarioCheckpoint.js +694 -0
- package/dist/interfaces/ScenarioControl.d.ts +144 -0
- package/dist/interfaces/ScenarioControl.js +552 -0
- package/dist/interfaces/Severity.d.ts +22 -0
- package/dist/interfaces/Severity.js +72 -0
- package/dist/interfaces/SimulationControl.d.ts +69 -0
- package/dist/interfaces/SimulationControl.js +153 -0
- package/dist/interfaces/Subscriber.d.ts +24 -18
- package/dist/interfaces/Subscriber.js +24 -22
- package/dist/interfaces/VehicleCommon.d.ts +1 -32
- package/dist/interfaces/VehicleCommon.js +2 -74
- package/dist/interfaces/VehicleControl.d.ts +34 -28
- package/dist/interfaces/VehicleControl.js +34 -22
- package/dist/interfaces/VehicleGeofence.d.ts +26 -19
- package/dist/interfaces/VehicleGeofence.js +40 -37
- package/dist/interfaces/VehicleLifecycle.d.ts +32 -20
- package/dist/interfaces/VehicleLifecycle.js +32 -28
- package/dist/interfaces/VehicleMission.d.ts +42 -97
- package/dist/interfaces/VehicleMission.js +41 -696
- package/dist/interfaces/VehicleNavigation.d.ts +30 -24
- package/dist/interfaces/VehicleNavigation.js +30 -22
- package/dist/interfaces/VehicleParam.d.ts +48 -24
- package/dist/interfaces/VehicleParam.js +48 -40
- package/dist/interfaces/VehicleSimulatorControl.d.ts +57 -0
- package/dist/interfaces/VehicleSimulatorControl.js +155 -0
- package/dist/interfaces/WHEPProxy.d.ts +16 -16
- package/dist/interfaces/WHEPProxy.js +16 -16
- package/dist/interfaces/foxglove/GeoJSON.d.ts +27 -0
- package/dist/interfaces/foxglove/GeoJSON.js +65 -0
- package/dist/interfaces/foxglove/LocationFix.d.ts +49 -0
- package/dist/interfaces/foxglove/LocationFix.js +246 -0
- package/dist/interfaces/google/protobuf/any.d.ts +144 -0
- package/dist/interfaces/google/protobuf/any.js +107 -0
- package/dist/interfaces/google/protobuf/duration.d.ts +99 -0
- package/dist/interfaces/google/protobuf/duration.js +92 -0
- package/dist/interfaces/serviceRegistry.d.ts +520 -0
- package/dist/interfaces/serviceRegistry.js +40 -0
- package/dist/interfaces.json +19 -0
- package/dist/payloads/Alarm.d.ts +7 -12
- package/dist/payloads/Alarm.js +4 -54
- package/dist/payloads/CommandAuthority.d.ts +82 -0
- package/dist/payloads/CommandAuthority.js +364 -0
- package/dist/payloads/Coordinate.d.ts +39 -0
- package/dist/payloads/Coordinate.js +85 -0
- package/dist/payloads/EntityHealth.d.ts +9 -0
- package/dist/payloads/EntityHealth.js +14 -0
- package/dist/payloads/Mission.d.ts +137 -0
- package/dist/payloads/Mission.js +826 -0
- package/dist/payloads/OperationalAuthority.d.ts +172 -5
- package/dist/payloads/OperationalAuthority.js +525 -6
- package/dist/payloads/Route.d.ts +649 -0
- package/dist/payloads/Route.js +4257 -0
- package/dist/payloads/RouteChangeEvent.d.ts +42 -0
- package/dist/payloads/RouteChangeEvent.js +223 -0
- package/dist/payloads/RouteEditAuthority.d.ts +87 -0
- package/dist/payloads/RouteEditAuthority.js +380 -0
- package/dist/payloads/RouteExecution.d.ts +64 -0
- package/dist/payloads/RouteExecution.js +310 -0
- package/dist/payloads/ScenarioStatus.d.ts +160 -0
- package/dist/payloads/ScenarioStatus.js +654 -0
- package/dist/payloads/Severity.d.ts +13 -6
- package/dist/payloads/Severity.js +30 -18
- package/dist/payloads/SimulationStatus.d.ts +3 -4
- package/dist/payloads/SimulationStatus.js +12 -18
- package/dist/payloads/TestObjectStatus.d.ts +154 -0
- package/dist/payloads/TestObjectStatus.js +580 -0
- package/dist/payloads/VesselType.d.ts +2 -1
- package/dist/payloads/VesselType.js +1 -1
- package/dist/payloads/Voyage.d.ts +154 -0
- package/dist/payloads/Voyage.js +866 -0
- package/dist/payloads/WarrantRecord.d.ts +168 -0
- package/dist/payloads/WarrantRecord.js +781 -0
- package/dist/payloads/foxglove/CompressedPointCloud.d.ts +37 -0
- package/dist/payloads/foxglove/CompressedPointCloud.js +185 -0
- package/dist/payloads/google/protobuf/any.d.ts +145 -0
- package/dist/payloads/google/protobuf/any.js +110 -0
- package/dist/payloads/google/protobuf/empty.d.ts +34 -0
- package/dist/payloads/google/protobuf/empty.js +50 -0
- package/dist/payloads/index.foxglove.d.ts +1 -0
- package/dist/payloads/index.foxglove.js +1 -0
- package/dist/payloads/index.google.protobuf.d.ts +2 -0
- package/dist/payloads/index.google.protobuf.js +2 -0
- package/dist/payloads/index.keelson.d.ts +12 -1
- package/dist/payloads/index.keelson.js +12 -1
- package/dist/qos.json +89 -0
- package/dist/subjects.json +30 -1
- package/package.json +2 -1
|
@@ -5,13 +5,20 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: OperationalAuthority.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.OperationalAuthority_ComponentScoresEntry = exports.OperationalAuthority = exports.operationalAuthority_AuthorityLevelToJSON = exports.operationalAuthority_AuthorityLevelFromJSON = exports.OperationalAuthority_AuthorityLevel = void 0;
|
|
8
|
+
exports.OperationalAuthority_AuthorityConstraint = exports.OperationalAuthority_SourceAssessment = exports.OperationalAuthority_ComponentScoresEntry = exports.OperationalAuthority = exports.operationalAuthority_AuthorityConstraint_CauseToJSON = exports.operationalAuthority_AuthorityConstraint_CauseFromJSON = exports.OperationalAuthority_AuthorityConstraint_Cause = exports.operationalAuthority_AuthorityLevelToJSON = exports.operationalAuthority_AuthorityLevelFromJSON = exports.OperationalAuthority_AuthorityLevel = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
12
12
|
const typeRegistry_1 = require("./typeRegistry");
|
|
13
13
|
var OperationalAuthority_AuthorityLevel;
|
|
14
14
|
(function (OperationalAuthority_AuthorityLevel) {
|
|
15
|
+
/**
|
|
16
|
+
* AUTHORITY_LEVEL_UNKNOWN - No valid determination could be made — not a determination that the
|
|
17
|
+
* minimum is permissible. Raised when an essential requirement is not
|
|
18
|
+
* even advertised, so the monitor cannot tell whether it is satisfied.
|
|
19
|
+
* Consumers MUST treat this as non-authorizing, exactly like
|
|
20
|
+
* MINIMAL_SAFE_MODE, and MUST NOT treat it as "no constraints known".
|
|
21
|
+
*/
|
|
15
22
|
OperationalAuthority_AuthorityLevel[OperationalAuthority_AuthorityLevel["AUTHORITY_LEVEL_UNKNOWN"] = 0] = "AUTHORITY_LEVEL_UNKNOWN";
|
|
16
23
|
OperationalAuthority_AuthorityLevel[OperationalAuthority_AuthorityLevel["AUTHORITY_LEVEL_MINIMAL_SAFE_MODE"] = 1] = "AUTHORITY_LEVEL_MINIMAL_SAFE_MODE";
|
|
17
24
|
OperationalAuthority_AuthorityLevel[OperationalAuthority_AuthorityLevel["AUTHORITY_LEVEL_SUPERVISED_REMOTE"] = 2] = "AUTHORITY_LEVEL_SUPERVISED_REMOTE";
|
|
@@ -67,14 +74,90 @@ function operationalAuthority_AuthorityLevelToJSON(object) {
|
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
exports.operationalAuthority_AuthorityLevelToJSON = operationalAuthority_AuthorityLevelToJSON;
|
|
77
|
+
var OperationalAuthority_AuthorityConstraint_Cause;
|
|
78
|
+
(function (OperationalAuthority_AuthorityConstraint_Cause) {
|
|
79
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_UNSPECIFIED"] = 0] = "CAUSE_UNSPECIFIED";
|
|
80
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_DEGRADED"] = 1] = "CAUSE_DEGRADED";
|
|
81
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_CRITICAL"] = 2] = "CAUSE_CRITICAL";
|
|
82
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_INACTIVE"] = 3] = "CAUSE_INACTIVE";
|
|
83
|
+
/**
|
|
84
|
+
* CAUSE_UNKNOWN - No evidence either way. Capped because absence of evidence is not
|
|
85
|
+
* evidence of health for a component something depends on.
|
|
86
|
+
*/
|
|
87
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_UNKNOWN"] = 4] = "CAUSE_UNKNOWN";
|
|
88
|
+
/**
|
|
89
|
+
* CAUSE_NOT_ADVERTISED - Expected but never advertised — the monitor cannot tell whether the
|
|
90
|
+
* requirement is met, so no valid determination exists.
|
|
91
|
+
*/
|
|
92
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_NOT_ADVERTISED"] = 5] = "CAUSE_NOT_ADVERTISED";
|
|
93
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["CAUSE_CONFIGURATION_INVALID"] = 6] = "CAUSE_CONFIGURATION_INVALID";
|
|
94
|
+
OperationalAuthority_AuthorityConstraint_Cause[OperationalAuthority_AuthorityConstraint_Cause["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
95
|
+
})(OperationalAuthority_AuthorityConstraint_Cause || (exports.OperationalAuthority_AuthorityConstraint_Cause = OperationalAuthority_AuthorityConstraint_Cause = {}));
|
|
96
|
+
function operationalAuthority_AuthorityConstraint_CauseFromJSON(object) {
|
|
97
|
+
switch (object) {
|
|
98
|
+
case 0:
|
|
99
|
+
case "CAUSE_UNSPECIFIED":
|
|
100
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_UNSPECIFIED;
|
|
101
|
+
case 1:
|
|
102
|
+
case "CAUSE_DEGRADED":
|
|
103
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_DEGRADED;
|
|
104
|
+
case 2:
|
|
105
|
+
case "CAUSE_CRITICAL":
|
|
106
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_CRITICAL;
|
|
107
|
+
case 3:
|
|
108
|
+
case "CAUSE_INACTIVE":
|
|
109
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_INACTIVE;
|
|
110
|
+
case 4:
|
|
111
|
+
case "CAUSE_UNKNOWN":
|
|
112
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_UNKNOWN;
|
|
113
|
+
case 5:
|
|
114
|
+
case "CAUSE_NOT_ADVERTISED":
|
|
115
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_NOT_ADVERTISED;
|
|
116
|
+
case 6:
|
|
117
|
+
case "CAUSE_CONFIGURATION_INVALID":
|
|
118
|
+
return OperationalAuthority_AuthorityConstraint_Cause.CAUSE_CONFIGURATION_INVALID;
|
|
119
|
+
case -1:
|
|
120
|
+
case "UNRECOGNIZED":
|
|
121
|
+
default:
|
|
122
|
+
return OperationalAuthority_AuthorityConstraint_Cause.UNRECOGNIZED;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.operationalAuthority_AuthorityConstraint_CauseFromJSON = operationalAuthority_AuthorityConstraint_CauseFromJSON;
|
|
126
|
+
function operationalAuthority_AuthorityConstraint_CauseToJSON(object) {
|
|
127
|
+
switch (object) {
|
|
128
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_UNSPECIFIED:
|
|
129
|
+
return "CAUSE_UNSPECIFIED";
|
|
130
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_DEGRADED:
|
|
131
|
+
return "CAUSE_DEGRADED";
|
|
132
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_CRITICAL:
|
|
133
|
+
return "CAUSE_CRITICAL";
|
|
134
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_INACTIVE:
|
|
135
|
+
return "CAUSE_INACTIVE";
|
|
136
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_UNKNOWN:
|
|
137
|
+
return "CAUSE_UNKNOWN";
|
|
138
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_NOT_ADVERTISED:
|
|
139
|
+
return "CAUSE_NOT_ADVERTISED";
|
|
140
|
+
case OperationalAuthority_AuthorityConstraint_Cause.CAUSE_CONFIGURATION_INVALID:
|
|
141
|
+
return "CAUSE_CONFIGURATION_INVALID";
|
|
142
|
+
case OperationalAuthority_AuthorityConstraint_Cause.UNRECOGNIZED:
|
|
143
|
+
default:
|
|
144
|
+
return "UNRECOGNIZED";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.operationalAuthority_AuthorityConstraint_CauseToJSON = operationalAuthority_AuthorityConstraint_CauseToJSON;
|
|
70
148
|
function createBaseOperationalAuthority() {
|
|
71
149
|
return {
|
|
72
150
|
$type: "keelson.OperationalAuthority",
|
|
73
151
|
timestamp: undefined,
|
|
74
152
|
level: 0,
|
|
75
|
-
compositeScore:
|
|
153
|
+
compositeScore: undefined,
|
|
76
154
|
reason: "",
|
|
77
155
|
componentScores: {},
|
|
156
|
+
authorityScore: undefined,
|
|
157
|
+
sourceAssessments: [],
|
|
158
|
+
activeConstraints: [],
|
|
159
|
+
policyId: undefined,
|
|
160
|
+
policyConfigDigest: undefined,
|
|
78
161
|
};
|
|
79
162
|
}
|
|
80
163
|
exports.OperationalAuthority = {
|
|
@@ -86,7 +169,7 @@ exports.OperationalAuthority = {
|
|
|
86
169
|
if (message.level !== 0) {
|
|
87
170
|
writer.uint32(16).int32(message.level);
|
|
88
171
|
}
|
|
89
|
-
if (message.compositeScore !==
|
|
172
|
+
if (message.compositeScore !== undefined) {
|
|
90
173
|
writer.uint32(29).float(message.compositeScore);
|
|
91
174
|
}
|
|
92
175
|
if (message.reason !== "") {
|
|
@@ -99,6 +182,21 @@ exports.OperationalAuthority = {
|
|
|
99
182
|
value,
|
|
100
183
|
}, writer.uint32(42).fork()).join();
|
|
101
184
|
});
|
|
185
|
+
if (message.authorityScore !== undefined) {
|
|
186
|
+
writer.uint32(53).float(message.authorityScore);
|
|
187
|
+
}
|
|
188
|
+
for (const v of message.sourceAssessments) {
|
|
189
|
+
exports.OperationalAuthority_SourceAssessment.encode(v, writer.uint32(58).fork()).join();
|
|
190
|
+
}
|
|
191
|
+
for (const v of message.activeConstraints) {
|
|
192
|
+
exports.OperationalAuthority_AuthorityConstraint.encode(v, writer.uint32(66).fork()).join();
|
|
193
|
+
}
|
|
194
|
+
if (message.policyId !== undefined) {
|
|
195
|
+
writer.uint32(74).string(message.policyId);
|
|
196
|
+
}
|
|
197
|
+
if (message.policyConfigDigest !== undefined) {
|
|
198
|
+
writer.uint32(82).bytes(message.policyConfigDigest);
|
|
199
|
+
}
|
|
102
200
|
return writer;
|
|
103
201
|
},
|
|
104
202
|
decode(input, length) {
|
|
@@ -146,6 +244,41 @@ exports.OperationalAuthority = {
|
|
|
146
244
|
}
|
|
147
245
|
continue;
|
|
148
246
|
}
|
|
247
|
+
case 6: {
|
|
248
|
+
if (tag !== 53) {
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
message.authorityScore = reader.float();
|
|
252
|
+
continue;
|
|
253
|
+
}
|
|
254
|
+
case 7: {
|
|
255
|
+
if (tag !== 58) {
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
message.sourceAssessments.push(exports.OperationalAuthority_SourceAssessment.decode(reader, reader.uint32()));
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
case 8: {
|
|
262
|
+
if (tag !== 66) {
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
message.activeConstraints.push(exports.OperationalAuthority_AuthorityConstraint.decode(reader, reader.uint32()));
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
case 9: {
|
|
269
|
+
if (tag !== 74) {
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
message.policyId = reader.string();
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
case 10: {
|
|
276
|
+
if (tag !== 82) {
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
message.policyConfigDigest = reader.bytes();
|
|
280
|
+
continue;
|
|
281
|
+
}
|
|
149
282
|
}
|
|
150
283
|
if ((tag & 7) === 4 || tag === 0) {
|
|
151
284
|
break;
|
|
@@ -159,7 +292,7 @@ exports.OperationalAuthority = {
|
|
|
159
292
|
$type: exports.OperationalAuthority.$type,
|
|
160
293
|
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
161
294
|
level: isSet(object.level) ? operationalAuthority_AuthorityLevelFromJSON(object.level) : 0,
|
|
162
|
-
compositeScore: isSet(object.compositeScore) ? globalThis.Number(object.compositeScore) :
|
|
295
|
+
compositeScore: isSet(object.compositeScore) ? globalThis.Number(object.compositeScore) : undefined,
|
|
163
296
|
reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
|
|
164
297
|
componentScores: isObject(object.componentScores)
|
|
165
298
|
? Object.entries(object.componentScores).reduce((acc, [key, value]) => {
|
|
@@ -167,6 +300,15 @@ exports.OperationalAuthority = {
|
|
|
167
300
|
return acc;
|
|
168
301
|
}, {})
|
|
169
302
|
: {},
|
|
303
|
+
authorityScore: isSet(object.authorityScore) ? globalThis.Number(object.authorityScore) : undefined,
|
|
304
|
+
sourceAssessments: globalThis.Array.isArray(object?.sourceAssessments)
|
|
305
|
+
? object.sourceAssessments.map((e) => exports.OperationalAuthority_SourceAssessment.fromJSON(e))
|
|
306
|
+
: [],
|
|
307
|
+
activeConstraints: globalThis.Array.isArray(object?.activeConstraints)
|
|
308
|
+
? object.activeConstraints.map((e) => exports.OperationalAuthority_AuthorityConstraint.fromJSON(e))
|
|
309
|
+
: [],
|
|
310
|
+
policyId: isSet(object.policyId) ? globalThis.String(object.policyId) : undefined,
|
|
311
|
+
policyConfigDigest: isSet(object.policyConfigDigest) ? bytesFromBase64(object.policyConfigDigest) : undefined,
|
|
170
312
|
};
|
|
171
313
|
},
|
|
172
314
|
toJSON(message) {
|
|
@@ -177,7 +319,7 @@ exports.OperationalAuthority = {
|
|
|
177
319
|
if (message.level !== 0) {
|
|
178
320
|
obj.level = operationalAuthority_AuthorityLevelToJSON(message.level);
|
|
179
321
|
}
|
|
180
|
-
if (message.compositeScore !==
|
|
322
|
+
if (message.compositeScore !== undefined) {
|
|
181
323
|
obj.compositeScore = message.compositeScore;
|
|
182
324
|
}
|
|
183
325
|
if (message.reason !== "") {
|
|
@@ -192,6 +334,21 @@ exports.OperationalAuthority = {
|
|
|
192
334
|
});
|
|
193
335
|
}
|
|
194
336
|
}
|
|
337
|
+
if (message.authorityScore !== undefined) {
|
|
338
|
+
obj.authorityScore = message.authorityScore;
|
|
339
|
+
}
|
|
340
|
+
if (message.sourceAssessments?.length) {
|
|
341
|
+
obj.sourceAssessments = message.sourceAssessments.map((e) => exports.OperationalAuthority_SourceAssessment.toJSON(e));
|
|
342
|
+
}
|
|
343
|
+
if (message.activeConstraints?.length) {
|
|
344
|
+
obj.activeConstraints = message.activeConstraints.map((e) => exports.OperationalAuthority_AuthorityConstraint.toJSON(e));
|
|
345
|
+
}
|
|
346
|
+
if (message.policyId !== undefined) {
|
|
347
|
+
obj.policyId = message.policyId;
|
|
348
|
+
}
|
|
349
|
+
if (message.policyConfigDigest !== undefined) {
|
|
350
|
+
obj.policyConfigDigest = base64FromBytes(message.policyConfigDigest);
|
|
351
|
+
}
|
|
195
352
|
return obj;
|
|
196
353
|
},
|
|
197
354
|
create(base) {
|
|
@@ -201,7 +358,7 @@ exports.OperationalAuthority = {
|
|
|
201
358
|
const message = createBaseOperationalAuthority();
|
|
202
359
|
message.timestamp = object.timestamp ?? undefined;
|
|
203
360
|
message.level = object.level ?? 0;
|
|
204
|
-
message.compositeScore = object.compositeScore ??
|
|
361
|
+
message.compositeScore = object.compositeScore ?? undefined;
|
|
205
362
|
message.reason = object.reason ?? "";
|
|
206
363
|
message.componentScores = Object.entries(object.componentScores ?? {}).reduce((acc, [key, value]) => {
|
|
207
364
|
if (value !== undefined) {
|
|
@@ -209,6 +366,13 @@ exports.OperationalAuthority = {
|
|
|
209
366
|
}
|
|
210
367
|
return acc;
|
|
211
368
|
}, {});
|
|
369
|
+
message.authorityScore = object.authorityScore ?? undefined;
|
|
370
|
+
message.sourceAssessments =
|
|
371
|
+
object.sourceAssessments?.map((e) => exports.OperationalAuthority_SourceAssessment.fromPartial(e)) || [];
|
|
372
|
+
message.activeConstraints =
|
|
373
|
+
object.activeConstraints?.map((e) => exports.OperationalAuthority_AuthorityConstraint.fromPartial(e)) || [];
|
|
374
|
+
message.policyId = object.policyId ?? undefined;
|
|
375
|
+
message.policyConfigDigest = object.policyConfigDigest ?? undefined;
|
|
212
376
|
return message;
|
|
213
377
|
},
|
|
214
378
|
};
|
|
@@ -284,6 +448,361 @@ exports.OperationalAuthority_ComponentScoresEntry = {
|
|
|
284
448
|
},
|
|
285
449
|
};
|
|
286
450
|
typeRegistry_1.messageTypeRegistry.set(exports.OperationalAuthority_ComponentScoresEntry.$type, exports.OperationalAuthority_ComponentScoresEntry);
|
|
451
|
+
function createBaseOperationalAuthority_SourceAssessment() {
|
|
452
|
+
return {
|
|
453
|
+
$type: "keelson.OperationalAuthority.SourceAssessment",
|
|
454
|
+
sourceId: "",
|
|
455
|
+
healthScore: undefined,
|
|
456
|
+
coverageFraction: undefined,
|
|
457
|
+
effectiveScore: undefined,
|
|
458
|
+
eligibleSubjectCount: 0,
|
|
459
|
+
assessedSubjectCount: 0,
|
|
460
|
+
unassessedSubjects: [],
|
|
461
|
+
notAdvertisedSubjects: [],
|
|
462
|
+
essential: false,
|
|
463
|
+
authorityCap: undefined,
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
exports.OperationalAuthority_SourceAssessment = {
|
|
467
|
+
$type: "keelson.OperationalAuthority.SourceAssessment",
|
|
468
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
469
|
+
if (message.sourceId !== "") {
|
|
470
|
+
writer.uint32(10).string(message.sourceId);
|
|
471
|
+
}
|
|
472
|
+
if (message.healthScore !== undefined) {
|
|
473
|
+
writer.uint32(21).float(message.healthScore);
|
|
474
|
+
}
|
|
475
|
+
if (message.coverageFraction !== undefined) {
|
|
476
|
+
writer.uint32(29).float(message.coverageFraction);
|
|
477
|
+
}
|
|
478
|
+
if (message.effectiveScore !== undefined) {
|
|
479
|
+
writer.uint32(37).float(message.effectiveScore);
|
|
480
|
+
}
|
|
481
|
+
if (message.eligibleSubjectCount !== 0) {
|
|
482
|
+
writer.uint32(40).uint32(message.eligibleSubjectCount);
|
|
483
|
+
}
|
|
484
|
+
if (message.assessedSubjectCount !== 0) {
|
|
485
|
+
writer.uint32(48).uint32(message.assessedSubjectCount);
|
|
486
|
+
}
|
|
487
|
+
for (const v of message.unassessedSubjects) {
|
|
488
|
+
writer.uint32(58).string(v);
|
|
489
|
+
}
|
|
490
|
+
for (const v of message.notAdvertisedSubjects) {
|
|
491
|
+
writer.uint32(66).string(v);
|
|
492
|
+
}
|
|
493
|
+
if (message.essential !== false) {
|
|
494
|
+
writer.uint32(72).bool(message.essential);
|
|
495
|
+
}
|
|
496
|
+
if (message.authorityCap !== undefined) {
|
|
497
|
+
writer.uint32(85).float(message.authorityCap);
|
|
498
|
+
}
|
|
499
|
+
return writer;
|
|
500
|
+
},
|
|
501
|
+
decode(input, length) {
|
|
502
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
503
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
504
|
+
const message = createBaseOperationalAuthority_SourceAssessment();
|
|
505
|
+
while (reader.pos < end) {
|
|
506
|
+
const tag = reader.uint32();
|
|
507
|
+
switch (tag >>> 3) {
|
|
508
|
+
case 1: {
|
|
509
|
+
if (tag !== 10) {
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
message.sourceId = reader.string();
|
|
513
|
+
continue;
|
|
514
|
+
}
|
|
515
|
+
case 2: {
|
|
516
|
+
if (tag !== 21) {
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
message.healthScore = reader.float();
|
|
520
|
+
continue;
|
|
521
|
+
}
|
|
522
|
+
case 3: {
|
|
523
|
+
if (tag !== 29) {
|
|
524
|
+
break;
|
|
525
|
+
}
|
|
526
|
+
message.coverageFraction = reader.float();
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
case 4: {
|
|
530
|
+
if (tag !== 37) {
|
|
531
|
+
break;
|
|
532
|
+
}
|
|
533
|
+
message.effectiveScore = reader.float();
|
|
534
|
+
continue;
|
|
535
|
+
}
|
|
536
|
+
case 5: {
|
|
537
|
+
if (tag !== 40) {
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
message.eligibleSubjectCount = reader.uint32();
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
case 6: {
|
|
544
|
+
if (tag !== 48) {
|
|
545
|
+
break;
|
|
546
|
+
}
|
|
547
|
+
message.assessedSubjectCount = reader.uint32();
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
case 7: {
|
|
551
|
+
if (tag !== 58) {
|
|
552
|
+
break;
|
|
553
|
+
}
|
|
554
|
+
message.unassessedSubjects.push(reader.string());
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
case 8: {
|
|
558
|
+
if (tag !== 66) {
|
|
559
|
+
break;
|
|
560
|
+
}
|
|
561
|
+
message.notAdvertisedSubjects.push(reader.string());
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
case 9: {
|
|
565
|
+
if (tag !== 72) {
|
|
566
|
+
break;
|
|
567
|
+
}
|
|
568
|
+
message.essential = reader.bool();
|
|
569
|
+
continue;
|
|
570
|
+
}
|
|
571
|
+
case 10: {
|
|
572
|
+
if (tag !== 85) {
|
|
573
|
+
break;
|
|
574
|
+
}
|
|
575
|
+
message.authorityCap = reader.float();
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
reader.skip(tag & 7);
|
|
583
|
+
}
|
|
584
|
+
return message;
|
|
585
|
+
},
|
|
586
|
+
fromJSON(object) {
|
|
587
|
+
return {
|
|
588
|
+
$type: exports.OperationalAuthority_SourceAssessment.$type,
|
|
589
|
+
sourceId: isSet(object.sourceId) ? globalThis.String(object.sourceId) : "",
|
|
590
|
+
healthScore: isSet(object.healthScore) ? globalThis.Number(object.healthScore) : undefined,
|
|
591
|
+
coverageFraction: isSet(object.coverageFraction) ? globalThis.Number(object.coverageFraction) : undefined,
|
|
592
|
+
effectiveScore: isSet(object.effectiveScore) ? globalThis.Number(object.effectiveScore) : undefined,
|
|
593
|
+
eligibleSubjectCount: isSet(object.eligibleSubjectCount) ? globalThis.Number(object.eligibleSubjectCount) : 0,
|
|
594
|
+
assessedSubjectCount: isSet(object.assessedSubjectCount) ? globalThis.Number(object.assessedSubjectCount) : 0,
|
|
595
|
+
unassessedSubjects: globalThis.Array.isArray(object?.unassessedSubjects)
|
|
596
|
+
? object.unassessedSubjects.map((e) => globalThis.String(e))
|
|
597
|
+
: [],
|
|
598
|
+
notAdvertisedSubjects: globalThis.Array.isArray(object?.notAdvertisedSubjects)
|
|
599
|
+
? object.notAdvertisedSubjects.map((e) => globalThis.String(e))
|
|
600
|
+
: [],
|
|
601
|
+
essential: isSet(object.essential) ? globalThis.Boolean(object.essential) : false,
|
|
602
|
+
authorityCap: isSet(object.authorityCap) ? globalThis.Number(object.authorityCap) : undefined,
|
|
603
|
+
};
|
|
604
|
+
},
|
|
605
|
+
toJSON(message) {
|
|
606
|
+
const obj = {};
|
|
607
|
+
if (message.sourceId !== "") {
|
|
608
|
+
obj.sourceId = message.sourceId;
|
|
609
|
+
}
|
|
610
|
+
if (message.healthScore !== undefined) {
|
|
611
|
+
obj.healthScore = message.healthScore;
|
|
612
|
+
}
|
|
613
|
+
if (message.coverageFraction !== undefined) {
|
|
614
|
+
obj.coverageFraction = message.coverageFraction;
|
|
615
|
+
}
|
|
616
|
+
if (message.effectiveScore !== undefined) {
|
|
617
|
+
obj.effectiveScore = message.effectiveScore;
|
|
618
|
+
}
|
|
619
|
+
if (message.eligibleSubjectCount !== 0) {
|
|
620
|
+
obj.eligibleSubjectCount = Math.round(message.eligibleSubjectCount);
|
|
621
|
+
}
|
|
622
|
+
if (message.assessedSubjectCount !== 0) {
|
|
623
|
+
obj.assessedSubjectCount = Math.round(message.assessedSubjectCount);
|
|
624
|
+
}
|
|
625
|
+
if (message.unassessedSubjects?.length) {
|
|
626
|
+
obj.unassessedSubjects = message.unassessedSubjects;
|
|
627
|
+
}
|
|
628
|
+
if (message.notAdvertisedSubjects?.length) {
|
|
629
|
+
obj.notAdvertisedSubjects = message.notAdvertisedSubjects;
|
|
630
|
+
}
|
|
631
|
+
if (message.essential !== false) {
|
|
632
|
+
obj.essential = message.essential;
|
|
633
|
+
}
|
|
634
|
+
if (message.authorityCap !== undefined) {
|
|
635
|
+
obj.authorityCap = message.authorityCap;
|
|
636
|
+
}
|
|
637
|
+
return obj;
|
|
638
|
+
},
|
|
639
|
+
create(base) {
|
|
640
|
+
return exports.OperationalAuthority_SourceAssessment.fromPartial(base ?? {});
|
|
641
|
+
},
|
|
642
|
+
fromPartial(object) {
|
|
643
|
+
const message = createBaseOperationalAuthority_SourceAssessment();
|
|
644
|
+
message.sourceId = object.sourceId ?? "";
|
|
645
|
+
message.healthScore = object.healthScore ?? undefined;
|
|
646
|
+
message.coverageFraction = object.coverageFraction ?? undefined;
|
|
647
|
+
message.effectiveScore = object.effectiveScore ?? undefined;
|
|
648
|
+
message.eligibleSubjectCount = object.eligibleSubjectCount ?? 0;
|
|
649
|
+
message.assessedSubjectCount = object.assessedSubjectCount ?? 0;
|
|
650
|
+
message.unassessedSubjects = object.unassessedSubjects?.map((e) => e) || [];
|
|
651
|
+
message.notAdvertisedSubjects = object.notAdvertisedSubjects?.map((e) => e) || [];
|
|
652
|
+
message.essential = object.essential ?? false;
|
|
653
|
+
message.authorityCap = object.authorityCap ?? undefined;
|
|
654
|
+
return message;
|
|
655
|
+
},
|
|
656
|
+
};
|
|
657
|
+
typeRegistry_1.messageTypeRegistry.set(exports.OperationalAuthority_SourceAssessment.$type, exports.OperationalAuthority_SourceAssessment);
|
|
658
|
+
function createBaseOperationalAuthority_AuthorityConstraint() {
|
|
659
|
+
return {
|
|
660
|
+
$type: "keelson.OperationalAuthority.AuthorityConstraint",
|
|
661
|
+
componentId: "",
|
|
662
|
+
capLevel: 0,
|
|
663
|
+
capScore: undefined,
|
|
664
|
+
cause: 0,
|
|
665
|
+
subjectId: undefined,
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
exports.OperationalAuthority_AuthorityConstraint = {
|
|
669
|
+
$type: "keelson.OperationalAuthority.AuthorityConstraint",
|
|
670
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
671
|
+
if (message.componentId !== "") {
|
|
672
|
+
writer.uint32(10).string(message.componentId);
|
|
673
|
+
}
|
|
674
|
+
if (message.capLevel !== 0) {
|
|
675
|
+
writer.uint32(16).int32(message.capLevel);
|
|
676
|
+
}
|
|
677
|
+
if (message.capScore !== undefined) {
|
|
678
|
+
writer.uint32(29).float(message.capScore);
|
|
679
|
+
}
|
|
680
|
+
if (message.cause !== 0) {
|
|
681
|
+
writer.uint32(32).int32(message.cause);
|
|
682
|
+
}
|
|
683
|
+
if (message.subjectId !== undefined) {
|
|
684
|
+
writer.uint32(42).string(message.subjectId);
|
|
685
|
+
}
|
|
686
|
+
return writer;
|
|
687
|
+
},
|
|
688
|
+
decode(input, length) {
|
|
689
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
690
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
691
|
+
const message = createBaseOperationalAuthority_AuthorityConstraint();
|
|
692
|
+
while (reader.pos < end) {
|
|
693
|
+
const tag = reader.uint32();
|
|
694
|
+
switch (tag >>> 3) {
|
|
695
|
+
case 1: {
|
|
696
|
+
if (tag !== 10) {
|
|
697
|
+
break;
|
|
698
|
+
}
|
|
699
|
+
message.componentId = reader.string();
|
|
700
|
+
continue;
|
|
701
|
+
}
|
|
702
|
+
case 2: {
|
|
703
|
+
if (tag !== 16) {
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
message.capLevel = reader.int32();
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
709
|
+
case 3: {
|
|
710
|
+
if (tag !== 29) {
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
message.capScore = reader.float();
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
case 4: {
|
|
717
|
+
if (tag !== 32) {
|
|
718
|
+
break;
|
|
719
|
+
}
|
|
720
|
+
message.cause = reader.int32();
|
|
721
|
+
continue;
|
|
722
|
+
}
|
|
723
|
+
case 5: {
|
|
724
|
+
if (tag !== 42) {
|
|
725
|
+
break;
|
|
726
|
+
}
|
|
727
|
+
message.subjectId = reader.string();
|
|
728
|
+
continue;
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
734
|
+
reader.skip(tag & 7);
|
|
735
|
+
}
|
|
736
|
+
return message;
|
|
737
|
+
},
|
|
738
|
+
fromJSON(object) {
|
|
739
|
+
return {
|
|
740
|
+
$type: exports.OperationalAuthority_AuthorityConstraint.$type,
|
|
741
|
+
componentId: isSet(object.componentId) ? globalThis.String(object.componentId) : "",
|
|
742
|
+
capLevel: isSet(object.capLevel) ? operationalAuthority_AuthorityLevelFromJSON(object.capLevel) : 0,
|
|
743
|
+
capScore: isSet(object.capScore) ? globalThis.Number(object.capScore) : undefined,
|
|
744
|
+
cause: isSet(object.cause) ? operationalAuthority_AuthorityConstraint_CauseFromJSON(object.cause) : 0,
|
|
745
|
+
subjectId: isSet(object.subjectId) ? globalThis.String(object.subjectId) : undefined,
|
|
746
|
+
};
|
|
747
|
+
},
|
|
748
|
+
toJSON(message) {
|
|
749
|
+
const obj = {};
|
|
750
|
+
if (message.componentId !== "") {
|
|
751
|
+
obj.componentId = message.componentId;
|
|
752
|
+
}
|
|
753
|
+
if (message.capLevel !== 0) {
|
|
754
|
+
obj.capLevel = operationalAuthority_AuthorityLevelToJSON(message.capLevel);
|
|
755
|
+
}
|
|
756
|
+
if (message.capScore !== undefined) {
|
|
757
|
+
obj.capScore = message.capScore;
|
|
758
|
+
}
|
|
759
|
+
if (message.cause !== 0) {
|
|
760
|
+
obj.cause = operationalAuthority_AuthorityConstraint_CauseToJSON(message.cause);
|
|
761
|
+
}
|
|
762
|
+
if (message.subjectId !== undefined) {
|
|
763
|
+
obj.subjectId = message.subjectId;
|
|
764
|
+
}
|
|
765
|
+
return obj;
|
|
766
|
+
},
|
|
767
|
+
create(base) {
|
|
768
|
+
return exports.OperationalAuthority_AuthorityConstraint.fromPartial(base ?? {});
|
|
769
|
+
},
|
|
770
|
+
fromPartial(object) {
|
|
771
|
+
const message = createBaseOperationalAuthority_AuthorityConstraint();
|
|
772
|
+
message.componentId = object.componentId ?? "";
|
|
773
|
+
message.capLevel = object.capLevel ?? 0;
|
|
774
|
+
message.capScore = object.capScore ?? undefined;
|
|
775
|
+
message.cause = object.cause ?? 0;
|
|
776
|
+
message.subjectId = object.subjectId ?? undefined;
|
|
777
|
+
return message;
|
|
778
|
+
},
|
|
779
|
+
};
|
|
780
|
+
typeRegistry_1.messageTypeRegistry.set(exports.OperationalAuthority_AuthorityConstraint.$type, exports.OperationalAuthority_AuthorityConstraint);
|
|
781
|
+
function bytesFromBase64(b64) {
|
|
782
|
+
if (globalThis.Buffer) {
|
|
783
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
const bin = globalThis.atob(b64);
|
|
787
|
+
const arr = new Uint8Array(bin.length);
|
|
788
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
789
|
+
arr[i] = bin.charCodeAt(i);
|
|
790
|
+
}
|
|
791
|
+
return arr;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
function base64FromBytes(arr) {
|
|
795
|
+
if (globalThis.Buffer) {
|
|
796
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
const bin = [];
|
|
800
|
+
arr.forEach((byte) => {
|
|
801
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
802
|
+
});
|
|
803
|
+
return globalThis.btoa(bin.join(""));
|
|
804
|
+
}
|
|
805
|
+
}
|
|
287
806
|
function toTimestamp(date) {
|
|
288
807
|
const seconds = Math.trunc(date.getTime() / 1000);
|
|
289
808
|
const nanos = (date.getTime() % 1000) * 1000000;
|