aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-08-20 19:05:31 +0200
committerChocobozzz <me@florianbigard.com>2019-08-20 19:23:10 +0200
commit1ca9f7c3f7afac2af4c4c25b98426731f7e789c6 (patch)
tree27fe65c4ea5e9250d2523033d5c65b315bfca23d /server/typings/models/video/video-channels.ts
parent0283eaac2a8e73006c66df3cf5bb9012e37450e5 (diff)
downloadPeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.gz
PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.tar.zst
PeerTube-1ca9f7c3f7afac2af4c4c25b98426731f7e789c6.zip
Type toFormattedJSON
Diffstat (limited to 'server/typings/models/video/video-channels.ts')
-rw-r--r--server/typings/models/video/video-channels.ts27
1 files changed, 24 insertions, 3 deletions
diff --git a/server/typings/models/video/video-channels.ts b/server/typings/models/video/video-channels.ts
index b6506ed9f..2be7dd7ed 100644
--- a/server/typings/models/video/video-channels.ts
+++ b/server/typings/models/video/video-channels.ts
@@ -1,19 +1,23 @@
1import { PickWith } from '../../utils' 1import { FunctionProperties, PickWith, PickWithOpt } from '../../utils'
2import { VideoChannelModel } from '../../../models/video/video-channel' 2import { VideoChannelModel } from '../../../models/video/video-channel'
3import { 3import {
4 MAccountActor, 4 MAccountActor,
5 MAccountAPI, 5 MAccountAPI,
6 MAccountDefault, 6 MAccountDefault,
7 MAccountFormattable,
7 MAccountLight, 8 MAccountLight,
8 MAccountSummaryBlocks, 9 MAccountSummaryBlocks,
10 MAccountSummaryFormattable,
9 MAccountUserId, 11 MAccountUserId,
10 MActor, 12 MActor,
11 MActorAccountChannelId, 13 MActorAccountChannelId,
12 MActorAPI, 14 MActorAPI,
13 MActorDefault, 15 MActorDefault,
14 MActorDefaultLight, 16 MActorDefaultLight,
17 MActorFormattable,
15 MActorLight, 18 MActorLight,
16 MActorSummary 19 MActorSummary,
20 MActorSummaryFormattable
17} from '../account' 21} from '../account'
18import { MVideo } from './video' 22import { MVideo } from './video'
19 23
@@ -86,7 +90,8 @@ export type MChannelActorAccountDefaultVideos = MChannel &
86 90
87// For API 91// For API
88 92
89export type MChannelSummary = Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> & 93export type MChannelSummary = FunctionProperties<MChannel> &
94 Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> &
90 Use<'Actor', MActorSummary> 95 Use<'Actor', MActorSummary>
91 96
92export type MChannelSummaryAccount = MChannelSummary & 97export type MChannelSummaryAccount = MChannelSummary &
@@ -95,3 +100,19 @@ export type MChannelSummaryAccount = MChannelSummary &
95export type MChannelAPI = MChannel & 100export type MChannelAPI = MChannel &
96 Use<'Actor', MActorAPI> & 101 Use<'Actor', MActorAPI> &
97 Use<'Account', MAccountAPI> 102 Use<'Account', MAccountAPI>
103
104// ############################################################################
105
106// Format for API or AP object
107
108export type MChannelSummaryFormattable = FunctionProperties<MChannel> &
109 Pick<MChannel, 'id' | 'name'> &
110 Use<'Actor', MActorSummaryFormattable>
111
112export type MChannelAccountSummaryFormattable = MChannelSummaryFormattable &
113 Use<'Account', MAccountSummaryFormattable>
114
115export type MChannelFormattable = FunctionProperties<MChannel> &
116 Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> &
117 Use<'Actor', MActorFormattable> &
118 PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable>