@fishjam-cloud/js-server-sdk 0.27.0-rc.0 → 0.27.0-rc.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.
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@fishjam-cloud/js-server-sdk",
4
- version: "0.27.0-rc.0",
4
+ version: "0.27.0-rc.1",
5
5
  description: "Fishjam server SDK for JavaScript",
6
6
  homepage: "https://github.com/fishjam-cloud/js-server-sdk",
7
7
  author: "Fishjam Team",
package/dist/index.d.mts CHANGED
@@ -52,6 +52,25 @@ interface MoqToken {
52
52
  */
53
53
  'token': string;
54
54
  }
55
+ /**
56
+ * MoQ token configuration
57
+ * @export
58
+ * @interface MoqTokenConfig
59
+ */
60
+ interface MoqTokenConfig {
61
+ /**
62
+ * Path under the root the token grants publish access to
63
+ * @type {string}
64
+ * @memberof MoqTokenConfig
65
+ */
66
+ 'publishPath'?: string | null;
67
+ /**
68
+ * Path under the root the token grants subscribe access to
69
+ * @type {string}
70
+ * @memberof MoqTokenConfig
71
+ */
72
+ 'subscribePath'?: string | null;
73
+ }
55
74
  /**
56
75
  * Describes peer status
57
76
  * @export
@@ -762,11 +781,6 @@ type RoomId = Brand<string, 'RoomId'>;
762
781
  * ID of Peer. Peer is associated with Room and can be created with {@link FishjamClient.createPeer}.
763
782
  */
764
783
  type PeerId = Brand<string, 'PeerId'>;
765
- /**
766
- * ID of a MoQ stream. Tokens for a stream can be created with
767
- * {@link FishjamClient.createMoqPublisherToken} and {@link FishjamClient.createMoqSubscriberToken}.
768
- */
769
- type StreamId = Brand<string, 'StreamId'>;
770
784
  type Peer = Omit<Peer$1, 'id'> & {
771
785
  id: PeerId;
772
786
  };
@@ -1013,15 +1027,10 @@ declare class FishjamClient {
1013
1027
  */
1014
1028
  createLivestreamStreamerToken(roomId: RoomId): Promise<StreamerToken>;
1015
1029
  /**
1016
- * Creates a MoQ publisher token for the given stream.
1017
- * @returns a MoQ publisher token
1018
- */
1019
- createMoqPublisherToken(streamId: StreamId): Promise<MoqToken>;
1020
- /**
1021
- * Creates a MoQ subscriber token for the given stream.
1022
- * @returns a MoQ subscriber token
1030
+ * Creates a MoQ token.
1031
+ * @returns a MoQ token
1023
1032
  */
1024
- createMoqSubscriberToken(streamId: StreamId): Promise<MoqToken>;
1033
+ createMoqToken(config?: MoqTokenConfig): Promise<MoqToken>;
1025
1034
  }
1026
1035
 
