page-operation.ts 1019 B

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