2019-04-24 20:52:26 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2019-05-07 04:35:42 +02:00
|
|
|
|
using System.Threading;
|
2019-04-24 20:52:26 +02:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Bit.Core.Models.View;
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Abstractions
|
|
|
|
|
{
|
|
|
|
|
public interface ISearchService
|
|
|
|
|
{
|
|
|
|
|
void ClearIndex();
|
|
|
|
|
Task IndexCiphersAsync();
|
|
|
|
|
bool IsSearchable(string query);
|
|
|
|
|
Task<List<CipherView>> SearchCiphersAsync(string query, Func<CipherView, bool> filter = null,
|
2020-05-20 19:35:20 +02:00
|
|
|
|
List<CipherView> ciphers = null, CancellationToken ct = default);
|
2019-05-07 04:35:42 +02:00
|
|
|
|
List<CipherView> SearchCiphersBasic(List<CipherView> ciphers, string query,
|
2020-05-20 19:35:20 +02:00
|
|
|
|
CancellationToken ct = default, bool deleted = false);
|
2021-02-11 01:50:10 +01:00
|
|
|
|
Task<List<SendView>> SearchSendsAsync(string query, Func<SendView, bool> filter = null,
|
|
|
|
|
List<SendView> sends = null, CancellationToken ct = default);
|
|
|
|
|
List<SendView> SearchSendsBasic(List<SendView> sends, string query,
|
|
|
|
|
CancellationToken ct = default, bool deleted = false);
|
2019-04-24 20:52:26 +02:00
|
|
|
|
}
|
2020-05-20 19:35:20 +02:00
|
|
|
|
}
|