@rise-maritime/keelson-js 0.6.0-alpha.255.dev.1 → 0.6.0-alpha.275.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 (48) hide show
  1. package/dist/index.d.ts +83 -8
  2. package/dist/index.js +23 -1
  3. package/dist/index.test.js +31 -0
  4. package/dist/interfaces/AlarmAck.d.ts +2 -2
  5. package/dist/interfaces/AlarmAck.js +2 -2
  6. package/dist/interfaces/ContainerControl.d.ts +239 -0
  7. package/dist/interfaces/ContainerControl.js +1053 -0
  8. package/dist/interfaces/ContainerHost.d.ts +403 -0
  9. package/dist/interfaces/ContainerHost.js +1230 -0
  10. package/dist/interfaces/ErrorResponse.d.ts +7 -2
  11. package/dist/interfaces/ErrorResponse.js +12 -2
  12. package/dist/interfaces/Route.d.ts +141 -6
  13. package/dist/interfaces/Route.js +309 -4
  14. package/dist/interfaces/RoutePlanner.d.ts +19 -1
  15. package/dist/interfaces/RoutePlanner.js +23 -1
  16. package/dist/interfaces/ScenarioControl.d.ts +132 -3
  17. package/dist/interfaces/ScenarioControl.js +439 -37
  18. package/dist/interfaces/VehicleNavigation.d.ts +55 -0
  19. package/dist/interfaces/VehicleNavigation.js +233 -1
  20. package/dist/interfaces/VehicleSimulatorControl.d.ts +0 -83
  21. package/dist/interfaces/VehicleSimulatorControl.js +1 -293
  22. package/dist/interfaces/serviceRegistry.d.ts +84 -8
  23. package/dist/interfaces/serviceRegistry.js +4 -0
  24. package/dist/interfaces.json +2 -0
  25. package/dist/payloads/AdviceDisposition.d.ts +55 -0
  26. package/dist/payloads/AdviceDisposition.js +242 -0
  27. package/dist/payloads/ChecklistHandover.d.ts +522 -0
  28. package/dist/payloads/ChecklistHandover.js +1735 -0
  29. package/dist/payloads/ContainerHost.d.ts +407 -0
  30. package/dist/payloads/ContainerHost.js +1245 -0
  31. package/dist/payloads/Encounter.d.ts +104 -0
  32. package/dist/payloads/Encounter.js +573 -0
  33. package/dist/payloads/NavigationAdvice.d.ts +94 -0
  34. package/dist/payloads/NavigationAdvice.js +596 -0
  35. package/dist/payloads/NavigationState.d.ts +90 -0
  36. package/dist/payloads/NavigationState.js +377 -0
  37. package/dist/payloads/Route.d.ts +142 -6
  38. package/dist/payloads/Route.js +318 -4
  39. package/dist/payloads/RouteExecution.d.ts +7 -0
  40. package/dist/payloads/ScenarioEvent.d.ts +14 -0
  41. package/dist/payloads/ScenarioEvent.js +16 -0
  42. package/dist/payloads/index.d.ts +1 -1
  43. package/dist/payloads/index.js +2 -2
  44. package/dist/payloads/index.keelson.d.ts +10 -4
  45. package/dist/payloads/index.keelson.js +10 -4
  46. package/dist/qos.json +6 -0
  47. package/dist/subjects.json +20 -1
  48. package/package.json +1 -1
@@ -1,4 +1,18 @@
1
1
  export declare const serviceDefinitions: {
2
+ readonly "alarm_ack/v1": {
3
+ readonly name: "AlarmAck";
4
+ readonly fullName: "keelson.interfaces.alarm_ack.AlarmAck";
5
+ readonly methods: {
6
+ readonly acknowledge_alarm: {
7
+ readonly name: "acknowledge_alarm";
8
+ readonly requestType: import("./AlarmAck").MessageFns<import("./AlarmAck").AcknowledgeAlarmRequest>;
9
+ readonly requestStream: false;
10
+ readonly responseType: import("./AlarmAck").MessageFns<import("./AlarmAck").AcknowledgeAlarmResponse>;
11
+ readonly responseStream: false;
12
+ readonly options: {};
13
+ };
14
+ };
15
+ };
2
16
  readonly "configurable/v1": {
3
17
  readonly name: "Configurable";
4
18
  readonly fullName: "keelson.interfaces.configurable.Configurable";
@@ -21,6 +35,60 @@ export declare const serviceDefinitions: {
21
35
  };
22
36
  };
23
37
  };
