@droppii-org/wasm-client-sdk 0.1.4 → 0.2.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.
package/lib/index.es.js CHANGED
@@ -1119,6 +1119,11 @@ var GroupStatus;
1119
1119
  GroupStatus[GroupStatus["Dismissed"] = 2] = "Dismissed";
1120
1120
  GroupStatus[GroupStatus["Muted"] = 3] = "Muted";
1121
1121
  })(GroupStatus || (GroupStatus = {}));
1122
+ var GroupVisibility;
1123
+ (function (GroupVisibility) {
1124
+ GroupVisibility[GroupVisibility["Private"] = 0] = "Private";
1125
+ GroupVisibility[GroupVisibility["Public"] = 1] = "Public";
1126
+ })(GroupVisibility || (GroupVisibility = {}));
1122
1127
  var GroupAtType;
1123
1128
  (function (GroupAtType) {
1124
1129
  GroupAtType[GroupAtType["AtNormal"] = 0] = "AtNormal";
@@ -1449,8 +1454,8 @@ class SDK extends Emitter {
1449
1454
  operationID,
1450
1455
  ]);
1451
1456
  };
1452
- this.getSelfUserInfo = (operationID = v4()) => {
1453
- return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
1457
+ this.getSelfUserInfo = (groupID = '', operationID = v4()) => {
1458
+ return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID, groupID]);
1454
1459
  };
1455
1460
  this.getUsersInfo = (data, operationID = v4()) => {
1456
1461
  return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
@@ -2174,4 +2179,4 @@ var indexeddbMainThreadWorkerB24e7a21 = /*#__PURE__*/Object.freeze({
2174
2179
  'default': WorkerFactory
2175
2180
  });
2176
2181
 
2177
- export { AllowType, ApplicationHandleResult, CbEvents, GroupAtType, GroupJoinSource, GroupMemberFilter, GroupMemberRole, GroupMessageReaderFilter, GroupStatus, GroupType, GroupVerificationType, LogLevel, LoginStatus, MessageReceiveOptType, MessageStatus, MessageType, OnlineState, Platform, Relationship, SessionType, ViewType, getSDK };
2182
+ export { AllowType, ApplicationHandleResult, CbEvents, GroupAtType, GroupJoinSource, GroupMemberFilter, GroupMemberRole, GroupMessageReaderFilter, GroupStatus, GroupType, GroupVerificationType, GroupVisibility, LogLevel, LoginStatus, MessageReceiveOptType, MessageStatus, MessageType, OnlineState, Platform, Relationship, SessionType, ViewType, getSDK };
package/lib/index.js CHANGED
@@ -1123,6 +1123,11 @@ exports.GroupStatus = void 0;
1123
1123
  GroupStatus[GroupStatus["Dismissed"] = 2] = "Dismissed";
1124
1124
  GroupStatus[GroupStatus["Muted"] = 3] = "Muted";
1125
1125
  })(exports.GroupStatus || (exports.GroupStatus = {}));
1126
+ exports.GroupVisibility = void 0;
1127
+ (function (GroupVisibility) {
1128
+ GroupVisibility[GroupVisibility["Private"] = 0] = "Private";
1129
+ GroupVisibility[GroupVisibility["Public"] = 1] = "Public";
1130
+ })(exports.GroupVisibility || (exports.GroupVisibility = {}));
1126
1131
  exports.GroupAtType = void 0;
1127
1132
  (function (GroupAtType) {
1128
1133
  GroupAtType[GroupAtType["AtNormal"] = 0] = "AtNormal";
@@ -1453,8 +1458,8 @@ class SDK extends Emitter {
1453
1458
  operationID,
1454
1459
  ]);
1455
1460
  };
1456
- this.getSelfUserInfo = (operationID = v4()) => {
1457
- return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
1461
+ this.getSelfUserInfo = (groupID = '', operationID = v4()) => {
1462
+ return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID, groupID]);
1458
1463
  };
1459
1464
  this.getUsersInfo = (data, operationID = v4()) => {
1460
1465
  return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
package/lib/index.umd.js CHANGED
@@ -1125,6 +1125,11 @@
1125
1125
  GroupStatus[GroupStatus["Dismissed"] = 2] = "Dismissed";
1126
1126
  GroupStatus[GroupStatus["Muted"] = 3] = "Muted";
1127
1127
  })(exports.GroupStatus || (exports.GroupStatus = {}));
