@formant/data-sdk 0.0.61 → 0.0.64
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 +45 -13
- package/dist/data-sdk.umd.js +6 -6
- package/dist/types/data-sdk/src/Device.d.ts +1 -0
- package/dist/types/data-sdk/src/Fleet.d.ts +6 -1
- package/dist/types/data-sdk/src/model/AggregateLevel.d.ts +1 -0
- package/dist/types/data-sdk/src/model/AnnotationAreaType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/EventSortableColumn.d.ts +1 -0
- package/dist/types/data-sdk/src/model/EventType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/HealthStatus.d.ts +2 -0
- package/dist/types/data-sdk/src/model/HexRgbColor.d.ts +1 -0
- package/dist/types/data-sdk/src/model/IAnnotation.d.ts +13 -0
- package/dist/types/data-sdk/src/model/IAnnotationAreaTypeMap.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IBaseEntity.d.ts +7 -0
- package/dist/types/data-sdk/src/model/IBaseEvent.d.ts +19 -0
- package/dist/types/data-sdk/src/model/IBattery.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IBitset.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IBoundingBox.d.ts +6 -0
- package/dist/types/data-sdk/src/model/ICommandDeliveryEvent.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ICommandEventBase.d.ts +5 -0
- package/dist/types/data-sdk/src/model/ICommandRequestEvent.d.ts +5 -0
- package/dist/types/data-sdk/src/model/ICommandResponseEvent.d.ts +3 -0
- package/dist/types/data-sdk/src/model/IComment.d.ts +7 -0
- package/dist/types/data-sdk/src/model/ICustomEvent.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IDataPoint.d.ts +7 -0
- package/dist/types/data-sdk/src/model/IEvent.d.ts +12 -0
- package/dist/types/data-sdk/src/model/IEventFilter.d.ts +19 -0
- package/dist/types/data-sdk/src/model/IEventQuery.d.ts +7 -0
- package/dist/types/data-sdk/src/model/IEventSort.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IFile.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IFilter.d.ts +10 -0
- package/dist/types/data-sdk/src/model/IGoal.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IHealth.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IImage.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IImageAnnotation.d.ts +9 -0
- package/dist/types/data-sdk/src/model/IInterventionRequest.d.ts +9 -0
- package/dist/types/data-sdk/src/model/IInterventionResponse.d.ts +10 -0
- package/dist/types/data-sdk/src/model/IInterventionTypeMap.d.ts +20 -0
- package/dist/types/data-sdk/src/model/ILabel.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ILabeledPolygon.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ILabelingRequestData.d.ts +8 -0
- package/dist/types/data-sdk/src/model/ILabelingResponseData.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ILocalization.d.ts +12 -0
- package/dist/types/data-sdk/src/model/ILocation.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IMap.d.ts +10 -0
- package/dist/types/data-sdk/src/model/INumericSetEntry.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IOdometry.d.ts +7 -0
- package/dist/types/data-sdk/src/model/IPath.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IPointCloud.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IPortForwardingSessionRecord.d.ts +3 -0
- package/dist/types/data-sdk/src/model/IQuaternion.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IQuery.d.ts +8 -0
- package/dist/types/data-sdk/src/model/IRtcSessionRecord.d.ts +9 -0
- package/dist/types/data-sdk/src/model/ISelectionRequestData.d.ts +6 -0
- package/dist/types/data-sdk/src/model/ISelectionResponseData.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ISpreadsheetIdRange.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IStreamData.d.ts +11 -0
- package/dist/types/data-sdk/src/model/IStreamTypeMap.d.ts +27 -0
- package/dist/types/data-sdk/src/model/ISystemEvent.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ITagSets.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ITaggedUsers.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ITags.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ITeleopRequestData.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ITeleopResponseData.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ITeleopSessionRecord.d.ts +3 -0
- package/dist/types/data-sdk/src/model/ITransform.d.ts +6 -0
- package/dist/types/data-sdk/src/model/ITransformNode.d.ts +7 -0
- package/dist/types/data-sdk/src/model/ITriggeredEvent.d.ts +10 -0
- package/dist/types/data-sdk/src/model/ITwist.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IVector3.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IVideo.d.ts +7 -0
- package/dist/types/data-sdk/src/model/InterventionType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/IsoDate.d.ts +1 -0
- package/dist/types/data-sdk/src/model/Severity.d.ts +2 -0
- package/dist/types/data-sdk/src/model/SortOrder.d.ts +1 -0
- package/dist/types/data-sdk/src/model/StreamType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/Timestamp.d.ts +1 -0
- package/dist/types/data-sdk/src/model/Uuid.d.ts +1 -0
- package/dist/types/data-sdk/src/model/VideoMimeType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/eventTypes.d.ts +1 -0
- package/dist/types/data-sdk/src/model/healthStatuses.d.ts +1 -0
- package/dist/types/data-sdk/src/model/severities.d.ts +1 -0
- package/dist/types/data-sdk/src/model/videoMimeTypes.d.ts +1 -0
- package/package.json +2 -2
|
@@ -76,6 +76,7 @@ export declare class Device {
|
|
|
76
76
|
disableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
77
77
|
getRemotePeer(): Promise<import("@formant/realtime-sdk/dist/model/IRtcPeer").IRtcPeer>;
|
|
78
78
|
stopRealtimeConnection(): Promise<void>;
|
|
79
|
+
isInRealtimeSession(): Promise<boolean>;
|
|
79
80
|
getAvailableCommands(): Promise<Command[]>;
|
|
80
81
|
sendCommand(name: string, data?: string, time?: Date, metadata?: {}): Promise<any>;
|
|
81
82
|
createCustomDataChannel(channelName: string, rtcConfig?: RTCDataChannelInit): Promise<DataChannel>;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { Device } from "./Device";
|
|
2
2
|
import { IRtcPeer } from "@formant/realtime-sdk/dist/model/IRtcPeer";
|
|
3
|
+
import { IEventQuery } from "./model/IEventQuery";
|
|
4
|
+
import { IEvent } from "./model/IEvent";
|
|
5
|
+
import { IQuery } from "./model/IQuery";
|
|
6
|
+
import { IStreamData } from "./model/IStreamData";
|
|
3
7
|
export interface User {
|
|
4
8
|
firstName: string;
|
|
5
9
|
lastName: string;
|
|
@@ -28,11 +32,12 @@ export declare class Fleet {
|
|
|
28
32
|
static getRealtimeSessions(): Promise<{
|
|
29
33
|
[key in string]: string[];
|
|
30
34
|
}>;
|
|
31
|
-
static isDeviceInRealtimeSession(deviceId: string): Promise<boolean>;
|
|
32
35
|
static getRealtimeDevices(): Promise<Device[]>;
|
|
33
36
|
static getLatestTelemetry(deviceIdOrDeviceIds?: string | string[]): Promise<any>;
|
|
34
37
|
static getTelemetry(deviceIdOrDeviceIds: string | string[], streamNameOrStreamNames: string | string[], start: Date, end: Date, tags?: {
|
|
35
38
|
[key in string]: string[];
|
|
36
39
|
}): Promise<TelemetryResult[]>;
|
|
37
40
|
static getFileUrl(uuid: string): Promise<string>;
|
|
41
|
+
static queryTelemetry(query: IQuery): Promise<IStreamData<keyof import("./model/IStreamTypeMap").IStreamTypeMap>[]>;
|
|
42
|
+
static queryEvents(query: IEventQuery): Promise<IEvent[]>;
|
|
38
43
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type AggregateLevel = "year" | "month" | "week" | "day" | "hour" | "minute" | "second";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type EventSortableColumn = "device.name" | "time";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type HexRgbColor = string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IBaseEvent } from "./IBaseEvent";
|
|
2
|
+
import { IsoDate } from "./IsoDate";
|
|
3
|
+
import { ISpreadsheetIdRange } from "./ISpreadsheetIdRange";
|
|
4
|
+
import { ITaggedUsers } from "./ITaggedUsers";
|
|
5
|
+
import { Uuid } from "./Uuid";
|
|
6
|
+
export interface IAnnotation extends IBaseEvent<"annotation"> {
|
|
7
|
+
editedAt?: IsoDate;
|
|
8
|
+
userId: Uuid;
|
|
9
|
+
annotationTemplateId: Uuid;
|
|
10
|
+
taggedUsers?: ITaggedUsers | null;
|
|
11
|
+
publishedTo?: ISpreadsheetIdRange;
|
|
12
|
+
note?: string | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EventType } from "./EventType";
|
|
2
|
+
import { IBaseEntity } from "./IBaseEntity";
|
|
3
|
+
import { IsoDate } from "./IsoDate";
|
|
4
|
+
import { ITags } from "./ITags";
|
|
5
|
+
import { StreamType } from "./StreamType";
|
|
6
|
+
import { Uuid } from "./Uuid";
|
|
7
|
+
export interface IBaseEvent<T extends EventType = EventType> extends IBaseEntity {
|
|
8
|
+
type?: T;
|
|
9
|
+
organizationId?: Uuid;
|
|
10
|
+
time: IsoDate;
|
|
11
|
+
endTime?: IsoDate | null;
|
|
12
|
+
message: string;
|
|
13
|
+
viewed?: boolean;
|
|
14
|
+
deviceId?: Uuid;
|
|
15
|
+
streamName?: string;
|
|
16
|
+
streamType?: StreamType;
|
|
17
|
+
tags?: ITags;
|
|
18
|
+
notificationEnabled?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IAnnotation } from "./IAnnotation";
|
|
2
|
+
import { ICommandDeliveryEvent } from "./ICommandDeliveryEvent";
|
|
3
|
+
import { ICommandRequestEvent } from "./ICommandRequestEvent";
|
|
4
|
+
import { ICommandResponseEvent } from "./ICommandResponseEvent";
|
|
5
|
+
import { IComment } from "./IComment";
|
|
6
|
+
import { ICustomEvent } from "./ICustomEvent";
|
|
7
|
+
import { IInterventionRequest } from "./IInterventionRequest";
|
|
8
|
+
import { IPortForwardingSessionRecord } from "./IPortForwardingSessionRecord";
|
|
9
|
+
import { ISystemEvent } from "./ISystemEvent";
|
|
10
|
+
import { ITeleopSessionRecord } from "./ITeleopSessionRecord";
|
|
11
|
+
import { ITriggeredEvent } from "./ITriggeredEvent";
|
|
12
|
+
export declare type IEvent = ITriggeredEvent | IInterventionRequest | ITeleopSessionRecord | IPortForwardingSessionRecord | ICommandRequestEvent | ICommandResponseEvent | ICommandDeliveryEvent | ICustomEvent | IComment | ISystemEvent | IAnnotation;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EventType } from "./EventType";
|
|
2
|
+
import { IFilter } from "./IFilter";
|
|
3
|
+
import { IsoDate } from "./IsoDate";
|
|
4
|
+
import { Severity } from "./Severity";
|
|
5
|
+
import { Uuid } from "./Uuid";
|
|
6
|
+
export interface IEventFilter extends IFilter {
|
|
7
|
+
id?: Uuid;
|
|
8
|
+
viewed?: boolean;
|
|
9
|
+
keyword?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
start?: IsoDate;
|
|
12
|
+
end?: IsoDate;
|
|
13
|
+
eventTypes?: EventType[];
|
|
14
|
+
notificationEnabled?: boolean;
|
|
15
|
+
userIds?: Uuid[];
|
|
16
|
+
annotationTemplateIds?: Uuid[];
|
|
17
|
+
disableNullMatches?: boolean;
|
|
18
|
+
severities?: Severity[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnnotationAreaType } from "./AnnotationAreaType";
|
|
2
|
+
import { HexRgbColor } from "./HexRgbColor";
|
|
3
|
+
import { IAnnotationAreaTypeMap } from "./IAnnotationAreaTypeMap";
|
|
4
|
+
export interface IImageAnnotation<T extends AnnotationAreaType = AnnotationAreaType> {
|
|
5
|
+
label: string;
|
|
6
|
+
type: AnnotationAreaType;
|
|
7
|
+
area: IAnnotationAreaTypeMap[T];
|
|
8
|
+
color: HexRgbColor;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBaseEvent } from "./IBaseEvent";
|
|
2
|
+
import { IInterventionResponse } from "./IInterventionResponse";
|
|
3
|
+
import { IInterventionTypeMap } from "./IInterventionTypeMap";
|
|
4
|
+
import { InterventionType } from "./InterventionType";
|
|
5
|
+
export interface IInterventionRequest<T extends InterventionType = InterventionType> extends IBaseEvent<"intervention-request"> {
|
|
6
|
+
interventionType: T;
|
|
7
|
+
data: IInterventionTypeMap[T]["request"];
|
|
8
|
+
responses?: IInterventionResponse<T>[];
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IBaseEntity } from "./IBaseEntity";
|
|
2
|
+
import { IInterventionTypeMap } from "./IInterventionTypeMap";
|
|
3
|
+
import { InterventionType } from "./InterventionType";
|
|
4
|
+
import { Uuid } from "./Uuid";
|
|
5
|
+
export interface IInterventionResponse<T extends InterventionType = InterventionType> extends IBaseEntity {
|
|
6
|
+
userId?: Uuid;
|
|
7
|
+
interventionId: Uuid;
|
|
8
|
+
interventionType: T;
|
|
9
|
+
data: IInterventionTypeMap[T]["response"];
|
|
10
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ILabelingRequestData } from "./ILabelingRequestData";
|
|
2
|
+
import { ILabelingResponseData } from "./ILabelingResponseData";
|
|
3
|
+
import { ISelectionRequestData } from "./ISelectionRequestData";
|
|
4
|
+
import { ISelectionResponseData } from "./ISelectionResponseData";
|
|
5
|
+
import { ITeleopRequestData } from "./ITeleopRequestData";
|
|
6
|
+
import { ITeleopResponseData } from "./ITeleopResponseData";
|
|
7
|
+
export interface IInterventionTypeMap {
|
|
8
|
+
selection: {
|
|
9
|
+
request: ISelectionRequestData;
|
|
10
|
+
response: ISelectionResponseData;
|
|
11
|
+
};
|
|
12
|
+
labeling: {
|
|
13
|
+
request: ILabelingRequestData;
|
|
14
|
+
response: ILabelingResponseData;
|
|
15
|
+
};
|
|
16
|
+
teleop: {
|
|
17
|
+
request: ITeleopRequestData;
|
|
18
|
+
response: ITeleopResponseData;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IGoal } from "./IGoal";
|
|
2
|
+
import { IMap } from "./IMap";
|
|
3
|
+
import { IOdometry } from "./IOdometry";
|
|
4
|
+
import { IPath } from "./IPath";
|
|
5
|
+
import { IPointCloud } from "./IPointCloud";
|
|
6
|
+
export interface ILocalization {
|
|
7
|
+
odometry: IOdometry;
|
|
8
|
+
map?: IMap;
|
|
9
|
+
pointClouds?: IPointCloud[];
|
|
10
|
+
path?: IPath;
|
|
11
|
+
goal?: IGoal;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Uuid } from "./Uuid";
|
|
2
|
+
import { IBaseEvent } from "./IBaseEvent";
|
|
3
|
+
import { IsoDate } from "./IsoDate";
|
|
4
|
+
export interface IRtcSessionRecord<T extends "teleop-session-record" | "port-forwarding-session-record"> extends IBaseEvent<T> {
|
|
5
|
+
sessionId: Uuid;
|
|
6
|
+
userId: Uuid;
|
|
7
|
+
deviceId: Uuid;
|
|
8
|
+
endTime: IsoDate;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IDataPoint } from "./IDataPoint";
|
|
2
|
+
import { ITags } from "./ITags";
|
|
3
|
+
import { StreamType } from "./StreamType";
|
|
4
|
+
import { Uuid } from "./Uuid";
|
|
5
|
+
export interface IStreamData<T extends StreamType = StreamType> {
|
|
6
|
+
deviceId: Uuid;
|
|
7
|
+
name: string;
|
|
8
|
+
type: T;
|
|
9
|
+
tags: ITags;
|
|
10
|
+
points: IDataPoint<T>[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IBattery } from "./IBattery";
|
|
2
|
+
import { IBitset } from "./IBitset";
|
|
3
|
+
import { IFile } from "./IFile";
|
|
4
|
+
import { IHealth } from "./IHealth";
|
|
5
|
+
import { IImage } from "./IImage";
|
|
6
|
+
import { ILocalization } from "./ILocalization";
|
|
7
|
+
import { ILocation } from "./ILocation";
|
|
8
|
+
import { INumericSetEntry } from "./INumericSetEntry";
|
|
9
|
+
import { IPointCloud } from "./IPointCloud";
|
|
10
|
+
import { ITransformNode } from "./ITransformNode";
|
|
11
|
+
import { IVideo } from "./IVideo";
|
|
12
|
+
export interface IStreamTypeMap {
|
|
13
|
+
bitset: IBitset;
|
|
14
|
+
localization: ILocalization;
|
|
15
|
+
"point cloud": IPointCloud;
|
|
16
|
+
location: ILocation;
|
|
17
|
+
file: IFile;
|
|
18
|
+
health: IHealth;
|
|
19
|
+
"transform tree": ITransformNode;
|
|
20
|
+
battery: IBattery;
|
|
21
|
+
video: IVideo;
|
|
22
|
+
"numeric set": INumericSetEntry[];
|
|
23
|
+
json: string;
|
|
24
|
+
image: IImage;
|
|
25
|
+
numeric: number;
|
|
26
|
+
text: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IBaseEvent } from "./IBaseEvent";
|
|
2
|
+
import { IsoDate } from "./IsoDate";
|
|
3
|
+
import { Severity } from "./Severity";
|
|
4
|
+
import { Uuid } from "./Uuid";
|
|
5
|
+
export interface ITriggeredEvent extends IBaseEvent<"triggered-event"> {
|
|
6
|
+
severity: Severity;
|
|
7
|
+
eventTriggerId: Uuid;
|
|
8
|
+
interval: number;
|
|
9
|
+
intervalStart?: IsoDate;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type IsoDate = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type SortOrder = "asc" | "desc";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Timestamp = number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Uuid = string;
|