@rise-maritime/keelson-js 0.6.0-alpha.281.dev.1 → 0.6.0-alpha.282.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.
@@ -22,38 +22,6 @@ export interface ListFilesResponse {
22
22
  baseDirectory: string;
23
23
  files: FileInfo[];
24
24
  }
25
- export interface DescribeFileRequest {
26
- /**
27
- * Path relative to the replayer's base directory, as in load_file. The file
28
- * need not be loaded — a client can inspect a recording before playing it.
29
- */
30
- path: string;
31
- }
32
- /** One channel (topic) in the file, and when it spoke. */
33
- export interface ChannelInfo {
34
- topic: string;
35
- /** The channel's schema name as recorded, e.g. "keelson.TimestampedFloat". */
36
- schemaName: string;
37
- /** The channel's message encoding as recorded, e.g. "protobuf". */
38
- messageEncoding: string;
39
- messageCount: number;
40
- /**
41
- * log_time of the channel's first and last message. Unset when the channel
42
- * recorded no messages. Exact, not the bounds of the chunks it appears in.
43
- */
44
- firstTime: Date | undefined;
45
- lastTime: Date | undefined;
46
- }
47
- export interface DescribeFileResponse {
48
- file: FileInfo | undefined;
49
- channels: ChannelInfo[];
50
- /**
51
- * True when the file carried no summary or no chunk indexes, so the replayer
52
- * had to read it end to end. The figures are still exact; the call was just
53
- * proportional to the file's size rather than to its number of chunks.
54
- */
55
- fromScan: boolean;
56
- }
57
25
  export interface LoadFileRequest {
58
26
  path: string;
59
27
  }
@@ -62,11 +30,7 @@ export interface SeekRequest {
62
30
  target: Date | undefined;
63
31
  }
64
32
  export interface SetSpeedRequest {
65
- /**
66
- * Playback speed multiplier; expected range [0.25, 20.0]. At high speeds a
67
- * recording heavy with images or point clouds is published as fast as the
68
- * replayer can manage and lags wall time; no message is dropped.
69
- */
33
+ /** Playback speed multiplier; expected range [0.25, 4.0]. */
70
34
  speed: number;
71
35
  }
