sim-sdk-web 1.0.4 → 1.0.6

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.
@@ -9,19 +9,20 @@ import { ConversationApi } from './conversation';
9
9
  import Emitter from '../utils/emitter';
10
10
  import { HttpMethod } from '../utils/request';
11
11
  declare class SIMSDK extends Emitter implements UserApi, FriendApi, GroupApi, MessageApi, ConversationApi {
12
- private userId?;
12
+ private username?;
13
13
  private token?;
14
14
  private appKey?;
15
15
  private apiAddr?;
16
16
  private sseManager?;
17
- private requestMap;
18
- constructor();
17
+ private debug;
18
+ constructor(debug?: boolean);
19
19
  private sendRequest;
20
20
  private defaultDataFormatter;
21
21
  createRequestFunction: <T extends Record<string, any> | undefined, R = unknown>(reqFuncName: RequestApi, method: HttpMethod) => (params: T) => Promise<SseResponse<R>>;
22
22
  createRequestFunctionWithoutParams: <T = unknown>(reqFuncName: RequestApi, method: HttpMethod) => () => Promise<SseResponse<T>>;
23
23
  private handleMessage;
24
24
  private handleReconnectSuccess;
25
+ log(...args: any[]): void;
25
26
  login: (params: LoginParams) => Promise<string>;
26
27
  logout: () => Promise<SseResponse<unknown>>;
27
28
  private internalUploadFile;
@@ -5,8 +5,7 @@ export declare enum ErrorCode {
5
5
  LoginRepeatError = 10102
6
6
  }
7
7
  export declare enum RequestApi {
8
- InitSDK = "InitSDK",
9
- Login = "Login",
8
+ Login = "/chat/member/login",
10
9
  Logout = "Logout",
11
10
  GetLoginStatus = "GetLoginStatus",
12
11
  GetLoginUserID = "GetLoginUserID",