@bikefinder/sdk 0.1.8 → 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 +22 -50
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +35 -32
- package/dist/generated/sdk.gen.js +210 -961
- package/dist/generated/types.gen.d.ts +7682 -7719
- package/dist/generated/zod.gen.d.ts +31256 -36912
- package/dist/generated/zod.gen.js +8379 -10447
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -1
- package/dist/signalr/BikeFinder.Api.Trackers.d.ts +22 -0
- package/dist/signalr/BikeFinder.Observations.Model.d.ts +1 -0
- package/dist/signalr/BikeFinder.Observations.Model.js +1 -0
- package/dist/signalr/TypedSignalR.Client/BikeFinder.Api.Trackers.d.ts +12 -11
- package/dist/signalr/TypedSignalR.Client/index.js +10 -10
- package/openapi/api.json +32398 -35063
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApiRequests } from "./generated/sdk.gen.js";
|
|
2
2
|
export type * from "./generated/types.gen.js";
|
|
3
3
|
export type { ITrackerHub, IStaffTrackerHub, } from "./signalr/TypedSignalR.Client/BikeFinder.Api.Trackers.js";
|
|
4
|
-
export type { PageRequest } from "./signalr/BikeFinder.Api.Trackers.js";
|
|
4
|
+
export type { PageRequest, StaffTrackerPageRequest, TrackerSelection, } from "./signalr/BikeFinder.Api.Trackers.js";
|
|
5
5
|
export type { HubConnection, IStreamResult, IStreamSubscriber, ISubscription, } from "@microsoft/signalr";
|
|
6
6
|
export interface ClientOptions {
|
|
7
7
|
baseUrl: string;
|
|
@@ -22,7 +22,9 @@ export declare function createBikeFinderClient(options: ClientOptions): {
|
|
|
22
22
|
dispose(): Promise<void>;
|
|
23
23
|
};
|
|
24
24
|
export type BikeFinderClient = ReturnType<typeof createBikeFinderClient>;
|
|
25
|
+
/** Encode exact current-observation selections for repeated GET series parameters. */
|
|
26
|
+
export declare function observationSeriesQuery(series: readonly import("./generated/types.gen.js").AwsObservationSeries[]): string[];
|
|
25
27
|
export { workflowDefinition } from "./workflow-schema.js";
|
|
26
28
|
export type { FirmwareMode, WorkflowState } from "./workflow-schema.js";
|
|
27
|
-
export { observationValueSchema, observationDefinitions, settingsValueSchema } from "./device-schema.js";
|
|
28
|
-
export type { ObservationFact, MetricName, DeviceSettings } from "./device-schema.js";
|
|
29
|
+
export { observationValueSchema, observationDefinitions, settingsValueSchema, } from "./device-schema.js";
|
|
30
|
+
export type { ObservationFact, MetricName, DeviceSettings, } from "./device-schema.js";
|
package/dist/index.js
CHANGED
|
@@ -65,5 +65,9 @@ export function createBikeFinderClient(options) {
|
|
|
65
65
|
},
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
+
/** Encode exact current-observation selections for repeated GET series parameters. */
|
|
69
|
+
export function observationSeriesQuery(series) {
|
|
70
|
+
return series.map(({ definitionId, subject }) => subject == null ? `${definitionId}` : `${definitionId}/${subject}`);
|
|
71
|
+
}
|
|
68
72
|
export { workflowDefinition } from "./workflow-schema.js";
|
|
69
|
-
export { observationValueSchema, observationDefinitions, settingsValueSchema } from "./device-schema.js";
|
|
73
|
+
export { observationValueSchema, observationDefinitions, settingsValueSchema, } from "./device-schema.js";
|
|
@@ -5,3 +5,25 @@ export type PageRequest = {
|
|
|
5
5
|
/** Transpiled from string? */
|
|
6
6
|
cursor?: string;
|
|
7
7
|
};
|
|
8
|
+
/** Transpiled from BikeFinder.Api.Trackers.StaffTrackerPageRequest */
|
|
9
|
+
export type StaffTrackerPageRequest = {
|
|
10
|
+
/** Transpiled from int */
|
|
11
|
+
limit: number;
|
|
12
|
+
/** Transpiled from string? */
|
|
13
|
+
cursor?: string;
|
|
14
|
+
/** Transpiled from BikeFinder.Api.Trackers.TrackerSelection? */
|
|
15
|
+
selection?: TrackerSelection;
|
|
16
|
+
};
|
|
17
|
+
/** Transpiled from BikeFinder.Api.Trackers.TrackerSelection */
|
|
18
|
+
export type TrackerSelection = {
|
|
19
|
+
/** Transpiled from string? */
|
|
20
|
+
serialNumber?: string;
|
|
21
|
+
/** Transpiled from string? */
|
|
22
|
+
imei?: string;
|
|
23
|
+
/** Transpiled from string? */
|
|
24
|
+
iccid?: string;
|
|
25
|
+
/** Transpiled from string? */
|
|
26
|
+
accountId?: string;
|
|
27
|
+
/** Transpiled from string? */
|
|
28
|
+
subscriptionId?: string;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "../generated/types.gen.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
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 } from "../BikeFinder.Api.Trackers.js";
|
|
4
|
-
import type { AwsObservationSelection, AwsObservationReading,
|
|
3
|
+
import type { PageRequest, StaffTrackerPageRequest } from "../BikeFinder.Api.Trackers.js";
|
|
4
|
+
import type { AwsObservationSelection, AwsObservationReading, AwsCommandUpdate, AwsSettingsSnapshot } from "../BikeFinder.Api.Aws.js";
|
|
5
|
+
import type { Observation } from "../BikeFinder.Observations.Model.js";
|
|
5
6
|
export type ITrackerHub = {
|
|
6
7
|
/**
|
|
7
8
|
* @param id Transpiled from string
|
|
@@ -41,43 +42,43 @@ export type IStaffTrackerHub = {
|
|
|
41
42
|
*/
|
|
42
43
|
watchTracker(id: string): IStreamResult<TrackerDocument>;
|
|
43
44
|
/**
|
|
44
|
-
* @param query Transpiled from BikeFinder.Api.Trackers.
|
|
45
|
+
* @param query Transpiled from BikeFinder.Api.Trackers.StaffTrackerPageRequest
|
|
45
46
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
46
47
|
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Firestore.TrackerPage>
|
|
47
48
|
*/
|
|
48
|
-
watchTrackers(query:
|
|
49
|
+
watchTrackers(query: StaffTrackerPageRequest): IStreamResult<TrackerPage>;
|
|
49
50
|
/**
|
|
50
51
|
* @param id Transpiled from string
|
|
51
52
|
* @param query Transpiled from BikeFinder.Api.Aws.AwsObservationSelection
|
|
52
53
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
53
54
|
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Aws.AwsObservationReading[]>
|
|
54
55
|
*/
|
|
55
|
-
|
|
56
|
+
watchObservations(id: string, query: AwsObservationSelection): IStreamResult<AwsObservationReading[]>;
|
|
56
57
|
/**
|
|
57
58
|
* @param id Transpiled from string
|
|
58
59
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
59
|
-
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.
|
|
60
|
+
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Observations.Model.Observation>
|
|
60
61
|
*/
|
|
61
|
-
|
|
62
|
+
watchObservationEvents(id: string): IStreamResult<Observation>;
|
|
62
63
|
/**
|
|
63
64
|
* @param id Transpiled from string
|
|
64
65
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
65
66
|
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Aws.AwsCommandUpdate>
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
|
+
watchCommandEvents(id: string): IStreamResult<AwsCommandUpdate>;
|
|
68
69
|
/**
|
|
69
70
|
* @param id Transpiled from string
|
|
70
|
-
* @param
|
|
71
|
+
* @param operationId Transpiled from System.Guid
|
|
71
72
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
72
73
|
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Aws.AwsCommandUpdate>
|
|
73
74
|
*/
|
|
74
|
-
|
|
75
|
+
watchCommand(id: string, operationId: string): IStreamResult<AwsCommandUpdate>;
|
|
75
76
|
/**
|
|
76
77
|
* @param id Transpiled from string
|
|
77
78
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
78
79
|
* @returns Transpiled from System.Collections.Generic.IAsyncEnumerable<BikeFinder.Api.Aws.AwsSettingsSnapshot>
|
|
79
80
|
*/
|
|
80
|
-
|
|
81
|
+
watchSettings(id: string): IStreamResult<AwsSettingsSnapshot>;
|
|
81
82
|
/**
|
|
82
83
|
* @param query Transpiled from BikeFinder.Api.Trackers.PageRequest
|
|
83
84
|
* @param cancellation Transpiled from System.Threading.CancellationToken
|
|
@@ -67,20 +67,20 @@ class IStaffTrackerHub_HubProxy {
|
|
|
67
67
|
watchTrackers = (query) => {
|
|
68
68
|
return this.connection.stream("WatchTrackers", query);
|
|
69
69
|
};
|
|
70
|
-
|
|
71
|
-
return this.connection.stream("
|
|
70
|
+
watchObservations = (id, query) => {
|
|
71
|
+
return this.connection.stream("WatchObservations", id, query);
|
|
72
72
|
};
|
|
73
|
-
|
|
74
|
-
return this.connection.stream("
|
|
73
|
+
watchObservationEvents = (id) => {
|
|
74
|
+
return this.connection.stream("WatchObservationEvents", id);
|
|
75
75
|
};
|
|
76
|
-
|
|
77
|
-
return this.connection.stream("
|
|
76
|
+
watchCommandEvents = (id) => {
|
|
77
|
+
return this.connection.stream("WatchCommandEvents", id);
|
|
78
78
|
};
|
|
79
|
-
|
|
80
|
-
return this.connection.stream("
|
|
79
|
+
watchCommand = (id, operationId) => {
|
|
80
|
+
return this.connection.stream("WatchCommand", id, operationId);
|
|
81
81
|
};
|
|
82
|
-
|
|
83
|
-
return this.connection.stream("
|
|
82
|
+
watchSettings = (id) => {
|
|
83
|
+
return this.connection.stream("WatchSettings", id);
|
|
84
84
|
};
|
|
85
85
|
watchFavorites = (query) => {
|
|
86
86
|
return this.connection.stream("WatchFavorites", query);
|