]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/typings/models/video/video-rate.ts
Type toFormattedJSON
[github/Chocobozzz/PeerTube.git] / server / typings / models / video / video-rate.ts
index fc932999354c06385dcaabbb369e212c14628538..2ff8a625b9598f8412cb86ac6963c78a2141921f 100644 (file)
@@ -1,6 +1,6 @@
 import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
 import { PickWith } from '@server/typings/utils'
-import { MAccountAudience, MAccountUrl, MVideo } from '..'
+import { MAccountAudience, MAccountUrl, MVideo, MVideoFormattable } from '..'
 
 type Use<K extends keyof AccountVideoRateModel, M> = PickWith<AccountVideoRateModel, K, M>
 
@@ -14,3 +14,10 @@ export type MAccountVideoRateAccountUrl = MAccountVideoRate &
 export type MAccountVideoRateAccountVideo = MAccountVideoRate &
   Use<'Account', MAccountAudience> &
   Use<'Video', MVideo>
+
+// ############################################################################
+
+// Format for API or AP object
+
+export type MAccountVideoRateFormattable = Pick<MAccountVideoRate, 'type'> &
+  Use<'Video', MVideoFormattable>