page-operation.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { GrantedGroup } from '@growi/core';
  2. import { PageGrant } from '~/interfaces/page';
  3. import { ObjectIdLike } from '../../interfaces/mongoose-utils';
  4. export type IPageForResuming = {
  5. _id: ObjectIdLike,
  6. path: string,
  7. isEmpty: boolean,
  8. parent?: ObjectIdLike,
  9. grant?: number,
  10. grantedUsers?: ObjectIdLike[],
  11. grantedGroups: GrantedGroup[],
  12. descendantCount: number,
  13. status?: number,
  14. revision?: ObjectIdLike,
  15. lastUpdateUser?: ObjectIdLike,
  16. creator?: ObjectIdLike,
  17. };
  18. export type IUserForResuming = {
  19. _id: ObjectIdLike,
  20. };
  21. export type IOptionsForUpdate = {
  22. grant?: PageGrant,
  23. grantUserGroupIds?: GrantedGroup[],
  24. isSyncRevisionToHackmd?: boolean,
  25. overwriteScopesOfDescendants?: boolean,
  26. };
  27. export type IOptionsForCreate = {
  28. format?: string,
  29. grantUserGroupIds?: GrantedGroup[],
  30. grant?: PageGrant,
  31. overwriteScopesOfDescendants?: boolean,
  32. isSynchronously?: boolean,
  33. };
  34. export type IOptionsForResuming = {
  35. updateMetadata?: boolean,
  36. createRedirectPage?: boolean,
  37. prevDescendantCount?: number,
  38. } & IOptionsForUpdate & IOptionsForCreate;