search.ts 699 B

12345678910111213141516171819202122232425262728293031
  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. },
  15. },
  16. }
  17. export const SORT_AXIS = {
  18. RELATION_SCORE: 'relationScore',
  19. CREATED_AT: 'createdAt',
  20. UPDATED_AT: 'updatedAt',
  21. } as const;
  22. export type SORT_AXIS = typeof SORT_AXIS[keyof typeof SORT_AXIS];
  23. export const SORT_ORDER = {
  24. DESC: 'desc',
  25. ASC: 'asc',
  26. } as const;
  27. export type SORT_ORDER = typeof SORT_ORDER[keyof typeof SORT_ORDER];