page.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import type {
  2. GroupType, IGrantedGroup, IPageHasId, Nullable, PageGrant,
  3. } from '@growi/core';
  4. import type { IPageOperationProcessData } from './page-operation';
  5. export {
  6. isIPageInfoForEntity, isIPageInfoForOperation, isIPageInfoForListing,
  7. } from '@growi/core';
  8. export type IPageForItem = Partial<IPageHasId & {isTarget?: boolean, processData?: IPageOperationProcessData}>;
  9. export type IPageGrantData = {
  10. grant: PageGrant,
  11. userRelatedGrantedGroups?: {
  12. id: string,
  13. name: string,
  14. type: GroupType,
  15. }[]
  16. }
  17. export type IDeleteSinglePageApiv1Result = {
  18. ok: boolean
  19. path: string,
  20. isRecursively: Nullable<true>,
  21. isCompletely: Nullable<true>,
  22. };
  23. export type IDeleteManyPageApiv3Result = {
  24. paths: string[],
  25. isRecursively: Nullable<true>,
  26. isCompletely: Nullable<true>,
  27. };
  28. export type IOptionsForUpdate = {
  29. grant?: PageGrant,
  30. userRelatedGrantUserGroupIds?: IGrantedGroup[],
  31. // isSyncRevisionToHackmd?: boolean,
  32. overwriteScopesOfDescendants?: boolean,
  33. };
  34. export type IOptionsForCreate = {
  35. grant?: PageGrant,
  36. grantUserGroupIds?: IGrantedGroup[],
  37. overwriteScopesOfDescendants?: boolean,
  38. };