38
+ readonly "container_control/v1": {
39
+ readonly name: "ContainerControl";
40
+ readonly fullName: "keelson.interfaces.container_control.ContainerControl";
41
+ readonly methods: {
42
+ readonly list: {
43
+ readonly name: "list";
44
+ readonly requestType: import("./ContainerControl").MessageFns<import("./ContainerControl").ListContainersRequest>;
45
+ readonly requestStream: false;
46
+ readonly responseType: import("./ContainerControl").MessageFns<import("./ContainerControl").ListContainersResponse>;
47
+ readonly responseStream: false;
48
+ readonly options: {};
49
+ };
50
+ readonly logs: {
51
+ readonly name: "logs";
52
+ readonly requestType: import("./ContainerControl").MessageFns<import("./ContainerControl").GetLogsRequest>;
53
+ readonly requestStream: false;
54
+ readonly responseType: import("./ContainerControl").MessageFns<import("./ContainerControl").GetLogsResponse>;
55
+ readonly responseStream: false;
56
+ readonly options: {};
57
+ };
58
+ readonly start: {
59
+ readonly name: "start";
60
+ readonly requestType: import("./ContainerControl").MessageFns<import("./ContainerControl").StartContainerRequest>;
61
+ readonly requestStream: false;
62
+ readonly responseType: import("./ContainerControl").MessageFns<import("./ContainerControl").ContainerActionResponse>;
63
+ readonly responseStream: false;
64
+ readonly options: {};
65
+ };
66
+ readonly stop: {
67
+ readonly name: "stop";
68
+ readonly requestType: import("./ContainerControl").MessageFns<import("./ContainerControl").StopContainerRequest>;
69
+ readonly requestStream: false;
70
+ readonly responseType: import("./ContainerControl").MessageFns<import("./ContainerControl").ContainerActionResponse>;
71
+ readonly responseStream: false;
72
+ readonly options: {};
73
+ };
74
+ readonly restart: {
75
+ readonly name: "restart";
76
+ readonly requestType: import("./ContainerControl").MessageFns<import("./ContainerControl").RestartContainerRequest>;
77
+ readonly requestStream: false;
78
+ readonly responseType: import("./ContainerControl").MessageFns<import("./ContainerControl").ContainerActionResponse>;
79
+ readonly responseStream: false;
80
+ readonly options: {};
81
+ };
82
+ readonly remove: {
83
+ readonly name: "remove";
84
+ readonly requestType: import("./ContainerControl").MessageFns<import("./ContainerControl").RemoveContainerRequest>;
85
+ readonly requestStream: false;
86
+ readonly responseType: import("./ContainerControl").MessageFns<import("./ContainerControl").RemoveContainerResponse>;
87
+ readonly responseStream: false;
88
+ readonly options: {};
89
+ };
90
+ };
91
+ };
24
92
  readonly "mavlink_command/v1": {
25
93
  readonly name: "MavlinkCommand";
26
94
  readonly fullName: "keelson.interfaces.mavlink_command.MavlinkCommand";
@@ -199,6 +267,14 @@ export declare const serviceDefinitions: {
199
267
  readonly name: "ScenarioControl";
200
268
  readonly fullName: "keelson.interfaces.scenario_control.ScenarioControl";
201
269
  readonly methods: {
270
+ readonly list_scenarios: {
271
+ readonly name: "list_scenarios";
272
+ readonly requestType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").ListScenariosRequest>;
273
+ readonly requestStream: false;
274
+ readonly responseType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").ListScenariosResponse>;
275
+ readonly responseStream: false;
276
+ readonly options: {};
277
+ };
202
278
  readonly load: {
203
279
  readonly name: "load";
204
280
  readonly requestType: import("./ScenarioControl").MessageFns<import("./ScenarioControl").LoadRequest>;
@@ -441,6 +517,14 @@ export declare const serviceDefinitions: {
441
517
  readonly responseStream: false;
442
518
  readonly options: {};
443
519
  };
520
+ readonly set_steering_order: {
521
+ readonly name: "set_steering_order";
522
+ readonly requestType: import("./VehicleNavigation").MessageFns<import("./VehicleNavigation").SetSteeringOrderRequest>;
523
+ readonly requestStream: false;
524
+ readonly responseType: import("./VehicleNavigation").MessageFns<import("./VehicleNavigation").SetSteeringOrderResponse>;
525
+ readonly responseStream: false;
526
+ readonly options: {};
527
+ };
444
528
  };
445
529
  };
446
530
  readonly "vehicle_param/v1": {
@@ -501,14 +585,6 @@ export declare const serviceDefinitions: {
501
585
  readonly responseStream: false;
502
586
  readonly options: {};
503
587
  };
504
- readonly set_standing_order: {
505
- readonly name: "set_standing_order";
506
- readonly requestType: import("./VehicleSimulatorControl").MessageFns<import("./VehicleSimulatorControl").StandingOrder>;
507
- readonly requestStream: false;
508
- readonly responseType: import("./VehicleSimulatorControl").MessageFns<import("./VehicleSimulatorControl").SetStandingOrderResponse>;
509
- readonly responseStream: false;
510
- readonly options: {};
511
- };
512
588
  };
513
589
  };
514
590
  readonly "whep_proxy/v1": {
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serviceDefinitions = void 0;
4
4
  // Generated by generate_javascript.sh - DO NOT EDIT.
5
+ const AlarmAck_1 = require("./AlarmAck");
5
6
  const Configurable_1 = require("./Configurable");
7
+ const ContainerControl_1 = require("./ContainerControl");
6
8
  const MavlinkCommand_1 = require("./MavlinkCommand");
7
9
  const NetworkPingPong_1 = require("./NetworkPingPong");
8
10
  const ReplayControl_1 = require("./ReplayControl");
@@ -20,7 +22,9 @@ const VehicleParam_1 = require("./VehicleParam");
20
22
  const VehicleSimulatorControl_1 = require("./VehicleSimulatorControl");
21
23
  const WHEPProxy_1 = require("./WHEPProxy");
22
24
  exports.serviceDefinitions = {
25
+ "alarm_ack/v1": AlarmAck_1.AlarmAckDefinition,
23
26
  "configurable/v1": Configurable_1.ConfigurableDefinition,
27
+ "container_control/v1": ContainerControl_1.ContainerControlDefinition,
24
28
  "mavlink_command/v1": MavlinkCommand_1.MavlinkCommandDefinition,
25
29
  "network_ping_pong/v1": NetworkPingPong_1.NetworkPingPongDefinition,
26
30
  "replay_control/v1": ReplayControl_1.ReplayControlDefinition,
@@ -1,5 +1,7 @@
1
1
  {
2
+ "alarm_ack/v1": "keelson.interfaces.alarm_ack.AlarmAck",
2
3
  "configurable/v1": "keelson.interfaces.configurable.Configurable",
4
+ "container_control/v1": "keelson.interfaces.container_control.ContainerControl",
3
5
  "mavlink_command/v1": "keelson.interfaces.mavlink_command.MavlinkCommand",
4
6
  "network_ping_pong/v1": "keelson.interfaces.network_ping_pong.NetworkPingPong",
5
7
  "replay_control/v1": "keelson.interfaces.replay_control.ReplayControl",
@@ -0,0 +1,55 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ /**
3
+ * What happened to one NavigationAdvice, and who decided.
4
+ *
5
+ * ACCEPTED and REJECTED come from whoever holds the decision for the function (an operator at a
6
+ * station, or a conduct service under a grant). SUPERSEDED and EXPIRED come from the advisor
7
+ * itself. Only ACCEPTED licenses acting, and only within the advice's validity window.
8
+ */
9
+ export interface AdviceDisposition {
10
+ $type: "keelson.AdviceDisposition";
11
+ timestamp: Date | undefined;
12
+ adviceId: string;
13
+ voyageId?: string | undefined;
14
+ state: AdviceDisposition_State;
15
+ /**
16
+ * Who: "ted@ROC-1", or the source id of the service that decided. Free text, like raised_by,
17
+ * changed_by and acknowledged_by elsewhere.
18
+ */
19
+ decidedBy: string;
20
+ /** For SUPERSEDED: the advice that replaced it. */
21
+ supersededBy?: string | undefined;
22
+ /** Free text. Consumers MUST NOT parse it. */
23
+ reason: string;
24
+ }
25
+ export declare enum AdviceDisposition_State {
26
+ STATE_UNSPECIFIED = 0,
27
+ STATE_ACCEPTED = 1,
28
+ STATE_REJECTED = 2,
29
+ STATE_SUPERSEDED = 3,
30
+ STATE_EXPIRED = 4,
31
+ UNRECOGNIZED = -1
32
+ }
33
+ export declare function adviceDisposition_StateFromJSON(object: any): AdviceDisposition_State;
34
+ export declare function adviceDisposition_StateToJSON(object: AdviceDisposition_State): string;
35
+ export declare const AdviceDisposition: MessageFns<AdviceDisposition, "keelson.AdviceDisposition">;
36
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
37
+ 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 {} ? {
38
+ [K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
39
+ } : Partial<T>;
40
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
41
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
42
+ [K in keyof P]: Exact<P[K], I[K]>;
43
+ } & {
44
+ [K in Exclude<keyof I, KeysOfUnion<P> | "$type">]: never;
45
+ };
46
+ interface MessageFns<T, V extends string> {
47
+ readonly $type: V;
48
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
49
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
50
+ fromJSON(object: any): T;
51
+ toJSON(message: T): unknown;
52
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
53
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
54
+ }
55
+ export {};
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.6.1
5
+ // protoc v6.30.2
6
+ // source: AdviceDisposition.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AdviceDisposition = exports.adviceDisposition_StateToJSON = exports.adviceDisposition_StateFromJSON = exports.AdviceDisposition_State = void 0;
9
+ /* eslint-disable */
10
+ const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const timestamp_1 = require("./google/protobuf/timestamp");
12
+ const typeRegistry_1 = require("./typeRegistry");
13
+ var AdviceDisposition_State;
14
+ (function (AdviceDisposition_State) {
15
+ AdviceDisposition_State[AdviceDisposition_State["STATE_UNSPECIFIED"] = 0] = "STATE_UNSPECIFIED";
16
+ AdviceDisposition_State[AdviceDisposition_State["STATE_ACCEPTED"] = 1] = "STATE_ACCEPTED";
17
+ AdviceDisposition_State[AdviceDisposition_State["STATE_REJECTED"] = 2] = "STATE_REJECTED";
18
+ AdviceDisposition_State[AdviceDisposition_State["STATE_SUPERSEDED"] = 3] = "STATE_SUPERSEDED";
19
+ AdviceDisposition_State[AdviceDisposition_State["STATE_EXPIRED"] = 4] = "STATE_EXPIRED";
20
+ AdviceDisposition_State[AdviceDisposition_State["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
+ })(AdviceDisposition_State || (exports.AdviceDisposition_State = AdviceDisposition_State = {}));
22
+ function adviceDisposition_StateFromJSON(object) {
23
+ switch (object) {
24
+ case 0:
25
+ case "STATE_UNSPECIFIED":
26
+ return AdviceDisposition_State.STATE_UNSPECIFIED;
27
+ case 1:
28
+ case "STATE_ACCEPTED":
29
+ return AdviceDisposition_State.STATE_ACCEPTED;
30
+ case 2:
31
+ case "STATE_REJECTED":
32
+ return AdviceDisposition_State.STATE_REJECTED;
33
+ case 3:
34
+ case "STATE_SUPERSEDED":
35
+ return AdviceDisposition_State.STATE_SUPERSEDED;
36
+ case 4:
37
+ case "STATE_EXPIRED":
38
+ return AdviceDisposition_State.STATE_EXPIRED;
39
+ case -1:
40
+ case "UNRECOGNIZED":
41
+ default:
42
+ return AdviceDisposition_State.UNRECOGNIZED;
43
+ }
44
+ }
45
+ exports.adviceDisposition_StateFromJSON = adviceDisposition_StateFromJSON;
46
+ function adviceDisposition_StateToJSON(object) {
47
+ switch (object) {
48
+ case AdviceDisposition_State.STATE_UNSPECIFIED:
49
+ return "STATE_UNSPECIFIED";
50
+ case AdviceDisposition_State.STATE_ACCEPTED:
51
+ return "STATE_ACCEPTED";
52
+ case AdviceDisposition_State.STATE_REJECTED:
53
+ return "STATE_REJECTED";
54
+ case AdviceDisposition_State.STATE_SUPERSEDED:
55
+ return "STATE_SUPERSEDED";
56
+ case AdviceDisposition_State.STATE_EXPIRED:
57
+ return "STATE_EXPIRED";
58
+ case AdviceDisposition_State.UNRECOGNIZED:
59
+ default:
60
+ return "UNRECOGNIZED";
61
+ }
62
+ }
63
+ exports.adviceDisposition_StateToJSON = adviceDisposition_StateToJSON;
64
+ function createBaseAdviceDisposition() {
65
+ return {
66
+ $type: "keelson.AdviceDisposition",
67
+ timestamp: undefined,
68
+ adviceId: "",
69
+ voyageId: undefined,
70
+ state: 0,
71
+ decidedBy: "",
72
+ supersededBy: undefined,
73
+ reason: "",
74
+ };
75
+ }
76
+ exports.AdviceDisposition = {
77
+ $type: "keelson.AdviceDisposition",
78
+ encode(message, writer = new wire_1.BinaryWriter()) {
79
+ if (message.timestamp !== undefined) {
80
+ timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).join();
81
+ }
82
+ if (message.adviceId !== "") {
83
+ writer.uint32(18).string(message.adviceId);
84
+ }
85
+ if (message.voyageId !== undefined) {
86
+ writer.uint32(26).string(message.voyageId);
87
+ }
88
+ if (message.state !== 0) {
89
+ writer.uint32(32).int32(message.state);
90
+ }
91
+ if (message.decidedBy !== "") {
92
+ writer.uint32(42).string(message.decidedBy);
93
+ }
94
+ if (message.supersededBy !== undefined) {
95
+ writer.uint32(58).string(message.supersededBy);
96
+ }
97
+ if (message.reason !== "") {
98
+ writer.uint32(66).string(message.reason);
99
+ }
100
+ return writer;
101
+ },
102
+ decode(input, length) {
103
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
104
+ let end = length === undefined ? reader.len : reader.pos + length;
105
+ const message = createBaseAdviceDisposition();
106
+ while (reader.pos < end) {
107
+ const tag = reader.uint32();
108
+ switch (tag >>> 3) {
109
+ case 1: {
110
+ if (tag !== 10) {
111
+ break;
112
+ }
113
+ message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
114
+ continue;
115
+ }
116
+ case 2: {
117
+ if (tag !== 18) {
118
+ break;
119
+ }
120
+ message.adviceId = reader.string();
121
+ continue;
122
+ }
123
+ case 3: {
124
+ if (tag !== 26) {
125
+ break;
126
+ }
127
+ message.voyageId = reader.string();
128
+ continue;
129
+ }
130
+ case 4: {
131
+ if (tag !== 32) {
132
+ break;
133
+ }
134
+ message.state = reader.int32();
135
+ continue;
136
+ }
137
+ case 5: {
138
+ if (tag !== 42) {
139
+ break;
140
+ }
141
+ message.decidedBy = reader.string();
142
+ continue;
143
+ }
144
+ case 7: {
145
+ if (tag !== 58) {
146
+ break;
147
+ }
148
+ message.supersededBy = reader.string();
149
+ continue;
150
+ }
151
+ case 8: {
152
+ if (tag !== 66) {
153
+ break;
154
+ }
155
+ message.reason = reader.string();
156
+ continue;
157
+ }
158
+ }
159
+ if ((tag & 7) === 4 || tag === 0) {
160
+ break;
161
+ }
162
+ reader.skip(tag & 7);
163
+ }
164
+ return message;
165
+ },
166
+ fromJSON(object) {
167
+ return {
168
+ $type: exports.AdviceDisposition.$type,
169
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
170
+ adviceId: isSet(object.adviceId) ? globalThis.String(object.adviceId) : "",
171
+ voyageId: isSet(object.voyageId) ? globalThis.String(object.voyageId) : undefined,
172
+ state: isSet(object.state) ? adviceDisposition_StateFromJSON(object.state) : 0,
173
+ decidedBy: isSet(object.decidedBy) ? globalThis.String(object.decidedBy) : "",
174
+ supersededBy: isSet(object.supersededBy) ? globalThis.String(object.supersededBy) : undefined,
175
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
176
+ };
177
+ },
178
+ toJSON(message) {
179
+ const obj = {};
180
+ if (message.timestamp !== undefined) {
181
+ obj.timestamp = message.timestamp.toISOString();
182
+ }
183
+ if (message.adviceId !== "") {
184
+ obj.adviceId = message.adviceId;
185
+ }
186
+ if (message.voyageId !== undefined) {
187
+ obj.voyageId = message.voyageId;
188
+ }
189
+ if (message.state !== 0) {
190
+ obj.state = adviceDisposition_StateToJSON(message.state);
191
+ }
192
+ if (message.decidedBy !== "") {
193
+ obj.decidedBy = message.decidedBy;
194
+ }
195
+ if (message.supersededBy !== undefined) {
196
+ obj.supersededBy = message.supersededBy;
197
+ }
198
+ if (message.reason !== "") {
199
+ obj.reason = message.reason;
200
+ }
201
+ return obj;
202
+ },
203
+ create(base) {
204
+ return exports.AdviceDisposition.fromPartial(base ?? {});
205
+ },
206
+ fromPartial(object) {
207
+ const message = createBaseAdviceDisposition();
208
+ message.timestamp = object.timestamp ?? undefined;
209
+ message.adviceId = object.adviceId ?? "";
210
+ message.voyageId = object.voyageId ?? undefined;
211
+ message.state = object.state ?? 0;
212
+ message.decidedBy = object.decidedBy ?? "";
213
+ message.supersededBy = object.supersededBy ?? undefined;
214
+ message.reason = object.reason ?? "";
215
+ return message;
216
+ },
217
+ };
218
+ typeRegistry_1.messageTypeRegistry.set(exports.AdviceDisposition.$type, exports.AdviceDisposition);
219
+ function toTimestamp(date) {
220
+ const seconds = Math.trunc(date.getTime() / 1000);
221
+ const nanos = (date.getTime() % 1000) * 1000000;
222
+ return { $type: "google.protobuf.Timestamp", seconds, nanos };
223
+ }
224
+ function fromTimestamp(t) {
225
+ let millis = (t.seconds || 0) * 1000;
226
+ millis += (t.nanos || 0) / 1000000;
227
+ return new globalThis.Date(millis);
228
+ }
229
+ function fromJsonTimestamp(o) {
230
+ if (o instanceof globalThis.Date) {
231
+ return o;
232
+ }
233
+ else if (typeof o === "string") {
234
+ return new globalThis.Date(o);
235
+ }
236
+ else {
237
+ return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
238
+ }
239
+ }
240
+ function isSet(value) {
241
+ return value !== null && value !== undefined;
242
+ }