@bikefinder/sdk 0.2.0 → 0.3.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.
@@ -6132,7 +6132,7 @@ export type LegacyLteCancellation = {
6132
6132
  cycleId: string;
6133
6133
  [key: string]: unknown;
6134
6134
  };
6135
- export type LegacyLteDispatchState = "Queued" | "Dispatched" | "Expired";
6135
+ export type LegacyLteDispatchState = "queued" | "dispatched" | "expired";
6136
6136
  export type LegacyLteOperation = {
6137
6137
  requestId: string;
6138
6138
  kind: LegacyLteOperationKind;
@@ -6142,7 +6142,7 @@ export type LegacyLteOperation = {
6142
6142
  requestedAt: string;
6143
6143
  [key: string]: unknown;
6144
6144
  };
6145
- export type LegacyLteOperationKind = "Queue" | "Cancel";
6145
+ export type LegacyLteOperationKind = "queue" | "cancel";
6146
6146
  export type LegacyLteUpgrade = {
6147
6147
  cycleId: string;
6148
6148
  targetVersion: string;
@@ -8798,19 +8798,19 @@ export declare const zLegacyLteCancellation: z.ZodObject<{
8798
8798
  cycleId: z.ZodString;
8799
8799
  }, z.core.$catchall<z.ZodUnknown>>;
8800
8800
  export declare const zLegacyLteDispatchState: z.ZodEnum<{
8801
- Queued: "Queued";
8802
- Dispatched: "Dispatched";
8803
- Expired: "Expired";
8801
+ queued: "queued";
8802
+ dispatched: "dispatched";
8803
+ expired: "expired";
8804
8804
  }>;
8805
8805
  export declare const zLegacyLteOperationKind: z.ZodEnum<{
8806
- Queue: "Queue";
8807
- Cancel: "Cancel";
8806
+ cancel: "cancel";
8807
+ queue: "queue";
8808
8808
  }>;
8809
8809
  export declare const zLegacyLteOperation: z.ZodObject<{
8810
8810
  requestId: z.ZodUUID;
8811
8811
  kind: z.ZodEnum<{
8812
- Queue: "Queue";
8813
- Cancel: "Cancel";
8812
+ cancel: "cancel";
8813
+ queue: "queue";
8814
8814
  }>;
8815
8815
  cycleId: z.ZodString;
8816
8816
  fromVersion: z.ZodNullable<z.ZodString>;
@@ -8821,9 +8821,9 @@ export declare const zLegacyLteUpgrade: z.ZodObject<{
8821
8821
  cycleId: z.ZodString;
8822
8822
  targetVersion: z.ZodString;
8823
8823
  state: z.ZodEnum<{
8824
- Queued: "Queued";
8825
- Dispatched: "Dispatched";
8826
- Expired: "Expired";
8824
+ queued: "queued";
8825
+ dispatched: "dispatched";
8826
+ expired: "expired";
8827
8827
  }>;
8828
8828
  expiresAt: z.ZodNullable<z.ZodISODateTime>;
8829
8829
  }, z.core.$catchall<z.ZodUnknown>>;
@@ -8842,9 +8842,9 @@ export declare const zLegacyLteUpgradeOptions: z.ZodObject<{
8842
8842
  cycleId: z.ZodString;
8843
8843
  targetVersion: z.ZodString;
8844
8844
  state: z.ZodEnum<{
8845
- Queued: "Queued";
8846
- Dispatched: "Dispatched";
8847
- Expired: "Expired";
8845
+ queued: "queued";
8846
+ dispatched: "dispatched";
8847
+ expired: "expired";
8848
8848
  }>;
8849
8849
  expiresAt: z.ZodNullable<z.ZodISODateTime>;
8850
8850
  }, z.core.$catchall<z.ZodUnknown>>>>;
@@ -29030,9 +29030,9 @@ export declare const zGetLegacyLteUpgradeOptionsResponse: z.ZodObject<{
29030
29030
  cycleId: z.ZodString;
29031
29031
  targetVersion: z.ZodString;
29032
29032
  state: z.ZodEnum<{
29033
- Queued: "Queued";
29034
- Dispatched: "Dispatched";
29035
- Expired: "Expired";
29033
+ queued: "queued";
29034
+ dispatched: "dispatched";
29035
+ expired: "expired";
29036
29036
  }>;
29037
29037
  expiresAt: z.ZodNullable<z.ZodISODateTime>;
29038
29038
  }, z.core.$catchall<z.ZodUnknown>>>>;
@@ -29078,8 +29078,8 @@ export declare const zGetLegacyLteUpgradeRequestPath: z.ZodObject<{
29078
29078
  export declare const zGetLegacyLteUpgradeRequestResponse: z.ZodObject<{
29079
29079
  requestId: z.ZodUUID;
29080
29080
  kind: z.ZodEnum<{
29081
- Queue: "Queue";
29082
- Cancel: "Cancel";
29081
+ cancel: "cancel";
29082
+ queue: "queue";
29083
29083
  }>;
29084
29084
  cycleId: z.ZodString;
29085
29085
  fromVersion: z.ZodNullable<z.ZodString>;
@@ -6393,11 +6393,11 @@ export const zLegacyLteCancellation = z
6393
6393
  })
6394
6394
  .catchall(z.unknown());
6395
6395
  export const zLegacyLteDispatchState = z.enum([
6396
- "Queued",
6397
- "Dispatched",
6398
- "Expired",
6396
+ "queued",
6397
+ "dispatched",
6398
+ "expired",
6399
6399
  ]);
6400
- export const zLegacyLteOperationKind = z.enum(["Queue", "Cancel"]);
6400
+ export const zLegacyLteOperationKind = z.enum(["queue", "cancel"]);
6401
6401
  export const zLegacyLteOperation = z
6402
6402
  .object({
6403
6403
  requestId: z.uuid(),
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { ApiRequests } from "./generated/sdk.gen.js";
2
+ import type { Observation } from "./generated/types.gen.js";
3
+ import type { observationDefinitions } from "./device-schema.js";
2
4
  export type * from "./generated/types.gen.js";
3
5
  export type { ITrackerHub, IStaffTrackerHub, } from "./signalr/TypedSignalR.Client/BikeFinder.Api.Trackers.js";
4
- export type { PageRequest, StaffTrackerPageRequest, TrackerSelection, } from "./signalr/BikeFinder.Api.Trackers.js";
6
+ export type { StaffTrackerPageRequest, TrackerSelection, } from "./signalr/BikeFinder.Api.Trackers.js";
7
+ export type { PageRequest } from "./signalr/BikeFinder.Api.Http.js";
5
8
  export type { HubConnection, IStreamResult, IStreamSubscriber, ISubscription, } from "@microsoft/signalr";
6
9
  export interface ClientOptions {
7
10
  baseUrl: string;
@@ -27,4 +30,15 @@ export declare function observationSeriesQuery(series: readonly import("./genera
27
30
  export { workflowDefinition } from "./workflow-schema.js";
28
31
  export type { FirmwareMode, WorkflowState } from "./workflow-schema.js";
29
32
  export { observationValueSchema, observationDefinitions, settingsValueSchema, } from "./device-schema.js";
30
- export type { ObservationFact, MetricName, DeviceSettings, } from "./device-schema.js";
33
+ type ObservationDefinition = (typeof observationDefinitions)[number];
34
+ export type MetricName = ObservationDefinition["name"];
35
+ /** Protocol identity with the same typed value used by HTTP and realtime. */
36
+ export type ObservationFact = {
37
+ [D in ObservationDefinition as D["name"]]: {
38
+ definitionId: D["id"];
39
+ metric: D["name"];
40
+ value: Extract<Observation, {
41
+ type: D["name"];
42
+ }>["value"];
43
+ };
44
+ }[MetricName];
@@ -0,0 +1,7 @@
1
+ /** Transpiled from BikeFinder.Api.Http.PageRequest */
2
+ export type PageRequest = {
3
+ /** Transpiled from int */
4
+ limit: number;
5
+ /** Transpiled from string? */
6
+ cursor?: string;
7
+ };
@@ -0,0 +1,4 @@
1
+ /* THIS (.ts) FILE IS GENERATED BY Tapper */
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ export {};
@@ -1,10 +1,3 @@
1
- /** Transpiled from BikeFinder.Api.Trackers.PageRequest */
2
- export type PageRequest = {
3
- /** Transpiled from int */
4
- limit: number;
5
- /** Transpiled from string? */
6
- cursor?: string;
7
- };
8
1
  /** Transpiled from BikeFinder.Api.Trackers.StaffTrackerPageRequest */
9
2
  export type StaffTrackerPageRequest = {
10
3
  /** Transpiled from int */
@@ -1,6 +1,7 @@
1
1
  import type { IStreamResult } from "@microsoft/signalr";
2
2
  import type { TrackerDocument, TrackerPage, AccountProfileDocument, NotificationPage, SubscriptionPage, FavoritePage } from "../BikeFinder.Api.Firestore.js";
3
- import type { PageRequest, StaffTrackerPageRequest } from "../BikeFinder.Api.Trackers.js";
3
+ import type { PageRequest } from "../BikeFinder.Api.Http.js";
4
+ import type { StaffTrackerPageRequest } from "../BikeFinder.Api.Trackers.js";
4
5
  import type { AwsObservationSelection, AwsObservationReading, AwsCommandUpdate, AwsSettingsSnapshot } from "../BikeFinder.Api.Aws.js";
5
6
  import type { Observation } from "../BikeFinder.Observations.Model.js";
6
7
  export type ITrackerHub = {
@@ -11,7 +12,7 @@ export type ITrackerHub = {
11
12
  */
12
13
  watchTracker(id: string): IStreamResult<TrackerDocument>;
13
14
  /**
14
- * @param query Transpiled from BikeFinder.Api.Trackers.PageRequest
15
+ * @param query Transpiled from BikeFinder.Api.Http.PageRequest
15
16
  * @param cancellation Transpiled from System.Threading.CancellationToken
16
17
  * @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Firestore.TrackerPage>
17
18
  */
@@ -22,13 +23,13 @@ export type ITrackerHub = {
22
23
  */
23
24
  watchAccount(): IStreamResult<AccountProfileDocument>;
24
25
  /**
25
- * @param query Transpiled from BikeFinder.Api.Trackers.PageRequest
26
+ * @param query Transpiled from BikeFinder.Api.Http.PageRequest
26
27
  * @param cancellation Transpiled from System.Threading.CancellationToken
27
28
  * @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Firestore.NotificationPage>
28
29
  */
29
30
  watchNotifications(query: PageRequest): IStreamResult<NotificationPage>;
30
31
  /**
31
- * @param query Transpiled from BikeFinder.Api.Trackers.PageRequest
32
+ * @param query Transpiled from BikeFinder.Api.Http.PageRequest
32
33
  * @param cancellation Transpiled from System.Threading.CancellationToken
33
34
  * @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Firestore.SubscriptionPage>
34
35
  */
@@ -80,7 +81,7 @@ export type IStaffTrackerHub = {
80
81
  */
81
82
  watchSettings(id: string): IStreamResult<AwsSettingsSnapshot>;
82
83
  /**
83
- * @param query Transpiled from BikeFinder.Api.Trackers.PageRequest
84
+ * @param query Transpiled from BikeFinder.Api.Http.PageRequest
84
85
  * @param cancellation Transpiled from System.Threading.CancellationToken
85
86
  * @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Firestore.FavoritePage>
86
87
  */
package/openapi/api.json CHANGED
@@ -31032,9 +31032,9 @@
31032
31032
  },
31033
31033
  "LegacyLteDispatchState": {
31034
31034
  "enum": [
31035
- "Queued",
31036
- "Dispatched",
31037
- "Expired"
31035
+ "queued",
31036
+ "dispatched",
31037
+ "expired"
31038
31038
  ]
31039
31039
  },
31040
31040
  "LegacyLteOperation": {
@@ -31079,8 +31079,8 @@
31079
31079
  },
31080
31080
  "LegacyLteOperationKind": {
31081
31081
  "enum": [
31082
- "Queue",
31083
- "Cancel"
31082
+ "queue",
31083
+ "cancel"
31084
31084
  ]
31085
31085
  },
31086
31086
  "LegacyLteUpgrade": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikefinder/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Generated REST and SignalR clients for BikeFinder api.",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -46,7 +46,6 @@
46
46
  "devDependencies": {
47
47
  "@hey-api/openapi-ts": "0.99.0",
48
48
  "@types/node": "^24.0.0",
49
- "json-schema-to-typescript": "16.0.0",
50
49
  "prettier": "3.9.10",
51
50
  "tsc-alias": "1.9.10",
52
51
  "typescript": "5.9.3",