@sparkstudio/realtime-ui 1.0.2 → 1.0.5
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 +511 -0
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.cts +215 -0
- package/dist/index.d.ts +215 -0
- package/dist/index.js +474 -0
- package/package.json +1 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
GuidResultDTO: () => GuidResultDTO,
|
|
24
|
+
GuidUtil: () => GuidUtil,
|
|
25
|
+
Home: () => Home,
|
|
26
|
+
HomeView: () => HomeView,
|
|
27
|
+
RoomInstance: () => RoomInstance,
|
|
28
|
+
RoomInstanceDTO: () => RoomInstanceDTO,
|
|
29
|
+
RoomInstanceViewDTO: () => RoomInstanceViewDTO,
|
|
30
|
+
SparkStudioRealtimeSDK: () => SparkStudioRealtimeSDK,
|
|
31
|
+
StringResultDTO: () => StringResultDTO,
|
|
32
|
+
UniqueViewDTO: () => UniqueViewDTO,
|
|
33
|
+
UserSetting: () => UserSetting,
|
|
34
|
+
UserSettingDTO: () => UserSettingDTO,
|
|
35
|
+
UserStatusType: () => UserStatusType,
|
|
36
|
+
WebSocketClientRequestDTO: () => WebSocketClientRequestDTO,
|
|
37
|
+
WebSocketConnection: () => WebSocketConnection,
|
|
38
|
+
WebSocketConnectionDTO: () => WebSocketConnectionDTO
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(index_exports);
|
|
41
|
+
|
|
42
|
+
// src/api/Controllers/Home.ts
|
|
43
|
+
var Home = class {
|
|
44
|
+
baseUrl;
|
|
45
|
+
constructor(baseUrl) {
|
|
46
|
+
this.baseUrl = baseUrl;
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// src/api/Controllers/RoomInstance.ts
|
|
51
|
+
var RoomInstance = class {
|
|
52
|
+
baseUrl;
|
|
53
|
+
constructor(baseUrl) {
|
|
54
|
+
this.baseUrl = baseUrl;
|
|
55
|
+
}
|
|
56
|
+
async ReadByUserId(userId) {
|
|
57
|
+
const url = `${this.baseUrl}/api/RoomInstance/ReadByUserId/` + userId;
|
|
58
|
+
const token = localStorage.getItem("auth_token");
|
|
59
|
+
const requestOptions = {
|
|
60
|
+
method: "GET",
|
|
61
|
+
headers: {
|
|
62
|
+
"Content-Type": "application/json",
|
|
63
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const response = await fetch(url, requestOptions);
|
|
67
|
+
if (!response.ok) throw new Error(await response.text());
|
|
68
|
+
return await response.json();
|
|
69
|
+
}
|
|
70
|
+
async ReadViewPageByUniqueId(uniqueId, pageNumber, pageSize) {
|
|
71
|
+
const url = `${this.baseUrl}/api/RoomInstance/ReadViewPageByUniqueId/` + uniqueId + `/` + pageNumber + `/` + pageSize;
|
|
72
|
+
const token = localStorage.getItem("auth_token");
|
|
73
|
+
const requestOptions = {
|
|
74
|
+
method: "GET",
|
|
75
|
+
headers: {
|
|
76
|
+
"Content-Type": "application/json",
|
|
77
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const response = await fetch(url, requestOptions);
|
|
81
|
+
if (!response.ok) throw new Error(await response.text());
|
|
82
|
+
return await response.json();
|
|
83
|
+
}
|
|
84
|
+
async ReadUserCountByUniqueId(uniqueId) {
|
|
85
|
+
const url = `${this.baseUrl}/api/RoomInstance/ReadUserCountByUniqueId/` + uniqueId;
|
|
86
|
+
const token = localStorage.getItem("auth_token");
|
|
87
|
+
const requestOptions = {
|
|
88
|
+
method: "GET",
|
|
89
|
+
headers: {
|
|
90
|
+
"Content-Type": "application/json",
|
|
91
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const response = await fetch(url, requestOptions);
|
|
95
|
+
if (!response.ok) throw new Error(await response.text());
|
|
96
|
+
return await response.json();
|
|
97
|
+
}
|
|
98
|
+
async Read(roomInstanceId) {
|
|
99
|
+
const url = `${this.baseUrl}/api/RoomInstance/Read/` + roomInstanceId;
|
|
100
|
+
const token = localStorage.getItem("auth_token");
|
|
101
|
+
const requestOptions = {
|
|
102
|
+
method: "GET",
|
|
103
|
+
headers: {
|
|
104
|
+
"Content-Type": "application/json",
|
|
105
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const response = await fetch(url, requestOptions);
|
|
109
|
+
if (!response.ok) throw new Error(await response.text());
|
|
110
|
+
return await response.json();
|
|
111
|
+
}
|
|
112
|
+
async ReadConnectionsById(roomInstanceId) {
|
|
113
|
+
const url = `${this.baseUrl}/api/RoomInstance/ReadConnectionsById/` + roomInstanceId;
|
|
114
|
+
const token = localStorage.getItem("auth_token");
|
|
115
|
+
const requestOptions = {
|
|
116
|
+
method: "GET",
|
|
117
|
+
headers: {
|
|
118
|
+
"Content-Type": "application/json",
|
|
119
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const response = await fetch(url, requestOptions);
|
|
123
|
+
if (!response.ok) throw new Error(await response.text());
|
|
124
|
+
return await response.json();
|
|
125
|
+
}
|
|
126
|
+
async ReadByConnectionId(connectionId) {
|
|
127
|
+
const url = `${this.baseUrl}/api/RoomInstance/ReadByConnectionId/` + connectionId;
|
|
128
|
+
const token = localStorage.getItem("auth_token");
|
|
129
|
+
const requestOptions = {
|
|
130
|
+
method: "GET",
|
|
131
|
+
headers: {
|
|
132
|
+
"Content-Type": "application/json",
|
|
133
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const response = await fetch(url, requestOptions);
|
|
137
|
+
if (!response.ok) throw new Error(await response.text());
|
|
138
|
+
return await response.json();
|
|
139
|
+
}
|
|
140
|
+
async Join(roomInstanceId, connectionId) {
|
|
141
|
+
const url = `${this.baseUrl}/api/RoomInstance/Join/` + roomInstanceId + `/` + connectionId;
|
|
142
|
+
const token = localStorage.getItem("auth_token");
|
|
143
|
+
const requestOptions = {
|
|
144
|
+
method: "GET",
|
|
145
|
+
headers: {
|
|
146
|
+
"Content-Type": "application/json",
|
|
147
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const response = await fetch(url, requestOptions);
|
|
151
|
+
if (!response.ok) throw new Error(await response.text());
|
|
152
|
+
return await response.json();
|
|
153
|
+
}
|
|
154
|
+
async Leave(roomInstanceId) {
|
|
155
|
+
const url = `${this.baseUrl}/api/RoomInstance/Leave/` + roomInstanceId;
|
|
156
|
+
const token = localStorage.getItem("auth_token");
|
|
157
|
+
const requestOptions = {
|
|
158
|
+
method: "GET",
|
|
159
|
+
headers: {
|
|
160
|
+
"Content-Type": "application/json",
|
|
161
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
const response = await fetch(url, requestOptions);
|
|
165
|
+
if (!response.ok) throw new Error(await response.text());
|
|
166
|
+
return await response.json();
|
|
167
|
+
}
|
|
168
|
+
async Create(uniqueId, maxUsers) {
|
|
169
|
+
const url = `${this.baseUrl}/api/RoomInstance/Create/` + uniqueId + `/` + maxUsers;
|
|
170
|
+
const token = localStorage.getItem("auth_token");
|
|
171
|
+
const requestOptions = {
|
|
172
|
+
method: "GET",
|
|
173
|
+
headers: {
|
|
174
|
+
"Content-Type": "application/json",
|
|
175
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const response = await fetch(url, requestOptions);
|
|
179
|
+
if (!response.ok) throw new Error(await response.text());
|
|
180
|
+
return await response.json();
|
|
181
|
+
}
|
|
182
|
+
async Remove(roomInstanceId) {
|
|
183
|
+
const url = `${this.baseUrl}/api/RoomInstance/Remove/` + roomInstanceId;
|
|
184
|
+
const token = localStorage.getItem("auth_token");
|
|
185
|
+
const requestOptions = {
|
|
186
|
+
method: "GET",
|
|
187
|
+
headers: {
|
|
188
|
+
"Content-Type": "application/json",
|
|
189
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
const response = await fetch(url, requestOptions);
|
|
193
|
+
if (!response.ok) throw new Error(await response.text());
|
|
194
|
+
return await response.json();
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// src/api/Controllers/UserSetting.ts
|
|
199
|
+
var UserSetting = class {
|
|
200
|
+
baseUrl;
|
|
201
|
+
constructor(baseUrl) {
|
|
202
|
+
this.baseUrl = baseUrl;
|
|
203
|
+
}
|
|
204
|
+
async GetOrCreate(userId) {
|
|
205
|
+
const url = `${this.baseUrl}/api/UserSetting/GetOrCreate/` + userId;
|
|
206
|
+
const token = localStorage.getItem("auth_token");
|
|
207
|
+
const requestOptions = {
|
|
208
|
+
method: "GET",
|
|
209
|
+
headers: {
|
|
210
|
+
"Content-Type": "application/json",
|
|
211
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
const response = await fetch(url, requestOptions);
|
|
215
|
+
if (!response.ok) throw new Error(await response.text());
|
|
216
|
+
return await response.json();
|
|
217
|
+
}
|
|
218
|
+
async Set(userSettingDTO) {
|
|
219
|
+
const url = `${this.baseUrl}/api/UserSetting/Set`;
|
|
220
|
+
const token = localStorage.getItem("auth_token");
|
|
221
|
+
const requestOptions = {
|
|
222
|
+
method: "POST",
|
|
223
|
+
headers: {
|
|
224
|
+
"Content-Type": "application/json",
|
|
225
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
226
|
+
},
|
|
227
|
+
body: JSON.stringify(userSettingDTO)
|
|
228
|
+
};
|
|
229
|
+
const response = await fetch(url, requestOptions);
|
|
230
|
+
if (!response.ok) throw new Error(await response.text());
|
|
231
|
+
return await response.json();
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
// src/api/Controllers/WebSocketConnection.ts
|
|
236
|
+
var WebSocketConnection = class {
|
|
237
|
+
baseUrl;
|
|
238
|
+
constructor(baseUrl) {
|
|
239
|
+
this.baseUrl = baseUrl;
|
|
240
|
+
}
|
|
241
|
+
async Create(webSocketConnectionDTO) {
|
|
242
|
+
const url = `${this.baseUrl}/api/WebSocketConnection/Create`;
|
|
243
|
+
const token = localStorage.getItem("auth_token");
|
|
244
|
+
const requestOptions = {
|
|
245
|
+
method: "POST",
|
|
246
|
+
headers: {
|
|
247
|
+
"Content-Type": "application/json",
|
|
248
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
249
|
+
},
|
|
250
|
+
body: JSON.stringify(webSocketConnectionDTO)
|
|
251
|
+
};
|
|
252
|
+
const response = await fetch(url, requestOptions);
|
|
253
|
+
if (!response.ok) throw new Error(await response.text());
|
|
254
|
+
return await response.json();
|
|
255
|
+
}
|
|
256
|
+
async Remove(connectionId) {
|
|
257
|
+
const url = `${this.baseUrl}/api/WebSocketConnection/Remove/` + connectionId;
|
|
258
|
+
const token = localStorage.getItem("auth_token");
|
|
259
|
+
const requestOptions = {
|
|
260
|
+
method: "GET",
|
|
261
|
+
headers: {
|
|
262
|
+
"Content-Type": "application/json",
|
|
263
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const response = await fetch(url, requestOptions);
|
|
267
|
+
if (!response.ok) throw new Error(await response.text());
|
|
268
|
+
return await response.json();
|
|
269
|
+
}
|
|
270
|
+
async ReadConnections(userId) {
|
|
271
|
+
const url = `${this.baseUrl}/api/WebSocketConnection/ReadConnections/` + userId;
|
|
272
|
+
const token = localStorage.getItem("auth_token");
|
|
273
|
+
const requestOptions = {
|
|
274
|
+
method: "GET",
|
|
275
|
+
headers: {
|
|
276
|
+
"Content-Type": "application/json",
|
|
277
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
const response = await fetch(url, requestOptions);
|
|
281
|
+
if (!response.ok) throw new Error(await response.text());
|
|
282
|
+
return await response.json();
|
|
283
|
+
}
|
|
284
|
+
async ReadUserIdByConnectionId(connectionId) {
|
|
285
|
+
const url = `${this.baseUrl}/api/WebSocketConnection/ReadUserIdByConnectionId/` + connectionId;
|
|
286
|
+
const token = localStorage.getItem("auth_token");
|
|
287
|
+
const requestOptions = {
|
|
288
|
+
method: "GET",
|
|
289
|
+
headers: {
|
|
290
|
+
"Content-Type": "application/json",
|
|
291
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
const response = await fetch(url, requestOptions);
|
|
295
|
+
if (!response.ok) throw new Error(await response.text());
|
|
296
|
+
return await response.json();
|
|
297
|
+
}
|
|
298
|
+
async Clear() {
|
|
299
|
+
const url = `${this.baseUrl}/api/WebSocketConnection/Clear`;
|
|
300
|
+
const token = localStorage.getItem("auth_token");
|
|
301
|
+
const requestOptions = {
|
|
302
|
+
method: "GET",
|
|
303
|
+
headers: {
|
|
304
|
+
"Content-Type": "application/json",
|
|
305
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
const response = await fetch(url, requestOptions);
|
|
309
|
+
if (!response.ok) throw new Error(await response.text());
|
|
310
|
+
return await response.json();
|
|
311
|
+
}
|
|
312
|
+
async SendMessage(webSocketClientRequestDTO) {
|
|
313
|
+
const url = `${this.baseUrl}/api/WebSocketConnection/SendMessage`;
|
|
314
|
+
const token = localStorage.getItem("auth_token");
|
|
315
|
+
const requestOptions = {
|
|
316
|
+
method: "POST",
|
|
317
|
+
headers: {
|
|
318
|
+
"Content-Type": "application/json",
|
|
319
|
+
...token && { Authorization: `Bearer ${token}` }
|
|
320
|
+
},
|
|
321
|
+
body: JSON.stringify(webSocketClientRequestDTO)
|
|
322
|
+
};
|
|
323
|
+
const response = await fetch(url, requestOptions);
|
|
324
|
+
if (!response.ok) throw new Error(await response.text());
|
|
325
|
+
return await response.json();
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
// src/api/SparkStudioRealtimeSDK.ts
|
|
330
|
+
var SparkStudioRealtimeSDK = class {
|
|
331
|
+
home;
|
|
332
|
+
roomInstance;
|
|
333
|
+
userSetting;
|
|
334
|
+
webSocketConnection;
|
|
335
|
+
constructor(baseUrl) {
|
|
336
|
+
this.home = new Home(baseUrl);
|
|
337
|
+
this.roomInstance = new RoomInstance(baseUrl);
|
|
338
|
+
this.userSetting = new UserSetting(baseUrl);
|
|
339
|
+
this.webSocketConnection = new WebSocketConnection(baseUrl);
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
// src/api/DTOs/Guid.ts
|
|
344
|
+
var GuidUtil = class {
|
|
345
|
+
static Empty = "00000000-0000-0000-0000-000000000000";
|
|
346
|
+
static guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
347
|
+
static create() {
|
|
348
|
+
return crypto.randomUUID();
|
|
349
|
+
}
|
|
350
|
+
static parse(value) {
|
|
351
|
+
if (value === this.Empty) return this.Empty;
|
|
352
|
+
if (!this.isValid(value)) {
|
|
353
|
+
throw new Error(`Invalid GUID: ${value}`);
|
|
354
|
+
}
|
|
355
|
+
return value;
|
|
356
|
+
}
|
|
357
|
+
static isValid(value) {
|
|
358
|
+
return value === this.Empty || this.guidRegex.test(value);
|
|
359
|
+
}
|
|
360
|
+
static isEmpty(value) {
|
|
361
|
+
return value === this.Empty;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
// src/api/DTOs/GuidResultDTO.ts
|
|
366
|
+
var GuidResultDTO = class {
|
|
367
|
+
Result;
|
|
368
|
+
constructor(init) {
|
|
369
|
+
this.Result = init.Result;
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
// src/api/DTOs/RoomInstanceDTO.ts
|
|
374
|
+
var RoomInstanceDTO = class {
|
|
375
|
+
Id;
|
|
376
|
+
HostUserId;
|
|
377
|
+
UniqueId;
|
|
378
|
+
Data;
|
|
379
|
+
MaxUsers;
|
|
380
|
+
constructor(init) {
|
|
381
|
+
this.Id = init.Id;
|
|
382
|
+
this.HostUserId = init.HostUserId;
|
|
383
|
+
this.UniqueId = init.UniqueId;
|
|
384
|
+
this.Data = init.Data;
|
|
385
|
+
this.MaxUsers = init.MaxUsers;
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
// src/api/DTOs/RoomInstanceViewDTO.ts
|
|
390
|
+
var RoomInstanceViewDTO = class {
|
|
391
|
+
Id;
|
|
392
|
+
RoomInstance;
|
|
393
|
+
UsersInRoom;
|
|
394
|
+
constructor(init) {
|
|
395
|
+
this.Id = init.Id;
|
|
396
|
+
this.RoomInstance = init.RoomInstance;
|
|
397
|
+
this.UsersInRoom = init.UsersInRoom;
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
// src/api/DTOs/StringResultDTO.ts
|
|
402
|
+
var StringResultDTO = class {
|
|
403
|
+
Result;
|
|
404
|
+
constructor(init) {
|
|
405
|
+
this.Result = init.Result;
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
// src/api/DTOs/UniqueViewDTO.ts
|
|
410
|
+
var UniqueViewDTO = class {
|
|
411
|
+
Id;
|
|
412
|
+
UserCount;
|
|
413
|
+
constructor(init) {
|
|
414
|
+
this.Id = init.Id;
|
|
415
|
+
this.UserCount = init.UserCount;
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// src/api/DTOs/UserSettingDTO.ts
|
|
420
|
+
var UserSettingDTO = class {
|
|
421
|
+
Id;
|
|
422
|
+
UserId;
|
|
423
|
+
Status;
|
|
424
|
+
StatusDescription;
|
|
425
|
+
TimeZone;
|
|
426
|
+
constructor(init) {
|
|
427
|
+
this.Id = init.Id;
|
|
428
|
+
this.UserId = init.UserId;
|
|
429
|
+
this.Status = init.Status;
|
|
430
|
+
this.StatusDescription = init.StatusDescription;
|
|
431
|
+
this.TimeZone = init.TimeZone;
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
// src/api/DTOs/WebSocketClientRequestDTO.ts
|
|
436
|
+
var WebSocketClientRequestDTO = class {
|
|
437
|
+
AccessToken;
|
|
438
|
+
Data;
|
|
439
|
+
Type;
|
|
440
|
+
ControllerName;
|
|
441
|
+
MethodName;
|
|
442
|
+
constructor(init) {
|
|
443
|
+
this.AccessToken = init.AccessToken;
|
|
444
|
+
this.Data = init.Data;
|
|
445
|
+
this.Type = init.Type;
|
|
446
|
+
this.ControllerName = init.ControllerName;
|
|
447
|
+
this.MethodName = init.MethodName;
|
|
448
|
+
}
|
|
449
|
+
};
|
|
450
|
+
|
|
451
|
+
// src/api/DTOs/WebSocketConnectionDTO.ts
|
|
452
|
+
var WebSocketConnectionDTO = class {
|
|
453
|
+
Id;
|
|
454
|
+
UserId;
|
|
455
|
+
ConnectionId;
|
|
456
|
+
constructor(init) {
|
|
457
|
+
this.Id = init.Id;
|
|
458
|
+
this.UserId = init.UserId;
|
|
459
|
+
this.ConnectionId = init.ConnectionId;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
// src/api/Enums/UserStatusType.ts
|
|
464
|
+
var UserStatusType = /* @__PURE__ */ ((UserStatusType2) => {
|
|
465
|
+
UserStatusType2[UserStatusType2["Offline"] = 0] = "Offline";
|
|
466
|
+
UserStatusType2[UserStatusType2["Online"] = 1] = "Online";
|
|
467
|
+
UserStatusType2[UserStatusType2["Away"] = 2] = "Away";
|
|
468
|
+
UserStatusType2[UserStatusType2["DoNotDisturb"] = 3] = "DoNotDisturb";
|
|
469
|
+
return UserStatusType2;
|
|
470
|
+
})(UserStatusType || {});
|
|
471
|
+
|
|
472
|
+
// src/views/HomeView.tsx
|
|
473
|
+
var import_authentication_ui = require("@sparkstudio/authentication-ui");
|
|
474
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
475
|
+
function HomeView() {
|
|
476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
477
|
+
import_authentication_ui.AuthenticatorProvider,
|
|
478
|
+
{
|
|
479
|
+
googleClientId: import_authentication_ui.AppSettings.GoogleClientId,
|
|
480
|
+
authenticationUrl: import_authentication_ui.AppSettings.AuthenticationUrl,
|
|
481
|
+
accountsUrl: import_authentication_ui.AppSettings.AccountsUrl,
|
|
482
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HomeContent, {})
|
|
483
|
+
}
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
function HomeContent() {
|
|
487
|
+
const { user } = (0, import_authentication_ui.useUser)();
|
|
488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
489
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_authentication_ui.UserInfoCard, {}),
|
|
490
|
+
user && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: "Hello World" })
|
|
491
|
+
] });
|
|
492
|
+
}
|
|
493
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
494
|
+
0 && (module.exports = {
|
|
495
|
+
GuidResultDTO,
|
|
496
|
+
GuidUtil,
|
|
497
|
+
Home,
|
|
498
|
+
HomeView,
|
|
499
|
+
RoomInstance,
|
|
500
|
+
RoomInstanceDTO,
|
|
501
|
+
RoomInstanceViewDTO,
|
|
502
|
+
SparkStudioRealtimeSDK,
|
|
503
|
+
StringResultDTO,
|
|
504
|
+
UniqueViewDTO,
|
|
505
|
+
UserSetting,
|
|
506
|
+
UserSettingDTO,
|
|
507
|
+
UserStatusType,
|
|
508
|
+
WebSocketClientRequestDTO,
|
|
509
|
+
WebSocketConnection,
|
|
510
|
+
WebSocketConnectionDTO
|
|
511
|
+
});
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/index.scss"],"names":[],"mappings":"AAAQ","file":"index.css"}
|