Compare commits

..

5 Commits

Author SHA1 Message Date
skiffer-git
94c3c761e3 Update README.md 2025-04-23 10:02:40 +08:00
blooming
ac25782e8b Update LICENSE 2025-04-22 18:13:58 +08:00
blooming
3bcd38dd54 fix: update_friends ffi registe & core asset update (#14)
* fix: update_friends ffi registe

* chore: core assets update to v3.8.2-alpha.4
2024-11-15 11:33:51 +08:00
Kevin Lee
9534a672ab feat: update assets & export types (#12) 2024-11-15 11:33:38 +08:00
blooming
448352abfb feat: add new input state api (#10) 2024-10-17 15:11:59 +08:00
17 changed files with 38 additions and 163 deletions

View File

@@ -182,4 +182,14 @@ Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/ma
## License :page_facing_up:
OpenIM is licensed under the Apache 2.0 license. See [LICENSE](https://github.com/openimsdk/open-im-server/tree/main/LICENSE) for the full license text.
This software is licensed under a dual-license model:
- The GNU Affero General Public License (AGPL), Version 3 or later; **OR**
- Commercial license terms from OpenIMSDK.
If you wish to use this software under commercial terms, please contact us at: contact@openim.io
For more information, see: https://www.openim.io/en/licensing

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
v3.8.3-patch.3
v3.8.2-alpha.4

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

15
package-lock.json generated
View File

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

View File

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

View File

@@ -623,19 +623,13 @@ class OpenIMSDK
'__stdcall',
'get_friend_application_list_as_recipient',
'void',
['baseCallback *', 'str', 'str']
['baseCallback *', 'str']
);
this.libOpenIMSDK.get_friend_application_list_as_applicant = this.lib.func(
'__stdcall',
'get_friend_application_list_as_applicant',
'void',
['baseCallback *', 'str', 'str']
);
this.libOpenIMSDK.get_friend_application_unhandled_count = this.lib.func(
'__stdcall',
'get_friend_application_unhandled_count',
'void',
['baseCallback *', 'str', 'str']
['baseCallback *', 'str']
);
this.libOpenIMSDK.accept_friend_application = this.lib.func(
'__stdcall',
@@ -795,19 +789,13 @@ class OpenIMSDK
'__stdcall',
'get_group_application_list_as_recipient',
'void',
['baseCallback *', 'str', 'str']
['baseCallback *', 'str']
);
this.libOpenIMSDK.get_group_application_list_as_applicant = this.lib.func(
'__stdcall',
'get_group_application_list_as_applicant',
'void',
['baseCallback *', 'str', 'str']
);
this.libOpenIMSDK.get_group_application_unhandled_count = this.lib.func(
'__stdcall',
'get_group_application_unhandled_count',
'void',
['baseCallback *', 'str', 'str']
['baseCallback *', 'str']
);
this.libOpenIMSDK.accept_group_application = this.lib.func(
'__stdcall',
@@ -953,12 +941,6 @@ class OpenIMSDK
'void',
['baseCallback *', 'str', 'str', 'str', 'int', 'int', 'int']
);
this.libOpenIMSDK.fetch_surrounding_messages = this.lib.func(
'__stdcall',
'fetch_surrounding_messages',
'void',
['baseCallback *', 'str', 'str']
);
}
};
@@ -1307,7 +1289,6 @@ class OpenIMSDK
) => Promise<BaseResponse<void>>;
getFriendApplicationListAsApplicant!: FriendModuleApi['getFriendApplicationListAsApplicant'];
getFriendApplicationListAsRecipient!: FriendModuleApi['getFriendApplicationListAsRecipient'];
getFriendApplicationUnhandledCount!: FriendModuleApi['getFriendApplicationUnhandledCount'];
getFriendList!: FriendModuleApi['getFriendList'];
getFriendListPage!: FriendModuleApi['getFriendListPage'];
getSpecifiedFriendsInfo!: FriendModuleApi['getSpecifiedFriendsInfo'];
@@ -1328,7 +1309,6 @@ class OpenIMSDK
setGroupInfo!: GroupModuleApi['setGroupInfo'];
getGroupApplicationListAsRecipient!: GroupModuleApi['getGroupApplicationListAsRecipient'];
getGroupApplicationListAsApplicant!: GroupModuleApi['getGroupApplicationListAsApplicant'];
getGroupApplicationUnhandledCount!: GroupModuleApi['getGroupApplicationUnhandledCount'];
acceptGroupApplication!: GroupModuleApi['acceptGroupApplication'];
refuseGroupApplication!: GroupModuleApi['refuseGroupApplication'];
getGroupMemberList!: GroupModuleApi['getGroupMemberList'];
@@ -1398,7 +1378,6 @@ class OpenIMSDK
createFileMessageByURL!: MessageModuleApi['createFileMessageByURL'];
getAdvancedHistoryMessageList!: MessageModuleApi['getAdvancedHistoryMessageList'];
getAdvancedHistoryMessageListReverse!: MessageModuleApi['getAdvancedHistoryMessageListReverse'];
fetchSurroundingMessages!: MessageModuleApi['fetchSurroundingMessages'];
sendMessage!: MessageModuleApi['sendMessage'];
sendMessageNotOss!: MessageModuleApi['sendMessageNotOss'];
findMessageList!: MessageModuleApi['findMessageList'];

