@fishjam-cloud/js-server-sdk 0.28.0 → 0.28.1
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/{chunk-7QSC3SIL.mjs → chunk-GTNIELH6.mjs} +1 -1
- package/dist/index.d.mts +60 -54
- package/dist/index.d.ts +60 -54
- package/dist/index.js +47 -147
- package/dist/index.mjs +47 -147
- package/dist/integrations/gemini.js +1 -1
- package/dist/integrations/gemini.mjs +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ interface AgentOutput {
|
|
|
12
12
|
* @type {AudioFormat}
|
|
13
13
|
* @memberof AgentOutput
|
|
14
14
|
*/
|
|
15
|
-
audioFormat?: AudioFormat;
|
|
15
|
+
'audioFormat'?: AudioFormat;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @type {AudioSampleRate}
|
|
19
19
|
* @memberof AgentOutput
|
|
20
20
|
*/
|
|
21
|
-
audioSampleRate?: AudioSampleRate;
|
|
21
|
+
'audioSampleRate'?: AudioSampleRate;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* The format of the output audio
|
|
@@ -28,7 +28,7 @@ interface AgentOutput {
|
|
|
28
28
|
declare const AudioFormat: {
|
|
29
29
|
readonly Pcm16: "pcm16";
|
|
30
30
|
};
|
|
31
|
-
type AudioFormat =
|
|
31
|
+
type AudioFormat = typeof AudioFormat[keyof typeof AudioFormat];
|
|
32
32
|
/**
|
|
33
33
|
* The sample rate of the output audio
|
|
34
34
|
* @export
|
|
@@ -38,38 +38,44 @@ declare const AudioSampleRate: {
|
|
|
38
38
|
readonly NUMBER_16000: 16000;
|
|
39
39
|
readonly NUMBER_24000: 24000;
|
|
40
40
|
};
|
|
41
|
-
type AudioSampleRate =
|
|
41
|
+
type AudioSampleRate = typeof AudioSampleRate[keyof typeof AudioSampleRate];
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Connection details for a MoQ relay client
|
|
44
44
|
* @export
|
|
45
|
-
* @interface
|
|
45
|
+
* @interface MoqAccess
|
|
46
46
|
*/
|
|
47
|
-
interface
|
|
47
|
+
interface MoqAccess {
|
|
48
48
|
/**
|
|
49
|
-
* JWT
|
|
49
|
+
* Relay connection URL with the JWT embedded as a `?jwt=` query parameter. Pass directly to a MoQ client SDK.
|
|
50
50
|
* @type {string}
|
|
51
|
-
* @memberof
|
|
51
|
+
* @memberof MoqAccess
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
'connection_url': string;
|
|
54
|
+
/**
|
|
55
|
+
* JWT authorizing the MoQ relay connection, also embedded in `connection_url`
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof MoqAccess
|
|
58
|
+
*/
|
|
59
|
+
'token': string;
|
|
54
60
|
}
|
|
55
61
|
/**
|
|
56
|
-
* MoQ
|
|
62
|
+
* MoQ access configuration
|
|
57
63
|
* @export
|
|
58
|
-
* @interface
|
|
64
|
+
* @interface MoqAccessConfig
|
|
59
65
|
*/
|
|
60
|
-
interface
|
|
66
|
+
interface MoqAccessConfig {
|
|
61
67
|
/**
|
|
62
68
|
* Path under the root the token grants publish access to
|
|
63
69
|
* @type {string}
|
|
64
|
-
* @memberof
|
|
70
|
+
* @memberof MoqAccessConfig
|
|
65
71
|
*/
|
|
66
|
-
publishPath?: string | null;
|
|
72
|
+
'publishPath'?: string | null;
|
|
67
73
|
/**
|
|
68
74
|
* Path under the root the token grants subscribe access to
|
|
69
75
|
* @type {string}
|
|
70
|
-
* @memberof
|
|
76
|
+
* @memberof MoqAccessConfig
|
|
71
77
|
*/
|
|
72
|
-
subscribePath?: string | null;
|
|
78
|
+
'subscribePath'?: string | null;
|
|
73
79
|
}
|
|
74
80
|
/**
|
|
75
81
|
* Describes peer status
|
|
@@ -82,43 +88,43 @@ interface Peer$1 {
|
|
|
82
88
|
* @type {string}
|
|
83
89
|
* @memberof Peer
|
|
84
90
|
*/
|
|
85
|
-
id: string;
|
|
91
|
+
'id': string;
|
|
86
92
|
/**
|
|
87
93
|
* Custom metadata set by the peer
|
|
88
94
|
* @type {object}
|
|
89
95
|
* @memberof Peer
|
|
90
96
|
*/
|
|
91
|
-
metadata: object | null;
|
|
97
|
+
'metadata': object | null;
|
|
92
98
|
/**
|
|
93
99
|
*
|
|
94
100
|
* @type {PeerStatus}
|
|
95
101
|
* @memberof Peer
|
|
96
102
|
*/
|
|
97
|
-
status: PeerStatus;
|
|
103
|
+
'status': PeerStatus;
|
|
98
104
|
/**
|
|
99
105
|
*
|
|
100
106
|
* @type {SubscribeMode}
|
|
101
107
|
* @memberof Peer
|
|
102
108
|
*/
|
|
103
|
-
subscribeMode: SubscribeMode;
|
|
109
|
+
'subscribeMode': SubscribeMode;
|
|
104
110
|
/**
|
|
105
111
|
*
|
|
106
112
|
* @type {Subscriptions}
|
|
107
113
|
* @memberof Peer
|
|
108
114
|
*/
|
|
109
|
-
subscriptions: Subscriptions;
|
|
115
|
+
'subscriptions': Subscriptions;
|
|
110
116
|
/**
|
|
111
117
|
* List of all peer\'s tracks
|
|
112
118
|
* @type {Array<Track>}
|
|
113
119
|
* @memberof Peer
|
|
114
120
|
*/
|
|
115
|
-
tracks: Array<Track$2>;
|
|
121
|
+
'tracks': Array<Track$2>;
|
|
116
122
|
/**
|
|
117
123
|
*
|
|
118
124
|
* @type {PeerType}
|
|
119
125
|
* @memberof Peer
|
|
120
126
|
*/
|
|
121
|
-
type: PeerType$1;
|
|
127
|
+
'type': PeerType$1;
|
|
122
128
|
}
|
|
123
129
|
/**
|
|
124
130
|
* @type PeerOptions
|
|
@@ -137,13 +143,13 @@ interface PeerOptionsAgent {
|
|
|
137
143
|
* @type {AgentOutput}
|
|
138
144
|
* @memberof PeerOptionsAgent
|
|
139
145
|
*/
|
|
140
|
-
output?: AgentOutput;
|
|
146
|
+
'output'?: AgentOutput;
|
|
141
147
|
/**
|
|
142
148
|
*
|
|
143
149
|
* @type {SubscribeMode}
|
|
144
150
|
* @memberof PeerOptionsAgent
|
|
145
151
|
*/
|
|
146
|
-
subscribeMode?: SubscribeMode;
|
|
152
|
+
'subscribeMode'?: SubscribeMode;
|
|
147
153
|
}
|
|
148
154
|
/**
|
|
149
155
|
* Options specific to the VAPI peer
|
|
@@ -156,19 +162,19 @@ interface PeerOptionsVapi {
|
|
|
156
162
|
* @type {string}
|
|
157
163
|
* @memberof PeerOptionsVapi
|
|
158
164
|
*/
|
|
159
|
-
apiKey: string;
|
|
165
|
+
'apiKey': string;
|
|
160
166
|
/**
|
|
161
167
|
* VAPI call ID
|
|
162
168
|
* @type {string}
|
|
163
169
|
* @memberof PeerOptionsVapi
|
|
164
170
|
*/
|
|
165
|
-
callId: string;
|
|
171
|
+
'callId': string;
|
|
166
172
|
/**
|
|
167
173
|
*
|
|
168
174
|
* @type {SubscribeMode}
|
|
169
175
|
* @memberof PeerOptionsVapi
|
|
170
176
|
*/
|
|
171
|
-
subscribeMode?: SubscribeMode;
|
|
177
|
+
'subscribeMode'?: SubscribeMode;
|
|
172
178
|
}
|
|
173
179
|
/**
|
|
174
180
|
* Options specific to the WebRTC peer
|
|
@@ -181,7 +187,7 @@ interface PeerOptionsWebRTC {
|
|
|
181
187
|
* @type {{ [key: string]: any; }}
|
|
182
188
|
* @memberof PeerOptionsWebRTC
|
|
183
189
|
*/
|
|
184
|
-
metadata?: {
|
|
190
|
+
'metadata'?: {
|
|
185
191
|
[key: string]: any;
|
|
186
192
|
};
|
|
187
193
|
/**
|
|
@@ -189,7 +195,7 @@ interface PeerOptionsWebRTC {
|
|
|
189
195
|
* @type {SubscribeMode}
|
|
190
196
|
* @memberof PeerOptionsWebRTC
|
|
191
197
|
*/
|
|
192
|
-
subscribeMode?: SubscribeMode;
|
|
198
|
+
'subscribeMode'?: SubscribeMode;
|
|
193
199
|
}
|
|
194
200
|
/**
|
|
195
201
|
* Informs about the peer status
|
|
@@ -200,7 +206,7 @@ declare const PeerStatus: {
|
|
|
200
206
|
readonly Connected: "connected";
|
|
201
207
|
readonly Disconnected: "disconnected";
|
|
202
208
|
};
|
|
203
|
-
type PeerStatus =
|
|
209
|
+
type PeerStatus = typeof PeerStatus[keyof typeof PeerStatus];
|
|
204
210
|
/**
|
|
205
211
|
* Peer type
|
|
206
212
|
* @export
|
|
@@ -211,7 +217,7 @@ declare const PeerType$1: {
|
|
|
211
217
|
readonly Agent: "agent";
|
|
212
218
|
readonly Vapi: "vapi";
|
|
213
219
|
};
|
|
214
|
-
type PeerType$1 =
|
|
220
|
+
type PeerType$1 = typeof PeerType$1[keyof typeof PeerType$1];
|
|
215
221
|
/**
|
|
216
222
|
* Room configuration
|
|
217
223
|
* @export
|
|
@@ -223,37 +229,37 @@ interface RoomConfig {
|
|
|
223
229
|
* @type {boolean}
|
|
224
230
|
* @memberof RoomConfig
|
|
225
231
|
*/
|
|
226
|
-
batchWebhookNotifications?: boolean;
|
|
232
|
+
'batchWebhookNotifications'?: boolean;
|
|
227
233
|
/**
|
|
228
234
|
* Maximum amount of peers allowed into the room
|
|
229
235
|
* @type {number}
|
|
230
236
|
* @memberof RoomConfig
|
|
231
237
|
*/
|
|
232
|
-
maxPeers?: number | null;
|
|
238
|
+
'maxPeers'?: number | null;
|
|
233
239
|
/**
|
|
234
240
|
* True if livestream viewers can omit specifying a token.
|
|
235
241
|
* @type {boolean}
|
|
236
242
|
* @memberof RoomConfig
|
|
237
243
|
*/
|
|
238
|
-
public?: boolean;
|
|
244
|
+
'public'?: boolean;
|
|
239
245
|
/**
|
|
240
246
|
*
|
|
241
247
|
* @type {RoomType}
|
|
242
248
|
* @memberof RoomConfig
|
|
243
249
|
*/
|
|
244
|
-
roomType?: RoomType;
|
|
250
|
+
'roomType'?: RoomType;
|
|
245
251
|
/**
|
|
246
252
|
*
|
|
247
253
|
* @type {VideoCodec}
|
|
248
254
|
* @memberof RoomConfig
|
|
249
255
|
*/
|
|
250
|
-
videoCodec?: VideoCodec;
|
|
256
|
+
'videoCodec'?: VideoCodec;
|
|
251
257
|
/**
|
|
252
258
|
* URL where Fishjam notifications will be sent
|
|
253
259
|
* @type {string}
|
|
254
260
|
* @memberof RoomConfig
|
|
255
261
|
*/
|
|
256
|
-
webhookUrl?: string | null;
|
|
262
|
+
'webhookUrl'?: string | null;
|
|
257
263
|
}
|
|
258
264
|
/**
|
|
259
265
|
* The use-case of the room. If not provided, this defaults to conference.
|
|
@@ -268,7 +274,7 @@ declare const RoomType: {
|
|
|
268
274
|
readonly Conference: "conference";
|
|
269
275
|
readonly AudioOnlyLivestream: "audio_only_livestream";
|
|
270
276
|
};
|
|
271
|
-
type RoomType =
|
|
277
|
+
type RoomType = typeof RoomType[keyof typeof RoomType];
|
|
272
278
|
/**
|
|
273
279
|
* Streamer authorization token
|
|
274
280
|
* @export
|
|
@@ -280,7 +286,7 @@ interface StreamerToken {
|
|
|
280
286
|
* @type {string}
|
|
281
287
|
* @memberof StreamerToken
|
|
282
288
|
*/
|
|
283
|
-
token: string;
|
|
289
|
+
'token': string;
|
|
284
290
|
}
|
|
285
291
|
/**
|
|
286
292
|
* Configuration of peer\'s subscribing policy
|
|
@@ -291,7 +297,7 @@ declare const SubscribeMode: {
|
|
|
291
297
|
readonly Auto: "auto";
|
|
292
298
|
readonly Manual: "manual";
|
|
293
299
|
};
|
|
294
|
-
type SubscribeMode =
|
|
300
|
+
type SubscribeMode = typeof SubscribeMode[keyof typeof SubscribeMode];
|
|
295
301
|
/**
|
|
296
302
|
* Describes peer\'s subscriptions in manual mode
|
|
297
303
|
* @export
|
|
@@ -303,13 +309,13 @@ interface Subscriptions {
|
|
|
303
309
|
* @type {Array<string>}
|
|
304
310
|
* @memberof Subscriptions
|
|
305
311
|
*/
|
|
306
|
-
peers: Array<string>;
|
|
312
|
+
'peers': Array<string>;
|
|
307
313
|
/**
|
|
308
314
|
* List of track IDs this peer subscribes to
|
|
309
315
|
* @type {Array<string>}
|
|
310
316
|
* @memberof Subscriptions
|
|
311
317
|
*/
|
|
312
|
-
tracks: Array<string>;
|
|
318
|
+
'tracks': Array<string>;
|
|
313
319
|
}
|
|
314
320
|
/**
|
|
315
321
|
* Media track of a Peer
|
|
@@ -322,19 +328,19 @@ interface Track$2 {
|
|
|
322
328
|
* @type {string}
|
|
323
329
|
* @memberof Track
|
|
324
330
|
*/
|
|
325
|
-
id?: string;
|
|
331
|
+
'id'?: string;
|
|
326
332
|
/**
|
|
327
333
|
* Metadata attached to the track by the peer
|
|
328
334
|
* @type {object}
|
|
329
335
|
* @memberof Track
|
|
330
336
|
*/
|
|
331
|
-
metadata?: object | null;
|
|
337
|
+
'metadata'?: object | null;
|
|
332
338
|
/**
|
|
333
339
|
*
|
|
334
340
|
* @type {TrackType}
|
|
335
341
|
* @memberof Track
|
|
336
342
|
*/
|
|
337
|
-
type?: TrackType$2;
|
|
343
|
+
'type'?: TrackType$2;
|
|
338
344
|
}
|
|
339
345
|
/**
|
|
340
346
|
* Media type carried by the track
|
|
@@ -345,7 +351,7 @@ declare const TrackType$2: {
|
|
|
345
351
|
readonly Audio: "audio";
|
|
346
352
|
readonly Video: "video";
|
|
347
353
|
};
|
|
348
|
-
type TrackType$2 =
|
|
354
|
+
type TrackType$2 = typeof TrackType$2[keyof typeof TrackType$2];
|
|
349
355
|
/**
|
|
350
356
|
* Enforces video codec for each peer in the room
|
|
351
357
|
* @export
|
|
@@ -355,7 +361,7 @@ declare const VideoCodec: {
|
|
|
355
361
|
readonly H264: "h264";
|
|
356
362
|
readonly Vp8: "vp8";
|
|
357
363
|
};
|
|
358
|
-
type VideoCodec =
|
|
364
|
+
type VideoCodec = typeof VideoCodec[keyof typeof VideoCodec];
|
|
359
365
|
/**
|
|
360
366
|
* Viewer authorization token
|
|
361
367
|
* @export
|
|
@@ -367,7 +373,7 @@ interface ViewerToken {
|
|
|
367
373
|
* @type {string}
|
|
368
374
|
* @memberof ViewerToken
|
|
369
375
|
*/
|
|
370
|
-
token: string;
|
|
376
|
+
'token': string;
|
|
371
377
|
}
|
|
372
378
|
|
|
373
379
|
/** Defines types of tracks being published by peers and component */
|
|
@@ -1173,10 +1179,10 @@ declare class FishjamClient {
|
|
|
1173
1179
|
*/
|
|
1174
1180
|
createLivestreamStreamerToken(roomId: RoomId): Promise<StreamerToken>;
|
|
1175
1181
|
/**
|
|
1176
|
-
* Creates
|
|
1177
|
-
* @returns a
|
|
1182
|
+
* Creates MoQ access.
|
|
1183
|
+
* @returns connection details containing the relay URL with the JWT embedded as a `?jwt=` query parameter, and the token itself
|
|
1178
1184
|
*/
|
|
1179
|
-
|
|
1185
|
+
createMoqAccess(config?: MoqAccessConfig): Promise<MoqAccess>;
|
|
1180
1186
|
}
|
|
1181
1187
|
|
|
1182
1188
|
declare class MissingFishjamIdException extends Error {
|
|
@@ -1209,4 +1215,4 @@ declare class QuotaExceededException extends FishjamBaseException {
|
|
|
1209
1215
|
declare class UnknownException extends FishjamBaseException {
|
|
1210
1216
|
}
|
|
1211
1217
|
|
|
1212
|
-
export { type AgentCallbacks, type AgentEvents, type AgentTrack, type AudioCodecParameters, BadRequestException, type Brand, type ChannelAdded, type ChannelRemoved, type CloseEventHandler, type ErrorEventHandler, type ExpectedAgentEvents, type ExpectedEvents, FishjamAgent, FishjamBaseException, FishjamClient, type FishjamConfig, FishjamNotFoundException, FishjamWSNotifier, ForbiddenException, type IgnoredEvents, type IncomingTrackData, type IncomingTrackImage, InvalidFishjamCredentialsException, MissingFishjamIdException, type
|
|
1218
|
+
export { type AgentCallbacks, type AgentEvents, type AgentTrack, type AudioCodecParameters, BadRequestException, type Brand, type ChannelAdded, type ChannelRemoved, type CloseEventHandler, type ErrorEventHandler, type ExpectedAgentEvents, type ExpectedEvents, FishjamAgent, FishjamBaseException, FishjamClient, type FishjamConfig, FishjamNotFoundException, FishjamWSNotifier, ForbiddenException, type IgnoredEvents, type IncomingTrackData, type IncomingTrackImage, InvalidFishjamCredentialsException, MissingFishjamIdException, type MoqAccess, type MoqAccessConfig, type NotificationEvents, type OutgoingTrackData, type Override, type Peer, type PeerAdded, type PeerConnected, type PeerCrashed, type PeerDeleted, type PeerDisconnected, type PeerId, type PeerMetadataUpdated, PeerNotFoundException, type PeerOptions, type PeerOptionsAgent, type PeerOptionsVapi, type PeerOptionsWebRTC, PeerStatus, type PeerType, QuotaExceededException, type Room, type RoomConfig, type RoomCrashed, type RoomCreated, type RoomDeleted, type RoomId, RoomNotFoundException, RoomType, ServerMessage, type ServerNotification, ServiceUnavailableException, type StreamerConnected, type StreamerDisconnected, type StreamerToken, type Track, type TrackAdded, type TrackId, type TrackMetadataUpdated, type TrackRemoved, type TrackType, UnauthorizedException, UnknownException, VideoCodec, type ViewerConnected, type ViewerDisconnected, type ViewerToken, decodeServerNotifications };
|