@pmate/chat-sdk 0.8.0-meeting-review.1 → 0.8.0

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.
@@ -87,6 +87,14 @@ export declare class ChatClient {
87
87
  members: string[];
88
88
  title?: string;
89
89
  }): Promise<ChatRuntimeMessage>;
90
+ updateGroup(input: {
91
+ groupId: string;
92
+ expectedRevision: string;
93
+ addMembers?: string[];
94
+ removeMembers?: string[];
95
+ title?: string;
96
+ avatar?: string;
97
+ }): Promise<ChatRuntimeMessage>;
90
98
  sendGroup(input: {
91
99
  groupId: string;
92
100
  text: string;
@@ -217,6 +217,13 @@ export class ChatClient {
217
217
  },
218
218
  }, input.members);
219
219
  }
220
+ async updateGroup(input) {
221
+ return this.sendChat(input.groupId, {
222
+ kind: "group", threadKind: "group", action: "groupUpdate",
223
+ payload: { appId: this.options.appId, groupId: input.groupId, expectedRevision: input.expectedRevision,
224
+ addMembers: input.addMembers ?? [], removeMembers: input.removeMembers ?? [], ...(input.title !== undefined ? { title: input.title } : {}), ...(input.avatar !== undefined ? { avatar: input.avatar } : {}) },
225
+ });
226
+ }
220
227
  async sendGroup(input) {
221
228
  return this.sendChat(input.groupId, {
222
229
  kind: "message",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/chat-sdk",
3
- "version": "0.8.0-meeting-review.1",
3
+ "version": "0.8.0",
4
4
  "description": "Cross-platform PMate chat input components, voice input primitives, and ASR helpers",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",