]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/typings/models/user/user-notification.ts
Move to eslint
[github/Chocobozzz/PeerTube.git] / server / typings / models / user / user-notification.ts
index 1cdc691b06b0a819929cc18476e156ae85bb99a6..2080360e12e1d49c806513ce687416a1632bbd87 100644 (file)
@@ -16,59 +16,73 @@ type Use<K extends keyof UserNotificationModel, M> = PickWith<UserNotificationMo
 
 // ############################################################################
 
-export namespace UserNotificationIncludes {
+export module UserNotificationIncludes {
+
   export type VideoInclude = Pick<VideoModel, 'id' | 'uuid' | 'name'>
-  export type VideoIncludeChannel = VideoInclude &
+  export type VideoIncludeChannel =
+    VideoInclude &
     PickWith<VideoModel, 'VideoChannel', VideoChannelIncludeActor>
 
-  export type ActorInclude = Pick<ActorModel, 'preferredUsername' | 'getHost'> &
+  export type ActorInclude =
+    Pick<ActorModel, 'preferredUsername' | 'getHost'> &
     PickWith<ActorModel, 'Avatar', Pick<AvatarModel, 'filename' | 'getStaticPath'>> &
     PickWith<ActorModel, 'Server', Pick<ServerModel, 'host'>>
 
   export type VideoChannelInclude = Pick<VideoChannelModel, 'id' | 'name' | 'getDisplayName'>
-  export type VideoChannelIncludeActor = VideoChannelInclude &
+  export type VideoChannelIncludeActor =
+    VideoChannelInclude &
     PickWith<VideoChannelModel, 'Actor', ActorInclude>
 
   export type AccountInclude = Pick<AccountModel, 'id' | 'name' | 'getDisplayName'>
-  export type AccountIncludeActor = AccountInclude &
+  export type AccountIncludeActor =
+    AccountInclude &
     PickWith<AccountModel, 'Actor', ActorInclude>
 
-  export type VideoCommentInclude = Pick<VideoCommentModel, 'id' | 'originCommentId' | 'getThreadId'> &
+  export type VideoCommentInclude =
+    Pick<VideoCommentModel, 'id' | 'originCommentId' | 'getThreadId'> &
     PickWith<VideoCommentModel, 'Account', AccountIncludeActor> &
     PickWith<VideoCommentModel, 'Video', VideoInclude>
 
-  export type VideoAbuseInclude = Pick<VideoAbuseModel, 'id'> &
+  export type VideoAbuseInclude =
+    Pick<VideoAbuseModel, 'id'> &
     PickWith<VideoAbuseModel, 'Video', VideoInclude>
 
-  export type VideoBlacklistInclude = Pick<VideoBlacklistModel, 'id'> &
+  export type VideoBlacklistInclude =
+    Pick<VideoBlacklistModel, 'id'> &
     PickWith<VideoAbuseModel, 'Video', VideoInclude>
 
-  export type VideoImportInclude = Pick<VideoImportModel, 'id' | 'magnetUri' | 'targetUrl' | 'torrentName'> &
+  export type VideoImportInclude =
+    Pick<VideoImportModel, 'id' | 'magnetUri' | 'targetUrl' | 'torrentName'> &
     PickWith<VideoImportModel, 'Video', VideoInclude>
 
-  export type ActorFollower = Pick<ActorModel, 'preferredUsername' | 'getHost'> &
+  export type ActorFollower =
+    Pick<ActorModel, 'preferredUsername' | 'getHost'> &
     PickWith<ActorModel, 'Account', AccountInclude> &
     PickWith<ActorModel, 'Server', Pick<ServerModel, 'host'>> &
     PickWithOpt<ActorModel, 'Avatar', Pick<AvatarModel, 'filename' | 'getStaticPath'>>
 
-  export type ActorFollowing = Pick<ActorModel, 'preferredUsername' | 'type' | 'getHost'> &
+  export type ActorFollowing =
+    Pick<ActorModel, 'preferredUsername' | 'type' | 'getHost'> &
     PickWith<ActorModel, 'VideoChannel', VideoChannelInclude> &
     PickWith<ActorModel, 'Account', AccountInclude> &
     PickWith<ActorModel, 'Server', Pick<ServerModel, 'host'>>
 
-  export type ActorFollowInclude = Pick<ActorFollowModel, 'id' | 'state'> &
+  export type ActorFollowInclude =
+    Pick<ActorFollowModel, 'id' | 'state'> &
     PickWith<ActorFollowModel, 'ActorFollower', ActorFollower> &
     PickWith<ActorFollowModel, 'ActorFollowing', ActorFollowing>
 }
 
 // ############################################################################
 
-export type MUserNotification = Omit<UserNotificationModel, 'User' | 'Video' | 'Comment' | 'VideoAbuse' | 'VideoBlacklist' |
+export type MUserNotification =
+  Omit<UserNotificationModel, 'User' | 'Video' | 'Comment' | 'VideoAbuse' | 'VideoBlacklist' |
   'VideoImport' | 'Account' | 'ActorFollow'>
 
 // ############################################################################
 
-export type UserNotificationModelForApi = MUserNotification &
+export type UserNotificationModelForApi =
+  MUserNotification &
   Use<'Video', UserNotificationIncludes.VideoIncludeChannel> &
   Use<'Comment', UserNotificationIncludes.VideoCommentInclude> &
   Use<'VideoAbuse', UserNotificationIncludes.VideoAbuseInclude> &