@liveblocks/node 2.24.0-deque1 → 2.24.0-sub1
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 +50 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -17
- package/dist/index.d.ts +55 -17
- package/dist/index.js +51 -17
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ var _core = require('@liveblocks/core');
|
|
|
3
3
|
|
|
4
4
|
// src/version.ts
|
|
5
5
|
var PKG_NAME = "@liveblocks/node";
|
|
6
|
-
var PKG_VERSION = "2.24.0-
|
|
6
|
+
var PKG_VERSION = "2.24.0-sub1";
|
|
7
7
|
var PKG_FORMAT = "cjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
@@ -1350,15 +1350,26 @@ var Liveblocks = class {
|
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
1352
|
/**
|
|
1353
|
-
*
|
|
1354
|
-
*
|
|
1355
|
-
*
|
|
1353
|
+
* @deprecated Renamed to `getRoomSubscriptionSettings`
|
|
1354
|
+
*
|
|
1355
|
+
* Gets the user's room subscription settings.
|
|
1356
|
+
* @param params.userId The user ID to get the room subscription settings from.
|
|
1357
|
+
* @param params.roomId The room ID to get the room subscription settings from.
|
|
1356
1358
|
* @param options.signal (optional) An abort signal to cancel the request.
|
|
1357
1359
|
*/
|
|
1358
1360
|
async getRoomNotificationSettings(params, options) {
|
|
1361
|
+
return this.getRoomSubscriptionSettings(params, options);
|
|
1362
|
+
}
|
|
1363
|
+
/**
|
|
1364
|
+
* Gets the user's room subscription settings.
|
|
1365
|
+
* @param params.userId The user ID to get the room subscription settings from.
|
|
1366
|
+
* @param params.roomId The room ID to get the room subscription settings from.
|
|
1367
|
+
* @param options.signal (optional) An abort signal to cancel the request.
|
|
1368
|
+
*/
|
|
1369
|
+
async getRoomSubscriptionSettings(params, options) {
|
|
1359
1370
|
const { userId, roomId } = params;
|
|
1360
1371
|
const res = await this.#get(
|
|
1361
|
-
_core.url`/v2/rooms/${roomId}/users/${userId}/
|
|
1372
|
+
_core.url`/v2/rooms/${roomId}/users/${userId}/subscription-settings`,
|
|
1362
1373
|
void 0,
|
|
1363
1374
|
options
|
|
1364
1375
|
);
|
|
@@ -1368,16 +1379,28 @@ var Liveblocks = class {
|
|
|
1368
1379
|
return await res.json();
|
|
1369
1380
|
}
|
|
1370
1381
|
/**
|
|
1371
|
-
*
|
|
1372
|
-
*
|
|
1373
|
-
*
|
|
1374
|
-
* @param params.
|
|
1382
|
+
* @deprecated Renamed to `updateRoomSubscriptionSettings`
|
|
1383
|
+
*
|
|
1384
|
+
* Updates the user's room subscription settings.
|
|
1385
|
+
* @param params.userId The user ID to update the room subscription settings for.
|
|
1386
|
+
* @param params.roomId The room ID to update the room subscription settings for.
|
|
1387
|
+
* @param params.data The new room subscription settings for the user.
|
|
1375
1388
|
* @param options.signal (optional) An abort signal to cancel the request.
|
|
1376
1389
|
*/
|
|
1377
1390
|
async updateRoomNotificationSettings(params, options) {
|
|
1391
|
+
return this.updateRoomSubscriptionSettings(params, options);
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Updates the user's room subscription settings.
|
|
1395
|
+
* @param params.userId The user ID to update the room subscription settings for.
|
|
1396
|
+
* @param params.roomId The room ID to update the room subscription settings for.
|
|
1397
|
+
* @param params.data The new room subscription settings for the user.
|
|
1398
|
+
* @param options.signal (optional) An abort signal to cancel the request.
|
|
1399
|
+
*/
|
|
1400
|
+
async updateRoomSubscriptionSettings(params, options) {
|
|
1378
1401
|
const { userId, roomId, data } = params;
|
|
1379
1402
|
const res = await this.#post(
|
|
1380
|
-
_core.url`/v2/rooms/${roomId}/users/${userId}/
|
|
1403
|
+
_core.url`/v2/rooms/${roomId}/users/${userId}/subscription-settings`,
|
|
1381
1404
|
data,
|
|
1382
1405
|
options
|
|
1383
1406
|
);
|
|
@@ -1387,15 +1410,26 @@ var Liveblocks = class {
|
|
|
1387
1410
|
return await res.json();
|
|
1388
1411
|
}
|
|
1389
1412
|
/**
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1413
|
+
* @deprecated Renamed to `deleteRoomSubscriptionSettings`
|
|
1414
|
+
*
|
|
1415
|
+
* Delete the user's room subscription settings.
|
|
1416
|
+
* @param params.userId The user ID to delete the room subscription settings from.
|
|
1417
|
+
* @param params.roomId The room ID to delete the room subscription settings from.
|
|
1393
1418
|
* @param options.signal (optional) An abort signal to cancel the request.
|
|
1394
1419
|
*/
|
|
1395
1420
|
async deleteRoomNotificationSettings(params, options) {
|
|
1421
|
+
return this.deleteRoomSubscriptionSettings(params, options);
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Delete the user's room subscription settings.
|
|
1425
|
+
* @param params.userId The user ID to delete the room subscription settings from.
|
|
1426
|
+
* @param params.roomId The room ID to delete the room subscription settings from.
|
|
1427
|
+
* @param options.signal (optional) An abort signal to cancel the request.
|
|
1428
|
+
*/
|
|
1429
|
+
async deleteRoomSubscriptionSettings(params, options) {
|
|
1396
1430
|
const { userId, roomId } = params;
|
|
1397
1431
|
const res = await this.#delete(
|
|
1398
|
-
_core.url`/v2/rooms/${roomId}/users/${userId}/
|
|
1432
|
+
_core.url`/v2/rooms/${roomId}/users/${userId}/subscription-settings`,
|
|
1399
1433
|
options
|
|
1400
1434
|
);
|
|
1401
1435
|
if (!res.ok) {
|
|
@@ -1478,7 +1512,7 @@ var Liveblocks = class {
|
|
|
1478
1512
|
throw await LiveblocksError.from(res);
|
|
1479
1513
|
}
|
|
1480
1514
|
const plainSettings = await res.json();
|
|
1481
|
-
const settings = _core.
|
|
1515
|
+
const settings = _core.createNotificationSettings.call(void 0, plainSettings);
|
|
1482
1516
|
return settings;
|
|
1483
1517
|
}
|
|
1484
1518
|
/**
|
|
@@ -1498,7 +1532,7 @@ var Liveblocks = class {
|
|
|
1498
1532
|
throw await LiveblocksError.from(res);
|
|
1499
1533
|
}
|
|
1500
1534
|
const plainSettings = await res.json();
|
|
1501
|
-
const settings = _core.
|
|
1535
|
+
const settings = _core.createNotificationSettings.call(void 0, plainSettings);
|
|
1502
1536
|
return settings;
|
|
1503
1537
|
}
|
|
1504
1538
|
/**
|