@bikefinder/sdk 0.1.7 → 0.2.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.
package/README.md CHANGED
@@ -50,13 +50,15 @@ The application owns subscription sharing, retained data and account scope. Subs
50
50
 
51
51
  The application's Auth0 SDK supplies tokens and handles refresh. Create a new client for a new account session. `dispose()` aborts HTTP requests and stops both connections. Requests use bearer authentication, omit cookies and reject redirects. Network/validation failures reject; HTTP Problem Details are available as `result.error` by default. Writes are never automatically retried; a `503 operation_unconfirmed` may already have committed.
52
52
 
53
- REST calls automatically validate response structure without transforming response JSON. The API validates and converts stored data before responding; `readIssues` identifies unusable stored fields. Stream values use the native SignalR decoder; import `zTrackerDocument` from `@bikefinder/sdk/schemas` and call `.parse(value)` for the same runtime boundary check on a stream message. Both transports reference the same generated payload types. Firestore responses come from the actual C# DTOs in `Firestore/TrackerData.cs` and `Firestore/ResourceData.cs`. Additional metadata remains in explicit JSON extension fields. Server-serialized response fixtures are validated by both API and generated-client tests. IDs are exact Firestore IDs.
53
+ REST calls automatically validate response structure without transforming response JSON. The API uses native Firestore mapping and narrow field converters before responding. Malformed known values fail with `stored_data_invalid`; ordinary document responses no longer carry partial-data `readIssues`. Stream values use the native SignalR decoder; import `zTrackerDocument` from `@bikefinder/sdk/schemas` and call `.parse(value)` for the same runtime boundary check on a stream message. Both transports reference the same generated payload types. Firestore responses come from the actual C# DTOs in `Firestore/TrackerData.cs` and `Firestore/ResourceData.cs`. Unmodeled storage fields are ignored, never forwarded into response extensions. Server-serialized response fixtures are validated by both API and generated-client tests. IDs are exact Firestore IDs.
54
54
 
55
- Other native resources expose their known fields through resource-specific document types. Their C# contracts expose only interpreted fields; unrelated stored fields stay inside the API. Tracker reports and statistics have concrete models, and access-code storage is omitted from responses. Observation values are generated unions: after `observation.definitionId === 5`, `observation.value.percent` is a number. Current readings expose the same discriminator; check `observationId !== null` before using a present reading. Device settings, the built-in workflow descriptor and command argument tuples are generated from the canonical protocol JSON contracts. Bike and preference patches expose supported properties and distinguish omission from explicit null. Response validators preserve additional API fields while checking known values and required properties. Workflow diagnostic states are extensible strings, including `idle` and `rest`; display or preserve unfamiliar states. Request models retain their declared constraints and closed objects reject unknown write fields. Shared payloads have generated read variants so a tolerant response never weakens a request schema.
55
+ Other native resources expose their known fields through resource-specific document types. Their C# contracts expose only interpreted fields; unrelated stored fields stay inside the API. Tracker reports and statistics have concrete models, and access-code storage is omitted from responses. Observation values use the shared generated union: narrow observation.type before reading its typed value. Current readings expose a nullable typed observation.
56
56
 
57
57
  The handwritten entry point only configures clients, authentication and disposal. Hub methods, wire names and streaming signatures are generated. A generated type-only bridge reuses OpenAPI payload definitions instead of publishing a second set of models. There is no RxJS or MQTT dependency.
58
58
 
59
- AWS staff methods deal with general observation, command and settings resources. Use `requests.readAwsObservations` to select current observation series, `getAwsSettings` to read the singleton settings shadow, and `updateAwsSettings` to patch typed settings with an expected version. The generated `staffRealtime.hub.watchAwsObservations`, `watchAwsCommand` and `watchAwsSettings` methods return native SignalR streams. See the [AWS resource map](../../docs/api/aws.md) for database and command-acceptance semantics.
59
+ Staff diagnostics use the same tracker inventory ID as `getStaffTracker`. Use `requests.readStaffTrackerObservations({path: {id}, query: {series: observationSeriesQuery([{definitionId, subject?}])}})` for current values, `getStaffTrackerSettings` to read settings, and `updateStaffTrackerSettings` to patch typed settings with an expected version. Import `observationSeriesQuery` from this package. These reads use GET; account batches use `readStaffAccounts({query: {ids}})`. `getStaffTrackerCommandCatalog` returns definitions and availability together. The generated `staffRealtime.hub.watchObservations`, `watchCommand(id, operationId)` and `watchSettings` methods return native SignalR streams. Staff tracker pages accept `StaffTrackerPageRequest` with an optional exact `selection`, matching REST filters. See the [tracker diagnostics map](../../docs/api/aws.md) for database, identity and acceptance semantics.
60
+
61
+ Command and firmware acceptance returns `202` with a `Location` status URL. Recover a command with `getStaffTrackerCommand({path: {id, operationId}})` using the original caller-generated UUID; its numeric hardware request ID is receipt evidence. Do not allocate a new UUID after an uncertain write. SDK 0.2.0 contains intentional prelaunch breaking changes; Support Hub integration remains a separate follow-up.
60
62
 
