@liveblocks/core 1.9.0-example1 → 1.19.0-test1
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 +10 -22
- package/dist/index.d.ts +10 -22
- package/dist/index.js +60 -52
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
|
|
7
7
|
// src/version.ts
|
|
8
8
|
var PKG_NAME = "@liveblocks/core";
|
|
9
|
-
var PKG_VERSION = "1.
|
|
9
|
+
var PKG_VERSION = "1.19.0-test1";
|
|
10
10
|
var PKG_FORMAT = "esm";
|
|
11
11
|
|
|
12
12
|
// src/dupe-detection.ts
|
|
@@ -2145,8 +2145,8 @@ function createCommentsApi(roomId, getAuthValue, config) {
|
|
|
2145
2145
|
const url = new URL(
|
|
2146
2146
|
`/v2/c/rooms/${encodeURIComponent(roomId2)}${endpoint}`,
|
|
2147
2147
|
config.baseUrl
|
|
2148
|
-
)
|
|
2149
|
-
return await fetch(url, {
|
|
2148
|
+
);
|
|
2149
|
+
return await fetch(url.toString(), {
|
|
2150
2150
|
...options,
|
|
2151
2151
|
headers: {
|
|
2152
2152
|
...options?.headers,
|
|
@@ -2154,8 +2154,16 @@ function createCommentsApi(roomId, getAuthValue, config) {
|
|
|
2154
2154
|
}
|
|
2155
2155
|
});
|
|
2156
2156
|
}
|
|
2157
|
-
async function getThreads() {
|
|
2158
|
-
const response = await fetchApi(roomId, "/threads"
|
|
2157
|
+
async function getThreads(options) {
|
|
2158
|
+
const response = await fetchApi(roomId, "/threads/search", {
|
|
2159
|
+
body: JSON.stringify({
|
|
2160
|
+
...options?.query?.metadata && { metadata: options.query.metadata }
|
|
2161
|
+
}),
|
|
2162
|
+
headers: {
|
|
2163
|
+
"Content-Type": "application/json"
|
|
2164
|
+
},
|
|
2165
|
+
method: "POST"
|
|
2166
|
+
});
|
|
2159
2167
|
if (response.ok) {
|
|
2160
2168
|
const json = await response.json();
|
|
2161
2169
|
return json.data.map((thread) => convertToThreadData(thread));
|