feat: release 3.8.3 (#17)

This commit is contained in:
blooming
2025-01-08 21:14:57 +08:00
committed by GitHub
parent 065c3b43fe
commit 80763b3039
10 changed files with 43 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

14
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "@openim/electron-client-sdk", "name": "@openim/electron-client-sdk",
"version": "1.1.1", "version": "1.1.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@openim/electron-client-sdk", "name": "@openim/electron-client-sdk",
"version": "1.1.1", "version": "1.1.5",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"koffi": "2.8.0", "koffi": "2.8.0",
@@ -15,7 +15,7 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^16.2.4", "@commitlint/cli": "^16.2.4",
"@commitlint/config-conventional": "^16.2.4", "@commitlint/config-conventional": "^16.2.4",
"@openim/wasm-client-sdk": "^3.8.2-1", "@openim/wasm-client-sdk": "^3.8.3",
"@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-terser": "^0.4.4",
"@types/ffi-napi": "^4.0.10", "@types/ffi-napi": "^4.0.10",
@@ -43,7 +43,7 @@
"node": ">=12.0" "node": ">=12.0"
}, },
"peerDependencies": { "peerDependencies": {
"@openim/wasm-client-sdk": "^3.8.2-1", "@openim/wasm-client-sdk": "^3.8.3",
"electron": ">=12.0.0" "electron": ">=12.0.0"
} }
}, },
@@ -1882,9 +1882,9 @@
} }
}, },
"node_modules/@openim/wasm-client-sdk": { "node_modules/@openim/wasm-client-sdk": {
"version": "3.8.2-1", "version": "3.8.3",
"resolved": "https://registry.npmjs.org/@openim/wasm-client-sdk/-/wasm-client-sdk-3.8.2-1.tgz", "resolved": "https://registry.npmjs.org/@openim/wasm-client-sdk/-/wasm-client-sdk-3.8.3.tgz",
"integrity": "sha512-ntpmRJrZVzaAM7MbA1BsY1jgeGEJUlyWGH6Yqz5+yjd1qNBL4f7SysiDXYHoizOWNNWCSGzeC8iZPDMRIS0hEw==", "integrity": "sha512-Kly5qibTdPTaIX8SClbzke46X/hl6vjYY8i0iMAqktrNak+Vn80dxMpY9QhIdwqhYA8MU2ffcdJkd9JXm+QK2Q==",
"dev": true, "dev": true,
"engines": { "engines": {
"node": ">=12.0" "node": ">=12.0"

View File

@@ -1,6 +1,6 @@
{ {
"name": "@openim/electron-client-sdk", "name": "@openim/electron-client-sdk",
"version": "1.1.5", "version": "3.8.3",
"description": "open im sdk for node", "description": "open im sdk for node",
"source": "src/index.ts", "source": "src/index.ts",
"main": "lib/index.js", "main": "lib/index.js",
@@ -43,7 +43,7 @@
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^16.2.4", "@commitlint/cli": "^16.2.4",
"@commitlint/config-conventional": "^16.2.4", "@commitlint/config-conventional": "^16.2.4",
"@openim/wasm-client-sdk": "^3.8.2-1", "@openim/wasm-client-sdk": "^3.8.3",
"@rollup/plugin-alias": "^5.1.0", "@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-terser": "^0.4.4",
"@types/ffi-napi": "^4.0.10", "@types/ffi-napi": "^4.0.10",
@@ -80,7 +80,7 @@
"uuid": "^9.0.0" "uuid": "^9.0.0"
}, },
"peerDependencies": { "peerDependencies": {
"@openim/wasm-client-sdk": "^3.8.2-1", "@openim/wasm-client-sdk": "^3.8.3",
"electron": ">=12.0.0" "electron": ">=12.0.0"
} }
} }

View File

@@ -941,6 +941,12 @@ class OpenIMSDK
'void', 'void',
['baseCallback *', 'str', 'str', 'str', 'int', 'int', 'int'] ['baseCallback *', 'str', 'str', 'str', 'int', 'int', 'int']
); );
this.libOpenIMSDK.fetch_surrounding_messages = this.lib.func(
'__stdcall',
'fetch_surrounding_messages',
'void',
['baseCallback *', 'str', 'str']
);
} }
}; };
@@ -1378,6 +1384,7 @@ class OpenIMSDK
createFileMessageByURL!: MessageModuleApi['createFileMessageByURL']; createFileMessageByURL!: MessageModuleApi['createFileMessageByURL'];
getAdvancedHistoryMessageList!: MessageModuleApi['getAdvancedHistoryMessageList']; getAdvancedHistoryMessageList!: MessageModuleApi['getAdvancedHistoryMessageList'];
getAdvancedHistoryMessageListReverse!: MessageModuleApi['getAdvancedHistoryMessageListReverse']; getAdvancedHistoryMessageListReverse!: MessageModuleApi['getAdvancedHistoryMessageListReverse'];
fetchSurroundingMessages!: MessageModuleApi['fetchSurroundingMessages'];
sendMessage!: MessageModuleApi['sendMessage']; sendMessage!: MessageModuleApi['sendMessage'];
sendMessageNotOss!: MessageModuleApi['sendMessageNotOss']; sendMessageNotOss!: MessageModuleApi['sendMessageNotOss'];
findMessageList!: MessageModuleApi['findMessageList']; findMessageList!: MessageModuleApi['findMessageList'];

