@rise-maritime/keelson-js 0.6.0-alpha.282.dev.2 → 0.6.0-alpha.307.dev.2

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.
Files changed (38) hide show
  1. package/dist/index.d.ts +31 -31
  2. package/dist/interfaces/ContainerControl.d.ts +7 -0
  3. package/dist/interfaces/ContainerControl.js +18 -1
  4. package/dist/interfaces/ContainerHost.d.ts +45 -0
  5. package/dist/interfaces/ContainerHost.js +332 -1
  6. package/dist/interfaces/NavigationRiskControl.d.ts +161 -0
  7. package/dist/interfaces/NavigationRiskControl.js +1007 -0
  8. package/dist/interfaces/ReplayControl.d.ts +49 -1
  9. package/dist/interfaces/ReplayControl.js +274 -1
  10. package/dist/interfaces/Route.d.ts +3 -0
  11. package/dist/interfaces/serviceRegistry.d.ts +33 -33
  12. package/dist/interfaces/serviceRegistry.js +2 -2
  13. package/dist/interfaces.json +1 -1
  14. package/dist/payloads/AdviceDisposition.d.ts +20 -5
  15. package/dist/payloads/AdviceDisposition.js +7 -0
  16. package/dist/payloads/ContainerHost.d.ts +48 -0
  17. package/dist/payloads/ContainerHost.js +341 -1
  18. package/dist/payloads/NavigationAdvice.d.ts +24 -0
  19. package/dist/payloads/NavigationAdvice.js +91 -1
  20. package/dist/payloads/NavigationRisk.d.ts +341 -0
  21. package/dist/payloads/NavigationRisk.js +2530 -0
  22. package/dist/payloads/NavigationState.d.ts +0 -46
  23. package/dist/payloads/NavigationState.js +1 -252
  24. package/dist/payloads/Route.d.ts +3 -0
  25. package/dist/payloads/index.keelson.d.ts +1 -0
  26. package/dist/payloads/index.keelson.js +1 -0
  27. package/dist/subjects.json +1 -0
  28. package/package.json +1 -1
  29. package/dist/interfaces/NavigationControl.d.ts +0 -169
  30. package/dist/interfaces/NavigationControl.js +0 -806
  31. package/dist/interfaces/NavigationState.d.ts +0 -132
  32. package/dist/interfaces/NavigationState.js +0 -615
  33. package/dist/interfaces/OperationalAuthority.d.ts +0 -217
  34. package/dist/interfaces/OperationalAuthority.js +0 -807
  35. package/dist/interfaces/VesselType.d.ts +0 -133
  36. package/dist/interfaces/VesselType.js +0 -726
  37. package/dist/interfaces/Voyage.d.ts +0 -151
  38. package/dist/interfaces/Voyage.js +0 -855
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: ContainerHost.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ContainerHostStats = exports.ContainerResourceUsage = exports.ContainerHostStatus = exports.ContainerInfo = exports.containerStatusTriggerToJSON = exports.containerStatusTriggerFromJSON = exports.ContainerStatusTrigger = exports.containerHealthStatusToJSON = exports.containerHealthStatusFromJSON = exports.ContainerHealthStatus = exports.containerRestartPolicyToJSON = exports.containerRestartPolicyFromJSON = exports.ContainerRestartPolicy = exports.containerStateToJSON = exports.containerStateFromJSON = exports.ContainerState = void 0;
8
+ exports.ContainerHostStats = exports.ContainerResourceUsage = exports.ContainerHostStatus = exports.ContainerInfo = exports.ContainerMount = exports.ContainerNetworkAttachment = exports.ContainerPortBinding = exports.containerStatusTriggerToJSON = exports.containerStatusTriggerFromJSON = exports.ContainerStatusTrigger = exports.containerHealthStatusToJSON = exports.containerHealthStatusFromJSON = exports.ContainerHealthStatus = exports.containerRestartPolicyToJSON = exports.containerRestartPolicyFromJSON = exports.ContainerRestartPolicy = exports.containerStateToJSON = exports.containerStateFromJSON = exports.ContainerState = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const timestamp_1 = require("./google/protobuf/timestamp");
@@ -242,6 +242,294 @@ function containerStatusTriggerToJSON(object) {
242
242
  }
243
243
  }
