@only-chat/types 0.2.0-beta.15 → 0.2.0-beta.16
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/package.json +1 -1
- package/store.d.ts +7 -2
package/package.json
CHANGED
package/store.d.ts
CHANGED
|
@@ -94,6 +94,11 @@ export interface SaveResponse {
|
|
|
94
94
|
|
|
95
95
|
export type ConversationLastMessages = Record<string, { latest?: Message, left?: Date }>
|
|
96
96
|
|
|
97
|
+
export interface ConversationIdResult {
|
|
98
|
+
id?: string
|
|
99
|
+
result?: string
|
|
100
|
+
}
|
|
101
|
+
|
|
97
102
|
export interface ConversationsResult {
|
|
98
103
|
conversations: Conversation[]
|
|
99
104
|
from: number
|
|
@@ -105,9 +110,9 @@ export interface MessageStore {
|
|
|
105
110
|
findMessages: (r: FindRequest) => Promise<FindResult>
|
|
106
111
|
getLastMessagesTimestamps: (fromId: string, conversationId: string[]) => Promise<ConversationLastMessages>
|
|
107
112
|
getParticipantConversationById: (participant: string | undefined, id: string) => Promise<Conversation | undefined>
|
|
108
|
-
getParticipantConversations: (participant: string, ids
|
|
113
|
+
getParticipantConversations: (participant: string, ids?: string[], excludeIds?: string[], from?: number, size?: number) => Promise<ConversationsResult>
|
|
109
114
|
getParticipantLastMessage: (participant: string, conversationId: string) => Promise<Message | undefined>
|
|
110
|
-
getPeerToPeerConversationId(peer1: string, peer2: string): Promise<
|
|
115
|
+
getPeerToPeerConversationId(peer1: string, peer2: string): Promise<ConversationIdResult | undefined>
|
|
111
116
|
saveConnection: (userId: string, instanceId: string) => Promise<SaveResponse>
|
|
112
117
|
saveConversation: (c: Conversation) => Promise<SaveResponse>
|
|
113
118
|
saveMessage: (m: Message) => Promise<SaveResponse>
|