@liveblocks/node
Advanced tools
Comparing version 2.2.3-alpha2 to 2.3.0
@@ -707,2 +707,18 @@ import { BaseUserMeta, DU, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, CommentData, CommentBody, Patchable, CommentUserReaction, InboxNotificationData, RoomNotificationSettings, KDAD, DAD, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DM, DS } from '@liveblocks/core'; | ||
}): Promise<void>; | ||
/** | ||
* Deletes an inbox notification for a user. | ||
* @param params.userId The user ID for which to delete the inbox notification. | ||
* @param params.inboxNotificationId The ID of the inbox notification to delete. | ||
*/ | ||
deleteInboxNotification(params: { | ||
userId: string; | ||
inboxNotificationId: string; | ||
}): Promise<void>; | ||
/** | ||
* Deletes all inbox notifications for a user. | ||
* @param params.userId The user ID for which to delete all the inbox notifications. | ||
*/ | ||
deleteAllInboxNotifications(params: { | ||
userId: string; | ||
}): Promise<void>; | ||
} | ||
@@ -709,0 +725,0 @@ declare class LiveblocksError extends Error { |
@@ -6,3 +6,3 @@ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/index.ts | ||
var PKG_NAME = "@liveblocks/node"; | ||
var PKG_VERSION = "2.2.3-alpha2"; | ||
var PKG_VERSION = "2.3.0"; | ||
var PKG_FORMAT = "cjs"; | ||
@@ -1156,2 +1156,29 @@ | ||
} | ||
/** | ||
* Deletes an inbox notification for a user. | ||
* @param params.userId The user ID for which to delete the inbox notification. | ||
* @param params.inboxNotificationId The ID of the inbox notification to delete. | ||
*/ | ||
async deleteInboxNotification(params) { | ||
const { userId, inboxNotificationId } = params; | ||
const res = await this.delete( | ||
url`/v2/users/${userId}/inbox-notifications/${inboxNotificationId}` | ||
); | ||
if (!res.ok) { | ||
const text = await res.text(); | ||
throw new LiveblocksError(res.status, text); | ||
} | ||
} | ||
/** | ||
* Deletes all inbox notifications for a user. | ||
* @param params.userId The user ID for which to delete all the inbox notifications. | ||
*/ | ||
async deleteAllInboxNotifications(params) { | ||
const { userId } = params; | ||
const res = await this.delete(url`/v2/users/${userId}/inbox-notifications`); | ||
if (!res.ok) { | ||
const text = await res.text(); | ||
throw new LiveblocksError(res.status, text); | ||
} | ||
} | ||
}; | ||
@@ -1158,0 +1185,0 @@ var LiveblocksError = class extends Error { |
{ | ||
"name": "@liveblocks/node", | ||
"version": "2.2.3-alpha2", | ||
"version": "2.3.0", | ||
"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.", | ||
@@ -37,3 +37,3 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@liveblocks/core": "2.2.3-alpha2", | ||
"@liveblocks/core": "2.3.0", | ||
"@stablelib/base64": "^1.0.1", | ||
@@ -40,0 +40,0 @@ "fast-sha256": "^1.3.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
396002
3715
0
+ Added@liveblocks/core@2.3.0(transitive)
- Removed@liveblocks/core@2.2.3-alpha2(transitive)
Updated@liveblocks/core@2.3.0