search.ts 730 B

1234567891011121314151617181920212223242526272829303132
  1. import { IPageHasId } from './page';
  2. export enum CheckboxType {
  3. NONE_CHECKED = 'noneChecked',
  4. INDETERMINATE = 'indeterminate',
  5. ALL_CHECKED = 'allChecked',
  6. }
  7. export type IPageSearchResultData = {
  8. pageData: IPageHasId;
  9. pageMeta: {
  10. bookmarkCount?: number;
  11. elasticSearchResult?: {
  12. snippet: string;
  13. highlightedPath: string;
  14. isHtmlInPath: boolean;
  15. };
  16. };
  17. };
  18. export const SORT_AXIS = {
  19. RELATION_SCORE: 'relationScore',
  20. CREATED_AT: 'createdAt',
  21. UPDATED_AT: 'updatedAt',
  22. } as const;
  23. export type SORT_AXIS = typeof SORT_AXIS[keyof typeof SORT_AXIS];
  24. export const SORT_ORDER = {
  25. DESC: 'desc',
  26. ASC: 'asc',
  27. } as const;
  28. export type SORT_ORDER = typeof SORT_ORDER[keyof typeof SORT_ORDER];