@deeptrekker/api-domain 1.0.51 → 1.0.53-x4-updates.0

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.
@@ -1 +1 @@
1
- export declare const API_VERSION = "1.0.51";
1
+ export declare const API_VERSION = "1.0.53-x4-updates.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.API_VERSION = void 0;
4
4
  /* AUTO GENERATED FILE */
5
- exports.API_VERSION = "1.0.51";
5
+ exports.API_VERSION = "1.0.53-x4-updates.0";
@@ -2,7 +2,9 @@ import { Movement } from "../../../core";
2
2
  import { DeviceModel, MotorDiagnostics, SerialDevice, Sonar, Sonar3D, StereoCamera, X4CameraHead } from "../../cameraHeads";
3
3
  import { ImpaqDriver, SensorPod, X4Light } from "../../peripherals";
4
4
  import { LightConfig, ThrusterConfig } from "./deviceAllocation";
5
+ import { X4RollbackStatus, X4SystemVersion, X4UpdateFetchRequest, X4UpdateFetchStatus } from "./softwareUpdates";
5
6
  export * from "./deviceAllocation";
7
+ export * from "./softwareUpdates";
6
8
  import { CygnusType } from "../..";
7
9
  import { NavigationOptions } from "../navigation";
8
10
  /**
@@ -104,18 +106,18 @@ export type X4ThrusterFaults = {
104
106
  compensator: boolean;
105
107
  offline?: boolean;
106
108
  overtemp?: boolean;
107
- stmOvertemp?: boolean;
109
+ mcuOvertemp?: boolean;
108
110
  esc_no_comms?: boolean;
109
111
  };
110
112
  export type X4Faults = {
111
113
  light0NotEnoughMessages: boolean;
112
114
  light0Overcurrent: boolean;
113
115
  light0Overtemp: boolean;
114
- light0StmOvertemp: boolean;
116
+ light0McuOvertemp: boolean;
115
117
  light1NotEnoughMessages: boolean;
116
118
  light1Overcurrent: boolean;
117
119
  light1Overtemp: boolean;
118
- light1StmOvertemp: boolean;
120
+ light1McuOvertemp: boolean;
119
121
  pdmNotEnoughMessages: boolean;
120
122
  pdmUndervoltage24v: boolean;
121
123
  pdmOvervoltage24v: boolean;
@@ -125,10 +127,10 @@ export type X4Faults = {
125
127
  pdmOvervoltageChassis: boolean;
126
128
  pdmOvercurrent: boolean;
127
129
  pdmOvertemp: boolean;
128
- pdmStmOvertemp: boolean;
130
+ pdmMcuOvertemp: boolean;
129
131
  pdmOffline: boolean;
130
132
  pdmLeakageOvercurrent: boolean;
131
- brushlessMotorStmOvertemp: boolean;
133
+ brushlessMotorMcuOvertemp: boolean;
132
134
  brushedMotorNotEnoughMessages: boolean;
133
135
  brushedMotorOvervoltage: boolean;
134
136
  brushedMotorUndervoltage: boolean;
@@ -137,7 +139,7 @@ export type X4Faults = {
137
139
  brushedMotorOvermag: boolean;
138
140
  dvlOffline: boolean;
139
141
  vehicleInterfaceOffline: boolean;
140
- sensorPodStmOvertemp: boolean;
142
+ sensorPodMcuOvertemp: boolean;
141
143
  imuOffline: boolean;
142
144
  imuNotEnoughMessages: boolean;
143
145
  pressureNotEnoughMessages: boolean;
@@ -145,7 +147,7 @@ export type X4Faults = {
145
147
  pressureHighPressure: boolean;
146
148
  temperatureOvertemp: boolean;
147
149
  temperatureNotEnoughMessages: boolean;
148
- sfpStmOvertemp: boolean;
150
+ sfpMcuOvertemp: boolean;
149
151
  };
150
152
  /**
151
153
  * The X4 drive command type.
@@ -858,4 +860,18 @@ export type X4 = {
858
860
  * Low power mode for the vehicle
859
861
  */
860
862
  lowPowerMode?: boolean;
863
+ /**
864
+ * The app sends an {@link X4UpdateFetchRequest | X4UpdateFetchRequest} to start or cancel
865
+ * a Spectra update, and the vehicle reports an {@link X4UpdateFetchStatus | X4UpdateFetchStatus}.
866
+ */
867
+ updateFetch?: X4UpdateFetchRequest | X4UpdateFetchStatus;
868
+ /**
869
+ * The app sends `true` to roll back to the previous application slot, and the vehicle
870
+ * reports an {@link X4RollbackStatus | X4RollbackStatus}.
871
+ */
872
+ rollback?: boolean | X4RollbackStatus;
873
+ /**
874
+ * The OS and application versions installed on the vehicle. Read only.
875
+ */
876
+ systemVersion?: X4SystemVersion;
861
877
  };
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.ControlMode = exports.CoordinateType = void 0;
18
18
  __exportStar(require("./deviceAllocation"), exports);
