diff options
Diffstat (limited to 'server/typings/models/video/video-channels.ts')
-rw-r--r-- | server/typings/models/video/video-channels.ts | 57 |
1 files changed, 38 insertions, 19 deletions
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<MChannel, 'id'> | |||
35 | 35 | ||
36 | // ############################################################################ | 36 | // ############################################################################ |
37 | 37 | ||
38 | export type MChannelIdActor = MChannelId & | 38 | export type MChannelIdActor = |
39 | MChannelId & | ||
39 | Use<'Actor', MActorAccountChannelId> | 40 | Use<'Actor', MActorAccountChannelId> |
40 | 41 | ||
41 | export type MChannelUserId = Pick<MChannel, 'accountId'> & | 42 | export type MChannelUserId = |
43 | Pick<MChannel, 'accountId'> & | ||
42 | Use<'Account', MAccountUserId> | 44 | Use<'Account', MAccountUserId> |
43 | 45 | ||
44 | export type MChannelActor = MChannel & | 46 | export type MChannelActor = |
47 | MChannel & | ||
45 | Use<'Actor', MActor> | 48 | Use<'Actor', MActor> |
46 | 49 | ||
47 | export type MChannelUrl = Use<'Actor', MActorUrl> | 50 | export type MChannelUrl = Use<'Actor', MActorUrl> |
48 | 51 | ||
49 | // Default scope | 52 | // Default scope |
50 | export type MChannelDefault = MChannel & | 53 | export type MChannelDefault = |
54 | MChannel & | ||
51 | Use<'Actor', MActorDefault> | 55 | Use<'Actor', MActorDefault> |
52 | 56 | ||
53 | // ############################################################################ | 57 | // ############################################################################ |
54 | 58 | ||
55 | // Not all association attributes | 59 | // Not all association attributes |
56 | 60 | ||
57 | export type MChannelLight = MChannel & | 61 | export type MChannelLight = |
62 | MChannel & | ||
58 | Use<'Actor', MActorDefaultLight> | 63 | Use<'Actor', MActorDefaultLight> |
59 | 64 | ||
60 | export type MChannelActorLight = MChannel & | 65 | export type MChannelActorLight = |
66 | MChannel & | ||
61 | Use<'Actor', MActorLight> | 67 | Use<'Actor', MActorLight> |
62 | 68 | ||
63 | export type MChannelAccountLight = MChannel & | 69 | export type MChannelAccountLight = |
70 | MChannel & | ||
64 | Use<'Actor', MActorDefaultLight> & | 71 | Use<'Actor', MActorDefaultLight> & |
65 | Use<'Account', MAccountLight> | 72 | Use<'Account', MAccountLight> |
66 | 73 | ||
@@ -68,24 +75,29 @@ export type MChannelAccountLight = MChannel & | |||
68 | 75 | ||
69 | // Account associations | 76 | // Account associations |
70 | 77 | ||
71 | export type MChannelAccountActor = MChannel & | 78 | export type MChannelAccountActor = |
79 | MChannel & | ||
72 | Use<'Account', MAccountActor> | 80 | Use<'Account', MAccountActor> |
73 | 81 | ||
74 | export type MChannelAccountDefault = MChannel & | 82 | export type MChannelAccountDefault = |
83 | MChannel & | ||
75 | Use<'Actor', MActorDefault> & | 84 | Use<'Actor', MActorDefault> & |
76 | Use<'Account', MAccountDefault> | 85 | Use<'Account', MAccountDefault> |
77 | 86 | ||
78 | export type MChannelActorAccountActor = MChannel & | 87 | export type MChannelActorAccountActor = |
88 | MChannel & | ||
79 | Use<'Account', MAccountActor> & | 89 | Use<'Account', MAccountActor> & |
80 | Use<'Actor', MActor> | 90 | Use<'Actor', MActor> |
81 | 91 | ||
82 | // ############################################################################ | 92 | // ############################################################################ |
83 | 93 | ||
84 | // Videos associations | 94 | // Videos associations |
85 | export type MChannelVideos = MChannel & | 95 | export type MChannelVideos = |
96 | MChannel & | ||
86 | Use<'Videos', MVideo[]> | 97 | Use<'Videos', MVideo[]> |
87 | 98 | ||
88 | export type MChannelActorAccountDefaultVideos = MChannel & | 99 | export type MChannelActorAccountDefaultVideos = |
100 | MChannel & | ||
89 | Use<'Actor', MActorDefault> & | 101 | Use<'Actor', MActorDefault> & |
90 | Use<'Account', MAccountDefault> & | 102 | Use<'Account', MAccountDefault> & |
91 | Use<'Videos', MVideo[]> | 103 | Use<'Videos', MVideo[]> |
@@ -94,14 +106,17 @@ export type MChannelActorAccountDefaultVideos = MChannel & | |||
94 | 106 | ||
95 | // For API | 107 | // For API |
96 | 108 | ||
97 | export type MChannelSummary = FunctionProperties<MChannel> & | 109 | export type MChannelSummary = |
110 | FunctionProperties<MChannel> & | ||
98 | Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> & | 111 | Pick<MChannel, 'id' | 'name' | 'description' | 'actorId'> & |
99 | Use<'Actor', MActorSummary> | 112 | Use<'Actor', MActorSummary> |
100 | 113 | ||
101 | export type MChannelSummaryAccount = MChannelSummary & | 114 | export type MChannelSummaryAccount = |
115 | MChannelSummary & | ||
102 | Use<'Account', MAccountSummaryBlocks> | 116 | Use<'Account', MAccountSummaryBlocks> |
103 | 117 | ||
104 | export type MChannelAPI = MChannel & | 118 | export type MChannelAPI = |
119 | MChannel & | ||
105 | Use<'Actor', MActorAPI> & | 120 | Use<'Actor', MActorAPI> & |
106 | Use<'Account', MAccountAPI> | 121 | Use<'Account', MAccountAPI> |
107 | 122 | ||
@@ -109,18 +124,22 @@ export type MChannelAPI = MChannel & | |||
109 | 124 | ||
110 | // Format for API or AP object | 125 | // Format for API or AP object |
111 | 126 | ||
112 | export type MChannelSummaryFormattable = FunctionProperties<MChannel> & | 127 | export type MChannelSummaryFormattable = |
128 | FunctionProperties<MChannel> & | ||
113 | Pick<MChannel, 'id' | 'name'> & | 129 | Pick<MChannel, 'id' | 'name'> & |
114 | Use<'Actor', MActorSummaryFormattable> | 130 | Use<'Actor', MActorSummaryFormattable> |
115 | 131 | ||
116 | export type MChannelAccountSummaryFormattable = MChannelSummaryFormattable & | 132 | export type MChannelAccountSummaryFormattable = |
133 | MChannelSummaryFormattable & | ||
117 | Use<'Account', MAccountSummaryFormattable> | 134 | Use<'Account', MAccountSummaryFormattable> |
118 | 135 | ||
119 | export type MChannelFormattable = FunctionProperties<MChannel> & | 136 | export type MChannelFormattable = |
137 | FunctionProperties<MChannel> & | ||
120 | Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> & | 138 | Pick<MChannel, 'id' | 'name' | 'description' | 'createdAt' | 'updatedAt' | 'support'> & |
121 | Use<'Actor', MActorFormattable> & | 139 | Use<'Actor', MActorFormattable> & |
122 | PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable> | 140 | PickWithOpt<VideoChannelModel, 'Account', MAccountFormattable> |
123 | 141 | ||
124 | export type MChannelAP = Pick<MChannel, 'name' | 'description' | 'support'> & | 142 | export type MChannelAP = |
143 | Pick<MChannel, 'name' | 'description' | 'support'> & | ||
125 | Use<'Actor', MActorAP> & | 144 | Use<'Actor', MActorAP> & |
126 | Use<'Account', MAccountUrl> | 145 | Use<'Account', MAccountUrl> |