@formant/realtime-sdk 0.0.2 → 0.0.6
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/client/AuthClient.d.ts +3 -3
- package/dist/common/config/index.d.ts +1 -0
- package/dist/common/narrowError.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model/Feature.d.ts +3 -0
- package/dist/model/IColorRGBA.d.ts +6 -0
- package/dist/model/IGetFeaturesResponse.d.ts +4 -0
- package/dist/model/IJointState.d.ts +4 -2
- package/dist/model/IMarker3D.d.ts +23 -0
- package/dist/model/IMarker3DArray.d.ts +4 -0
- package/dist/model/IPoint.d.ts +2 -0
- package/dist/model/IPoseWithCovariance.d.ts +5 -0
- package/dist/model/IUser.d.ts +3 -3
- package/dist/model/Marker3DAction.d.ts +2 -0
- package/dist/model/Marker3DType.d.ts +2 -0
- package/dist/model/bytes.d.ts +9 -0
- package/dist/model/features.d.ts +2 -0
- package/dist/model/marker3DActions.d.ts +1 -0
- package/dist/model/marker3DTypes.d.ts +1 -0
- package/dist/model/rtcStreamTypes.d.ts +6 -1
- package/dist/protos/api/signaling/v1/signaling.proto +7 -0
- package/dist/protos/api/signaling/v1/signaling_pb.d.ts +9 -0
- package/dist/protos/api/signaling/v1/signaling_pb.js +41 -1
- package/dist/rtc-client/RtcClient.d.ts +3 -0
- package/dist/rtc-client/models/IRtcAgentInfo.d.ts +3 -0
- package/dist/rtc-client/models/IRtcPointCloud.d.ts +5 -0
- package/dist/rtc-client/models/IRtcStreamPayload.d.ts +10 -0
- package/dist/rtc-client/models/IStreamControl.d.ts +4 -1
- package/package.json +33 -33
- package/dist/1.index.js +0 -1
- package/dist/model/Role.d.ts +0 -2
- package/dist/model/roles.d.ts +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IColorRGBA } from "./IColorRGBA";
|
|
2
|
+
import { ITransform } from "./ITransform";
|
|
3
|
+
import { IVector3 } from "./IVector3";
|
|
4
|
+
import { Marker3DAction } from "./Marker3DAction";
|
|
5
|
+
import { Marker3DType } from "./Marker3DType";
|
|
6
|
+
export interface IMarker3D {
|
|
7
|
+
world_to_local?: ITransform;
|
|
8
|
+
ns: string;
|
|
9
|
+
id: number;
|
|
10
|
+
type: Marker3DType;
|
|
11
|
+
action: Marker3DAction;
|
|
12
|
+
pose: ITransform;
|
|
13
|
+
scale: IVector3;
|
|
14
|
+
color: IColorRGBA;
|
|
15
|
+
lifetime: number;
|
|
16
|
+
frame_id: string;
|
|
17
|
+
frame_locked: boolean;
|
|
18
|
+
points: IVector3[];
|
|
19
|
+
colors: IColorRGBA[];
|
|
20
|
+
text: string;
|
|
21
|
+
mesh_resource: string;
|
|
22
|
+
mesh_use_embedded_materials: boolean;
|
|
23
|
+
}
|
package/dist/model/IUser.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { IBaseEntity } from "./IBaseEntity";
|
|
2
2
|
import { IsoDate } from "./IsoDate";
|
|
3
3
|
import { ITags } from "./ITags";
|
|
4
|
-
import { Role } from "./Role";
|
|
5
4
|
import { Uuid } from "./Uuid";
|
|
6
5
|
export interface IUser extends IBaseEntity {
|
|
7
6
|
organizationId?: Uuid;
|
|
8
7
|
email: string;
|
|
9
8
|
firstName: string;
|
|
10
9
|
lastName: string;
|
|
11
|
-
|
|
10
|
+
roleId: Uuid;
|
|
11
|
+
teamId?: Uuid | null;
|
|
12
12
|
tags: ITags;
|
|
13
|
-
phoneNumber?: string
|
|
13
|
+
phoneNumber?: string;
|
|
14
14
|
enabled?: boolean;
|
|
15
15
|
isOrganizationOwner?: boolean;
|
|
16
16
|
termsAccepted?: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const agentFeatures: readonly ["telemetry", "internalTelemetry", "teleop", "ssh", "customEvents", "triggeredEvents", "portForwarding", "commands", "interventions", "onDemand", "appConfig", "blobStorage"];
|
|
2
|
+
export declare const features: readonly ["telemetry", "internalTelemetry", "teleop", "ssh", "customEvents", "triggeredEvents", "portForwarding", "commands", "interventions", "onDemand", "appConfig", "blobStorage", "events", "analytics", "annotations", "observability", "diagnostics", "advancedConfiguration", "dataExport", "onDemand", "share", "adapters", "s3Export", "fileStorage", "roleViewer", "teams"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const marker3DActions: readonly ["add", "modify", "delete", "delete_all"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const marker3DTypes: readonly ["arrow", "cube", "sphere", "cylinder", "line_strip", "line_list", "cube_list", "sphere_list", "points", "text_view_facing", "mesh_resource", "triangle_list"];
|
|
@@ -2,6 +2,7 @@ export declare const rtcPingStreamType: "ping";
|
|
|
2
2
|
export declare const rtcPongStreamType: "pong";
|
|
3
3
|
export declare const rtcStreamControlStreamType: "stream-control";
|
|
4
4
|
export declare const rtcStreamsInfoStreamType: "streams-info";
|
|
5
|
+
export declare const rtcAgentInfoStreamType: "agent-info";
|
|
5
6
|
export declare const rtcNumericStreamType: "numeric";
|
|
6
7
|
export declare const rtcBooleanStreamType: "boolean";
|
|
7
8
|
export declare const rtcBitsetStreamType: "bitset";
|
|
@@ -12,6 +13,10 @@ export declare const rtcAudioChunkStreamType: "audio-chunk";
|
|
|
12
13
|
export declare const rtcPoseStreamType: "pose";
|
|
13
14
|
export declare const rtcGoalIDStreamType: "goal-id";
|
|
14
15
|
export declare const rtcJointStateStreamType: "joint-state";
|
|
15
|
-
export declare const
|
|
16
|
+
export declare const rtcPoseWithCovarianceStreamType: "pose-with-covariance";
|
|
17
|
+
export declare const rtcPointCloudStreamType: "point-cloud";
|
|
18
|
+
export declare const rtcMarkerArrayStreamType: "marker-array";
|
|
19
|
+
export declare const rtcPointStreamType: "point";
|
|
20
|
+
export declare const rtcStreamTypes: readonly ["ping", "pong", "stream-control", "streams-info", "agent-info", "numeric", "boolean", "bitset", "twist", "compressed-image", "h264-video-frame", "audio-chunk", "pose", "goal-id", "joint-state", "pose-with-covariance", "point-cloud", "point", "marker-array"];
|
|
16
21
|
export declare const rtcImageStreamTypes: string[];
|
|
17
22
|
export declare const rtcSystemStreamTypes: string[];
|
|
@@ -31,6 +31,12 @@ message Peer {
|
|
|
31
31
|
google.protobuf.Int64Value peer_created_timestamp = 6; // No value means it's for a new peer
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
enum SessionType {
|
|
35
|
+
UNKNOWN = 0;
|
|
36
|
+
TELEOP = 1;
|
|
37
|
+
PORT_FORWARD = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
message Signal {
|
|
35
41
|
google.protobuf.StringValue session_id = 1; // No value means it's for a new session
|
|
36
42
|
google.protobuf.Int64Value session_created_timestamp = 2; // No value means it's for a new session
|
|
@@ -39,6 +45,7 @@ message Signal {
|
|
|
39
45
|
string payload = 5;
|
|
40
46
|
string ice_servers = 6; // JSON-encoded RTCIceServer list
|
|
41
47
|
string ice_transport_policy = 7;
|
|
48
|
+
SessionType session_type = 8;
|
|
42
49
|
}
|
|
43
50
|
|
|
44
51
|
message CreatePeerRequest {}
|
|
@@ -75,6 +75,9 @@ export class Signal extends jspb.Message {
|
|
|
75
75
|
getIceTransportPolicy(): string;
|
|
76
76
|
setIceTransportPolicy(value: string): Signal;
|
|
77
77
|
|
|
78
|
+
getSessionType(): SessionType;
|
|
79
|
+
setSessionType(value: SessionType): Signal;
|
|
80
|
+
|
|
78
81
|
serializeBinary(): Uint8Array;
|
|
79
82
|
toObject(includeInstance?: boolean): Signal.AsObject;
|
|
80
83
|
static toObject(includeInstance: boolean, msg: Signal): Signal.AsObject;
|
|
@@ -92,6 +95,7 @@ export namespace Signal {
|
|
|
92
95
|
payload: string,
|
|
93
96
|
iceServers: string,
|
|
94
97
|
iceTransportPolicy: string,
|
|
98
|
+
sessionType: SessionType,
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
|
|
@@ -345,3 +349,8 @@ export namespace ReceiveSignalStreamResponse {
|
|
|
345
349
|
}
|
|
346
350
|
}
|
|
347
351
|
|
|
352
|
+
export enum SessionType {
|
|
353
|
+
UNKNOWN = 0,
|
|
354
|
+
TELEOP = 1,
|
|
355
|
+
PORT_FORWARD = 2,
|
|
356
|
+
}
|
|
@@ -32,6 +32,7 @@ goog.exportSymbol('proto.v1.signaling.api.RefreshPeerRequest', null, global);
|
|
|
32
32
|
goog.exportSymbol('proto.v1.signaling.api.RefreshPeerResponse', null, global);
|
|
33
33
|
goog.exportSymbol('proto.v1.signaling.api.SendSignalRequest', null, global);
|
|
34
34
|
goog.exportSymbol('proto.v1.signaling.api.SendSignalResponse', null, global);
|
|
35
|
+
goog.exportSymbol('proto.v1.signaling.api.SessionType', null, global);
|
|
35
36
|
goog.exportSymbol('proto.v1.signaling.api.Signal', null, global);
|
|
36
37
|
/**
|
|
37
38
|
* Generated by JsPbCodeGenerator.
|
|
@@ -776,7 +777,8 @@ proto.v1.signaling.api.Signal.toObject = function(includeInstance, msg) {
|
|
|
776
777
|
receiverId: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
777
778
|
payload: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
|
778
779
|
iceServers: jspb.Message.getFieldWithDefault(msg, 6, ""),
|
|
779
|
-
iceTransportPolicy: jspb.Message.getFieldWithDefault(msg, 7, "")
|
|
780
|
+
iceTransportPolicy: jspb.Message.getFieldWithDefault(msg, 7, ""),
|
|
781
|
+
sessionType: jspb.Message.getFieldWithDefault(msg, 8, 0)
|
|
780
782
|
};
|
|
781
783
|
|
|
782
784
|
if (includeInstance) {
|
|
@@ -843,6 +845,10 @@ proto.v1.signaling.api.Signal.deserializeBinaryFromReader = function(msg, reader
|
|
|
843
845
|
var value = /** @type {string} */ (reader.readString());
|
|
844
846
|
msg.setIceTransportPolicy(value);
|
|
845
847
|
break;
|
|
848
|
+
case 8:
|
|
849
|
+
var value = /** @type {!proto.v1.signaling.api.SessionType} */ (reader.readEnum());
|
|
850
|
+
msg.setSessionType(value);
|
|
851
|
+
break;
|
|
846
852
|
default:
|
|
847
853
|
reader.skipField();
|
|
848
854
|
break;
|
|
@@ -923,6 +929,13 @@ proto.v1.signaling.api.Signal.serializeBinaryToWriter = function(message, writer
|
|
|
923
929
|
f
|
|
924
930
|
);
|
|
925
931
|
}
|
|
932
|
+
f = message.getSessionType();
|
|
933
|
+
if (f !== 0.0) {
|
|
934
|
+
writer.writeEnum(
|
|
935
|
+
8,
|
|
936
|
+
f
|
|
937
|
+
);
|
|
938
|
+
}
|
|
926
939
|
};
|
|
927
940
|
|
|
928
941
|
|
|
@@ -1090,6 +1103,24 @@ proto.v1.signaling.api.Signal.prototype.setIceTransportPolicy = function(value)
|
|
|
1090
1103
|
};
|
|
1091
1104
|
|
|
1092
1105
|
|
|
1106
|
+
/**
|
|
1107
|
+
* optional SessionType session_type = 8;
|
|
1108
|
+
* @return {!proto.v1.signaling.api.SessionType}
|
|
1109
|
+
*/
|
|
1110
|
+
proto.v1.signaling.api.Signal.prototype.getSessionType = function() {
|
|
1111
|
+
return /** @type {!proto.v1.signaling.api.SessionType} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* @param {!proto.v1.signaling.api.SessionType} value
|
|
1117
|
+
* @return {!proto.v1.signaling.api.Signal} returns this
|
|
1118
|
+
*/
|
|
1119
|
+
proto.v1.signaling.api.Signal.prototype.setSessionType = function(value) {
|
|
1120
|
+
return jspb.Message.setProto3EnumField(this, 8, value);
|
|
1121
|
+
};
|
|
1122
|
+
|
|
1123
|
+
|
|
1093
1124
|
|
|
1094
1125
|
|
|
1095
1126
|
|
|
@@ -2951,4 +2982,13 @@ proto.v1.signaling.api.ReceiveSignalStreamResponse.prototype.hasSignal = functio
|
|
|
2951
2982
|
};
|
|
2952
2983
|
|
|
2953
2984
|
|
|
2985
|
+
/**
|
|
2986
|
+
* @enum {number}
|
|
2987
|
+
*/
|
|
2988
|
+
proto.v1.signaling.api.SessionType = {
|
|
2989
|
+
UNKNOWN: 0,
|
|
2990
|
+
TELEOP: 1,
|
|
2991
|
+
PORT_FORWARD: 2
|
|
2992
|
+
};
|
|
2993
|
+
|
|
2954
2994
|
goog.object.extend(exports, proto.v1.signaling.api);
|
|
@@ -45,6 +45,9 @@ export declare class RtcClient {
|
|
|
45
45
|
getConnectionStatsInfo(remotePeerId: Uuid): Promise<IRtcConnectionStatsInfo | undefined>;
|
|
46
46
|
disconnect(remotePeerId: Uuid): Promise<void>;
|
|
47
47
|
getPeers(): Promise<IRtcPeer[]>;
|
|
48
|
+
getSessions(): Promise<{
|
|
49
|
+
[key in string]: string[];
|
|
50
|
+
}>;
|
|
48
51
|
getPing(remotePeerId: Uuid): number | undefined;
|
|
49
52
|
getLastMessageTimestamp(remotePeerId: Uuid): Timestamp | undefined;
|
|
50
53
|
getSessionMetricsMessageCounts(remotePeerId: Uuid): IRtcSessionMetricsMessageCounts | undefined;
|
|
@@ -3,9 +3,14 @@ import { ICompressedImage } from "../../model/ICompressedImage";
|
|
|
3
3
|
import { IGoalID } from "../../model/IGoalID";
|
|
4
4
|
import { IH264VideoFrame } from "../../model/IH264VideoFrame";
|
|
5
5
|
import { IJointState } from "../../model/IJointState";
|
|
6
|
+
import { IMarker3DArray } from "../../model/IMarker3DArray";
|
|
7
|
+
import { IPoint } from "../../model/IPoint";
|
|
8
|
+
import { IPoseWithCovariance } from "../../model/IPoseWithCovariance";
|
|
6
9
|
import { ITransform } from "../../model/ITransform";
|
|
7
10
|
import { ITwist } from "../../model/ITwist";
|
|
8
11
|
import { Timestamp } from "../../model/Timestamp";
|
|
12
|
+
import { IRtcAgentInfo } from "./IRtcAgentInfo";
|
|
13
|
+
import { IRtcPointCloud } from "./IRtcPointCloud";
|
|
9
14
|
import { IRtcStreamsInfo } from "./IRtcStreamsInfo";
|
|
10
15
|
import { IStreamControl } from "./IStreamControl";
|
|
11
16
|
export interface IRtcStreamPayload {
|
|
@@ -13,6 +18,7 @@ export interface IRtcStreamPayload {
|
|
|
13
18
|
pong?: Timestamp;
|
|
14
19
|
streamControl?: IStreamControl;
|
|
15
20
|
streamsInfo?: IRtcStreamsInfo;
|
|
21
|
+
agentInfo?: IRtcAgentInfo;
|
|
16
22
|
numeric?: {
|
|
17
23
|
value: number;
|
|
18
24
|
};
|
|
@@ -30,4 +36,8 @@ export interface IRtcStreamPayload {
|
|
|
30
36
|
h264VideoFrame?: IH264VideoFrame;
|
|
31
37
|
audioChunk?: IAudioChunk;
|
|
32
38
|
jointState?: IJointState;
|
|
39
|
+
poseWithCovariance?: IPoseWithCovariance;
|
|
40
|
+
pointCloud?: IRtcPointCloud;
|
|
41
|
+
point?: IPoint;
|
|
42
|
+
markerArray?: IMarker3DArray;
|
|
33
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const rtcPipelineType = "rtc";
|
|
2
2
|
export declare const telemetryPipelineType = "telemetry";
|
|
3
|
-
export declare type IStreamControl = IRtcStreamControl | ITelemetryStreamControl | IDegradeVideoStreamControl | IAudioStreamControl;
|
|
3
|
+
export declare type IStreamControl = IRtcStreamControl | ITelemetryStreamControl | IDegradeVideoStreamControl | IAudioStreamControl | ISetLowBandwidthMode;
|
|
4
4
|
export interface IStreamControlBase {
|
|
5
5
|
streamName: string;
|
|
6
6
|
}
|
|
@@ -18,3 +18,6 @@ export interface IDegradeVideoStreamControl extends IStreamControlBase {
|
|
|
18
18
|
export interface IAudioStreamControl extends IStreamControlBase {
|
|
19
19
|
setAudioFormat: string;
|
|
20
20
|
}
|
|
21
|
+
export interface ISetLowBandwidthMode extends IStreamControlBase {
|
|
22
|
+
setLowBandwidthMode: boolean;
|
|
23
|
+
}
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
"name": "@formant/realtime-sdk",
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/realtime-sdk/src/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"compile": "tsc",
|
|
13
|
+
"build": "yarn make-protos && env $(cat src/config/production.env) webpack",
|
|
14
|
+
"postbuild": "tsc --emitDeclarationOnly --declaration --declarationDir ./dist --skipLibCheck && tsc-alias",
|
|
15
|
+
"prepublishOnly": "yarn clean && yarn build",
|
|
16
|
+
"make-protos": "cd ../../../ && make protos && cd -"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"google-protobuf": "3.17.3",
|
|
20
|
+
"grpc-web": "1.2.1"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"circular-dependency-plugin": "^5.2.2",
|
|
24
|
+
"copy-webpack-plugin": "^6.4.1",
|
|
25
|
+
"file-loader": "^5.1.0",
|
|
26
|
+
"fork-ts-checker-webpack-plugin": "^4.1.0",
|
|
27
|
+
"terser-webpack-plugin": "^2.3.5",
|
|
28
|
+
"ts-loader": "^6.2.1",
|
|
29
|
+
"tsc-alias": "^1.4.1",
|
|
30
|
+
"webpack": "^4.42.0",
|
|
31
|
+
"webpack-bundle-analyzer": "^3.6.1"
|
|
32
|
+
},
|
|
33
|
+
"author": "",
|
|
34
|
+
"description": ""
|
|
35
35
|
}
|
package/dist/1.index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(this.webpackJsonpTeleopClient=this.webpackJsonpTeleopClient||[]).push([[1],{230:function(n,t,e){"use strict";e.r(t),e.d(t,"LogClient",(function(){return c}));var o=e(35),i=function(n,t,e,o){return new(e||(e=Promise))((function(i,c){function s(n){try{u(o.next(n))}catch(n){c(n)}}function r(n){try{u(o.throw(n))}catch(n){c(n)}}function u(n){var t;n.done?i(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(s,r)}u((o=o.apply(n,t||[])).next())}))};class c extends o.a{log(n){return i(this,void 0,void 0,(function*(){yield this.fetch("logs",{method:"POST",body:JSON.stringify({logs:n}),allowUnsafeRetries:!0})}))}}}}]);
|
package/dist/model/Role.d.ts
DELETED
package/dist/model/roles.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const roles: readonly ["customer", "viewer", "operator", "administrator"];
|