page-operation.ts 784 B

123456789101112131415161718192021222324252627282930
  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 =
  12. (typeof PageActionType)[keyof typeof PageActionType];
  13. export const PageActionStage = {
  14. Main: 'Main',
  15. Sub: 'Sub',
  16. } as const;
  17. export type PageActionStage =
  18. (typeof PageActionStage)[keyof typeof PageActionStage];
  19. export type IPageOperationProcessData = {
  20. [key in PageActionType]?: {
  21. [PageActionStage.Main]?: { isProcessable: boolean };
  22. [PageActionStage.Sub]?: { isProcessable: boolean };
  23. };
  24. };
  25. export type IPageOperationProcessInfo = {
  26. [pageId: string]: IPageOperationProcessData;
  27. };