page-operation.ts 1015 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. export const PageActionType = {
  2. Create: 'Create',
  3. Update: 'Update',
  4. Rename: 'Rename',
  5. Duplicate: 'Duplicate',
  6. Delete: 'Delete',
  7. DeleteCompletely: 'DeleteCompletely',
  8. Revert: 'Revert',
  9. NormalizeParent: 'NormalizeParent',
  10. } as const;
  11. export type PageActionType = typeof PageActionType[keyof typeof PageActionType];
  12. export const PageActionStage = {
  13. Main: 'Main',
  14. Sub: 'Sub',
  15. } as const;
  16. export type PageActionStage = typeof PageActionStage[keyof typeof PageActionStage];
  17. export type IPageOperationProcessData = {
  18. [key in PageActionType]?: {
  19. [PageActionStage.Main]?: { isProcessable: boolean },
  20. [PageActionStage.Sub]?: { isProcessable: boolean },
  21. }
  22. }
  23. export type IPageOperationProcessInfo = {
  24. [pageId: string]: IPageOperationProcessData,
  25. }
  26. export type OptionsToSave = {
  27. isSlackEnabled: boolean;
  28. slackChannels: string;
  29. grant: number;
  30. pageTags: string[] | null;
  31. grantUserGroupId?: string | null;
  32. grantUserGroupName?: string | null;
  33. isSyncRevisionToHackmd?: boolean;
  34. };