@formant/realtime-sdk 1.0.0 → 1.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 +10 -0
- package/dist/client/AuthClient.d.ts +1 -1
- package/dist/common/setPromiseInterval.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model/IRtcSession.d.ts +2 -0
- package/dist/model/IUser.d.ts +1 -0
- package/dist/model/RtcSessionType.d.ts +2 -0
- package/dist/model/rtcSessionTypes.d.ts +1 -0
- package/dist/protos/api/signaling/v1/signaling.proto +17 -0
- package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.d.ts +12 -0
- package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.js +61 -0
- package/dist/protos/api/signaling/v1/signaling_pb.d.ts +69 -0
- package/dist/protos/api/signaling/v1/signaling_pb.js +579 -1
- package/dist/realtime-sdk/src/index.d.ts +2 -0
- package/dist/rtc-client/RtcConnectionV1.d.ts +1 -1
- package/dist/rtc-client/utils/encodeStreamId.d.ts +1 -1
- package/package.json +4 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IRtcPeerDescription } from "./IRtcPeerDescription";
|
|
2
2
|
import { IsoDate } from "./IsoDate";
|
|
3
|
+
import { RtcSessionType } from "./RtcSessionType";
|
|
3
4
|
import { Uuid } from "./Uuid";
|
|
4
5
|
export interface IRtcSession {
|
|
5
6
|
id: Uuid;
|
|
@@ -7,4 +8,5 @@ export interface IRtcSession {
|
|
|
7
8
|
offer: IRtcPeerDescription;
|
|
8
9
|
answer: IRtcPeerDescription;
|
|
9
10
|
created: IsoDate;
|
|
11
|
+
sessionType?: RtcSessionType;
|
|
10
12
|
}
|
package/dist/model/IUser.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const rtcSessionTypes: readonly ["teleop", "port-forwarding", "observe"];
|
|
@@ -22,6 +22,8 @@ service Signaling {
|
|
|
22
22
|
returns (SendSignalResponse) {}
|
|
23
23
|
rpc ReceiveSignalStream(ReceiveSignalStreamRequest)
|
|
24
24
|
returns (stream ReceiveSignalStreamResponse) {}
|
|
25
|
+
rpc GetSessions(GetSessionsRequest)
|
|
26
|
+
returns (GetSessionsResponse) {}
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
message Peer {
|
|
@@ -38,6 +40,7 @@ enum SessionType {
|
|
|
38
40
|
TELEOP = 1;
|
|
39
41
|
PORT_FORWARD = 2;
|
|
40
42
|
OBSERVE = 3;
|
|
43
|
+
HEADLESS = 4;
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
message Signal {
|
|
@@ -51,6 +54,20 @@ message Signal {
|
|
|
51
54
|
SessionType session_type = 8;
|
|
52
55
|
}
|
|
53
56
|
|
|
57
|
+
message RtcSession {
|
|
58
|
+
string session_id = 1;
|
|
59
|
+
string offer_peer_id = 2;
|
|
60
|
+
string answer_peer_id = 3;
|
|
61
|
+
string organization_id = 4;
|
|
62
|
+
string session_type = 5;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message GetSessionsRequest {
|
|
66
|
+
}
|
|
67
|
+
message GetSessionsResponse {
|
|
68
|
+
repeated RtcSession sessions = 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
54
71
|
message GetHealthRequest {}
|
|
55
72
|
message GetHealthResponse {
|
|
56
73
|
string version = 1;
|
|
@@ -62,6 +62,13 @@ export class SignalingClient {
|
|
|
62
62
|
metadata?: grpcWeb.Metadata
|
|
63
63
|
): grpcWeb.ClientReadableStream<api_signaling_v1_signaling_pb.ReceiveSignalStreamResponse>;
|
|
64
64
|
|
|
65
|
+
getSessions(
|
|
66
|
+
request: api_signaling_v1_signaling_pb.GetSessionsRequest,
|
|
67
|
+
metadata: grpcWeb.Metadata | undefined,
|
|
68
|
+
callback: (err: grpcWeb.RpcError,
|
|
69
|
+
response: api_signaling_v1_signaling_pb.GetSessionsResponse) => void
|
|
70
|
+
): grpcWeb.ClientReadableStream<api_signaling_v1_signaling_pb.GetSessionsResponse>;
|
|
71
|
+
|
|
65
72
|
}
|
|
66
73
|
|
|
67
74
|
export class SignalingPromiseClient {
|
|
@@ -109,5 +116,10 @@ export class SignalingPromiseClient {
|
|
|
109
116
|
metadata?: grpcWeb.Metadata
|
|
110
117
|
): grpcWeb.ClientReadableStream<api_signaling_v1_signaling_pb.ReceiveSignalStreamResponse>;
|
|
111
118
|
|
|
119
|
+
getSessions(
|
|
120
|
+
request: api_signaling_v1_signaling_pb.GetSessionsRequest,
|
|
121
|
+
metadata?: grpcWeb.Metadata
|
|
122
|
+
): Promise<api_signaling_v1_signaling_pb.GetSessionsResponse>;
|
|
123
|
+
|
|
112
124
|
}
|
|
113
125
|
|
|
@@ -561,5 +561,66 @@ proto.v1.signaling.api.SignalingPromiseClient.prototype.receiveSignalStream =
|
|
|
561
561
|
};
|
|
562
562
|
|
|
563
563
|
|
|
564
|
+
/**
|
|
565
|
+
* @const
|
|
566
|
+
* @type {!grpc.web.MethodDescriptor<
|
|
567
|
+
* !proto.v1.signaling.api.GetSessionsRequest,
|
|
568
|
+
* !proto.v1.signaling.api.GetSessionsResponse>}
|
|
569
|
+
*/
|
|
570
|
+
const methodDescriptor_Signaling_GetSessions = new grpc.web.MethodDescriptor(
|
|
571
|
+
'/v1.signaling.api.Signaling/GetSessions',
|
|
572
|
+
grpc.web.MethodType.UNARY,
|
|
573
|
+
proto.v1.signaling.api.GetSessionsRequest,
|
|
574
|
+
proto.v1.signaling.api.GetSessionsResponse,
|
|
575
|
+
/**
|
|
576
|
+
* @param {!proto.v1.signaling.api.GetSessionsRequest} request
|
|
577
|
+
* @return {!Uint8Array}
|
|
578
|
+
*/
|
|
579
|
+
function(request) {
|
|
580
|
+
return request.serializeBinary();
|
|
581
|
+
},
|
|
582
|
+
proto.v1.signaling.api.GetSessionsResponse.deserializeBinary
|
|
583
|
+
);
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* @param {!proto.v1.signaling.api.GetSessionsRequest} request The
|
|
588
|
+
* request proto
|
|
589
|
+
* @param {?Object<string, string>} metadata User defined
|
|
590
|
+
* call metadata
|
|
591
|
+
* @param {function(?grpc.web.RpcError, ?proto.v1.signaling.api.GetSessionsResponse)}
|
|
592
|
+
* callback The callback function(error, response)
|
|
593
|
+
* @return {!grpc.web.ClientReadableStream<!proto.v1.signaling.api.GetSessionsResponse>|undefined}
|
|
594
|
+
* The XHR Node Readable Stream
|
|
595
|
+
*/
|
|
596
|
+
proto.v1.signaling.api.SignalingClient.prototype.getSessions =
|
|
597
|
+
function(request, metadata, callback) {
|
|
598
|
+
return this.client_.rpcCall(this.hostname_ +
|
|
599
|
+
'/v1.signaling.api.Signaling/GetSessions',
|
|
600
|
+
request,
|
|
601
|
+
metadata || {},
|
|
602
|
+
methodDescriptor_Signaling_GetSessions,
|
|
603
|
+
callback);
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* @param {!proto.v1.signaling.api.GetSessionsRequest} request The
|
|
609
|
+
* request proto
|
|
610
|
+
* @param {?Object<string, string>=} metadata User defined
|
|
611
|
+
* call metadata
|
|
612
|
+
* @return {!Promise<!proto.v1.signaling.api.GetSessionsResponse>}
|
|
613
|
+
* Promise that resolves to the response
|
|
614
|
+
*/
|
|
615
|
+
proto.v1.signaling.api.SignalingPromiseClient.prototype.getSessions =
|
|
616
|
+
function(request, metadata) {
|
|
617
|
+
return this.client_.unaryCall(this.hostname_ +
|
|
618
|
+
'/v1.signaling.api.Signaling/GetSessions',
|
|
619
|
+
request,
|
|
620
|
+
metadata || {},
|
|
621
|
+
methodDescriptor_Signaling_GetSessions);
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
|
|
564
625
|
module.exports = proto.v1.signaling.api;
|
|
565
626
|
|
|
@@ -99,6 +99,74 @@ export namespace Signal {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
export class RtcSession extends jspb.Message {
|
|
103
|
+
getSessionId(): string;
|
|
104
|
+
setSessionId(value: string): RtcSession;
|
|
105
|
+
|
|
106
|
+
getOfferPeerId(): string;
|
|
107
|
+
setOfferPeerId(value: string): RtcSession;
|
|
108
|
+
|
|
109
|
+
getAnswerPeerId(): string;
|
|
110
|
+
setAnswerPeerId(value: string): RtcSession;
|
|
111
|
+
|
|
112
|
+
getOrganizationId(): string;
|
|
113
|
+
setOrganizationId(value: string): RtcSession;
|
|
114
|
+
|
|
115
|
+
getSessionType(): string;
|
|
116
|
+
setSessionType(value: string): RtcSession;
|
|
117
|
+
|
|
118
|
+
serializeBinary(): Uint8Array;
|
|
119
|
+
toObject(includeInstance?: boolean): RtcSession.AsObject;
|
|
120
|
+
static toObject(includeInstance: boolean, msg: RtcSession): RtcSession.AsObject;
|
|
121
|
+
static serializeBinaryToWriter(message: RtcSession, writer: jspb.BinaryWriter): void;
|
|
122
|
+
static deserializeBinary(bytes: Uint8Array): RtcSession;
|
|
123
|
+
static deserializeBinaryFromReader(message: RtcSession, reader: jspb.BinaryReader): RtcSession;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export namespace RtcSession {
|
|
127
|
+
export type AsObject = {
|
|
128
|
+
sessionId: string,
|
|
129
|
+
offerPeerId: string,
|
|
130
|
+
answerPeerId: string,
|
|
131
|
+
organizationId: string,
|
|
132
|
+
sessionType: string,
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export class GetSessionsRequest extends jspb.Message {
|
|
137
|
+
serializeBinary(): Uint8Array;
|
|
138
|
+
toObject(includeInstance?: boolean): GetSessionsRequest.AsObject;
|
|
139
|
+
static toObject(includeInstance: boolean, msg: GetSessionsRequest): GetSessionsRequest.AsObject;
|
|
140
|
+
static serializeBinaryToWriter(message: GetSessionsRequest, writer: jspb.BinaryWriter): void;
|
|
141
|
+
static deserializeBinary(bytes: Uint8Array): GetSessionsRequest;
|
|
142
|
+
static deserializeBinaryFromReader(message: GetSessionsRequest, reader: jspb.BinaryReader): GetSessionsRequest;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export namespace GetSessionsRequest {
|
|
146
|
+
export type AsObject = {
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export class GetSessionsResponse extends jspb.Message {
|
|
151
|
+
getSessionsList(): Array<RtcSession>;
|
|
152
|
+
setSessionsList(value: Array<RtcSession>): GetSessionsResponse;
|
|
153
|
+
clearSessionsList(): GetSessionsResponse;
|
|
154
|
+
addSessions(value?: RtcSession, index?: number): RtcSession;
|
|
155
|
+
|
|
156
|
+
serializeBinary(): Uint8Array;
|
|
157
|
+
toObject(includeInstance?: boolean): GetSessionsResponse.AsObject;
|
|
158
|
+
static toObject(includeInstance: boolean, msg: GetSessionsResponse): GetSessionsResponse.AsObject;
|
|
159
|
+
static serializeBinaryToWriter(message: GetSessionsResponse, writer: jspb.BinaryWriter): void;
|
|
160
|
+
static deserializeBinary(bytes: Uint8Array): GetSessionsResponse;
|
|
161
|
+
static deserializeBinaryFromReader(message: GetSessionsResponse, reader: jspb.BinaryReader): GetSessionsResponse;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export namespace GetSessionsResponse {
|
|
165
|
+
export type AsObject = {
|
|
166
|
+
sessionsList: Array<RtcSession.AsObject>,
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
102
170
|
export class GetHealthRequest extends jspb.Message {
|
|
103
171
|
serializeBinary(): Uint8Array;
|
|
104
172
|
toObject(includeInstance?: boolean): GetHealthRequest.AsObject;
|
|
@@ -386,4 +454,5 @@ export enum SessionType {
|
|
|
386
454
|
TELEOP = 1,
|
|
387
455
|
PORT_FORWARD = 2,
|
|
388
456
|
OBSERVE = 3,
|
|
457
|
+
HEADLESS = 4,
|
|
389
458
|
}
|