@signalwire/js 4.0.0-beta.0 → 4.0.0-dev-20260224150350
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/browser.mjs +8 -5
- package/dist/browser.mjs.map +1 -1
- package/dist/browser.umd.js +8 -5
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/browser.umd.js
CHANGED
|
@@ -15512,12 +15512,15 @@ var ClientSessionManager = class extends Destroyable {
|
|
|
15512
15512
|
}
|
|
15513
15513
|
async createCall(options = {}) {
|
|
15514
15514
|
try {
|
|
15515
|
-
if (!this._directory) throw new DependencyError("Directory not initialized");
|
|
15516
15515
|
const addressURI = getAddressSearchURI(options);
|
|
15517
|
-
|
|
15518
|
-
if (!
|
|
15519
|
-
|
|
15520
|
-
|
|
15516
|
+
let address;
|
|
15517
|
+
if (!addressURI.startsWith("+")) {
|
|
15518
|
+
if (!this._directory) throw new DependencyError("Directory not initialized");
|
|
15519
|
+
const addressId = await this._directory.findAddressIdByURI(addressURI);
|
|
15520
|
+
if (!addressId) throw new DependencyError(`Address name: ${addressURI} not found`);
|
|
15521
|
+
address = this._directory.get(addressId);
|
|
15522
|
+
if (!address) throw new DependencyError(`Address ID: ${addressId} not found`);
|
|
15523
|
+
}
|
|
15521
15524
|
const callSession = this.callFactory.createCall(address, { ...options });
|
|
15522
15525
|
callSession.status$.pipe((0, import_cjs$5.filter)((status) => status === "destroyed"), (0, import_cjs$5.take)(1)).subscribe(() => {
|
|
15523
15526
|
const { [`${callSession.id}`]: _, ...remainingCalls } = this._calls$.value;
|