View File

@@ -6,9 +6,6 @@ import {
AccessFriendApplicationParams,
AddBlackParams,
AddFriendParams,
GetFriendApplicationListAsApplicationParams,
GetFriendApplicationListAsRecipientParams,
GetSelfUnhandledApplyCountParams,
GetSpecifiedFriendsParams,
OffsetParams,
PinFriendParams,
@@ -96,45 +93,19 @@ export function setupFriendModule(openIMSDK: OpenIMSDK) {
);
}),
getFriendApplicationListAsApplicant: (
params: GetFriendApplicationListAsApplicationParams = {
offset: 0,
count: 0,
},
opid = uuidV4()
) =>
getFriendApplicationListAsApplicant: (opid = uuidV4()) =>
new Promise<BaseResponse<FriendApplicationItem[]>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.get_friend_application_list_as_applicant(
openIMSDK.baseCallbackWrap<FriendApplicationItem[]>(resolve, reject),
opid,
JSON.stringify(params)
opid
);
}),
getFriendApplicationListAsRecipient: (
params: GetFriendApplicationListAsRecipientParams = {
handleResults: [],
offset: 0,
count: 0,
},
opid = uuidV4()
) =>
getFriendApplicationListAsRecipient: (opid = uuidV4()) =>
new Promise<BaseResponse<FriendApplicationItem[]>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.get_friend_application_list_as_recipient(
openIMSDK.baseCallbackWrap<FriendApplicationItem[]>(resolve, reject),
opid,
JSON.stringify(params)
);
}),
getFriendApplicationUnhandledCount: (
params: GetSelfUnhandledApplyCountParams,
opid = uuidV4()
) =>
new Promise<BaseResponse<number>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.get_friend_application_unhandled_count(
openIMSDK.baseCallbackWrap<number>(resolve, reject),
opid,
JSON.stringify(params)
opid
);
}),
@@ -256,17 +227,11 @@ export interface FriendModuleApi {
) => Promise<BaseResponse<void>>;
getBlackList: (opid?: string) => Promise<BaseResponse<BlackUserItem[]>>;
getFriendApplicationListAsApplicant: (
params: GetFriendApplicationListAsApplicationParams,
opid?: string
) => Promise<BaseResponse<FriendApplicationItem[]>>;
getFriendApplicationListAsRecipient: (
params: GetFriendApplicationListAsRecipientParams,
opid?: string
) => Promise<BaseResponse<FriendApplicationItem[]>>;
getFriendApplicationUnhandledCount: (
params: GetSelfUnhandledApplyCountParams,
opid?: string
) => Promise<BaseResponse<number>>;
getFriendList: (
filterBlack?: boolean,
opid?: string

View File

@@ -20,8 +20,6 @@ import {
TransferGroupParams,
AccessToGroupParams,
OffsetParams,
GetSelfUnhandledApplyCountParams,
GetGroupApplicationListParams,
} from '@openim/wasm-client-sdk/lib/types/params';
export function setupGroupModule(openIMSDK: OpenIMSDK) {
@@ -103,49 +101,19 @@ export function setupGroupModule(openIMSDK: OpenIMSDK) {
);
}),
getGroupApplicationListAsRecipient: (
params: GetGroupApplicationListParams = {
groupID: [],
handleResults: [],
offset: 0,
count: 0,
},
opid = uuidV4()
) =>
getGroupApplicationListAsRecipient: (opid = uuidV4()) =>
new Promise<BaseResponse<GroupApplicationItem[]>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.get_group_application_list_as_recipient(
openIMSDK.baseCallbackWrap<GroupApplicationItem[]>(resolve, reject),
opid,
JSON.stringify(params)
opid
);
}),
getGroupApplicationListAsApplicant: (
params: GetGroupApplicationListParams = {
groupID: [],
handleResults: [],
offset: 0,
count: 0,
},
opid = uuidV4()
) =>
getGroupApplicationListAsApplicant: (opid = uuidV4()) =>
new Promise<BaseResponse<GroupApplicationItem[]>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.get_group_application_list_as_applicant(
openIMSDK.baseCallbackWrap<GroupApplicationItem[]>(resolve, reject),
opid,
JSON.stringify(params)
);
}),
getGroupApplicationUnhandledCount: (
params: GetSelfUnhandledApplyCountParams,
opid = uuidV4()
) =>
new Promise<BaseResponse<number>>((resolve, reject) => {
openIMSDK.libOpenIMSDK.get_group_application_unhandled_count(
openIMSDK.baseCallbackWrap<number>(resolve, reject),
opid,
JSON.stringify(params)
opid
);
}),
@@ -363,17 +331,11 @@ export interface GroupModuleApi {
opid?: string
) => Promise<BaseResponse<void>>;
getGroupApplicationListAsRecipient: (
params: GetGroupApplicationListParams,
opid?: string
) => Promise<BaseResponse<GroupApplicationItem[]>>;
getGroupApplicationListAsApplicant: (
params: GetGroupApplicationListParams,
opid?: string
) => Promise<BaseResponse<GroupApplicationItem[]>>;
getGroupApplicationUnhandledCount: (
params: GetSelfUnhandledApplyCountParams,
opid?: string
) => Promise<BaseResponse<number>>;
acceptGroupApplication: (
params: AccessGroupApplicationParams,
opid?: string

View File

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

View File

@@ -233,11 +233,6 @@ declare module 'libOpenIMSDK' {
operationID: string,
getMessageOptions: string
): void;
fetch_surrounding_messages(
cCallback: CB_S_I_S_S,
operationID: string,
fetchSurroundingMessagesOptions: string
): void;
revoke_message(
cCallback: CB_S_I_S_S,
operationID: string,
@@ -408,18 +403,11 @@ declare module 'libOpenIMSDK' {
): void;
get_friend_application_list_as_recipient(
cCallback: CB_S_I_S_S,
operationID: string,
param: string
operationID: string
): void;
get_friend_application_list_as_applicant(
cCallback: CB_S_I_S_S,
operationID: string,
param: string
): void;
get_friend_application_unhandled_count(
cCallback: CB_S_I_S_S,
operationID: string,
param: string
operationID: string
): void;
accept_friend_application(
cCallback: CB_S_I_S_S,
@@ -576,18 +564,11 @@ declare module 'libOpenIMSDK' {
): void;
get_group_application_list_as_recipient(
cCallback: CB_S_I_S_S,
operationID: string,
param: string
operationID: string
): void;
get_group_application_list_as_applicant(
cCallback: CB_S_I_S_S,
operationID: string,
param: string
): void;
get_group_application_unhandled_count(
cCallback: CB_S_I_S_S,
operationID: string,
param: string
operationID: string
): void;
accept_group_application(
cCallback: CB_S_I_S_S,