mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 06:22:43 +00:00
nodejs: load libsimplex at runtime per backend
This commit is contained in:
1 parent
a5ceeac000
commit
80182a7237
49 files changed
+549
-495
No files matched your search
@@ -6,7 +6,7 @@
|
||||
|
||||
# Class: ChatApi
|
||||
|
||||
Defined in: [src/api.ts:97](../src/api.ts#L97)
|
||||
Defined in: [src/api.ts:95](../src/api.ts#L95)
|
||||
|
||||
Main API class for interacting with the chat core library.
|
||||
|
||||
@@ -16,7 +16,7 @@ Main API class for interacting with the chat core library.
|
||||
|
||||
> `protected` **ctrl\_**: `bigint` \| `undefined`
|
||||
|
||||
Defined in: [src/api.ts:103](../src/api.ts#L103)
|
||||
Defined in: [src/api.ts:101](../src/api.ts#L101)
|
||||
|
||||
## Accessors
|
||||
|
||||
@@ -26,7 +26,7 @@ Defined in: [src/api.ts:103](../src/api.ts#L103)
|
||||
|
||||
> **get** **ctrl**(): `bigint`
|
||||
|
||||
Defined in: [src/api.ts:344](../src/api.ts#L344)
|
||||
Defined in: [src/api.ts:343](../src/api.ts#L343)
|
||||
|
||||
Chat controller reference
|
||||
|
||||
@@ -42,7 +42,7 @@ Chat controller reference
|
||||
|
||||
> **get** **initialized**(): `boolean`
|
||||
|
||||
Defined in: [src/api.ts:330](../src/api.ts#L330)
|
||||
Defined in: [src/api.ts:329](../src/api.ts#L329)
|
||||
|
||||
Chat controller is initialized
|
||||
|
||||
@@ -58,7 +58,7 @@ Chat controller is initialized
|
||||
|
||||
> **get** **started**(): `boolean`
|
||||
|
||||
Defined in: [src/api.ts:337](../src/api.ts#L337)
|
||||
Defined in: [src/api.ts:336](../src/api.ts#L336)
|
||||
|
||||
Chat controller is started
|
||||
|
||||
@@ -72,7 +72,7 @@ Chat controller is started
|
||||
|
||||
> **apiAcceptContactRequest**(`contactReqId`): `Promise`\<`Contact`\>
|
||||
|
||||
Defined in: [src/api.ts:750](../src/api.ts#L750)
|
||||
Defined in: [src/api.ts:749](../src/api.ts#L749)
|
||||
|
||||
Accept contact request.
|
||||
Network usage: interactive.
|
||||
@@ -93,7 +93,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiAcceptMember**(`groupId`, `groupMemberId`, `memberRole`): `Promise`\<`GroupMember`\>
|
||||
|
||||
Defined in: [src/api.ts:570](../src/api.ts#L570)
|
||||
Defined in: [src/api.ts:569](../src/api.ts#L569)
|
||||
|
||||
Accept group member. Requires Admin role.
|
||||
Network usage: background.
|
||||
@@ -122,7 +122,7 @@ Network usage: background.
|
||||
|
||||
> **apiAddMember**(`groupId`, `contactId`, `memberRole`): `Promise`\<`GroupMember`\>
|
||||
|
||||
Defined in: [src/api.ts:550](../src/api.ts#L550)
|
||||
Defined in: [src/api.ts:549](../src/api.ts#L549)
|
||||
|
||||
Add contact to group. Requires bot to have Admin role.
|
||||
Network usage: interactive.
|
||||
@@ -151,7 +151,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiBlockMembersForAll**(`groupId`, `groupMemberIds`, `blocked`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:590](../src/api.ts#L590)
|
||||
Defined in: [src/api.ts:589](../src/api.ts#L589)
|
||||
|
||||
Block members. Requires Moderator role.
|
||||
Network usage: background.
|
||||
@@ -180,7 +180,7 @@ Network usage: background.
|
||||
|
||||
> **apiCancelFile**(`fileId`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:540](../src/api.ts#L540)
|
||||
Defined in: [src/api.ts:539](../src/api.ts#L539)
|
||||
|
||||
Cancel file.
|
||||
Network usage: background.
|
||||
@@ -201,7 +201,7 @@ Network usage: background.
|
||||
|
||||
> **apiChatItemReaction**(`chatType`, `chatId`, `chatItemId`, `add`, `reaction`): `Promise`\<`ACIReaction`\>
|
||||
|
||||
Defined in: [src/api.ts:513](../src/api.ts#L513)
|
||||
Defined in: [src/api.ts:512](../src/api.ts#L512)
|
||||
|
||||
Add/remove message reaction.
|
||||
Network usage: background.
|
||||
@@ -238,7 +238,7 @@ Network usage: background.
|
||||
|
||||
> **apiConnect**(`userId`, `incognito`, `preparedLink`): `Promise`\<[`ConnReqType`](api.Enumeration.ConnReqType.md)\>
|
||||
|
||||
Defined in: [src/api.ts:719](../src/api.ts#L719)
|
||||
Defined in: [src/api.ts:718](../src/api.ts#L718)
|
||||
|
||||
Connect via prepared SimpleX link. The link can be 1-time invitation link, contact address or group link
|
||||
Network usage: interactive.
|
||||
@@ -267,7 +267,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiConnectActiveUser**(`connLink`): `Promise`\<[`ConnReqType`](api.Enumeration.ConnReqType.md)\>
|
||||
|
||||
Defined in: [src/api.ts:728](../src/api.ts#L728)
|
||||
Defined in: [src/api.ts:727](../src/api.ts#L727)
|
||||
|
||||
Connect via SimpleX link as string in the active user profile.
|
||||
Network usage: interactive.
|
||||
@@ -288,7 +288,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiConnectPlan**(`userId`, `connectionLink`): `Promise`\<\[`ConnectionPlan`, `CreatedConnLink`\]\>
|
||||
|
||||
Defined in: [src/api.ts:709](../src/api.ts#L709)
|
||||
Defined in: [src/api.ts:708](../src/api.ts#L708)
|
||||
|
||||
Determine SimpleX link type and if the bot is already connected via this link.
|
||||
Network usage: interactive.
|
||||
@@ -313,7 +313,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiCreateActiveUser**(`profile?`): `Promise`\<`User`\>
|
||||
|
||||
Defined in: [src/api.ts:887](../src/api.ts#L887)
|
||||
Defined in: [src/api.ts:886](../src/api.ts#L886)
|
||||
|
||||
Create new user profile
|
||||
Network usage: no.
|
||||
@@ -334,7 +334,7 @@ Network usage: no.
|
||||
|
||||
> **apiCreateGroupLink**(`groupId`, `memberRole`): `Promise`\<`string`\>
|
||||
|
||||
Defined in: [src/api.ts:650](../src/api.ts#L650)
|
||||
Defined in: [src/api.ts:649](../src/api.ts#L649)
|
||||
|
||||
Create group link.
|
||||
Network usage: interactive.
|
||||
@@ -359,7 +359,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiCreateLink**(`userId`): `Promise`\<`string`\>
|
||||
|
||||
Defined in: [src/api.ts:696](../src/api.ts#L696)
|
||||
Defined in: [src/api.ts:695](../src/api.ts#L695)
|
||||
|
||||
Create 1-time invitation link.
|
||||
Network usage: interactive.
|
||||
@@ -380,7 +380,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiCreateMemberContact**(`groupId`, `groupMemberId`): `Promise`\<`Contact`\>
|
||||
|
||||
Defined in: [src/api.ts:953](../src/api.ts#L953)
|
||||
Defined in: [src/api.ts:952](../src/api.ts#L952)
|
||||
|
||||
Create a direct message contact with a group member.
|
||||
Returns the created contact.
|
||||
@@ -406,7 +406,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiCreateUserAddress**(`userId`): `Promise`\<`CreatedConnLink`\>
|
||||
|
||||
Defined in: [src/api.ts:361](../src/api.ts#L361)
|
||||
Defined in: [src/api.ts:360](../src/api.ts#L360)
|
||||
|
||||
Create bot address.
|
||||
Network usage: interactive.
|
||||
@@ -427,7 +427,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiDeleteChat**(`chatType`, `chatId`, `deleteMode?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:809](../src/api.ts#L809)
|
||||
Defined in: [src/api.ts:808](../src/api.ts#L808)
|
||||
|
||||
Delete chat.
|
||||
Network usage: background.
|
||||
@@ -456,7 +456,7 @@ Network usage: background.
|
||||
|
||||
> **apiDeleteChatItems**(`chatType`, `chatId`, `chatItemIds`, `deleteMode`): `Promise`\<`ChatItemDeletion`[]\>
|
||||
|
||||
Defined in: [src/api.ts:488](../src/api.ts#L488)
|
||||
Defined in: [src/api.ts:487](../src/api.ts#L487)
|
||||
|
||||
Delete message.
|
||||
Network usage: background.
|
||||
@@ -489,7 +489,7 @@ Network usage: background.
|
||||
|
||||
> **apiDeleteGroupLink**(`groupId`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:672](../src/api.ts#L672)
|
||||
Defined in: [src/api.ts:671](../src/api.ts#L671)
|
||||
|
||||
Delete group link.
|
||||
Network usage: background.
|
||||
@@ -510,7 +510,7 @@ Network usage: background.
|
||||
|
||||
> **apiDeleteMemberChatItem**(`groupId`, `chatItemIds`): `Promise`\<`ChatItemDeletion`[]\>
|
||||
|
||||
Defined in: [src/api.ts:503](../src/api.ts#L503)
|
||||
Defined in: [src/api.ts:502](../src/api.ts#L502)
|
||||
|
||||
Moderate message. Requires Moderator role (and higher than message author's).
|
||||
Network usage: background.
|
||||
@@ -535,7 +535,7 @@ Network usage: background.
|
||||
|
||||
> **apiDeleteUser**(`userId`, `delSMPQueues`, `viewPwd?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:917](../src/api.ts#L917)
|
||||
Defined in: [src/api.ts:916](../src/api.ts#L916)
|
||||
|
||||
Delete user profile.
|
||||
Network usage: background.
|
||||
@@ -564,7 +564,7 @@ Network usage: background.
|
||||
|
||||
> **apiDeleteUserAddress**(`userId`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:371](../src/api.ts#L371)
|
||||
Defined in: [src/api.ts:370](../src/api.ts#L370)
|
||||
|
||||
Deletes a user address.
|
||||
Network usage: background.
|
||||
@@ -585,7 +585,7 @@ Network usage: background.
|
||||
|
||||
> **apiGetActiveUser**(): `Promise`\<`User` \| `undefined`\>
|
||||
|
||||
Defined in: [src/api.ts:867](../src/api.ts#L867)
|
||||
Defined in: [src/api.ts:866](../src/api.ts#L866)
|
||||
|
||||
Get active user profile
|
||||
Network usage: no.
|
||||
@@ -600,7 +600,7 @@ Network usage: no.
|
||||
|
||||
> **apiGetChat**(`chatType`, `chatId`, `count`): `Promise`\<`any`\>
|
||||
|
||||
Defined in: [src/api.ts:857](../src/api.ts#L857)
|
||||
Defined in: [src/api.ts:856](../src/api.ts#L856)
|
||||
|
||||
Get chat items.
|
||||
Network usage: no.
|
||||
@@ -629,7 +629,7 @@ Network usage: no.
|
||||
|
||||
> **apiGetChats**(`userId`, `pagination`, `query?`, `pendingConnections?`): `Promise`\<`AChat`[]\>
|
||||
|
||||
Defined in: [src/api.ts:794](../src/api.ts#L794)
|
||||
Defined in: [src/api.ts:793](../src/api.ts#L793)
|
||||
|
||||
Get chat previews (paginated).
|
||||
Network usage: no.
|
||||
@@ -666,7 +666,7 @@ on large databases.
|
||||
|
||||
> **apiGetGroupLink**(`groupId`): `Promise`\<`GroupLink`\>
|
||||
|
||||
Defined in: [src/api.ts:681](../src/api.ts#L681)
|
||||
Defined in: [src/api.ts:680](../src/api.ts#L680)
|
||||
|
||||
Get group link.
|
||||
Network usage: no.
|
||||
@@ -687,7 +687,7 @@ Network usage: no.
|
||||
|
||||
> **apiGetGroupLinkStr**(`groupId`): `Promise`\<`string`\>
|
||||
|
||||
Defined in: [src/api.ts:687](../src/api.ts#L687)
|
||||
Defined in: [src/api.ts:686](../src/api.ts#L686)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -705,7 +705,7 @@ Defined in: [src/api.ts:687](../src/api.ts#L687)
|
||||
|
||||
> **apiGetUserAddress**(`userId`): `Promise`\<`UserContactLink` \| `undefined`\>
|
||||
|
||||
Defined in: [src/api.ts:381](../src/api.ts#L381)
|
||||
Defined in: [src/api.ts:380](../src/api.ts#L380)
|
||||
|
||||
Get bot address and settings.
|
||||
Network usage: no.
|
||||
@@ -726,7 +726,7 @@ Network usage: no.
|
||||
|
||||
> **apiJoinGroup**(`groupId`): `Promise`\<`GroupInfo`\>
|
||||
|
||||
Defined in: [src/api.ts:560](../src/api.ts#L560)
|
||||
Defined in: [src/api.ts:559](../src/api.ts#L559)
|
||||
|
||||
Join group.
|
||||
Network usage: interactive.
|
||||
@@ -747,7 +747,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiLeaveGroup**(`groupId`): `Promise`\<`GroupInfo`\>
|
||||
|
||||
Defined in: [src/api.ts:610](../src/api.ts#L610)
|
||||
Defined in: [src/api.ts:609](../src/api.ts#L609)
|
||||
|
||||
Leave group.
|
||||
Network usage: background.
|
||||
@@ -768,7 +768,7 @@ Network usage: background.
|
||||
|
||||
> **apiListContacts**(`userId`): `Promise`\<`Contact`[]\>
|
||||
|
||||
Defined in: [src/api.ts:770](../src/api.ts#L770)
|
||||
Defined in: [src/api.ts:769](../src/api.ts#L769)
|
||||
|
||||
Get contacts.
|
||||
Network usage: no.
|
||||
@@ -789,7 +789,7 @@ Network usage: no.
|
||||
|
||||
> **apiListGroups**(`userId`, `contactId?`, `search?`): `Promise`\<`GroupInfo`[]\>
|
||||
|
||||
Defined in: [src/api.ts:780](../src/api.ts#L780)
|
||||
Defined in: [src/api.ts:779](../src/api.ts#L779)
|
||||
|
||||
Get groups.
|
||||
Network usage: no.
|
||||
@@ -818,7 +818,7 @@ Network usage: no.
|
||||
|
||||
> **apiListMembers**(`groupId`): `Promise`\<`GroupMember`[]\>
|
||||
|
||||
Defined in: [src/api.ts:620](../src/api.ts#L620)
|
||||
Defined in: [src/api.ts:619](../src/api.ts#L619)
|
||||
|
||||
Get group members.
|
||||
Network usage: no.
|
||||
@@ -839,7 +839,7 @@ Network usage: no.
|
||||
|
||||
> **apiListUsers**(): `Promise`\<`UserInfo`[]\>
|
||||
|
||||
Defined in: [src/api.ts:897](../src/api.ts#L897)
|
||||
Defined in: [src/api.ts:896](../src/api.ts#L896)
|
||||
|
||||
Get all user profiles
|
||||
Network usage: no.
|
||||
@@ -854,7 +854,7 @@ Network usage: no.
|
||||
|
||||
> **apiNewGroup**(`userId`, `groupProfile`): `Promise`\<`GroupInfo`\>
|
||||
|
||||
Defined in: [src/api.ts:630](../src/api.ts#L630)
|
||||
Defined in: [src/api.ts:629](../src/api.ts#L629)
|
||||
|
||||
Create group.
|
||||
Network usage: no.
|
||||
@@ -879,7 +879,7 @@ Network usage: no.
|
||||
|
||||
> **apiReceiveFile**(`fileId`): `Promise`\<`AChatItem`\>
|
||||
|
||||
Defined in: [src/api.ts:529](../src/api.ts#L529)
|
||||
Defined in: [src/api.ts:528](../src/api.ts#L528)
|
||||
|
||||
Receive file.
|
||||
Network usage: no.
|
||||
@@ -900,7 +900,7 @@ Network usage: no.
|
||||
|
||||
> **apiRejectContactRequest**(`contactReqId`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:760](../src/api.ts#L760)
|
||||
Defined in: [src/api.ts:759](../src/api.ts#L759)
|
||||
|
||||
Reject contact request. The user who sent the request is **not notified**.
|
||||
Network usage: no.
|
||||
@@ -921,7 +921,7 @@ Network usage: no.
|
||||
|
||||
> **apiRemoveMembers**(`groupId`, `memberIds`, `withMessages?`): `Promise`\<`GroupMember`[]\>
|
||||
|
||||
Defined in: [src/api.ts:600](../src/api.ts#L600)
|
||||
Defined in: [src/api.ts:599](../src/api.ts#L599)
|
||||
|
||||
Remove members. Requires Admin role.
|
||||
Network usage: background.
|
||||
@@ -950,7 +950,7 @@ Network usage: background.
|
||||
|
||||
> **apiSendMemberContactInvitation**(`contactId`, `message?`): `Promise`\<`Contact`\>
|
||||
|
||||
Defined in: [src/api.ts:964](../src/api.ts#L964)
|
||||
Defined in: [src/api.ts:963](../src/api.ts#L963)
|
||||
|
||||
Send a direct message invitation to a group member contact.
|
||||
The contact must have been created with [apiCreateMemberContact](#apicreatemembercontact).
|
||||
@@ -976,7 +976,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiSendMessages**(`chat`, `messages`, `liveMessage?`): `Promise`\<`AChatItem`[]\>
|
||||
|
||||
Defined in: [src/api.ts:432](../src/api.ts#L432)
|
||||
Defined in: [src/api.ts:431](../src/api.ts#L431)
|
||||
|
||||
Send messages.
|
||||
Network usage: background.
|
||||
@@ -1005,7 +1005,7 @@ Network usage: background.
|
||||
|
||||
> **apiSendTextMessage**(`chat`, `text`, `inReplyTo?`): `Promise`\<`AChatItem`[]\>
|
||||
|
||||
Defined in: [src/api.ts:455](../src/api.ts#L455)
|
||||
Defined in: [src/api.ts:454](../src/api.ts#L454)
|
||||
|
||||
Send text message.
|
||||
Network usage: background.
|
||||
@@ -1034,7 +1034,7 @@ Network usage: background.
|
||||
|
||||
> **apiSendTextReply**(`chatItem`, `text`): `Promise`\<`AChatItem`[]\>
|
||||
|
||||
Defined in: [src/api.ts:463](../src/api.ts#L463)
|
||||
Defined in: [src/api.ts:462](../src/api.ts#L462)
|
||||
|
||||
Send text message in reply to received message.
|
||||
Network usage: background.
|
||||
@@ -1059,7 +1059,7 @@ Network usage: background.
|
||||
|
||||
> **apiSetActiveUser**(`userId`, `viewPwd?`): `Promise`\<`User`\>
|
||||
|
||||
Defined in: [src/api.ts:907](../src/api.ts#L907)
|
||||
Defined in: [src/api.ts:906](../src/api.ts#L906)
|
||||
|
||||
Set active user profile
|
||||
Network usage: no.
|
||||
@@ -1084,7 +1084,7 @@ Network usage: no.
|
||||
|
||||
> **apiSetAddressSettings**(`userId`, `__namedParameters`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:415](../src/api.ts#L415)
|
||||
Defined in: [src/api.ts:414](../src/api.ts#L414)
|
||||
|
||||
Set bot address settings.
|
||||
Network usage: interactive.
|
||||
@@ -1109,7 +1109,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiSetAutoAcceptMemberContacts**(`userId`, `onOff`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:846](../src/api.ts#L846)
|
||||
Defined in: [src/api.ts:845](../src/api.ts#L845)
|
||||
|
||||
Set auto-accept member contacts.
|
||||
Network usage: no.
|
||||
@@ -1134,7 +1134,7 @@ Network usage: no.
|
||||
|
||||
> **apiSetContactCustomData**(`contactId`, `customData?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:836](../src/api.ts#L836)
|
||||
Defined in: [src/api.ts:835](../src/api.ts#L835)
|
||||
|
||||
Set contact custom data.
|
||||
Network usage: no.
|
||||
@@ -1159,7 +1159,7 @@ Network usage: no.
|
||||
|
||||
> **apiSetContactPrefs**(`contactId`, `preferences`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:943](../src/api.ts#L943)
|
||||
Defined in: [src/api.ts:942](../src/api.ts#L942)
|
||||
|
||||
Configure chat preference overrides for the contact.
|
||||
Network usage: background.
|
||||
@@ -1184,7 +1184,7 @@ Network usage: background.
|
||||
|
||||
> **apiSetGroupCustomData**(`groupId`, `customData?`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:826](../src/api.ts#L826)
|
||||
Defined in: [src/api.ts:825](../src/api.ts#L825)
|
||||
|
||||
Set group custom data.
|
||||
Network usage: no.
|
||||
@@ -1209,7 +1209,7 @@ Network usage: no.
|
||||
|
||||
> **apiSetGroupLinkMemberRole**(`groupId`, `memberRole`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:663](../src/api.ts#L663)
|
||||
Defined in: [src/api.ts:662](../src/api.ts#L662)
|
||||
|
||||
Set member role for group link.
|
||||
Network usage: no.
|
||||
@@ -1234,7 +1234,7 @@ Network usage: no.
|
||||
|
||||
> **apiSetMembersRole**(`groupId`, `groupMemberIds`, `memberRole`): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:580](../src/api.ts#L580)
|
||||
Defined in: [src/api.ts:579](../src/api.ts#L579)
|
||||
|
||||
Set members role. Requires Admin role.
|
||||
Network usage: background.
|
||||
@@ -1263,7 +1263,7 @@ Network usage: background.
|
||||
|
||||
> **apiSetProfileAddress**(`userId`, `enable`): `Promise`\<`UserProfileUpdateSummary`\>
|
||||
|
||||
Defined in: [src/api.ts:399](../src/api.ts#L399)
|
||||
Defined in: [src/api.ts:398](../src/api.ts#L398)
|
||||
|
||||
Add address to bot profile.
|
||||
Network usage: interactive.
|
||||
@@ -1288,7 +1288,7 @@ Network usage: interactive.
|
||||
|
||||
> **apiUpdateChatItem**(`chatType`, `chatId`, `chatItemId`, `msgContent`, `liveMessage`): `Promise`\<`ChatItem`\>
|
||||
|
||||
Defined in: [src/api.ts:471](../src/api.ts#L471)
|
||||
Defined in: [src/api.ts:470](../src/api.ts#L470)
|
||||
|
||||
Update message.
|
||||
Network usage: background.
|
||||
@@ -1325,7 +1325,7 @@ Network usage: background.
|
||||
|
||||
> **apiUpdateGroupProfile**(`groupId`, `groupProfile`): `Promise`\<`GroupInfo`\>
|
||||
|
||||
Defined in: [src/api.ts:640](../src/api.ts#L640)
|
||||
Defined in: [src/api.ts:639](../src/api.ts#L639)
|
||||
|
||||
Update group profile.
|
||||
Network usage: background.
|
||||
@@ -1350,7 +1350,7 @@ Network usage: background.
|
||||
|
||||
> **apiUpdateProfile**(`userId`, `profile`): `Promise`\<`UserProfileUpdateSummary` \| `undefined`\>
|
||||
|
||||
Defined in: [src/api.ts:927](../src/api.ts#L927)
|
||||
Defined in: [src/api.ts:926](../src/api.ts#L926)
|
||||
|
||||
Update user profile.
|
||||
Network usage: background.
|
||||
@@ -1375,7 +1375,7 @@ Network usage: background.
|
||||
|
||||
> **close**(): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:158](../src/api.ts#L158)
|
||||
Defined in: [src/api.ts:157](../src/api.ts#L157)
|
||||
|
||||
Stop chat controller and close chat database.
|
||||
The database is not closed if stopping fails.
|
||||
@@ -1391,7 +1391,7 @@ Usually doesn't need to be called in chat bots.
|
||||
|
||||
> **off**\<`K`\>(`event`, `subscriber?`): `void`
|
||||
|
||||
Defined in: [src/api.ts:302](../src/api.ts#L302)
|
||||
Defined in: [src/api.ts:301](../src/api.ts#L301)
|
||||
|
||||
Unsubscribe all or a specific handler from a specific event.
|
||||
|
||||
@@ -1425,7 +1425,7 @@ An optional subscriber function for the event.
|
||||
|
||||
> **offAny**(`receiver?`): `void`
|
||||
|
||||
Defined in: [src/api.ts:318](../src/api.ts#L318)
|
||||
Defined in: [src/api.ts:317](../src/api.ts#L317)
|
||||
|
||||
Unsubscribe all or a specific handler from any events.
|
||||
|
||||
@@ -1449,7 +1449,7 @@ An optional subscriber function for the event.
|
||||
|
||||
> **on**\<`K`\>(`subscribers`): `void`
|
||||
|
||||
Defined in: [src/api.ts:212](../src/api.ts#L212)
|
||||
Defined in: [src/api.ts:211](../src/api.ts#L211)
|
||||
|
||||
Subscribe multiple event handlers at once.
|
||||
|
||||
@@ -1479,7 +1479,7 @@ If the same function is subscribed to event.
|
||||
|
||||
> **on**\<`K`\>(`event`, `subscriber`): `void`
|
||||
|
||||
Defined in: [src/api.ts:220](../src/api.ts#L220)
|
||||
Defined in: [src/api.ts:219](../src/api.ts#L219)
|
||||
|
||||
Subscribe a handler to a specific event.
|
||||
|
||||
@@ -1517,7 +1517,7 @@ If the same function is subscribed to event.
|
||||
|
||||
> **onAny**(`receiver`): `void`
|
||||
|
||||
Defined in: [src/api.ts:243](../src/api.ts#L243)
|
||||
Defined in: [src/api.ts:242](../src/api.ts#L242)
|
||||
|
||||
Subscribe a handler to any event.
|
||||
|
||||
@@ -1543,7 +1543,7 @@ If the same function is subscribed to event.
|
||||
|
||||
> **once**\<`K`\>(`event`, `subscriber`): `void`
|
||||
|
||||
Defined in: [src/api.ts:254](../src/api.ts#L254)
|
||||
Defined in: [src/api.ts:253](../src/api.ts#L253)
|
||||
|
||||
Subscribe a handler to a specific event to be delivered one time.
|
||||
|
||||
@@ -1581,7 +1581,7 @@ If the same function is subscribed to event.
|
||||
|
||||
> **recvChatEvent**(`wait?`): `Promise`\<`ChatEvent` \| `undefined`\>
|
||||
|
||||
Defined in: [src/api.ts:353](../src/api.ts#L353)
|
||||
Defined in: [src/api.ts:352](../src/api.ts#L352)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1599,7 +1599,7 @@ Defined in: [src/api.ts:353](../src/api.ts#L353)
|
||||
|
||||
> **sendChatCmd**(`cmd`): `Promise`\<`ChatResponse`\>
|
||||
|
||||
Defined in: [src/api.ts:349](../src/api.ts#L349)
|
||||
Defined in: [src/api.ts:348](../src/api.ts#L348)
|
||||
|
||||
#### Parameters
|
||||
|
||||
@@ -1617,7 +1617,7 @@ Defined in: [src/api.ts:349](../src/api.ts#L349)
|
||||
|
||||
> **startChat**(): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:124](../src/api.ts#L124)
|
||||
Defined in: [src/api.ts:123](../src/api.ts#L123)
|
||||
|
||||
Start chat controller. Must be called with the existing user profile.
|
||||
|
||||
@@ -1631,7 +1631,7 @@ Start chat controller. Must be called with the existing user profile.
|
||||
|
||||
> **stopChat**(): `Promise`\<`void`\>
|
||||
|
||||
Defined in: [src/api.ts:147](../src/api.ts#L147)
|
||||
Defined in: [src/api.ts:146](../src/api.ts#L146)
|
||||
|
||||
Stop chat controller.
|
||||
`close` calls it before closing the database.
|
||||
@@ -1649,7 +1649,7 @@ Usually doesn't need to be called in chat bots.
|
||||
|
||||
> **wait**\<`K`\>(`event`): `Promise`\<`ChatEvent` & `object`\>
|
||||
|
||||
Defined in: [src/api.ts:262](../src/api.ts#L262)
|
||||
Defined in: [src/api.ts:261](../src/api.ts#L261)
|
||||
|
||||
Waits for specific event, with an optional predicate.
|
||||
Returns `undefined` on timeout if specified.
|
||||
@@ -1674,7 +1674,7 @@ Returns `undefined` on timeout if specified.
|
||||
|
||||
> **wait**\<`K`\>(`event`, `predicate`): `Promise`\<`ChatEvent` & `object`\>
|
||||
|
||||
Defined in: [src/api.ts:263](../src/api.ts#L263)
|
||||
Defined in: [src/api.ts:262](../src/api.ts#L262)
|
||||
|
||||
Waits for specific event, with an optional predicate.
|
||||
Returns `undefined` on timeout if specified.
|
||||
@@ -1703,7 +1703,7 @@ Returns `undefined` on timeout if specified.
|
||||
|
||||
> **wait**\<`K`\>(`event`, `timeout`): `Promise`\<ChatEvent & \{ type: K; \} \| `undefined`\>
|
||||
|
||||
Defined in: [src/api.ts:264](../src/api.ts#L264)
|
||||
Defined in: [src/api.ts:263](../src/api.ts#L263)
|
||||
|
||||
Waits for specific event, with an optional predicate.
|
||||
Returns `undefined` on timeout if specified.
|
||||
@@ -1732,7 +1732,7 @@ Returns `undefined` on timeout if specified.
|
||||
|
||||
> **wait**\<`K`\>(`event`, `predicate`, `timeout`): `Promise`\<ChatEvent & \{ type: K; \} \| `undefined`\>
|
||||
|
||||
Defined in: [src/api.ts:265](../src/api.ts#L265)
|
||||
Defined in: [src/api.ts:264](../src/api.ts#L264)
|
||||
|
||||
Waits for specific event, with an optional predicate.
|
||||
Returns `undefined` on timeout if specified.
|
||||
@@ -1767,9 +1767,9 @@ Returns `undefined` on timeout if specified.
|
||||
|
||||
> `static` **init**(`db`, `confirm?`, `queueSize?`): `Promise`\<`ChatApi`\>
|
||||
|
||||
Defined in: [src/api.ts:111](../src/api.ts#L111)
|
||||
Defined in: [src/api.ts:109](../src/api.ts#L109)
|
||||
|
||||
Initializes the ChatApi.
|
||||
Initializes the ChatApi, loading libsimplex for `db.type` (downloaded on first use).
|
||||
|
||||
#### Parameters
|
||||
|
||||
|
||||
Reference in new issue
Block a user