@formant/data-sdk 1.1.0 → 1.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.
- package/dist/data-sdk.es.js +5157 -4950
- package/dist/data-sdk.umd.js +30 -29
- package/dist/types/data-sdk/src/Account.d.ts +10 -0
- package/dist/types/data-sdk/src/AppRtcClientPools.d.ts +2 -4
- package/dist/types/data-sdk/src/AudioPlayer.d.ts +2 -1
- package/dist/types/data-sdk/src/BaseDevice.d.ts +129 -0
- package/dist/types/data-sdk/src/Device.d.ts +8 -127
- package/dist/types/data-sdk/src/Fleet.d.ts +8 -0
- package/dist/types/data-sdk/src/KeyValue.d.ts +2 -1
- package/dist/types/data-sdk/src/Manipulator.d.ts +2 -2
- package/dist/types/data-sdk/src/PeerDevice.d.ts +7 -25
- package/dist/types/data-sdk/src/RequestDataChannel.d.ts +3 -3
- package/dist/types/data-sdk/src/Role.d.ts +8 -0
- package/dist/types/data-sdk/src/User.d.ts +8 -0
- package/dist/types/data-sdk/src/main.d.ts +3 -0
- package/dist/types/data-sdk/src/model/CognitoRegion.d.ts +2 -0
- package/dist/types/data-sdk/src/model/IAccount.d.ts +7 -0
- package/dist/types/data-sdk/src/model/IAccountTree.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IAudioInfo.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ICommandPropgress.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IDevice.d.ts +31 -0
- package/dist/types/data-sdk/src/model/IDeviceReportedConfigurationState.d.ts +3 -0
- package/dist/types/data-sdk/src/model/IDeviceRosState.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IDeviceScope.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IDeviceState.d.ts +16 -0
- package/dist/types/data-sdk/src/model/IDictionary.d.ts +3 -0
- package/dist/types/data-sdk/src/model/IFleet.d.ts +8 -0
- package/dist/types/data-sdk/src/model/IHwInfo.d.ts +17 -0
- package/dist/types/data-sdk/src/model/IKernelInfo.d.ts +5 -0
- package/dist/types/data-sdk/src/model/INetwork.d.ts +4 -0
- package/dist/types/data-sdk/src/model/INodeInfo.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IOnDemandPresenceStreamItemGroup.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IOnDemandPresenceTimeRange.d.ts +7 -0
- package/dist/types/data-sdk/src/model/IOnDemandState.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IOnDemandStreamPresence.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IOnDemmandBuffer.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IOnvifDevice.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IOsInfo.d.ts +6 -0
- package/dist/types/data-sdk/src/model/IRole.d.ts +9 -0
- package/dist/types/data-sdk/src/model/IRosTopic.d.ts +4 -0
- package/dist/types/data-sdk/src/model/ITaggedEntity.d.ts +5 -0
- package/dist/types/data-sdk/src/model/IUser.d.ts +29 -0
- package/dist/types/data-sdk/src/model/IUserScope.d.ts +15 -0
- package/dist/types/data-sdk/src/model/IVideoDevice.d.ts +4 -0
- package/dist/types/data-sdk/src/model/IdeviceFollower.d.ts +4 -0
- package/dist/types/data-sdk/src/model/InetworkInfo.d.ts +4 -0
- package/dist/types/data-sdk/src/model/OnDemandBufferType.d.ts +2 -0
- package/dist/types/data-sdk/src/model/Policies.d.ts +35 -0
- package/dist/types/data-sdk/src/model/RequiredKeys.d.ts +3 -0
- package/dist/types/data-sdk/src/model/Resource.d.ts +2 -0
- package/dist/types/data-sdk/src/model/cognitoRegions.d.ts +1 -0
- package/dist/types/data-sdk/src/model/onDemandBufferTypes.d.ts +1 -0
- package/dist/types/data-sdk/src/model/resources.d.ts +1 -0
- package/dist/types/data-sdk/src/stores/AuthenticationStore.d.ts +4 -3
- package/dist/types/data-sdk/src/stores/IAuthenticationStore.d.ts +3 -10
- package/dist/types/data-sdk/src/utils/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/types/data-sdk/src/utils/rtcClientVersion.d.ts +0 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IAccount } from "./model/IAccount";
|
|
2
|
+
import { IAccountTree } from "./model/IAccountTree";
|
|
3
|
+
export declare class Account {
|
|
4
|
+
static listAccounts(): Promise<IAccount[]>;
|
|
5
|
+
static createAccounts(account: IAccount): Promise<IAccount>;
|
|
6
|
+
static getAccount(id: string): Promise<IAccount>;
|
|
7
|
+
static patchAccount(id: string, account: Partial<Account>): Promise<IAccount>;
|
|
8
|
+
static deleteAccount(id: string): Promise<void>;
|
|
9
|
+
static getAccountTree(id: string): Promise<IAccountTree>;
|
|
10
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RtcClient
|
|
1
|
+
import { RtcClient } from "@formant/realtime-sdk";
|
|
2
2
|
import { SessionType } from "./model/SessionType";
|
|
3
3
|
import { RtcClientPool } from "./utils/RtcClientPool";
|
|
4
4
|
export declare const AppRtcClientPools: {
|
|
@@ -12,9 +12,7 @@ export declare const AppRtcClientPools: {
|
|
|
12
12
|
readonly 3: RtcClientPool<RtcClient>;
|
|
13
13
|
};
|
|
14
14
|
export declare const defaultRtcClientPool: RtcClientPool<RtcClient>;
|
|
15
|
-
export declare const v1RtcClientPool: RtcClientPool<RtcClientV1>;
|
|
16
15
|
export declare const getRtcClientPool: (options: {
|
|
17
|
-
version: string;
|
|
18
16
|
sessionType?: SessionType;
|
|
19
|
-
}) => RtcClientPool<RtcClient
|
|
17
|
+
}) => RtcClientPool<RtcClient>;
|
|
20
18
|
export declare function debug(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRtcStreamMessage } from "@formant/realtime-sdk";
|
|
2
|
-
import { Device
|
|
2
|
+
import { Device } from "./Device";
|
|
3
|
+
import { RealtimeDataStream } from "./BaseDevice";
|
|
3
4
|
export declare class AudioPlayer {
|
|
4
5
|
private device;
|
|
5
6
|
private stream;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { IRtcSendConfiguration, IRtcStreamMessage, IRtcStreamPayload, RtcClient } from "@formant/realtime-sdk";
|
|
4
|
+
import { ITags } from "./model/ITags";
|
|
5
|
+
import { Uuid } from "./model/Uuid";
|
|
6
|
+
import { SessionType } from "./model/SessionType";
|
|
7
|
+
import { DataChannel } from "./DataChannel";
|
|
8
|
+
import { RtcStreamType } from "@formant/realtime-sdk/dist/model/RtcStreamType";
|
|
9
|
+
import { EventEmitter } from "events";
|
|
10
|
+
import { Manipulator } from "./Manipulator";
|
|
11
|
+
import { BinaryRequestDataChannel, TextRequestDataChannel } from "./main";
|
|
12
|
+
import { IRtcPeer } from "@formant/realtime-sdk/dist/model/IRtcPeer";
|
|
13
|
+
export interface ConfigurationDocument {
|
|
14
|
+
tags: ITags;
|
|
15
|
+
urdfFiles: string[];
|
|
16
|
+
telemetry?: {
|
|
17
|
+
streams?: {
|
|
18
|
+
name: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
onDemand?: boolean;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
teleop?: {
|
|
24
|
+
customStreams?: {
|
|
25
|
+
name: string;
|
|
26
|
+
rtcStreamType: RtcStreamType;
|
|
27
|
+
}[];
|
|
28
|
+
hardwareStreams?: {
|
|
29
|
+
name: string;
|
|
30
|
+
rtcStreamType: RtcStreamType;
|
|
31
|
+
}[];
|
|
32
|
+
rosStreams?: {
|
|
33
|
+
rtcStreamType: RtcStreamType;
|
|
34
|
+
topicName: string;
|
|
35
|
+
topicType: string;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
adapters?: IAdapterConfiguration[];
|
|
39
|
+
application?: {
|
|
40
|
+
configurationMap: {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface Command {
|
|
46
|
+
id: string;
|
|
47
|
+
name: string;
|
|
48
|
+
command: string;
|
|
49
|
+
description: string;
|
|
50
|
+
parameterEnabled: true;
|
|
51
|
+
parameterValue: string | null;
|
|
52
|
+
tags: ITags;
|
|
53
|
+
parameterMeta?: {
|
|
54
|
+
topic?: string;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export interface IJointState {
|
|
58
|
+
name: string[];
|
|
59
|
+
position: number[];
|
|
60
|
+
velocity?: number[];
|
|
61
|
+
effort?: number[];
|
|
62
|
+
}
|
|
63
|
+
export interface TelemetryStream {
|
|
64
|
+
name: string;
|
|
65
|
+
onDemand: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface IAdapterConfiguration {
|
|
68
|
+
id: Uuid;
|
|
69
|
+
name: string;
|
|
70
|
+
fileId: Uuid;
|
|
71
|
+
execCommand: string;
|
|
72
|
+
configuration?: string;
|
|
73
|
+
}
|
|
74
|
+
export type RealtimeMessage = {
|
|
75
|
+
header: {
|
|
76
|
+
created: number;
|
|
77
|
+
stream: {
|
|
78
|
+
entityId: string;
|
|
79
|
+
streamName: string;
|
|
80
|
+
streamType: RtcStreamType;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
payload: IRtcStreamPayload;
|
|
84
|
+
};
|
|
85
|
+
export type RealtimeListener = (peerId: string, message: RealtimeMessage) => void;
|
|
86
|
+
export type RealtimeAudioStream = {
|
|
87
|
+
name: string;
|
|
88
|
+
};
|
|
89
|
+
export type RealtimeVideoStream = {
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
|
+
export type RealtimeDataStream = {
|
|
93
|
+
name: string;
|
|
94
|
+
};
|
|
95
|
+
export interface IStartRealtimeConnectionOptions {
|
|
96
|
+
sessionType?: SessionType;
|
|
97
|
+
deadlineMs?: number;
|
|
98
|
+
maxConnectRetries?: number;
|
|
99
|
+
}
|
|
100
|
+
export declare abstract class BaseDevice extends EventEmitter {
|
|
101
|
+
rtcClient: RtcClient | undefined;
|
|
102
|
+
remoteDevicePeerId: string | null;
|
|
103
|
+
protected realtimeListeners: RealtimeListener[];
|
|
104
|
+
protected connectionMonitorInterval: NodeJS.Timeout | undefined;
|
|
105
|
+
abstract getConfiguration(): Promise<ConfigurationDocument>;
|
|
106
|
+
abstract startRealtimeConnection(sessionType?: number): Promise<void>;
|
|
107
|
+
abstract getRemotePeer(): Promise<IRtcPeer>;
|
|
108
|
+
protected handleMessage: (peerId: string, message: any) => void;
|
|
109
|
+
protected stopConnectionMonitoring(): void;
|
|
110
|
+
protected assertNotCancelled(cancelled: boolean): void;
|
|
111
|
+
getRealtimeStatus(): "disconnected" | "connecting" | "connected";
|
|
112
|
+
getRealtimePing(): number | undefined;
|
|
113
|
+
addRealtimeListener(listener: RealtimeListener): void;
|
|
114
|
+
removeRealtimeListener(listener: RealtimeListener): void;
|
|
115
|
+
getRealtimeManipulators(): Promise<Manipulator[]>;
|
|
116
|
+
getRealtimeVideoStreams(): Promise<RealtimeVideoStream[]>;
|
|
117
|
+
createCustomRequestDataChannel(channelName: string, timeout?: number): TextRequestDataChannel;
|
|
118
|
+
createCustomBinaryRequestDataChannel(channelName: string, timeout?: number): BinaryRequestDataChannel;
|
|
119
|
+
startListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
|
|
120
|
+
stopListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
|
|
121
|
+
startListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
122
|
+
stopListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
123
|
+
enableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
124
|
+
disableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
125
|
+
changeStreamAudioType(streamName: string, newFormat: "wav" | "opus"): Promise<void>;
|
|
126
|
+
createCustomDataChannel(channelName: string, rtcConfig?: RTCDataChannelInit): Promise<DataChannel>;
|
|
127
|
+
sendRealtimeMessage(message: IRtcStreamMessage, config?: IRtcSendConfiguration): Promise<void>;
|
|
128
|
+
getRealtimeAudioStreams(): Promise<RealtimeAudioStream[]>;
|
|
129
|
+
}
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from "events";
|
|
3
|
-
import { IRtcSendConfiguration, IRtcStreamMessage, IRtcStreamPayload, RtcClient, RtcClientV1 } from "@formant/realtime-sdk";
|
|
4
|
-
import { RtcStreamType } from "@formant/realtime-sdk/dist/model/RtcStreamType";
|
|
5
1
|
import { IRtcPeer } from "@formant/realtime-sdk/dist/model/IRtcPeer";
|
|
6
|
-
import { DataChannel } from "./DataChannel";
|
|
7
2
|
import { CaptureStream } from "./CaptureStream";
|
|
8
|
-
import { Manipulator } from "./Manipulator";
|
|
9
|
-
import { TextRequestDataChannel, BinaryRequestDataChannel } from "./RequestDataChannel";
|
|
10
|
-
import { Uuid } from "./model/Uuid";
|
|
11
3
|
import { InterventionType } from "./model/InterventionType";
|
|
12
4
|
import { IInterventionTypeMap } from "./model/IInterventionTypeMap";
|
|
13
5
|
import { IInterventionResponse } from "./model/IInterventionResponse";
|
|
@@ -15,112 +7,19 @@ import { IEventQuery } from "./model/IEventQuery";
|
|
|
15
7
|
import { AggregateLevel } from "./model/AggregateLevel";
|
|
16
8
|
import { EventType } from "./model/EventType";
|
|
17
9
|
import { IShare } from "./model/IShare";
|
|
18
|
-
import { ITags } from "./model/ITags";
|
|
19
10
|
import { SessionType } from "./model/SessionType";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
streams?: {
|
|
25
|
-
name: string;
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
onDemand?: boolean;
|
|
28
|
-
}[];
|
|
29
|
-
};
|
|
30
|
-
teleop?: {
|
|
31
|
-
customStreams?: {
|
|
32
|
-
name: string;
|
|
33
|
-
rtcStreamType: RtcStreamType;
|
|
34
|
-
}[];
|
|
35
|
-
hardwareStreams?: {
|
|
36
|
-
name: string;
|
|
37
|
-
rtcStreamType: RtcStreamType;
|
|
38
|
-
}[];
|
|
39
|
-
rosStreams?: {
|
|
40
|
-
rtcStreamType: RtcStreamType;
|
|
41
|
-
topicName: string;
|
|
42
|
-
topicType: string;
|
|
43
|
-
}[];
|
|
44
|
-
};
|
|
45
|
-
adapters?: IAdapterConfiguration[];
|
|
46
|
-
}
|
|
47
|
-
export interface Command {
|
|
48
|
-
id: string;
|
|
49
|
-
name: string;
|
|
50
|
-
command: string;
|
|
51
|
-
description: string;
|
|
52
|
-
parameterEnabled: true;
|
|
53
|
-
parameterValue: string | null;
|
|
54
|
-
parameterMeta?: {
|
|
55
|
-
topic?: string;
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
export interface IJointState {
|
|
59
|
-
name: string[];
|
|
60
|
-
position: number[];
|
|
61
|
-
velocity?: number[];
|
|
62
|
-
effort?: number[];
|
|
63
|
-
}
|
|
64
|
-
export interface TelemetryStream {
|
|
65
|
-
name: string;
|
|
66
|
-
onDemand: boolean;
|
|
67
|
-
}
|
|
68
|
-
export interface IAdapterConfiguration {
|
|
69
|
-
id: Uuid;
|
|
70
|
-
name: string;
|
|
71
|
-
fileId: Uuid;
|
|
72
|
-
execCommand: string;
|
|
73
|
-
configuration?: string;
|
|
74
|
-
}
|
|
75
|
-
export type RealtimeMessage = {
|
|
76
|
-
header: {
|
|
77
|
-
created: number;
|
|
78
|
-
stream: {
|
|
79
|
-
entityId: string;
|
|
80
|
-
streamName: string;
|
|
81
|
-
streamType: RtcStreamType;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
payload: IRtcStreamPayload;
|
|
85
|
-
};
|
|
86
|
-
export type RealtimeListener = (peerId: string, message: RealtimeMessage) => void;
|
|
87
|
-
export type RealtimeAudioStream = {
|
|
88
|
-
name: string;
|
|
89
|
-
};
|
|
90
|
-
export type RealtimeVideoStream = {
|
|
91
|
-
name: string;
|
|
92
|
-
};
|
|
93
|
-
export type RealtimeDataStream = {
|
|
94
|
-
name: string;
|
|
95
|
-
};
|
|
96
|
-
interface IStartRealtimeConnectionOptions {
|
|
97
|
-
sessionType?: SessionType;
|
|
98
|
-
deadlineMs?: number;
|
|
99
|
-
maxConnectRetries?: number;
|
|
100
|
-
}
|
|
101
|
-
export interface IRealtimeDevice {
|
|
102
|
-
startRealtimeConnection(sessionType?: number): Promise<void>;
|
|
103
|
-
startListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
104
|
-
stopListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
105
|
-
addRealtimeListener(listener: RealtimeListener): void;
|
|
106
|
-
removeRealtimeListener(listener: RealtimeListener): void;
|
|
107
|
-
createCustomDataChannel(channelName: string, rtcConfig?: RTCDataChannelInit): Promise<DataChannel>;
|
|
108
|
-
}
|
|
109
|
-
export declare class Device extends EventEmitter implements IRealtimeDevice {
|
|
11
|
+
import { BaseDevice, Command, ConfigurationDocument, IStartRealtimeConnectionOptions, TelemetryStream } from "./BaseDevice";
|
|
12
|
+
import { ITags } from "./model/ITags";
|
|
13
|
+
import { IDevice } from "./model/IDevice";
|
|
14
|
+
export declare class Device extends BaseDevice {
|
|
110
15
|
id: string;
|
|
111
16
|
name: string;
|
|
112
17
|
private organizationId;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
realtimeListeners: RealtimeListener[];
|
|
116
|
-
private connectionMonitorInterval;
|
|
117
|
-
constructor(id: string, name: string, organizationId: string);
|
|
18
|
+
tags?: ITags | undefined;
|
|
19
|
+
constructor(id: string, name: string, organizationId: string, tags?: ITags | undefined);
|
|
118
20
|
getLatestTelemetry(): Promise<any>;
|
|
119
21
|
getConfiguration(): Promise<ConfigurationDocument>;
|
|
120
22
|
getFileUrl(fileId: string): Promise<string[]>;
|
|
121
|
-
private handleMessage;
|
|
122
|
-
getRealtimeStatus(): "disconnected" | "connecting" | "connected";
|
|
123
|
-
getRealtimePing(): number | undefined;
|
|
124
23
|
/**
|
|
125
24
|
* Starts a real-time connection with the remote device using WebRTC.
|
|
126
25
|
* @param {number} [options] - Optional session type to be used for the connection.
|
|
@@ -130,30 +29,12 @@ export declare class Device extends EventEmitter implements IRealtimeDevice {
|
|
|
130
29
|
startRealtimeConnection(options?: SessionType | IStartRealtimeConnectionOptions): Promise<void>;
|
|
131
30
|
private getRemoteDevicePeerId;
|
|
132
31
|
private initConnectionMonitoring;
|
|
133
|
-
private isV2Signaling;
|
|
134
|
-
private stopConnectionMonitoring;
|
|
135
|
-
sendRealtimeMessage(message: IRtcStreamMessage, config?: IRtcSendConfiguration): Promise<void>;
|
|
136
|
-
addRealtimeListener(listener: RealtimeListener): void;
|
|
137
|
-
removeRealtimeListener(listener: RealtimeListener): void;
|
|
138
|
-
getRealtimeAudioStreams(): Promise<RealtimeAudioStream[]>;
|
|
139
|
-
getRealtimeVideoStreams(): Promise<RealtimeVideoStream[]>;
|
|
140
|
-
getRealtimeManipulators(): Promise<Manipulator[]>;
|
|
141
|
-
startListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
|
|
142
|
-
stopListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
|
|
143
|
-
startListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
144
|
-
stopListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
145
|
-
enableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
146
|
-
changeStreamAudioType(streamName: string, newFormat: "wav" | "opus"): Promise<void>;
|
|
147
|
-
disableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
148
32
|
getRemotePeer(): Promise<IRtcPeer>;
|
|
149
33
|
stopRealtimeConnection(): Promise<void>;
|
|
150
34
|
isInRealtimeSession(): Promise<boolean>;
|
|
151
35
|
getAvailableCommands(): Promise<Command[]>;
|
|
152
36
|
sendCommand(name: string, data?: string, time?: Date, metadata?: {}): Promise<Response>;
|
|
153
37
|
getCommand(id: string): Promise<Response>;
|
|
154
|
-
createCustomDataChannel(channelName: string, rtcConfig?: RTCDataChannelInit): Promise<DataChannel>;
|
|
155
|
-
createCustomRequestDataChannel(channelName: string, timeout?: number): TextRequestDataChannel;
|
|
156
|
-
createCustomBinaryRequestDataChannel(channelName: string, timeout?: number): BinaryRequestDataChannel;
|
|
157
38
|
createCaptureStream(streamName: string): Promise<CaptureStream>;
|
|
158
39
|
getTelemetry(streamNameOrStreamNames: string | string[], start: Date, end: Date, tags?: {
|
|
159
40
|
[key in string]: string[];
|
|
@@ -177,6 +58,6 @@ export declare class Device extends EventEmitter implements IRealtimeDevice {
|
|
|
177
58
|
events: import("./main").IEvent[];
|
|
178
59
|
}[]>;
|
|
179
60
|
createShareLink(share: IShare, view: string): Promise<string | null>;
|
|
180
|
-
|
|
61
|
+
createDevice(device: IDevice): Promise<IDevice>;
|
|
62
|
+
patchDevice(id: string, device: Partial<IDevice>): Promise<IDevice>;
|
|
181
63
|
}
|
|
182
|
-
export {};
|
|
@@ -19,6 +19,7 @@ import { IStreamTypeMap } from "./model/IStreamTypeMap";
|
|
|
19
19
|
import { ITaskReportColumn } from "./model/ITaskReportColumn";
|
|
20
20
|
import { IView } from "./model/IView";
|
|
21
21
|
import { PeerDevice } from "./PeerDevice";
|
|
22
|
+
import { IFleet } from "./model/IFleet";
|
|
22
23
|
export interface TelemetryResult {
|
|
23
24
|
deviceId: string;
|
|
24
25
|
name: string;
|
|
@@ -205,4 +206,11 @@ export declare class Fleet {
|
|
|
205
206
|
* });
|
|
206
207
|
*/
|
|
207
208
|
static createShareLink(share: IShare, view: string): Promise<string | null>;
|
|
209
|
+
static listFleets(): Promise<IFleet[]>;
|
|
210
|
+
static createFleet(fleet: IFleet): Promise<IFleet>;
|
|
211
|
+
static getFleet(id: string): Promise<IFleet>;
|
|
212
|
+
static patchFleet(id: string, role: Partial<IFleet>): Promise<IFleet>;
|
|
213
|
+
static deleteFleet(id: string): Promise<void>;
|
|
214
|
+
static addDeviceToFleet(deviceId: string, fleetId: string): Promise<any>;
|
|
215
|
+
static getFleetDevices(id: string): Promise<void>;
|
|
208
216
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ITagSets } from "./main";
|
|
1
2
|
export declare class KeyValue {
|
|
2
|
-
static set(key: string, value: string): Promise<void>;
|
|
3
|
+
static set(key: string, value: string, tags?: ITagSets): Promise<void>;
|
|
3
4
|
static get(key: string): Promise<string>;
|
|
4
5
|
static list(): Promise<string[]>;
|
|
5
6
|
static delete(key: string): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RealtimeDataStream, IJointState, RealtimeMessage,
|
|
1
|
+
import { RealtimeDataStream, IJointState, RealtimeMessage, BaseDevice } from "./BaseDevice";
|
|
2
2
|
export type RealtimeManipulatorConfig = {
|
|
3
3
|
currentJointStateStream: RealtimeDataStream;
|
|
4
4
|
plannedJointStateStream?: RealtimeDataStream;
|
|
@@ -12,7 +12,7 @@ export declare class Manipulator {
|
|
|
12
12
|
private device;
|
|
13
13
|
private config;
|
|
14
14
|
currentListeners: ((js: IJointState) => void)[];
|
|
15
|
-
constructor(device:
|
|
15
|
+
constructor(device: BaseDevice, config: RealtimeManipulatorConfig);
|
|
16
16
|
synchronize(): Promise<void>;
|
|
17
17
|
desynchronize(): Promise<void>;
|
|
18
18
|
onRealtimeMessage: (_peerId: string, message: RealtimeMessage) => void;
|
|
@@ -1,37 +1,19 @@
|
|
|
1
|
-
import { RtcClient } from "@formant/realtime-sdk";
|
|
2
|
-
import { DataChannel } from "./DataChannel";
|
|
3
|
-
import { Manipulator } from "./Manipulator";
|
|
4
|
-
import { TextRequestDataChannel, BinaryRequestDataChannel } from "./RequestDataChannel";
|
|
5
|
-
import { ConfigurationDocument, IRealtimeDevice, RealtimeDataStream, RealtimeListener, RealtimeVideoStream } from "./Device";
|
|
6
1
|
import { IStreamCurrentValue } from "./model/IStreamCurrentValue";
|
|
7
2
|
import { IRtcPeer } from "@formant/realtime-sdk/dist/model/IRtcPeer";
|
|
8
|
-
|
|
3
|
+
import { BaseDevice, ConfigurationDocument } from "./BaseDevice";
|
|
4
|
+
export declare class PeerDevice extends BaseDevice {
|
|
9
5
|
peerUrl: string;
|
|
10
|
-
rtcClient: RtcClient | undefined;
|
|
11
|
-
remoteDevicePeerId: string | undefined;
|
|
12
|
-
realtimeListeners: RealtimeListener[];
|
|
13
6
|
id: string;
|
|
7
|
+
private telemetryStreamActive;
|
|
8
|
+
private streamTelemetry;
|
|
14
9
|
constructor(peerUrl: string);
|
|
15
10
|
getLatestTelemetry(): Promise<IStreamCurrentValue[]>;
|
|
11
|
+
private subscribeToTelemetry;
|
|
12
|
+
private readNextTelemetryRecord;
|
|
16
13
|
getDeviceId(): Promise<string>;
|
|
17
14
|
getConfiguration(): Promise<ConfigurationDocument>;
|
|
18
|
-
private handleMessage;
|
|
19
|
-
getRealtimeStatus(): "disconnected" | "connecting" | "connected";
|
|
20
|
-
getRealtimePing(): number | undefined;
|
|
21
15
|
startRealtimeConnection(sessionType?: number): Promise<void>;
|
|
22
|
-
|
|
23
|
-
removeRealtimeListener(listener: RealtimeListener): void;
|
|
24
|
-
getRealtimeVideoStreams(): Promise<RealtimeVideoStream[]>;
|
|
25
|
-
getRealtimeManipulators(): Promise<Manipulator[]>;
|
|
26
|
-
startListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
|
|
27
|
-
stopListeningToRealtimeVideo(stream: RealtimeVideoStream): Promise<void>;
|
|
28
|
-
startListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
29
|
-
stopListeningToRealtimeDataStream(stream: RealtimeDataStream): Promise<void>;
|
|
30
|
-
enableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
31
|
-
disableRealtimeTelemetryPriorityIngestion(streamName: string): Promise<void>;
|
|
16
|
+
private initConnectionMonitoring;
|
|
32
17
|
getRemotePeer(): Promise<IRtcPeer>;
|
|
33
18
|
stopRealtimeConnection(): Promise<void>;
|
|
34
|
-
createCustomDataChannel(channelName: string, rtcConfig?: RTCDataChannelInit): Promise<DataChannel>;
|
|
35
|
-
createCustomRequestDataChannel(channelName: string, timeout?: number): TextRequestDataChannel;
|
|
36
|
-
createCustomBinaryRequestDataChannel(channelName: string, timeout?: number): BinaryRequestDataChannel;
|
|
37
19
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DataChannel, DataChannelErrorListener, DataChannelListener } from "./main";
|
|
2
|
-
import {
|
|
2
|
+
import { BaseDevice } from "./BaseDevice";
|
|
3
3
|
declare abstract class RequestDataChannel {
|
|
4
|
-
protected device:
|
|
4
|
+
protected device: BaseDevice;
|
|
5
5
|
protected channel_name: string;
|
|
6
6
|
protected timeout: number;
|
|
7
7
|
protected channel: undefined | DataChannel;
|
|
8
8
|
protected requestIdToResponseMap: Map<string, any>;
|
|
9
|
-
constructor(device:
|
|
9
|
+
constructor(device: BaseDevice, channel_name: string, timeout: number);
|
|
10
10
|
addOpenListener(listener: DataChannelListener): void;
|
|
11
11
|
removeOpenListener(listener: DataChannelListener): void;
|
|
12
12
|
addCloseListener(listener: DataChannelListener): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IRole } from "./model/IRole";
|
|
2
|
+
export declare class Role {
|
|
3
|
+
static listRoles(): Promise<IRole[]>;
|
|
4
|
+
static createRole(role: IRole): Promise<IRole>;
|
|
5
|
+
static getRole(id: string): Promise<IRole>;
|
|
6
|
+
static patchRole(id: string, role: Partial<IRole>): Promise<IRole>;
|
|
7
|
+
static deleteRole(id: string): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IUser } from "./model/IUser";
|
|
2
|
+
export declare class User {
|
|
3
|
+
static listUsers(): Promise<IUser[]>;
|
|
4
|
+
static createUser(user: IUser): Promise<IUser>;
|
|
5
|
+
static getUser(id: string): Promise<IUser>;
|
|
6
|
+
static patchUser(id: string, user: Partial<IUser>): Promise<IUser>;
|
|
7
|
+
static deleteUser(id: string): Promise<void>;
|
|
8
|
+
}
|
|
@@ -10,6 +10,9 @@ export * from "./App";
|
|
|
10
10
|
export * from "./KeyValue";
|
|
11
11
|
export * from "./utils";
|
|
12
12
|
export * from "./AudioPlayer";
|
|
13
|
+
export * from "./Account";
|
|
14
|
+
export * from "./Role";
|
|
15
|
+
export * from "./User";
|
|
13
16
|
export * from "./model/accessLevels";
|
|
14
17
|
export * from "./model/AccessLevel";
|
|
15
18
|
export * from "./model/aggregateLevels";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ITaggedEntity } from "./ITaggedEntity";
|
|
2
|
+
import { Uuid } from "./Uuid";
|
|
3
|
+
import { IScopeFilter } from "./IScopeFilter";
|
|
4
|
+
import { IsoDate } from "./IsoDate";
|
|
5
|
+
import { DeviceType } from "./DeviceType";
|
|
6
|
+
import { IDeviceScope } from "./IDeviceScope";
|
|
7
|
+
import { IDeviceState } from "./IDeviceState";
|
|
8
|
+
import { IDeviceFollower } from "./IdeviceFollower";
|
|
9
|
+
export interface IDevice extends ITaggedEntity {
|
|
10
|
+
organizationId?: Uuid;
|
|
11
|
+
name: string;
|
|
12
|
+
type?: DeviceType;
|
|
13
|
+
userId?: Uuid | null;
|
|
14
|
+
fleetId?: Uuid | null;
|
|
15
|
+
eventTriggerGroupId?: Uuid | null;
|
|
16
|
+
scope?: IScopeFilter | null;
|
|
17
|
+
deviceScope?: IDeviceScope;
|
|
18
|
+
publicKey: string;
|
|
19
|
+
desiredAgentVersion?: string | null;
|
|
20
|
+
desiredConfigurationVersion?: number | null;
|
|
21
|
+
temporaryConfigurationVersion?: number | null;
|
|
22
|
+
temporaryConfigurationExpiration?: IsoDate | null;
|
|
23
|
+
temporaryConfigurationTemplateId?: Uuid | null;
|
|
24
|
+
followers?: IDeviceFollower[];
|
|
25
|
+
slackChannels?: string[];
|
|
26
|
+
phoneNumber?: string;
|
|
27
|
+
state?: IDeviceState;
|
|
28
|
+
enabled?: boolean;
|
|
29
|
+
fullyConfigured?: boolean;
|
|
30
|
+
disabledAt?: IsoDate | null;
|
|
31
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IDeviceReportedConfigurationState } from "./IDeviceReportedConfigurationState";
|
|
2
|
+
import { IHwInfo } from "./IHwInfo";
|
|
3
|
+
import { IDeviceRosState } from "./IDeviceRosState";
|
|
4
|
+
import { IDictionary } from "./IDictionary";
|
|
5
|
+
import { IOnDemandState } from "./IOnDemandState";
|
|
6
|
+
import { ICommandProgress } from "./ICommandPropgress";
|
|
7
|
+
export interface IDeviceState {
|
|
8
|
+
agentVersion?: string | null;
|
|
9
|
+
reportedConfiguration?: IDeviceReportedConfigurationState | null;
|
|
10
|
+
hwInfo?: IHwInfo | null;
|
|
11
|
+
ros?: IDeviceRosState | null;
|
|
12
|
+
env?: IDictionary | null;
|
|
13
|
+
otaEnabled?: boolean | null;
|
|
14
|
+
onDemand?: IOnDemandState | null;
|
|
15
|
+
commandProgress?: ICommandProgress[] | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IAudioDevice } from "./IAudioInfo";
|
|
2
|
+
import { IKernelInfo } from "./IKernelInfo";
|
|
3
|
+
import { INetworkInfo } from "./InetworkInfo";
|
|
4
|
+
import { INodeInfo } from "./INodeInfo";
|
|
5
|
+
import { IOnvifDevice } from "./IOnvifDevice";
|
|
6
|
+
import { IOsInfo } from "./IOsInfo";
|
|
7
|
+
import { IVideoDevice } from "./IVideoDevice";
|
|
8
|
+
export interface IHwInfo {
|
|
9
|
+
hwEncodingAvailable?: boolean;
|
|
10
|
+
nodeInfo?: INodeInfo;
|
|
11
|
+
kernelInfo?: IKernelInfo;
|
|
12
|
+
osInfo?: IOsInfo;
|
|
13
|
+
networkInfo?: INetworkInfo;
|
|
14
|
+
videoDevices?: IVideoDevice[];
|
|
15
|
+
audioCaptureDevices?: IAudioDevice[];
|
|
16
|
+
onvifDevices?: IOnvifDevice[];
|
|
17
|
+
}
|