juggleim-rnsdk 0.1.6 → 0.1.9
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$1.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$2.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$23.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$24.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$3.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$4.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$5.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$1.class +0 -0
- 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$2.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$23.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$24.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$5.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$1.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$2.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$23.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$24.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$5.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.uniqueId25 +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.uniqueId23 +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.uniqueId16 +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.uniqueId24 +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.uniqueId21 +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.uniqueId19 +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$24.class.uniqueId15 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$3.class.uniqueId18 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$4.class.uniqueId22 +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.uniqueId17 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$9.class.uniqueId20 +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 +54 -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 +33 -8
- 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 +2 -0
- 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 +136 -0
- package/src/call/ZegoSurfaceView.tsx +24 -0
- package/src/call/index.ts +8 -0
- package/src/index.d.ts +429 -864
- package/src/index.js +10 -0
- package/src/types.d.ts +453 -0
- package/README.md +0 -552
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/GenericCustomMessage.class.uniqueId0 +0 -0
package/src/index.d.ts
CHANGED
|
@@ -1,895 +1,460 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './call';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ConnectionStatusListener,
|
|
7
|
+
MessageListener,
|
|
8
|
+
MessageReadReceiptListener,
|
|
9
|
+
MessageDestroyListener,
|
|
10
|
+
ConversationListener,
|
|
11
|
+
GetConversationOptions,
|
|
12
|
+
ConversationInfo,
|
|
13
|
+
Conversation,
|
|
14
|
+
SimpleCallback,
|
|
15
|
+
ConversationTagOptions,
|
|
16
|
+
SendMessageObject,
|
|
17
|
+
SendMessageCallback,
|
|
18
|
+
Message,
|
|
19
|
+
MessageContent,
|
|
20
|
+
MergeMessageContent,
|
|
21
|
+
SendMediaMessageCallback,
|
|
22
|
+
VoiceMessageContent,
|
|
23
|
+
CustomMessageConstructor,
|
|
24
|
+
UpdateMessageCallback,
|
|
25
|
+
GetMessageOptions,
|
|
26
|
+
MessageResponse
|
|
27
|
+
} from './types';
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Juggle IM React Native SDK
|
|
31
|
+
*/
|
|
32
|
+
export default class JuggleIM {
|
|
2
33
|
/**
|
|
3
|
-
*
|
|
34
|
+
* 设置服务器地址列表
|
|
35
|
+
* @param urls 服务器地址列表
|
|
4
36
|
*/
|
|
5
|
-
|
|
6
|
-
| "connected"
|
|
7
|
-
| "connecting"
|
|
8
|
-
| "disconnected"
|
|
9
|
-
| "failure"
|
|
10
|
-
| "dbOpen"
|
|
11
|
-
| "dbClose";
|
|
37
|
+
static setServerUrls(urls: string[]): void;
|
|
12
38
|
|
|
13
39
|
/**
|
|
14
|
-
*
|
|
40
|
+
* 初始化SDK
|
|
41
|
+
* @param appKey 应用唯一标识
|
|
15
42
|
*/
|
|
16
|
-
|
|
17
|
-
PRIVATE = 1,
|
|
18
|
-
GROUP = 2,
|
|
19
|
-
CHATROOM = 3,
|
|
20
|
-
SYSTEM = 4,
|
|
21
|
-
}
|
|
43
|
+
static init(appKey: string): void;
|
|
22
44
|
|
|
23
45
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @
|
|
26
|
-
* @
|
|
46
|
+
* 注册自定义消息类型
|
|
47
|
+
* @param contentType 消息类型标识符(不能以 "jg:" 开头)
|
|
48
|
+
* @param messageClass 自定义消息类的构造函数
|
|
49
|
+
* @example
|
|
50
|
+
* ```typescript
|
|
51
|
+
* class CustomMessage implements CustomMessageContent {
|
|
52
|
+
* contentType = 'my:custom';
|
|
53
|
+
* value: string = '';
|
|
54
|
+
* }
|
|
55
|
+
*
|
|
56
|
+
* JuggleIM.registerCustomMessageType('my:custom', CustomMessage);
|
|
57
|
+
* ```
|
|
27
58
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
59
|
+
static registerCustomMessageType(
|
|
60
|
+
contentType: string,
|
|
61
|
+
messageClass: CustomMessageConstructor
|
|
62
|
+
): void;
|
|
32
63
|
|
|
33
64
|
/**
|
|
34
|
-
*
|
|
35
|
-
* @
|
|
36
|
-
* 枚举:jg:text, jg:img, jg:file, jg:voice
|
|
65
|
+
* 连接到服务器
|
|
66
|
+
* @param token 用户token
|
|
37
67
|
*/
|
|
38
|
-
|
|
39
|
-
contentType: string;
|
|
40
|
-
}
|
|
68
|
+
static connect(token: string): void;
|
|
41
69
|
|
|
42
70
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* this.description = description || '';
|
|
54
|
-
* this.url = url || '';
|
|
55
|
-
* }
|
|
56
|
-
* ```
|
|
57
|
-
*
|
|
58
|
-
* 自定义消息注册
|
|
59
|
-
* ```
|
|
60
|
-
* JuggleIM.registerCustomMessageType('demo:textcard', TextCardMessage);
|
|
61
|
-
* ```
|
|
71
|
+
* 断开连接
|
|
72
|
+
* @param pushable 是否继续接收推送
|
|
73
|
+
*/
|
|
74
|
+
static disconnect(pushable: boolean): void;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 添加连接状态监听器
|
|
78
|
+
* @param key 监听器标识
|
|
79
|
+
* @param listener 监听器回调函数
|
|
80
|
+
* @returns 返回取消监听的函数
|
|
62
81
|
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
82
|
+
static addConnectionStatusListener(
|
|
83
|
+
key: string,
|
|
84
|
+
listener: ConnectionStatusListener
|
|
85
|
+
): () => void;
|
|
66
86
|
|
|
67
87
|
/**
|
|
68
|
-
*
|
|
88
|
+
* 添加消息监听器
|
|
89
|
+
* @param key 监听器标识
|
|
90
|
+
* @param listener 监听器回调函数
|
|
91
|
+
* @returns 返回取消监听的函数
|
|
69
92
|
*/
|
|
70
|
-
|
|
93
|
+
static addMessageListener(
|
|
94
|
+
key: string,
|
|
95
|
+
listener: MessageListener
|
|
96
|
+
): () => void;
|
|
71
97
|
|
|
72
98
|
/**
|
|
73
|
-
*
|
|
99
|
+
* 添加消息阅读状态监听器
|
|
100
|
+
* @param key 监听器标识
|
|
101
|
+
* @param listener 监听器回调函数
|
|
102
|
+
* @returns 返回取消监听的函数
|
|
74
103
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
104
|
+
static addMessageReadReceiptListener(
|
|
105
|
+
key: string,
|
|
106
|
+
listener: MessageReadReceiptListener
|
|
107
|
+
): () => void;
|
|
80
108
|
|
|
81
109
|
/**
|
|
82
|
-
*
|
|
110
|
+
* 添加消息销毁监听器
|
|
111
|
+
* @param key 监听器标识
|
|
112
|
+
* @param listener 监听器回调函数
|
|
113
|
+
* @returns 返回取消监听的函数
|
|
83
114
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
115
|
+
static addMessageDestroyListener(
|
|
116
|
+
key: string,
|
|
117
|
+
listener: MessageDestroyListener
|
|
118
|
+
): () => void;
|
|
87
119
|
|
|
88
120
|
/**
|
|
89
|
-
*
|
|
121
|
+
* 添加会话监听器
|
|
122
|
+
* @param key 监听器标识
|
|
123
|
+
* @param listener 监听器回调函数
|
|
124
|
+
* @returns 返回取消监听的函数
|
|
90
125
|
*/
|
|
91
|
-
|
|
92
|
-
|
|
126
|
+
static addConversationListener(
|
|
127
|
+
key: string,
|
|
128
|
+
listener: ConversationListener
|
|
129
|
+
): () => void;
|
|
93
130
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
131
|
+
/**
|
|
132
|
+
* 获取会话信息列表
|
|
133
|
+
* @param options 获取选项
|
|
134
|
+
* @returns {Promise<ConversationInfo[]>} 会话信息列表
|
|
135
|
+
*/
|
|
136
|
+
static getConversationInfoList(
|
|
137
|
+
options: GetConversationOptions
|
|
138
|
+
): Promise<ConversationInfo[]>;
|
|
100
139
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
*
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
* @property {string} [thumbnailLocalPath] - 缩略图本地路径:支持 /
|
|
140
|
-
* @property {string} [url] - 图片远程URL
|
|
141
|
-
* @property {string} [thumbnailUrl] - 缩略图远程URL
|
|
142
|
-
* @property {number} width - 图片宽度
|
|
143
|
-
* @property {number} height - 图片高度
|
|
144
|
-
*/
|
|
145
|
-
export class ImageMessageContent extends MessageContent {
|
|
146
|
-
localPath: string;
|
|
147
|
-
thumbnailLocalPath?: string;
|
|
148
|
-
url?: string;
|
|
149
|
-
thumbnailUrl?: string;
|
|
150
|
-
width: number;
|
|
151
|
-
height: number;
|
|
152
|
-
|
|
153
|
-
contentType: string;
|
|
154
|
-
}
|
|
140
|
+
/**
|
|
141
|
+
* 获取单个会话信息
|
|
142
|
+
* @param {Conversation} conversation 会话对象
|
|
143
|
+
* @returns {Promise<ConversationInfo | null>} 会话信息对象
|
|
144
|
+
*/
|
|
145
|
+
static getConversationInfo(
|
|
146
|
+
conversation: Conversation
|
|
147
|
+
): Promise<ConversationInfo | null>;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 创建会话信息
|
|
151
|
+
* @param conversation 会话对象
|
|
152
|
+
* @param callback 回调函数
|
|
153
|
+
*/
|
|
154
|
+
static createConversationInfo(
|
|
155
|
+
conversation: Conversation
|
|
156
|
+
): Promise<ConversationInfo>;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* 删除会话信息
|
|
160
|
+
* @param conversation 会话对象
|
|
161
|
+
* @param callback 回调函数
|
|
162
|
+
*/
|
|
163
|
+
static deleteConversationInfo(
|
|
164
|
+
conversation: Conversation,
|
|
165
|
+
callback: SimpleCallback
|
|
166
|
+
): Promise<Boolean>;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* 设置会话免打扰状态
|
|
170
|
+
* @param conversation 会话对象
|
|
171
|
+
* @param isMute 是否免打扰
|
|
172
|
+
* @param callback 回调函数
|
|
173
|
+
*/
|
|
174
|
+
static setMute(
|
|
175
|
+
conversation: Conversation,
|
|
176
|
+
isMute: boolean
|
|
177
|
+
): Promise<Boolean>;
|
|
155
178
|
|
|
156
179
|
/**
|
|
157
|
-
*
|
|
158
|
-
* @
|
|
159
|
-
* @
|
|
160
|
-
* @
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
*
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
*
|
|
196
|
-
* @
|
|
197
|
-
* @
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
*
|
|
203
|
-
* @
|
|
204
|
-
* @
|
|
205
|
-
* @
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
*
|
|
228
|
-
* @
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
*
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
*
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
*
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
export interface MessageReadReceiptListener {
|
|
435
|
-
onMessagesRead?: (conversation: Conversation, messageIds: string[]) => void;
|
|
436
|
-
onGroupMessagesRead?: (
|
|
437
|
-
conversation: Conversation,
|
|
438
|
-
messages: { [messageId: string]: GroupMessageReadInfo }
|
|
439
|
-
) => void;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* 消息销毁监听器回调函数
|
|
444
|
-
*/
|
|
445
|
-
export interface MessageDestroyListener {
|
|
446
|
-
onMessageDestroyTimeUpdate?: (
|
|
447
|
-
messageId: string,
|
|
448
|
-
conversation: Conversation,
|
|
449
|
-
destroyTime: number
|
|
450
|
-
) => void;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* 会话监听器回调函数
|
|
455
|
-
*/
|
|
456
|
-
export interface ConversationListener {
|
|
457
|
-
onConversationInfoAdd?: (conversations: ConversationInfo[]) => void;
|
|
458
|
-
onConversationInfoUpdate?: (conversations: ConversationInfo[]) => void;
|
|
459
|
-
onConversationInfoDelete?: (conversations: ConversationInfo[]) => void;
|
|
460
|
-
onTotalUnreadMessageCountUpdate?: (count: number) => void;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* 发送媒体消息回调接口
|
|
465
|
-
*/
|
|
466
|
-
export interface SendMediaMessageCallback {
|
|
467
|
-
onProgress?: (progress: number, message: Message) => void;
|
|
468
|
-
onSuccess?: (message: Message) => void;
|
|
469
|
-
onError?: (message: Message, errorCode: number) => void;
|
|
470
|
-
onCancel?: (message: Message) => void;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Juggle IM React Native SDK
|
|
475
|
-
*/
|
|
476
|
-
export default class JuggleIM {
|
|
477
|
-
/**
|
|
478
|
-
* 设置服务器地址列表
|
|
479
|
-
* @param urls 服务器地址列表
|
|
480
|
-
*/
|
|
481
|
-
static setServerUrls(urls: string[]): void;
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* 初始化SDK
|
|
485
|
-
* @param appKey 应用唯一标识
|
|
486
|
-
*/
|
|
487
|
-
static init(appKey: string): void;
|
|
488
|
-
|
|
489
|
-
/**
|
|
490
|
-
* 注册自定义消息类型
|
|
491
|
-
* @param contentType 消息类型标识符(不能以 "jg:" 开头)
|
|
492
|
-
* @param messageClass 自定义消息类的构造函数
|
|
493
|
-
* @example
|
|
494
|
-
* ```typescript
|
|
495
|
-
* class CustomMessage implements CustomMessageContent {
|
|
496
|
-
* contentType = 'my:custom';
|
|
497
|
-
* value: string = '';
|
|
498
|
-
* }
|
|
499
|
-
*
|
|
500
|
-
* JuggleIM.registerCustomMessageType('my:custom', CustomMessage);
|
|
501
|
-
* ```
|
|
502
|
-
*/
|
|
503
|
-
static registerCustomMessageType(
|
|
504
|
-
contentType: string,
|
|
505
|
-
messageClass: CustomMessageConstructor
|
|
506
|
-
): void;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* 连接到服务器
|
|
510
|
-
* @param token 用户token
|
|
511
|
-
*/
|
|
512
|
-
static connect(token: string): void;
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
* 断开连接
|
|
516
|
-
* @param pushable 是否继续接收推送
|
|
517
|
-
*/
|
|
518
|
-
static disconnect(pushable: boolean): void;
|
|
519
|
-
|
|
520
|
-
/**
|
|
521
|
-
* 添加连接状态监听器
|
|
522
|
-
* @param key 监听器标识
|
|
523
|
-
* @param listener 监听器回调函数
|
|
524
|
-
* @returns 返回取消监听的函数
|
|
525
|
-
*/
|
|
526
|
-
static addConnectionStatusListener(
|
|
527
|
-
key: string,
|
|
528
|
-
listener: ConnectionStatusListener
|
|
529
|
-
): () => void;
|
|
530
|
-
|
|
531
|
-
/**
|
|
532
|
-
* 添加消息监听器
|
|
533
|
-
* @param key 监听器标识
|
|
534
|
-
* @param listener 监听器回调函数
|
|
535
|
-
* @returns 返回取消监听的函数
|
|
536
|
-
*/
|
|
537
|
-
static addMessageListener(
|
|
538
|
-
key: string,
|
|
539
|
-
listener: MessageListener
|
|
540
|
-
): () => void;
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* 添加消息阅读状态监听器
|
|
544
|
-
* @param key 监听器标识
|
|
545
|
-
* @param listener 监听器回调函数
|
|
546
|
-
* @returns 返回取消监听的函数
|
|
547
|
-
*/
|
|
548
|
-
static addMessageReadReceiptListener(
|
|
549
|
-
key: string,
|
|
550
|
-
listener: MessageReadReceiptListener
|
|
551
|
-
): () => void;
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* 添加消息销毁监听器
|
|
555
|
-
* @param key 监听器标识
|
|
556
|
-
* @param listener 监听器回调函数
|
|
557
|
-
* @returns 返回取消监听的函数
|
|
558
|
-
*/
|
|
559
|
-
static addMessageDestroyListener(
|
|
560
|
-
key: string,
|
|
561
|
-
listener: MessageDestroyListener
|
|
562
|
-
): () => void;
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* 添加会话监听器
|
|
566
|
-
* @param key 监听器标识
|
|
567
|
-
* @param listener 监听器回调函数
|
|
568
|
-
* @returns 返回取消监听的函数
|
|
569
|
-
*/
|
|
570
|
-
static addConversationListener(
|
|
571
|
-
key: string,
|
|
572
|
-
listener: ConversationListener
|
|
573
|
-
): () => void;
|
|
574
|
-
|
|
575
|
-
/**
|
|
576
|
-
* 获取会话信息列表
|
|
577
|
-
* @param options 获取选项
|
|
578
|
-
* @returns {Promise<ConversationInfo[]>} 会话信息列表
|
|
579
|
-
*/
|
|
580
|
-
static getConversationInfoList(
|
|
581
|
-
options: GetConversationOptions
|
|
582
|
-
): Promise<ConversationInfo[]>;
|
|
583
|
-
|
|
584
|
-
/**
|
|
585
|
-
* 获取单个会话信息
|
|
586
|
-
* @param {Conversation} conversation 会话对象
|
|
587
|
-
* @returns {Promise<ConversationInfo | null>} 会话信息对象
|
|
588
|
-
*/
|
|
589
|
-
static getConversationInfo(
|
|
590
|
-
conversation: Conversation
|
|
591
|
-
): Promise<ConversationInfo | null>;
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* 创建会话信息
|
|
595
|
-
* @param conversation 会话对象
|
|
596
|
-
* @param callback 回调函数
|
|
597
|
-
*/
|
|
598
|
-
static createConversationInfo(
|
|
599
|
-
conversation: Conversation
|
|
600
|
-
): Promise<ConversationInfo>;
|
|
601
|
-
|
|
602
|
-
/**
|
|
603
|
-
* 删除会话信息
|
|
604
|
-
* @param conversation 会话对象
|
|
605
|
-
* @param callback 回调函数
|
|
606
|
-
*/
|
|
607
|
-
static deleteConversationInfo(
|
|
608
|
-
conversation: Conversation,
|
|
609
|
-
callback: SimpleCallback
|
|
610
|
-
): Promise<Boolean>;
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* 设置会话免打扰状态
|
|
614
|
-
* @param conversation 会话对象
|
|
615
|
-
* @param isMute 是否免打扰
|
|
616
|
-
* @param callback 回调函数
|
|
617
|
-
*/
|
|
618
|
-
static setMute(
|
|
619
|
-
conversation: Conversation,
|
|
620
|
-
isMute: boolean
|
|
621
|
-
): Promise<Boolean>;
|
|
622
|
-
|
|
623
|
-
/**
|
|
624
|
-
* 设置会话置顶状态
|
|
625
|
-
* @param conversation 会话对象
|
|
626
|
-
* @param isTop 是否置顶
|
|
627
|
-
* @param callback 回调函数
|
|
628
|
-
*/
|
|
629
|
-
static setTop(conversation: Conversation, isTop: boolean): Promise<Boolean>;
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* 清除会话未读数
|
|
633
|
-
* @param conversation 会话对象
|
|
634
|
-
* @param callback 回调函数
|
|
635
|
-
*/
|
|
636
|
-
static clearUnreadCount(conversation: Conversation): Promise<Boolean>;
|
|
637
|
-
|
|
638
|
-
/**
|
|
639
|
-
* 清除总未读数
|
|
640
|
-
* @param callback 回调函数
|
|
641
|
-
*/
|
|
642
|
-
static clearTotalUnreadCount(): Promise<Boolean>;
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* 获取总未读数
|
|
646
|
-
* @param callback 回调函数
|
|
647
|
-
*/
|
|
648
|
-
static getTotalUnreadCount(): Promise<number>;
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* 设置会话草稿
|
|
652
|
-
* @param conversation 会话对象
|
|
653
|
-
* @param draft 草稿内容
|
|
654
|
-
* @param callback 回调函数
|
|
655
|
-
*/
|
|
656
|
-
static setDraft(
|
|
657
|
-
conversation: Conversation,
|
|
658
|
-
draft: string
|
|
659
|
-
): Promise<Boolean>;
|
|
660
|
-
|
|
661
|
-
/**
|
|
662
|
-
* 清除会话草稿
|
|
663
|
-
* @param conversation 会话对象
|
|
664
|
-
* @param callback 回调函数
|
|
665
|
-
*/
|
|
666
|
-
static clearDraft(conversation: Conversation): Promise<Boolean>;
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* 设置会话未读状态
|
|
670
|
-
* @param conversation 会话对象
|
|
671
|
-
* @param isUnread 是否未读
|
|
672
|
-
* @param callback 回调函数
|
|
673
|
-
*/
|
|
674
|
-
static setUnread(
|
|
675
|
-
conversation: Conversation,
|
|
676
|
-
isUnread: boolean
|
|
677
|
-
): Promise<Boolean>;
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* 获取置顶会话信息列表
|
|
681
|
-
* @param count 获取数量
|
|
682
|
-
* @param timestamp 上一页最后一条数据的时间戳
|
|
683
|
-
* @param direction 拉取方向: 0-更新的消息, 1-更早的消息
|
|
684
|
-
* @returns {Promise<ConversationInfo[]>} 会话信息列表
|
|
685
|
-
*/
|
|
686
|
-
static getTopConversationInfoList(
|
|
687
|
-
count: number,
|
|
688
|
-
timestamp: number,
|
|
689
|
-
direction: number
|
|
690
|
-
): Promise<ConversationInfo[]>;
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
* 获取指定类型的未读数
|
|
694
|
-
* @param conversationTypes 会话类型数组
|
|
695
|
-
* @returns {Promise<number>} 未读数
|
|
696
|
-
*/
|
|
697
|
-
static getUnreadCountWithTypes(
|
|
698
|
-
conversationTypes: number[]
|
|
699
|
-
): Promise<number>;
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* 将会话添加到标签
|
|
703
|
-
* @param options 标签选项
|
|
704
|
-
*/
|
|
705
|
-
static addConversationsToTag(
|
|
706
|
-
options: ConversationTagOptions
|
|
707
|
-
): Promise<Boolean>;
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* 从标签中移除会话
|
|
711
|
-
* @param options 标签选项
|
|
712
|
-
*/
|
|
713
|
-
static removeConversationsFromTag(
|
|
714
|
-
options: ConversationTagOptions
|
|
715
|
-
): Promise<Boolean>;
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* 发送消息
|
|
719
|
-
* @param {SendMessageObject} message 发送消息对象
|
|
720
|
-
* @param {SendMessageCallback} [callback] 发送消息回调函数
|
|
721
|
-
* @returns {Promise<Message>} 发送的消息对象
|
|
722
|
-
*/
|
|
723
|
-
static sendMessage(
|
|
724
|
-
message: SendMessageObject,
|
|
725
|
-
callback?: SendMessageCallback
|
|
726
|
-
): Promise<Message>;
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* 发送合并消息
|
|
731
|
-
* @param {string} title 合并消息的标题
|
|
732
|
-
* @param {string[]} messageIds 要合并的消息ID列表
|
|
733
|
-
* @param {Conversation} conversation 目标会话对象
|
|
734
|
-
* @param {SendMessageCallback} [callback] 发送消息回调函数
|
|
735
|
-
* @returns {Promise<Message>} 发送的消息对象
|
|
736
|
-
*/
|
|
737
|
-
static sendMergeMessage(
|
|
738
|
-
message: MergeMessageContent,
|
|
739
|
-
conversation: Conversation,
|
|
740
|
-
callback?: SendMessageCallback
|
|
741
|
-
): Promise<Message>;
|
|
742
|
-
|
|
743
|
-
/**
|
|
744
|
-
* 发送图片消息
|
|
745
|
-
* 示例
|
|
746
|
-
* ```javascript
|
|
747
|
-
* const imageContent = {
|
|
748
|
-
* contentType: 'image',
|
|
749
|
-
* localPath: '/path/to/image',
|
|
750
|
-
* width: 800,
|
|
751
|
-
* height: 600,
|
|
752
|
-
* };
|
|
753
|
-
* @param {SendMessageObject} message
|
|
754
|
-
* @param {SendMediaMessageCallback} [callback] 发送消息回调函数
|
|
755
|
-
* @returns {Promise<Message>} 发送的消息对象
|
|
756
|
-
*/
|
|
757
|
-
static sendImageMessage(
|
|
758
|
-
message: SendMessageObject,
|
|
759
|
-
callback?: SendMediaMessageCallback
|
|
760
|
-
): Promise<Message>;
|
|
761
|
-
/**
|
|
762
|
-
* 发送文件消息
|
|
763
|
-
* 示例:
|
|
764
|
-
* ```javascript
|
|
765
|
-
* const fileContent = {
|
|
766
|
-
* contentType: 'file',
|
|
767
|
-
* localPath: '/path/to/file',
|
|
768
|
-
* name: 'filename.ext',
|
|
769
|
-
* size: 123456,
|
|
770
|
-
* };
|
|
771
|
-
* @param {SendMessageObject} message
|
|
772
|
-
* @param {SendMediaMessageCallback} [callback] 发送消息回调函数
|
|
773
|
-
* @returns {Promise<Message>} 发送的消息对象
|
|
774
|
-
*/
|
|
775
|
-
static sendFileMessage(
|
|
776
|
-
message: SendMessageObject,
|
|
777
|
-
callback?: SendMediaMessageCallback
|
|
778
|
-
): Promise<Message>;
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* 发送语音消息
|
|
782
|
-
* 示例
|
|
783
|
-
* ```javascript
|
|
784
|
-
* const voiceContent = {
|
|
785
|
-
* contentType: 'voice',
|
|
786
|
-
* localPath: '/path/to/voice',
|
|
787
|
-
* duration: 10, // 语音时长,单位秒
|
|
788
|
-
* };
|
|
789
|
-
* @param {number} conversationType 会话类型
|
|
790
|
-
* @param {string} conversationId 会话ID
|
|
791
|
-
* @param {VoiceMessageContent} content 语音消息内容
|
|
792
|
-
* @param {SendMediaMessageCallback} [callback] 发送消息回调函数
|
|
793
|
-
* @returns {Promise<Message>} 发送的消息对象
|
|
794
|
-
*/
|
|
795
|
-
static sendVoiceMessage(
|
|
796
|
-
conversationType: number,
|
|
797
|
-
conversationId: string,
|
|
798
|
-
content: VoiceMessageContent,
|
|
799
|
-
callback?: SendMediaMessageCallback
|
|
800
|
-
): Promise<Message>;
|
|
801
|
-
|
|
802
|
-
/**
|
|
803
|
-
* 获取历史消息
|
|
804
|
-
* @param {Conversation} conversation 会话
|
|
805
|
-
* @param {number} direction 拉取方向,0表示从startTime往后的消息,1表示从startTime往前的消息
|
|
806
|
-
* @param {GetMessageOptions} options 获取消息选项
|
|
807
|
-
* @returns {Promise<MessageResponse>} 消息响应对象,包含消息列表、时间戳和是否有更多消息
|
|
808
|
-
*/
|
|
809
|
-
static getMessageList(
|
|
810
|
-
conversation: Conversation,
|
|
811
|
-
direction: number,
|
|
812
|
-
options: GetMessageOptions
|
|
813
|
-
): Promise<MessageResponse>;
|
|
814
|
-
|
|
815
|
-
/**
|
|
816
|
-
* 撤回消息
|
|
817
|
-
* @param messageId 消息ID列表
|
|
818
|
-
* @param extras 扩展字段
|
|
819
|
-
* @returns {Promise<Boolean>} 是否撤回成功
|
|
820
|
-
*/
|
|
821
|
-
static recallMessage(
|
|
822
|
-
messageId: string,
|
|
823
|
-
extras?: { [key: string]: any }
|
|
824
|
-
): Promise<Boolean>;
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* 根据clientMsgNo列表删除消息
|
|
828
|
-
* @param conversation 会话
|
|
829
|
-
* @param clientMsgNos clientMsgNo列表
|
|
830
|
-
*/
|
|
831
|
-
static deleteMessagesByClientMsgNoList(conversation: Conversation, clientMsgNos: number[]): Promise<boolean>;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* 添加消息反应
|
|
835
|
-
* @param messageId 消息ID
|
|
836
|
-
* @param reactionId 反应ID
|
|
837
|
-
* @returns {Promise<Boolean>} 是否添加成功
|
|
838
|
-
*/
|
|
839
|
-
static addMessageReaction(
|
|
840
|
-
messageId: string,
|
|
841
|
-
reactionId: string
|
|
842
|
-
): Promise<Boolean>;
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* 移除消息反应
|
|
846
|
-
* @param messageId 消息ID
|
|
847
|
-
* @param reactionId 反应ID
|
|
848
|
-
* @returns {Promise<Boolean>} 是否移除成功
|
|
849
|
-
*/
|
|
850
|
-
static removeMessageReaction(
|
|
851
|
-
messageId: string,
|
|
852
|
-
reactionId: string
|
|
853
|
-
): Promise<Boolean>;
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* 发送消息已读回执
|
|
857
|
-
* @param conversation 会话对象
|
|
858
|
-
* @param messageIds 消息ID列表
|
|
859
|
-
* @returns {Promise<Boolean>} 是否发送成功
|
|
860
|
-
*/
|
|
861
|
-
static sendReadReceipt(
|
|
862
|
-
conversation: Conversation,
|
|
863
|
-
messageIds: string[],
|
|
864
|
-
): Promise<Boolean>;
|
|
865
|
-
|
|
866
|
-
/**
|
|
867
|
-
* 更新消息
|
|
868
|
-
* @param messageId 消息ID
|
|
869
|
-
* @param content 新的消息内容
|
|
870
|
-
* @param conversation 会话对象
|
|
871
|
-
* @param callback 回调函数
|
|
872
|
-
* @returns {Promise<Message>} 更新后的消息对象
|
|
873
|
-
*/
|
|
874
|
-
static updateMessage(
|
|
875
|
-
messageId: string,
|
|
876
|
-
content: MessageContent,
|
|
877
|
-
conversation: Conversation,
|
|
878
|
-
callback?: UpdateMessageCallback
|
|
879
|
-
): Promise<Message>;
|
|
880
|
-
|
|
881
|
-
/**
|
|
882
|
-
* 设置消息置顶
|
|
883
|
-
* @param messageId 消息ID
|
|
884
|
-
* @param conversation 会话对象
|
|
885
|
-
* @param isTop 是否置顶
|
|
886
|
-
* @param callback 回调函数
|
|
887
|
-
* @returns {Promise<Boolean>} 是否设置成功
|
|
888
|
-
*/
|
|
889
|
-
static setMessageTop(
|
|
890
|
-
messageId: string,
|
|
891
|
-
conversation: Conversation,
|
|
892
|
-
isTop: boolean,
|
|
893
|
-
): Promise<Boolean>;
|
|
894
|
-
}
|
|
180
|
+
* 设置会话置顶状态
|
|
181
|
+
* @param conversation 会话对象
|
|
182
|
+
* @param isTop 是否置顶
|
|
183
|
+
* @param callback 回调函数
|
|
184
|
+
*/
|
|
185
|
+
static setTop(conversation: Conversation, isTop: boolean): Promise<Boolean>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* 清除会话未读数
|
|
189
|
+
* @param conversation 会话对象
|
|
190
|
+
* @param callback 回调函数
|
|
191
|
+
*/
|
|
192
|
+
static clearUnreadCount(conversation: Conversation): Promise<Boolean>;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* 清除总未读数
|
|
196
|
+
* @param callback 回调函数
|
|
197
|
+
*/
|
|
198
|
+
static clearTotalUnreadCount(): Promise<Boolean>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 获取总未读数
|
|
202
|
+
* @param callback 回调函数
|
|
203
|
+
*/
|
|
204
|
+
static getTotalUnreadCount(): Promise<number>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* 设置会话草稿
|
|
208
|
+
* @param conversation 会话对象
|
|
209
|
+
* @param draft 草稿内容
|
|
210
|
+
* @param callback 回调函数
|
|
211
|
+
*/
|
|
212
|
+
static setDraft(
|
|
213
|
+
conversation: Conversation,
|
|
214
|
+
draft: string
|
|
215
|
+
): Promise<Boolean>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* 清除会话草稿
|
|
219
|
+
* @param conversation 会话对象
|
|
220
|
+
* @param callback 回调函数
|
|
221
|
+
*/
|
|
222
|
+
static clearDraft(conversation: Conversation): Promise<Boolean>;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 设置会话未读状态
|
|
226
|
+
* @param conversation 会话对象
|
|
227
|
+
* @param isUnread 是否未读
|
|
228
|
+
* @param callback 回调函数
|
|
229
|
+
*/
|
|
230
|
+
static setUnread(
|
|
231
|
+
conversation: Conversation,
|
|
232
|
+
isUnread: boolean
|
|
233
|
+
): Promise<Boolean>;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* 获取置顶会话信息列表
|
|
237
|
+
* @param count 获取数量
|
|
238
|
+
* @param timestamp 上一页最后一条数据的时间戳
|
|
239
|
+
* @param direction 拉取方向: 0-更新的消息, 1-更早的消息
|
|
240
|
+
* @returns {Promise<ConversationInfo[]>} 会话信息列表
|
|
241
|
+
*/
|
|
242
|
+
static getTopConversationInfoList(
|
|
243
|
+
count: number,
|
|
244
|
+
timestamp: number,
|
|
245
|
+
direction: number
|
|
246
|
+
): Promise<ConversationInfo[]>;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* 获取指定类型的未读数
|
|
250
|
+
* @param conversationTypes 会话类型数组
|
|
251
|
+
* @returns {Promise<number>} 未读数
|
|
252
|
+
*/
|
|
253
|
+
static getUnreadCountWithTypes(
|
|
254
|
+
conversationTypes: number[]
|
|
255
|
+
): Promise<number>;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* 将会话添加到标签
|
|
259
|
+
* @param options 标签选项
|
|
260
|
+
*/
|
|
261
|
+
static addConversationsToTag(
|
|
262
|
+
options: ConversationTagOptions
|
|
263
|
+
): Promise<Boolean>;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* 从标签中移除会话
|
|
267
|
+
* @param options 标签选项
|
|
268
|
+
*/
|
|
269
|
+
static removeConversationsFromTag(
|
|
270
|
+
options: ConversationTagOptions
|
|
271
|
+
): Promise<Boolean>;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* 上传图片
|
|
275
|
+
* @param localPath 图片本地路径
|
|
276
|
+
* @returns {Promise<string>} 图片URL
|
|
277
|
+
*/
|
|
278
|
+
static uploadImage(localPath: string): Promise<string>;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* 发送消息
|
|
282
|
+
* @param {SendMessageObject} message 发送消息对象
|
|
283
|
+
* @param {SendMessageCallback} [callback] 发送消息回调函数
|
|
284
|
+
* @returns {Promise<Message>} 发送的消息对象
|
|
285
|
+
*/
|
|
286
|
+
static sendMessage(
|
|
287
|
+
message: SendMessageObject,
|
|
288
|
+
callback?: SendMessageCallback
|
|
289
|
+
): Promise<Message>;
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* 发送合并消息
|
|
294
|
+
* @param {string} title 合并消息的标题
|
|
295
|
+
* @param {string[]} messageIds 要合并的消息ID列表
|
|
296
|
+
* @param {Conversation} conversation 目标会话对象
|
|
297
|
+
* @param {SendMessageCallback} [callback] 发送消息回调函数
|
|
298
|
+
* @returns {Promise<Message>} 发送的消息对象
|
|
299
|
+
*/
|
|
300
|
+
static sendMergeMessage(
|
|
301
|
+
message: MergeMessageContent,
|
|
302
|
+
conversation: Conversation,
|
|
303
|
+
callback?: SendMessageCallback
|
|
304
|
+
): Promise<Message>;
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* 发送图片消息
|
|
308
|
+
* 示例
|
|
309
|
+
* ```javascript
|
|
310
|
+
* const imageContent = {
|
|
311
|
+
* contentType: 'image',
|
|
312
|
+
* localPath: '/path/to/image',
|
|
313
|
+
* width: 800,
|
|
314
|
+
* height: 600,
|
|
315
|
+
* };
|
|
316
|
+
* @param {SendMessageObject} message
|
|
317
|
+
* @param {SendMediaMessageCallback} [callback] 发送消息回调函数
|
|
318
|
+
* @returns {Promise<Message>} 发送的消息对象
|
|
319
|
+
*/
|
|
320
|
+
static sendImageMessage(
|
|
321
|
+
message: SendMessageObject,
|
|
322
|
+
callback?: SendMediaMessageCallback
|
|
323
|
+
): Promise<Message>;
|
|
324
|
+
/**
|
|
325
|
+
* 发送文件消息
|
|
326
|
+
* 示例:
|
|
327
|
+
* ```javascript
|
|
328
|
+
* const fileContent = {
|
|
329
|
+
* contentType: 'file',
|
|
330
|
+
* localPath: '/path/to/file',
|
|
331
|
+
* name: 'filename.ext',
|
|
332
|
+
* size: 123456,
|
|
333
|
+
* };
|
|
334
|
+
* @param {SendMessageObject} message
|
|
335
|
+
* @param {SendMediaMessageCallback} [callback] 发送消息回调函数
|
|
336
|
+
* @returns {Promise<Message>} 发送的消息对象
|
|
337
|
+
*/
|
|
338
|
+
static sendFileMessage(
|
|
339
|
+
message: SendMessageObject,
|
|
340
|
+
callback?: SendMediaMessageCallback
|
|
341
|
+
): Promise<Message>;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* 发送语音消息
|
|
345
|
+
* 示例
|
|
346
|
+
* ```javascript
|
|
347
|
+
* const voiceContent = {
|
|
348
|
+
* contentType: 'voice',
|
|
349
|
+
* localPath: '/path/to/voice',
|
|
350
|
+
* duration: 10, // 语音时长,单位秒
|
|
351
|
+
* };
|
|
352
|
+
* @param {number} conversationType 会话类型
|
|
353
|
+
* @param {string} conversationId 会话ID
|
|
354
|
+
* @param {VoiceMessageContent} content 语音消息内容
|
|
355
|
+
* @param {SendMediaMessageCallback} [callback] 发送消息回调函数
|
|
356
|
+
* @returns {Promise<Message>} 发送的消息对象
|
|
357
|
+
*/
|
|
358
|
+
static sendVoiceMessage(
|
|
359
|
+
conversationType: number,
|
|
360
|
+
conversationId: string,
|
|
361
|
+
content: VoiceMessageContent,
|
|
362
|
+
callback?: SendMediaMessageCallback
|
|
363
|
+
): Promise<Message>;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* 获取历史消息
|
|
367
|
+
* @param {Conversation} conversation 会话
|
|
368
|
+
* @param {number} direction 拉取方向,0 比startTime更新的消息,1 比startTime更旧的消息
|
|
369
|
+
* @param {GetMessageOptions} options 获取消息选项
|
|
370
|
+
* @returns {Promise<MessageResponse>} 消息响应对象,包含消息列表、时间戳和是否有更多消息
|
|
371
|
+
*/
|
|
372
|
+
static getMessageList(
|
|
373
|
+
conversation: Conversation,
|
|
374
|
+
direction: number,
|
|
375
|
+
options: GetMessageOptions
|
|
376
|
+
): Promise<MessageResponse>;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* 撤回消息
|
|
380
|
+
* @param messageId 消息ID列表
|
|
381
|
+
* @param extras 扩展字段
|
|
382
|
+
* @returns {Promise<Boolean>} 是否撤回成功
|
|
383
|
+
*/
|
|
384
|
+
static recallMessage(
|
|
385
|
+
messageId: string,
|
|
386
|
+
extras?: { [key: string]: any }
|
|
387
|
+
): Promise<Boolean>;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* 根据clientMsgNo列表删除消息
|
|
391
|
+
* @param conversation 会话
|
|
392
|
+
* @param clientMsgNos clientMsgNo列表
|
|
393
|
+
*/
|
|
394
|
+
static deleteMessagesByClientMsgNoList(conversation: Conversation, clientMsgNos: number[]): Promise<boolean>;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* 添加消息反应
|
|
398
|
+
* @param messageId 消息ID
|
|
399
|
+
* @param reactionId 反应ID
|
|
400
|
+
* @returns {Promise<Boolean>} 是否添加成功
|
|
401
|
+
*/
|
|
402
|
+
static addMessageReaction(
|
|
403
|
+
messageId: string,
|
|
404
|
+
reactionId: string
|
|
405
|
+
): Promise<Boolean>;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* 移除消息反应
|
|
409
|
+
* @param messageId 消息ID
|
|
410
|
+
* @param reactionId 反应ID
|
|
411
|
+
* @returns {Promise<Boolean>} 是否移除成功
|
|
412
|
+
*/
|
|
413
|
+
static removeMessageReaction(
|
|
414
|
+
messageId: string,
|
|
415
|
+
reactionId: string
|
|
416
|
+
): Promise<Boolean>;
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* 发送消息已读回执
|
|
420
|
+
* @param conversation 会话对象
|
|
421
|
+
* @param messageIds 消息ID列表
|
|
422
|
+
* @returns {Promise<Boolean>} 是否发送成功
|
|
423
|
+
*/
|
|
424
|
+
static sendReadReceipt(
|
|
425
|
+
conversation: Conversation,
|
|
426
|
+
messageIds: string[],
|
|
427
|
+
): Promise<Boolean>;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* 更新消息
|
|
431
|
+
* @param messageId 消息ID
|
|
432
|
+
* @param content 新的消息内容
|
|
433
|
+
* @param conversation 会话对象
|
|
434
|
+
* @param callback 回调函数
|
|
435
|
+
* @returns {Promise<Message>} 更新后的消息对象
|
|
436
|
+
*/
|
|
437
|
+
static updateMessage(
|
|
438
|
+
messageId: string,
|
|
439
|
+
content: MessageContent,
|
|
440
|
+
conversation: Conversation,
|
|
441
|
+
callback?: UpdateMessageCallback
|
|
442
|
+
): Promise<Message>;
|
|
443
|
+
|
|
444
|
+
/**
|
|
445
|
+
* 设置消息置顶
|
|
446
|
+
* @param messageId 消息ID
|
|
447
|
+
* @param conversation 会话对象
|
|
448
|
+
* @param isTop 是否置顶
|
|
449
|
+
* @param callback 回调函数
|
|
450
|
+
* @returns {Promise<Boolean>} 是否设置成功
|
|
451
|
+
*/
|
|
452
|
+
static setMessageTop(
|
|
453
|
+
messageId: string,
|
|
454
|
+
conversation: Conversation,
|
|
455
|
+
isTop: boolean,
|
|
456
|
+
): Promise<Boolean>;
|
|
895
457
|
}
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
export * from './call';
|