@bikefinder/sdk 0.2.0 → 0.4.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
@@ -56,9 +56,11 @@ Other native resources expose their known fields through resource-specific docum
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
+ Hey API owns all settings and observation value types. The public `DeviceSettings` export is the generated request type; `ObservationFact` combines catalog-defined metric names/IDs with the generated `Observation` value for that metric. Its known fields stay typed while read models allow additive fields. `generate-device-sdk.mjs` emits protocol schema/catalog data and workflow descriptors; it does not compile another set of settings or observation interfaces. No second schema-to-TypeScript compiler is required.
60
+
59
61
  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
62
 
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.
63
+ 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 introduced the tracker resource layout; SDK 0.3 standardizes legacy LTE states (`queued`, `dispatched`, `expired`) and request kinds (`queue`, `cancel`) on lower-case strings. Firmware enum inputs accept strings, with numeric inputs rejected. Consumers must pin the matching prelaunch release.
62
64
 
63
65
  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.
64
66
 
@@ -85,6 +87,8 @@ npm run build --workspace @bikefinder/sdk
85
87
 
86
88
  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.
87
89
 
90
+ SignalR generation clears its owned output directory first so removed namespaces cannot remain in the source or next package. The payload bridges are rebuilt with the generated proxies.
91
+
88
92
  ## Publish
89
93
 
90
94
  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.
@@ -112,6 +116,10 @@ Command reads validate stored identity, catalog arguments, artifacts, and execut
112
116
 
113
117
  ## Current API contract
114
118
 
119
+ SDK 0.4.0 removes insurance contract/attempt methods, provider value types and subscription `tier` fields. Ordinary subscription reads and allocation remain. Deploy the matching API with this SDK release.
120
+
121
+ The shared `ObservationSeries` type replaces `AwsObservationSeries` in selections and current readings. Its JSON fields remain `definitionId` and optional `subject`; HTTP and SignalR use the same package-owned identity.
122
+
115
123
  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
124
 
117
125
  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.