@formant/data-sdk 0.0.111 → 0.0.113
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/dist/data-sdk.es.js +2025 -1793
- package/dist/data-sdk.umd.js +30 -30
- package/dist/types/common/browser.d.ts +1 -1
- package/dist/types/data-sdk/src/App.d.ts +3 -3
- package/dist/types/data-sdk/src/DataChannel.d.ts +4 -4
- package/dist/types/data-sdk/src/Device.d.ts +5 -5
- package/dist/types/data-sdk/src/Fleet.d.ts +3 -0
- package/dist/types/data-sdk/src/Manipulator.d.ts +1 -1
- package/dist/types/data-sdk/src/main.d.ts +1 -0
- package/dist/types/data-sdk/src/model/AccessLevel.d.ts +1 -1
- package/dist/types/data-sdk/src/model/AggregateLevel.d.ts +1 -1
- package/dist/types/data-sdk/src/model/AnnotationAreaType.d.ts +1 -1
- package/dist/types/data-sdk/src/model/AnnotationType.d.ts +1 -1
- package/dist/types/data-sdk/src/model/DeviceType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/EventSortableColumn.d.ts +1 -1
- package/dist/types/data-sdk/src/model/EventType.d.ts +1 -1
- package/dist/types/data-sdk/src/model/HealthStatus.d.ts +1 -1
- package/dist/types/data-sdk/src/model/HexRgbColor.d.ts +1 -1
- package/dist/types/data-sdk/src/model/IColorRGBA.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IDataAggregate.d.ts +1 -1
- package/dist/types/data-sdk/src/model/IDataPoint.d.ts +1 -1
- package/dist/types/data-sdk/src/model/IDeviceQuery.d.ts +14 -0
- package/dist/types/data-sdk/src/model/IEvent.d.ts +1 -1
- package/dist/types/data-sdk/src/model/INumericSetAggregateMap.d.ts +1 -1
- package/dist/types/data-sdk/src/model/IStreamAggregateTypeMap.d.ts +1 -1
- package/dist/types/data-sdk/src/model/InterventionType.d.ts +1 -1
- package/dist/types/data-sdk/src/model/IsoDate.d.ts +1 -1
- package/dist/types/data-sdk/src/model/Severity.d.ts +1 -1
- package/dist/types/data-sdk/src/model/SortOrder.d.ts +1 -1
- package/dist/types/data-sdk/src/model/StreamType.d.ts +1 -1
- package/dist/types/data-sdk/src/model/Timestamp.d.ts +1 -1
- package/dist/types/data-sdk/src/model/Uuid.d.ts +1 -1
- package/dist/types/data-sdk/src/model/VideoMimeType.d.ts +1 -1
- package/dist/types/data-sdk/src/model/deviceTypes.d.ts +1 -0
- package/dist/types/data-sdk/src/utils/numericAggregateUtils.d.ts +1 -1
- package/package.json +2 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type BrowserType = "Firefox" | "Chrome" | "Edge" | "Safari" | "IE" | "Other";
|
|
2
2
|
export declare function browser(): BrowserType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type AppMessage = {
|
|
2
2
|
type: "go_to_time";
|
|
3
3
|
time: number;
|
|
4
4
|
} | {
|
|
@@ -30,7 +30,7 @@ export declare type AppMessage = {
|
|
|
30
30
|
source: string;
|
|
31
31
|
data: any;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type EmbeddedAppMessage = {
|
|
34
34
|
type: "module_menu_item_clicked";
|
|
35
35
|
menu: string;
|
|
36
36
|
} | {
|
|
@@ -79,7 +79,7 @@ export interface StreamData {
|
|
|
79
79
|
};
|
|
80
80
|
type: string;
|
|
81
81
|
}
|
|
82
|
-
export
|
|
82
|
+
export type DataPoint = [number, any];
|
|
83
83
|
export declare class App {
|
|
84
84
|
private static sendAppMessage;
|
|
85
85
|
static getCurrentModuleContext(): string | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type DataChannelStringListener = (message: string) => void;
|
|
2
|
+
export type DataChannelBinaryListener = (message: Uint8Array) => void;
|
|
3
|
+
export type DataChannelListener = () => void;
|
|
4
|
+
export type DataChannelErrorListener = (ev: Event) => void;
|
|
5
5
|
export declare class DataChannel {
|
|
6
6
|
private dataChannel;
|
|
7
7
|
ready: boolean;
|
|
@@ -53,7 +53,7 @@ export interface TelemetryStream {
|
|
|
53
53
|
name: string;
|
|
54
54
|
onDemand: boolean;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
56
|
+
export type RealtimeMessage = {
|
|
57
57
|
header: {
|
|
58
58
|
created: number;
|
|
59
59
|
stream: {
|
|
@@ -64,14 +64,14 @@ export declare type RealtimeMessage = {
|
|
|
64
64
|
};
|
|
65
65
|
payload: IRtcStreamPayload;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
68
|
-
export
|
|
67
|
+
export type RealtimeListener = (peerId: string, message: RealtimeMessage) => void;
|
|
68
|
+
export type RealtimeAudioStream = {
|
|
69
69
|
name: string;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type RealtimeVideoStream = {
|
|
72
72
|
name: string;
|
|
73
73
|
};
|
|
74
|
-
export
|
|
74
|
+
export type RealtimeDataStream = {
|
|
75
75
|
name: string;
|
|
76
76
|
};
|
|
77
77
|
export declare const SessionType: {
|
|
@@ -6,6 +6,7 @@ import { IQuery } from "./model/IQuery";
|
|
|
6
6
|
import { IStreamAggregateData } from "./model/IStreamAggregateData";
|
|
7
7
|
import { IStreamData } from "./model/IStreamData";
|
|
8
8
|
import { PeerDevice } from "./PeerDevice";
|
|
9
|
+
import { IDeviceQuery } from "./model/IDeviceQuery";
|
|
9
10
|
export interface TelemetryResult {
|
|
10
11
|
deviceId: string;
|
|
11
12
|
name: string;
|
|
@@ -23,6 +24,7 @@ export declare class Fleet {
|
|
|
23
24
|
static getPeerDevice(url: string): Promise<PeerDevice>;
|
|
24
25
|
static getDevice(deviceId: string): Promise<Device>;
|
|
25
26
|
static getDevices(): Promise<Device[]>;
|
|
27
|
+
static queryDevices(query: IDeviceQuery): Promise<Device[]>;
|
|
26
28
|
static getOnlineDevices(): Promise<Device[]>;
|
|
27
29
|
static getPeers(): Promise<IRtcPeer[]>;
|
|
28
30
|
static getRealtimeSessions(): Promise<{
|
|
@@ -39,4 +41,5 @@ export declare class Fleet {
|
|
|
39
41
|
static queryEvents(query: IEventQuery): Promise<IEvent[]>;
|
|
40
42
|
static getEvent(uuid: string): Promise<IEvent>;
|
|
41
43
|
static getInterventions(): Promise<IEvent[]>;
|
|
44
|
+
static getCurrentGroup(): Promise<Device[] | undefined>;
|
|
42
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RealtimeDataStream, IJointState, RealtimeMessage, IRealtimeDevice } from "./Device";
|
|
2
|
-
export
|
|
2
|
+
export type RealtimeManipulatorConfig = {
|
|
3
3
|
currentJointStateStream: RealtimeDataStream;
|
|
4
4
|
plannedJointStateStream?: RealtimeDataStream;
|
|
5
5
|
planValidStream?: RealtimeDataStream;
|
|
@@ -22,6 +22,7 @@ export * from "./model/eventTypes";
|
|
|
22
22
|
export * from "./model/EventType";
|
|
23
23
|
export * from "./model/healthStatuses";
|
|
24
24
|
export * from "./model/HealthStatus";
|
|
25
|
+
export * from "./model/IColorRGBA";
|
|
25
26
|
export * from "./model/HexRgbColor";
|
|
26
27
|
export * from "./model/IAnnotationAreaTypeMap";
|
|
27
28
|
export * from "./model/IAnnotation";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { accessLevels } from "./accessLevels";
|
|
2
|
-
export
|
|
2
|
+
export type AccessLevel = typeof accessLevels[number];
|
|
3
3
|
export declare const viewer: "viewer" | "operator" | "administrator";
|
|
4
4
|
export declare const operator: "viewer" | "operator" | "administrator";
|
|
5
5
|
export declare const administrator: "viewer" | "operator" | "administrator";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type AggregateLevel = "year" | "month" | "week" | "day" | "hour" | "minute" | "second";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IAnnotationAreaTypeMap } from "./IAnnotationAreaTypeMap";
|
|
2
|
-
export
|
|
2
|
+
export type AnnotationAreaType = keyof IAnnotationAreaTypeMap;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IFieldParametersTypeMap } from "./IFieldParametersTypeMap";
|
|
2
|
-
export
|
|
2
|
+
export type AnnotationType = keyof IFieldParametersTypeMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type EventSortableColumn = "device.name" | "time";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { eventTypes } from "./eventTypes";
|
|
2
|
-
export
|
|
2
|
+
export type EventType = typeof eventTypes[number];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { healthStatuses } from "./healthStatuses";
|
|
2
|
-
export
|
|
2
|
+
export type HealthStatus = typeof healthStatuses[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type HexRgbColor = string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IStreamAggregateTypeMap } from "./IStreamAggregateTypeMap";
|
|
2
2
|
import { StreamType } from "./StreamType";
|
|
3
3
|
import { Timestamp } from "./Timestamp";
|
|
4
|
-
export
|
|
4
|
+
export type IDataAggregate<T extends StreamType = StreamType> = [
|
|
5
5
|
Timestamp,
|
|
6
6
|
IStreamAggregateTypeMap[T]
|
|
7
7
|
];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IStreamTypeMap } from "./IStreamTypeMap";
|
|
2
2
|
import { StreamType } from "./StreamType";
|
|
3
3
|
import { Timestamp } from "./Timestamp";
|
|
4
|
-
export
|
|
4
|
+
export type IDataPoint<T extends StreamType = StreamType> = [
|
|
5
5
|
Timestamp,
|
|
6
6
|
IStreamTypeMap[T]
|
|
7
7
|
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ITagSets } from "./ITagSets";
|
|
2
|
+
import { IsoDate } from "./IsoDate";
|
|
3
|
+
import { DeviceType } from "./DeviceType";
|
|
4
|
+
export interface IDeviceQuery {
|
|
5
|
+
name?: string;
|
|
6
|
+
query?: string;
|
|
7
|
+
tags?: ITagSets;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
fullyConfigured?: boolean;
|
|
10
|
+
type?: DeviceType;
|
|
11
|
+
count?: number;
|
|
12
|
+
offset?: number;
|
|
13
|
+
disabledBefore?: IsoDate;
|
|
14
|
+
}
|
|
@@ -9,4 +9,4 @@ import { IPortForwardingSessionRecord } from "./IPortForwardingSessionRecord";
|
|
|
9
9
|
import { ISystemEvent } from "./ISystemEvent";
|
|
10
10
|
import { ITeleopSessionRecord } from "./ITeleopSessionRecord";
|
|
11
11
|
import { ITriggeredEvent } from "./ITriggeredEvent";
|
|
12
|
-
export
|
|
12
|
+
export type IEvent = ITriggeredEvent | IInterventionRequest | ITeleopSessionRecord | IPortForwardingSessionRecord | ICommandRequestEvent | ICommandResponseEvent | ICommandDeliveryEvent | ICustomEvent | IComment | ISystemEvent | IAnnotation;
|
|
@@ -5,6 +5,6 @@ export interface ISupportedStreamAggregateTypeMap {
|
|
|
5
5
|
"numeric set": INumericSetAggregateMap;
|
|
6
6
|
numeric: INumericAggregate;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type IStreamAggregateTypeMap = Omit<{
|
|
9
9
|
[_ in StreamType]: undefined;
|
|
10
10
|
}, keyof ISupportedStreamAggregateTypeMap> & ISupportedStreamAggregateTypeMap;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IInterventionTypeMap } from "./IInterventionTypeMap";
|
|
2
|
-
export
|
|
2
|
+
export type InterventionType = keyof IInterventionTypeMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type IsoDate = string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { severities } from "./severities";
|
|
2
|
-
export
|
|
2
|
+
export type Severity = typeof severities[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SortOrder = "asc" | "desc";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IStreamTypeMap } from "./IStreamTypeMap";
|
|
2
|
-
export
|
|
2
|
+
export type StreamType = keyof IStreamTypeMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Timestamp = number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Uuid = string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { videoMimeTypes } from "./videoMimeTypes";
|
|
2
|
-
export
|
|
2
|
+
export type VideoMimeType = typeof videoMimeTypes[number];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const deviceType: readonly ["default", "capture"];
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"require": "./dist/data-sdk.umd.js"
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
|
-
"version": "0.0.
|
|
21
|
+
"version": "0.0.113",
|
|
22
22
|
"scripts": {
|
|
23
23
|
"dev": "vite --port 9146",
|
|
24
24
|
"build": "tsc && vite build",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
},
|
|
34
34
|
"types": "./dist/types/data-sdk/src/main.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@formant/realtime-sdk": "^0.0.
|
|
37
|
-
"@types/google-protobuf": "^3.15.5"
|
|
36
|
+
"@formant/realtime-sdk": "^0.0.19"
|
|
38
37
|
}
|
|
39
38
|
}
|