diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-18 10:45:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-18 10:46:27 +0200 |
commit | 26d6bf6533023326fa017812cf31bbe20c752d36 (patch) | |
tree | 9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server/typings/models/video/video-change-ownership.ts | |
parent | d6d951ddc0c492f3261065b5dcb4df0534d252fc (diff) | |
download | PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip |
Split types and typings
Diffstat (limited to 'server/typings/models/video/video-change-ownership.ts')
-rw-r--r-- | server/typings/models/video/video-change-ownership.ts | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/typings/models/video/video-change-ownership.ts deleted file mode 100644 index 971dc3db5..000000000 --- a/server/typings/models/video/video-change-ownership.ts +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' | ||
2 | import { PickWith } from '@server/typings/utils' | ||
3 | import { MAccountDefault, MAccountFormattable } from '../account/account' | ||
4 | import { MVideo, MVideoWithAllFiles } from './video' | ||
5 | |||
6 | type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M> | ||
7 | |||
8 | // ############################################################################ | ||
9 | |||
10 | export type MVideoChangeOwnership = Omit<VideoChangeOwnershipModel, 'Initiator' | 'NextOwner' | 'Video'> | ||
11 | |||
12 | export 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 | |||
22 | export 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'>> | ||