61
63
  The runtime requires standard Fetch, Request, Blob, AbortController and `AbortSignal.any`/`throwIfAborted`, plus a WebSocket implementation supported by SignalR. Supply the relevant platform polyfills before creating a client when needed.
62
64
 
@@ -73,7 +75,6 @@ From the repository root:
73
75
  ```powershell
74
76
  dotnet tool restore
75
77
  dotnet restore services/api/src/Api.csproj --locked-mode
76
- dotnet build services/api/src/Api.csproj --no-restore
77
78
  npm ci --ignore-scripts
78
79
  npm run contract --workspace @bikefinder/sdk
79
80
  npm run generate --workspace @bikefinder/sdk
@@ -82,70 +83,41 @@ npm test --workspace @bikefinder/sdk
82
83
  npm run build --workspace @bikefinder/sdk
83
84
  ```
84
85
 
85
- The pinned .NET tool is configured in `.config/dotnet-tools.json`. Contract export runs the built service locally to retrieve OpenAPI; no Firebase credentials or live requests are needed. Generation fails if either generator fails. Generated source is committed and must be regenerated together. `tsc-alias` resolves generated extensionless imports when compiling the ESM package. The focused tests cover authentication, document fidelity, binary writes, uncertain write responses, native proxy invocation/cancellation and disposal.
86
+ The pinned .NET tool is configured in `.config/dotnet-tools.json`. Contract export uses Microsoft's build-time generator with a mock server and inert configuration; no cloud credentials or listening HTTP server are needed. Ordinary builds do not export the contract. Generation fails if either generator fails. Generated source is committed and must be regenerated together. `tsc-alias` resolves generated extensionless imports when compiling the ESM package. The focused tests cover authentication, typed payloads, binary writes, uncertain write responses, native proxy invocation/cancellation and disposal.
86
87
 
87
88
  ## Publish
88
89
 
89
- Bump this package's version and the root lockfile. **Publish API client**
90
- (`publish-client.yml`) runs when the package manifest changes on `main`; it can also be run manually. The workflow checks the generated schemas, runs
91
- the SDK tests, builds and publishes using GitHub OIDC. It does not deploy AWS
92
- services and requires no npm token or per-release browser approval.
90
+ Bump this package's version and the root lockfile. Generate, check, test and build locally, then publish with `npm publish --workspace @bikefinder/sdk --access public` when release is authorized. Use the existing local npm authentication; never put a token in the repository. Publishing the package does not deploy the API.
91
+
92
+ The optional **Publish API client** workflow (`publish-client.yml`) uses GitHub OIDC when Actions minutes are available. Local releases do not depend on that workflow.
93
93
 
94
94
  The npm package's trusted publisher must name organization `bikefinder`,
95
95
  repository `aws_cloud`, workflow `publish-client.yml`, with direct `npm publish`
96
96
  allowed and no environment name. This account setup is performed once in the
97
97
  package's npm settings. See [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/).
98
98
 
99
- Command HTTP and SignalR methods return `AwsCommand`. Requests, broker publication and `execution.accepted`/`execution.completed` are distinct stages on that resource. The client no longer joins command-result observations or exposes a separate results endpoint. A completion includes a typed response data union and authenticated receipt time.
99
+ Command HTTP reads return `AwsCommand`; command subscriptions return `AwsCommandUpdate` with a command or an explicit read issue. Requests, broker publication and `execution.accepted`/`execution.completed` are distinct stages on that resource. There is no separate command-result observation endpoint. A completion includes a typed response data union and authenticated receipt time.
100
100
 
