sim-sdk-web 1.0.15 → 1.0.16

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.
@@ -26,11 +26,6 @@ export declare enum GroupVerificationType {
26
26
  AllNeed = 1,
27
27
  AllNot = 2
28
28
  }
29
- export declare enum MessageStatus {
30
- Sending = 1,
31
- Succeed = 2,
32
- Failed = 3
33
- }
34
29
  export declare enum Platform {
35
30
  iOS = 1,
36
31
  Android = 2,
@@ -131,3 +126,32 @@ export declare enum GroupMessageReaderFilter {
131
126
  Readed = 0,
132
127
  UnRead = 1
133
128
  }
129
+ export declare const GROUP_TYPE: {
130
+ ONE_ON_ONE: number;
131
+ GROUP_CHAT: number;
132
+ CUSTOMER_SERVICE: number;
133
+ };
134
+ export declare enum MSG_TYPE {
135
+ TEXT = 0,
136
+ IMAGE = 1,
137
+ FILE = 2,
138
+ VIDEO = 3,
139
+ LINK = 4,
140
+ GIF = 5
141
+ }
142
+ export declare enum SSE_RESPONSE_TYPE {
143
+ EVENT_PONG_CONN = 0,
144
+ EVENT_PONG_RE_CONN = 1,
145
+ EVENT_PONG_IDLE = 2,
146
+ EVENT_MESSAGE_PUSH = 3
147
+ }
148
+ export declare enum MessageSendStatus {
149
+ Sending = 1,
150
+ Succeed = 2,
151
+ Failed = 3
152
+ }
153
+ export declare const MessageStatus: {
154
+ NORMAL: number;
155
+ EDITED: number;
156
+ DELETED: number;
157
+ };
@@ -1,11 +1,10 @@
1
1
  import { CbEvents } from '../constant/callback';
2
- import type { SseResponse } from '../types/entity';
3
- type Cbfn = (data: SseResponse) => void;
2
+ type Cbfn<T> = (data: T) => void;
4
3
  declare class Emitter {
5
4
  private events;
6
5
  constructor();
7
- emit(event: CbEvents, data: SseResponse): this;
8
- on(event: CbEvents, fn: Cbfn): this;
9
- off(event: CbEvents, fn: Cbfn): this | undefined;
6
+ emit<T>(event: CbEvents, data?: T): this;
7
+ on<T>(event: CbEvents, fn: Cbfn<T>): this;
8
+ off<T>(event: CbEvents, fn: Cbfn<T>): this;
10
9
  }
11
10
  export default Emitter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-sdk-web",
3
- "version": "v1.0.15",
3
+ "version": "v1.0.16",
4
4
  "description": "Sim SDK for Web",
5
5
  "source": "src/index.ts",
6
6
  "main": "lib/index.js",