View File

@@ -28,6 +28,7 @@ import {
SoundMsgParamsByURL, SoundMsgParamsByURL,
SendGroupReadReceiptParams, SendGroupReadReceiptParams,
GetGroupMessageReaderParams, GetGroupMessageReaderParams,
FetchSurroundingParams,
} from '@openim/wasm-client-sdk/lib/types/params'; } from '@openim/wasm-client-sdk/lib/types/params';
import { import {
VideoMsgByPathParams, VideoMsgByPathParams,
@@ -389,6 +390,22 @@ export function setupMessageModule(openIMSDK: OpenIMSDK) {
JSON.stringify(params) JSON.stringify(params)
); );
}), }),
fetchSurroundingMessages: (
params: FetchSurroundingParams,
opid = uuidV4()
) =>
new Promise<BaseResponse<{ messageList: MessageItem[] }>>(
(resolve, reject) => {
openIMSDK.libOpenIMSDK.fetch_surrounding_messages(
openIMSDK.baseCallbackWrap<{ messageList: MessageItem[] }>(
resolve,
reject
),
opid,
JSON.stringify(params)
);
}
),
findMessageList: (params: FindMessageParams[], opid = uuidV4()) => findMessageList: (params: FindMessageParams[], opid = uuidV4()) =>
new Promise<BaseResponse<MessageItem[]>>((resolve, reject) => { new Promise<BaseResponse<MessageItem[]>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.find_message_list( openIMSDK.libOpenIMSDK.find_message_list(
@@ -586,6 +603,10 @@ export interface MessageModuleApi {
params: GetAdvancedHistoryMsgParams, params: GetAdvancedHistoryMsgParams,
opid?: string opid?: string
) => Promise<BaseResponse<AdvancedGetMessageResult>>; ) => Promise<BaseResponse<AdvancedGetMessageResult>>;
fetchSurroundingMessages: (
params: FetchSurroundingParams,
opid?: string
) => Promise<BaseResponse<{ messageList: MessageItem[] }>>;
findMessageList: ( findMessageList: (
params: FindMessageParams[], params: FindMessageParams[],
opid?: string opid?: string

View File

@@ -233,6 +233,11 @@ declare module 'libOpenIMSDK' {
operationID: string, operationID: string,
getMessageOptions: string getMessageOptions: string
): void; ): void;
fetch_surrounding_messages(
cCallback: CB_S_I_S_S,
operationID: string,
fetchSurroundingMessagesOptions: string
): void;
revoke_message( revoke_message(
cCallback: CB_S_I_S_S, cCallback: CB_S_I_S_S,
operationID: string, operationID: string,