Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Commit

Permalink
Fix interfaces (#74)
Browse files Browse the repository at this point in the history
* fix: messaging, contact, ctype interface

Co-authored-by: Raphael Flechtner <flechtner@galaniprojects.de>
  • Loading branch information
LeonFLK and rflechtner authored Aug 7, 2020
1 parent 33718dd commit 8bdaa55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/contacts/interfaces/contacts.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export interface Contact {
export interface ContactDB extends Document, Contact {}

export declare interface ContactsService {
add(contact: Contact): void
add(contact: Contact): Promise<void>
list(): Promise<Contact[]>
findByAddress(address: PublicIdentity['address']): Promise<Optional<Contact>>
removeAll(): void
removeAll(): Promise<void>
}
2 changes: 1 addition & 1 deletion src/ctypes/interfaces/ctype.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export declare interface CTypeService {
register(cType: CType): Promise<boolean>
findByHash(hash: ICType['hash']): Promise<Optional<CType>>
findAll(): Promise<CType[]>
removeAll(): void
removeAll(): Promise<void>
}
6 changes: 3 additions & 3 deletions src/messaging/interfaces/messaging.interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IEncryptedMessage } from '@kiltprotocol/sdk-js'
export interface MessageDB extends Document, IEncryptedMessage {}

export declare interface MessagingService {
add(message: IEncryptedMessage): void
add(message: IEncryptedMessage): Promise<void>

findBySenderAddress(
senderAddress: Contact['publicIdentity']['address']
Expand All @@ -15,7 +15,7 @@ export declare interface MessagingService {
receiverAddress: Contact['publicIdentity']['address']
): Promise<IEncryptedMessage[]>

remove(messageId: string): void
remove(messageId: string): Promise<void>

removeAll(): void
removeAll(): Promise<void>
}

0 comments on commit 8bdaa55

Please sign in to comment.