@rise-maritime/keelson-js 0.5.1 → 0.5.3
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/interfaces/ErrorResponse.d.ts +28 -0
- package/dist/interfaces/ErrorResponse.js +108 -3
- package/dist/interfaces/ReplayControl.d.ts +97 -0
- package/dist/interfaces/ReplayControl.js +616 -0
- package/dist/interfaces/VehicleControl.d.ts +48 -23
- package/dist/interfaces/VehicleControl.js +40 -40
- package/dist/interfaces/VehicleLifecycle.d.ts +0 -21
- package/dist/interfaces/VehicleLifecycle.js +1 -141
- package/dist/interfaces/VehicleParam.d.ts +22 -0
- package/dist/interfaces/VehicleParam.js +164 -1
- package/dist/payloads/Primitives.d.ts +11 -0
- package/dist/payloads/Primitives.js +89 -1
- package/dist/payloads/ReplayStatus.d.ts +76 -0
- package/dist/payloads/ReplayStatus.js +445 -0
- package/dist/payloads/Severity.d.ts +14 -0
- package/dist/payloads/Severity.js +59 -0
- package/dist/payloads/VehicleState.d.ts +56 -0
- package/dist/payloads/VehicleState.js +196 -0
- package/dist/payloads/Weather.d.ts +148 -0
- package/dist/payloads/Weather.js +906 -0
- package/dist/payloads/index.foxglove.d.ts +1 -1
- package/dist/payloads/index.foxglove.js +1 -1
- package/dist/payloads/index.keelson.d.ts +4 -0
- package/dist/payloads/index.keelson.js +4 -0
- package/dist/subjects.json +24 -1
- package/package.json +2 -1
|
@@ -2,7 +2,35 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
export declare const protobufPackage = "";
|
|
3
3
|
export interface ErrorResponse {
|
|
4
4
|
errorDescription: string;
|
|
5
|
+
code: ErrorResponse_Code;
|
|
5
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Typed code so clients can react without parsing the description.
|
|
9
|
+
* Producers SHOULD emit a specific code when applicable; UNSPECIFIED
|
|
10
|
+
* remains backwards-compatible for callers that don't yet care.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum ErrorResponse_Code {
|
|
13
|
+
UNSPECIFIED = 0,
|
|
14
|
+
/** NOT_FOUND - file or resource missing */
|
|
15
|
+
NOT_FOUND = 1,
|
|
16
|
+
/** INVALID_ARGUMENT - malformed request payload */
|
|
17
|
+
INVALID_ARGUMENT = 2,
|
|
18
|
+
/** OUT_OF_RANGE - seek beyond file, speed out of bounds, ... */
|
|
19
|
+
OUT_OF_RANGE = 3,
|
|
20
|
+
/** INVALID_STATE - wrong state for the operation (e.g. pause when STOPPED) */
|
|
21
|
+
INVALID_STATE = 4,
|
|
22
|
+
/** PERMISSION_DENIED - path escapes base directory, lock-down rules */
|
|
23
|
+
PERMISSION_DENIED = 5,
|
|
24
|
+
/** IO_FAILURE - read/write fault on disk, network, etc. */
|
|
25
|
+
IO_FAILURE = 6,
|
|
26
|
+
/** UNAVAILABLE - backend / dependency not ready */
|
|
27
|
+
UNAVAILABLE = 7,
|
|
28
|
+
/** INTERNAL - unhandled exception */
|
|
29
|
+
INTERNAL = 8,
|
|
30
|
+
UNRECOGNIZED = -1
|
|
31
|
+
}
|
|
32
|
+
export declare function errorResponse_CodeFromJSON(object: any): ErrorResponse_Code;
|
|
33
|
+
export declare function errorResponse_CodeToJSON(object: ErrorResponse_Code): string;
|
|
6
34
|
export declare const ErrorResponse: MessageFns<ErrorResponse>;
|
|
7
35
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
8
36
|
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 {} ? {
|
|
@@ -5,18 +5,109 @@
|
|
|
5
5
|
// protoc v6.30.2
|
|
6
6
|
// source: ErrorResponse.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.ErrorResponse = exports.protobufPackage = void 0;
|
|
8
|
+
exports.ErrorResponse = exports.errorResponse_CodeToJSON = exports.errorResponse_CodeFromJSON = exports.ErrorResponse_Code = exports.protobufPackage = void 0;
|
|
9
9
|
/* eslint-disable */
|
|
10
10
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
11
|
exports.protobufPackage = "";
|
|
12
|
+
/**
|
|
13
|
+
* Typed code so clients can react without parsing the description.
|
|
14
|
+
* Producers SHOULD emit a specific code when applicable; UNSPECIFIED
|
|
15
|
+
* remains backwards-compatible for callers that don't yet care.
|
|
16
|
+
*/
|
|
17
|
+
var ErrorResponse_Code;
|
|
18
|
+
(function (ErrorResponse_Code) {
|
|
19
|
+
ErrorResponse_Code[ErrorResponse_Code["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
20
|
+
/** NOT_FOUND - file or resource missing */
|
|
21
|
+
ErrorResponse_Code[ErrorResponse_Code["NOT_FOUND"] = 1] = "NOT_FOUND";
|
|
22
|
+
/** INVALID_ARGUMENT - malformed request payload */
|
|
23
|
+
ErrorResponse_Code[ErrorResponse_Code["INVALID_ARGUMENT"] = 2] = "INVALID_ARGUMENT";
|
|
24
|
+
/** OUT_OF_RANGE - seek beyond file, speed out of bounds, ... */
|
|
25
|
+
ErrorResponse_Code[ErrorResponse_Code["OUT_OF_RANGE"] = 3] = "OUT_OF_RANGE";
|
|
26
|
+
/** INVALID_STATE - wrong state for the operation (e.g. pause when STOPPED) */
|
|
27
|
+
ErrorResponse_Code[ErrorResponse_Code["INVALID_STATE"] = 4] = "INVALID_STATE";
|
|
28
|
+
/** PERMISSION_DENIED - path escapes base directory, lock-down rules */
|
|
29
|
+
ErrorResponse_Code[ErrorResponse_Code["PERMISSION_DENIED"] = 5] = "PERMISSION_DENIED";
|
|
30
|
+
/** IO_FAILURE - read/write fault on disk, network, etc. */
|
|
31
|
+
ErrorResponse_Code[ErrorResponse_Code["IO_FAILURE"] = 6] = "IO_FAILURE";
|
|
32
|
+
/** UNAVAILABLE - backend / dependency not ready */
|
|
33
|
+
ErrorResponse_Code[ErrorResponse_Code["UNAVAILABLE"] = 7] = "UNAVAILABLE";
|
|
34
|
+
/** INTERNAL - unhandled exception */
|
|
35
|
+
ErrorResponse_Code[ErrorResponse_Code["INTERNAL"] = 8] = "INTERNAL";
|
|
36
|
+
ErrorResponse_Code[ErrorResponse_Code["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
37
|
+
})(ErrorResponse_Code || (exports.ErrorResponse_Code = ErrorResponse_Code = {}));
|
|
38
|
+
function errorResponse_CodeFromJSON(object) {
|
|
39
|
+
switch (object) {
|
|
40
|
+
case 0:
|
|
41
|
+
case "UNSPECIFIED":
|
|
42
|
+
return ErrorResponse_Code.UNSPECIFIED;
|
|
43
|
+
case 1:
|
|
44
|
+
case "NOT_FOUND":
|
|
45
|
+
return ErrorResponse_Code.NOT_FOUND;
|
|
46
|
+
case 2:
|
|
47
|
+
case "INVALID_ARGUMENT":
|
|
48
|
+
return ErrorResponse_Code.INVALID_ARGUMENT;
|
|
49
|
+
case 3:
|
|
50
|
+
case "OUT_OF_RANGE":
|
|
51
|
+
return ErrorResponse_Code.OUT_OF_RANGE;
|
|
52
|
+
case 4:
|
|
53
|
+
case "INVALID_STATE":
|
|
54
|
+
return ErrorResponse_Code.INVALID_STATE;
|
|
55
|
+
case 5:
|
|
56
|
+
case "PERMISSION_DENIED":
|
|
57
|
+
return ErrorResponse_Code.PERMISSION_DENIED;
|
|
58
|
+
case 6:
|
|
59
|
+
case "IO_FAILURE":
|
|
60
|
+
return ErrorResponse_Code.IO_FAILURE;
|
|
61
|
+
case 7:
|
|
62
|
+
case "UNAVAILABLE":
|
|
63
|
+
return ErrorResponse_Code.UNAVAILABLE;
|
|
64
|
+
case 8:
|
|
65
|
+
case "INTERNAL":
|
|
66
|
+
return ErrorResponse_Code.INTERNAL;
|
|
67
|
+
case -1:
|
|
68
|
+
case "UNRECOGNIZED":
|
|
69
|
+
default:
|
|
70
|
+
return ErrorResponse_Code.UNRECOGNIZED;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.errorResponse_CodeFromJSON = errorResponse_CodeFromJSON;
|
|
74
|
+
function errorResponse_CodeToJSON(object) {
|
|
75
|
+
switch (object) {
|
|
76
|
+
case ErrorResponse_Code.UNSPECIFIED:
|
|
77
|
+
return "UNSPECIFIED";
|
|
78
|
+
case ErrorResponse_Code.NOT_FOUND:
|
|
79
|
+
return "NOT_FOUND";
|
|
80
|
+
case ErrorResponse_Code.INVALID_ARGUMENT:
|
|
81
|
+
return "INVALID_ARGUMENT";
|
|
82
|
+
case ErrorResponse_Code.OUT_OF_RANGE:
|
|
83
|
+
return "OUT_OF_RANGE";
|
|
84
|
+
case ErrorResponse_Code.INVALID_STATE:
|
|
85
|
+
return "INVALID_STATE";
|
|
86
|
+
case ErrorResponse_Code.PERMISSION_DENIED:
|
|
87
|
+
return "PERMISSION_DENIED";
|
|
88
|
+
case ErrorResponse_Code.IO_FAILURE:
|
|
89
|
+
return "IO_FAILURE";
|
|
90
|
+
case ErrorResponse_Code.UNAVAILABLE:
|
|
91
|
+
return "UNAVAILABLE";
|
|
92
|
+
case ErrorResponse_Code.INTERNAL:
|
|
93
|
+
return "INTERNAL";
|
|
94
|
+
case ErrorResponse_Code.UNRECOGNIZED:
|
|
95
|
+
default:
|
|
96
|
+
return "UNRECOGNIZED";
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.errorResponse_CodeToJSON = errorResponse_CodeToJSON;
|
|
12
100
|
function createBaseErrorResponse() {
|
|
13
|
-
return { errorDescription: "" };
|
|
101
|
+
return { errorDescription: "", code: 0 };
|
|
14
102
|
}
|
|
15
103
|
exports.ErrorResponse = {
|
|
16
104
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
17
105
|
if (message.errorDescription !== "") {
|
|
18
106
|
writer.uint32(10).string(message.errorDescription);
|
|
19
107
|
}
|
|
108
|
+
if (message.code !== 0) {
|
|
109
|
+
writer.uint32(16).int32(message.code);
|
|
110
|
+
}
|
|
20
111
|
return writer;
|
|
21
112
|
},
|
|
22
113
|
decode(input, length) {
|
|
@@ -33,6 +124,13 @@ exports.ErrorResponse = {
|
|
|
33
124
|
message.errorDescription = reader.string();
|
|
34
125
|
continue;
|
|
35
126
|
}
|
|
127
|
+
case 2: {
|
|
128
|
+
if (tag !== 16) {
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
message.code = reader.int32();
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
36
134
|
}
|
|
37
135
|
if ((tag & 7) === 4 || tag === 0) {
|
|
38
136
|
break;
|
|
@@ -42,13 +140,19 @@ exports.ErrorResponse = {
|
|
|
42
140
|
return message;
|
|
43
141
|
},
|
|
44
142
|
fromJSON(object) {
|
|
45
|
-
return {
|
|
143
|
+
return {
|
|
144
|
+
errorDescription: isSet(object.errorDescription) ? globalThis.String(object.errorDescription) : "",
|
|
145
|
+
code: isSet(object.code) ? errorResponse_CodeFromJSON(object.code) : 0,
|
|
146
|
+
};
|
|
46
147
|
},
|
|
47
148
|
toJSON(message) {
|
|
48
149
|
const obj = {};
|
|
49
150
|
if (message.errorDescription !== "") {
|
|
50
151
|
obj.errorDescription = message.errorDescription;
|
|
51
152
|
}
|
|
153
|
+
if (message.code !== 0) {
|
|
154
|
+
obj.code = errorResponse_CodeToJSON(message.code);
|
|
155
|
+
}
|
|
52
156
|
return obj;
|
|
53
157
|
},
|
|
54
158
|
create(base) {
|
|
@@ -57,6 +161,7 @@ exports.ErrorResponse = {
|
|
|
57
161
|
fromPartial(object) {
|
|
58
162
|
const message = createBaseErrorResponse();
|
|
59
163
|
message.errorDescription = object.errorDescription ?? "";
|
|
164
|
+
message.code = object.code ?? 0;
|
|
60
165
|
return message;
|
|
61
166
|
},
|
|
62
167
|
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { Empty } from "./google/protobuf/empty";
|
|
3
|
+
export declare const protobufPackage = "";
|
|
4
|
+
export interface FileInfo {
|
|
5
|
+
path: string;
|
|
6
|
+
sizeBytes: number;
|
|
7
|
+
messageCount: number;
|
|
8
|
+
channelCount: number;
|
|
9
|
+
startTime: Date | undefined;
|
|
10
|
+
endTime: Date | undefined;
|
|
11
|
+
channelNames: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface ListFilesRequest {
|
|
14
|
+
/**
|
|
15
|
+
* Optional glob pattern; the server picks a sensible default for its format
|
|
16
|
+
* (the mcap-replay connector defaults to "*.mcap").
|
|
17
|
+
*/
|
|
18
|
+
pattern: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListFilesResponse {
|
|
21
|
+
/** Base directory the files are listed from. */
|
|
22
|
+
baseDirectory: string;
|
|
23
|
+
files: FileInfo[];
|
|
24
|
+
}
|
|
25
|
+
export interface LoadFileRequest {
|
|
26
|
+
path: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SeekRequest {
|
|
29
|
+
/** Target playhead timestamp. Must fall within the loaded file's window. */
|
|
30
|
+
target: Date | undefined;
|
|
31
|
+
}
|
|
32
|
+
export interface SetSpeedRequest {
|
|
33
|
+
/** Playback speed multiplier; expected range [0.25, 4.0]. */
|
|
34
|
+
speed: number;
|
|
35
|
+
}
|
|
36
|
+
export interface SetLoopRequest {
|
|
37
|
+
loop: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** Generic acknowledgement for control commands. */
|
|
40
|
+
export interface ReplaySuccessResponse {
|
|
41
|
+
}
|
|
42
|
+
export declare const FileInfo: MessageFns<FileInfo>;
|
|
43
|
+
export declare const ListFilesRequest: MessageFns<ListFilesRequest>;
|
|
44
|
+
export declare const ListFilesResponse: MessageFns<ListFilesResponse>;
|
|
45
|
+
export declare const LoadFileRequest: MessageFns<LoadFileRequest>;
|
|
46
|
+
export declare const SeekRequest: MessageFns<SeekRequest>;
|
|
47
|
+
export declare const SetSpeedRequest: MessageFns<SetSpeedRequest>;
|
|
48
|
+
export declare const SetLoopRequest: MessageFns<SetLoopRequest>;
|
|
49
|
+
export declare const ReplaySuccessResponse: MessageFns<ReplaySuccessResponse>;
|
|
50
|
+
export interface ReplayControl {
|
|
51
|
+
list_files(request: ListFilesRequest): Promise<ListFilesResponse>;
|
|
52
|
+
load_file(request: LoadFileRequest): Promise<ReplaySuccessResponse>;
|
|
53
|
+
play(request: Empty): Promise<ReplaySuccessResponse>;
|
|
54
|
+
pause(request: Empty): Promise<ReplaySuccessResponse>;
|
|
55
|
+
stop(request: Empty): Promise<ReplaySuccessResponse>;
|
|
56
|
+
seek(request: SeekRequest): Promise<ReplaySuccessResponse>;
|
|
57
|
+
set_speed(request: SetSpeedRequest): Promise<ReplaySuccessResponse>;
|
|
58
|
+
set_loop(request: SetLoopRequest): Promise<ReplaySuccessResponse>;
|
|
59
|
+
}
|
|
60
|
+
export declare const ReplayControlServiceName = "ReplayControl";
|
|
61
|
+
export declare class ReplayControlClientImpl implements ReplayControl {
|
|
62
|
+
private readonly rpc;
|
|
63
|
+
private readonly service;
|
|
64
|
+
constructor(rpc: Rpc, opts?: {
|
|
65
|
+
service?: string;
|
|
66
|
+
});
|
|
67
|
+
list_files(request: ListFilesRequest): Promise<ListFilesResponse>;
|
|
68
|
+
load_file(request: LoadFileRequest): Promise<ReplaySuccessResponse>;
|
|
69
|
+
play(request: Empty): Promise<ReplaySuccessResponse>;
|
|
70
|
+
pause(request: Empty): Promise<ReplaySuccessResponse>;
|
|
71
|
+
stop(request: Empty): Promise<ReplaySuccessResponse>;
|
|
72
|
+
seek(request: SeekRequest): Promise<ReplaySuccessResponse>;
|
|
73
|
+
set_speed(request: SetSpeedRequest): Promise<ReplaySuccessResponse>;
|
|
74
|
+
set_loop(request: SetLoopRequest): Promise<ReplaySuccessResponse>;
|
|
75
|
+
}
|
|
76
|
+
interface Rpc {
|
|
77
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
78
|
+
}
|
|
79
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
80
|
+
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 {} ? {
|
|
81
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
82
|
+
} : Partial<T>;
|
|
83
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
84
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
85
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
86
|
+
} & {
|
|
87
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
88
|
+
};
|
|
89
|
+
export interface MessageFns<T> {
|
|
90
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
91
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
92
|
+
fromJSON(object: any): T;
|
|
93
|
+
toJSON(message: T): unknown;
|
|
94
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
95
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
96
|
+
}
|
|
97
|
+
export {};
|