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/cjs/index.node.js
CHANGED
|
@@ -14487,6 +14487,33 @@ var StreamChat = class _StreamChat {
|
|
|
14487
14487
|
}
|
|
14488
14488
|
);
|
|
14489
14489
|
}
|
|
14490
|
+
/**
|
|
14491
|
+
* Updates message fields without storing them in the database, only sends update event.
|
|
14492
|
+
*
|
|
14493
|
+
* Available only on the server-side.
|
|
14494
|
+
*
|
|
14495
|
+
* @param messageId the message id to update.
|
|
14496
|
+
* @param partialMessageObject the message payload.
|
|
14497
|
+
* @param partialUserOrUserId the user id linked to this action.
|
|
14498
|
+
* @param options additional options.
|
|
14499
|
+
*/
|
|
14500
|
+
async ephemeralUpdateMessage(messageId, partialMessageObject, partialUserOrUserId, options) {
|
|
14501
|
+
if (!messageId) throw Error("messageId is required");
|
|
14502
|
+
let user = void 0;
|
|
14503
|
+
if (typeof partialUserOrUserId === "string") {
|
|
14504
|
+
user = { id: partialUserOrUserId };
|
|
14505
|
+
} else if (typeof partialUserOrUserId?.id === "string") {
|
|
14506
|
+
user = { id: partialUserOrUserId.id };
|
|
14507
|
+
}
|
|
14508
|
+
return await this.patch(
|
|
14509
|
+
`${this.baseURL}/messages/${encodeURIComponent(messageId)}/ephemeral`,
|
|
14510
|
+
{
|
|
14511
|
+
...partialMessageObject,
|
|
14512
|
+
...options,
|
|
14513
|
+
user
|
|
14514
|
+
}
|
|
14515
|
+
);
|
|
14516
|
+
}
|
|
14490
14517
|
/**
|
|
14491
14518
|
* deleteMessage - Delete a message
|
|
14492
14519
|
*
|
|
@@ -14686,7 +14713,7 @@ var StreamChat = class _StreamChat {
|
|
|
14686
14713
|
if (this.userAgent) {
|
|
14687
14714
|
return this.userAgent;
|
|
14688
14715
|
}
|
|
14689
|
-
const version = "9.
|
|
14716
|
+
const version = "9.27.1";
|
|
14690
14717
|
const clientBundle = "node-cjs";
|
|
14691
14718
|
let userAgentString = "";
|
|
14692
14719
|
if (this.sdkIdentifier) {
|