]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/types/models/video/video-channels.ts
Use different p2p policy for embeds and webapp
[github/Chocobozzz/PeerTube.git] / server / types / models / video / video-channels.ts
index 2e05d8753c2886f5732f96064bc2742a2a322734..c147567d9528509a9f89e12e4c866084ac262cd7 100644 (file)
@@ -9,18 +9,23 @@ import {
   MAccountSummaryBlocks,
   MAccountSummaryFormattable,
   MAccountUrl,
-  MAccountUserId,
+  MAccountUserId
+} from '../account'
+import {
   MActor,
   MActorAccountChannelId,
-  MActorAP,
+  MActorAPChannel,
   MActorAPI,
   MActorDefault,
+  MActorDefaultBanner,
   MActorDefaultLight,
   MActorFormattable,
+  MActorHost,
   MActorLight,
   MActorSummary,
-  MActorSummaryFormattable, MActorUrl
-} from '../account'
+  MActorSummaryFormattable,
+  MActorUrl
+} from '../actor'
 import { MVideo } from './video'
 
 type Use<K extends keyof VideoChannelModel, M> = PickWith<VideoChannelModel, K, M>
@@ -54,14 +59,14 @@ export type MChannelDefault =
   MChannel &
   Use<'Actor', MActorDefault>
 
+export type MChannelBannerDefault =
+  MChannel &
+  Use<'Actor', MActorDefaultBanner>
+
 // ############################################################################
 
 // Not all association attributes
 
-export type MChannelLight =
-  MChannel &
-  Use<'Actor', MActorDefaultLight>
-
 export type MChannelActorLight =
   MChannel &
   Use<'Actor', MActorLight>
@@ -71,6 +76,10 @@ export type MChannelAccountLight =
   Use<'Actor', MActorDefaultLight> &
   Use<'Account', MAccountLight>
 
+export type MChannelHost =
+  MChannelId &
+  Use<'Actor', MActorHost>
+
 // ############################################################################
 
 // Account associations
@@ -79,29 +88,23 @@ export type MChannelAccountActor =
   MChannel &
   Use<'Account', MAccountActor>
 
-export type MChannelAccountDefault =
+export type MChannelBannerAccountDefault =
   MChannel &
-  Use<'Actor', MActorDefault> &
+  Use<'Actor', MActorDefaultBanner> &
   Use<'Account', MAccountDefault>
 
-export type MChannelActorAccountActor =
+export type MChannelAccountDefault =
   MChannel &
-  Use<'Account', MAccountActor> &
-  Use<'Actor', MActor>
+  Use<'Actor', MActorDefault> &
+  Use<'Account', MAccountDefault>
 
 // ############################################################################
 
-// Videos  associations
+// Videos associations
 export type MChannelVideos =
   MChannel &
   Use<'Videos', MVideo[]>
 
-export type MChannelActorAccountDefaultVideos =
-  MChannel &
-  Use<'Actor', MActorDefault> &
-  Use<'Account', MAccountDefault> &
-  Use<'Videos', MVideo[]>
-
 // ############################################################################
 
 // For API
@@ -141,5 +144,5 @@ export type MChannelFormattable =
 
 export type MChannelAP =
   Pick<MChannel, 'name' | 'description' | 'support'> &
-  Use<'Actor', MActorAP> &
+  Use<'Actor', MActorAPChannel> &
   Use<'Account', MAccountUrl>