244
244
  exports.containerStatusTriggerToJSON = containerStatusTriggerToJSON;
245
+ function createBaseContainerPortBinding() {
246
+ return { $type: "keelson.ContainerPortBinding", containerPort: 0, protocol: "", hostIp: "", hostPort: 0 };
247
+ }
248
+ exports.ContainerPortBinding = {
249
+ $type: "keelson.ContainerPortBinding",
250
+ encode(message, writer = new wire_1.BinaryWriter()) {
251
+ if (message.containerPort !== 0) {
252
+ writer.uint32(8).uint32(message.containerPort);
253
+ }
254
+ if (message.protocol !== "") {
255
+ writer.uint32(18).string(message.protocol);
256
+ }
257
+ if (message.hostIp !== "") {
258
+ writer.uint32(26).string(message.hostIp);
259
+ }
260
+ if (message.hostPort !== 0) {
261
+ writer.uint32(32).uint32(message.hostPort);
262
+ }
263
+ return writer;
264
+ },
265
+ decode(input, length) {
266
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
267
+ let end = length === undefined ? reader.len : reader.pos + length;
268
+ const message = createBaseContainerPortBinding();
269
+ while (reader.pos < end) {
270
+ const tag = reader.uint32();
271
+ switch (tag >>> 3) {
272
+ case 1: {
273
+ if (tag !== 8) {
274
+ break;
275
+ }
276
+ message.containerPort = reader.uint32();
277
+ continue;
278
+ }
279
+ case 2: {
280
+ if (tag !== 18) {
281
+ break;
282
+ }
283
+ message.protocol = reader.string();
284
+ continue;
285
+ }
286
+ case 3: {
287
+ if (tag !== 26) {
288
+ break;
289
+ }
290
+ message.hostIp = reader.string();
291
+ continue;
292
+ }
293
+ case 4: {
294
+ if (tag !== 32) {
295
+ break;
296
+ }
297
+ message.hostPort = reader.uint32();
298
+ continue;
299
+ }
300
+ }
301
+ if ((tag & 7) === 4 || tag === 0) {
302
+ break;
303
+ }
304
+ reader.skip(tag & 7);
305
+ }
306
+ return message;
307
+ },
308
+ fromJSON(object) {
309
+ return {
310
+ $type: exports.ContainerPortBinding.$type,
311
+ containerPort: isSet(object.containerPort) ? globalThis.Number(object.containerPort) : 0,
312
+ protocol: isSet(object.protocol) ? globalThis.String(object.protocol) : "",
313
+ hostIp: isSet(object.hostIp) ? globalThis.String(object.hostIp) : "",
314
+ hostPort: isSet(object.hostPort) ? globalThis.Number(object.hostPort) : 0,
315
+ };
316
+ },
317
+ toJSON(message) {
318
+ const obj = {};
319
+ if (message.containerPort !== 0) {
320
+ obj.containerPort = Math.round(message.containerPort);
321
+ }
322
+ if (message.protocol !== "") {
323
+ obj.protocol = message.protocol;
324
+ }
325
+ if (message.hostIp !== "") {
326
+ obj.hostIp = message.hostIp;
327
+ }
328
+ if (message.hostPort !== 0) {
329
+ obj.hostPort = Math.round(message.hostPort);
330
+ }
331
+ return obj;
332
+ },
333
+ create(base) {
334
+ return exports.ContainerPortBinding.fromPartial(base ?? {});
335
+ },
336
+ fromPartial(object) {
337
+ const message = createBaseContainerPortBinding();
338
+ message.containerPort = object.containerPort ?? 0;
339
+ message.protocol = object.protocol ?? "";
340
+ message.hostIp = object.hostIp ?? "";
341
+ message.hostPort = object.hostPort ?? 0;
342
+ return message;
343
+ },
344
+ };
345
+ typeRegistry_1.messageTypeRegistry.set(exports.ContainerPortBinding.$type, exports.ContainerPortBinding);
346
+ function createBaseContainerNetworkAttachment() {
347
+ return { $type: "keelson.ContainerNetworkAttachment", name: "", ipAddress: "", aliases: [] };
348
+ }
349
+ exports.ContainerNetworkAttachment = {
350
+ $type: "keelson.ContainerNetworkAttachment",
351
+ encode(message, writer = new wire_1.BinaryWriter()) {
352
+ if (message.name !== "") {
353
+ writer.uint32(10).string(message.name);
354
+ }
355
+ if (message.ipAddress !== "") {
356
+ writer.uint32(18).string(message.ipAddress);
357
+ }
358
+ for (const v of message.aliases) {
359
+ writer.uint32(26).string(v);
360
+ }
361
+ return writer;
362
+ },
363
+ decode(input, length) {
364
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
365
+ let end = length === undefined ? reader.len : reader.pos + length;
366
+ const message = createBaseContainerNetworkAttachment();
367
+ while (reader.pos < end) {
368
+ const tag = reader.uint32();
369
+ switch (tag >>> 3) {
370
+ case 1: {
371
+ if (tag !== 10) {
372
+ break;
373
+ }
374
+ message.name = reader.string();
375
+ continue;
376
+ }
377
+ case 2: {
378
+ if (tag !== 18) {
379
+ break;
380
+ }
381
+ message.ipAddress = reader.string();
382
+ continue;
383
+ }
384
+ case 3: {
385
+ if (tag !== 26) {
386
+ break;
387
+ }
388
+ message.aliases.push(reader.string());
389
+ continue;
390
+ }
391
+ }
392
+ if ((tag & 7) === 4 || tag === 0) {
393
+ break;
394
+ }
395
+ reader.skip(tag & 7);
396
+ }
397
+ return message;
398
+ },
399
+ fromJSON(object) {
400
+ return {
401
+ $type: exports.ContainerNetworkAttachment.$type,
402
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
403
+ ipAddress: isSet(object.ipAddress) ? globalThis.String(object.ipAddress) : "",
404
+ aliases: globalThis.Array.isArray(object?.aliases) ? object.aliases.map((e) => globalThis.String(e)) : [],
405
+ };
406
+ },
407
+ toJSON(message) {
408
+ const obj = {};
409
+ if (message.name !== "") {
410
+ obj.name = message.name;
411
+ }
412
+ if (message.ipAddress !== "") {
413
+ obj.ipAddress = message.ipAddress;
414
+ }
415
+ if (message.aliases?.length) {
416
+ obj.aliases = message.aliases;
417
+ }
418
+ return obj;
419
+ },
420
+ create(base) {
421
+ return exports.ContainerNetworkAttachment.fromPartial(base ?? {});
422
+ },
423
+ fromPartial(object) {
424
+ const message = createBaseContainerNetworkAttachment();
425
+ message.name = object.name ?? "";
426
+ message.ipAddress = object.ipAddress ?? "";
427
+ message.aliases = object.aliases?.map((e) => e) || [];
428
+ return message;
429
+ },
430
+ };
431
+ typeRegistry_1.messageTypeRegistry.set(exports.ContainerNetworkAttachment.$type, exports.ContainerNetworkAttachment);
432
+ function createBaseContainerMount() {
433
+ return { $type: "keelson.ContainerMount", type: "", source: "", destination: "", readOnly: false };
434
+ }
435
+ exports.ContainerMount = {
436
+ $type: "keelson.ContainerMount",
437
+ encode(message, writer = new wire_1.BinaryWriter()) {
438
+ if (message.type !== "") {
439
+ writer.uint32(10).string(message.type);
440
+ }
441
+ if (message.source !== "") {
442
+ writer.uint32(18).string(message.source);
443
+ }
444
+ if (message.destination !== "") {
445
+ writer.uint32(26).string(message.destination);
446
+ }
447
+ if (message.readOnly !== false) {
448
+ writer.uint32(32).bool(message.readOnly);
449
+ }
450
+ return writer;
451
+ },
452
+ decode(input, length) {
453
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
454
+ let end = length === undefined ? reader.len : reader.pos + length;
455
+ const message = createBaseContainerMount();
456
+ while (reader.pos < end) {
457
+ const tag = reader.uint32();
458
+ switch (tag >>> 3) {
459
+ case 1: {
460
+ if (tag !== 10) {
461
+ break;
462
+ }
463
+ message.type = reader.string();
464
+ continue;
465
+ }
466
+ case 2: {
467
+ if (tag !== 18) {
468
+ break;
469
+ }
470
+ message.source = reader.string();
471
+ continue;
472
+ }
473
+ case 3: {
474
+ if (tag !== 26) {
475
+ break;
476
+ }
477
+ message.destination = reader.string();
478
+ continue;
479
+ }
480
+ case 4: {
481
+ if (tag !== 32) {
482
+ break;
483
+ }
484
+ message.readOnly = reader.bool();
485
+ continue;
486
+ }
487
+ }
488
+ if ((tag & 7) === 4 || tag === 0) {
489
+ break;
490
+ }
491
+ reader.skip(tag & 7);
492
+ }
493
+ return message;
494
+ },
495
+ fromJSON(object) {
496
+ return {
497
+ $type: exports.ContainerMount.$type,
498
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
499
+ source: isSet(object.source) ? globalThis.String(object.source) : "",
500
+ destination: isSet(object.destination) ? globalThis.String(object.destination) : "",
501
+ readOnly: isSet(object.readOnly) ? globalThis.Boolean(object.readOnly) : false,
502
+ };
503
+ },
504
+ toJSON(message) {
505
+ const obj = {};
506
+ if (message.type !== "") {
507
+ obj.type = message.type;
508
+ }
509
+ if (message.source !== "") {
510
+ obj.source = message.source;
511
+ }
512
+ if (message.destination !== "") {
513
+ obj.destination = message.destination;
514
+ }
515
+ if (message.readOnly !== false) {
516
+ obj.readOnly = message.readOnly;
517
+ }
518
+ return obj;
519
+ },
520
+ create(base) {
521
+ return exports.ContainerMount.fromPartial(base ?? {});
522
+ },
523
+ fromPartial(object) {
524
+ const message = createBaseContainerMount();
525
+ message.type = object.type ?? "";
526
+ message.source = object.source ?? "";
527
+ message.destination = object.destination ?? "";
528
+ message.readOnly = object.readOnly ?? false;
529
+ return message;
530
+ },
531
+ };
532
+ typeRegistry_1.messageTypeRegistry.set(exports.ContainerMount.$type, exports.ContainerMount);
245
533
  function createBaseContainerInfo() {
246
534
  return {
247
535
  $type: "keelson.ContainerInfo",
@@ -262,6 +550,9 @@ function createBaseContainerInfo() {
262
550
  composeProject: "",
263
551
  composeService: "",
264
552
  removable: false,
553
+ ports: [],
554
+ networks: [],
555
+ mounts: [],
265
556
  };
266
557
  }
267
558
  exports.ContainerInfo = {
@@ -318,6 +609,15 @@ exports.ContainerInfo = {
318
609
  if (message.removable !== false) {
319
610
  writer.uint32(136).bool(message.removable);
320
611
  }
612
+ for (const v of message.ports) {
613
+ exports.ContainerPortBinding.encode(v, writer.uint32(146).fork()).join();
614
+ }
615
+ for (const v of message.networks) {
616
+ exports.ContainerNetworkAttachment.encode(v, writer.uint32(154).fork()).join();
617
+ }
618
+ for (const v of message.mounts) {
619
+ exports.ContainerMount.encode(v, writer.uint32(162).fork()).join();
620
+ }
321
621
  return writer;
322
622
  },
323
623
  decode(input, length) {
@@ -446,6 +746,27 @@ exports.ContainerInfo = {
446
746
  message.removable = reader.bool();
447
747
  continue;
448
748
  }
749
+ case 18: {
750
+ if (tag !== 146) {
751
+ break;
752
+ }
753
+ message.ports.push(exports.ContainerPortBinding.decode(reader, reader.uint32()));
754
+ continue;
755
+ }
756
+ case 19: {
757
+ if (tag !== 154) {
758
+ break;
759
+ }
760
+ message.networks.push(exports.ContainerNetworkAttachment.decode(reader, reader.uint32()));
761
+ continue;
762
+ }
763
+ case 20: {
764
+ if (tag !== 162) {
765
+ break;
766
+ }
767
+ message.mounts.push(exports.ContainerMount.decode(reader, reader.uint32()));
768
+ continue;
769
+ }
449
770
  }
450
771
  if ((tag & 7) === 4 || tag === 0) {
451
772
  break;
@@ -476,6 +797,13 @@ exports.ContainerInfo = {
476
797
  composeProject: isSet(object.composeProject) ? globalThis.String(object.composeProject) : "",
477
798
  composeService: isSet(object.composeService) ? globalThis.String(object.composeService) : "",
478
799
  removable: isSet(object.removable) ? globalThis.Boolean(object.removable) : false,
800
+ ports: globalThis.Array.isArray(object?.ports)
801
+ ? object.ports.map((e) => exports.ContainerPortBinding.fromJSON(e))
802
+ : [],
803
+ networks: globalThis.Array.isArray(object?.networks)
804
+ ? object.networks.map((e) => exports.ContainerNetworkAttachment.fromJSON(e))
805
+ : [],
806
+ mounts: globalThis.Array.isArray(object?.mounts) ? object.mounts.map((e) => exports.ContainerMount.fromJSON(e)) : [],
479
807
  };
480
808
  },
481
809
  toJSON(message) {
@@ -531,6 +859,15 @@ exports.ContainerInfo = {
531
859
  if (message.removable !== false) {
532
860
  obj.removable = message.removable;
533
861
  }
862
+ if (message.ports?.length) {
863
+ obj.ports = message.ports.map((e) => exports.ContainerPortBinding.toJSON(e));
864
+ }
865
+ if (message.networks?.length) {
866
+ obj.networks = message.networks.map((e) => exports.ContainerNetworkAttachment.toJSON(e));
867
+ }
868
+ if (message.mounts?.length) {
869
+ obj.mounts = message.mounts.map((e) => exports.ContainerMount.toJSON(e));
870
+ }
534
871
  return obj;
535
872
  },
536
873
  create(base) {
@@ -555,6 +892,9 @@ exports.ContainerInfo = {
555
892
  message.composeProject = object.composeProject ?? "";
556
893
  message.composeService = object.composeService ?? "";
557
894
  message.removable = object.removable ?? false;
895
+ message.ports = object.ports?.map((e) => exports.ContainerPortBinding.fromPartial(e)) || [];
896
+ message.networks = object.networks?.map((e) => exports.ContainerNetworkAttachment.fromPartial(e)) || [];
897
+ message.mounts = object.mounts?.map((e) => exports.ContainerMount.fromPartial(e)) || [];
558
898
  return message;
559
899
  },
560
900
  };
@@ -43,6 +43,19 @@ export interface NavigationAdvice {
43
43
  /** Identifies the policy that produced this advice, as OperationalAuthority does. */
44
44
  policyId?: string | undefined;
45
45
  policyConfigDigest?: Uint8Array | undefined;
46
+ /**
47
+ * RETIREMENT. The advisor retires its advice by restating it once more, whole, with these set —
48
+ * the way an Encounter is closed with closed_at. A retired advice is never restated again and
49
+ * never un-retired; a changed manoeuvre is a new advice_id.
50
+ *
51
+ * Retirement lives here, on the advisor's own key, and not on the advice_disposition slot: the
52
+ * slot belongs to the decision holder, and a retirement written there replaced the decision in
53
+ * storage, so a station that joined later could not learn that anyone had accepted (keelson#283).
54
+ */
55
+ retiredAt?: Date | undefined;
56
+ retirement: NavigationAdvice_Retirement;
57
+ /** For RETIREMENT_SUPERSEDED: the advice_id that replaced this one. */
58
+ supersededBy?: string | undefined;
46
59
  }
47
60
  export declare enum NavigationAdvice_Kind {
48
61
  KIND_UNSPECIFIED = 0,
@@ -59,6 +72,17 @@ export declare enum NavigationAdvice_Kind {
59
72
  }
60
73
  export declare function navigationAdvice_KindFromJSON(object: any): NavigationAdvice_Kind;
61
74
  export declare function navigationAdvice_KindToJSON(object: NavigationAdvice_Kind): string;
75
+ /** Why the advisor withdrew the advice. Set only together with retired_at. */
76
+ export declare enum NavigationAdvice_Retirement {
77
+ RETIREMENT_UNSPECIFIED = 0,
78
+ /** RETIREMENT_SUPERSEDED - a different manoeuvre replaced it; superseded_by names that advice */
79
+ RETIREMENT_SUPERSEDED = 1,
80
+ /** RETIREMENT_EXPIRED - valid_to passed */
81
+ RETIREMENT_EXPIRED = 2,
82
+ UNRECOGNIZED = -1
83
+ }
84
+ export declare function navigationAdvice_RetirementFromJSON(object: any): NavigationAdvice_Retirement;
85
+ export declare function navigationAdvice_RetirementToJSON(object: NavigationAdvice_Retirement): string;
62
86
  export interface NavigationAdvice_SteeringProposal {
63
87
  $type: "keelson.NavigationAdvice.SteeringProposal";
64
88
  courseOverGroundDeg?: number | undefined;
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: NavigationAdvice.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.NavigationAdvice_PropulsionProposal = exports.NavigationAdvice_SteeringProposal = exports.NavigationAdvice = exports.navigationAdvice_KindToJSON = exports.navigationAdvice_KindFromJSON = exports.NavigationAdvice_Kind = void 0;
8
+ exports.NavigationAdvice_PropulsionProposal = exports.NavigationAdvice_SteeringProposal = exports.NavigationAdvice = exports.navigationAdvice_RetirementToJSON = exports.navigationAdvice_RetirementFromJSON = exports.NavigationAdvice_Retirement = exports.navigationAdvice_KindToJSON = exports.navigationAdvice_KindFromJSON = exports.NavigationAdvice_Kind = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const timestamp_1 = require("./google/protobuf/timestamp");
@@ -76,6 +76,48 @@ function navigationAdvice_KindToJSON(object) {
76
76
  }
77
77
  }
78
78
  exports.navigationAdvice_KindToJSON = navigationAdvice_KindToJSON;
79
+ /** Why the advisor withdrew the advice. Set only together with retired_at. */
80
+ var NavigationAdvice_Retirement;
81
+ (function (NavigationAdvice_Retirement) {
82
+ NavigationAdvice_Retirement[NavigationAdvice_Retirement["RETIREMENT_UNSPECIFIED"] = 0] = "RETIREMENT_UNSPECIFIED";
83
+ /** RETIREMENT_SUPERSEDED - a different manoeuvre replaced it; superseded_by names that advice */
84
+ NavigationAdvice_Retirement[NavigationAdvice_Retirement["RETIREMENT_SUPERSEDED"] = 1] = "RETIREMENT_SUPERSEDED";
85
+ /** RETIREMENT_EXPIRED - valid_to passed */
86
+ NavigationAdvice_Retirement[NavigationAdvice_Retirement["RETIREMENT_EXPIRED"] = 2] = "RETIREMENT_EXPIRED";
87
+ NavigationAdvice_Retirement[NavigationAdvice_Retirement["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
88
+ })(NavigationAdvice_Retirement || (exports.NavigationAdvice_Retirement = NavigationAdvice_Retirement = {}));
89
+ function navigationAdvice_RetirementFromJSON(object) {
90
+ switch (object) {
91
+ case 0:
92
+ case "RETIREMENT_UNSPECIFIED":
93
+ return NavigationAdvice_Retirement.RETIREMENT_UNSPECIFIED;
94
+ case 1:
95
+ case "RETIREMENT_SUPERSEDED":
96
+ return NavigationAdvice_Retirement.RETIREMENT_SUPERSEDED;
97
+ case 2:
98
+ case "RETIREMENT_EXPIRED":
99
+ return NavigationAdvice_Retirement.RETIREMENT_EXPIRED;
100
+ case -1:
101
+ case "UNRECOGNIZED":
102
+ default:
103
+ return NavigationAdvice_Retirement.UNRECOGNIZED;
104
+ }
105
+ }
106
+ exports.navigationAdvice_RetirementFromJSON = navigationAdvice_RetirementFromJSON;
107
+ function navigationAdvice_RetirementToJSON(object) {
108
+ switch (object) {
109
+ case NavigationAdvice_Retirement.RETIREMENT_UNSPECIFIED:
110
+ return "RETIREMENT_UNSPECIFIED";
111
+ case NavigationAdvice_Retirement.RETIREMENT_SUPERSEDED:
112
+ return "RETIREMENT_SUPERSEDED";
113
+ case NavigationAdvice_Retirement.RETIREMENT_EXPIRED:
114
+ return "RETIREMENT_EXPIRED";
115
+ case NavigationAdvice_Retirement.UNRECOGNIZED:
116
+ default:
117
+ return "UNRECOGNIZED";
118
+ }
119
+ }
120
+ exports.navigationAdvice_RetirementToJSON = navigationAdvice_RetirementToJSON;
79
121
  function createBaseNavigationAdvice() {
80
122
  return {
81
123
  $type: "keelson.NavigationAdvice",
@@ -96,6 +138,9 @@ function createBaseNavigationAdvice() {
96
138
  rationale: "",
97
139
  policyId: undefined,
98
140
  policyConfigDigest: undefined,
141
+ retiredAt: undefined,
142
+ retirement: 0,
143
+ supersededBy: undefined,
99
144
  };
100
145
  }
101
146
  exports.NavigationAdvice = {
@@ -152,6 +197,15 @@ exports.NavigationAdvice = {
152
197
  if (message.policyConfigDigest !== undefined) {
153
198
  writer.uint32(410).bytes(message.policyConfigDigest);
154
199
  }
200
+ if (message.retiredAt !== undefined) {
201
+ timestamp_1.Timestamp.encode(toTimestamp(message.retiredAt), writer.uint32(482).fork()).join();
202
+ }
203
+ if (message.retirement !== 0) {
204
+ writer.uint32(488).int32(message.retirement);
205
+ }
206
+ if (message.supersededBy !== undefined) {
207
+ writer.uint32(498).string(message.supersededBy);
208
+ }
155
209
  return writer;
156
210
  },
157
211
  decode(input, length) {
@@ -280,6 +334,27 @@ exports.NavigationAdvice = {
280
334
  message.policyConfigDigest = reader.bytes();
281
335
  continue;
282
336
  }
337
+ case 60: {
338
+ if (tag !== 482) {
339
+ break;
340
+ }
341
+ message.retiredAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
342
+ continue;
343
+ }
344
+ case 61: {
345
+ if (tag !== 488) {
346
+ break;
347
+ }
348
+ message.retirement = reader.int32();
349
+ continue;
350
+ }
351
+ case 62: {
352
+ if (tag !== 498) {
353
+ break;
354
+ }
355
+ message.supersededBy = reader.string();
356
+ continue;
357
+ }
283
358
  }
284
359
  if ((tag & 7) === 4 || tag === 0) {
285
360
  break;
@@ -314,6 +389,9 @@ exports.NavigationAdvice = {
314
389
  rationale: isSet(object.rationale) ? globalThis.String(object.rationale) : "",
315
390
  policyId: isSet(object.policyId) ? globalThis.String(object.policyId) : undefined,
316
391
  policyConfigDigest: isSet(object.policyConfigDigest) ? bytesFromBase64(object.policyConfigDigest) : undefined,
392
+ retiredAt: isSet(object.retiredAt) ? fromJsonTimestamp(object.retiredAt) : undefined,
393
+ retirement: isSet(object.retirement) ? navigationAdvice_RetirementFromJSON(object.retirement) : 0,
394
+ supersededBy: isSet(object.supersededBy) ? globalThis.String(object.supersededBy) : undefined,
317
395
  };
318
396
  },
319
397
  toJSON(message) {
@@ -369,6 +447,15 @@ exports.NavigationAdvice = {
369
447
  if (message.policyConfigDigest !== undefined) {
370
448
  obj.policyConfigDigest = base64FromBytes(message.policyConfigDigest);
371
449
  }
450
+ if (message.retiredAt !== undefined) {
451
+ obj.retiredAt = message.retiredAt.toISOString();
452
+ }
453
+ if (message.retirement !== 0) {
454
+ obj.retirement = navigationAdvice_RetirementToJSON(message.retirement);
455
+ }
456
+ if (message.supersededBy !== undefined) {
457
+ obj.supersededBy = message.supersededBy;
458
+ }
372
459
  return obj;
373
460
  },
374
461
  create(base) {
@@ -397,6 +484,9 @@ exports.NavigationAdvice = {
397
484
  message.rationale = object.rationale ?? "";
398
485
  message.policyId = object.policyId ?? undefined;
399
486
  message.policyConfigDigest = object.policyConfigDigest ?? undefined;
487
+ message.retiredAt = object.retiredAt ?? undefined;
488
+ message.retirement = object.retirement ?? 0;
489
+ message.supersededBy = object.supersededBy ?? undefined;
400
490
  return message;
401
491
  },
402
492
  };