-import { PickWith } from '../../utils'
+import { FunctionProperties, PickWith, PickWithOpt } from '../../utils'
import { VideoChannelModel } from '../../../models/video/video-channel'
import {
MAccountActor,
MAccountAPI,
MAccountDefault,
+ MAccountFormattable,
MAccountLight,
MAccountSummaryBlocks,
+ MAccountSummaryFormattable,
MAccountUserId,
MActor,
MActorAccountChannelId,
MActorAPI,
MActorDefault,
MActorDefaultLight,
+ MActorFormattable,
MActorLight,
- MActorSummary
+ MActorSummary,
+ MActorSummaryFormattable
} from '../account'
import { MVideo } from './video'
// For API
-export type MChannelSummary = Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> &
+export type MChannelSummary = FunctionProperties<MChannel> &
+ Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> &
Use<'Actor', MActorSummary>
export type MChannelSummaryAccount = MChannelSummary &
export type MChannelAPI = MChannel &
Use<'Actor', MActorAPI> &
Use<'Account', MAccountAPI>
+
+// ############################################################################
+
+// Format for API or AP object
+
+export type MChannelSummaryFormattable = FunctionProperties<MChannel> &
+ Pick<MChannel, 'id' | 'name'> &
+ Use<'Actor', MActorSummaryFormattable>
+
+export type MChannelAccountSummaryFormattable = MChannelSummaryFormattable &
+ Use<'Account', MAccountSummaryFormattable>
+
+export type MChannelFormattable = FunctionProperties<MChannel> &
+ Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> &
+ Use<'Actor', MActorFormattable> &
+ PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable>