Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

index.d.ts 1.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  1. import { Library, Session } from "botbuilder";
  2. // exported functions
  3. export function create(settings: ISearchDialogSettings): Library;
  4. export function begin(session: Session, args?: any): void;
  5. export function refine(session: Session, args?: any): void;
  6. export function defaultResultsMapper(itemMap: ItemMapper): SearchResultsMapper;
  7. declare type ItemMapper = (input: any) => ISearchHit;
  8. declare type SearchResultsMapper = (providerResults: ISearchResults) => ISearchResults;
  9. declare type RefineFormatter = (refiners: Array<string>) => any;
  10. // entities
  11. export interface ISearchDialogSettings {
  12. search: (query: IQuery) => PromiseLike<ISearchResults>;
  13. pageSize?: number;
  14. multipleSelection?: boolean;
  15. refiners?: Array<string>;
  16. refineFormatter?: RefineFormatter;
  17. }
  18. export interface IQuery {
  19. searchText: string;
  20. pageSize: number;
  21. pageNumber: number;
  22. filters: Array<IFacetFilter>;
  23. facets: Array<string>;
  24. }
  25. export interface ISearchResults {
  26. facets: Array<IFacet>;
  27. results: Array<ISearchHit>;
  28. }
  29. export interface ISearchHit {
  30. key: string;
  31. title: string;
  32. description: string;
  33. imageUrl?: string;
  34. }
  35. export interface IFacetFilter {
  36. key: string;
  37. value: any;
  38. }
  39. export interface IFacet {
  40. key: string;
  41. options: Array<IFacetValue>;
  42. }
  43. export interface IFacetValue {
  44. value: string;
  45. count: number;
  46. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...