19
+ __exportStar(require("./softwareUpdates"), exports);
19
20
  /**
20
21
  * The coordinate system used for navigation and positioning.
21
22
  * @internal
@@ -0,0 +1,119 @@
1
+ /**
2
+ * The kind of Spectra update. A minor update replaces the ROS application, a major update replaces the OS.
3
+ * @group X4
4
+ * @category Software Updates
5
+ */
6
+ export type X4UpdateKind = "minor" | "major";
7
+ /**
8
+ * The sizes in bytes of the files the app will upload over the data channel.
9
+ * @group X4
10
+ * @category Software Updates
11
+ */
12
+ export type X4UpdateUploadSizes = {
13
+ payload?: number;
14
+ manifest?: number;
15
+ signature?: number;
16
+ tools?: number;
17
+ };
18
+ /**
19
+ * Asks the vehicle to download an update from a URL.
20
+ * @group X4
21
+ * @category Software Updates
22
+ */
23
+ export type X4UpdateFetchUrlRequest = {
24
+ url: string;
25
+ type: X4UpdateKind;
26
+ toolsUrl?: string;
27
+ manifestUrl?: string;
28
+ signatureUrl?: string;
29
+ };
30
+ /**
31
+ * Asks the vehicle to receive an update that the app uploads over the data channel.
32
+ * @group X4
33
+ * @category Software Updates
34
+ */
35
+ export type X4UpdateFetchUploadRequest = {
36
+ type: X4UpdateKind;
37
+ transport: "datachannel";
38
+ upload: X4UpdateUploadSizes;
39
+ };
40
+ /**
41
+ * Cancels the update fetch in progress.
42
+ * @group X4
43
+ * @category Software Updates
44
+ */
45
+ export type X4UpdateFetchCancelRequest = {
46
+ cancel: true;
47
+ };
48
+ /**
49
+ * A request the app sends as `updateFetch`.
50
+ * @group X4
51
+ * @category Software Updates
52
+ */
53
+ export type X4UpdateFetchRequest = X4UpdateFetchUrlRequest | X4UpdateFetchUploadRequest | X4UpdateFetchCancelRequest;
54
+ /**
55
+ * The state of an update fetch as the vehicle reports it.
56
+ * @group X4
57
+ * @category Software Updates
58
+ */
59
+ export type X4UpdateFetchState = "idle" | "requested" | "starting" | "downloading" | "verifying" | "applying" | "staging" | "staged" | "applied" | "cancelling" | "cancelled" | "failed" | "unknown";
60
+ /**
61
+ * The status the vehicle reports as `updateFetch`.
62
+ * The progress fields are only present while the vehicle knows the total size,
63
+ * and `finished_at` only once the fetch has ended.
64
+ * @group X4
65
+ * @category Software Updates
66
+ */
67
+ export type X4UpdateFetchStatus = {
68
+ state?: X4UpdateFetchState;
69
+ detail?: string;
70
+ run?: string;
71
+ url?: string;
72
+ type?: string;
73
+ cancellable?: boolean;
74
+ percent?: number;
75
+ bytes?: number;
76
+ total?: number;
77
+ eta_s?: number;
78
+ elapsed_s?: number;
79
+ finished_at?: string;
80
+ };
81
+ /**
82
+ * The state of a rollback as the vehicle reports it.
83
+ * @group X4
84
+ * @category Software Updates
85
+ */
86
+ export type X4RollbackState = "idle" | "requested" | "running" | "succeeded" | "failed" | "unknown";
87
+ /**
88
+ * The status the vehicle reports as `rollback`. `from` and `to` are application slots.
89
+ * @group X4
90
+ * @category Software Updates
91
+ */
92
+ export type X4RollbackStatus = {
93
+ state?: X4RollbackState;
94
+ detail?: string;
95
+ run?: string;
96
+ from?: string;
97
+ to?: string;
98
+ finished_at?: string;
99
+ };
100
+ /**
101
+ * The OS and application versions the vehicle reports as `systemVersion`,
102
+ * including the previous application slot that a rollback would return to.
103
+ * @group X4
104
+ * @category Software Updates
105
+ */
106
+ export type X4SystemVersion = {
107
+ osHash?: string;
108
+ osVersion?: string;
109
+ appSlot?: string;
110
+ appVersion?: string;
111
+ appBuildDate?: string;
112
+ appBranch?: string;
113
+ appCommit?: string;
114
+ appBuiltVersion?: string;
115
+ rollbackSlot?: string;
116
+ rollbackVersion?: string;
117
+ rollbackBuildDate?: string;
118
+ rollbackAvailable?: boolean;
119
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeptrekker/api-domain",
3
- "version": "1.0.51",
3
+ "version": "1.0.53-x4-updates.0",
4
4
  "description": "A business domain of types and schemas that the Deep Trekker topside communicates with via an API.",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -37,16 +37,16 @@
37
37
  "@knodes/typedoc-plugin-code-blocks": "^0.22.7",
38
38
  "@types/lodash": "^4.14.182",
39
39
  "@types/node": "^22.0.0",
40
- "@typescript-eslint/eslint-plugin": "^6.1.0",
41
- "@typescript-eslint/parser": "^6.1.0",
42
40
  "@zamiell/typedoc-plugin-not-exported": "^0.2.0",
43
- "eslint": "^8.45.0",
44
- "eslint-config-prettier": "^8.8.0",
45
- "eslint-plugin-unused-imports": "^3.0.0",
46
41
  "prettier": "3.0.3",
47
42
  "rimraf": "^3.0.2",
48
43
  "semver-compare-cli": "^2.0.0",
49
44
  "ts-json-schema-generator": "2.4.0",
45
+ "eslint": "^8.45.0",
46
+ "@typescript-eslint/eslint-plugin": "^6.1.0",
47
+ "@typescript-eslint/parser": "^6.1.0",
48
+ "eslint-plugin-unused-imports": "^3.0.0",
49
+ "eslint-config-prettier": "^8.8.0",
50
50
  "ts-node": "^10.8.1",
51
51
  "tslib": "^2.4.0",
52
52
  "typedoc": "^0.28.9",
@@ -62,7 +62,6 @@
62
62
  "mkdirp": "^1.0.4",
63
63
  "ts-pattern": "^4.3.0",
64
64
  "ts-toolbelt": "^9.6.0",
65
- "type-zoo": "^3.4.1",
66
- "yarn": "^1.22.22"
65
+ "type-zoo": "^3.4.1"
67
66
  }
68
67
  }