revision.ts 689 B

12345678910111213141516171819202122232425262728293031323334
  1. import { HasObjectId } from './has-object-id';
  2. import { IUser } from './user';
  3. export type IRevision = {
  4. body: string,
  5. author: IUser,
  6. hasDiffToPrev: boolean;
  7. createdAt: Date,
  8. updatedAt: Date,
  9. }
  10. export type IRevisionHasId = IRevision & HasObjectId;
  11. type HasPageId = {
  12. pageId: string,
  13. };
  14. export type IRevisionHasPageId = IRevisionHasId & HasPageId;
  15. export type IRevisionsForPagination = {
  16. revisions: IRevision[], // revisions in one pagination
  17. totalCounts: number // total counts
  18. }
  19. export type IRevisionOnConflict = {
  20. revisionId: string,
  21. revisionBody: string,
  22. createdAt: Date,
  23. user: IUser
  24. }
  25. export type HasRevisionShortbody = {
  26. revisionShortBody?: string,
  27. }