From a15871560f80e07386c1dabb8370cd2664ecfd1f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Jan 2020 16:56:52 +0100 Subject: Move to eslint --- server/typings/models/video/video-channels.ts | 57 ++++++++++++++++++--------- 1 file changed, 38 insertions(+), 19 deletions(-) (limited to 'server/typings/models/video/video-channels.ts') diff --git a/server/typings/models/video/video-channels.ts b/server/typings/models/video/video-channels.ts index 292d0ac95..50f7c2d8a 100644 --- a/server/typings/models/video/video-channels.ts +++ b/server/typings/models/video/video-channels.ts @@ -35,32 +35,39 @@ export type MChannelId = Pick // ############################################################################ -export type MChannelIdActor = MChannelId & +export type MChannelIdActor = + MChannelId & Use<'Actor', MActorAccountChannelId> -export type MChannelUserId = Pick & +export type MChannelUserId = + Pick & Use<'Account', MAccountUserId> -export type MChannelActor = MChannel & +export type MChannelActor = + MChannel & Use<'Actor', MActor> export type MChannelUrl = Use<'Actor', MActorUrl> // Default scope -export type MChannelDefault = MChannel & +export type MChannelDefault = + MChannel & Use<'Actor', MActorDefault> // ############################################################################ // Not all association attributes -export type MChannelLight = MChannel & +export type MChannelLight = + MChannel & Use<'Actor', MActorDefaultLight> -export type MChannelActorLight = MChannel & +export type MChannelActorLight = + MChannel & Use<'Actor', MActorLight> -export type MChannelAccountLight = MChannel & +export type MChannelAccountLight = + MChannel & Use<'Actor', MActorDefaultLight> & Use<'Account', MAccountLight> @@ -68,24 +75,29 @@ export type MChannelAccountLight = MChannel & // Account associations -export type MChannelAccountActor = MChannel & +export type MChannelAccountActor = + MChannel & Use<'Account', MAccountActor> -export type MChannelAccountDefault = MChannel & +export type MChannelAccountDefault = + MChannel & Use<'Actor', MActorDefault> & Use<'Account', MAccountDefault> -export type MChannelActorAccountActor = MChannel & +export type MChannelActorAccountActor = + MChannel & Use<'Account', MAccountActor> & Use<'Actor', MActor> // ############################################################################ // Videos associations -export type MChannelVideos = MChannel & +export type MChannelVideos = + MChannel & Use<'Videos', MVideo[]> -export type MChannelActorAccountDefaultVideos = MChannel & +export type MChannelActorAccountDefaultVideos = + MChannel & Use<'Actor', MActorDefault> & Use<'Account', MAccountDefault> & Use<'Videos', MVideo[]> @@ -94,14 +106,17 @@ export type MChannelActorAccountDefaultVideos = MChannel & // For API -export type MChannelSummary = FunctionProperties & +export type MChannelSummary = + FunctionProperties & Pick & Use<'Actor', MActorSummary> -export type MChannelSummaryAccount = MChannelSummary & +export type MChannelSummaryAccount = + MChannelSummary & Use<'Account', MAccountSummaryBlocks> -export type MChannelAPI = MChannel & +export type MChannelAPI = + MChannel & Use<'Actor', MActorAPI> & Use<'Account', MAccountAPI> @@ -109,18 +124,22 @@ export type MChannelAPI = MChannel & // Format for API or AP object -export type MChannelSummaryFormattable = FunctionProperties & +export type MChannelSummaryFormattable = + FunctionProperties & Pick & Use<'Actor', MActorSummaryFormattable> -export type MChannelAccountSummaryFormattable = MChannelSummaryFormattable & +export type MChannelAccountSummaryFormattable = + MChannelSummaryFormattable & Use<'Account', MAccountSummaryFormattable> -export type MChannelFormattable = FunctionProperties & +export type MChannelFormattable = + FunctionProperties & Pick & Use<'Actor', MActorFormattable> & PickWithOpt -export type MChannelAP = Pick & +export type MChannelAP = + Pick & Use<'Actor', MActorAP> & Use<'Account', MAccountUrl> -- cgit v1.2.3