1027
1036
  declare class MissingFishjamIdException extends Error {
@@ -1050,4 +1059,4 @@ declare class ServiceUnavailableException extends FishjamBaseException {
1050
1059
  declare class UnknownException extends FishjamBaseException {
1051
1060
  }
1052
1061
 
1053
- export { type AgentCallbacks, type AgentEvents, type AgentTrack, type AudioCodecParameters, BadRequestException, type Brand, type CloseEventHandler, type ErrorEventHandler, type ExpectedAgentEvents, type ExpectedEvents, FishjamAgent, FishjamBaseException, FishjamClient, type FishjamConfig, FishjamNotFoundException, FishjamWSNotifier, ForbiddenException, type IncomingTrackData, type IncomingTrackImage, MissingFishjamIdException, type MoqToken, type NotificationEvents, type OutgoingTrackData, 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 Room, type RoomConfig, type RoomCrashed, type RoomCreated, type RoomDeleted, type RoomId, RoomNotFoundException, RoomType, ServerMessage, ServiceUnavailableException, type StreamConnected, type StreamDisconnected, type StreamId, type StreamerToken, type TrackAdded, type TrackId, type TrackMetadataUpdated, type TrackRemoved, type TrackType, UnauthorizedException, UnknownException, VideoCodec, type ViewerConnected, type ViewerDisconnected, type ViewerToken };
1062
+ export { type AgentCallbacks, type AgentEvents, type AgentTrack, type AudioCodecParameters, BadRequestException, type Brand, type CloseEventHandler, type ErrorEventHandler, type ExpectedAgentEvents, type ExpectedEvents, FishjamAgent, FishjamBaseException, FishjamClient, type FishjamConfig, FishjamNotFoundException, FishjamWSNotifier, ForbiddenException, type IncomingTrackData, type IncomingTrackImage, MissingFishjamIdException, type MoqToken, type MoqTokenConfig, type NotificationEvents, type OutgoingTrackData, 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 Room, type RoomConfig, type RoomCrashed, type RoomCreated, type RoomDeleted, type RoomId, RoomNotFoundException, RoomType, ServerMessage, ServiceUnavailableException, type StreamConnected, type StreamDisconnected, type StreamerToken, type TrackAdded, type TrackId, type TrackMetadataUpdated, type TrackRemoved, type TrackType, UnauthorizedException, UnknownException, VideoCodec, type ViewerConnected, type ViewerDisconnected, type ViewerToken };
package/dist/index.d.ts CHANGED
@@ -52,6 +52,25 @@ interface MoqToken {
52
52
  */
53
53
  'token': string;
54
54
  }
55
+ /**
56
+ * MoQ token configuration
57
+ * @export
58
+ * @interface MoqTokenConfig
59
+ */
60
+ interface MoqTokenConfig {
61
+ /**
62
+ * Path under the root the token grants publish access to
63
+ * @type {string}
64
+ * @memberof MoqTokenConfig
65
+ */
66
+ 'publishPath'?: string | null;
67
+ /**
68
+ * Path under the root the token grants subscribe access to
69
+ * @type {string}
70
+ * @memberof MoqTokenConfig
71
+ */
72
+ 'subscribePath'?: string | null;
73
+ }
55
74
  /**
56
75
  * Describes peer status
57
76
  * @export
@@ -762,11 +781,6 @@ type RoomId = Brand<string, 'RoomId'>;
762
781
  * ID of Peer. Peer is associated with Room and can be created with {@link FishjamClient.createPeer}.
763
782
  */
764
783
  type PeerId = Brand<string, 'PeerId'>;
765
- /**
766
- * ID of a MoQ stream. Tokens for a stream can be created with
767
- * {@link FishjamClient.createMoqPublisherToken} and {@link FishjamClient.createMoqSubscriberToken}.
768
- */
769
- type StreamId = Brand<string, 'StreamId'>;
770
784
  type Peer = Omit<Peer$1, 'id'> & {
771
785
  id: PeerId;
772
786
  };
@@ -1013,15 +1027,10 @@ declare class FishjamClient {
1013
1027
  */
1014
1028
  createLivestreamStreamerToken(roomId: RoomId): Promise<StreamerToken>;
1015
1029
  /**
1016
- * Creates a MoQ publisher token for the given stream.
1017
- * @returns a MoQ publisher token
1018
- */
1019
- createMoqPublisherToken(streamId: StreamId): Promise<MoqToken>;
1020
- /**
1021
- * Creates a MoQ subscriber token for the given stream.
1022
- * @returns a MoQ subscriber token
1030
+ * Creates a MoQ token.
1031
+ * @returns a MoQ token
1023
1032
  */
1024
- createMoqSubscriberToken(streamId: StreamId): Promise<MoqToken>;
1033
+ createMoqToken(config?: MoqTokenConfig): Promise<MoqToken>;
1025
1034
  }
1026
1035
 
1027
1036
  declare class MissingFishjamIdException extends Error {
@@ -1050,4 +1059,4 @@ declare class ServiceUnavailableException extends FishjamBaseException {
1050
1059
  declare class UnknownException extends FishjamBaseException {
1051
1060
  }
1052
1061
 
1053
- export { type AgentCallbacks, type AgentEvents, type AgentTrack, type AudioCodecParameters, BadRequestException, type Brand, type CloseEventHandler, type ErrorEventHandler, type ExpectedAgentEvents, type ExpectedEvents, FishjamAgent, FishjamBaseException, FishjamClient, type FishjamConfig, FishjamNotFoundException, FishjamWSNotifier, ForbiddenException, type IncomingTrackData, type IncomingTrackImage, MissingFishjamIdException, type MoqToken, type NotificationEvents, type OutgoingTrackData, 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 Room, type RoomConfig, type RoomCrashed, type RoomCreated, type RoomDeleted, type RoomId, RoomNotFoundException, RoomType, ServerMessage, ServiceUnavailableException, type StreamConnected, type StreamDisconnected, type StreamId, type StreamerToken, type TrackAdded, type TrackId, type TrackMetadataUpdated, type TrackRemoved, type TrackType, UnauthorizedException, UnknownException, VideoCodec, type ViewerConnected, type ViewerDisconnected, type ViewerToken };
1062
+ export { type AgentCallbacks, type AgentEvents, type AgentTrack, type AudioCodecParameters, BadRequestException, type Brand, type CloseEventHandler, type ErrorEventHandler, type ExpectedAgentEvents, type ExpectedEvents, FishjamAgent, FishjamBaseException, FishjamClient, type FishjamConfig, FishjamNotFoundException, FishjamWSNotifier, ForbiddenException, type IncomingTrackData, type IncomingTrackImage, MissingFishjamIdException, type MoqToken, type MoqTokenConfig, type NotificationEvents, type OutgoingTrackData, 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 Room, type RoomConfig, type RoomCrashed, type RoomCreated, type RoomDeleted, type RoomId, RoomNotFoundException, RoomType, ServerMessage, ServiceUnavailableException, type StreamConnected, type StreamDisconnected, type StreamerToken, type TrackAdded, type TrackId, type TrackMetadataUpdated, type TrackRemoved, type TrackType, UnauthorizedException, UnknownException, VideoCodec, type ViewerConnected, type ViewerDisconnected, type ViewerToken };
package/dist/index.js CHANGED
@@ -142,41 +142,13 @@ var MoqApiAxiosParamCreator = function(configuration) {
142
142
  return {
143
143
  /**
144
144
  *
145
- * @summary Creates a MoQ publisher token for the given stream
146
- * @param {string} streamId Stream id
147
- * @param {*} [options] Override http request option.
148
- * @throws {RequiredError}
149
- */
150
- createMoqPublisherToken: async (streamId, options = {}) => {
151
- assertParamExists("createMoqPublisherToken", "streamId", streamId);
152
- const localVarPath = `/moq/{stream_id}/publisher`.replace(`{${"stream_id"}}`, encodeURIComponent(String(streamId)));
153
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
154
- let baseOptions;
155
- if (configuration) {
156
- baseOptions = configuration.baseOptions;
157
- }
158
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
159
- const localVarHeaderParameter = {};
160
- const localVarQueryParameter = {};
161
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
162
- setSearchParams(localVarUrlObj, localVarQueryParameter);
163
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
164
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
165
- return {
166
- url: toPathString(localVarUrlObj),
167
- options: localVarRequestOptions
168
- };
169
- },
170
- /**
171
- *
172
- * @summary Creates a MoQ subscriber token for the given stream
173
- * @param {string} streamId Stream id
145
+ * @summary Creates a MoQ token for the given stream
146
+ * @param {MoqTokenConfig} [moqTokenConfig] Token configuration
174
147
  * @param {*} [options] Override http request option.
175
148
  * @throws {RequiredError}
176
149
  */
177
- createMoqSubscriberToken: async (streamId, options = {}) => {
178
- assertParamExists("createMoqSubscriberToken", "streamId", streamId);
179
- const localVarPath = `/moq/{stream_id}/subscriber`.replace(`{${"stream_id"}}`, encodeURIComponent(String(streamId)));
150
+ createMoqToken: async (moqTokenConfig, options = {}) => {
151
+ const localVarPath = `/moq/token`;
180
152
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
181
153
  let baseOptions;
182
154
  if (configuration) {
@@ -186,9 +158,11 @@ var MoqApiAxiosParamCreator = function(configuration) {
186
158
  const localVarHeaderParameter = {};
187
159
  const localVarQueryParameter = {};
188
160
  await setBearerAuthToObject(localVarHeaderParameter, configuration);
161
+ localVarHeaderParameter["Content-Type"] = "application/json";
189
162
  setSearchParams(localVarUrlObj, localVarQueryParameter);
190
163
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
191
164
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
165
+ localVarRequestOptions.data = serializeDataIfNeeded(moqTokenConfig, localVarRequestOptions, configuration);
192
166
  return {
193
167
  url: toPathString(localVarUrlObj),
194
168
  options: localVarRequestOptions
@@ -201,28 +175,15 @@ var MoqApiFp = function(configuration) {
201
175
  return {
202
176
  /**
203
177
  *
204
- * @summary Creates a MoQ publisher token for the given stream
205
- * @param {string} streamId Stream id
206
- * @param {*} [options] Override http request option.
207
- * @throws {RequiredError}
208
- */
209
- async createMoqPublisherToken(streamId, options) {
210
- const localVarAxiosArgs = await localVarAxiosParamCreator.createMoqPublisherToken(streamId, options);
211
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
212
- const localVarOperationServerBasePath = operationServerMap["MoqApi.createMoqPublisherToken"]?.[localVarOperationServerIndex]?.url;
213
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, import_axios.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
214
- },
215
- /**
216
- *
217
- * @summary Creates a MoQ subscriber token for the given stream
218
- * @param {string} streamId Stream id
178
+ * @summary Creates a MoQ token for the given stream
179
+ * @param {MoqTokenConfig} [moqTokenConfig] Token configuration
219
180
  * @param {*} [options] Override http request option.
220
181
  * @throws {RequiredError}
221
182
  */
222
- async createMoqSubscriberToken(streamId, options) {
223
- const localVarAxiosArgs = await localVarAxiosParamCreator.createMoqSubscriberToken(streamId, options);
183
+ async createMoqToken(moqTokenConfig, options) {
184
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createMoqToken(moqTokenConfig, options);
224
185
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
225
- const localVarOperationServerBasePath = operationServerMap["MoqApi.createMoqSubscriberToken"]?.[localVarOperationServerIndex]?.url;
186
+ const localVarOperationServerBasePath = operationServerMap["MoqApi.createMoqToken"]?.[localVarOperationServerIndex]?.url;
226
187
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, import_axios.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
227
188
  }
228
189
  };
@@ -230,25 +191,14 @@ var MoqApiFp = function(configuration) {
230
191
  var MoqApi = class extends BaseAPI {
231
192
  /**
232
193
  *
233
- * @summary Creates a MoQ publisher token for the given stream
234
- * @param {string} streamId Stream id
235
- * @param {*} [options] Override http request option.
236
- * @throws {RequiredError}
237
- * @memberof MoqApi
238
- */
239
- createMoqPublisherToken(streamId, options) {
240
- return MoqApiFp(this.configuration).createMoqPublisherToken(streamId, options).then((request) => request(this.axios, this.basePath));
241
- }
242
- /**
243
- *
244
- * @summary Creates a MoQ subscriber token for the given stream
245
- * @param {string} streamId Stream id
194
+ * @summary Creates a MoQ token for the given stream
195
+ * @param {MoqTokenConfig} [moqTokenConfig] Token configuration
246
196
  * @param {*} [options] Override http request option.
247
197
  * @throws {RequiredError}
248
198
  * @memberof MoqApi
249
199
  */
250
- createMoqSubscriberToken(streamId, options) {
251
- return MoqApiFp(this.configuration).createMoqSubscriberToken(streamId, options).then((request) => request(this.axios, this.basePath));
200
+ createMoqToken(moqTokenConfig, options) {
201
+ return MoqApiFp(this.configuration).createMoqToken(moqTokenConfig, options).then((request) => request(this.axios, this.basePath));
252
202
  }
253
203
  };
254
204
  var RoomApiAxiosParamCreator = function(configuration) {
@@ -6050,7 +6000,7 @@ var mapException = (error, entity) => {
6050
6000
  // package.json
6051
6001
  var package_default = {
6052
6002
  name: "@fishjam-cloud/js-server-sdk",
6053
- version: "0.27.0-rc.0",
6003
+ version: "0.27.0-rc.1",
6054
6004
  description: "Fishjam server SDK for JavaScript",
6055
6005
  homepage: "https://github.com/fishjam-cloud/js-server-sdk",
6056
6006
  author: "Fishjam Team",
@@ -6364,24 +6314,12 @@ var FishjamClient = class {
6364
6314
  }
6365
6315
  }
6366
6316
  /**
6367
- * Creates a MoQ publisher token for the given stream.
6368
- * @returns a MoQ publisher token
6369
- */
6370
- async createMoqPublisherToken(streamId) {
6371
- try {
6372
- const tokenResponse = await this.moqApi.createMoqPublisherToken(streamId);
6373
- return tokenResponse.data;
6374
- } catch (error) {
6375
- throw mapException(error);
6376
- }
6377
- }
6378
- /**
6379
- * Creates a MoQ subscriber token for the given stream.
6380
- * @returns a MoQ subscriber token
6317
+ * Creates a MoQ token.
6318
+ * @returns a MoQ token
6381
6319
  */
6382
- async createMoqSubscriberToken(streamId) {
6320
+ async createMoqToken(config) {
6383
6321
  try {
6384
- const tokenResponse = await this.moqApi.createMoqSubscriberToken(streamId);
6322
+ const tokenResponse = await this.moqApi.createMoqToken(config);
6385
6323
  return tokenResponse.data;
6386
6324
  } catch (error) {
6387
6325
  throw mapException(error);
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-Q5OZUPAC.mjs";
3
+ } from "./chunk-B3H63SYI.mjs";
4
4
 
5
5
  // ../fishjam-openapi/dist/index.js
6
6
  import globalAxios2 from "axios";
@@ -94,41 +94,13 @@ var MoqApiAxiosParamCreator = function(configuration) {
94
94
  return {
95
95
  /**
96
96
  *
97
- * @summary Creates a MoQ publisher token for the given stream
98
- * @param {string} streamId Stream id
99
- * @param {*} [options] Override http request option.
100
- * @throws {RequiredError}
101
- */
102
- createMoqPublisherToken: async (streamId, options = {}) => {
103
- assertParamExists("createMoqPublisherToken", "streamId", streamId);
104
- const localVarPath = `/moq/{stream_id}/publisher`.replace(`{${"stream_id"}}`, encodeURIComponent(String(streamId)));
105
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
- let baseOptions;
107
- if (configuration) {
108
- baseOptions = configuration.baseOptions;
109
- }
110
- const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
111
- const localVarHeaderParameter = {};
112
- const localVarQueryParameter = {};
113
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
114
- setSearchParams(localVarUrlObj, localVarQueryParameter);
115
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
117
- return {
118
- url: toPathString(localVarUrlObj),
119
- options: localVarRequestOptions
120
- };
121
- },
122
- /**
123
- *
124
- * @summary Creates a MoQ subscriber token for the given stream
125
- * @param {string} streamId Stream id
97
+ * @summary Creates a MoQ token for the given stream
98
+ * @param {MoqTokenConfig} [moqTokenConfig] Token configuration
126
99
  * @param {*} [options] Override http request option.
127
100
  * @throws {RequiredError}
128
101
  */
129
- createMoqSubscriberToken: async (streamId, options = {}) => {
130
- assertParamExists("createMoqSubscriberToken", "streamId", streamId);
131
- const localVarPath = `/moq/{stream_id}/subscriber`.replace(`{${"stream_id"}}`, encodeURIComponent(String(streamId)));
102
+ createMoqToken: async (moqTokenConfig, options = {}) => {
103
+ const localVarPath = `/moq/token`;
132
104
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
133
105
  let baseOptions;
134
106
  if (configuration) {
@@ -138,9 +110,11 @@ var MoqApiAxiosParamCreator = function(configuration) {
138
110
  const localVarHeaderParameter = {};
139
111
  const localVarQueryParameter = {};
140
112
  await setBearerAuthToObject(localVarHeaderParameter, configuration);
113
+ localVarHeaderParameter["Content-Type"] = "application/json";
141
114
  setSearchParams(localVarUrlObj, localVarQueryParameter);
142
115
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
143
116
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
117
+ localVarRequestOptions.data = serializeDataIfNeeded(moqTokenConfig, localVarRequestOptions, configuration);
144
118
  return {
145
119
  url: toPathString(localVarUrlObj),
146
120
  options: localVarRequestOptions
@@ -153,28 +127,15 @@ var MoqApiFp = function(configuration) {
153
127
  return {
154
128
  /**
155
129
  *
156
- * @summary Creates a MoQ publisher token for the given stream
157
- * @param {string} streamId Stream id
158
- * @param {*} [options] Override http request option.
159
- * @throws {RequiredError}
160
- */
161
- async createMoqPublisherToken(streamId, options) {
162
- const localVarAxiosArgs = await localVarAxiosParamCreator.createMoqPublisherToken(streamId, options);
163
- const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
164
- const localVarOperationServerBasePath = operationServerMap["MoqApi.createMoqPublisherToken"]?.[localVarOperationServerIndex]?.url;
165
- return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
166
- },
167
- /**
168
- *
169
- * @summary Creates a MoQ subscriber token for the given stream
170
- * @param {string} streamId Stream id
130
+ * @summary Creates a MoQ token for the given stream
131
+ * @param {MoqTokenConfig} [moqTokenConfig] Token configuration
171
132
  * @param {*} [options] Override http request option.
172
133
  * @throws {RequiredError}
173
134
  */
174
- async createMoqSubscriberToken(streamId, options) {
175
- const localVarAxiosArgs = await localVarAxiosParamCreator.createMoqSubscriberToken(streamId, options);
135
+ async createMoqToken(moqTokenConfig, options) {
136
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createMoqToken(moqTokenConfig, options);
176
137
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
177
- const localVarOperationServerBasePath = operationServerMap["MoqApi.createMoqSubscriberToken"]?.[localVarOperationServerIndex]?.url;
138
+ const localVarOperationServerBasePath = operationServerMap["MoqApi.createMoqToken"]?.[localVarOperationServerIndex]?.url;
178
139
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
179
140
  }
180
141
  };
@@ -182,25 +143,14 @@ var MoqApiFp = function(configuration) {
182
143
  var MoqApi = class extends BaseAPI {
183
144
  /**
184
145
  *
185
- * @summary Creates a MoQ publisher token for the given stream
186
- * @param {string} streamId Stream id
187
- * @param {*} [options] Override http request option.
188
- * @throws {RequiredError}
189
- * @memberof MoqApi
190
- */
191
- createMoqPublisherToken(streamId, options) {
192
- return MoqApiFp(this.configuration).createMoqPublisherToken(streamId, options).then((request) => request(this.axios, this.basePath));
193
- }
194
- /**
195
- *
196
- * @summary Creates a MoQ subscriber token for the given stream
197
- * @param {string} streamId Stream id
146
+ * @summary Creates a MoQ token for the given stream
147
+ * @param {MoqTokenConfig} [moqTokenConfig] Token configuration
198
148
  * @param {*} [options] Override http request option.
199
149
  * @throws {RequiredError}
200
150
  * @memberof MoqApi
201
151
  */
202
- createMoqSubscriberToken(streamId, options) {
203
- return MoqApiFp(this.configuration).createMoqSubscriberToken(streamId, options).then((request) => request(this.axios, this.basePath));
152
+ createMoqToken(moqTokenConfig, options) {
153
+ return MoqApiFp(this.configuration).createMoqToken(moqTokenConfig, options).then((request) => request(this.axios, this.basePath));
204
154
  }
205
155
  };
206
156
  var RoomApiAxiosParamCreator = function(configuration) {
@@ -6221,24 +6171,12 @@ var FishjamClient = class {
6221
6171
  }
6222
6172
  }
6223
6173
  /**
6224
- * Creates a MoQ publisher token for the given stream.
6225
- * @returns a MoQ publisher token
6226
- */
6227
- async createMoqPublisherToken(streamId) {
6228
- try {
6229
- const tokenResponse = await this.moqApi.createMoqPublisherToken(streamId);
6230
- return tokenResponse.data;
6231
- } catch (error) {
6232
- throw mapException(error);
6233
- }
6234
- }
6235
- /**
6236
- * Creates a MoQ subscriber token for the given stream.
6237
- * @returns a MoQ subscriber token
6174
+ * Creates a MoQ token.
6175
+ * @returns a MoQ token
6238
6176
  */
6239
- async createMoqSubscriberToken(streamId) {
6177
+ async createMoqToken(config) {
6240
6178
  try {
6241
- const tokenResponse = await this.moqApi.createMoqSubscriberToken(streamId);
6179
+ const tokenResponse = await this.moqApi.createMoqToken(config);
6242
6180
  return tokenResponse.data;
6243
6181
  } catch (error) {
6244
6182
  throw mapException(error);
@@ -31,7 +31,7 @@ var import_genai = require("@google/genai");
31
31
  // package.json
32
32
  var package_default = {
33
33
  name: "@fishjam-cloud/js-server-sdk",
34
- version: "0.27.0-rc.0",
34
+ version: "0.27.0-rc.1",
35
35
  description: "Fishjam server SDK for JavaScript",
36
36
  homepage: "https://github.com/fishjam-cloud/js-server-sdk",
37
37
  author: "Fishjam Team",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunk-Q5OZUPAC.mjs";
3
+ } from "../chunk-B3H63SYI.mjs";
4
4
 
5
5
  // src/integrations/gemini.ts
6
6
  import { GoogleGenAI } from "@google/genai";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fishjam-cloud/js-server-sdk",
3
- "version": "0.27.0-rc.0",
3
+ "version": "0.27.0-rc.1",
4
4
  "description": "Fishjam server SDK for JavaScript",
5
5
  "homepage": "https://github.com/fishjam-cloud/js-server-sdk",
6
6
  "author": "Fishjam Team",
@@ -74,8 +74,8 @@
74
74
  }
75
75
  },
76
76
  "devDependencies": {
77
- "@fishjam-cloud/fishjam-openapi": "0.27.0-rc.0",
78
- "@fishjam-cloud/fishjam-proto": "0.27.0-rc.0",
77
+ "@fishjam-cloud/fishjam-openapi": "0.27.0-rc.1",
78
+ "@fishjam-cloud/fishjam-proto": "0.27.0-rc.1",
79
79
  "@openapitools/openapi-generator-cli": "^2.18.4",
80
80
  "@types/node": "^22.13.16",
81
81
  "@types/websocket": "^1.0.10",