@liveblocks/node 3.1.3 → 3.2.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/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { detectDupes } from "@liveblocks/core";
|
|
|
3
3
|
|
|
4
4
|
// src/version.ts
|
|
5
5
|
var PKG_NAME = "@liveblocks/node";
|
|
6
|
-
var PKG_VERSION = "3.
|
|
6
|
+
var PKG_VERSION = "3.2.0";
|
|
7
7
|
var PKG_FORMAT = "esm";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
@@ -423,16 +423,16 @@ var Liveblocks = class {
|
|
|
423
423
|
async identifyUser(identity, ...rest) {
|
|
424
424
|
const options = rest[0];
|
|
425
425
|
const path = url2`/v2/identify-user`;
|
|
426
|
-
const userId = typeof identity === "string" ? identity : identity
|
|
427
|
-
const groupIds = typeof identity === "string" ? void 0 : identity.groupIds;
|
|
426
|
+
const { userId, groupIds, tenantId } = typeof identity === "string" ? { userId: identity, groupIds: void 0, tenantId: void 0 } : identity;
|
|
428
427
|
assertNonEmpty(userId, "userId");
|
|
428
|
+
const body = {
|
|
429
|
+
userId,
|
|
430
|
+
groupIds,
|
|
431
|
+
tenantId,
|
|
432
|
+
userInfo: options?.userInfo
|
|
433
|
+
};
|
|
429
434
|
try {
|
|
430
|
-
const resp = await this.#post(path,
|
|
431
|
-
userId,
|
|
432
|
-
groupIds,
|
|
433
|
-
// Optional metadata
|
|
434
|
-
userInfo: options?.userInfo
|
|
435
|
-
});
|
|
435
|
+
const resp = await this.#post(path, body);
|
|
436
436
|
return {
|
|
437
437
|
status: normalizeStatusCode(resp.status),
|
|
438
438
|
body: await resp.text()
|