1128
+ exports.GroupVisibility = void 0;
1129
+ (function (GroupVisibility) {
1130
+ GroupVisibility[GroupVisibility["Private"] = 0] = "Private";
1131
+ GroupVisibility[GroupVisibility["Public"] = 1] = "Public";
1132
+ })(exports.GroupVisibility || (exports.GroupVisibility = {}));
1128
1133
  exports.GroupAtType = void 0;
1129
1134
  (function (GroupAtType) {
1130
1135
  GroupAtType[GroupAtType["AtNormal"] = 0] = "AtNormal";
@@ -1455,8 +1460,8 @@
1455
1460
  operationID,
1456
1461
  ]);
1457
1462
  };
1458
- this.getSelfUserInfo = (operationID = v4()) => {
1459
- return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID]);
1463
+ this.getSelfUserInfo = (groupID = '', operationID = v4()) => {
1464
+ return this._invoker('getSelfUserInfo', window.getSelfUserInfo, [operationID, groupID]);
1460
1465
  };
1461
1466
  this.getUsersInfo = (data, operationID = v4()) => {
1462
1467
  return this._invoker('getUsersInfo', window.getUsersInfo, [operationID, JSON.stringify(data)]);
@@ -53,7 +53,7 @@ declare class SDK extends Emitter {
53
53
  setAppBackgroundStatus: <T>(data: boolean, operationID?: string) => Promise<WsResponse<T>>;
54
54
  networkStatusChanged: <T>(operationID?: string) => Promise<WsResponse<T>>;
55
55
  getLoginUserID: (operationID?: string) => Promise<WsResponse<string>>;
56
- getSelfUserInfo: (operationID?: string) => Promise<WsResponse<SelfUserInfo>>;
56
+ getSelfUserInfo: (groupID?: string, operationID?: string) => Promise<WsResponse<SelfUserInfo>>;
57
57
  getUsersInfo: (data: string[], operationID?: string) => Promise<WsResponse<PublicUserItem[]>>;
58
58
  SetSelfInfoEx: <T>(data: PartialUserItem, operationID?: string) => Promise<WsResponse<T>>;
59
59
  setSelfInfo: <T>(data: PartialUserItem, operationID?: string) => Promise<WsResponse<T>>;
@@ -1,5 +1,5 @@
1
1
  import { CbEvents } from '../constant';
2
- import { GroupType, SessionType, MessageType, Platform, MessageStatus, GroupStatus, GroupVerificationType, AllowType, GroupJoinSource, GroupMemberRole, MessageReceiveOptType, GroupAtType, LogLevel, ApplicationHandleResult, Relationship, OnlineState } from './enum';
2
+ import { GroupType, SessionType, MessageType, Platform, MessageStatus, GroupStatus, GroupVisibility, GroupVerificationType, AllowType, GroupJoinSource, GroupMemberRole, MessageReceiveOptType, GroupAtType, LogLevel, ApplicationHandleResult, Relationship, OnlineState } from './enum';
3
3
  export declare type WSEvent<T = unknown> = {
4
4
  event: CbEvents;
5
5
  data: T;
@@ -95,6 +95,7 @@ export declare type SelfUserInfo = {
95
95
  nickname: string;
96
96
  userID: string;
97
97
  globalRecvMsgOpt: MessageReceiveOptType;
98
+ permissions?: string[];
98
99
  };
99
100
  export declare type PartialUserInfo = {
100
101
  userID: string;
@@ -148,6 +149,7 @@ export declare type GroupItem = {
148
149
  applyMemberFriend: AllowType;
149
150
  lookMemberInfo: AllowType;
150
151
  displayIsRead: boolean;
152
+ visibility?: GroupVisibility;
151
153
  };
152
154
  export declare type GroupMemberItem = {
153
155
  groupID: string;
@@ -161,6 +163,7 @@ export declare type GroupMemberItem = {
161
163
  inviterUserID: string;
162
164
  operatorUserID: string;
163
165
  ex: string;
166
+ permissions?: string[];
164
167
  };
165
168
  export declare type ConversationItem = {
166
169
  conversationID: string;
@@ -103,6 +103,10 @@ export declare enum GroupStatus {
103
103
  Dismissed = 2,
104
104
  Muted = 3
105
105
  }
106
+ export declare enum GroupVisibility {
107
+ Private = 0,
108
+ Public = 1
109
+ }
106
110
  export declare enum GroupAtType {
107
111
  AtNormal = 0,
108
112
  AtMe = 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@droppii-org/wasm-client-sdk",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "open im sdk for web",
5
5
  "source": "src/index.ts",
6
6
  "main": "lib/index.js",