@liveblocks/node
Advanced tools
Comparing version 1.0.0-beta0 to 1.0.0-beta1
@@ -53,3 +53,3 @@ import { IncomingHttpHeaders } from 'http'; | ||
}; | ||
declare type WebhookEvent = StorageUpdatedEvent | UserEnteredEvent | UserLeftEvent; | ||
declare type WebhookEvent = StorageUpdatedEvent | UserEnteredEvent | UserLeftEvent | RoomCreatedEvent | RoomDeletedEvent; | ||
declare type StorageUpdatedEvent = { | ||
@@ -101,2 +101,26 @@ type: "storageUpdated"; | ||
}; | ||
declare type RoomCreatedEvent = { | ||
type: "roomCreated"; | ||
data: { | ||
appId: string; | ||
roomId: string; | ||
/** | ||
* ISO 8601 datestring | ||
* @example "2021-03-01T12:00:00.000Z" | ||
*/ | ||
createdAt: string; | ||
}; | ||
}; | ||
declare type RoomDeletedEvent = { | ||
type: "roomDeleted"; | ||
data: { | ||
appId: string; | ||
roomId: string; | ||
/** | ||
* ISO 8601 datestring | ||
* @example "2021-03-01T12:00:00.000Z" | ||
*/ | ||
deletedAt: string; | ||
}; | ||
}; | ||
@@ -103,0 +127,0 @@ declare type AuthorizeOptions = { |
@@ -89,3 +89,9 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __async = (__this, __arguments, generator) => { | ||
verifyWebhookEventType(event) { | ||
if (event && event.type && (event.type === "storageUpdated" || event.type === "userEntered" || event.type === "userLeft")) | ||
if (event && event.type && [ | ||
"storageUpdated", | ||
"userEntered", | ||
"userLeft", | ||
"roomCreated", | ||
"roomDeleted" | ||
].includes(event.type)) | ||
return; | ||
@@ -92,0 +98,0 @@ throw new Error( |
{ | ||
"name": "@liveblocks/node", | ||
"version": "1.0.0-beta0", | ||
"version": "1.0.0-beta1", | ||
"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,0 +5,0 @@ "license": "Apache-2.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13893
327
4