diff options
Diffstat (limited to 'server/typings/models/user/user.ts')
-rw-r--r-- | server/typings/models/user/user.ts | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/server/typings/models/user/user.ts b/server/typings/models/user/user.ts index 6ac19c20b..31cf075ef 100644 --- a/server/typings/models/user/user.ts +++ b/server/typings/models/user/user.ts | |||
@@ -29,36 +29,44 @@ export type MUserId = Pick<UserModel, 'id'> | |||
29 | 29 | ||
30 | // With account | 30 | // With account |
31 | 31 | ||
32 | export type MUserAccountId = MUser & | 32 | export type MUserAccountId = |
33 | MUser & | ||
33 | Use<'Account', MAccountId> | 34 | Use<'Account', MAccountId> |
34 | 35 | ||
35 | export type MUserAccountUrl = MUser & | 36 | export type MUserAccountUrl = |
37 | MUser & | ||
36 | Use<'Account', MAccountUrl & MAccountIdActorId> | 38 | Use<'Account', MAccountUrl & MAccountIdActorId> |
37 | 39 | ||
38 | export type MUserAccount = MUser & | 40 | export type MUserAccount = |
41 | MUser & | ||
39 | Use<'Account', MAccount> | 42 | Use<'Account', MAccount> |
40 | 43 | ||
41 | export type MUserAccountDefault = MUser & | 44 | export type MUserAccountDefault = |
45 | MUser & | ||
42 | Use<'Account', MAccountDefault> | 46 | Use<'Account', MAccountDefault> |
43 | 47 | ||
44 | // With channel | 48 | // With channel |
45 | 49 | ||
46 | export type MUserNotifSettingChannelDefault = MUser & | 50 | export type MUserNotifSettingChannelDefault = |
51 | MUser & | ||
47 | Use<'NotificationSetting', MNotificationSetting> & | 52 | Use<'NotificationSetting', MNotificationSetting> & |
48 | Use<'Account', MAccountDefaultChannelDefault> | 53 | Use<'Account', MAccountDefaultChannelDefault> |
49 | 54 | ||
50 | // With notification settings | 55 | // With notification settings |
51 | 56 | ||
52 | export type MUserWithNotificationSetting = MUser & | 57 | export type MUserWithNotificationSetting = |
58 | MUser & | ||
53 | Use<'NotificationSetting', MNotificationSetting> | 59 | Use<'NotificationSetting', MNotificationSetting> |
54 | 60 | ||
55 | export type MUserNotifSettingAccount = MUser & | 61 | export type MUserNotifSettingAccount = |
62 | MUser & | ||
56 | Use<'NotificationSetting', MNotificationSetting> & | 63 | Use<'NotificationSetting', MNotificationSetting> & |
57 | Use<'Account', MAccount> | 64 | Use<'Account', MAccount> |
58 | 65 | ||
59 | // Default scope | 66 | // Default scope |
60 | 67 | ||
61 | export type MUserDefault = MUser & | 68 | export type MUserDefault = |
69 | MUser & | ||
62 | Use<'NotificationSetting', MNotificationSetting> & | 70 | Use<'NotificationSetting', MNotificationSetting> & |
63 | Use<'Account', MAccountDefault> | 71 | Use<'Account', MAccountDefault> |
64 | 72 | ||
@@ -67,12 +75,15 @@ export type MUserDefault = MUser & | |||
67 | // Format for API or AP object | 75 | // Format for API or AP object |
68 | 76 | ||
69 | type MAccountWithChannels = MAccountFormattable & PickWithOpt<AccountModel, 'VideoChannels', MChannelFormattable[]> | 77 | type MAccountWithChannels = MAccountFormattable & PickWithOpt<AccountModel, 'VideoChannels', MChannelFormattable[]> |
70 | type MAccountWithChannelsAndSpecialPlaylists = MAccountWithChannels & | 78 | type MAccountWithChannelsAndSpecialPlaylists = |
79 | MAccountWithChannels & | ||
71 | PickWithOpt<AccountModel, 'VideoPlaylists', MVideoPlaylist[]> | 80 | PickWithOpt<AccountModel, 'VideoPlaylists', MVideoPlaylist[]> |
72 | 81 | ||
73 | export type MUserFormattable = MUserQuotaUsed & | 82 | export type MUserFormattable = |
83 | MUserQuotaUsed & | ||
74 | Use<'Account', MAccountWithChannels> & | 84 | Use<'Account', MAccountWithChannels> & |
75 | PickWithOpt<UserModel, 'NotificationSetting', MNotificationSettingFormattable> | 85 | PickWithOpt<UserModel, 'NotificationSetting', MNotificationSettingFormattable> |
76 | 86 | ||
77 | export type MMyUserFormattable = MUserFormattable & | 87 | export type MMyUserFormattable = |
88 | MUserFormattable & | ||
78 | Use<'Account', MAccountWithChannelsAndSpecialPlaylists> | 89 | Use<'Account', MAccountWithChannelsAndSpecialPlaylists> |