72
36
  export interface SetLoopRequest {
@@ -78,9 +42,6 @@ export interface ReplaySuccessResponse {
78
42
  export declare const FileInfo: MessageFns<FileInfo>;
79
43
  export declare const ListFilesRequest: MessageFns<ListFilesRequest>;
80
44
  export declare const ListFilesResponse: MessageFns<ListFilesResponse>;
81
- export declare const DescribeFileRequest: MessageFns<DescribeFileRequest>;
82
- export declare const ChannelInfo: MessageFns<ChannelInfo>;
83
- export declare const DescribeFileResponse: MessageFns<DescribeFileResponse>;
84
45
  export declare const LoadFileRequest: MessageFns<LoadFileRequest>;
85
46
  export declare const SeekRequest: MessageFns<SeekRequest>;
86
47
  export declare const SetSpeedRequest: MessageFns<SetSpeedRequest>;
@@ -99,15 +60,6 @@ export declare const ReplayControlDefinition: {
99
60
  readonly responseStream: false;
100
61
  readonly options: {};
101
62
  };
102
- /** Per-channel message counts and first/last message times for one file. */
103
- readonly describe_file: {
104
- readonly name: "describe_file";
105
- readonly requestType: MessageFns<DescribeFileRequest>;
106
- readonly requestStream: false;
107
- readonly responseType: MessageFns<DescribeFileResponse>;
108
- readonly responseStream: false;
109
- readonly options: {};
110
- };
111
63
  readonly load_file: {
112
64
  readonly name: "load_file";
113
65
  readonly requestType: MessageFns<LoadFileRequest>;
@@ -5,7 +5,7 @@
5
5
  // protoc v6.30.2
6
6
  // source: ReplayControl.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.DescribeFileResponse = exports.ChannelInfo = exports.DescribeFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
8
+ exports.ReplayControlDefinition = exports.ReplaySuccessResponse = exports.SetLoopRequest = exports.SetSpeedRequest = exports.SeekRequest = exports.LoadFileRequest = exports.ListFilesResponse = exports.ListFilesRequest = exports.FileInfo = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
11
  const empty_1 = require("./google/protobuf/empty");
@@ -283,270 +283,6 @@ exports.ListFilesResponse = {
283
283
  return message;
284
284
  },
285
285
  };
286
- function createBaseDescribeFileRequest() {
287
- return { path: "" };
288
- }
289
- exports.DescribeFileRequest = {
290
- encode(message, writer = new wire_1.BinaryWriter()) {
291
- if (message.path !== "") {
292
- writer.uint32(10).string(message.path);
293
- }
294
- return writer;
295
- },
296
- decode(input, length) {
297
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
298
- let end = length === undefined ? reader.len : reader.pos + length;
299
- const message = createBaseDescribeFileRequest();
300
- while (reader.pos < end) {
301
- const tag = reader.uint32();
302
- switch (tag >>> 3) {
303
- case 1: {
304
- if (tag !== 10) {
305
- break;
306
- }
307
- message.path = reader.string();
308
- continue;
309
- }
310
- }
311
- if ((tag & 7) === 4 || tag === 0) {
312
- break;
313
- }
314
- reader.skip(tag & 7);
315
- }
316
- return message;
317
- },
318
- fromJSON(object) {
319
- return { path: isSet(object.path) ? globalThis.String(object.path) : "" };
320
- },
321
- toJSON(message) {
322
- const obj = {};
323
- if (message.path !== "") {
324
- obj.path = message.path;
325
- }
326
- return obj;
327
- },
328
- create(base) {
329
- return exports.DescribeFileRequest.fromPartial(base ?? {});
330
- },
331
- fromPartial(object) {
332
- const message = createBaseDescribeFileRequest();
333
- message.path = object.path ?? "";
334
- return message;
335
- },
336
- };
337
- function createBaseChannelInfo() {
338
- return { topic: "", schemaName: "", messageEncoding: "", messageCount: 0, firstTime: undefined, lastTime: undefined };
339
- }
340
- exports.ChannelInfo = {
341
- encode(message, writer = new wire_1.BinaryWriter()) {
342
- if (message.topic !== "") {
343
- writer.uint32(10).string(message.topic);
344
- }
345
- if (message.schemaName !== "") {
346
- writer.uint32(18).string(message.schemaName);
347
- }
348
- if (message.messageEncoding !== "") {
349
- writer.uint32(26).string(message.messageEncoding);
350
- }
351
- if (message.messageCount !== 0) {
352
- writer.uint32(32).uint64(message.messageCount);
353
- }
354
- if (message.firstTime !== undefined) {
355
- timestamp_1.Timestamp.encode(toTimestamp(message.firstTime), writer.uint32(42).fork()).join();
356
- }
357
- if (message.lastTime !== undefined) {
358
- timestamp_1.Timestamp.encode(toTimestamp(message.lastTime), writer.uint32(50).fork()).join();
359
- }
360
- return writer;
361
- },
362
- decode(input, length) {
363
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
364
- let end = length === undefined ? reader.len : reader.pos + length;
365
- const message = createBaseChannelInfo();
366
- while (reader.pos < end) {
367
- const tag = reader.uint32();
368
- switch (tag >>> 3) {
369
- case 1: {
370
- if (tag !== 10) {
371
- break;
372
- }
373
- message.topic = reader.string();
374
- continue;
375
- }
376
- case 2: {
377
- if (tag !== 18) {
378
- break;
379
- }
380
- message.schemaName = reader.string();
381
- continue;
382
- }
383
- case 3: {
384
- if (tag !== 26) {
385
- break;
386
- }
387
- message.messageEncoding = reader.string();
388
- continue;
389
- }
390
- case 4: {
391
- if (tag !== 32) {
392
- break;
393
- }
394
- message.messageCount = longToNumber(reader.uint64());
395
- continue;
396
- }
397
- case 5: {
398
- if (tag !== 42) {
399
- break;
400
- }
401
- message.firstTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
402
- continue;
403
- }
404
- case 6: {
405
- if (tag !== 50) {
406
- break;
407
- }
408
- message.lastTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
409
- continue;
410
- }
411
- }
412
- if ((tag & 7) === 4 || tag === 0) {
413
- break;
414
- }
415
- reader.skip(tag & 7);
416
- }
417
- return message;
418
- },
419
- fromJSON(object) {
420
- return {
421
- topic: isSet(object.topic) ? globalThis.String(object.topic) : "",
422
- schemaName: isSet(object.schemaName) ? globalThis.String(object.schemaName) : "",
423
- messageEncoding: isSet(object.messageEncoding) ? globalThis.String(object.messageEncoding) : "",
424
- messageCount: isSet(object.messageCount) ? globalThis.Number(object.messageCount) : 0,
425
- firstTime: isSet(object.firstTime) ? fromJsonTimestamp(object.firstTime) : undefined,
426
- lastTime: isSet(object.lastTime) ? fromJsonTimestamp(object.lastTime) : undefined,
427
- };
428
- },
429
- toJSON(message) {
430
- const obj = {};
431
- if (message.topic !== "") {
432
- obj.topic = message.topic;
433
- }
434
- if (message.schemaName !== "") {
435
- obj.schemaName = message.schemaName;
436
- }
437
- if (message.messageEncoding !== "") {
438
- obj.messageEncoding = message.messageEncoding;
439
- }
440
- if (message.messageCount !== 0) {
441
- obj.messageCount = Math.round(message.messageCount);
442
- }
443
- if (message.firstTime !== undefined) {
444
- obj.firstTime = message.firstTime.toISOString();
445
- }
446
- if (message.lastTime !== undefined) {
447
- obj.lastTime = message.lastTime.toISOString();
448
- }
449
- return obj;
450
- },
451
- create(base) {
452
- return exports.ChannelInfo.fromPartial(base ?? {});
453
- },
454
- fromPartial(object) {
455
- const message = createBaseChannelInfo();
456
- message.topic = object.topic ?? "";
457
- message.schemaName = object.schemaName ?? "";
458
- message.messageEncoding = object.messageEncoding ?? "";
459
- message.messageCount = object.messageCount ?? 0;
460
- message.firstTime = object.firstTime ?? undefined;
461
- message.lastTime = object.lastTime ?? undefined;
462
- return message;
463
- },
464
- };
465
- function createBaseDescribeFileResponse() {
466
- return { file: undefined, channels: [], fromScan: false };
467
- }
468
- exports.DescribeFileResponse = {
469
- encode(message, writer = new wire_1.BinaryWriter()) {
470
- if (message.file !== undefined) {
471
- exports.FileInfo.encode(message.file, writer.uint32(10).fork()).join();
472
- }
473
- for (const v of message.channels) {
474
- exports.ChannelInfo.encode(v, writer.uint32(18).fork()).join();
475
- }
476
- if (message.fromScan !== false) {
477
- writer.uint32(24).bool(message.fromScan);
478
- }
479
- return writer;
480
- },
481
- decode(input, length) {
482
- const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
483
- let end = length === undefined ? reader.len : reader.pos + length;
484
- const message = createBaseDescribeFileResponse();
485
- while (reader.pos < end) {
486
- const tag = reader.uint32();
487
- switch (tag >>> 3) {
488
- case 1: {
489
- if (tag !== 10) {
490
- break;
491
- }
492
- message.file = exports.FileInfo.decode(reader, reader.uint32());
493
- continue;
494
- }
495
- case 2: {
496
- if (tag !== 18) {
497
- break;
498
- }
499
- message.channels.push(exports.ChannelInfo.decode(reader, reader.uint32()));
500
- continue;
501
- }
502
- case 3: {
503
- if (tag !== 24) {
504
- break;
505
- }
506
- message.fromScan = reader.bool();
507
- continue;
508
- }
509
- }
510
- if ((tag & 7) === 4 || tag === 0) {
511
- break;
512
- }
513
- reader.skip(tag & 7);
514
- }
515
- return message;
516
- },
517
- fromJSON(object) {
518
- return {
519
- file: isSet(object.file) ? exports.FileInfo.fromJSON(object.file) : undefined,
520
- channels: globalThis.Array.isArray(object?.channels)
521
- ? object.channels.map((e) => exports.ChannelInfo.fromJSON(e))
522
- : [],
523
- fromScan: isSet(object.fromScan) ? globalThis.Boolean(object.fromScan) : false,
524
- };
525
- },
526
- toJSON(message) {
527
- const obj = {};
528
- if (message.file !== undefined) {
529
- obj.file = exports.FileInfo.toJSON(message.file);
530
- }
531
- if (message.channels?.length) {
532
- obj.channels = message.channels.map((e) => exports.ChannelInfo.toJSON(e));
533
- }
534
- if (message.fromScan !== false) {
535
- obj.fromScan = message.fromScan;
536
- }
537
- return obj;
538
- },
539
- create(base) {
540
- return exports.DescribeFileResponse.fromPartial(base ?? {});
541
- },
542
- fromPartial(object) {
543
- const message = createBaseDescribeFileResponse();
544
- message.file = (object.file !== undefined && object.file !== null) ? exports.FileInfo.fromPartial(object.file) : undefined;
545
- message.channels = object.channels?.map((e) => exports.ChannelInfo.fromPartial(e)) || [];
546
- message.fromScan = object.fromScan ?? false;
547
- return message;
548
- },
549
- };
550
286
  function createBaseLoadFileRequest() {
551
287
  return { path: "" };
552
288
  }
@@ -800,15 +536,6 @@ exports.ReplayControlDefinition = {
800
536
  responseStream: false,
801
537
  options: {},
802
538
  },
803
- /** Per-channel message counts and first/last message times for one file. */
804
- describe_file: {
805
- name: "describe_file",
806
- requestType: exports.DescribeFileRequest,
807
- requestStream: false,
808
- responseType: exports.DescribeFileResponse,
809
- responseStream: false,
810
- options: {},
811
- },
812
539
  load_file: {
813
540
  name: "load_file",
814
541
  requestType: exports.LoadFileRequest,
@@ -0,0 +1,133 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "keelson";
3
+ export interface VesselType {
4
+ /** Timestamp at which the vessel type was last asserted or observed. */
5
+ timestamp: Date | undefined;
6
+ vesselType: VesselType_VesselType;
7
+ }
8
+ /** Vessel type based on the AIS standard (ITU-R M.1371-5 Table 53). */
9
+ export declare enum VesselType_VesselType {
10
+ NOT_AVAILABLE = 0,
11
+ RESERVED_1 = 1,
12
+ RESERVED_2 = 2,
13
+ RESERVED_3 = 3,
14
+ RESERVED_4 = 4,
15
+ RESERVED_5 = 5,
16
+ RESERVED_6 = 6,
17
+ RESERVED_7 = 7,
18
+ RESERVED_8 = 8,
19
+ RESERVED_9 = 9,
20
+ RESERVED_10 = 10,
21
+ RESERVED_11 = 11,
22
+ RESERVED_12 = 12,
23
+ RESERVED_13 = 13,
24
+ RESERVED_14 = 14,
25
+ RESERVED_15 = 15,
26
+ RESERVED_16 = 16,
27
+ RESERVED_17 = 17,
28
+ RESERVED_18 = 18,
29
+ RESERVED_19 = 19,
30
+ WIG_ALL = 20,
31
+ WIG_HAZARDOUS_A = 21,
32
+ WIG_HAZARDOUS_B = 22,
33
+ WIG_HAZARDOUS_C = 23,
34
+ WIG_HAZARDOUS_D = 24,
35
+ WIG_RESERVED_25 = 25,
36
+ WIG_RESERVED_26 = 26,
37
+ WIG_RESERVED_27 = 27,
38
+ WIG_RESERVED_28 = 28,
39
+ WIG_RESERVED_29 = 29,
40
+ FISHING = 30,
41
+ TOWING = 31,
42
+ TOWING_LARGE = 32,
43
+ DREDGING_UNDERWATER_OPS = 33,
44
+ DIVING_OPS = 34,
45
+ MILITARY_OPS = 35,
46
+ SAILING = 36,
47
+ PLEASURE_CRAFT = 37,
48
+ RESERVED_38 = 38,
49
+ RESERVED_39 = 39,
50
+ HSC_ALL = 40,
51
+ HSC_HAZARDOUS_A = 41,
52
+ HSC_HAZARDOUS_B = 42,
53
+ HSC_HAZARDOUS_C = 43,
54
+ HSC_HAZARDOUS_D = 44,
55
+ HSC_RESERVED_45 = 45,
56
+ HSC_RESERVED_46 = 46,
57
+ HSC_RESERVED_47 = 47,
58
+ HSC_RESERVED_48 = 48,
59
+ HSC_NO_INFO = 49,
60
+ PILOT = 50,
61
+ SEARCH_RESCUE = 51,
62
+ TUG = 52,
63
+ PORT_TENDER = 53,
64
+ ANTI_POLLUTION = 54,
65
+ LAW_ENFORCEMENT = 55,
66
+ SPARE_LOCAL_56 = 56,
67
+ SPARE_LOCAL_57 = 57,
68
+ MEDICAL_TRANSPORT = 58,
69
+ NONCOMBATANT = 59,
70
+ PASSENGER_ALL = 60,
71
+ PASSENGER_HAZARDOUS_A = 61,
72
+ PASSENGER_HAZARDOUS_B = 62,
73
+ PASSENGER_HAZARDOUS_C = 63,
74
+ PASSENGER_HAZARDOUS_D = 64,
75
+ PASSENGER_RESERVED_65 = 65,
76
+ PASSENGER_RESERVED_66 = 66,
77
+ PASSENGER_RESERVED_67 = 67,
78
+ PASSENGER_RESERVED_68 = 68,
79
+ PASSENGER_NO_INFO = 69,
80
+ CARGO_ALL = 70,
81
+ CARGO_HAZARDOUS_A = 71,
82
+ CARGO_HAZARDOUS_B = 72,
83
+ CARGO_HAZARDOUS_C = 73,
84
+ CARGO_HAZARDOUS_D = 74,
85
+ CARGO_RESERVED_75 = 75,
86
+ CARGO_RESERVED_76 = 76,
87
+ CARGO_RESERVED_77 = 77,
88
+ CARGO_RESERVED_78 = 78,
89
+ CARGO_NO_INFO = 79,
90
+ TANKER_ALL = 80,
91
+ TANKER_HAZARDOUS_A = 81,
92
+ TANKER_HAZARDOUS_B = 82,
93
+ TANKER_HAZARDOUS_C = 83,
94
+ TANKER_HAZARDOUS_D = 84,
95
+ TANKER_RESERVED_85 = 85,
96
+ TANKER_RESERVED_86 = 86,
97
+ TANKER_RESERVED_87 = 87,
98
+ TANKER_RESERVED_88 = 88,
99
+ TANKER_NO_INFO = 89,
100
+ OTHER_ALL = 90,
101
+ OTHER_HAZARDOUS_A = 91,
102
+ OTHER_HAZARDOUS_B = 92,
103
+ OTHER_HAZARDOUS_C = 93,
104
+ OTHER_HAZARDOUS_D = 94,
105
+ OTHER_RESERVED_95 = 95,
106
+ OTHER_RESERVED_96 = 96,
107
+ OTHER_RESERVED_97 = 97,
108
+ OTHER_RESERVED_98 = 98,
109
+ OTHER_NO_INFO = 99,
110
+ UNRECOGNIZED = -1
111
+ }
112
+ export declare function vesselType_VesselTypeFromJSON(object: any): VesselType_VesselType;
113
+ export declare function vesselType_VesselTypeToJSON(object: VesselType_VesselType): string;
114
+ export declare const VesselType: MessageFns<VesselType>;
115
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
116
+ export 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 {} ? {
117
+ [K in keyof T]?: DeepPartial<T[K]>;
118
+ } : Partial<T>;
119
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
120
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
121
+ [K in keyof P]: Exact<P[K], I[K]>;
122
+ } & {
123
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
124
+ };
125
+ export interface MessageFns<T> {
126
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
127
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
128
+ fromJSON(object: any): T;
129
+ toJSON(message: T): unknown;
130
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
131
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
132
+ }
133
+ export {};