juggleim-rnsdk 0.1.5 → 0.1.8
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/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +12 -1
- package/android/build/.transforms/42b8ab7e96b9440b0e91d2ecba5f579c/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$10.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$11.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$12.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$13.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$14.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$15.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$16.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$17.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$18.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$19.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$20.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$21.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$22.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$6.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$7.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$8.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$9.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMPackage.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/call/JuggleIMCallModule$1.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/call/JuggleIMCallModule$2.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/call/JuggleIMCallModule$3.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/call/JuggleIMCallModule.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/call/view/RCTZegoSurfaceViewManager.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/call/view/ZegoSurfaceView.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$10.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$11.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$12.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$13.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$14.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$15.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$16.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$17.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$18.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$19.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$20.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$21.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$22.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$7.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$8.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$9.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMPackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/call/JuggleIMCallModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/call/JuggleIMCallModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/call/JuggleIMCallModule$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/call/JuggleIMCallModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/call/view/RCTZegoSurfaceViewManager.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/call/view/ZegoSurfaceView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$10.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$11.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$12.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$13.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$14.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$15.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$16.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$17.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$18.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$19.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$20.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$21.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$22.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$6.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$7.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$8.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$9.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/call/JuggleIMCallModule$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/call/JuggleIMCallModule$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/call/JuggleIMCallModule$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/call/JuggleIMCallModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/call/view/RCTZegoSurfaceViewManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/call/view/ZegoSurfaceView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$1.class.uniqueId24 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$10.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$11.class.uniqueId14 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$12.class.uniqueId22 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$13.class.uniqueId7 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$14.class.uniqueId15 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$15.class.uniqueId6 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$16.class.uniqueId11 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$17.class.uniqueId23 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$18.class.uniqueId8 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$19.class.uniqueId20 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$2.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$20.class.uniqueId5 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$21.class.uniqueId13 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$22.class.uniqueId18 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$23.class.uniqueId10 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$3.class.uniqueId17 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$4.class.uniqueId21 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$5.class.uniqueId9 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$6.class.uniqueId12 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$7.class.uniqueId4 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$8.class.uniqueId16 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$9.class.uniqueId19 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMPackage.class.uniqueId2 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +2 -0
- package/android/src/main/java/com/juggleim/JuggleIMManager.java +24 -3
- package/android/src/main/java/com/juggleim/JuggleIMPackage.java +4 -1
- package/android/src/main/java/com/juggleim/call/JuggleIMCallModule.java +507 -0
- package/android/src/main/java/com/juggleim/call/view/RCTZegoSurfaceViewManager.java +32 -0
- package/android/src/main/java/com/juggleim/call/view/ZegoSurfaceView.java +43 -0
- package/ios/JModelFactory.m +12 -3
- package/ios/JuggleIMManager.m +8 -9
- package/ios/call/JuggleIMCallModule.h +10 -0
- package/ios/call/JuggleIMCallModule.m +520 -0
- package/ios/call/README.md +51 -0
- package/ios/call/view/ZegoSurfaceView.h +7 -0
- package/ios/call/view/ZegoSurfaceView.m +45 -0
- package/ios/call/view/ZegoSurfaceViewManager.h +5 -0
- package/ios/call/view/ZegoSurfaceViewManager.m +12 -0
- package/juggleim-rnsdk.podspec +3 -1
- package/package.json +1 -1
- package/src/call/CallConst.ts +43 -0
- package/src/call/CallInfo.ts +13 -0
- package/src/call/CallMember.ts +12 -0
- package/src/call/CallSession.ts +186 -0
- package/src/call/JuggleIMCall.ts +79 -0
- package/src/call/ZegoSurfaceView.tsx +24 -0
- package/src/call/index.ts +8 -0
- package/src/index.d.ts +422 -864
- package/src/index.js +1 -0
- package/src/types.d.ts +453 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GenericCustomMessage.class.uniqueId0 +0 -0
package/src/index.js
CHANGED
package/src/types.d.ts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* 连接状态类型
|
|
4
|
+
*/
|
|
5
|
+
export type ConnectionStatus =
|
|
6
|
+
| "connected"
|
|
7
|
+
| "connecting"
|
|
8
|
+
| "disconnected"
|
|
9
|
+
| "failure"
|
|
10
|
+
| "dbOpen"
|
|
11
|
+
| "dbClose";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 会话类型
|
|
15
|
+
*/
|
|
16
|
+
export enum ConversationType {
|
|
17
|
+
PRIVATE = 1,
|
|
18
|
+
GROUP = 2,
|
|
19
|
+
CHATROOM = 3,
|
|
20
|
+
SYSTEM = 4,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 会话对象
|
|
25
|
+
* @property {number} conversationType - 会话类型 @ConversationType
|
|
26
|
+
* @property {string} conversationId - 会话ID
|
|
27
|
+
*/
|
|
28
|
+
export interface Conversation {
|
|
29
|
+
conversationType: number;
|
|
30
|
+
conversationId: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 消息内容基类
|
|
35
|
+
* @property {string} contentType - 消息内容类型
|
|
36
|
+
* 枚举:jg:text, jg:img, jg:file, jg:voice
|
|
37
|
+
*/
|
|
38
|
+
export abstract class MessageContent {
|
|
39
|
+
contentType: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 自定义消息内容
|
|
44
|
+
*/
|
|
45
|
+
export class CustomMessageContent extends MessageContent {
|
|
46
|
+
constructor(contentType: string);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 自定义消息类构造函数类型
|
|
51
|
+
*/
|
|
52
|
+
export type CustomMessageConstructor = new () => MessageContent;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 文本消息内容
|
|
56
|
+
*/
|
|
57
|
+
export class TextMessageContent extends MessageContent {
|
|
58
|
+
contentType: string;
|
|
59
|
+
content: string;
|
|
60
|
+
constructor(content: string);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 撤回消息内容: 'jg:recallinfo';
|
|
65
|
+
*/
|
|
66
|
+
export class RecallInfoMessageContent extends MessageContent {
|
|
67
|
+
contentType: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 合并消息内容
|
|
72
|
+
*/
|
|
73
|
+
export class MergeMessageContent extends MessageContent {
|
|
74
|
+
contentType: string;
|
|
75
|
+
|
|
76
|
+
constructor(
|
|
77
|
+
title?: string,
|
|
78
|
+
conversation?: Conversation,
|
|
79
|
+
messageIdList?: string[],
|
|
80
|
+
previewList?: MergeMessagePreviewUnit[]
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
title?: string;
|
|
84
|
+
containerMsgId?: string;
|
|
85
|
+
conversation?: Conversation;
|
|
86
|
+
messageIdList?: string[];
|
|
87
|
+
previewList?: MergeMessagePreviewUnit[];
|
|
88
|
+
extra?: string;
|
|
89
|
+
|
|
90
|
+
conversationDigest?(): string;
|
|
91
|
+
getTitle?(): string | undefined;
|
|
92
|
+
getContainerMsgId?(): string | undefined;
|
|
93
|
+
setContainerMsgId?(containerMsgId: string): void;
|
|
94
|
+
getConversation?(): Conversation | undefined;
|
|
95
|
+
setConversation?(conversation: Conversation): void;
|
|
96
|
+
getMessageIdList?(): string[] | undefined;
|
|
97
|
+
getPreviewList?(): MergeMessagePreviewUnit[] | undefined;
|
|
98
|
+
getExtra?(): string | undefined;
|
|
99
|
+
setExtra?(extra: string): void;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 合并消息预览单元
|
|
104
|
+
*/
|
|
105
|
+
export class MergeMessagePreviewUnit {
|
|
106
|
+
constructor(previewContent?: string, sender?: UserInfo);
|
|
107
|
+
|
|
108
|
+
previewContent?: string;
|
|
109
|
+
sender?: UserInfo;
|
|
110
|
+
|
|
111
|
+
getPreviewContent?(): string | undefined;
|
|
112
|
+
setPreviewContent?(previewContent: string): void;
|
|
113
|
+
getSender?(): UserInfo | undefined;
|
|
114
|
+
setSender?(sender: UserInfo): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 图片消息内容
|
|
120
|
+
* @property {string} localPath - 图片本地路径:支持 /
|
|
121
|
+
* @property {string} [thumbnailLocalPath] - 缩略图本地路径:支持 /
|
|
122
|
+
* @property {string} [url] - 图片远程URL
|
|
123
|
+
* @property {string} [thumbnailUrl] - 缩略图远程URL
|
|
124
|
+
* @property {number} width - 图片宽度
|
|
125
|
+
* @property {number} height - 图片高度
|
|
126
|
+
*/
|
|
127
|
+
export class ImageMessageContent extends MessageContent {
|
|
128
|
+
localPath: string;
|
|
129
|
+
thumbnailLocalPath?: string;
|
|
130
|
+
url?: string;
|
|
131
|
+
thumbnailUrl?: string;
|
|
132
|
+
width: number;
|
|
133
|
+
height: number;
|
|
134
|
+
|
|
135
|
+
contentType: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* 文件消息内容
|
|
140
|
+
* @property {string} localPath - 文件本地路径:支持 /
|
|
141
|
+
* @property {string} [url] - 文件远程URL
|
|
142
|
+
* @property {string} name - 文件名称
|
|
143
|
+
* @property {number} size - 文件大小,单位字节
|
|
144
|
+
* @property {string} [type] - 文件类型(MIME类型)
|
|
145
|
+
*/
|
|
146
|
+
export class FileMessageContent extends MessageContent {
|
|
147
|
+
localPath: string;
|
|
148
|
+
url?: string;
|
|
149
|
+
name: string;
|
|
150
|
+
size: number;
|
|
151
|
+
type?: string;
|
|
152
|
+
|
|
153
|
+
contentType: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* 语音消息内容
|
|
158
|
+
* @property {string} localPath - 语音本地路径:支持 /
|
|
159
|
+
* @property {string} [url] - 语音远程URL
|
|
160
|
+
* @property {number} duration - 语音时长,单位秒
|
|
161
|
+
*/
|
|
162
|
+
export class VoiceMessageContent extends MessageContent {
|
|
163
|
+
localPath: string;
|
|
164
|
+
url?: string;
|
|
165
|
+
duration: number;
|
|
166
|
+
|
|
167
|
+
contentType: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* 消息对象
|
|
173
|
+
* @interface Message
|
|
174
|
+
* @property {number} clientMsgNo - 客户端消息序号
|
|
175
|
+
* @property {string} localAttribute - 本地属性
|
|
176
|
+
* @property {number} messageState - 消息状态 : 0未知, 1-发送中, 2-已发送, 3-发送失败, 4-上传中
|
|
177
|
+
* @property {boolean} isEdited - 是否已编辑
|
|
178
|
+
* @property {number} direction - 消息方向: 1-发送, 2-接收
|
|
179
|
+
* @property {boolean} isDelete - 是否已删除
|
|
180
|
+
* @property {string} senderUserId - 发送者用户ID
|
|
181
|
+
* @property {string} messageId - 消息ID
|
|
182
|
+
* @property {boolean} hasRead - 是否已读
|
|
183
|
+
* @property {number} timestamp - 消息时间戳
|
|
184
|
+
* @property {Conversation} conversation - 会话对象
|
|
185
|
+
* @property {MessageContent} content - 消息内容
|
|
186
|
+
* @property {GroupMessageReadInfo} [groupMessageReadInfo] - 群消息阅读信息(可选)
|
|
187
|
+
* @property {MessageMentionInfo} mentionInfo - 消息提及信息
|
|
188
|
+
* @property {Message} [referredMessage] - 引用的消息
|
|
189
|
+
*/
|
|
190
|
+
export interface Message {
|
|
191
|
+
clientMsgNo: number;
|
|
192
|
+
localAttribute: string;
|
|
193
|
+
messageState: number;
|
|
194
|
+
isEdit: boolean;
|
|
195
|
+
direction: number;
|
|
196
|
+
isDelete: boolean;
|
|
197
|
+
senderUserId: string;
|
|
198
|
+
messageId: string;
|
|
199
|
+
hasRead: boolean;
|
|
200
|
+
timestamp: number;
|
|
201
|
+
conversation: Conversation;
|
|
202
|
+
content: MessageContent;
|
|
203
|
+
groupMessageReadInfo?: GroupMessageReadInfo;
|
|
204
|
+
mentionInfo: MessageMentionInfo;
|
|
205
|
+
referredMessage?: Message;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* 消息响应对象
|
|
210
|
+
* @interface MessageResponse
|
|
211
|
+
* @property {Message[]} messages - 消息列表
|
|
212
|
+
* @property {number} timestamp - 时间戳
|
|
213
|
+
* @property {boolean} hasMore - 是否有更多消息
|
|
214
|
+
*/
|
|
215
|
+
export interface MessageResponse {
|
|
216
|
+
messages: Message[];
|
|
217
|
+
timestamp: number;
|
|
218
|
+
hasMore: boolean;
|
|
219
|
+
code: number;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* 用户信息
|
|
224
|
+
*/
|
|
225
|
+
export interface UserInfo {
|
|
226
|
+
userId: string;
|
|
227
|
+
nickname: string;
|
|
228
|
+
avatar: string;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface MessageReactionItem {
|
|
232
|
+
reactionId: string;
|
|
233
|
+
userInfoList: UserInfo[];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* 消息回应
|
|
238
|
+
*/
|
|
239
|
+
export interface MessageReaction {
|
|
240
|
+
messageId: string;
|
|
241
|
+
reactionType: string;
|
|
242
|
+
userId: string;
|
|
243
|
+
timestamp: number;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* 群消息阅读信息
|
|
248
|
+
*/
|
|
249
|
+
export interface GroupMessageReadInfo {
|
|
250
|
+
readCount: number;
|
|
251
|
+
memberCount: number;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* 会话信息
|
|
256
|
+
*/
|
|
257
|
+
export interface ConversationMentionInfo {
|
|
258
|
+
mentionMsgList: MentionMsg[];
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface MessageMentionInfo {
|
|
262
|
+
/**
|
|
263
|
+
* DEFAULT(0),
|
|
264
|
+
* ALL(1),
|
|
265
|
+
* SOMEONE(2),
|
|
266
|
+
* ALL_AND_SOMEONE(3);
|
|
267
|
+
*/
|
|
268
|
+
type: number;
|
|
269
|
+
targetUsers: UserInfo[];
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* 推送数据
|
|
274
|
+
*/
|
|
275
|
+
export interface PushData {
|
|
276
|
+
content: string;
|
|
277
|
+
extra: string;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export interface MentionMsg {
|
|
281
|
+
senderId: string;
|
|
282
|
+
msgId: string;
|
|
283
|
+
msgTime: number;
|
|
284
|
+
/**
|
|
285
|
+
* DEFAULT(0),
|
|
286
|
+
* ALL(1),
|
|
287
|
+
* SOMEONE(2),
|
|
288
|
+
* ALL_AND_SOMEONE(3);
|
|
289
|
+
*/
|
|
290
|
+
type: number;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export interface ConversationInfo {
|
|
294
|
+
conversation: Conversation;
|
|
295
|
+
unreadCount: number;
|
|
296
|
+
isTop: boolean;
|
|
297
|
+
isMute: boolean;
|
|
298
|
+
lastMessage?: Message;
|
|
299
|
+
topTime: number;
|
|
300
|
+
sortTime: number;
|
|
301
|
+
hasUnread: boolean;
|
|
302
|
+
draft: string;
|
|
303
|
+
mentionInfo?: ConversationMentionInfo;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* 分页获取会话选项
|
|
308
|
+
* @property {number} count - 获取数量
|
|
309
|
+
* @property {number} timestamp - 上一页最后一条数据的时间戳
|
|
310
|
+
* @property {number} direction - 拉取方向: 0-更新的消息, 1-更早的消息
|
|
311
|
+
*/
|
|
312
|
+
export interface GetConversationOptions {
|
|
313
|
+
count: number;
|
|
314
|
+
timestamp: number;
|
|
315
|
+
direction: number; //0-new, 1-old
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* 简单回调接口
|
|
320
|
+
*/
|
|
321
|
+
export interface SimpleCallback {
|
|
322
|
+
onSuccess: () => void;
|
|
323
|
+
onError: (errorCode: number) => void;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 创建会话回调接口
|
|
328
|
+
*/
|
|
329
|
+
export interface CreateConversationCallback {
|
|
330
|
+
onSuccess: (conversationInfo: ConversationInfo) => void;
|
|
331
|
+
onError: (errorCode: number) => void;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* 会话标签选项
|
|
336
|
+
*/
|
|
337
|
+
export interface ConversationTagOptions {
|
|
338
|
+
tagId: string;
|
|
339
|
+
conversations: Conversation[];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface SendMessageResult {
|
|
343
|
+
messageId: string;
|
|
344
|
+
sentTime: number;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export interface SendMessageCallback {
|
|
348
|
+
onSuccess?: (message: Message) => void;
|
|
349
|
+
onError?: (message: Message, errorCode: number) => void;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface UpdateMessageCallback {
|
|
353
|
+
onSuccess?: (message: Message) => void;
|
|
354
|
+
onError?: (errorCode: number) => void;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// 获取消息相关接口
|
|
358
|
+
export interface GetMessageOptions {
|
|
359
|
+
count?: number;
|
|
360
|
+
startTime?: number;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// 发送消息实体对象
|
|
364
|
+
export interface SendMessageObject {
|
|
365
|
+
conversationType: number;
|
|
366
|
+
conversationId: string;
|
|
367
|
+
content: MessageContent;
|
|
368
|
+
mentionInfo?: MessageMentionInfo;
|
|
369
|
+
pushData?: PushData;
|
|
370
|
+
// 引用消息ID
|
|
371
|
+
referredMessageId?: string;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* 连接状态监听器回调函数
|
|
375
|
+
*/
|
|
376
|
+
export type ConnectionStatusListener = (
|
|
377
|
+
status: ConnectionStatus,
|
|
378
|
+
code: number,
|
|
379
|
+
extra: string
|
|
380
|
+
) => void;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* 消息监听器回调函数
|
|
384
|
+
*/
|
|
385
|
+
export interface MessageListener {
|
|
386
|
+
onMessageReceive?: (message: Message) => void;
|
|
387
|
+
onMessageRecall?: (message: Message) => void;
|
|
388
|
+
onMessageUpdate?: (message: Message) => void;
|
|
389
|
+
onMessageDelete?: (
|
|
390
|
+
conversation: Conversation,
|
|
391
|
+
clientMsgNos: number[]
|
|
392
|
+
) => void;
|
|
393
|
+
onMessageClear?: (
|
|
394
|
+
conversation: Conversation,
|
|
395
|
+
timestamp: number,
|
|
396
|
+
senderId: string
|
|
397
|
+
) => void;
|
|
398
|
+
onMessageReactionAdd?: (
|
|
399
|
+
conversation: Conversation,
|
|
400
|
+
reaction: MessageReaction
|
|
401
|
+
) => void;
|
|
402
|
+
onMessageReactionRemove?: (
|
|
403
|
+
conversation: Conversation,
|
|
404
|
+
reaction: MessageReaction
|
|
405
|
+
) => void;
|
|
406
|
+
onMessageSetTop?: (
|
|
407
|
+
message: Message,
|
|
408
|
+
operator: UserInfo,
|
|
409
|
+
isTop: boolean
|
|
410
|
+
) => void;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* 消息阅读状态监听器回调函数
|
|
415
|
+
*/
|
|
416
|
+
export interface MessageReadReceiptListener {
|
|
417
|
+
onMessagesRead?: (conversation: Conversation, messageIds: string[]) => void;
|
|
418
|
+
onGroupMessagesRead?: (
|
|
419
|
+
conversation: Conversation,
|
|
420
|
+
messages: { [messageId: string]: GroupMessageReadInfo }
|
|
421
|
+
) => void;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* 消息销毁监听器回调函数
|
|
426
|
+
*/
|
|
427
|
+
export interface MessageDestroyListener {
|
|
428
|
+
onMessageDestroyTimeUpdate?: (
|
|
429
|
+
messageId: string,
|
|
430
|
+
conversation: Conversation,
|
|
431
|
+
destroyTime: number
|
|
432
|
+
) => void;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* 会话监听器回调函数
|
|
437
|
+
*/
|
|
438
|
+
export interface ConversationListener {
|
|
439
|
+
onConversationInfoAdd?: (conversations: ConversationInfo[]) => void;
|
|
440
|
+
onConversationInfoUpdate?: (conversations: ConversationInfo[]) => void;
|
|
441
|
+
onConversationInfoDelete?: (conversations: ConversationInfo[]) => void;
|
|
442
|
+
onTotalUnreadMessageCountUpdate?: (count: number) => void;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* 发送媒体消息回调接口
|
|
447
|
+
*/
|
|
448
|
+
export interface SendMediaMessageCallback {
|
|
449
|
+
onProgress?: (progress: number, message: Message) => void;
|
|
450
|
+
onSuccess?: (message: Message) => void;
|
|
451
|
+
onError?: (message: Message, errorCode: number) => void;
|
|
452
|
+
onCancel?: (message: Message) => void;
|
|
453
|
+
}
|