aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/types/models/video/video-change-ownership.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/types/models/video/video-change-ownership.ts')
-rw-r--r--server/types/models/video/video-change-ownership.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/server/types/models/video/video-change-ownership.ts b/server/types/models/video/video-change-ownership.ts
new file mode 100644
index 000000000..7421e081e
--- /dev/null
+++ b/server/types/models/video/video-change-ownership.ts
@@ -0,0 +1,26 @@
1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
2import { PickWith } from '@server/types/utils'
3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MVideo, MVideoWithAllFiles } from './video'
5
6type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
7
8// ############################################################################
9
10export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'>
11
12export type MVideoChangeOwnershipFull =
13 MVideoChangeOwnership &
14 Use<'Initiator', MAccountDefault> &
15 Use<'NextOwner', MAccountDefault> &
16 Use<'Video', MVideoWithAllFiles>
17
18// ############################################################################
19
20// Format for API or AP object
21
22export type MVideoChangeOwnershipFormattable =
23 Pick<MVideoChangeOwnership, 'id' | 'status' | 'createdAt'> &
24 Use<'Initiator', MAccountFormattable> &
25 Use<'NextOwner', MAccountFormattable> &
26 Use<'Video', Pick<MVideo, 'id' | 'uuid' | 'url' | 'name'>>