@rise-maritime/keelson-js 0.5.3 → 0.6.0-alpha.202.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 +640 -0
- package/dist/interfaces/Route.js +4180 -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/ChecklistEvent.d.ts +152 -0
- package/dist/payloads/ChecklistEvent.js +524 -0
- package/dist/payloads/ChecklistEvidence.d.ts +79 -0
- package/dist/payloads/ChecklistEvidence.js +287 -0
- package/dist/payloads/ChecklistPresence.d.ts +68 -0
- package/dist/payloads/ChecklistPresence.js +286 -0
- package/dist/payloads/ChecklistProcedure.d.ts +81 -0
- package/dist/payloads/ChecklistProcedure.js +364 -0
- package/dist/payloads/ChecklistState.d.ts +178 -0
- package/dist/payloads/ChecklistState.js +838 -0
- 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 +662 -0
- package/dist/payloads/Route.js +4289 -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 +17 -1
- package/dist/payloads/index.keelson.js +17 -1
- package/dist/qos.json +95 -0
- package/dist/subjects.json +38 -1
- package/package.json +2 -1
package/dist/payloads/Alarm.js
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: Alarm.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.Visual = exports.AlarmAcknowledgment = exports.Alarm = exports.
|
|
8
|
+
exports.Visual = exports.AlarmAcknowledgment = exports.Alarm = exports.alarm_AckSchemeToJSON = exports.alarm_AckSchemeFromJSON = exports.Alarm_AckScheme = exports.alarm_PriorityToJSON = exports.alarm_PriorityFromJSON = exports.Alarm_Priority = exports.alarm_CategoryToJSON = exports.alarm_CategoryFromJSON = exports.Alarm_Category = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
const Audio_1 = require("./Audio");
|
|
12
|
+
const Severity_1 = require("./Severity");
|
|
12
13
|
const CompressedImage_1 = require("./foxglove/CompressedImage");
|
|
13
14
|
const CompressedVideo_1 = require("./foxglove/CompressedVideo");
|
|
14
15
|
const RawImage_1 = require("./foxglove/RawImage");
|
|
@@ -161,57 +162,6 @@ function alarm_AckSchemeToJSON(object) {
|
|
|
161
162
|
}
|
|
162
163
|
}
|
|
163
164
|
exports.alarm_AckSchemeToJSON = alarm_AckSchemeToJSON;
|
|
164
|
-
var Alarm_Severity;
|
|
165
|
-
(function (Alarm_Severity) {
|
|
166
|
-
Alarm_Severity[Alarm_Severity["SEVERITY_UNSPECIFIED"] = 0] = "SEVERITY_UNSPECIFIED";
|
|
167
|
-
Alarm_Severity[Alarm_Severity["SEVERITY_LOW"] = 1] = "SEVERITY_LOW";
|
|
168
|
-
Alarm_Severity[Alarm_Severity["SEVERITY_MEDIUM"] = 2] = "SEVERITY_MEDIUM";
|
|
169
|
-
Alarm_Severity[Alarm_Severity["SEVERITY_HIGH"] = 3] = "SEVERITY_HIGH";
|
|
170
|
-
Alarm_Severity[Alarm_Severity["SEVERITY_CRITICAL"] = 4] = "SEVERITY_CRITICAL";
|
|
171
|
-
Alarm_Severity[Alarm_Severity["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
172
|
-
})(Alarm_Severity || (exports.Alarm_Severity = Alarm_Severity = {}));
|
|
173
|
-
function alarm_SeverityFromJSON(object) {
|
|
174
|
-
switch (object) {
|
|
175
|
-
case 0:
|
|
176
|
-
case "SEVERITY_UNSPECIFIED":
|
|
177
|
-
return Alarm_Severity.SEVERITY_UNSPECIFIED;
|
|
178
|
-
case 1:
|
|
179
|
-
case "SEVERITY_LOW":
|
|
180
|
-
return Alarm_Severity.SEVERITY_LOW;
|
|
181
|
-
case 2:
|
|
182
|
-
case "SEVERITY_MEDIUM":
|
|
183
|
-
return Alarm_Severity.SEVERITY_MEDIUM;
|
|
184
|
-
case 3:
|
|
185
|
-
case "SEVERITY_HIGH":
|
|
186
|
-
return Alarm_Severity.SEVERITY_HIGH;
|
|
187
|
-
case 4:
|
|
188
|
-
case "SEVERITY_CRITICAL":
|
|
189
|
-
return Alarm_Severity.SEVERITY_CRITICAL;
|
|
190
|
-
case -1:
|
|
191
|
-
case "UNRECOGNIZED":
|
|
192
|
-
default:
|
|
193
|
-
return Alarm_Severity.UNRECOGNIZED;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
exports.alarm_SeverityFromJSON = alarm_SeverityFromJSON;
|
|
197
|
-
function alarm_SeverityToJSON(object) {
|
|
198
|
-
switch (object) {
|
|
199
|
-
case Alarm_Severity.SEVERITY_UNSPECIFIED:
|
|
200
|
-
return "SEVERITY_UNSPECIFIED";
|
|
201
|
-
case Alarm_Severity.SEVERITY_LOW:
|
|
202
|
-
return "SEVERITY_LOW";
|
|
203
|
-
case Alarm_Severity.SEVERITY_MEDIUM:
|
|
204
|
-
return "SEVERITY_MEDIUM";
|
|
205
|
-
case Alarm_Severity.SEVERITY_HIGH:
|
|
206
|
-
return "SEVERITY_HIGH";
|
|
207
|
-
case Alarm_Severity.SEVERITY_CRITICAL:
|
|
208
|
-
return "SEVERITY_CRITICAL";
|
|
209
|
-
case Alarm_Severity.UNRECOGNIZED:
|
|
210
|
-
default:
|
|
211
|
-
return "UNRECOGNIZED";
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
exports.alarm_SeverityToJSON = alarm_SeverityToJSON;
|
|
215
165
|
function createBaseAlarm() {
|
|
216
166
|
return {
|
|
217
167
|
$type: "keelson.Alarm",
|
|
@@ -408,7 +358,7 @@ exports.Alarm = {
|
|
|
408
358
|
expirationTimeUtc: isSet(object.expirationTimeUtc) ? fromJsonTimestamp(object.expirationTimeUtc) : undefined,
|
|
409
359
|
durationSeconds: isSet(object.durationSeconds) ? globalThis.Number(object.durationSeconds) : 0,
|
|
410
360
|
ackScheme: isSet(object.ackScheme) ? alarm_AckSchemeFromJSON(object.ackScheme) : 0,
|
|
411
|
-
severity: isSet(object.severity) ?
|
|
361
|
+
severity: isSet(object.severity) ? (0, Severity_1.severityLevelFromJSON)(object.severity) : 0,
|
|
412
362
|
acknowledged: isSet(object.acknowledged) ? globalThis.Boolean(object.acknowledged) : false,
|
|
413
363
|
};
|
|
414
364
|
},
|
|
@@ -451,7 +401,7 @@ exports.Alarm = {
|
|
|
451
401
|
obj.ackScheme = alarm_AckSchemeToJSON(message.ackScheme);
|
|
452
402
|
}
|
|
453
403
|
if (message.severity !== 0) {
|
|
454
|
-
obj.severity =
|
|
404
|
+
obj.severity = (0, Severity_1.severityLevelToJSON)(message.severity);
|
|
455
405
|
}
|
|
456
406
|
if (message.acknowledged !== false) {
|
|
457
407
|
obj.acknowledged = message.acknowledged;
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
* The corrected instant, on EVENT_TYPE_TIME_SET.
|
|
35
|
+
*
|
|
36
|
+
* This used to travel as a UTC ISO-8601 string in `detail`, in a message that already imports
|
|
37
|
+
* google.protobuf.Timestamp — so every consumer wrote its own parser, and every parser was a
|
|
38
|
+
* chance to disagree about an instant in a safety record.
|
|
39
|
+
*
|
|
40
|
+
* LEGACY FALLBACK: a publisher predating this field leaves it unset and writes the string. A
|
|
41
|
+
* receiver reads this field when `corrected_field` is set, and falls back to parsing `detail`
|
|
42
|
+
* only when `corrected_field == TIME_FIELD_UNKNOWN` — never the other way round, so a
|
|
43
|
+
* publisher writing both cannot be misread. Publishers SHOULD write both until every consumer
|
|
44
|
+
* is known to read the typed pair; recordings full of the string form must keep replaying.
|
|
45
|
+
*/
|
|
46
|
+
correctedTime: Date | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Which timestamp `corrected_time` replaces. Set together with it, or neither.
|
|
49
|
+
*
|
|
50
|
+
* TIME_FIELD_UNKNOWN on an EVENT_TYPE_TIME_SET means a legacy publisher: fall back to the
|
|
51
|
+
* `reference_id` string ("started_at", "completed_at", "run_started_at"). An unrecognised
|
|
52
|
+
* value here is dropped, not guessed — a correction applied to the wrong field is worse than
|
|
53
|
+
* one not applied at all.
|
|
54
|
+
*/
|
|
55
|
+
correctedField: ChecklistEvent_TimeField;
|
|
56
|
+
}
|
|
57
|
+
export declare enum ChecklistEvent_EventType {
|
|
58
|
+
EVENT_TYPE_UNKNOWN = 0,
|
|
59
|
+
EVENT_TYPE_CHECKLIST_OPENED = 1,
|
|
60
|
+
EVENT_TYPE_ITEM_STARTED = 2,
|
|
61
|
+
EVENT_TYPE_ITEM_COMPLETED = 3,
|
|
62
|
+
EVENT_TYPE_ITEM_REVERTED = 4,
|
|
63
|
+
EVENT_TYPE_NOTE_ADDED = 5,
|
|
64
|
+
EVENT_TYPE_ITEM_FLAGGED = 6,
|
|
65
|
+
EVENT_TYPE_FLAG_RESOLVED = 7,
|
|
66
|
+
/**
|
|
67
|
+
* EVENT_TYPE_PROCEDURE_STARTED - The run boundary markers. STARTED moves a run to ACTIVE (from PLANNED, or straight from
|
|
68
|
+
* creation); COMPLETED is the sign-off once every required item is done.
|
|
69
|
+
*/
|
|
70
|
+
EVENT_TYPE_PROCEDURE_STARTED = 8,
|
|
71
|
+
EVENT_TYPE_PROCEDURE_COMPLETED = 9,
|
|
72
|
+
/** EVENT_TYPE_RUN_PLANNED - A run queued for later, with or without a due time. */
|
|
73
|
+
EVENT_TYPE_RUN_PLANNED = 10,
|
|
74
|
+
/** EVENT_TYPE_RUN_ABANDONED - A run stopped without completing. The reason is required and travels in `detail`. */
|
|
75
|
+
EVENT_TYPE_RUN_ABANDONED = 11,
|
|
76
|
+
/**
|
|
77
|
+
* EVENT_TYPE_EVIDENCE_ATTACHED - A photo attached to an item. The metadata rides in `evidence`; the bytes are published
|
|
78
|
+
* separately to `checklist_evidence/{evidence_id}`.
|
|
79
|
+
*/
|
|
80
|
+
EVENT_TYPE_EVIDENCE_ATTACHED = 12,
|
|
81
|
+
/**
|
|
82
|
+
* EVENT_TYPE_TIME_SET - A timestamp corrected after the fact — "I finished at 14:45, I am only ticking it now".
|
|
83
|
+
*
|
|
84
|
+
* A dedicated type rather than a backdated ITEM_COMPLETED, because ITEM_COMPLETED resolves
|
|
85
|
+
* conflicts earliest-wins: a completion moved LATER hits that guard on every station, logs a
|
|
86
|
+
* "confirmed" row, and changes nothing. The guard is right for genuine concurrent completion
|
|
87
|
+
* and must not be relaxed for this.
|
|
88
|
+
*
|
|
89
|
+
* The corrected instant travels in `corrected_time` and the field it corrects in
|
|
90
|
+
* `corrected_field`. See those fields for what a receiver does with a publisher that
|
|
91
|
+
* predates them.
|
|
92
|
+
*
|
|
93
|
+
* Applying it patches ONLY that timestamp — status and author are untouched — and it is
|
|
94
|
+
* recorded as its own kind of entry. In a safety record a corrected time that renders
|
|
95
|
+
* identically to an original one is a claim nobody can audit.
|
|
96
|
+
*/
|
|
97
|
+
EVENT_TYPE_TIME_SET = 13,
|
|
98
|
+
/**
|
|
99
|
+
* EVENT_TYPE_ITEM_REOPENED - An item taken back out of "done", with the reason in `detail`.
|
|
100
|
+
*
|
|
101
|
+
* Publishers have been spelling this EVENT_TYPE_ITEM_REVERTED = 4 with the reason in `detail`,
|
|
102
|
+
* because adding an enum value costs a release cycle. The behaviour and the audit trail were
|
|
103
|
+
* right; only the name misled — "reverted" reads as undoing a mistake, while reopening is a
|
|
104
|
+
* deliberate, reasoned act that a supervisor performs on a record that already stands.
|
|
105
|
+
*
|
|
106
|
+
* EVENT_TYPE_ITEM_REVERTED stays valid and is deliberately NOT reserved: recordings and
|
|
107
|
+
* durable snapshots already contain 4, and they must keep decoding. Treat the two as the same
|
|
108
|
+
* act; prefer this one for anything published from now on.
|
|
109
|
+
*/
|
|
110
|
+
EVENT_TYPE_ITEM_REOPENED = 15,
|
|
111
|
+
UNRECOGNIZED = -1
|
|
112
|
+
}
|
|
113
|
+
export declare function checklistEvent_EventTypeFromJSON(object: any): ChecklistEvent_EventType;
|
|
114
|
+
export declare function checklistEvent_EventTypeToJSON(object: ChecklistEvent_EventType): string;
|
|
115
|
+
/**
|
|
116
|
+
* Which timestamp an EVENT_TYPE_TIME_SET corrects.
|
|
117
|
+
*
|
|
118
|
+
* An enum rather than the field's name as a string, because a string target is matched by
|
|
119
|
+
* every consumer against its own spelling: a typo is not an error, it is a silent no-op that
|
|
120
|
+
* logs an audited correction and patches nothing.
|
|
121
|
+
*/
|
|
122
|
+
export declare enum ChecklistEvent_TimeField {
|
|
123
|
+
TIME_FIELD_UNKNOWN = 0,
|
|
124
|
+
TIME_FIELD_ITEM_STARTED_AT = 1,
|
|
125
|
+
TIME_FIELD_ITEM_COMPLETED_AT = 2,
|
|
126
|
+
/** TIME_FIELD_RUN_STARTED_AT - The run's own start. Ignores `item_id`. */
|
|
127
|
+
TIME_FIELD_RUN_STARTED_AT = 3,
|
|
128
|
+
UNRECOGNIZED = -1
|
|
129
|
+
}
|
|
130
|
+
export declare function checklistEvent_TimeFieldFromJSON(object: any): ChecklistEvent_TimeField;
|
|
131
|
+
export declare function checklistEvent_TimeFieldToJSON(object: ChecklistEvent_TimeField): string;
|
|
132
|
+
export declare const ChecklistEvent: MessageFns<ChecklistEvent, "keelson.ChecklistEvent">;
|
|
133
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
134
|
+
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 {} ? {
|
|
135
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
136
|
+
} : Partial<T>;
|
|
137
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
138
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
139
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
140
|
+
} & {
|
|
141
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
142
|
+
};
|
|
143
|
+
interface MessageFns<T, V extends string> {
|
|
144
|
+
readonly $type: V;
|
|
145
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
146
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
147
|
+
fromJSON(object: any): T;
|
|
148
|
+
toJSON(message: T): unknown;
|
|
149
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
150
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
151
|
+
}
|
|
152
|
+
export {};
|