X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypes%2Fmodels%2Fvideo%2Fvideo-channels.ts;h=c147567d9528509a9f89e12e4c866084ac262cd7;hb=b65de1be4dcf626c552be613d531d3f6e23c6085;hp=2e05d8753c2886f5732f96064bc2742a2a322734;hpb=67ed6552b831df66713bac9e672738796128d33f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/types/models/video/video-channels.ts b/server/types/models/video/video-channels.ts index 2e05d8753..c147567d9 100644 --- a/server/types/models/video/video-channels.ts +++ b/server/types/models/video/video-channels.ts @@ -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 = PickWith @@ -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 & - Use<'Actor', MActorAP> & + Use<'Actor', MActorAPChannel> & Use<'Account', MAccountUrl>