@liveblocks/node 3.21.0-rc1 → 3.22.0-file1
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 +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Permission, Json, DFMD, FeedCreateMetadata, RoomPermissions, RoomAccesses, OptionalTupleUnless, BaseUserMeta, DU, PartialUnless, UpdateRoomAccesses, DE, JsonObject, PlainLsonObject, ToJson, DS, QueryMetadata, DTM, ThreadVisibility, ThreadData, DCM, UserSubscriptionData, CommentData, BaseMetadata, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LiveObject, Awaitable, DFM, Feed, FeedUpdateMetadata, FeedMessage, NotificationChannel } from '@liveblocks/core';
|
|
1
|
+
import { Permission, Json, DFMD, FeedCreateMetadata, RoomPermissions, RoomAccesses, OptionalTupleUnless, BaseUserMeta, DU, PartialUnless, UpdateRoomAccesses, DE, JsonObject, PlainLsonObject, ToJson, DS, QueryMetadata, DTM, ThreadVisibility, ThreadData, DCM, UserSubscriptionData, CommentData, BaseMetadata, CommentBody, Patchable, LiveFileData, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LiveObject, Awaitable, DFM, Feed, FeedUpdateMetadata, FeedMessage, NotificationChannel } from '@liveblocks/core';
|
|
2
2
|
export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveObject, LiveStructure, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, RoomAccesses, RoomPermissions, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
|
|
3
3
|
import { IncomingHttpHeaders } from 'http';
|
|
4
4
|
|
|
@@ -102,6 +102,10 @@ type AttachmentWithUrl = {
|
|
|
102
102
|
url: string;
|
|
103
103
|
expiresAt: string;
|
|
104
104
|
};
|
|
105
|
+
type StorageFileWithUrl = LiveFileData & {
|
|
106
|
+
url: string;
|
|
107
|
+
expiresAt: string;
|
|
108
|
+
};
|
|
105
109
|
type CreateThreadOptions<TM extends BaseMetadata, CM extends BaseMetadata> = {
|
|
106
110
|
roomId: string;
|
|
107
111
|
data: {
|
|
@@ -923,6 +927,10 @@ declare class Liveblocks {
|
|
|
923
927
|
roomId: string;
|
|
924
928
|
attachmentId: string;
|
|
925
929
|
}, options?: RequestOptions): Promise<AttachmentWithUrl>;
|
|
930
|
+
getStorageFile(params: {
|
|
931
|
+
roomId: string;
|
|
932
|
+
fileId: string;
|
|
933
|
+
}, options?: RequestOptions): Promise<StorageFileWithUrl>;
|
|
926
934
|
/**
|
|
927
935
|
* Creates a new thread. The thread will be created with the specified comment as its first comment.
|
|
928
936
|
* If the thread already exists, a `LiveblocksError` will be thrown with status code 409.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Permission, Json, DFMD, FeedCreateMetadata, RoomPermissions, RoomAccesses, OptionalTupleUnless, BaseUserMeta, DU, PartialUnless, UpdateRoomAccesses, DE, JsonObject, PlainLsonObject, ToJson, DS, QueryMetadata, DTM, ThreadVisibility, ThreadData, DCM, UserSubscriptionData, CommentData, BaseMetadata, CommentBody, Patchable, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LiveObject, Awaitable, DFM, Feed, FeedUpdateMetadata, FeedMessage, NotificationChannel } from '@liveblocks/core';
|
|
1
|
+
import { Permission, Json, DFMD, FeedCreateMetadata, RoomPermissions, RoomAccesses, OptionalTupleUnless, BaseUserMeta, DU, PartialUnless, UpdateRoomAccesses, DE, JsonObject, PlainLsonObject, ToJson, DS, QueryMetadata, DTM, ThreadVisibility, ThreadData, DCM, UserSubscriptionData, CommentData, BaseMetadata, CommentBody, Patchable, LiveFileData, SubscriptionData, CommentUserReaction, InboxNotificationData, UserRoomSubscriptionSettings, RoomSubscriptionSettings, KDAD, DAD, NotificationSettings, PartialNotificationSettings, GroupScopes, GroupData, LiveObject, Awaitable, DFM, Feed, FeedUpdateMetadata, FeedMessage, NotificationChannel } from '@liveblocks/core';
|
|
2
2
|
export { CommentBody, CommentBodyBlockElement, CommentBodyElement, CommentBodyInlineElement, CommentBodyLink, CommentBodyLinkElementArgs, CommentBodyMention, CommentBodyMentionElementArgs, CommentBodyParagraph, CommentBodyParagraphElementArgs, CommentBodyText, CommentBodyTextElementArgs, CommentData, CommentUserReaction, IUserInfo, Json, JsonArray, JsonObject, JsonScalar, LiveList, LiveMap, LiveObject, LiveStructure, Lson, LsonObject, PlainLsonObject, ResolveUsersArgs, RoomAccesses, RoomPermissions, StringifyCommentBodyElements, StringifyCommentBodyOptions, ThreadData, User, getMentionsFromCommentBody, isNotificationChannelEnabled, stringifyCommentBody } from '@liveblocks/core';
|
|
3
3
|
import { IncomingHttpHeaders } from 'http';
|
|
4
4
|
|
|
@@ -102,6 +102,10 @@ type AttachmentWithUrl = {
|
|
|
102
102
|
url: string;
|
|
103
103
|
expiresAt: string;
|
|
104
104
|
};
|
|
105
|
+
type StorageFileWithUrl = LiveFileData & {
|
|
106
|
+
url: string;
|
|
107
|
+
expiresAt: string;
|
|
108
|
+
};
|
|
105
109
|
type CreateThreadOptions<TM extends BaseMetadata, CM extends BaseMetadata> = {
|
|
106
110
|
roomId: string;
|
|
107
111
|
data: {
|
|
@@ -923,6 +927,10 @@ declare class Liveblocks {
|
|
|
923
927
|
roomId: string;
|
|
924
928
|
attachmentId: string;
|
|
925
929
|
}, options?: RequestOptions): Promise<AttachmentWithUrl>;
|
|
930
|
+
getStorageFile(params: {
|
|
931
|
+
roomId: string;
|
|
932
|
+
fileId: string;
|
|
933
|
+
}, options?: RequestOptions): Promise<StorageFileWithUrl>;
|
|
926
934
|
/**
|
|
927
935
|
* Creates a new thread. The thread will be created with the specified comment as its first comment.
|
|
928
936
|
* If the thread already exists, a `LiveblocksError` will be thrown with status code 409.
|
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.22.0-file1";
|
|
7
7
|
var PKG_FORMAT = "esm";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
@@ -1176,6 +1176,18 @@ var Liveblocks = class {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
return await res.json();
|
|
1178
1178
|
}
|
|
1179
|
+
async getStorageFile(params, options) {
|
|
1180
|
+
const { roomId, fileId } = params;
|
|
1181
|
+
const res = await this.#get(
|
|
1182
|
+
url2`/v2/rooms/${roomId}/storage-files/${fileId}`,
|
|
1183
|
+
void 0,
|
|
1184
|
+
options
|
|
1185
|
+
);
|
|
1186
|
+
if (!res.ok) {
|
|
1187
|
+
throw await LiveblocksError.from(res);
|
|
1188
|
+
}
|
|
1189
|
+
return await res.json();
|
|
1190
|
+
}
|
|
1179
1191
|
/**
|
|
1180
1192
|
* Creates a new thread. The thread will be created with the specified comment as its first comment.
|
|
1181
1193
|
* If the thread already exists, a `LiveblocksError` will be thrown with status code 409.
|