@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
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { Coordinate } from "./Coordinate";
|
|
3
|
+
import { SeverityLevel } from "./Severity";
|
|
4
|
+
import { GeoJSON } from "./foxglove/GeoJSON";
|
|
5
|
+
import { LocationFix } from "./foxglove/LocationFix";
|
|
6
|
+
import { Any } from "./google/protobuf/any";
|
|
7
|
+
import { Duration } from "./google/protobuf/duration";
|
|
8
|
+
/** Autonomy level the route is authored for. */
|
|
9
|
+
export declare enum AutonomyLevel {
|
|
10
|
+
AUTONOMY_LEVEL_UNSPECIFIED = 0,
|
|
11
|
+
AUTONOMY_LEVEL_MANUAL_ONLY = 1,
|
|
12
|
+
AUTONOMY_LEVEL_REMOTE_CONTROLLED = 2,
|
|
13
|
+
AUTONOMY_LEVEL_AUTONOMOUS_SUPERVISED = 3,
|
|
14
|
+
AUTONOMY_LEVEL_AUTONOMOUS_UNSUPERVISED = 4,
|
|
15
|
+
UNRECOGNIZED = -1
|
|
16
|
+
}
|
|
17
|
+
export declare function autonomyLevelFromJSON(object: any): AutonomyLevel;
|
|
18
|
+
export declare function autonomyLevelToJSON(object: AutonomyLevel): string;
|
|
19
|
+
/** Operational context for a leg or waypoint. */
|
|
20
|
+
export declare enum OperationalContext {
|
|
21
|
+
OPERATIONAL_CONTEXT_UNSPECIFIED = 0,
|
|
22
|
+
OPERATIONAL_CONTEXT_OPEN_SEA = 1,
|
|
23
|
+
OPERATIONAL_CONTEXT_COASTAL = 2,
|
|
24
|
+
OPERATIONAL_CONTEXT_ARCHIPELAGO = 3,
|
|
25
|
+
OPERATIONAL_CONTEXT_PORT_APPROACH = 4,
|
|
26
|
+
OPERATIONAL_CONTEXT_PORT_AREA = 5,
|
|
27
|
+
OPERATIONAL_CONTEXT_RIVER_WATERS = 6,
|
|
28
|
+
OPERATIONAL_CONTEXT_LOCK = 7,
|
|
29
|
+
UNRECOGNIZED = -1
|
|
30
|
+
}
|
|
31
|
+
export declare function operationalContextFromJSON(object: any): OperationalContext;
|
|
32
|
+
export declare function operationalContextToJSON(object: OperationalContext): string;
|
|
33
|
+
/** Categorisation of route challenges (used in structured risk). */
|
|
34
|
+
export declare enum RouteChallengeType {
|
|
35
|
+
ROUTE_CHALLENGE_TYPE_UNSPECIFIED = 0,
|
|
36
|
+
ROUTE_CHALLENGE_TYPE_SHALLOW_WATER = 1,
|
|
37
|
+
ROUTE_CHALLENGE_TYPE_TRAFFIC_DENSITY = 2,
|
|
38
|
+
ROUTE_CHALLENGE_TYPE_WEATHER_HAZARD = 3,
|
|
39
|
+
ROUTE_CHALLENGE_TYPE_PIRACY_SECURITY = 4,
|
|
40
|
+
ROUTE_CHALLENGE_TYPE_REGULATORY_LIMIT = 5,
|
|
41
|
+
ROUTE_CHALLENGE_TYPE_TECHNICAL_LIMIT = 6,
|
|
42
|
+
ROUTE_CHALLENGE_TYPE_OTHER = 7,
|
|
43
|
+
UNRECOGNIZED = -1
|
|
44
|
+
}
|
|
45
|
+
export declare function routeChallengeTypeFromJSON(object: any): RouteChallengeType;
|
|
46
|
+
export declare function routeChallengeTypeToJSON(object: RouteChallengeType): string;
|
|
47
|
+
/** Hazard zone classification. */
|
|
48
|
+
export declare enum HazardZoneType {
|
|
49
|
+
HAZARD_ZONE_TYPE_UNSPECIFIED = 0,
|
|
50
|
+
HAZARD_ZONE_TYPE_STATIC_NOGO = 1,
|
|
51
|
+
HAZARD_ZONE_TYPE_DYNAMIC_NOGO = 2,
|
|
52
|
+
HAZARD_ZONE_TYPE_TRAFFIC = 3,
|
|
53
|
+
HAZARD_ZONE_TYPE_WEATHER = 4,
|
|
54
|
+
HAZARD_ZONE_TYPE_ENVIRONMENTAL = 5,
|
|
55
|
+
UNRECOGNIZED = -1
|
|
56
|
+
}
|
|
57
|
+
export declare function hazardZoneTypeFromJSON(object: any): HazardZoneType;
|
|
58
|
+
export declare function hazardZoneTypeToJSON(object: HazardZoneType): string;
|
|
59
|
+
/** COLREG encounter situation for an annotated leg. */
|
|
60
|
+
export declare enum ColregSituation {
|
|
61
|
+
COLREG_SITUATION_UNSPECIFIED = 0,
|
|
62
|
+
COLREG_SITUATION_OVERTAKING = 1,
|
|
63
|
+
COLREG_SITUATION_CROSSING_STBD = 2,
|
|
64
|
+
COLREG_SITUATION_CROSSING_PORT = 3,
|
|
65
|
+
COLREG_SITUATION_HEAD_ON = 4,
|
|
66
|
+
UNRECOGNIZED = -1
|
|
67
|
+
}
|
|
68
|
+
export declare function colregSituationFromJSON(object: any): ColregSituation;
|
|
69
|
+
export declare function colregSituationToJSON(object: ColregSituation): string;
|
|
70
|
+
/** Annotated traffic intensity for a leg. */
|
|
71
|
+
export declare enum ColregTrafficIntensity {
|
|
72
|
+
COLREG_TRAFFIC_INTENSITY_UNSPECIFIED = 0,
|
|
73
|
+
COLREG_TRAFFIC_INTENSITY_NONE = 1,
|
|
74
|
+
COLREG_TRAFFIC_INTENSITY_LIGHT = 2,
|
|
75
|
+
COLREG_TRAFFIC_INTENSITY_MODERATE = 3,
|
|
76
|
+
COLREG_TRAFFIC_INTENSITY_HEAVY = 4,
|
|
77
|
+
UNRECOGNIZED = -1
|
|
78
|
+
}
|
|
79
|
+
export declare function colregTrafficIntensityFromJSON(object: any): ColregTrafficIntensity;
|
|
80
|
+
export declare function colregTrafficIntensityToJSON(object: ColregTrafficIntensity): string;
|
|
81
|
+
/** Geometry type for a leg between waypoints. */
|
|
82
|
+
export declare enum GeometryType {
|
|
83
|
+
GEOMETRY_TYPE_UNSPECIFIED = 0,
|
|
84
|
+
GEOMETRY_TYPE_LOXODROME = 1,
|
|
85
|
+
GEOMETRY_TYPE_ORTHODROME = 2,
|
|
86
|
+
UNRECOGNIZED = -1
|
|
87
|
+
}
|
|
88
|
+
export declare function geometryTypeFromJSON(object: any): GeometryType;
|
|
89
|
+
export declare function geometryTypeToJSON(object: GeometryType): string;
|
|
90
|
+
/**
|
|
91
|
+
* Lifecycle status for the route artifact (authoring + quality).
|
|
92
|
+
* Execution-side state (vessel sailing, paused, completed) lives on
|
|
93
|
+
* keelson.VoyageStatus and is intentionally NOT duplicated here.
|
|
94
|
+
*/
|
|
95
|
+
export declare enum RouteStatus {
|
|
96
|
+
ROUTE_STATUS_UNSPECIFIED = 0,
|
|
97
|
+
ROUTE_STATUS_INITIAL = 1,
|
|
98
|
+
ROUTE_STATUS_PLANNED = 2,
|
|
99
|
+
ROUTE_STATUS_RECOMMENDED = 3,
|
|
100
|
+
ROUTE_STATUS_ACKNOWLEDGED = 4,
|
|
101
|
+
/** ROUTE_STATUS_TERMINATED - Route artifact retired / superseded. */
|
|
102
|
+
ROUTE_STATUS_TERMINATED = 6,
|
|
103
|
+
ROUTE_STATUS_ERRORS = 7,
|
|
104
|
+
ROUTE_STATUS_INCOMPLETE = 8,
|
|
105
|
+
ROUTE_STATUS_ROUTE_ISSUES = 9,
|
|
106
|
+
UNRECOGNIZED = -1
|
|
107
|
+
}
|
|
108
|
+
export declare function routeStatusFromJSON(object: any): RouteStatus;
|
|
109
|
+
export declare function routeStatusToJSON(object: RouteStatus): string;
|
|
110
|
+
/** Required action for an ActionPoint. */
|
|
111
|
+
export declare enum ActionPointRequiredAction {
|
|
112
|
+
ACTION_POINT_REQUIRED_ACTION_UNSPECIFIED = 0,
|
|
113
|
+
ACTION_POINT_REQUIRED_ACTION_USER_DEFINED = 1,
|
|
114
|
+
ACTION_POINT_REQUIRED_ACTION_REPORT = 2,
|
|
115
|
+
/** ACTION_POINT_REQUIRED_ACTION_UKCM - Under-keel clearance monitoring */
|
|
116
|
+
ACTION_POINT_REQUIRED_ACTION_UKCM = 3,
|
|
117
|
+
ACTION_POINT_REQUIRED_ACTION_NOTE = 4,
|
|
118
|
+
ACTION_POINT_REQUIRED_ACTION_PILOT_BOARDING = 5,
|
|
119
|
+
ACTION_POINT_REQUIRED_ACTION_FUEL_SWITCH = 6,
|
|
120
|
+
ACTION_POINT_REQUIRED_ACTION_MODE_SWITCH = 7,
|
|
121
|
+
ACTION_POINT_REQUIRED_ACTION_INCREASE_LOOKOUT = 8,
|
|
122
|
+
UNRECOGNIZED = -1
|
|
123
|
+
}
|
|
124
|
+
export declare function actionPointRequiredActionFromJSON(object: any): ActionPointRequiredAction;
|
|
125
|
+
export declare function actionPointRequiredActionToJSON(object: ActionPointRequiredAction): string;
|
|
126
|
+
/**
|
|
127
|
+
* A reference to one specific edition of a route.
|
|
128
|
+
*
|
|
129
|
+
* A bare route_id names a LINEAGE, not a document: editions exist precisely so
|
|
130
|
+
* that routes change, so "the route with id X" is ambiguous the moment anyone
|
|
131
|
+
* bumps it. Anything that pins a route — a voyage, an execution sample — must
|
|
132
|
+
* say which edition it pinned, and carrying the pair as a type rather than as
|
|
133
|
+
* two loose fields is what stops the two drifting apart in a message that only
|
|
134
|
+
* remembered to update one of them.
|
|
135
|
+
*
|
|
136
|
+
* Resolution is defined in the protocol specification §6.3: the pair addresses
|
|
137
|
+
* `pubsub/route/{route_id}/edition/{route_edition_number}`. A reference whose
|
|
138
|
+
* edition cannot be resolved is dangling and must be surfaced, never silently
|
|
139
|
+
* resolved to `latest`.
|
|
140
|
+
*/
|
|
141
|
+
export interface RouteRef {
|
|
142
|
+
$type: "keelson.RouteRef";
|
|
143
|
+
routeId: string;
|
|
144
|
+
routeEditionNumber: number;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A circle: centre plus radius, in metres.
|
|
148
|
+
*
|
|
149
|
+
* Exists so that geometry can be a `oneof`. Modelled as parallel fields, a
|
|
150
|
+
* centre with no radius, a radius with no centre, and a circle that also
|
|
151
|
+
* carries a polygon are all representable — and a consumer meeting one has no
|
|
152
|
+
* rule for which to believe. Binding the two into a single message makes the
|
|
153
|
+
* incomplete states unrepresentable rather than merely discouraged.
|
|
154
|
+
*/
|
|
155
|
+
export interface CircleGeometry {
|
|
156
|
+
$type: "keelson.CircleGeometry";
|
|
157
|
+
centre: LocationFix | undefined;
|
|
158
|
+
radiusM: number;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Vendor- or model-specific data attached to any container. Each entry is
|
|
162
|
+
* scoped by manufacturer + name + version so multiple vendors can coexist on
|
|
163
|
+
* the same route without colliding.
|
|
164
|
+
*
|
|
165
|
+
* NOTE: the per-entry `payload` is a google.protobuf.Any — a deliberate,
|
|
166
|
+
* reviewed exception to the "no opaque escape hatch" guidance (#154), and the
|
|
167
|
+
* ONLY one left in this family (RouteChangeEvent.diff was the other; it was
|
|
168
|
+
* removed rather than granted the same exception, because it was convenience
|
|
169
|
+
* rather than a requirement of the interchange format). It is the
|
|
170
|
+
* vendor-extension mechanism for this RTZ 1.2 / S-421 standards-exchange
|
|
171
|
+
* format, which has to be able to carry data keelson does not model.
|
|
172
|
+
*
|
|
173
|
+
* The exception comes with two obligations, both load-bearing:
|
|
174
|
+
*
|
|
175
|
+
* 1. Producers SHOULD prefer the typed `attributes` map for simple key/values
|
|
176
|
+
* and reserve Any for genuinely vendor-specific structured payloads.
|
|
177
|
+
* 2. A consumer that cannot resolve an entry's `type_url` MUST pass the entry
|
|
178
|
+
* through unchanged rather than drop it. Extensions are the one part of a
|
|
179
|
+
* Route that is opaque by design, so the only way a round-trip through a
|
|
180
|
+
* keelson consumer can be lossless is if unknown entries survive it. An
|
|
181
|
+
* editor that re-publishes a route it does not fully understand and
|
|
182
|
+
* silently discards another vendor's extension has corrupted the artifact.
|
|
183
|
+
*/
|
|
184
|
+
export interface Extensions {
|
|
185
|
+
$type: "keelson.Extensions";
|
|
186
|
+
entries: Extensions_Entry[];
|
|
187
|
+
}
|
|
188
|
+
export interface Extensions_Entry {
|
|
189
|
+
$type: "keelson.Extensions.Entry";
|
|
190
|
+
/** Reverse-DNS or short vendor identifier (e.g. "se.rise", "kongsberg"). */
|
|
191
|
+
manufacturer: string;
|
|
192
|
+
/** Vendor-scoped extension name. */
|
|
193
|
+
name: string;
|
|
194
|
+
/** Extension version (semver or vendor-defined). */
|
|
195
|
+
version: string;
|
|
196
|
+
/** Strongly-typed payload. */
|
|
197
|
+
payload: Any | undefined;
|
|
198
|
+
/** Lightweight key/value attributes that don't justify a typed payload. */
|
|
199
|
+
attributes: {
|
|
200
|
+
[key: string]: string;
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
export interface Extensions_Entry_AttributesEntry {
|
|
204
|
+
$type: "keelson.Extensions.Entry.AttributesEntry";
|
|
205
|
+
key: string;
|
|
206
|
+
value: string;
|
|
207
|
+
}
|
|
208
|
+
export interface Route {
|
|
209
|
+
$type: "keelson.Route";
|
|
210
|
+
/** Schema version this Route conforms to. */
|
|
211
|
+
version: string;
|
|
212
|
+
/** Globally unique route identifier (UUID recommended). */
|
|
213
|
+
routeId: string;
|
|
214
|
+
/** Monotonically increasing edition number; bumped on any edit. */
|
|
215
|
+
routeEditionNumber: number;
|
|
216
|
+
/**
|
|
217
|
+
* RTZ / S-421 format version this Route is compatible with
|
|
218
|
+
* (e.g. "RTZ-1.2", "S-421-FC1.0").
|
|
219
|
+
*/
|
|
220
|
+
routeFormatVersion: string;
|
|
221
|
+
/** Lifecycle status. */
|
|
222
|
+
status: RouteStatus;
|
|
223
|
+
/** Time the route was created and last modified. */
|
|
224
|
+
createdAt: Date | undefined;
|
|
225
|
+
modifiedAt: Date | undefined;
|
|
226
|
+
info: RouteInfo | undefined;
|
|
227
|
+
waypoints: Waypoints | undefined;
|
|
228
|
+
schedules: Schedules | undefined;
|
|
229
|
+
actionPoints: ActionPoints | undefined;
|
|
230
|
+
/** Dynamic hazards / no-go areas valid for this route. */
|
|
231
|
+
hazardZones: HazardZone[];
|
|
232
|
+
/** Structured challenges / risks identified during planning. */
|
|
233
|
+
challenges: RouteChallenge[];
|
|
234
|
+
/** Free-form notes or issues against the route as a whole. */
|
|
235
|
+
issues: RouteIssue[];
|
|
236
|
+
extensions: Extensions | undefined;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Route artifact metadata. Vessel identity, port codes, planned dep/arr times,
|
|
240
|
+
* and voyage_id intentionally live on keelson.Voyage instead of here, so a
|
|
241
|
+
* Route can be authored once and executed by multiple voyages.
|
|
242
|
+
*/
|
|
243
|
+
export interface RouteInfo {
|
|
244
|
+
$type: "keelson.RouteInfo";
|
|
245
|
+
/** Human-readable route name. */
|
|
246
|
+
name: string;
|
|
247
|
+
/** Author of the route (planner / system name). */
|
|
248
|
+
author: string;
|
|
249
|
+
/** Organisation owning the route. */
|
|
250
|
+
authorOrganization: string;
|
|
251
|
+
/** Validity window for this route (e.g. tidal window, weather window). */
|
|
252
|
+
validFrom: Date | undefined;
|
|
253
|
+
validTo: Date | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* -- Vessel-class plan constraints ------------------------------------------
|
|
256
|
+
* Dimensions the route was authored against. These are constraints, not
|
|
257
|
+
* identity — the vessel actually executing the voyage may differ within
|
|
258
|
+
* these bounds. Vessel identity lives on keelson.Voyage.
|
|
259
|
+
* `optional` throughout: a plan authored without a beam constraint is not a
|
|
260
|
+
* plan for a vessel of zero beam. Proto3 implicit presence cannot tell the
|
|
261
|
+
* two apart, and 0.0 is the more dangerous reading of the pair.
|
|
262
|
+
*/
|
|
263
|
+
vesselLoaM?: number | undefined;
|
|
264
|
+
/** Maximum beam */
|
|
265
|
+
vesselBeamM?: number | undefined;
|
|
266
|
+
/** Maximum draft the route was planned for */
|
|
267
|
+
vesselDraftM?: number | undefined;
|
|
268
|
+
/** Maximum height above waterline */
|
|
269
|
+
vesselAirDraftM?: number | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* -- Operational limits -----------------------------------------------------
|
|
272
|
+
* Limits the route is valid under. Use `optional` so a zero value means
|
|
273
|
+
* "no limit applies" only when the field is set; an unset field means the
|
|
274
|
+
* limit is unknown / not specified.
|
|
275
|
+
*/
|
|
276
|
+
maxRollDeg?: number | undefined;
|
|
277
|
+
maxWaveHeightM?: number | undefined;
|
|
278
|
+
maxWindSpeedMps?: number | undefined;
|
|
279
|
+
minSpeedKnots?: number | undefined;
|
|
280
|
+
maxSpeedKnots?: number | undefined;
|
|
281
|
+
/**
|
|
282
|
+
* -- Optimization & autonomy ------------------------------------------------
|
|
283
|
+
* Free-form optimization method label (e.g. "fuel-min", "eta-min", "weather-routed").
|
|
284
|
+
*/
|
|
285
|
+
optimizationMethod: string;
|
|
286
|
+
/** Target autonomy level this route is authored for. */
|
|
287
|
+
autonomyLevel: AutonomyLevel;
|
|
288
|
+
extensions: Extensions | undefined;
|
|
289
|
+
}
|
|
290
|
+
export interface Waypoints {
|
|
291
|
+
$type: "keelson.Waypoints";
|
|
292
|
+
/** Default values applied to any waypoint or leg that doesn't override them. */
|
|
293
|
+
defaults: DefaultWaypoint | undefined;
|
|
294
|
+
/** Ordered list of waypoints, in route order. */
|
|
295
|
+
waypoint: Waypoint[];
|
|
296
|
+
extensions: Extensions | undefined;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Default values for waypoint/leg fields. RTZ-aligned.
|
|
300
|
+
*
|
|
301
|
+
* The scalars are `optional` for the same reason as their `Waypoint`
|
|
302
|
+
* counterparts, one level up: without presence there is no way to say "this
|
|
303
|
+
* route sets no default speed" as distinct from "this route defaults to
|
|
304
|
+
* zero", and a consumer merging defaults into a waypoint cannot tell which
|
|
305
|
+
* it was handed.
|
|
306
|
+
*/
|
|
307
|
+
export interface DefaultWaypoint {
|
|
308
|
+
$type: "keelson.DefaultWaypoint";
|
|
309
|
+
leg: Leg | undefined;
|
|
310
|
+
radiusM?: number | undefined;
|
|
311
|
+
plannedSogKnots?: number | undefined;
|
|
312
|
+
}
|
|
313
|
+
export interface Waypoint {
|
|
314
|
+
$type: "keelson.Waypoint";
|
|
315
|
+
/**
|
|
316
|
+
* Stable waypoint identifier. §6.2 rests its whole addressing rule on this
|
|
317
|
+
* field: array indices mean a different waypoint after an edit, so anything
|
|
318
|
+
* referring to a waypoint MUST carry the id.
|
|
319
|
+
*
|
|
320
|
+
* `string`, matching every other id in this family (Schedule, ActionPoint,
|
|
321
|
+
* HazardZone, RouteChallenge, RouteIssue). The trade-off is RTZ 1.2, where
|
|
322
|
+
* waypoint ids are integers: an importer stringifies and an exporter must
|
|
323
|
+
* parse back, and a non-numeric id is expressible here but not
|
|
324
|
+
* RTZ-exportable. Chosen deliberately — one id type across the family beats
|
|
325
|
+
* fidelity to a format keelson only interoperates with at the edges.
|
|
326
|
+
*/
|
|
327
|
+
id: string;
|
|
328
|
+
/** Revision counter for this specific waypoint. */
|
|
329
|
+
revision: number;
|
|
330
|
+
/** Human-readable name (e.g. "WP-007 East of Hanö"). */
|
|
331
|
+
name: string;
|
|
332
|
+
/**
|
|
333
|
+
* WGS-84 position. `Coordinate`, not `LocationFix`: a planned waypoint is
|
|
334
|
+
* a referent, not a measurement, and has no use for a covariance matrix or
|
|
335
|
+
* fix quality. See protocol-specification.md §2.2.1 and §6.8.
|
|
336
|
+
*/
|
|
337
|
+
position: Coordinate | undefined;
|
|
338
|
+
/**
|
|
339
|
+
* Planned speed over ground when leaving this waypoint. `optional` because
|
|
340
|
+
* `Waypoints.defaults` backs this field: without presence, "no override,
|
|
341
|
+
* use the default" and "hold zero speed here" are the same bytes, and 0.0
|
|
342
|
+
* is the more dangerous reading of the pair.
|
|
343
|
+
*/
|
|
344
|
+
plannedSogKnots?: number | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* Turn radius for fly-by, in metres. `optional` for the same reason —
|
|
347
|
+
* `DefaultWaypoint.radius_m` is the fallback when this is unset.
|
|
348
|
+
*/
|
|
349
|
+
radiusM?: number | undefined;
|
|
350
|
+
/**
|
|
351
|
+
* Maximum rate of turn during the turn, degrees per second. Not backed by
|
|
352
|
+
* `defaults`, but 0 is still not a rate anyone means to command.
|
|
353
|
+
*/
|
|
354
|
+
rateOfTurnDegps?: number | undefined;
|
|
355
|
+
/** Distance before the turn at which wheel-over should be ordered, metres. */
|
|
356
|
+
wheelOverDistanceM?: number | undefined;
|
|
357
|
+
/**
|
|
358
|
+
* If true, the waypoint is locked and may not be edited by autonomous
|
|
359
|
+
* re-routing.
|
|
360
|
+
*/
|
|
361
|
+
lock: boolean;
|
|
362
|
+
/** Operational context for this waypoint (open sea, port approach, lock, ...). */
|
|
363
|
+
operationalContext: OperationalContext;
|
|
364
|
+
/** Outgoing leg from this waypoint to the next. The last waypoint has none. */
|
|
365
|
+
leg: Leg | undefined;
|
|
366
|
+
/** Free-form notes attached to this waypoint. */
|
|
367
|
+
note: string;
|
|
368
|
+
extensions: Extensions | undefined;
|
|
369
|
+
}
|
|
370
|
+
export interface Leg {
|
|
371
|
+
$type: "keelson.Leg";
|
|
372
|
+
/**
|
|
373
|
+
* Cross-track distance (XTD) limits and monitoring thresholds, in metres.
|
|
374
|
+
* `optional` so producers can distinguish "no XTD limit" (unset) from
|
|
375
|
+
* "zero XTD limit" (set to 0).
|
|
376
|
+
*/
|
|
377
|
+
xtdPortM?: number | undefined;
|
|
378
|
+
xtdStarboardM?: number | undefined;
|
|
379
|
+
xtdMonitoringPortM?: number | undefined;
|
|
380
|
+
xtdMonitoringStarboardM?: number | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* Safety contour (depth in metres below chart datum) below which the route
|
|
383
|
+
* is considered unsafe.
|
|
384
|
+
*/
|
|
385
|
+
safetyContourM?: number | undefined;
|
|
386
|
+
/** Minimum allowed depth on this leg, in metres. */
|
|
387
|
+
safetyDepthM?: number | undefined;
|
|
388
|
+
/** Static under-keel clearance, in metres. */
|
|
389
|
+
ukcStaticM?: number | undefined;
|
|
390
|
+
/** Dynamic under-keel clearance margin, in metres. */
|
|
391
|
+
ukcDynamicM?: number | undefined;
|
|
392
|
+
/**
|
|
393
|
+
* Planned draughts for this leg. `optional` for the same reason as the UKC
|
|
394
|
+
* margins above: a leg with no planned draught is not a leg planned for zero
|
|
395
|
+
* draught, and under-keel arithmetic is the last place to guess.
|
|
396
|
+
*/
|
|
397
|
+
draughtBowM?: number | undefined;
|
|
398
|
+
draughtSternM?: number | undefined;
|
|
399
|
+
draughtMeanM?: number | undefined;
|
|
400
|
+
/** Geometry type along this leg. */
|
|
401
|
+
geometryType: GeometryType;
|
|
402
|
+
/**
|
|
403
|
+
* Speed envelope — Speed Over Ground (knots). `optional` so an open-ended
|
|
404
|
+
* envelope is expressible: unset minimum means "no lower bound", which is
|
|
405
|
+
* distinct from a commanded minimum of 0 kn (i.e. stop permitted).
|
|
406
|
+
*/
|
|
407
|
+
sogMinKnots?: number | undefined;
|
|
408
|
+
sogMaxKnots?: number | undefined;
|
|
409
|
+
/** Speed envelope — Speed Through Water (knots). Same reading as above. */
|
|
410
|
+
stwMinKnots?: number | undefined;
|
|
411
|
+
stwMaxKnots?: number | undefined;
|
|
412
|
+
/**
|
|
413
|
+
* Dimensional limits for the leg (e.g. bridge clearances, lock dimensions).
|
|
414
|
+
* `optional` so unset means "no limit specified".
|
|
415
|
+
*/
|
|
416
|
+
draughtMaxM?: number | undefined;
|
|
417
|
+
airDraftMaxM?: number | undefined;
|
|
418
|
+
beamMaxM?: number | undefined;
|
|
419
|
+
lengthMaxM?: number | undefined;
|
|
420
|
+
/** Free-text reporting / handover text for this leg. */
|
|
421
|
+
report: string;
|
|
422
|
+
/** Free-form notes. */
|
|
423
|
+
note: string;
|
|
424
|
+
/** COLREG annotations. */
|
|
425
|
+
colregSituation: ColregSituation;
|
|
426
|
+
colregTrafficIntensity: ColregTrafficIntensity;
|
|
427
|
+
extensions: Extensions | undefined;
|
|
428
|
+
}
|
|
429
|
+
export interface Schedules {
|
|
430
|
+
$type: "keelson.Schedules";
|
|
431
|
+
/** Multiple schedules can coexist (e.g. "manual", "weather-optimized"). */
|
|
432
|
+
schedule: Schedule[];
|
|
433
|
+
extensions: Extensions | undefined;
|
|
434
|
+
}
|
|
435
|
+
export interface Schedule {
|
|
436
|
+
$type: "keelson.Schedule";
|
|
437
|
+
/** Schedule identifier (unique within the route). */
|
|
438
|
+
id: string;
|
|
439
|
+
/** Free-text name. */
|
|
440
|
+
name: string;
|
|
441
|
+
origin: Schedule_Origin;
|
|
442
|
+
/** Ordered list of schedule entries, one per waypoint. */
|
|
443
|
+
element: ScheduleElement[];
|
|
444
|
+
extensions: Extensions | undefined;
|
|
445
|
+
}
|
|
446
|
+
/** Whether this schedule was authored manually or computed. */
|
|
447
|
+
export declare enum Schedule_Origin {
|
|
448
|
+
ORIGIN_UNSPECIFIED = 0,
|
|
449
|
+
ORIGIN_MANUAL = 1,
|
|
450
|
+
ORIGIN_CALCULATED = 2,
|
|
451
|
+
UNRECOGNIZED = -1
|
|
452
|
+
}
|
|
453
|
+
export declare function schedule_OriginFromJSON(object: any): Schedule_Origin;
|
|
454
|
+
export declare function schedule_OriginToJSON(object: Schedule_Origin): string;
|
|
455
|
+
export interface ScheduleElement {
|
|
456
|
+
$type: "keelson.ScheduleElement";
|
|
457
|
+
/** ID of the waypoint this entry refers to. */
|
|
458
|
+
waypointId: string;
|
|
459
|
+
/** Estimated time of arrival / departure with allowed windows. */
|
|
460
|
+
eta: Date | undefined;
|
|
461
|
+
etaWindowStart: Date | undefined;
|
|
462
|
+
etaWindowEnd: Date | undefined;
|
|
463
|
+
etd: Date | undefined;
|
|
464
|
+
etdWindowStart: Date | undefined;
|
|
465
|
+
etdWindowEnd: Date | undefined;
|
|
466
|
+
/** Planned duration of stay at this waypoint (port, anchorage, ...). */
|
|
467
|
+
stay: Duration | undefined;
|
|
468
|
+
/** -- Environmental forecast for this leg ------------------------------------ */
|
|
469
|
+
windSpeedMps: number;
|
|
470
|
+
windDirectionDeg: number;
|
|
471
|
+
currentSpeedMps: number;
|
|
472
|
+
currentDirectionDeg: number;
|
|
473
|
+
waveHeightM: number;
|
|
474
|
+
wavePeriodS: number;
|
|
475
|
+
waveDirectionDeg: number;
|
|
476
|
+
/** -- Energy / propulsion plan ---------------------------------------------- */
|
|
477
|
+
plannedRpm: number;
|
|
478
|
+
plannedPropellerPitchPct: number;
|
|
479
|
+
plannedFuelKg: number;
|
|
480
|
+
/** Fuel savings versus a reference plan, in kilograms (negative = increase). */
|
|
481
|
+
fuelSavingVsReferenceKg: number;
|
|
482
|
+
extensions: Extensions | undefined;
|
|
483
|
+
}
|
|
484
|
+
export interface ActionPoints {
|
|
485
|
+
$type: "keelson.ActionPoints";
|
|
486
|
+
actionPoint: ActionPoint[];
|
|
487
|
+
extensions: Extensions | undefined;
|
|
488
|
+
}
|
|
489
|
+
export interface ActionPoint {
|
|
490
|
+
$type: "keelson.ActionPoint";
|
|
491
|
+
/** Stable action-point identifier. */
|
|
492
|
+
id: string;
|
|
493
|
+
/** Human-readable name. */
|
|
494
|
+
name: string;
|
|
495
|
+
circle?: CircleGeometry | undefined;
|
|
496
|
+
areaGeojson?: GeoJSON | undefined;
|
|
497
|
+
/**
|
|
498
|
+
* Lead time before crossing the geometry at which the action should be
|
|
499
|
+
* triggered (e.g. 5 minutes before pilot boarding ground).
|
|
500
|
+
*/
|
|
501
|
+
timeToAct: Duration | undefined;
|
|
502
|
+
/** Required action. */
|
|
503
|
+
requiredAction: ActionPointRequiredAction;
|
|
504
|
+
/**
|
|
505
|
+
* Free-form action description (always required when required_action is
|
|
506
|
+
* USER_DEFINED; otherwise supplements the enum).
|
|
507
|
+
*/
|
|
508
|
+
description: string;
|
|
509
|
+
extensions: Extensions | undefined;
|
|
510
|
+
}
|
|
511
|
+
export interface HazardZone {
|
|
512
|
+
$type: "keelson.HazardZone";
|
|
513
|
+
/** Stable hazard identifier. */
|
|
514
|
+
id: string;
|
|
515
|
+
type: HazardZoneType;
|
|
516
|
+
/** Hazard severity. */
|
|
517
|
+
severity: SeverityLevel;
|
|
518
|
+
/** Free-text description. */
|
|
519
|
+
description: string;
|
|
520
|
+
circle?: CircleGeometry | undefined;
|
|
521
|
+
polygonGeojson?: GeoJSON | undefined;
|
|
522
|
+
/** Validity window for the hazard. */
|
|
523
|
+
validFrom: Date | undefined;
|
|
524
|
+
validTo: Date | undefined;
|
|
525
|
+
extensions: Extensions | undefined;
|
|
526
|
+
}
|
|
527
|
+
export interface RouteChallenge {
|
|
528
|
+
$type: "keelson.RouteChallenge";
|
|
529
|
+
id: string;
|
|
530
|
+
type: RouteChallengeType;
|
|
531
|
+
severity: SeverityLevel;
|
|
532
|
+
description: string;
|
|
533
|
+
/** Waypoint IDs the challenge applies to (empty = whole route). */
|
|
534
|
+
waypointIds: string[];
|
|
535
|
+
extensions: Extensions | undefined;
|
|
536
|
+
}
|
|
537
|
+
export interface RouteIssue {
|
|
538
|
+
$type: "keelson.RouteIssue";
|
|
539
|
+
id: string;
|
|
540
|
+
severity: SeverityLevel;
|
|
541
|
+
description: string;
|
|
542
|
+
raisedAt: Date | undefined;
|
|
543
|
+
raisedBy: string;
|
|
544
|
+
extensions: Extensions | undefined;
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* The signatures attesting to one specific route edition, published on the
|
|
548
|
+
* `route_signature` subject at
|
|
549
|
+
* route_signature/{route_id}/edition/{N}
|
|
550
|
+
* alongside the edition they attest to, never inside it.
|
|
551
|
+
*
|
|
552
|
+
* WHAT IS SIGNED — see protocol-specification.md §6.3.1 for the normative rule.
|
|
553
|
+
* The signing input is exactly the `Envelope.payload` bytes stored at
|
|
554
|
+
* `route/{route_id}/edition/{N}`: the serialized keelson.Route, byte for byte
|
|
555
|
+
* as the publisher wrote it. Verification is a `get` on that key followed by a
|
|
556
|
+
* signature check over the returned bytes verbatim — no re-serialization, no
|
|
557
|
+
* field reordering, no canonicalization step to disagree about.
|
|
558
|
+
*
|
|
559
|
+
* This works only because §6.3 makes an edition key immutable once written. An
|
|
560
|
+
* edition is not a mutable document that happens to have a version number; it
|
|
561
|
+
* is a fixed artifact, and that is what makes it signable at all. If editions
|
|
562
|
+
* ever became rewritable, this scheme would have to be revisited — a signature
|
|
563
|
+
* over bytes that can change underneath it attests to nothing.
|
|
564
|
+
*
|
|
565
|
+
* Separating the two also means signing does not bump the edition: attesting
|
|
566
|
+
* to a plan is not editing it, and a signature arriving late (a second master
|
|
567
|
+
* countersigning hours later) adds an entry here without disturbing the
|
|
568
|
+
* artifact or the change log.
|
|
569
|
+
*/
|
|
570
|
+
export interface RouteSignatures {
|
|
571
|
+
$type: "keelson.RouteSignatures";
|
|
572
|
+
/** The edition these signatures attest to. */
|
|
573
|
+
routeRef: RouteRef | undefined;
|
|
574
|
+
/** One entry per signer. Order is not significant. */
|
|
575
|
+
signatures: RouteSignature[];
|
|
576
|
+
extensions: Extensions | undefined;
|
|
577
|
+
}
|
|
578
|
+
export interface RouteSignature {
|
|
579
|
+
$type: "keelson.RouteSignature";
|
|
580
|
+
/** Free-form signer identifier (e.g. user id, system id). */
|
|
581
|
+
signerId: string;
|
|
582
|
+
/** Signer role (e.g. "master", "planner", "shore-control"). */
|
|
583
|
+
signerRole: string;
|
|
584
|
+
/** Signing algorithm (e.g. "ed25519", "ecdsa-p256-sha256"). */
|
|
585
|
+
algorithm: string;
|
|
586
|
+
/** Raw signature bytes. */
|
|
587
|
+
signature: Uint8Array;
|
|
588
|
+
/** Time of signing. */
|
|
589
|
+
signedAt: Date | undefined;
|
|
590
|
+
/** Reference to the public key used to verify (key id, URL, fingerprint). */
|
|
591
|
+
keyReference: string;
|
|
592
|
+
extensions: Extensions | undefined;
|
|
593
|
+
}
|
|
594
|
+
/**
|
|
595
|
+
* Standalone, structured payload for the `route_status` subject. Replaces the
|
|
596
|
+
* previous TimestampedString mapping so subscribers can act on the standard
|
|
597
|
+
* RouteStatus enum without parsing free-form text.
|
|
598
|
+
*/
|
|
599
|
+
export interface RouteStatusUpdate {
|
|
600
|
+
$type: "keelson.RouteStatusUpdate";
|
|
601
|
+
timestamp: Date | undefined;
|
|
602
|
+
routeId: string;
|
|
603
|
+
routeEditionNumber: number;
|
|
604
|
+
status: RouteStatus;
|
|
605
|
+
changedBy: string;
|
|
606
|
+
note: string;
|
|
607
|
+
}
|
|
608
|
+
export declare const RouteRef: MessageFns<RouteRef, "keelson.RouteRef">;
|
|
609
|
+
export declare const CircleGeometry: MessageFns<CircleGeometry, "keelson.CircleGeometry">;
|
|
610
|
+
export declare const Extensions: MessageFns<Extensions, "keelson.Extensions">;
|
|
611
|
+
export declare const Extensions_Entry: MessageFns<Extensions_Entry, "keelson.Extensions.Entry">;
|
|
612
|
+
export declare const Extensions_Entry_AttributesEntry: MessageFns<Extensions_Entry_AttributesEntry, "keelson.Extensions.Entry.AttributesEntry">;
|
|
613
|
+
export declare const Route: MessageFns<Route, "keelson.Route">;
|
|
614
|
+
export declare const RouteInfo: MessageFns<RouteInfo, "keelson.RouteInfo">;
|
|
615
|
+
export declare const Waypoints: MessageFns<Waypoints, "keelson.Waypoints">;
|
|
616
|
+
export declare const DefaultWaypoint: MessageFns<DefaultWaypoint, "keelson.DefaultWaypoint">;
|
|
617
|
+
export declare const Waypoint: MessageFns<Waypoint, "keelson.Waypoint">;
|
|
618
|
+
export declare const Leg: MessageFns<Leg, "keelson.Leg">;
|
|
619
|
+
export declare const Schedules: MessageFns<Schedules, "keelson.Schedules">;
|
|
620
|
+
export declare const Schedule: MessageFns<Schedule, "keelson.Schedule">;
|
|
621
|
+
export declare const ScheduleElement: MessageFns<ScheduleElement, "keelson.ScheduleElement">;
|
|
622
|
+
export declare const ActionPoints: MessageFns<ActionPoints, "keelson.ActionPoints">;
|
|
623
|
+
export declare const ActionPoint: MessageFns<ActionPoint, "keelson.ActionPoint">;
|
|
624
|
+
export declare const HazardZone: MessageFns<HazardZone, "keelson.HazardZone">;
|
|
625
|
+
export declare const RouteChallenge: MessageFns<RouteChallenge, "keelson.RouteChallenge">;
|
|
626
|
+
export declare const RouteIssue: MessageFns<RouteIssue, "keelson.RouteIssue">;
|
|
627
|
+
export declare const RouteSignatures: MessageFns<RouteSignatures, "keelson.RouteSignatures">;
|
|
628
|
+
export declare const RouteSignature: MessageFns<RouteSignature, "keelson.RouteSignature">;
|
|
629
|
+
export declare const RouteStatusUpdate: MessageFns<RouteStatusUpdate, "keelson.RouteStatusUpdate">;
|
|
630
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
631
|
+
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 {} ? {
|
|
632
|
+
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
|
|
633
|
+
} : Partial<T>;
|
|
634
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
635
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
636
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
637
|
+
} & {
|
|
638
|
+
[K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
|
|
639
|
+
};
|
|
640
|
+
interface MessageFns<T, V extends string> {
|
|
641
|
+
readonly $type: V;
|
|
642
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
643
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
644
|
+
fromJSON(object: any): T;
|
|
645
|
+
toJSON(message: T): unknown;
|
|
646
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
647
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
648
|
+
}
|
|
649
|
+
export {};
|