@liveblocks/node 0.19.10-beta0 → 0.19.11-beta0
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.d.ts +25 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
- package/dist/.built-by-link-script +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ declare type WebhookRequest = {
|
|
|
50
50
|
*/
|
|
51
51
|
rawBody: string;
|
|
52
52
|
};
|
|
53
|
-
declare type WebhookEvent = StorageUpdatedEvent | UserEnteredEvent | UserLeftEvent;
|
|
53
|
+
declare type WebhookEvent = StorageUpdatedEvent | UserEnteredEvent | UserLeftEvent | RoomCreatedEvent | RoomDeletedEvent;
|
|
54
54
|
declare type StorageUpdatedEvent = {
|
|
55
55
|
type: "storageUpdated";
|
|
56
56
|
data: {
|
|
@@ -97,6 +97,30 @@ declare type UserLeftEvent = {
|
|
|
97
97
|
numActiveUsers: number;
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
|
+
declare type RoomCreatedEvent = {
|
|
101
|
+
type: "roomCreated";
|
|
102
|
+
data: {
|
|
103
|
+
appId: string;
|
|
104
|
+
roomId: string;
|
|
105
|
+
/**
|
|
106
|
+
* ISO 8601 datestring
|
|
107
|
+
* @example "2021-03-01T12:00:00.000Z"
|
|
108
|
+
*/
|
|
109
|
+
createdAt: string;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
declare type RoomDeletedEvent = {
|
|
113
|
+
type: "roomDeleted";
|
|
114
|
+
data: {
|
|
115
|
+
appId: string;
|
|
116
|
+
roomId: string;
|
|
117
|
+
/**
|
|
118
|
+
* ISO 8601 datestring
|
|
119
|
+
* @example "2021-03-01T12:00:00.000Z"
|
|
120
|
+
*/
|
|
121
|
+
deletedAt: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
100
124
|
|
|
101
125
|
declare type AuthorizeOptions = {
|
|
102
126
|
/**
|
package/dist/index.js
CHANGED
|
@@ -86,7 +86,13 @@ var _WebhookHandler = class {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
verifyWebhookEventType(event) {
|
|
89
|
-
if (event && event.type &&
|
|
89
|
+
if (event && event.type && [
|
|
90
|
+
"storageUpdated",
|
|
91
|
+
"userEntered",
|
|
92
|
+
"userLeft",
|
|
93
|
+
"roomCreated",
|
|
94
|
+
"roomDeleted"
|
|
95
|
+
].includes(event.type))
|
|
90
96
|
return;
|
|
91
97
|
throw new Error(
|
|
92
98
|
"Unknown event type, please upgrade to a higher version of @liveblocks/node"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/node",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.11-beta0",
|
|
4
4
|
"description": "A server-side utility that lets you set up a Liveblocks authentication endpoint. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1f156258b058e0cca490d9498920a7fa33fdb678
|