@sparkstudio/realtime-ui 1.0.24 → 1.0.27

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/index.cjs CHANGED
@@ -24,17 +24,18 @@ __export(index_exports, {
24
24
  GuidUtil: () => GuidUtil,
25
25
  Home: () => Home,
26
26
  HomeView: () => HomeView,
27
+ OkResultDTO: () => OkResultDTO,
27
28
  RealtimeEngine: () => RealtimeEngine,
28
29
  RoomInstance: () => RoomInstance,
29
30
  RoomInstanceDTO: () => RoomInstanceDTO,
30
31
  RoomInstanceViewDTO: () => RoomInstanceViewDTO,
32
+ ServiceMessageDTO: () => ServiceMessageDTO,
31
33
  SparkStudioRealtimeSDK: () => SparkStudioRealtimeSDK,
32
34
  StringResultDTO: () => StringResultDTO,
33
35
  UniqueViewDTO: () => UniqueViewDTO,
34
36
  UserSetting: () => UserSetting,
35
37
  UserSettingDTO: () => UserSettingDTO,
36
38
  UserStatusType: () => UserStatusType,
37
- WebSocketClientRequestDTO: () => WebSocketClientRequestDTO,
38
39
  WebSocketConnection: () => WebSocketConnection,
39
40
  WebSocketConnectionDTO: () => WebSocketConnectionDTO,
40
41
  useRealtime: () => useRealtime
@@ -311,7 +312,7 @@ var WebSocketConnection = class {
311
312
  if (!response.ok) throw new Error(await response.text());
312
313
  return await response.json();
313
314
  }
314
- async SendMessage(webSocketClientRequestDTO) {
315
+ async SendMessage(serviceMessageDTO) {
315
316
  const url = `${this.baseUrl}/api/WebSocketConnection/SendMessage`;
316
317
  const token = localStorage.getItem("auth_token");
317
318
  const requestOptions = {
@@ -320,7 +321,7 @@ var WebSocketConnection = class {
320
321
  "Content-Type": "application/json",
321
322
  ...token && { Authorization: `Bearer ${token}` }
322
323
  },
323
- body: JSON.stringify(webSocketClientRequestDTO)
324
+ body: JSON.stringify(serviceMessageDTO)
324
325
  };
325
326
  const response = await fetch(url, requestOptions);
326
327
  if (!response.ok) throw new Error(await response.text());
@@ -372,6 +373,14 @@ var GuidResultDTO = class {
372
373
  }
373
374
  };
374
375
 
376
+ // src/api/DTOs/OkResultDTO.ts
377
+ var OkResultDTO = class {
378
+ Message;
379
+ constructor(init) {
380
+ this.Message = init.Message;
381
+ }
382
+ };
383
+
375
384
  // src/api/DTOs/RoomInstanceDTO.ts
376
385
  var RoomInstanceDTO = class {
377
386
  Id;
@@ -400,6 +409,16 @@ var RoomInstanceViewDTO = class {
400
409
  }
401
410
  };
402
411
 
412
+ // src/api/DTOs/ServiceMessageDTO.ts
413
+ var ServiceMessageDTO = class {
414
+ Message;
415
+ UserIds;
416
+ constructor(init) {
417
+ this.Message = init.Message;
418
+ this.UserIds = init.UserIds;
419
+ }
420
+ };
421
+
403
422
  // src/api/DTOs/StringResultDTO.ts
404
423
  var StringResultDTO = class {
405
424
  Result;
@@ -434,22 +453,6 @@ var UserSettingDTO = class {
434
453
  }
435
454
  };
436
455
 
437
- // src/api/DTOs/WebSocketClientRequestDTO.ts
438
- var WebSocketClientRequestDTO = class {
439
- AccessToken;
440
- Data;
441
- Type;
442
- ControllerName;
443
- MethodName;
444
- constructor(init) {
445
- this.AccessToken = init.AccessToken;
446
- this.Data = init.Data;
447
- this.Type = init.Type;
448
- this.ControllerName = init.ControllerName;
449
- this.MethodName = init.MethodName;
450
- }
451
- };
452
-
453
456
  // src/api/DTOs/WebSocketConnectionDTO.ts
454
457
  var WebSocketConnectionDTO = class {
455
458
  Id;
@@ -718,17 +721,18 @@ function HomeContent() {
718
721
  GuidUtil,
719
722
  Home,
720
723
  HomeView,
724
+ OkResultDTO,
721
725
  RealtimeEngine,
722
726
  RoomInstance,
723
727
  RoomInstanceDTO,
724
728
  RoomInstanceViewDTO,
729
+ ServiceMessageDTO,
725
730
  SparkStudioRealtimeSDK,
726
731
  StringResultDTO,
727
732
  UniqueViewDTO,
728
733
  UserSetting,
729
734
  UserSettingDTO,
730
735
  UserStatusType,
731
- WebSocketClientRequestDTO,
732
736
  WebSocketConnection,
733
737
  WebSocketConnectionDTO,
734
738
  useRealtime
package/dist/index.d.cts CHANGED
@@ -166,23 +166,29 @@ declare class GuidResultDTO implements IGuidResultDTO {
166
166
  }
167
167
 
168
168
  /**
169
- * Represents an Auto-generated model for WebSocketClientRequestDTO.
169
+ * Represents an Auto-generated model for ServiceMessageDTO.
170
170
  */
171
- interface IWebSocketClientRequestDTO {
172
- AccessToken?: string;
173
- Data?: string;
174
- Type?: string;
175
- ControllerName?: string;
176
- MethodName?: string;
171
+ interface IServiceMessageDTO {
172
+ Message?: string;
173
+ UserIds?: Guid[];
177
174
  }
178
- type WebSocketClientRequestDTOInit = Partial<IWebSocketClientRequestDTO>;
179
- declare class WebSocketClientRequestDTO implements IWebSocketClientRequestDTO {
180
- AccessToken?: string;
181
- Data?: string;
182
- Type?: string;
183
- ControllerName?: string;
184
- MethodName?: string;
185
- constructor(init: WebSocketClientRequestDTOInit);
175
+ type ServiceMessageDTOInit = Partial<IServiceMessageDTO>;
176
+ declare class ServiceMessageDTO implements IServiceMessageDTO {
177
+ Message?: string;
178
+ UserIds?: Guid[];
179
+ constructor(init: ServiceMessageDTOInit);
180
+ }
181
+
182
+ /**
183
+ * Represents an Auto-generated model for OkResultDTO.
184
+ */
185
+ interface IOkResultDTO {
186
+ Message?: string;
187
+ }
188
+ type OkResultDTOInit = Partial<IOkResultDTO>;
189
+ declare class OkResultDTO implements IOkResultDTO {
190
+ Message?: string;
191
+ constructor(init: OkResultDTOInit);
186
192
  }
187
193
 
188
194
  /**
@@ -196,7 +202,7 @@ declare class WebSocketConnection {
196
202
  ReadConnections(userId: Guid): Promise<WebSocketConnectionDTO[]>;
197
203
  ReadUserIdByConnectionId(connectionId: string): Promise<GuidResultDTO>;
198
204
  Clear(): Promise<StringResultDTO>;
199
- SendMessage(webSocketClientRequestDTO: WebSocketClientRequestDTO): Promise<WebSocketClientRequestDTO>;
205
+ SendMessage(serviceMessageDTO: ServiceMessageDTO): Promise<OkResultDTO>;
200
206
  }
201
207
 
202
208
  /**
@@ -245,4 +251,4 @@ declare function useRealtime(url: string): {
245
251
 
246
252
  declare function HomeView(): react_jsx_runtime.JSX.Element;
247
253
 
248
- export { type Guid, GuidResultDTO, GuidUtil, Home, HomeView, type IGuidResultDTO, type IRoomInstanceDTO, type IRoomInstanceViewDTO, type IStringResultDTO, type IUniqueViewDTO, type IUserSettingDTO, type IWebSocketClientRequestDTO, type IWebSocketConnectionDTO, RealtimeEngine, type RealtimeEventMap, type RealtimeStatus, RoomInstance, RoomInstanceDTO, RoomInstanceViewDTO, SparkStudioRealtimeSDK, StringResultDTO, UniqueViewDTO, UserSetting, UserSettingDTO, UserStatusType, WebSocketClientRequestDTO, WebSocketConnection, WebSocketConnectionDTO, useRealtime };
254
+ export { type Guid, GuidResultDTO, GuidUtil, Home, HomeView, type IGuidResultDTO, type IOkResultDTO, type IRoomInstanceDTO, type IRoomInstanceViewDTO, type IServiceMessageDTO, type IStringResultDTO, type IUniqueViewDTO, type IUserSettingDTO, type IWebSocketConnectionDTO, OkResultDTO, RealtimeEngine, type RealtimeEventMap, type RealtimeStatus, RoomInstance, RoomInstanceDTO, RoomInstanceViewDTO, ServiceMessageDTO, SparkStudioRealtimeSDK, StringResultDTO, UniqueViewDTO, UserSetting, UserSettingDTO, UserStatusType, WebSocketConnection, WebSocketConnectionDTO, useRealtime };
package/dist/index.d.ts CHANGED
@@ -166,23 +166,29 @@ declare class GuidResultDTO implements IGuidResultDTO {
166
166
  }
167
167
 
168
168
  /**
169
- * Represents an Auto-generated model for WebSocketClientRequestDTO.
169
+ * Represents an Auto-generated model for ServiceMessageDTO.
170
170
  */
171
- interface IWebSocketClientRequestDTO {
172
- AccessToken?: string;
173
- Data?: string;
174
- Type?: string;
175
- ControllerName?: string;
176
- MethodName?: string;
171
+ interface IServiceMessageDTO {
172
+ Message?: string;
173
+ UserIds?: Guid[];
177
174
  }
178
- type WebSocketClientRequestDTOInit = Partial<IWebSocketClientRequestDTO>;
179
- declare class WebSocketClientRequestDTO implements IWebSocketClientRequestDTO {
180
- AccessToken?: string;
181
- Data?: string;
182
- Type?: string;
183
- ControllerName?: string;
184
- MethodName?: string;
185
- constructor(init: WebSocketClientRequestDTOInit);
175
+ type ServiceMessageDTOInit = Partial<IServiceMessageDTO>;
176
+ declare class ServiceMessageDTO implements IServiceMessageDTO {
177
+ Message?: string;
178
+ UserIds?: Guid[];
179
+ constructor(init: ServiceMessageDTOInit);
180
+ }
181
+
182
+ /**
183
+ * Represents an Auto-generated model for OkResultDTO.
184
+ */
185
+ interface IOkResultDTO {
186
+ Message?: string;
187
+ }
188
+ type OkResultDTOInit = Partial<IOkResultDTO>;
189
+ declare class OkResultDTO implements IOkResultDTO {
190
+ Message?: string;
191
+ constructor(init: OkResultDTOInit);
186
192
  }
187
193
 
188
194
  /**
@@ -196,7 +202,7 @@ declare class WebSocketConnection {
196
202
  ReadConnections(userId: Guid): Promise<WebSocketConnectionDTO[]>;
197
203
  ReadUserIdByConnectionId(connectionId: string): Promise<GuidResultDTO>;
198
204
  Clear(): Promise<StringResultDTO>;
199
- SendMessage(webSocketClientRequestDTO: WebSocketClientRequestDTO): Promise<WebSocketClientRequestDTO>;
205
+ SendMessage(serviceMessageDTO: ServiceMessageDTO): Promise<OkResultDTO>;
200
206
  }
201
207
 
202
208
  /**
@@ -245,4 +251,4 @@ declare function useRealtime(url: string): {
245
251
 
246
252
  declare function HomeView(): react_jsx_runtime.JSX.Element;
247
253
 
248
- export { type Guid, GuidResultDTO, GuidUtil, Home, HomeView, type IGuidResultDTO, type IRoomInstanceDTO, type IRoomInstanceViewDTO, type IStringResultDTO, type IUniqueViewDTO, type IUserSettingDTO, type IWebSocketClientRequestDTO, type IWebSocketConnectionDTO, RealtimeEngine, type RealtimeEventMap, type RealtimeStatus, RoomInstance, RoomInstanceDTO, RoomInstanceViewDTO, SparkStudioRealtimeSDK, StringResultDTO, UniqueViewDTO, UserSetting, UserSettingDTO, UserStatusType, WebSocketClientRequestDTO, WebSocketConnection, WebSocketConnectionDTO, useRealtime };
254
+ export { type Guid, GuidResultDTO, GuidUtil, Home, HomeView, type IGuidResultDTO, type IOkResultDTO, type IRoomInstanceDTO, type IRoomInstanceViewDTO, type IServiceMessageDTO, type IStringResultDTO, type IUniqueViewDTO, type IUserSettingDTO, type IWebSocketConnectionDTO, OkResultDTO, RealtimeEngine, type RealtimeEventMap, type RealtimeStatus, RoomInstance, RoomInstanceDTO, RoomInstanceViewDTO, ServiceMessageDTO, SparkStudioRealtimeSDK, StringResultDTO, UniqueViewDTO, UserSetting, UserSettingDTO, UserStatusType, WebSocketConnection, WebSocketConnectionDTO, useRealtime };
package/dist/index.js CHANGED
@@ -268,7 +268,7 @@ var WebSocketConnection = class {
268
268
  if (!response.ok) throw new Error(await response.text());
269
269
  return await response.json();
270
270
  }
271
- async SendMessage(webSocketClientRequestDTO) {
271
+ async SendMessage(serviceMessageDTO) {
272
272
  const url = `${this.baseUrl}/api/WebSocketConnection/SendMessage`;
273
273
  const token = localStorage.getItem("auth_token");
274
274
  const requestOptions = {
@@ -277,7 +277,7 @@ var WebSocketConnection = class {
277
277
  "Content-Type": "application/json",
278
278
  ...token && { Authorization: `Bearer ${token}` }
279
279
  },
280
- body: JSON.stringify(webSocketClientRequestDTO)
280
+ body: JSON.stringify(serviceMessageDTO)
281
281
  };
282
282
  const response = await fetch(url, requestOptions);
283
283
  if (!response.ok) throw new Error(await response.text());
@@ -329,6 +329,14 @@ var GuidResultDTO = class {
329
329
  }
330
330
  };
331
331
 
332
+ // src/api/DTOs/OkResultDTO.ts
333
+ var OkResultDTO = class {
334
+ Message;
335
+ constructor(init) {
336
+ this.Message = init.Message;
337
+ }
338
+ };
339
+
332
340
  // src/api/DTOs/RoomInstanceDTO.ts
333
341
  var RoomInstanceDTO = class {
334
342
  Id;
@@ -357,6 +365,16 @@ var RoomInstanceViewDTO = class {
357
365
  }
358
366
  };
359
367
 
368
+ // src/api/DTOs/ServiceMessageDTO.ts
369
+ var ServiceMessageDTO = class {
370
+ Message;
371
+ UserIds;
372
+ constructor(init) {
373
+ this.Message = init.Message;
374
+ this.UserIds = init.UserIds;
375
+ }
376
+ };
377
+
360
378
  // src/api/DTOs/StringResultDTO.ts
361
379
  var StringResultDTO = class {
362
380
  Result;
@@ -391,22 +409,6 @@ var UserSettingDTO = class {
391
409
  }
392
410
  };
393
411
 
394
- // src/api/DTOs/WebSocketClientRequestDTO.ts
395
- var WebSocketClientRequestDTO = class {
396
- AccessToken;
397
- Data;
398
- Type;
399
- ControllerName;
400
- MethodName;
401
- constructor(init) {
402
- this.AccessToken = init.AccessToken;
403
- this.Data = init.Data;
404
- this.Type = init.Type;
405
- this.ControllerName = init.ControllerName;
406
- this.MethodName = init.MethodName;
407
- }
408
- };
409
-
410
412
  // src/api/DTOs/WebSocketConnectionDTO.ts
411
413
  var WebSocketConnectionDTO = class {
412
414
  Id;
@@ -679,17 +681,18 @@ export {
679
681
  GuidUtil,
680
682
  Home,
681
683
  HomeView,
684
+ OkResultDTO,
682
685
  RealtimeEngine,
683
686
  RoomInstance,
684
687
  RoomInstanceDTO,
685
688
  RoomInstanceViewDTO,
689
+ ServiceMessageDTO,
686
690
  SparkStudioRealtimeSDK,
687
691
  StringResultDTO,
688
692
  UniqueViewDTO,
689
693
  UserSetting,
690
694
  UserSettingDTO,
691
695
  UserStatusType,
692
- WebSocketClientRequestDTO,
693
696
  WebSocketConnection,
694
697
  WebSocketConnectionDTO,
695
698
  useRealtime
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkstudio/realtime-ui",
3
- "version": "1.0.24",
3
+ "version": "1.0.27",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",