stream-chat 9.26.1 → 9.27.1
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/cjs/index.browser.js +28 -1
- package/dist/cjs/index.browser.js.map +2 -2
- package/dist/cjs/index.node.js +28 -1
- package/dist/cjs/index.node.js.map +2 -2
- package/dist/esm/index.mjs +28 -1
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/client.d.ts +13 -0
- package/dist/types/types.d.ts +1 -1
- package/package.json +2 -2
- package/src/client.ts +35 -0
- package/src/types.ts +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -14321,6 +14321,33 @@ var StreamChat = class _StreamChat {
|
|
|
14321
14321
|
}
|
|
14322
14322
|
);
|
|
14323
14323
|
}
|
|
14324
|
+
/**
|
|
14325
|
+
* Updates message fields without storing them in the database, only sends update event.
|
|
14326
|
+
*
|
|
14327
|
+
* Available only on the server-side.
|
|
14328
|
+
*
|
|
14329
|
+
* @param messageId the message id to update.
|
|
14330
|
+
* @param partialMessageObject the message payload.
|
|
14331
|
+
* @param partialUserOrUserId the user id linked to this action.
|
|
14332
|
+
* @param options additional options.
|
|
14333
|
+
*/
|
|
14334
|
+
async ephemeralUpdateMessage(messageId, partialMessageObject, partialUserOrUserId, options) {
|
|
14335
|
+
if (!messageId) throw Error("messageId is required");
|
|
14336
|
+
let user = void 0;
|
|
14337
|
+
if (typeof partialUserOrUserId === "string") {
|
|
14338
|
+
user = { id: partialUserOrUserId };
|
|
14339
|
+
} else if (typeof partialUserOrUserId?.id === "string") {
|
|
14340
|
+
user = { id: partialUserOrUserId.id };
|
|
14341
|
+
}
|
|
14342
|
+
return await this.patch(
|
|
14343
|
+
`${this.baseURL}/messages/${encodeURIComponent(messageId)}/ephemeral`,
|
|
14344
|
+
{
|
|
14345
|
+
...partialMessageObject,
|
|
14346
|
+
...options,
|
|
14347
|
+
user
|
|
14348
|
+
}
|
|
14349
|
+
);
|
|
14350
|
+
}
|
|
14324
14351
|
/**
|
|
14325
14352
|
* deleteMessage - Delete a message
|
|
14326
14353
|
*
|
|
@@ -14520,7 +14547,7 @@ var StreamChat = class _StreamChat {
|
|
|
14520
14547
|
if (this.userAgent) {
|
|
14521
14548
|
return this.userAgent;
|
|
14522
14549
|
}
|
|
14523
|
-
const version = "9.
|
|
14550
|
+
const version = "9.27.1";
|
|
14524
14551
|
const clientBundle = "browser-esm";
|
|
14525
14552
|
let userAgentString = "";
|
|
14526
14553
|
if (this.sdkIdentifier) {
|