@signalwire/js 3.25.0 → 3.26.0-dev.202401232045.8ee0040.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/dist/core/src/BaseComponent.d.ts +2 -2
- package/dist/core/src/BaseComponent.d.ts.map +1 -1
- package/dist/core/src/BaseJWTSession.d.ts.map +1 -1
- package/dist/core/src/BaseSession.d.ts +4 -0
- package/dist/core/src/BaseSession.d.ts.map +1 -1
- package/dist/core/src/RPCMessages/RPCConnect.d.ts +15 -0
- package/dist/core/src/RPCMessages/RPCConnect.d.ts.map +1 -1
- package/dist/core/src/RPCMessages/RPCEventAck.d.ts +8 -0
- package/dist/core/src/RPCMessages/RPCEventAck.d.ts.map +1 -0
- package/dist/core/src/RPCMessages/index.d.ts +1 -0
- package/dist/core/src/RPCMessages/index.d.ts.map +1 -1
- package/dist/core/src/chat/applyCommonMethods.d.ts +19 -0
- package/dist/core/src/chat/applyCommonMethods.d.ts.map +1 -0
- package/dist/core/src/chat/index.d.ts +1 -0
- package/dist/core/src/chat/index.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +1 -0
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/types/callfabric.d.ts +26 -0
- package/dist/core/src/types/callfabric.d.ts.map +1 -0
- package/dist/core/src/types/chat.d.ts +1 -0
- package/dist/core/src/types/chat.d.ts.map +1 -1
- package/dist/core/src/types/index.d.ts +1 -0
- package/dist/core/src/types/index.d.ts.map +1 -1
- package/dist/core/src/types/messaging.d.ts +1 -1
- package/dist/core/src/types/messaging.d.ts.map +1 -1
- package/dist/core/src/types/unified.d.ts +36 -0
- package/dist/core/src/types/unified.d.ts.map +1 -0
- package/dist/core/src/types/utils.d.ts +9 -0
- package/dist/core/src/types/utils.d.ts.map +1 -1
- package/dist/core/src/types/videoLayout.d.ts +5 -0
- package/dist/core/src/types/videoLayout.d.ts.map +1 -1
- package/dist/core/src/types/videoMember.d.ts +21 -0
- package/dist/core/src/types/videoMember.d.ts.map +1 -1
- package/dist/core/src/types/videoPlayback.d.ts +13 -1
- package/dist/core/src/types/videoPlayback.d.ts.map +1 -1
- package/dist/core/src/types/videoRecording.d.ts +12 -0
- package/dist/core/src/types/videoRecording.d.ts.map +1 -1
- package/dist/core/src/types/videoRoomSession.d.ts +19 -0
- package/dist/core/src/types/videoRoomSession.d.ts.map +1 -1
- package/dist/core/src/types/videoStream.d.ts +11 -0
- package/dist/core/src/types/videoStream.d.ts.map +1 -1
- package/dist/core/src/types/voiceCall.d.ts +13 -3
- package/dist/core/src/types/voiceCall.d.ts.map +1 -1
- package/dist/core/src/utils/interfaces.d.ts +3 -1
- package/dist/core/src/utils/interfaces.d.ts.map +1 -1
- package/dist/core/src/utils/mapObject.d.ts +7 -0
- package/dist/core/src/utils/mapObject.d.ts.map +1 -0
- package/dist/core/src/utils/mapObject.test.d.ts +2 -0
- package/dist/core/src/utils/mapObject.test.d.ts.map +1 -0
- package/dist/index.esm.js +198 -29
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +199 -33
- package/dist/index.js.map +3 -3
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/js/src/BaseRoomSession.d.ts +9 -9
- package/dist/js/src/BaseRoomSession.d.ts.map +1 -1
- package/dist/js/src/Client.d.ts +3 -0
- package/dist/js/src/Client.d.ts.map +1 -1
- package/dist/js/src/JWTSession.d.ts.map +1 -1
- package/dist/js/src/RoomSession.d.ts.map +1 -1
- package/dist/js/src/chat/index.d.ts +4 -6
- package/dist/js/src/chat/index.d.ts.map +1 -1
- package/dist/js/src/fabric/HTTPClient.d.ts +18 -3
- package/dist/js/src/fabric/HTTPClient.d.ts.map +1 -1
- package/dist/js/src/fabric/SignalWire.d.ts +3 -5
- package/dist/js/src/fabric/SignalWire.d.ts.map +1 -1
- package/dist/js/src/fabric/WSClient.d.ts +7 -2
- package/dist/js/src/fabric/WSClient.d.ts.map +1 -1
- package/dist/js/src/fabric/unified/workers/mappers/UnifiedEventsMapper.d.ts +4 -0
- package/dist/js/src/fabric/unified/workers/mappers/UnifiedEventsMapper.d.ts.map +1 -0
- package/dist/js/src/fabric/unified/workers/unifiedEventsWatcher.d.ts +7 -0
- package/dist/js/src/fabric/unified/workers/unifiedEventsWatcher.d.ts.map +1 -0
- package/dist/js/src/utils/interfaces.d.ts +4 -0
- package/dist/js/src/utils/interfaces.d.ts.map +1 -1
- package/dist/js/src/video/videoWorker.d.ts.map +1 -1
- package/dist/js/tsconfig.build.tsbuildinfo +1 -1
- package/dist/webrtc/src/BaseConnection.d.ts.map +1 -1
- package/dist/webrtc/src/RTCPeer.d.ts.map +1 -1
- package/dist/webrtc/src/utils/helpers.d.ts +10 -0
- package/dist/webrtc/src/utils/helpers.d.ts.map +1 -1
- package/dist/webrtc/src/utils/interfaces.d.ts +2 -0
- package/dist/webrtc/src/utils/interfaces.d.ts.map +1 -1
- package/package.json +8 -4
- package/src/BaseRoomSession.ts +14 -10
- package/src/Client.ts +2 -1
- package/src/RoomSession.ts +2 -0
- package/src/chat/index.ts +29 -10
- package/src/fabric/HTTPClient.ts +34 -7
- package/src/fabric/SignalWire.ts +3 -5
- package/src/fabric/WSClient.ts +12 -3
- package/src/fabric/unified/workers/mappers/UnifiedEventsMapper.ts +61 -0
- package/src/fabric/unified/workers/unifiedEventsWatcher.ts +84 -0
- package/src/utils/interfaces.ts +5 -0
- package/src/video/videoWorker.ts +6 -3
package/dist/index.esm.js
CHANGED
|
@@ -1061,11 +1061,14 @@ var videoWorker = function* (options) {
|
|
|
1061
1061
|
default:
|
|
1062
1062
|
break;
|
|
1063
1063
|
}
|
|
1064
|
-
|
|
1064
|
+
const event = stripNamespacePrefix3(type, "video");
|
|
1065
|
+
roomSession.emit(event, payload);
|
|
1065
1066
|
}
|
|
1066
|
-
const
|
|
1067
|
+
const isVideoOrCallEvent = (action) => {
|
|
1068
|
+
return action.type.startsWith("video.") || action.type.startsWith("call.");
|
|
1069
|
+
};
|
|
1067
1070
|
while (true) {
|
|
1068
|
-
const action = yield sagaEffects4.take(swEventChannel,
|
|
1071
|
+
const action = yield sagaEffects4.take(swEventChannel, isVideoOrCallEvent);
|
|
1069
1072
|
yield sagaEffects4.fork(worker, action);
|
|
1070
1073
|
}
|
|
1071
1074
|
getLogger7().trace("videoWorker ended");
|
|
@@ -1083,6 +1086,9 @@ var RoomSessionConnection = class extends BaseConnection3 {
|
|
|
1083
1086
|
this.runWorker("videoWorker", {
|
|
1084
1087
|
worker: videoWorker
|
|
1085
1088
|
});
|
|
1089
|
+
if (options.eventsWatcher) {
|
|
1090
|
+
this.runWorker("eventsWatcher", { worker: options.eventsWatcher });
|
|
1091
|
+
}
|
|
1086
1092
|
}
|
|
1087
1093
|
get screenShareList() {
|
|
1088
1094
|
return Array.from(this._screenShareList);
|
|
@@ -1650,7 +1656,7 @@ var JWTSession = class extends BaseJWTSession {
|
|
|
1650
1656
|
this.options = options;
|
|
1651
1657
|
__publicField(this, "WebSocketConstructor", WebSocket);
|
|
1652
1658
|
__publicField(this, "CloseEventConstructor", SwCloseEvent);
|
|
1653
|
-
__publicField(this, "agent", "@signalwire/js/browser/3.
|
|
1659
|
+
__publicField(this, "agent", "@signalwire/js/browser/3.26.0-dev.202401232045.8ee0040.0");
|
|
1654
1660
|
__publicField(this, "tokenTyp");
|
|
1655
1661
|
this.tokenTyp = (_a = decodedJwt.typ) != null ? _a : "VRT";
|
|
1656
1662
|
}
|
|
@@ -1954,7 +1960,8 @@ var RoomSession = function(roomOptions) {
|
|
|
1954
1960
|
destinationNumber,
|
|
1955
1961
|
localStream,
|
|
1956
1962
|
watchMediaPackets,
|
|
1957
|
-
watchMediaPacketsTimeout
|
|
1963
|
+
watchMediaPacketsTimeout,
|
|
1964
|
+
disableUdpIceServers = false
|
|
1958
1965
|
} = _a, userOptions = __objRest(_a, [
|
|
1959
1966
|
"audio",
|
|
1960
1967
|
"video",
|
|
@@ -1968,7 +1975,8 @@ var RoomSession = function(roomOptions) {
|
|
|
1968
1975
|
"destinationNumber",
|
|
1969
1976
|
"localStream",
|
|
1970
1977
|
"watchMediaPackets",
|
|
1971
|
-
"watchMediaPacketsTimeout"
|
|
1978
|
+
"watchMediaPacketsTimeout",
|
|
1979
|
+
"disableUdpIceServers"
|
|
1972
1980
|
]);
|
|
1973
1981
|
const deprecatedParams = ["audio", "video"];
|
|
1974
1982
|
deprecatedParams.forEach((param) => {
|
|
@@ -2024,7 +2032,8 @@ var RoomSession = function(roomOptions) {
|
|
|
2024
2032
|
localStream,
|
|
2025
2033
|
watchMediaPackets,
|
|
2026
2034
|
watchMediaPacketsTimeout,
|
|
2027
|
-
prevCallId: reattachManager.getPrevCallId()
|
|
2035
|
+
prevCallId: reattachManager.getPrevCallId(),
|
|
2036
|
+
disableUdpIceServers
|
|
2028
2037
|
});
|
|
2029
2038
|
room.once("destroy", () => {
|
|
2030
2039
|
room.emit("room.left", { reason: room.leaveReason });
|
|
@@ -2253,7 +2262,7 @@ var SWClient = class {
|
|
|
2253
2262
|
};
|
|
2254
2263
|
|
|
2255
2264
|
// src/fabric/WSClient.ts
|
|
2256
|
-
import { getLogger as
|
|
2265
|
+
import { getLogger as getLogger18, VertoSubscribe } from "@signalwire/core";
|
|
2257
2266
|
|
|
2258
2267
|
// src/fabric/WSClientWorker.ts
|
|
2259
2268
|
import {
|
|
@@ -2278,19 +2287,163 @@ var WSClientWorker = function* (options) {
|
|
|
2278
2287
|
getLogger16().trace("WSClientWorker ended");
|
|
2279
2288
|
};
|
|
2280
2289
|
|
|
2290
|
+
// src/fabric/unified/workers/unifiedEventsWatcher.ts
|
|
2291
|
+
import {
|
|
2292
|
+
getLogger as getLogger17,
|
|
2293
|
+
sagaEffects as sagaEffects7
|
|
2294
|
+
} from "@signalwire/core";
|
|
2295
|
+
|
|
2296
|
+
// ../core/src/utils/mapObject.ts
|
|
2297
|
+
import objectPath from "object-path";
|
|
2298
|
+
function isMappableObject(obj) {
|
|
2299
|
+
return !!obj.type;
|
|
2300
|
+
}
|
|
2301
|
+
function mapObject(template, action) {
|
|
2302
|
+
var _a;
|
|
2303
|
+
const matches = new RegExp("^(?<prefix>(\\w|\\.)*)(\\[(?<stateKey>[^\\(\\)]*)(?<replace>\\((?<from>(\\w|\\.)*):(?<to>\\S*)\\))?\\]){0,1}(?<payloadMap>\\{.*\\}){0,1}").exec(template);
|
|
2304
|
+
let result = __spreadProps(__spreadValues({}, action), {
|
|
2305
|
+
type: template
|
|
2306
|
+
});
|
|
2307
|
+
if ((matches == null ? void 0 : matches.groups) && !!action.payload) {
|
|
2308
|
+
const { prefix, stateKey, replace, from, to } = matches.groups;
|
|
2309
|
+
let newType;
|
|
2310
|
+
if (!!replace) {
|
|
2311
|
+
newType = action.payload[stateKey] === from ? `${prefix}${to}` : void 0;
|
|
2312
|
+
} else if (!!stateKey) {
|
|
2313
|
+
newType = !!action.payload[stateKey] ? `${prefix}${action.payload[stateKey]}` : void 0;
|
|
2314
|
+
} else {
|
|
2315
|
+
newType = `${prefix}`;
|
|
2316
|
+
}
|
|
2317
|
+
result = !!newType ? __spreadProps(__spreadValues({}, action), {
|
|
2318
|
+
type: newType
|
|
2319
|
+
}) : void 0;
|
|
2320
|
+
}
|
|
2321
|
+
if ((_a = matches == null ? void 0 : matches.groups) == null ? void 0 : _a.payloadMap) {
|
|
2322
|
+
const { payloadMap: mapString } = matches.groups;
|
|
2323
|
+
const { payload } = action;
|
|
2324
|
+
const payloadMap = JSON.parse(mapString);
|
|
2325
|
+
const newContent = {};
|
|
2326
|
+
Object.entries(payloadMap).forEach(([old_path, new_path]) => {
|
|
2327
|
+
const value = objectPath.get(payload, old_path);
|
|
2328
|
+
objectPath.del(payload, old_path);
|
|
2329
|
+
objectPath.set(newContent, new_path, value);
|
|
2330
|
+
});
|
|
2331
|
+
const newPayload = __spreadValues(__spreadValues({}, payload), newContent);
|
|
2332
|
+
result = __spreadProps(__spreadValues({}, result), {
|
|
2333
|
+
payload: newPayload
|
|
2334
|
+
});
|
|
2335
|
+
}
|
|
2336
|
+
return result;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
// src/fabric/unified/workers/mappers/UnifiedEventsMapper.ts
|
|
2340
|
+
var EVENT_MAPPINGS = {
|
|
2341
|
+
"call.state": [
|
|
2342
|
+
"call.state.[call_state]",
|
|
2343
|
+
"video.room.[call_state]",
|
|
2344
|
+
"video.room.[call_state(created:started)]"
|
|
2345
|
+
],
|
|
2346
|
+
"call.play": ["call.play.[state]"],
|
|
2347
|
+
"call.collect": ["call.collect.[collect_state]"],
|
|
2348
|
+
"call.connect": [
|
|
2349
|
+
"call.connect.[connect_state]",
|
|
2350
|
+
"video.room.[connect_state(connected:subscribed)]"
|
|
2351
|
+
],
|
|
2352
|
+
"call.join": ['video.room.subscribed{"callID":"room_id"}'],
|
|
2353
|
+
"call.audience_count": ["video.room.audience_count"],
|
|
2354
|
+
"call.denoise": ["call.denoise"],
|
|
2355
|
+
"call.detect": ["call.detect.[detect_state]"],
|
|
2356
|
+
"call.dial": ["call.dial.[dial_state]"],
|
|
2357
|
+
"call.send_digits": ["call.send_digits", "video.room.send_digits"],
|
|
2358
|
+
"call.refer": ["calling.call.refer"],
|
|
2359
|
+
"call.received": ["call.received"],
|
|
2360
|
+
"call.fax": ["call.fax.[fax_state]"],
|
|
2361
|
+
"call.hold": ["call.hold.[fax_state]"],
|
|
2362
|
+
"call.prompt": ["call.prompt.[prompt_state]"],
|
|
2363
|
+
"call.started": ["video.room.started"],
|
|
2364
|
+
"call.subscribed": ["video.room.subscribed"],
|
|
2365
|
+
"call.updated": ["video.room.updated"],
|
|
2366
|
+
"call.ended": ["video.room.ended"],
|
|
2367
|
+
"member.joined": ["video.member.joined"],
|
|
2368
|
+
"member.left": ["video.member.left"],
|
|
2369
|
+
"member.updated": ["video.member.updated"],
|
|
2370
|
+
"member.talking": ["video.member.talking"],
|
|
2371
|
+
"member.promoted": ["video.member.promoted"],
|
|
2372
|
+
"member.demoted": ["video.member.demoted"],
|
|
2373
|
+
"layout.changed": ["video.layout.changed"],
|
|
2374
|
+
"call.recording": ["video.room.recording.[recording_state]"],
|
|
2375
|
+
"call.playback": ["video.room.playback.[playback_state]"],
|
|
2376
|
+
"call.outbound_stream.started": ["video.stream.started"],
|
|
2377
|
+
"call.outbound_stream.ended": ["video.stream.ended"]
|
|
2378
|
+
};
|
|
2379
|
+
function fromUnifiedEvent(action) {
|
|
2380
|
+
const { type } = action;
|
|
2381
|
+
if (!Object.keys(EVENT_MAPPINGS).includes(type)) {
|
|
2382
|
+
return [];
|
|
2383
|
+
}
|
|
2384
|
+
const mapDefinitions = EVENT_MAPPINGS[type];
|
|
2385
|
+
const allNewActions = mapDefinitions.map((eventTemplate) => mapObject(eventTemplate, action));
|
|
2386
|
+
return allNewActions.filter((obj) => !!obj);
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
// src/fabric/unified/workers/unifiedEventsWatcher.ts
|
|
2390
|
+
function* eventMapperWorker({
|
|
2391
|
+
action,
|
|
2392
|
+
swEventChannel
|
|
2393
|
+
}) {
|
|
2394
|
+
if (isMappableObject(action)) {
|
|
2395
|
+
const mappedActions = fromUnifiedEvent(action);
|
|
2396
|
+
for (const mappedAction of mappedActions) {
|
|
2397
|
+
yield sagaEffects7.put(swEventChannel, mappedAction);
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
function* debugEmitter({
|
|
2402
|
+
action,
|
|
2403
|
+
instance
|
|
2404
|
+
}) {
|
|
2405
|
+
const { type, payload } = action;
|
|
2406
|
+
yield instance.emit(type, payload);
|
|
2407
|
+
}
|
|
2408
|
+
var unifiedEventsWatcher = function* (options) {
|
|
2409
|
+
const {
|
|
2410
|
+
channels: { swEventChannel },
|
|
2411
|
+
instance
|
|
2412
|
+
} = options;
|
|
2413
|
+
getLogger17().debug("unifiedEventsWatcher started");
|
|
2414
|
+
function* worker(action) {
|
|
2415
|
+
yield sagaEffects7.fork(eventMapperWorker, __spreadProps(__spreadValues({}, options), {
|
|
2416
|
+
action,
|
|
2417
|
+
swEventChannel
|
|
2418
|
+
}));
|
|
2419
|
+
yield sagaEffects7.fork(debugEmitter, __spreadProps(__spreadValues({}, options), {
|
|
2420
|
+
action,
|
|
2421
|
+
instance
|
|
2422
|
+
}));
|
|
2423
|
+
}
|
|
2424
|
+
const isUnifiedEvent = (action) => action.type.startsWith("member") || action.type.startsWith("layout");
|
|
2425
|
+
while (true) {
|
|
2426
|
+
const action = yield sagaEffects7.take(swEventChannel, isUnifiedEvent);
|
|
2427
|
+
getLogger17().debug("UnifiedEventsWatcher action:", action);
|
|
2428
|
+
yield sagaEffects7.fork(worker, action);
|
|
2429
|
+
}
|
|
2430
|
+
getLogger17().trace("unifiedEventsWatcher ended");
|
|
2431
|
+
};
|
|
2432
|
+
|
|
2281
2433
|
// src/fabric/WSClient.ts
|
|
2282
2434
|
var WSClient = class {
|
|
2283
2435
|
constructor(options) {
|
|
2284
2436
|
this.options = options;
|
|
2285
2437
|
__publicField(this, "wsClient");
|
|
2286
|
-
__publicField(this, "logger",
|
|
2438
|
+
__publicField(this, "logger", getLogger18());
|
|
2287
2439
|
this.wsClient = createClient({
|
|
2288
2440
|
host: this.options.host,
|
|
2289
2441
|
token: this.options.token,
|
|
2290
2442
|
debug: {
|
|
2291
2443
|
logWsTraffic: true
|
|
2292
2444
|
},
|
|
2293
|
-
logLevel: "debug"
|
|
2445
|
+
logLevel: "debug",
|
|
2446
|
+
unifiedEventing: true
|
|
2294
2447
|
});
|
|
2295
2448
|
}
|
|
2296
2449
|
connect() {
|
|
@@ -2316,7 +2469,9 @@ var WSClient = class {
|
|
|
2316
2469
|
stopMicrophoneWhileMuted: true,
|
|
2317
2470
|
destinationNumber: params.to,
|
|
2318
2471
|
watchMediaPackets: false,
|
|
2319
|
-
nodeId: params.nodeId
|
|
2472
|
+
nodeId: params.nodeId,
|
|
2473
|
+
eventsWatcher: unifiedEventsWatcher,
|
|
2474
|
+
disableUdpIceServers: this.options.disableUdpIceServers || false
|
|
2320
2475
|
});
|
|
2321
2476
|
call.once("destroy", () => {
|
|
2322
2477
|
this.logger.debug("RTC Connection Destroyed");
|
|
@@ -2332,14 +2487,14 @@ var WSClient = class {
|
|
|
2332
2487
|
call.once("room.subscribed", () => resolve2(call));
|
|
2333
2488
|
await call.join();
|
|
2334
2489
|
} catch (error) {
|
|
2335
|
-
|
|
2490
|
+
getLogger18().error("WSClient call start", error);
|
|
2336
2491
|
reject2(error);
|
|
2337
2492
|
}
|
|
2338
2493
|
});
|
|
2339
2494
|
};
|
|
2340
2495
|
resolve(call);
|
|
2341
2496
|
} catch (error) {
|
|
2342
|
-
|
|
2497
|
+
getLogger18().error("WSClient dial", error);
|
|
2343
2498
|
reject(error);
|
|
2344
2499
|
}
|
|
2345
2500
|
});
|
|
@@ -2393,10 +2548,10 @@ var WSClient = class {
|
|
|
2393
2548
|
nodeId
|
|
2394
2549
|
});
|
|
2395
2550
|
call.once("destroy", () => {
|
|
2396
|
-
|
|
2551
|
+
getLogger18().debug("RTC Connection Destroyed");
|
|
2397
2552
|
});
|
|
2398
2553
|
call.attachPreConnectWorkers();
|
|
2399
|
-
|
|
2554
|
+
getLogger18().debug("Resolving Call", call);
|
|
2400
2555
|
resolve({ resultType: "inboundCall", resultObject: call });
|
|
2401
2556
|
} catch (error) {
|
|
2402
2557
|
reject(error);
|
|
@@ -2454,12 +2609,22 @@ var HTTPClient = class {
|
|
|
2454
2609
|
}
|
|
2455
2610
|
return `fabric.${host.split(".").splice(1).join(".")}`;
|
|
2456
2611
|
}
|
|
2457
|
-
async getAddresses() {
|
|
2458
|
-
const
|
|
2612
|
+
async getAddresses(options) {
|
|
2613
|
+
const { type, displayName } = options || {};
|
|
2614
|
+
let path = "/addresses";
|
|
2615
|
+
if (type || displayName) {
|
|
2616
|
+
const queryParams = new URLSearchParams();
|
|
2617
|
+
if (type) {
|
|
2618
|
+
queryParams.append("type", type);
|
|
2619
|
+
}
|
|
2620
|
+
if (displayName) {
|
|
2621
|
+
queryParams.append("display_name", displayName);
|
|
2622
|
+
}
|
|
2623
|
+
path += `?${queryParams.toString()}`;
|
|
2624
|
+
}
|
|
2459
2625
|
const { body } = await this.httpClient(path);
|
|
2460
2626
|
const anotherPage = async (url) => {
|
|
2461
|
-
const {
|
|
2462
|
-
const { body: body2 } = await this.httpClient(`${path}${search}`);
|
|
2627
|
+
const { body: body2 } = await this.httpClient(url);
|
|
2463
2628
|
return buildResult(body2);
|
|
2464
2629
|
};
|
|
2465
2630
|
const buildResult = (body2) => {
|
|
@@ -2472,7 +2637,13 @@ var HTTPClient = class {
|
|
|
2472
2637
|
prevPage: async () => {
|
|
2473
2638
|
const { prev } = body2.links;
|
|
2474
2639
|
return prev ? anotherPage(prev) : void 0;
|
|
2475
|
-
}
|
|
2640
|
+
},
|
|
2641
|
+
firstPage: async () => {
|
|
2642
|
+
const { first } = body2.links;
|
|
2643
|
+
return first ? anotherPage(first) : void 0;
|
|
2644
|
+
},
|
|
2645
|
+
hasNext: Boolean(body2.links.next),
|
|
2646
|
+
hasPrev: Boolean(body2.links.prev)
|
|
2476
2647
|
};
|
|
2477
2648
|
};
|
|
2478
2649
|
return buildResult(body);
|
|
@@ -2531,13 +2702,6 @@ __export(chat_exports, {
|
|
|
2531
2702
|
ChatMessage: () => ChatMessage,
|
|
2532
2703
|
Client: () => Client3
|
|
2533
2704
|
});
|
|
2534
|
-
import { Chat } from "@signalwire/core";
|
|
2535
|
-
|
|
2536
|
-
// src/utils/interfaces.ts
|
|
2537
|
-
import { INTERNAL_MEMBER_UPDATABLE_PROPS } from "@signalwire/core";
|
|
2538
|
-
var INTERNAL_MEMBER_UPDATED_EVENTS = Object.keys(INTERNAL_MEMBER_UPDATABLE_PROPS).map((key) => {
|
|
2539
|
-
return `member.updated.${key}`;
|
|
2540
|
-
});
|
|
2541
2705
|
|
|
2542
2706
|
// src/chat/Client.ts
|
|
2543
2707
|
var INTERCEPTED_METHODS = [
|
|
@@ -2575,8 +2739,7 @@ var Client3 = function(chatOptions) {
|
|
|
2575
2739
|
};
|
|
2576
2740
|
|
|
2577
2741
|
// src/chat/index.ts
|
|
2578
|
-
|
|
2579
|
-
var ChatMessage = Chat.ChatMessage;
|
|
2742
|
+
import { ChatMember, ChatMessage } from "@signalwire/core";
|
|
2580
2743
|
|
|
2581
2744
|
// src/pubSub/index.ts
|
|
2582
2745
|
var pubSub_exports = {};
|
|
@@ -2586,6 +2749,12 @@ __export(pubSub_exports, {
|
|
|
2586
2749
|
});
|
|
2587
2750
|
import { PubSub } from "@signalwire/core";
|
|
2588
2751
|
|
|
2752
|
+
// src/utils/interfaces.ts
|
|
2753
|
+
import { INTERNAL_MEMBER_UPDATABLE_PROPS } from "@signalwire/core";
|
|
2754
|
+
var INTERNAL_MEMBER_UPDATED_EVENTS = Object.keys(INTERNAL_MEMBER_UPDATABLE_PROPS).map((key) => {
|
|
2755
|
+
return `member.updated.${key}`;
|
|
2756
|
+
});
|
|
2757
|
+
|
|
2589
2758
|
// src/pubSub/Client.ts
|
|
2590
2759
|
var INTERCEPTED_METHODS2 = [
|
|
2591
2760
|
"getAllowedChannels",
|