101
101
  ## Observation timestamps
102
102
 
103
- Observation history and current readings expose `measuredAt` and `receivedAt`.
103
+ Observation history exposes `measuredAt` and `receivedAt`. Current readings expose these on `reading.observation`, which is null when no current value exists.
104
104
  Observation IDs are opaque server-generated references. They carry no boot or
105
105
  sequence information. Distinct rows can have identical capture timestamps;
106
106
  clients must not infer physical ordering from their IDs. History can contain
107
107
  separate rows for an at-least-once delivery of the same reading.
108
108
 
109
- The source contract has changed after SDK 1.0.14. Before deploying consumers,
110
- publish the next SDK release and update their registry dependency and lockfile.
111
- Local validation can use the newly built SDK; keep that temporary override out
112
- of committed consumer dependencies.
113
-
114
109
  Settings responses use the API-owned `AwsSettingsSnapshot` for HTTP and SignalR: read typed `desired`, `reported`, `application`, capabilities and schema/version evidence directly. `readIssues` identifies stored values the API could not interpret. The resource does not expose the underlying AWS shadow document or its independent owners. Settings fields and bounds come from the same protocol registry as the firmware.
115
110
 
116
111
  Command reads validate stored identity, catalog arguments, artifacts, and execution evidence. A malformed single-command read returns `command_unreadable`; command pages keep valid items and attach per-request `readIssues`. Both command streams emit `AwsCommandUpdate` with either a validated `command` or a `readIssue`, allowing subsequent events to continue.
117
112
 
118
- ## Supported API consumers
119
-
120
- `@bikefinder/sdk@0.1.7` is the supported baseline for the 2026-11-07 minimum-rest
121
- release with automatic response validation and extensible diagnostic strings.
122
- Older closed-state readers should upgrade for the extensible diagnostic contract.
123
- SDK 0.1.6 disables automatic response validation; upgrade to 0.1.7 to retain it.
124
- The preceding prelaunch cutover retired experimental `@bikefinder/api-client`
125
- releases and their older AWS contracts. The `/v1` route version is unchanged.
126
- Future breaking changes still require an explicit retirement decision or a
127
- separate API version.
128
-
129
- The tolerant response policy remains in place. Mode availability is an ID list,
130
- and selected mode IDs are open strings validated against each tracker's cloud
131
- catalog. Adding or removing catalog choices does not require another SDK release.
132
-
133
- API CI installs the oldest supported immutable npm release selected in
134
- `tools/check-api-compatibility.mjs`. It validates freshly server-serialized
135
- Firestore, command and settings fixtures with that published reader, exercises
136
- its HTTP transformer and stream-message schema, and checks additions at envelope
137
- and nested-settings levels. The package includes its exported OpenAPI contract
138
- under `@bikefinder/sdk/openapi` for the comparison.
139
-
140
- The `compatibility` job runs oasdiff against that published contract, applying the
141
- same tolerant-read policy to both documents. Request validation stays strict.
142
- The gate rejects removed endpoints or response fields, incompatible types and
143
- bounds, newly required inputs, and incompatible enum changes. Add a separate API
144
- version for breaking changes and retain the supported v1 routes. Raising the
145
- oldest supported SDK version is an explicit retirement decision, not a routine
146
- way to pass CI. Dev deployment and production promotion both require this job.
147
-
148
- Runtime validation rejects malformed known data. Stream consumers should retain
149
- last valid messages and isolate failures per resource. When patching
150
- settings, send only changed supported fields; preserve unfamiliar response fields
151
- and do not copy a full response into a write payload.
113
+ ## Current API contract
114
+
115
+ The API has no external consumers. The owner approved breaking changes during this simplification; the published 0.1.x SDK is not a compatibility baseline. Update the API and generated SDK together. No legacy response wrappers or parallel versioned route tree are retained.
116
+
117
+ Observation history and events use the shared typed Observation union, discriminated by its catalog-defined type string. Current readings contain the selected series and a nullable typed CurrentObservation. Null means that no current reading exists. HTTP and SignalR use these same models.
118
+
119
+ Request validation stays strict and response validation checks known fields without dropping additions. Mode IDs remain open strings from catalog data. Protocol schemas still own value bounds, subject rules, conditional constraints and presentation metadata.
120
+
121
+ Contract export uses Microsoft.Extensions.ApiDescription.Server through the contract script. It executes startup with inert configuration and disables cloud event workers; it does not open a listening HTTP server or need cloud credentials. Ordinary builds do not rewrite the checked-in contract.
122
+
123
+ Run SDK generation, type checks, runtime contract tests and the build together before release. Publishing the SDK and deploying the API are separate local operations; generated code does not itself publish or deploy anything.
@@ -595,7 +595,7 @@ export declare const observationValueSchema: {
595
595
  readonly required: readonly ["pci", "earfcn", "rsrp", "rsrq"];
596
596
  readonly additionalProperties: false;
597
597
  };
