@rise-maritime/keelson-js 0.6.0-pre.13 → 0.6.0-pre.14
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/payloads/index.keelson.d.ts +0 -5
- package/dist/payloads/index.keelson.js +0 -5
- package/dist/subjects.json +1 -7
- package/package.json +1 -1
- package/dist/payloads/ChecklistEvent.d.ts +0 -112
- package/dist/payloads/ChecklistEvent.js +0 -439
- package/dist/payloads/ChecklistEvidence.d.ts +0 -79
- package/dist/payloads/ChecklistEvidence.js +0 -287
- package/dist/payloads/ChecklistPresence.d.ts +0 -62
- package/dist/payloads/ChecklistPresence.js +0 -280
- package/dist/payloads/ChecklistProcedure.d.ts +0 -81
- package/dist/payloads/ChecklistProcedure.js +0 -364
- package/dist/payloads/ChecklistState.d.ts +0 -163
- package/dist/payloads/ChecklistState.js +0 -831
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export * from "./Audio";
|
|
2
2
|
export * from "./Severity";
|
|
3
3
|
export * from "./Alarm";
|
|
4
|
-
export * from "./ChecklistEvidence";
|
|
5
|
-
export * from "./ChecklistEvent";
|
|
6
|
-
export * from "./ChecklistPresence";
|
|
7
|
-
export * from "./ChecklistProcedure";
|
|
8
|
-
export * from "./ChecklistState";
|
|
9
4
|
export * from "./CommandAuthority";
|
|
10
5
|
export * from "./Coordinate";
|
|
11
6
|
export * from "./Decomposed3DVector";
|
|
@@ -22,11 +22,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
__exportStar(require("./Audio"), exports);
|
|
23
23
|
__exportStar(require("./Severity"), exports);
|
|
24
24
|
__exportStar(require("./Alarm"), exports);
|
|
25
|
-
__exportStar(require("./ChecklistEvidence"), exports);
|
|
26
|
-
__exportStar(require("./ChecklistEvent"), exports);
|
|
27
|
-
__exportStar(require("./ChecklistPresence"), exports);
|
|
28
|
-
__exportStar(require("./ChecklistProcedure"), exports);
|
|
29
|
-
__exportStar(require("./ChecklistState"), exports);
|
|
30
25
|
__exportStar(require("./CommandAuthority"), exports);
|
|
31
26
|
__exportStar(require("./Coordinate"), exports);
|
|
32
27
|
__exportStar(require("./Decomposed3DVector"), exports);
|
package/dist/subjects.json
CHANGED
|
@@ -106,7 +106,6 @@
|
|
|
106
106
|
"air_relative_humidity_pct": "keelson.TimestampedFloat",
|
|
107
107
|
"air_pressure_pa": "keelson.TimestampedFloat",
|
|
108
108
|
"dew_point_celsius": "keelson.TimestampedFloat",
|
|
109
|
-
"illuminance_lux": "keelson.TimestampedFloat",
|
|
110
109
|
"water_temperature_celsius": "keelson.TimestampedFloat",
|
|
111
110
|
"water_salinity_ppt": "keelson.TimestampedFloat",
|
|
112
111
|
"water_speed_of_sound_mps": "keelson.TimestampedFloat",
|
|
@@ -217,10 +216,5 @@
|
|
|
217
216
|
"route_change_event": "keelson.RouteChangeEvent",
|
|
218
217
|
"route_signature": "keelson.RouteSignatures",
|
|
219
218
|
"command_authority": "keelson.CommandAuthority",
|
|
220
|
-
"command_request": "keelson.CommandRequest"
|
|
221
|
-
"checklist_event": "keelson.ChecklistEvent",
|
|
222
|
-
"checklist_state": "keelson.ChecklistState",
|
|
223
|
-
"checklist_presence": "keelson.ChecklistPresence",
|
|
224
|
-
"checklist_procedure": "keelson.ChecklistProcedure",
|
|
225
|
-
"checklist_evidence": "foxglove.CompressedImage"
|
|
219
|
+
"command_request": "keelson.CommandRequest"
|
|
226
220
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rise-maritime/keelson-js",
|
|
3
3
|
"//version": "NOT the published version. The release workflow overwrites it from the release tag (npm version --no-git-tag-version), so tag and artifact cannot disagree. Only matters for local installs; do not hand-bump before tagging — that manual step is what broke release 0.5.4.",
|
|
4
|
-
"version": "0.6.0-pre.
|
|
4
|
+
"version": "0.6.0-pre.14",
|
|
5
5
|
"description": "Keelson JavaScript SDK with Node-RED nodes",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
import { ChecklistItemEvidence } from "./ChecklistEvidence";
|
|
3
|
-
/**
|
|
4
|
-
* Represents a single auditable action performed on a checklist by an operator.
|
|
5
|
-
* Used for real-time synchronization of checklist activity between Remote Operations Centres.
|
|
6
|
-
*/
|
|
7
|
-
export interface ChecklistEvent {
|
|
8
|
-
$type: "keelson.ChecklistEvent";
|
|
9
|
-
timestamp: Date | undefined;
|
|
10
|
-
eventId: string;
|
|
11
|
-
eventType: ChecklistEvent_EventType;
|
|
12
|
-
/** Operator identity */
|
|
13
|
-
operatorId: string;
|
|
14
|
-
username: string;
|
|
15
|
-
role: string;
|
|
16
|
-
rocSite: string;
|
|
17
|
-
/** Checklist context */
|
|
18
|
-
procedureId: string;
|
|
19
|
-
itemId: string;
|
|
20
|
-
/** Event-specific text payload (note text, flag reason, resolution text) */
|
|
21
|
-
detail: string;
|
|
22
|
-
/** Reference ID for additive entries (note_id, evidence_id) */
|
|
23
|
-
referenceId: string;
|
|
24
|
-
/**
|
|
25
|
-
* Which RUN of `procedure_id` this event belongs to.
|
|
26
|
-
*
|
|
27
|
-
* Empty means a publisher that predates the run model; a receiver adopts such an event under a
|
|
28
|
-
* legacy run keyed by the procedure id rather than dropping it.
|
|
29
|
-
*/
|
|
30
|
-
runId: string;
|
|
31
|
-
/** Set on EVENT_TYPE_EVIDENCE_ATTACHED. Metadata only — see ChecklistEvidence.proto. */
|
|
32
|
-
evidence: ChecklistItemEvidence | undefined;
|
|
33
|
-
}
|
|
34
|
-
export declare enum ChecklistEvent_EventType {
|
|
35
|
-
EVENT_TYPE_UNKNOWN = 0,
|
|
36
|
-
EVENT_TYPE_CHECKLIST_OPENED = 1,
|
|
37
|
-
EVENT_TYPE_ITEM_STARTED = 2,
|
|
38
|
-
EVENT_TYPE_ITEM_COMPLETED = 3,
|
|
39
|
-
EVENT_TYPE_ITEM_REVERTED = 4,
|
|
40
|
-
EVENT_TYPE_NOTE_ADDED = 5,
|
|
41
|
-
EVENT_TYPE_ITEM_FLAGGED = 6,
|
|
42
|
-
EVENT_TYPE_FLAG_RESOLVED = 7,
|
|
43
|
-
/**
|
|
44
|
-
* EVENT_TYPE_PROCEDURE_STARTED - The run boundary markers. STARTED moves a run to ACTIVE (from PLANNED, or straight from
|
|
45
|
-
* creation); COMPLETED is the sign-off once every required item is done.
|
|
46
|
-
*/
|
|
47
|
-
EVENT_TYPE_PROCEDURE_STARTED = 8,
|
|
48
|
-
EVENT_TYPE_PROCEDURE_COMPLETED = 9,
|
|
49
|
-
/** EVENT_TYPE_RUN_PLANNED - A run queued for later, with or without a due time. */
|
|
50
|
-
EVENT_TYPE_RUN_PLANNED = 10,
|
|
51
|
-
/** EVENT_TYPE_RUN_ABANDONED - A run stopped without completing. The reason is required and travels in `detail`. */
|
|
52
|
-
EVENT_TYPE_RUN_ABANDONED = 11,
|
|
53
|
-
/**
|
|
54
|
-
* EVENT_TYPE_EVIDENCE_ATTACHED - A photo attached to an item. The metadata rides in `evidence`; the bytes are published
|
|
55
|
-
* separately to `checklist_evidence/{evidence_id}`.
|
|
56
|
-
*/
|
|
57
|
-
EVENT_TYPE_EVIDENCE_ATTACHED = 12,
|
|
58
|
-
/**
|
|
59
|
-
* EVENT_TYPE_TIME_SET - A timestamp corrected after the fact — "I finished at 14:45, I am only ticking it now".
|
|
60
|
-
*
|
|
61
|
-
* A dedicated type rather than a backdated ITEM_COMPLETED, because ITEM_COMPLETED resolves
|
|
62
|
-
* conflicts earliest-wins: a completion moved LATER hits that guard on every station, logs a
|
|
63
|
-
* "confirmed" row, and changes nothing. The guard is right for genuine concurrent completion
|
|
64
|
-
* and must not be relaxed for this.
|
|
65
|
-
*
|
|
66
|
-
* `detail` carries the corrected instant as a UTC ISO-8601 string. `reference_id` names the
|
|
67
|
-
* field being corrected: "started_at", "completed_at" or "run_started_at" (the last one
|
|
68
|
-
* ignores item_id and moves the run's own start).
|
|
69
|
-
*
|
|
70
|
-
* Applying it patches ONLY that timestamp — status and author are untouched — and it is
|
|
71
|
-
* recorded as its own kind of entry. In a safety record a corrected time that renders
|
|
72
|
-
* identically to an original one is a claim nobody can audit.
|
|
73
|
-
*/
|
|
74
|
-
EVENT_TYPE_TIME_SET = 13,
|
|
75
|
-
/**
|
|
76
|
-
* EVENT_TYPE_ITEM_REOPENED - An item taken back out of "done", with the reason in `detail`.
|
|
77
|
-
*
|
|
78
|
-
* Publishers have been spelling this EVENT_TYPE_ITEM_REVERTED = 4 with the reason in `detail`,
|
|
79
|
-
* because adding an enum value costs a release cycle. The behaviour and the audit trail were
|
|
80
|
-
* right; only the name misled — "reverted" reads as undoing a mistake, while reopening is a
|
|
81
|
-
* deliberate, reasoned act that a supervisor performs on a record that already stands.
|
|
82
|
-
*
|
|
83
|
-
* EVENT_TYPE_ITEM_REVERTED stays valid and is deliberately NOT reserved: recordings and
|
|
84
|
-
* durable snapshots already contain 4, and they must keep decoding. Treat the two as the same
|
|
85
|
-
* act; prefer this one for anything published from now on.
|
|
86
|
-
*/
|
|
87
|
-
EVENT_TYPE_ITEM_REOPENED = 15,
|
|
88
|
-
UNRECOGNIZED = -1
|
|
89
|
-
}
|
|
90
|
-
export declare function checklistEvent_EventTypeFromJSON(object: any): ChecklistEvent_EventType;
|
|
91
|
-
export declare function checklistEvent_EventTypeToJSON(object: ChecklistEvent_EventType): string;
|
|
92
|
-
export declare const ChecklistEvent: MessageFns<ChecklistEvent, "keelson.ChecklistEvent">;
|
|
93
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
94
|
-
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
95
|
-
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
96
|
-
} : Partial<T>;
|
|
97
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
98
|
-
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
99
|
-
[K in keyof P]: Exact<P[K], I[K]>;
|
|
100
|
-
} & {
|
|
101
|
-
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
102
|
-
};
|
|
103
|
-
interface MessageFns<T, V extends string> {
|
|
104
|
-
readonly $type: V;
|
|
105
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
106
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
107
|
-
fromJSON(object: any): T;
|
|
108
|
-
toJSON(message: T): unknown;
|
|
109
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
110
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
111
|
-
}
|
|
112
|
-
export {};
|
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
-
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.6.1
|
|
5
|
-
// protoc v6.30.2
|
|
6
|
-
// source: ChecklistEvent.proto
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ChecklistEvent = exports.checklistEvent_EventTypeToJSON = exports.checklistEvent_EventTypeFromJSON = exports.ChecklistEvent_EventType = void 0;
|
|
9
|
-
/* eslint-disable */
|
|
10
|
-
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
-
const ChecklistEvidence_1 = require("./ChecklistEvidence");
|
|
12
|
-
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
13
|
-
const typeRegistry_1 = require("./typeRegistry");
|
|
14
|
-
var ChecklistEvent_EventType;
|
|
15
|
-
(function (ChecklistEvent_EventType) {
|
|
16
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_UNKNOWN"] = 0] = "EVENT_TYPE_UNKNOWN";
|
|
17
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_CHECKLIST_OPENED"] = 1] = "EVENT_TYPE_CHECKLIST_OPENED";
|
|
18
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_STARTED"] = 2] = "EVENT_TYPE_ITEM_STARTED";
|
|
19
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_COMPLETED"] = 3] = "EVENT_TYPE_ITEM_COMPLETED";
|
|
20
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_REVERTED"] = 4] = "EVENT_TYPE_ITEM_REVERTED";
|
|
21
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_NOTE_ADDED"] = 5] = "EVENT_TYPE_NOTE_ADDED";
|
|
22
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_FLAGGED"] = 6] = "EVENT_TYPE_ITEM_FLAGGED";
|
|
23
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_FLAG_RESOLVED"] = 7] = "EVENT_TYPE_FLAG_RESOLVED";
|
|
24
|
-
/**
|
|
25
|
-
* EVENT_TYPE_PROCEDURE_STARTED - The run boundary markers. STARTED moves a run to ACTIVE (from PLANNED, or straight from
|
|
26
|
-
* creation); COMPLETED is the sign-off once every required item is done.
|
|
27
|
-
*/
|
|
28
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_PROCEDURE_STARTED"] = 8] = "EVENT_TYPE_PROCEDURE_STARTED";
|
|
29
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_PROCEDURE_COMPLETED"] = 9] = "EVENT_TYPE_PROCEDURE_COMPLETED";
|
|
30
|
-
/** EVENT_TYPE_RUN_PLANNED - A run queued for later, with or without a due time. */
|
|
31
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_RUN_PLANNED"] = 10] = "EVENT_TYPE_RUN_PLANNED";
|
|
32
|
-
/** EVENT_TYPE_RUN_ABANDONED - A run stopped without completing. The reason is required and travels in `detail`. */
|
|
33
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_RUN_ABANDONED"] = 11] = "EVENT_TYPE_RUN_ABANDONED";
|
|
34
|
-
/**
|
|
35
|
-
* EVENT_TYPE_EVIDENCE_ATTACHED - A photo attached to an item. The metadata rides in `evidence`; the bytes are published
|
|
36
|
-
* separately to `checklist_evidence/{evidence_id}`.
|
|
37
|
-
*/
|
|
38
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_EVIDENCE_ATTACHED"] = 12] = "EVENT_TYPE_EVIDENCE_ATTACHED";
|
|
39
|
-
/**
|
|
40
|
-
* EVENT_TYPE_TIME_SET - A timestamp corrected after the fact — "I finished at 14:45, I am only ticking it now".
|
|
41
|
-
*
|
|
42
|
-
* A dedicated type rather than a backdated ITEM_COMPLETED, because ITEM_COMPLETED resolves
|
|
43
|
-
* conflicts earliest-wins: a completion moved LATER hits that guard on every station, logs a
|
|
44
|
-
* "confirmed" row, and changes nothing. The guard is right for genuine concurrent completion
|
|
45
|
-
* and must not be relaxed for this.
|
|
46
|
-
*
|
|
47
|
-
* `detail` carries the corrected instant as a UTC ISO-8601 string. `reference_id` names the
|
|
48
|
-
* field being corrected: "started_at", "completed_at" or "run_started_at" (the last one
|
|
49
|
-
* ignores item_id and moves the run's own start).
|
|
50
|
-
*
|
|
51
|
-
* Applying it patches ONLY that timestamp — status and author are untouched — and it is
|
|
52
|
-
* recorded as its own kind of entry. In a safety record a corrected time that renders
|
|
53
|
-
* identically to an original one is a claim nobody can audit.
|
|
54
|
-
*/
|
|
55
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_TIME_SET"] = 13] = "EVENT_TYPE_TIME_SET";
|
|
56
|
-
/**
|
|
57
|
-
* EVENT_TYPE_ITEM_REOPENED - An item taken back out of "done", with the reason in `detail`.
|
|
58
|
-
*
|
|
59
|
-
* Publishers have been spelling this EVENT_TYPE_ITEM_REVERTED = 4 with the reason in `detail`,
|
|
60
|
-
* because adding an enum value costs a release cycle. The behaviour and the audit trail were
|
|
61
|
-
* right; only the name misled — "reverted" reads as undoing a mistake, while reopening is a
|
|
62
|
-
* deliberate, reasoned act that a supervisor performs on a record that already stands.
|
|
63
|
-
*
|
|
64
|
-
* EVENT_TYPE_ITEM_REVERTED stays valid and is deliberately NOT reserved: recordings and
|
|
65
|
-
* durable snapshots already contain 4, and they must keep decoding. Treat the two as the same
|
|
66
|
-
* act; prefer this one for anything published from now on.
|
|
67
|
-
*/
|
|
68
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["EVENT_TYPE_ITEM_REOPENED"] = 15] = "EVENT_TYPE_ITEM_REOPENED";
|
|
69
|
-
ChecklistEvent_EventType[ChecklistEvent_EventType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
70
|
-
})(ChecklistEvent_EventType || (exports.ChecklistEvent_EventType = ChecklistEvent_EventType = {}));
|
|
71
|
-
function checklistEvent_EventTypeFromJSON(object) {
|
|
72
|
-
switch (object) {
|
|
73
|
-
case 0:
|
|
74
|
-
case "EVENT_TYPE_UNKNOWN":
|
|
75
|
-
return ChecklistEvent_EventType.EVENT_TYPE_UNKNOWN;
|
|
76
|
-
case 1:
|
|
77
|
-
case "EVENT_TYPE_CHECKLIST_OPENED":
|
|
78
|
-
return ChecklistEvent_EventType.EVENT_TYPE_CHECKLIST_OPENED;
|
|
79
|
-
case 2:
|
|
80
|
-
case "EVENT_TYPE_ITEM_STARTED":
|
|
81
|
-
return ChecklistEvent_EventType.EVENT_TYPE_ITEM_STARTED;
|
|
82
|
-
case 3:
|
|
83
|
-
case "EVENT_TYPE_ITEM_COMPLETED":
|
|
84
|
-
return ChecklistEvent_EventType.EVENT_TYPE_ITEM_COMPLETED;
|
|
85
|
-
case 4:
|
|
86
|
-
case "EVENT_TYPE_ITEM_REVERTED":
|
|
87
|
-
return ChecklistEvent_EventType.EVENT_TYPE_ITEM_REVERTED;
|
|
88
|
-
case 5:
|
|
89
|
-
case "EVENT_TYPE_NOTE_ADDED":
|
|
90
|
-
return ChecklistEvent_EventType.EVENT_TYPE_NOTE_ADDED;
|
|
91
|
-
case 6:
|
|
92
|
-
case "EVENT_TYPE_ITEM_FLAGGED":
|
|
93
|
-
return ChecklistEvent_EventType.EVENT_TYPE_ITEM_FLAGGED;
|
|
94
|
-
case 7:
|
|
95
|
-
case "EVENT_TYPE_FLAG_RESOLVED":
|
|
96
|
-
return ChecklistEvent_EventType.EVENT_TYPE_FLAG_RESOLVED;
|
|
97
|
-
case 8:
|
|
98
|
-
case "EVENT_TYPE_PROCEDURE_STARTED":
|
|
99
|
-
return ChecklistEvent_EventType.EVENT_TYPE_PROCEDURE_STARTED;
|
|
100
|
-
case 9:
|
|
101
|
-
case "EVENT_TYPE_PROCEDURE_COMPLETED":
|
|
102
|
-
return ChecklistEvent_EventType.EVENT_TYPE_PROCEDURE_COMPLETED;
|
|
103
|
-
case 10:
|
|
104
|
-
case "EVENT_TYPE_RUN_PLANNED":
|
|
105
|
-
return ChecklistEvent_EventType.EVENT_TYPE_RUN_PLANNED;
|
|
106
|
-
case 11:
|
|
107
|
-
case "EVENT_TYPE_RUN_ABANDONED":
|
|
108
|
-
return ChecklistEvent_EventType.EVENT_TYPE_RUN_ABANDONED;
|
|
109
|
-
case 12:
|
|
110
|
-
case "EVENT_TYPE_EVIDENCE_ATTACHED":
|
|
111
|
-
return ChecklistEvent_EventType.EVENT_TYPE_EVIDENCE_ATTACHED;
|
|
112
|
-
case 13:
|
|
113
|
-
case "EVENT_TYPE_TIME_SET":
|
|
114
|
-
return ChecklistEvent_EventType.EVENT_TYPE_TIME_SET;
|
|
115
|
-
case 15:
|
|
116
|
-
case "EVENT_TYPE_ITEM_REOPENED":
|
|
117
|
-
return ChecklistEvent_EventType.EVENT_TYPE_ITEM_REOPENED;
|
|
118
|
-
case -1:
|
|
119
|
-
case "UNRECOGNIZED":
|
|
120
|
-
default:
|
|
121
|
-
return ChecklistEvent_EventType.UNRECOGNIZED;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
exports.checklistEvent_EventTypeFromJSON = checklistEvent_EventTypeFromJSON;
|
|
125
|
-
function checklistEvent_EventTypeToJSON(object) {
|
|
126
|
-
switch (object) {
|
|
127
|
-
case ChecklistEvent_EventType.EVENT_TYPE_UNKNOWN:
|
|
128
|
-
return "EVENT_TYPE_UNKNOWN";
|
|
129
|
-
case ChecklistEvent_EventType.EVENT_TYPE_CHECKLIST_OPENED:
|
|
130
|
-
return "EVENT_TYPE_CHECKLIST_OPENED";
|
|
131
|
-
case ChecklistEvent_EventType.EVENT_TYPE_ITEM_STARTED:
|
|
132
|
-
return "EVENT_TYPE_ITEM_STARTED";
|
|
133
|
-
case ChecklistEvent_EventType.EVENT_TYPE_ITEM_COMPLETED:
|
|
134
|
-
return "EVENT_TYPE_ITEM_COMPLETED";
|
|
135
|
-
case ChecklistEvent_EventType.EVENT_TYPE_ITEM_REVERTED:
|
|
136
|
-
return "EVENT_TYPE_ITEM_REVERTED";
|
|
137
|
-
case ChecklistEvent_EventType.EVENT_TYPE_NOTE_ADDED:
|
|
138
|
-
return "EVENT_TYPE_NOTE_ADDED";
|
|
139
|
-
case ChecklistEvent_EventType.EVENT_TYPE_ITEM_FLAGGED:
|
|
140
|
-
return "EVENT_TYPE_ITEM_FLAGGED";
|
|
141
|
-
case ChecklistEvent_EventType.EVENT_TYPE_FLAG_RESOLVED:
|
|
142
|
-
return "EVENT_TYPE_FLAG_RESOLVED";
|
|
143
|
-
case ChecklistEvent_EventType.EVENT_TYPE_PROCEDURE_STARTED:
|
|
144
|
-
return "EVENT_TYPE_PROCEDURE_STARTED";
|
|
145
|
-
case ChecklistEvent_EventType.EVENT_TYPE_PROCEDURE_COMPLETED:
|
|
146
|
-
return "EVENT_TYPE_PROCEDURE_COMPLETED";
|
|
147
|
-
case ChecklistEvent_EventType.EVENT_TYPE_RUN_PLANNED:
|
|
148
|
-
return "EVENT_TYPE_RUN_PLANNED";
|
|
149
|
-
case ChecklistEvent_EventType.EVENT_TYPE_RUN_ABANDONED:
|
|
150
|
-
return "EVENT_TYPE_RUN_ABANDONED";
|
|
151
|
-
case ChecklistEvent_EventType.EVENT_TYPE_EVIDENCE_ATTACHED:
|
|
152
|
-
return "EVENT_TYPE_EVIDENCE_ATTACHED";
|
|
153
|
-
case ChecklistEvent_EventType.EVENT_TYPE_TIME_SET:
|
|
154
|
-
return "EVENT_TYPE_TIME_SET";
|
|
155
|
-
case ChecklistEvent_EventType.EVENT_TYPE_ITEM_REOPENED:
|
|
156
|
-
return "EVENT_TYPE_ITEM_REOPENED";
|
|
157
|
-
case ChecklistEvent_EventType.UNRECOGNIZED:
|
|
158
|
-
default:
|
|
159
|
-
return "UNRECOGNIZED";
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
exports.checklistEvent_EventTypeToJSON = checklistEvent_EventTypeToJSON;
|
|
163
|
-
function createBaseChecklistEvent() {
|
|
164
|
-
return {
|
|
165
|
-
$type: "keelson.ChecklistEvent",
|
|
166
|
-
timestamp: undefined,
|
|
167
|
-
eventId: "",
|
|
168
|
-
eventType: 0,
|
|
169
|
-
operatorId: "",
|
|
170
|
-
username: "",
|
|
171
|
-
role: "",
|
|
172
|
-
rocSite: "",
|
|
173
|
-
procedureId: "",
|
|
174
|
-
itemId: "",
|
|
175
|
-
detail: "",
|
|
176
|
-
referenceId: "",
|
|
177
|
-
runId: "",
|
|
178
|
-
evidence: undefined,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
exports.ChecklistEvent = {
|
|
182
|
-
$type: "keelson.ChecklistEvent",
|
|
183
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
184
|
-
if (message.timestamp !== undefined) {
|
|
185
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).join();
|
|
186
|
-
}
|
|
187
|
-
if (message.eventId !== "") {
|
|
188
|
-
writer.uint32(18).string(message.eventId);
|
|
189
|
-
}
|
|
190
|
-
if (message.eventType !== 0) {
|
|
191
|
-
writer.uint32(24).int32(message.eventType);
|
|
192
|
-
}
|
|
193
|
-
if (message.operatorId !== "") {
|
|
194
|
-
writer.uint32(34).string(message.operatorId);
|
|
195
|
-
}
|
|
196
|
-
if (message.username !== "") {
|
|
197
|
-
writer.uint32(42).string(message.username);
|
|
198
|
-
}
|
|
199
|
-
if (message.role !== "") {
|
|
200
|
-
writer.uint32(50).string(message.role);
|
|
201
|
-
}
|
|
202
|
-
if (message.rocSite !== "") {
|
|
203
|
-
writer.uint32(58).string(message.rocSite);
|
|
204
|
-
}
|
|
205
|
-
if (message.procedureId !== "") {
|
|
206
|
-
writer.uint32(66).string(message.procedureId);
|
|
207
|
-
}
|
|
208
|
-
if (message.itemId !== "") {
|
|
209
|
-
writer.uint32(74).string(message.itemId);
|
|
210
|
-
}
|
|
211
|
-
if (message.detail !== "") {
|
|
212
|
-
writer.uint32(82).string(message.detail);
|
|
213
|
-
}
|
|
214
|
-
if (message.referenceId !== "") {
|
|
215
|
-
writer.uint32(90).string(message.referenceId);
|
|
216
|
-
}
|
|
217
|
-
if (message.runId !== "") {
|
|
218
|
-
writer.uint32(98).string(message.runId);
|
|
219
|
-
}
|
|
220
|
-
if (message.evidence !== undefined) {
|
|
221
|
-
ChecklistEvidence_1.ChecklistItemEvidence.encode(message.evidence, writer.uint32(106).fork()).join();
|
|
222
|
-
}
|
|
223
|
-
return writer;
|
|
224
|
-
},
|
|
225
|
-
decode(input, length) {
|
|
226
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
227
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
228
|
-
const message = createBaseChecklistEvent();
|
|
229
|
-
while (reader.pos < end) {
|
|
230
|
-
const tag = reader.uint32();
|
|
231
|
-
switch (tag >>> 3) {
|
|
232
|
-
case 1: {
|
|
233
|
-
if (tag !== 10) {
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
237
|
-
continue;
|
|
238
|
-
}
|
|
239
|
-
case 2: {
|
|
240
|
-
if (tag !== 18) {
|
|
241
|
-
break;
|
|
242
|
-
}
|
|
243
|
-
message.eventId = reader.string();
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
case 3: {
|
|
247
|
-
if (tag !== 24) {
|
|
248
|
-
break;
|
|
249
|
-
}
|
|
250
|
-
message.eventType = reader.int32();
|
|
251
|
-
continue;
|
|
252
|
-
}
|
|
253
|
-
case 4: {
|
|
254
|
-
if (tag !== 34) {
|
|
255
|
-
break;
|
|
256
|
-
}
|
|
257
|
-
message.operatorId = reader.string();
|
|
258
|
-
continue;
|
|
259
|
-
}
|
|
260
|
-
case 5: {
|
|
261
|
-
if (tag !== 42) {
|
|
262
|
-
break;
|
|
263
|
-
}
|
|
264
|
-
message.username = reader.string();
|
|
265
|
-
continue;
|
|
266
|
-
}
|
|
267
|
-
case 6: {
|
|
268
|
-
if (tag !== 50) {
|
|
269
|
-
break;
|
|
270
|
-
}
|
|
271
|
-
message.role = reader.string();
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
case 7: {
|
|
275
|
-
if (tag !== 58) {
|
|
276
|
-
break;
|
|
277
|
-
}
|
|
278
|
-
message.rocSite = reader.string();
|
|
279
|
-
continue;
|
|
280
|
-
}
|
|
281
|
-
case 8: {
|
|
282
|
-
if (tag !== 66) {
|
|
283
|
-
break;
|
|
284
|
-
}
|
|
285
|
-
message.procedureId = reader.string();
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
|
-
case 9: {
|
|
289
|
-
if (tag !== 74) {
|
|
290
|
-
break;
|
|
291
|
-
}
|
|
292
|
-
message.itemId = reader.string();
|
|
293
|
-
continue;
|
|
294
|
-
}
|
|
295
|
-
case 10: {
|
|
296
|
-
if (tag !== 82) {
|
|
297
|
-
break;
|
|
298
|
-
}
|
|
299
|
-
message.detail = reader.string();
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
case 11: {
|
|
303
|
-
if (tag !== 90) {
|
|
304
|
-
break;
|
|
305
|
-
}
|
|
306
|
-
message.referenceId = reader.string();
|
|
307
|
-
continue;
|
|
308
|
-
}
|
|
309
|
-
case 12: {
|
|
310
|
-
if (tag !== 98) {
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
message.runId = reader.string();
|
|
314
|
-
continue;
|
|
315
|
-
}
|
|
316
|
-
case 13: {
|
|
317
|
-
if (tag !== 106) {
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
message.evidence = ChecklistEvidence_1.ChecklistItemEvidence.decode(reader, reader.uint32());
|
|
321
|
-
continue;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
325
|
-
break;
|
|
326
|
-
}
|
|
327
|
-
reader.skip(tag & 7);
|
|
328
|
-
}
|
|
329
|
-
return message;
|
|
330
|
-
},
|
|
331
|
-
fromJSON(object) {
|
|
332
|
-
return {
|
|
333
|
-
$type: exports.ChecklistEvent.$type,
|
|
334
|
-
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
335
|
-
eventId: isSet(object.eventId) ? globalThis.String(object.eventId) : "",
|
|
336
|
-
eventType: isSet(object.eventType) ? checklistEvent_EventTypeFromJSON(object.eventType) : 0,
|
|
337
|
-
operatorId: isSet(object.operatorId) ? globalThis.String(object.operatorId) : "",
|
|
338
|
-
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
339
|
-
role: isSet(object.role) ? globalThis.String(object.role) : "",
|
|
340
|
-
rocSite: isSet(object.rocSite) ? globalThis.String(object.rocSite) : "",
|
|
341
|
-
procedureId: isSet(object.procedureId) ? globalThis.String(object.procedureId) : "",
|
|
342
|
-
itemId: isSet(object.itemId) ? globalThis.String(object.itemId) : "",
|
|
343
|
-
detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
|
|
344
|
-
referenceId: isSet(object.referenceId) ? globalThis.String(object.referenceId) : "",
|
|
345
|
-
runId: isSet(object.runId) ? globalThis.String(object.runId) : "",
|
|
346
|
-
evidence: isSet(object.evidence) ? ChecklistEvidence_1.ChecklistItemEvidence.fromJSON(object.evidence) : undefined,
|
|
347
|
-
};
|
|
348
|
-
},
|
|
349
|
-
toJSON(message) {
|
|
350
|
-
const obj = {};
|
|
351
|
-
if (message.timestamp !== undefined) {
|
|
352
|
-
obj.timestamp = message.timestamp.toISOString();
|
|
353
|
-
}
|
|
354
|
-
if (message.eventId !== "") {
|
|
355
|
-
obj.eventId = message.eventId;
|
|
356
|
-
}
|
|
357
|
-
if (message.eventType !== 0) {
|
|
358
|
-
obj.eventType = checklistEvent_EventTypeToJSON(message.eventType);
|
|
359
|
-
}
|
|
360
|
-
if (message.operatorId !== "") {
|
|
361
|
-
obj.operatorId = message.operatorId;
|
|
362
|
-
}
|
|
363
|
-
if (message.username !== "") {
|
|
364
|
-
obj.username = message.username;
|
|
365
|
-
}
|
|
366
|
-
if (message.role !== "") {
|
|
367
|
-
obj.role = message.role;
|
|
368
|
-
}
|
|
369
|
-
if (message.rocSite !== "") {
|
|
370
|
-
obj.rocSite = message.rocSite;
|
|
371
|
-
}
|
|
372
|
-
if (message.procedureId !== "") {
|
|
373
|
-
obj.procedureId = message.procedureId;
|
|
374
|
-
}
|
|
375
|
-
if (message.itemId !== "") {
|
|
376
|
-
obj.itemId = message.itemId;
|
|
377
|
-
}
|
|
378
|
-
if (message.detail !== "") {
|
|
379
|
-
obj.detail = message.detail;
|
|
380
|
-
}
|
|
381
|
-
if (message.referenceId !== "") {
|
|
382
|
-
obj.referenceId = message.referenceId;
|
|
383
|
-
}
|
|
384
|
-
if (message.runId !== "") {
|
|
385
|
-
obj.runId = message.runId;
|
|
386
|
-
}
|
|
387
|
-
if (message.evidence !== undefined) {
|
|
388
|
-
obj.evidence = ChecklistEvidence_1.ChecklistItemEvidence.toJSON(message.evidence);
|
|
389
|
-
}
|
|
390
|
-
return obj;
|
|
391
|
-
},
|
|
392
|
-
create(base) {
|
|
393
|
-
return exports.ChecklistEvent.fromPartial(base ?? {});
|
|
394
|
-
},
|
|
395
|
-
fromPartial(object) {
|
|
396
|
-
const message = createBaseChecklistEvent();
|
|
397
|
-
message.timestamp = object.timestamp ?? undefined;
|
|
398
|
-
message.eventId = object.eventId ?? "";
|
|
399
|
-
message.eventType = object.eventType ?? 0;
|
|
400
|
-
message.operatorId = object.operatorId ?? "";
|
|
401
|
-
message.username = object.username ?? "";
|
|
402
|
-
message.role = object.role ?? "";
|
|
403
|
-
message.rocSite = object.rocSite ?? "";
|
|
404
|
-
message.procedureId = object.procedureId ?? "";
|
|
405
|
-
message.itemId = object.itemId ?? "";
|
|
406
|
-
message.detail = object.detail ?? "";
|
|
407
|
-
message.referenceId = object.referenceId ?? "";
|
|
408
|
-
message.runId = object.runId ?? "";
|
|
409
|
-
message.evidence = (object.evidence !== undefined && object.evidence !== null)
|
|
410
|
-
? ChecklistEvidence_1.ChecklistItemEvidence.fromPartial(object.evidence)
|
|
411
|
-
: undefined;
|
|
412
|
-
return message;
|
|
413
|
-
},
|
|
414
|
-
};
|
|
415
|
-
typeRegistry_1.messageTypeRegistry.set(exports.ChecklistEvent.$type, exports.ChecklistEvent);
|
|
416
|
-
function toTimestamp(date) {
|
|
417
|
-
const seconds = Math.trunc(date.getTime() / 1000);
|
|
418
|
-
const nanos = (date.getTime() % 1000) * 1000000;
|
|
419
|
-
return { $type: "google.protobuf.Timestamp", seconds, nanos };
|
|
420
|
-
}
|
|
421
|
-
function fromTimestamp(t) {
|
|
422
|
-
let millis = (t.seconds || 0) * 1000;
|
|
423
|
-
millis += (t.nanos || 0) / 1000000;
|
|
424
|
-
return new globalThis.Date(millis);
|
|
425
|
-
}
|
|
426
|
-
function fromJsonTimestamp(o) {
|
|
427
|
-
if (o instanceof globalThis.Date) {
|
|
428
|
-
return o;
|
|
429
|
-
}
|
|
430
|
-
else if (typeof o === "string") {
|
|
431
|
-
return new globalThis.Date(o);
|
|
432
|
-
}
|
|
433
|
-
else {
|
|
434
|
-
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
function isSet(value) {
|
|
438
|
-
return value !== null && value !== undefined;
|
|
439
|
-
}
|