@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export interface RouteChangeEvent {
|
|
3
|
+
$type: "keelson.RouteChangeEvent";
|
|
4
|
+
/** Unique change identifier (UUID). Also used as the trailing key segment. */
|
|
5
|
+
changeId: string;
|
|
6
|
+
routeId: string;
|
|
7
|
+
/** Edition transition described by this event. */
|
|
8
|
+
oldEdition: number;
|
|
9
|
+
newEdition: number;
|
|
10
|
+
at: Date | undefined;
|
|
11
|
+
/** Identity that authored the change. */
|
|
12
|
+
authorId: string;
|
|
13
|
+
authorSite: string;
|
|
14
|
+
/**
|
|
15
|
+
* Free-form reason ("initial plan", "bridge review", "weather reroute",
|
|
16
|
+
* "force_override", "migrated_from_localstorage", ...).
|
|
17
|
+
*/
|
|
18
|
+
reason: string;
|
|
19
|
+
/** Short human-readable summary ("added 3 waypoints", "shifted WP-5 80m N"). */
|
|
20
|
+
changeSummary: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const RouteChangeEvent: MessageFns<RouteChangeEvent, "keelson.RouteChangeEvent">;
|
|
23
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
24
|
+
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 {} ? {
|
|
25
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
26
|
+
} : Partial<T>;
|
|
27
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
28
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
29
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
30
|
+
} & {
|
|
31
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
32
|
+
};
|
|
33
|
+
interface MessageFns<T, V extends string> {
|
|
34
|
+
readonly $type: V;
|
|
35
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
36
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
37
|
+
fromJSON(object: any): T;
|
|
38
|
+
toJSON(message: T): unknown;
|
|
39
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
40
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,223 @@
|
|
|
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: RouteChangeEvent.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.RouteChangeEvent = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
const timestamp_1 = require("./google/protobuf/timestamp");
|
|
12
|
+
const typeRegistry_1 = require("./typeRegistry");
|
|
13
|
+
function createBaseRouteChangeEvent() {
|
|
14
|
+
return {
|
|
15
|
+
$type: "keelson.RouteChangeEvent",
|
|
16
|
+
changeId: "",
|
|
17
|
+
routeId: "",
|
|
18
|
+
oldEdition: 0,
|
|
19
|
+
newEdition: 0,
|
|
20
|
+
at: undefined,
|
|
21
|
+
authorId: "",
|
|
22
|
+
authorSite: "",
|
|
23
|
+
reason: "",
|
|
24
|
+
changeSummary: "",
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
exports.RouteChangeEvent = {
|
|
28
|
+
$type: "keelson.RouteChangeEvent",
|
|
29
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
30
|
+
if (message.changeId !== "") {
|
|
31
|
+
writer.uint32(10).string(message.changeId);
|
|
32
|
+
}
|
|
33
|
+
if (message.routeId !== "") {
|
|
34
|
+
writer.uint32(18).string(message.routeId);
|
|
35
|
+
}
|
|
36
|
+
if (message.oldEdition !== 0) {
|
|
37
|
+
writer.uint32(24).uint32(message.oldEdition);
|
|
38
|
+
}
|
|
39
|
+
if (message.newEdition !== 0) {
|
|
40
|
+
writer.uint32(32).uint32(message.newEdition);
|
|
41
|
+
}
|
|
42
|
+
if (message.at !== undefined) {
|
|
43
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.at), writer.uint32(42).fork()).join();
|
|
44
|
+
}
|
|
45
|
+
if (message.authorId !== "") {
|
|
46
|
+
writer.uint32(50).string(message.authorId);
|
|
47
|
+
}
|
|
48
|
+
if (message.authorSite !== "") {
|
|
49
|
+
writer.uint32(58).string(message.authorSite);
|
|
50
|
+
}
|
|
51
|
+
if (message.reason !== "") {
|
|
52
|
+
writer.uint32(66).string(message.reason);
|
|
53
|
+
}
|
|
54
|
+
if (message.changeSummary !== "") {
|
|
55
|
+
writer.uint32(74).string(message.changeSummary);
|
|
56
|
+
}
|
|
57
|
+
return writer;
|
|
58
|
+
},
|
|
59
|
+
decode(input, length) {
|
|
60
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
61
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
62
|
+
const message = createBaseRouteChangeEvent();
|
|
63
|
+
while (reader.pos < end) {
|
|
64
|
+
const tag = reader.uint32();
|
|
65
|
+
switch (tag >>> 3) {
|
|
66
|
+
case 1: {
|
|
67
|
+
if (tag !== 10) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
message.changeId = reader.string();
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
case 2: {
|
|
74
|
+
if (tag !== 18) {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
message.routeId = reader.string();
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
case 3: {
|
|
81
|
+
if (tag !== 24) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
message.oldEdition = reader.uint32();
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
case 4: {
|
|
88
|
+
if (tag !== 32) {
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
message.newEdition = reader.uint32();
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
case 5: {
|
|
95
|
+
if (tag !== 42) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
message.at = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
case 6: {
|
|
102
|
+
if (tag !== 50) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
message.authorId = reader.string();
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
case 7: {
|
|
109
|
+
if (tag !== 58) {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
message.authorSite = reader.string();
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
case 8: {
|
|
116
|
+
if (tag !== 66) {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
message.reason = reader.string();
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
case 9: {
|
|
123
|
+
if (tag !== 74) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
message.changeSummary = reader.string();
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
reader.skip(tag & 7);
|
|
134
|
+
}
|
|
135
|
+
return message;
|
|
136
|
+
},
|
|
137
|
+
fromJSON(object) {
|
|
138
|
+
return {
|
|
139
|
+
$type: exports.RouteChangeEvent.$type,
|
|
140
|
+
changeId: isSet(object.changeId) ? globalThis.String(object.changeId) : "",
|
|
141
|
+
routeId: isSet(object.routeId) ? globalThis.String(object.routeId) : "",
|
|
142
|
+
oldEdition: isSet(object.oldEdition) ? globalThis.Number(object.oldEdition) : 0,
|
|
143
|
+
newEdition: isSet(object.newEdition) ? globalThis.Number(object.newEdition) : 0,
|
|
144
|
+
at: isSet(object.at) ? fromJsonTimestamp(object.at) : undefined,
|
|
145
|
+
authorId: isSet(object.authorId) ? globalThis.String(object.authorId) : "",
|
|
146
|
+
authorSite: isSet(object.authorSite) ? globalThis.String(object.authorSite) : "",
|
|
147
|
+
reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
|
|
148
|
+
changeSummary: isSet(object.changeSummary) ? globalThis.String(object.changeSummary) : "",
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
toJSON(message) {
|
|
152
|
+
const obj = {};
|
|
153
|
+
if (message.changeId !== "") {
|
|
154
|
+
obj.changeId = message.changeId;
|
|
155
|
+
}
|
|
156
|
+
if (message.routeId !== "") {
|
|
157
|
+
obj.routeId = message.routeId;
|
|
158
|
+
}
|
|
159
|
+
if (message.oldEdition !== 0) {
|
|
160
|
+
obj.oldEdition = Math.round(message.oldEdition);
|
|
161
|
+
}
|
|
162
|
+
if (message.newEdition !== 0) {
|
|
163
|
+
obj.newEdition = Math.round(message.newEdition);
|
|
164
|
+
}
|
|
165
|
+
if (message.at !== undefined) {
|
|
166
|
+
obj.at = message.at.toISOString();
|
|
167
|
+
}
|
|
168
|
+
if (message.authorId !== "") {
|
|
169
|
+
obj.authorId = message.authorId;
|
|
170
|
+
}
|
|
171
|
+
if (message.authorSite !== "") {
|
|
172
|
+
obj.authorSite = message.authorSite;
|
|
173
|
+
}
|
|
174
|
+
if (message.reason !== "") {
|
|
175
|
+
obj.reason = message.reason;
|
|
176
|
+
}
|
|
177
|
+
if (message.changeSummary !== "") {
|
|
178
|
+
obj.changeSummary = message.changeSummary;
|
|
179
|
+
}
|
|
180
|
+
return obj;
|
|
181
|
+
},
|
|
182
|
+
create(base) {
|
|
183
|
+
return exports.RouteChangeEvent.fromPartial(base ?? {});
|
|
184
|
+
},
|
|
185
|
+
fromPartial(object) {
|
|
186
|
+
const message = createBaseRouteChangeEvent();
|
|
187
|
+
message.changeId = object.changeId ?? "";
|
|
188
|
+
message.routeId = object.routeId ?? "";
|
|
189
|
+
message.oldEdition = object.oldEdition ?? 0;
|
|
190
|
+
message.newEdition = object.newEdition ?? 0;
|
|
191
|
+
message.at = object.at ?? undefined;
|
|
192
|
+
message.authorId = object.authorId ?? "";
|
|
193
|
+
message.authorSite = object.authorSite ?? "";
|
|
194
|
+
message.reason = object.reason ?? "";
|
|
195
|
+
message.changeSummary = object.changeSummary ?? "";
|
|
196
|
+
return message;
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
typeRegistry_1.messageTypeRegistry.set(exports.RouteChangeEvent.$type, exports.RouteChangeEvent);
|
|
200
|
+
function toTimestamp(date) {
|
|
201
|
+
const seconds = Math.trunc(date.getTime() / 1000);
|
|
202
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
203
|
+
return { $type: "google.protobuf.Timestamp", seconds, nanos };
|
|
204
|
+
}
|
|
205
|
+
function fromTimestamp(t) {
|
|
206
|
+
let millis = (t.seconds || 0) * 1000;
|
|
207
|
+
millis += (t.nanos || 0) / 1000000;
|
|
208
|
+
return new globalThis.Date(millis);
|
|
209
|
+
}
|
|
210
|
+
function fromJsonTimestamp(o) {
|
|
211
|
+
if (o instanceof globalThis.Date) {
|
|
212
|
+
return o;
|
|
213
|
+
}
|
|
214
|
+
else if (typeof o === "string") {
|
|
215
|
+
return new globalThis.Date(o);
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
function isSet(value) {
|
|
222
|
+
return value !== null && value !== undefined;
|
|
223
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export interface RouteEditAuthority {
|
|
3
|
+
$type: "keelson.RouteEditAuthority";
|
|
4
|
+
/** The route whose edit lock this message refers to. */
|
|
5
|
+
routeId: string;
|
|
6
|
+
/** Identity of the controlling operator+site, e.g. "ted@vessel-bridge". */
|
|
7
|
+
controllerId: string;
|
|
8
|
+
/** Free-form site label ("ROC-1", "vessel-bridge"). */
|
|
9
|
+
controllerSite: string;
|
|
10
|
+
/**
|
|
11
|
+
* Random token (16 random bytes, hex-encoded). Subscribers use the token
|
|
12
|
+
* to filter out their own publications and to validate that a release
|
|
13
|
+
* message originates from the current holder.
|
|
14
|
+
*/
|
|
15
|
+
token: string;
|
|
16
|
+
/**
|
|
17
|
+
* Lease window, IN THE HOLDER'S CLOCK.
|
|
18
|
+
*
|
|
19
|
+
* These are the holder's own view of its lease and are for display, logging
|
|
20
|
+
* and diagnostics. A receiver MUST NOT decide expiry by comparing expires_at
|
|
21
|
+
* against its own clock — see lease_ttl_seconds below and protocol
|
|
22
|
+
* specification §6.5.1.
|
|
23
|
+
*/
|
|
24
|
+
grantedAt: Date | undefined;
|
|
25
|
+
expiresAt: Date | undefined;
|
|
26
|
+
lastHeartbeat: Date | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* THE LEASE CONTRACT. This is what receivers arm on.
|
|
29
|
+
*
|
|
30
|
+
* On every accepted message a receiver sets its own deadline at
|
|
31
|
+
* (local time of receipt + lease_ttl_seconds) and expires the lease when its
|
|
32
|
+
* own clock passes it. A duration is the only lease quantity that survives
|
|
33
|
+
* the two sites disagreeing about what time it is: a receiver running five
|
|
34
|
+
* seconds fast would, comparing expires_at, expire a live lease early and
|
|
35
|
+
* hand it to a second editor while the first still believes it holds it —
|
|
36
|
+
* with both sites behaving correctly by their own reading.
|
|
37
|
+
*
|
|
38
|
+
* Network delay pushes the receiver's deadline later, never earlier, so the
|
|
39
|
+
* rule fails in the safe direction: late to release rather than early to
|
|
40
|
+
* steal.
|
|
41
|
+
*/
|
|
42
|
+
leaseTtlSeconds: number;
|
|
43
|
+
/** The holder's refresh cadence. Informational. */
|
|
44
|
+
heartbeatIntervalSeconds: number;
|
|
45
|
+
/**
|
|
46
|
+
* Set true on graceful release. A released=true message MUST carry the
|
|
47
|
+
* same token as the most recent grant for the receiver to accept it.
|
|
48
|
+
*/
|
|
49
|
+
released: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface RouteEditRequest {
|
|
52
|
+
$type: "keelson.RouteEditRequest";
|
|
53
|
+
routeId: string;
|
|
54
|
+
/** Identity of the would-be editor. */
|
|
55
|
+
requesterId: string;
|
|
56
|
+
requesterSite: string;
|
|
57
|
+
requestedAt: Date | undefined;
|
|
58
|
+
/** Human-readable reason ("planning update", "weather reroute", ...). */
|
|
59
|
+
reason: string;
|
|
60
|
+
/**
|
|
61
|
+
* If true and accepted, an override is recorded in the route change log
|
|
62
|
+
* regardless of whether an edit follows.
|
|
63
|
+
*/
|
|
64
|
+
force: boolean;
|
|
65
|
+
}
|
|
66
|
+
export declare const RouteEditAuthority: MessageFns<RouteEditAuthority, "keelson.RouteEditAuthority">;
|
|
67
|
+
export declare const RouteEditRequest: MessageFns<RouteEditRequest, "keelson.RouteEditRequest">;
|
|
68
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
69
|
+
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 {} ? {
|
|
70
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
71
|
+
} : Partial<T>;
|
|
72
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
73
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
74
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
75
|
+
} & {
|
|
76
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
77
|
+
};
|
|
78
|
+
interface MessageFns<T, V extends string> {
|
|
79
|
+
readonly $type: V;
|
|
80
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
81
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
82
|
+
fromJSON(object: any): T;
|
|
83
|
+
toJSON(message: T): unknown;
|
|
84
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
85
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
86
|
+
}
|
|
87
|
+
export {};
|