598
- readonly CellScan: {
598
+ readonly CellularEnvironment: {
599
599
  readonly type: "object";
600
600
  readonly properties: {
601
601
  readonly serving: {
@@ -5216,13 +5216,13 @@ export declare const observationValueSchema: {
5216
5216
  };
5217
5217
  };
5218
5218
  };
5219
- readonly "radio.bleScan": {
5219
+ readonly "radio.bleDevices": {
5220
5220
  readonly type: "array";
5221
5221
  readonly items: {
5222
5222
  readonly $ref: "#/$defs/BleDevice";
5223
5223
  };
5224
5224
  readonly maxItems: 20;
5225
- readonly title: "Radio ble scan";
5225
+ readonly title: "Nearby BLE devices";
5226
5226
  readonly description: "BLE scan evidence is distinct from BLE enabled/unlocked status.";
5227
5227
  readonly "x-bf": {
5228
5228
  readonly definitionId: 151;
@@ -5230,37 +5230,37 @@ export declare const observationValueSchema: {
5230
5230
  readonly subject: "device";
5231
5231
  readonly producer: "device";
5232
5232
  readonly presentation: {
5233
- readonly displayName: "Radio ble scan";
5233
+ readonly displayName: "Nearby BLE devices";
5234
5234
  readonly description: "BLE scan evidence is distinct from BLE enabled/unlocked status.";
5235
5235
  readonly hiddenByDefault: false;
5236
5236
  readonly formatter: "bleScan";
5237
5237
  };
5238
5238
  };
5239
5239
  };
5240
- readonly "radio.cellScan": {
5241
- readonly $ref: "#/$defs/CellScan";
5242
- readonly title: "Radio cell scan";
5243
- readonly description: "Cell scan and registration latency are distinct facts; distinguish passive serving-cell updates from extended scans.";
5240
+ readonly "radio.cellularEnvironment": {
5241
+ readonly $ref: "#/$defs/CellularEnvironment";
5242
+ readonly title: "Cellular environment";
5243
+ readonly description: "Coherent serving-cell identity, radio technology and signal evidence, with neighbouring or global cells when explicitly requested. Routine tracking reads serving-cell information without an extended cell search.";
5244
5244
  readonly "x-bf": {
5245
5245
  readonly definitionId: 152;
5246
5246
  readonly role: "measurement";
5247
5247
  readonly subject: "device";
5248
5248
  readonly producer: "device";
5249
5249
  readonly presentation: {
5250
- readonly displayName: "Radio cell scan";
5251
- readonly description: "Cell scan and registration latency are distinct facts; distinguish passive serving-cell updates from extended scans.";
5250
+ readonly displayName: "Cellular environment";
5251
+ readonly description: "Coherent serving-cell identity, radio technology and signal evidence, with neighbouring or global cells when explicitly requested. Routine tracking reads serving-cell information without an extended cell search.";
5252
5252
  readonly hiddenByDefault: false;
5253
5253
  readonly formatter: "cellScan";
5254
5254
  };
5255
5255
  };
5256
5256
  };
5257
- readonly "radio.wifiScan": {
5257
+ readonly "radio.wifiAccessPoints": {
5258
5258
  readonly type: "array";
5259
5259
  readonly items: {
5260
5260
  readonly $ref: "#/$defs/WifiAccessPoint";
5261
5261
  };
5262
5262
  readonly maxItems: 20;
5263
- readonly title: "Radio wifi scan";
5263
+ readonly title: "Wi-Fi access points";
5264
5264
  readonly description: "The coherent Wi-Fi scan is positioning evidence; retain an empty successful scan separately from a failed scan.";
5265
5265
  readonly "x-bf": {
5266
5266
  readonly definitionId: 153;
@@ -5268,7 +5268,7 @@ export declare const observationValueSchema: {
5268
5268
  readonly subject: "device";
5269
5269
  readonly producer: "device";
5270
5270
  readonly presentation: {
5271
- readonly displayName: "Radio wifi scan";
5271
+ readonly displayName: "Wi-Fi access points";
5272
5272
  readonly description: "The coherent Wi-Fi scan is positioning evidence; retain an empty successful scan separately from a failed scan.";
5273
5273
  readonly hiddenByDefault: false;
5274
5274
  readonly formatter: "wifiScan";
@@ -5384,7 +5384,9 @@ export declare const observationValueSchema: {
5384
5384
  readonly type: "boolean";
5385
5385
  };
5386
5386
  readonly mode: {
5387
- readonly type: "string";
5387
+ readonly type: "integer";
5388
+ readonly minimum: 0;
5389
+ readonly maximum: 2;
5388
5390
  };
5389
5391
  };
5390
5392
  readonly required: readonly ["completedCount", "trigger", "outcome", "elapsedMs", "activeMs", "activityMs", "activityEntries", "recoveries", "saturated", "mode"];
@@ -5428,7 +5430,9 @@ export declare const observationValueSchema: {
5428
5430
  readonly maximum: 65535;
5429
5431
  };
5430
5432
  readonly mode: {
5431
- readonly type: "string";
5433
+ readonly type: "integer";
5434
+ readonly minimum: 0;
5435
+ readonly maximum: 2;
5432
5436
  };
5433
5437
  readonly state: {
5434
5438
  readonly type: "string";
@@ -6111,9 +6115,11 @@ export declare const settingsValueSchema: {
6111
6115
  readonly description: "Advertising interval in 0.625 millisecond units. Applied by the peripheral owner independently of LTE connection work.";
6112
6116
  };
6113
6117
  readonly mode: {
6114
- readonly type: "string";
6115
- readonly title: "Tracking mode";
6116
- readonly description: "Underlying firmware behavior. Offered tracking modes are cloud-configurable profiles.";
6118
+ readonly type: "integer";
6119
+ readonly minimum: 0;
6120
+ readonly maximum: 2;
6121
+ readonly title: "Firmware mode ID";
6122
+ readonly description: "Stable integer firmware mode ID: 0, 1 or 2. Each mode’s stages are defined in firmware. Public mode names are mapped to these IDs by the assigned tracking mode catalog.";
6117
6123
  };
6118
6124
  readonly poweredReportIntervalSeconds: {
6119
6125
  readonly type: "integer";
@@ -6122,47 +6128,47 @@ export declare const settingsValueSchema: {
6122
6128
  readonly title: "Powered report interval";
6123
6129
  readonly description: "Period between tracking reports on confirmed external power.";
6124
6130
  };
6125
- readonly standardIdleSeconds: {
6131
+ readonly mode0IdleSeconds: {
6126
6132
  readonly type: "integer";
6127
6133
  readonly minimum: 60;
6128
6134
  readonly maximum: 604800;
6129
- readonly title: "Standard idle duration";
6130
- readonly description: "Maximum battery idle duration after a standard cycle.";
6135
+ readonly title: "Mode 0 idle duration";
6136
+ readonly description: "Maximum battery idle duration after a mode 0 cycle, measured from the end of work.";
6131
6137
  };
6132
- readonly securityIdleSeconds: {
6138
+ readonly mode1IdleSeconds: {
6133
6139
  readonly type: "integer";
6134
6140
  readonly minimum: 60;
6135
6141
  readonly maximum: 604800;
6136
- readonly title: "Security idle duration";
6137
- readonly description: "Maximum battery idle duration after a security cycle.";
6142
+ readonly title: "Mode 1 idle duration";
6143
+ readonly description: "Maximum battery idle duration after a mode 1 cycle, measured from the end of work.";
6138
6144
  };
6139
- readonly trackingIdleSeconds: {
6145
+ readonly mode2IdleSeconds: {
6140
6146
  readonly type: "integer";
6141
6147
  readonly minimum: 10;
6142
6148
  readonly maximum: 86400;
6143
- readonly title: "Tracking idle duration";
6144
- readonly description: "Maximum battery idle duration after a tracking cycle.";
6149
+ readonly title: "Mode 2 idle duration";
6150
+ readonly description: "Maximum battery idle duration after a mode 2 cycle, measured from the end of work.";
6145
6151
  };
6146
- readonly standardMinimumRestSeconds: {
6152
+ readonly mode0MinimumRestSeconds: {
6147
6153
  readonly type: "integer";
6148
6154
  readonly minimum: 0;
6149
6155
  readonly maximum: 86400;
6150
- readonly title: "Standard movement rest";
6151
- readonly description: "Minimum rest before movement starts another standard cycle.";
6156
+ readonly title: "Mode 0 minimum rest";
6157
+ readonly description: "Duration after a mode 0 cycle with the accelerometer and its wake interrupt disabled. Firmware re-enables motion detection when this period ends.";
6152
6158
  };
6153
- readonly securityMinimumRestSeconds: {
6159
+ readonly mode1MinimumRestSeconds: {
6154
6160
  readonly type: "integer";
6155
6161
  readonly minimum: 0;
6156
6162
  readonly maximum: 86400;
6157
- readonly title: "Security movement rest";
6158
- readonly description: "Minimum rest before movement starts another security cycle.";
6163
+ readonly title: "Mode 1 minimum rest";
6164
+ readonly description: "Duration after a mode 1 cycle with the accelerometer and its wake interrupt disabled. Firmware re-enables motion detection when this period ends.";
6159
6165
  };
6160
- readonly trackingMinimumRestSeconds: {
6166
+ readonly mode2MinimumRestSeconds: {
6161
6167
  readonly type: "integer";
6162
6168
  readonly minimum: 0;
6163
6169
  readonly maximum: 86400;
6164
- readonly title: "Tracking movement rest";
6165
- readonly description: "Minimum rest before movement starts another tracking cycle.";
6170
+ readonly title: "Mode 2 minimum rest";
6171
+ readonly description: "Duration after a mode 2 cycle with the accelerometer and its wake interrupt disabled. Firmware re-enables motion detection when this period ends.";
6166
6172
  };
6167
6173
  readonly psmResidenceSeconds: {
6168
6174
  readonly type: "integer";
@@ -6362,7 +6368,7 @@ export declare const settingsValueSchema: {
6362
6368
  readonly "x-bf": {
6363
6369
  readonly domain: "settings";
6364
6370
  readonly version: 1;
6365
- readonly settingsSchemaVersion: 28;
6371
+ readonly settingsSchemaVersion: 33;
6366
6372
  };
6367
6373
  };
6368
6374
  export declare const observationDefinitions: readonly [{
@@ -8252,36 +8258,36 @@ export declare const observationDefinitions: readonly [{
8252
8258
  };
8253
8259
  }, {
8254
8260
  readonly id: 151;
8255
- readonly name: "radio.bleScan";
8261
+ readonly name: "radio.bleDevices";
8256
8262
  readonly role: "measurement";
8257
8263
  readonly subject: "device";
8258
8264
  readonly producer: "device";
8259
8265
  readonly presentation: {
8260
- readonly displayName: "Radio ble scan";
8266
+ readonly displayName: "Nearby BLE devices";
8261
8267
  readonly description: "BLE scan evidence is distinct from BLE enabled/unlocked status.";
8262
8268
  readonly hiddenByDefault: false;
8263
8269
  readonly formatter: "bleScan";
8264
8270
  };
8265
8271
  }, {
8266
8272
  readonly id: 152;
8267
- readonly name: "radio.cellScan";
8273
+ readonly name: "radio.cellularEnvironment";
8268
8274
  readonly role: "measurement";
8269
8275
  readonly subject: "device";
8270
8276
  readonly producer: "device";
8271
8277
  readonly presentation: {
8272
- readonly displayName: "Radio cell scan";
8273
- readonly description: "Cell scan and registration latency are distinct facts; distinguish passive serving-cell updates from extended scans.";
8278
+ readonly displayName: "Cellular environment";
8279
+ readonly description: "Coherent serving-cell identity, radio technology and signal evidence, with neighbouring or global cells when explicitly requested. Routine tracking reads serving-cell information without an extended cell search.";
8274
8280
  readonly hiddenByDefault: false;
8275
8281
  readonly formatter: "cellScan";
8276
8282
  };
8277
8283
  }, {
8278
8284
  readonly id: 153;
8279
- readonly name: "radio.wifiScan";
8285
+ readonly name: "radio.wifiAccessPoints";
8280
8286
  readonly role: "measurement";
8281
8287
  readonly subject: "device";
8282
8288
  readonly producer: "device";
8283
8289
  readonly presentation: {
8284
- readonly displayName: "Radio wifi scan";
8290
+ readonly displayName: "Wi-Fi access points";
8285
8291
  readonly description: "The coherent Wi-Fi scan is positioning evidence; retain an empty successful scan separately from a failed scan.";
8286
8292
  readonly hiddenByDefault: false;
8287
8293
  readonly formatter: "wifiScan";
@@ -8956,13 +8962,13 @@ export type WiFiTimeoutCount = number;
8956
8962
  *
8957
8963
  * @maxItems 20
8958
8964
  */
8959
- export type RadioBleScan = BleDevice[];
8965
+ export type NearbyBLEDevices = BleDevice[];
8960
8966
  /**
8961
8967
  * The coherent Wi-Fi scan is positioning evidence; retain an empty successful scan separately from a failed scan.
8962
8968
  *
8963
8969
  * @maxItems 20
8964
8970
  */
8965
- export type RadioWifiScan = WifiAccessPoint[];
8971
+ export type WiFiAccessPoints = WifiAccessPoint[];
8966
8972
  export interface ObservationValues {
8967
8973
  "agnss.completed"?: AgnssCompleted;
8968
8974
  "agnss.transferTrace"?: AgnssTransferTrace;
@@ -9099,9 +9105,9 @@ export interface ObservationValues {
9099
9105
  "power.wifiScanEntries"?: WiFiScanningEntryCount;
9100
9106
  "power.wifiScanMs"?: WiFiScanningTotalTime;
9101
9107
  "power.wifiTimeouts"?: WiFiTimeoutCount;
9102
- "radio.bleScan"?: RadioBleScan;
9103
- "radio.cellScan"?: RadioCellScan;
9104
- "radio.wifiScan"?: RadioWifiScan;
9108
+ "radio.bleDevices"?: NearbyBLEDevices;
9109
+ "radio.cellularEnvironment"?: CellularEnvironment;
9110
+ "radio.wifiAccessPoints"?: WiFiAccessPoints;
9105
9111
  "system.booted"?: SystemBooted;
9106
9112
  "wifi.scanCompleted"?: WifiScanCompleted;
9107
9113
  "work.completed"?: WorkCompleted;
@@ -9604,9 +9610,9 @@ export interface BleDevice {
9604
9610
  companyId: number;
9605
9611
  }
9606
9612
  /**
9607
- * Cell scan and registration latency are distinct facts; distinguish passive serving-cell updates from extended scans.
9613
+ * Coherent serving-cell identity, radio technology and signal evidence, with neighbouring or global cells when explicitly requested. Routine tracking reads serving-cell information without an extended cell search.
9608
9614
  */
9609
- export interface RadioCellScan {
9615
+ export interface CellularEnvironment {
9610
9616
  serving: CellReading;
9611
9617
  rat: "lteM" | "nbIot";
9612
9618
  /**
@@ -9689,7 +9695,7 @@ export interface WorkCompleted {
9689
9695
  activityEntries: ActivityEntries;
9690
9696
  recoveries: RecoveryCounts;
9691
9697
  saturated: boolean;
9692
- mode: string;
9698
+ mode: number;
9693
9699
  }
9694
9700
  export interface ActivityDurations {
9695
9701
  rrc: number;
@@ -9722,7 +9728,7 @@ export interface RecoveryCounts {
9722
9728
  */
9723
9729
  export interface WorkflowExecution {
9724
9730
  workflowVersion: number;
9725
- mode: string;
9731
+ mode: number;
9726
9732
  state: string;
9727
9733
  owner: "workflow" | "command" | "update" | "recovery" | "shutdown" | "fault" | "settings" | "charging" | "ble" | "network";
9728
9734
  phase: "entered" | "completed" | "cancelled" | "ownerChanged" | "snapshot";
@@ -9940,37 +9946,37 @@ export type BLEAdvertisingRequiresExternalPower = boolean;
9940
9946
  */
9941
9947
  export type BLEAdvertisingInterval = number;
9942
9948
  /**
9943
- * Underlying firmware behavior. Offered tracking modes are cloud-configurable profiles.
9949
+ * Stable integer firmware mode ID: 0, 1 or 2. Each mode’s stages are defined in firmware. Public mode names are mapped to these IDs by the assigned tracking mode catalog.
9944
9950
  */
9945
- export type TrackingMode = string;
9951
+ export type FirmwareModeID = number;
9946
9952
  /**
9947
9953
  * Period between tracking reports on confirmed external power.
9948
9954
  */
9949
9955
  export type PoweredReportInterval = number;
9950
9956
  /**
9951
- * Maximum battery idle duration after a standard cycle.
9957
+ * Maximum battery idle duration after a mode 0 cycle, measured from the end of work.
9952
9958
  */
9953
- export type StandardIdleDuration = number;
9959
+ export type Mode0IdleDuration = number;
9954
9960
  /**
9955
- * Maximum battery idle duration after a security cycle.
9961
+ * Maximum battery idle duration after a mode 1 cycle, measured from the end of work.
9956
9962
  */
9957
- export type SecurityIdleDuration = number;
9963
+ export type Mode1IdleDuration = number;
9958
9964
  /**
9959
- * Maximum battery idle duration after a tracking cycle.
9965
+ * Maximum battery idle duration after a mode 2 cycle, measured from the end of work.
9960
9966
  */
9961
- export type TrackingIdleDuration = number;
9967
+ export type Mode2IdleDuration = number;
9962
9968
  /**
9963
- * Minimum rest before movement starts another standard cycle.
9969
+ * Duration after a mode 0 cycle with the accelerometer and its wake interrupt disabled. Firmware re-enables motion detection when this period ends.
9964
9970
  */
9965
- export type StandardMovementRest = number;
9971
+ export type Mode0MinimumRest = number;
9966
9972
  /**
9967
- * Minimum rest before movement starts another security cycle.
9973
+ * Duration after a mode 1 cycle with the accelerometer and its wake interrupt disabled. Firmware re-enables motion detection when this period ends.
9968
9974
  */
9969
- export type SecurityMovementRest = number;
9975
+ export type Mode1MinimumRest = number;
9970
9976
  /**
9971
- * Minimum rest before movement starts another tracking cycle.
9977
+ * Duration after a mode 2 cycle with the accelerometer and its wake interrupt disabled. Firmware re-enables motion detection when this period ends.
9972
9978
  */
9973
- export type TrackingMovementRest = number;
9979
+ export type Mode2MinimumRest = number;
9974
9980
  /**
9975
9981
  * Maximum idle time in PSM before setting the modem offline; capped by the existing idle deadline.
9976
9982
  */
@@ -10115,14 +10121,14 @@ export interface DeviceSettings {
10115
10121
  bleAdvertisingEnabled?: BLEAdvertising;
10116
10122
  bleAdvertisingRequiresExternalPower?: BLEAdvertisingRequiresExternalPower;
10117
10123
  bleAdvertisingIntervalUnits?: BLEAdvertisingInterval;
10118
- mode?: TrackingMode;
10124
+ mode?: FirmwareModeID;
10119
10125
  poweredReportIntervalSeconds?: PoweredReportInterval;
10120
- standardIdleSeconds?: StandardIdleDuration;
10121
- securityIdleSeconds?: SecurityIdleDuration;
10122
- trackingIdleSeconds?: TrackingIdleDuration;
10123
- standardMinimumRestSeconds?: StandardMovementRest;
10124
- securityMinimumRestSeconds?: SecurityMovementRest;
10125
- trackingMinimumRestSeconds?: TrackingMovementRest;
10126
+ mode0IdleSeconds?: Mode0IdleDuration;
10127
+ mode1IdleSeconds?: Mode1IdleDuration;
10128
+ mode2IdleSeconds?: Mode2IdleDuration;
10129
+ mode0MinimumRestSeconds?: Mode0MinimumRest;
10130
+ mode1MinimumRestSeconds?: Mode1MinimumRest;
10131
+ mode2MinimumRestSeconds?: Mode2MinimumRest;
10126
10132
  psmResidenceSeconds?: PSMResidence;
10127
10133
  commandListenSeconds?: TrackingCommandWindow;
10128
10134
  gnssSearchTimeoutSeconds?: GNSSSearchTimeout;