@liveblocks/node 2.17.0-channels1 → 2.17.0-usrnotsettings1
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.mts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +15 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseUserMeta, DU, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, CommentData, CommentBody, Patchable, CommentUserReaction, InboxNotificationData, RoomNotificationSettings, KDAD, DAD,
|
|
2
|
-
export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionedIdsFromCommentBody,
|
|
1
|
+
import { BaseUserMeta, DU, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, CommentData, CommentBody, Patchable, CommentUserReaction, InboxNotificationData, RoomNotificationSettings, KDAD, DAD, UserNotificationSettings, PartialUserNotificationSettings, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DM, DS, NotificationChannel } from '@liveblocks/core';
|
|
2
|
+
export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionedIdsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
|
|
3
3
|
import { IncomingHttpHeaders } from 'http';
|
|
4
4
|
|
|
5
5
|
declare const ALL_PERMISSIONS: readonly ["room:write", "room:read", "room:presence:write", "comments:write", "comments:read"];
|
|
@@ -756,26 +756,26 @@ declare class Liveblocks {
|
|
|
756
756
|
userId: string;
|
|
757
757
|
}): Promise<void>;
|
|
758
758
|
/**
|
|
759
|
-
* Get
|
|
760
|
-
* @param params.userId The user ID to get the
|
|
759
|
+
* Get notification settings for a user for a project.
|
|
760
|
+
* @param params.userId The user ID to get the notifications settings for.
|
|
761
761
|
*/
|
|
762
|
-
|
|
762
|
+
getsNotificationSettings(params: {
|
|
763
763
|
userId: string;
|
|
764
|
-
}): Promise<
|
|
764
|
+
}): Promise<UserNotificationSettings>;
|
|
765
765
|
/**
|
|
766
|
-
* Update the user's
|
|
767
|
-
* @param params.userId The user ID to update the
|
|
768
|
-
* @param params.data The new
|
|
766
|
+
* Update the user's notification settings.
|
|
767
|
+
* @param params.userId The user ID to update the notification settings for.
|
|
768
|
+
* @param params.data The new notification settings for the user.
|
|
769
769
|
*/
|
|
770
|
-
|
|
770
|
+
updateNotificationSettings(params: {
|
|
771
771
|
userId: string;
|
|
772
|
-
data:
|
|
773
|
-
}): Promise<
|
|
772
|
+
data: PartialUserNotificationSettings;
|
|
773
|
+
}): Promise<UserNotificationSettings>;
|
|
774
774
|
/**
|
|
775
|
-
* Delete the user's
|
|
776
|
-
* @param params.userId The user ID to update the
|
|
775
|
+
* Delete the user's notification settings
|
|
776
|
+
* @param params.userId The user ID to update the notification settings for.
|
|
777
777
|
*/
|
|
778
|
-
|
|
778
|
+
deleteNotificationSettings(params: {
|
|
779
779
|
userId: string;
|
|
780
780
|
}): Promise<void>;
|
|
781
781
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseUserMeta, DU, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, CommentData, CommentBody, Patchable, CommentUserReaction, InboxNotificationData, RoomNotificationSettings, KDAD, DAD,
|
|
2
|
-
export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionedIdsFromCommentBody,
|
|
1
|
+
import { BaseUserMeta, DU, OptionalTupleUnless, PlainLsonObject, JsonObject, QueryMetadata, ThreadData, CommentData, CommentBody, Patchable, CommentUserReaction, InboxNotificationData, RoomNotificationSettings, KDAD, DAD, UserNotificationSettings, PartialUserNotificationSettings, LsonObject, ToImmutable, PartialUnless, BaseMetadata, DE, DM, DS, NotificationChannel } from '@liveblocks/core';
|
|
2
|
+
export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionedIdsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
|
|
3
3
|
import { IncomingHttpHeaders } from 'http';
|
|
4
4
|
|
|
5
5
|
declare const ALL_PERMISSIONS: readonly ["room:write", "room:read", "room:presence:write", "comments:write", "comments:read"];
|
|
@@ -756,26 +756,26 @@ declare class Liveblocks {
|
|
|
756
756
|
userId: string;
|
|
757
757
|
}): Promise<void>;
|
|
758
758
|
/**
|
|
759
|
-
* Get
|
|
760
|
-
* @param params.userId The user ID to get the
|
|
759
|
+
* Get notification settings for a user for a project.
|
|
760
|
+
* @param params.userId The user ID to get the notifications settings for.
|
|
761
761
|
*/
|
|
762
|
-
|
|
762
|
+
getsNotificationSettings(params: {
|
|
763
763
|
userId: string;
|
|
764
|
-
}): Promise<
|
|
764
|
+
}): Promise<UserNotificationSettings>;
|
|
765
765
|
/**
|
|
766
|
-
* Update the user's
|
|
767
|
-
* @param params.userId The user ID to update the
|
|
768
|
-
* @param params.data The new
|
|
766
|
+
* Update the user's notification settings.
|
|
767
|
+
* @param params.userId The user ID to update the notification settings for.
|
|
768
|
+
* @param params.data The new notification settings for the user.
|
|
769
769
|
*/
|
|
770
|
-
|
|
770
|
+
updateNotificationSettings(params: {
|
|
771
771
|
userId: string;
|
|
772
|
-
data:
|
|
773
|
-
}): Promise<
|
|
772
|
+
data: PartialUserNotificationSettings;
|
|
773
|
+
}): Promise<UserNotificationSettings>;
|
|
774
774
|
/**
|
|
775
|
-
* Delete the user's
|
|
776
|
-
* @param params.userId The user ID to update the
|
|
775
|
+
* Delete the user's notification settings
|
|
776
|
+
* @param params.userId The user ID to update the notification settings for.
|
|
777
777
|
*/
|
|
778
|
-
|
|
778
|
+
deleteNotificationSettings(params: {
|
|
779
779
|
userId: string;
|
|
780
780
|
}): Promise<void>;
|
|
781
781
|
}
|
package/dist/index.js
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.17.0-
|
|
6
|
+
var PKG_VERSION = "2.17.0-usrnotsettings1";
|
|
7
7
|
var PKG_FORMAT = "cjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
@@ -1202,14 +1202,12 @@ var Liveblocks = class {
|
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
1204
|
/**
|
|
1205
|
-
* Get
|
|
1206
|
-
* @param params.userId The user ID to get the
|
|
1205
|
+
* Get notification settings for a user for a project.
|
|
1206
|
+
* @param params.userId The user ID to get the notifications settings for.
|
|
1207
1207
|
*/
|
|
1208
|
-
async
|
|
1208
|
+
async getsNotificationSettings(params) {
|
|
1209
1209
|
const { userId } = params;
|
|
1210
|
-
const res = await this.#get(
|
|
1211
|
-
_core.url`/v2/users/${userId}/channels-notification-settings`
|
|
1212
|
-
);
|
|
1210
|
+
const res = await this.#get(_core.url`/v2/users/${userId}/notification-settings`);
|
|
1213
1211
|
if (!res.ok) {
|
|
1214
1212
|
const text = await res.text();
|
|
1215
1213
|
throw new LiveblocksError(res.status, text);
|
|
@@ -1217,14 +1215,14 @@ var Liveblocks = class {
|
|
|
1217
1215
|
return await res.json();
|
|
1218
1216
|
}
|
|
1219
1217
|
/**
|
|
1220
|
-
* Update the user's
|
|
1221
|
-
* @param params.userId The user ID to update the
|
|
1222
|
-
* @param params.data The new
|
|
1218
|
+
* Update the user's notification settings.
|
|
1219
|
+
* @param params.userId The user ID to update the notification settings for.
|
|
1220
|
+
* @param params.data The new notification settings for the user.
|
|
1223
1221
|
*/
|
|
1224
|
-
async
|
|
1222
|
+
async updateNotificationSettings(params) {
|
|
1225
1223
|
const { userId, data } = params;
|
|
1226
1224
|
const res = await this.#post(
|
|
1227
|
-
_core.url`/v2/users/${userId}/
|
|
1225
|
+
_core.url`/v2/users/${userId}/notification-settings`,
|
|
1228
1226
|
data
|
|
1229
1227
|
);
|
|
1230
1228
|
if (!res.ok) {
|
|
@@ -1234,13 +1232,13 @@ var Liveblocks = class {
|
|
|
1234
1232
|
return await res.json();
|
|
1235
1233
|
}
|
|
1236
1234
|
/**
|
|
1237
|
-
* Delete the user's
|
|
1238
|
-
* @param params.userId The user ID to update the
|
|
1235
|
+
* Delete the user's notification settings
|
|
1236
|
+
* @param params.userId The user ID to update the notification settings for.
|
|
1239
1237
|
*/
|
|
1240
|
-
async
|
|
1238
|
+
async deleteNotificationSettings(params) {
|
|
1241
1239
|
const { userId } = params;
|
|
1242
1240
|
const res = await this.#delete(
|
|
1243
|
-
_core.url`/v2/users/${userId}/
|
|
1241
|
+
_core.url`/v2/users/${userId}/notification-settings`
|
|
1244
1242
|
);
|
|
1245
1243
|
if (!res.ok) {
|
|
1246
1244
|
const text = await res.text();
|
|
@@ -1418,5 +1416,5 @@ _core.detectDupes.call(void 0, PKG_NAME, PKG_VERSION, PKG_FORMAT);
|
|
|
1418
1416
|
|
|
1419
1417
|
|
|
1420
1418
|
|
|
1421
|
-
exports.Liveblocks = Liveblocks; exports.LiveblocksError = LiveblocksError; exports.WebhookHandler = WebhookHandler; exports.getMentionedIdsFromCommentBody = _core.getMentionedIdsFromCommentBody; exports.
|
|
1419
|
+
exports.Liveblocks = Liveblocks; exports.LiveblocksError = LiveblocksError; exports.WebhookHandler = WebhookHandler; exports.getMentionedIdsFromCommentBody = _core.getMentionedIdsFromCommentBody; exports.isCustomNotificationEvent = isCustomNotificationEvent; exports.isNotificationChannelEnabled = _core.isNotificationChannelEnabled; exports.isTextMentionNotificationEvent = isTextMentionNotificationEvent; exports.isThreadNotificationEvent = isThreadNotificationEvent; exports.stringifyCommentBody = _core.stringifyCommentBody;
|
|
1422
1420
|
//# sourceMappingURL=index.js.map
|