]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/typings/models/user/user.ts
Correctly fix octet stream fallback for video ext
[github/Chocobozzz/PeerTube.git] / server / typings / models / user / user.ts
index a2750adc7855d7a67967e7f5e53dfd67b0e27d79..6ac19c20b615add1e4b7ad472de6f77bfa2a6259 100644 (file)
@@ -12,6 +12,7 @@ import {
 import { MNotificationSetting, MNotificationSettingFormattable } from './user-notification-setting'
 import { AccountModel } from '@server/models/account/account'
 import { MChannelFormattable } from '../video/video-channels'
+import { MVideoPlaylist } from '@server/typings/models'
 
 type Use<K extends keyof UserModel, M> = PickWith<UserModel, K, M>
 
@@ -65,6 +66,13 @@ export type MUserDefault = MUser &
 
 // Format for API or AP object
 
+type MAccountWithChannels = MAccountFormattable & PickWithOpt<AccountModel, 'VideoChannels', MChannelFormattable[]>
+type MAccountWithChannelsAndSpecialPlaylists = MAccountWithChannels &
+  PickWithOpt<AccountModel, 'VideoPlaylists', MVideoPlaylist[]>
+
 export type MUserFormattable = MUserQuotaUsed &
-  Use<'Account', MAccountFormattable & PickWithOpt<AccountModel, 'VideoChannels', MChannelFormattable[]>> &
+  Use<'Account', MAccountWithChannels> &
   PickWithOpt<UserModel, 'NotificationSetting', MNotificationSettingFormattable>
+
+export type MMyUserFormattable = MUserFormattable &
+  Use<'Account', MAccountWithChannelsAndSpecialPlaylists>