page-operation.ts 773 B

12345678910111213141516171819202122232425262728
  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. }