Skip to content

Commit

Permalink
feat: swiched BasicMessageRecord & GenericRecord from Partial to Quer…
Browse files Browse the repository at this point in the history
…y type

Signed-off-by: Jim Ezesinachi <[email protected]>
  • Loading branch information
jimezesinachi committed Oct 6, 2022
1 parent f1a13ab commit 01a7b45
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { DependencyManager } from '../../plugins'
import type { BasicMessageTags } from './repository/BasicMessageRecord'
import type { Query } from '../../storage/StorageService'
import type { BasicMessageRecord } from './repository/BasicMessageRecord'

import { Dispatcher } from '../../agent/Dispatcher'
import { MessageSender } from '../../agent/MessageSender'
Expand Down Expand Up @@ -38,7 +39,7 @@ export class BasicMessagesModule {
await this.messageSender.sendMessage(outboundMessage)
}

public async findAllByQuery(query: Partial<BasicMessageTags>) {
public async findAllByQuery(query: Query<BasicMessageRecord>) {
return this.basicMessageService.findAllByQuery(query)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { InboundMessageContext } from '../../../agent/models/InboundMessageContext'
import type { Query } from '../../../storage/StorageService'
import type { ConnectionRecord } from '../../connections/repository/ConnectionRecord'
import type { BasicMessageStateChangedEvent } from '../BasicMessageEvents'
import type { BasicMessageTags } from '../repository'

import { EventEmitter } from '../../../agent/EventEmitter'
import { injectable } from '../../../plugins'
Expand Down Expand Up @@ -61,7 +61,7 @@ export class BasicMessageService {
})
}

public async findAllByQuery(query: Partial<BasicMessageTags>) {
public async findAllByQuery(query: Query<BasicMessageRecord>) {
return this.basicMessageRepository.findByQuery(query)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Logger } from '../../logger'
import type { DependencyManager } from '../../plugins'
import type { GenericRecord, GenericRecordTags, SaveGenericRecordOption } from './repository/GenericRecord'
import type { Query } from '../../storage/StorageService'
import type { GenericRecord, SaveGenericRecordOption } from './repository/GenericRecord'

import { AgentConfig } from '../../agent/AgentConfig'
import { injectable, module } from '../../plugins'
Expand Down Expand Up @@ -74,7 +75,7 @@ export class GenericRecordsModule {
return this.genericRecordsService.findById(id)
}

public async findAllByQuery(query: Partial<GenericRecordTags>): Promise<GenericRecord[]> {
public async findAllByQuery(query: Query<GenericRecord>): Promise<GenericRecord[]> {
return this.genericRecordsService.findAllByQuery(query)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { GenericRecordTags, SaveGenericRecordOption } from '../repository/GenericRecord'
import type { Query } from '../../../storage/StorageService'
import type { SaveGenericRecordOption } from '../repository/GenericRecord'

import { AriesFrameworkError } from '../../../error'
import { injectable } from '../../../plugins'
Expand Down Expand Up @@ -50,7 +51,7 @@ export class GenericRecordService {
}
}

public async findAllByQuery(query: Partial<GenericRecordTags>) {
public async findAllByQuery(query: Query<GenericRecord>) {
return this.genericRecordsRepository.findByQuery(query)
}

Expand Down

0 comments on commit 01a7b45

Please sign in to comment.