PeerTube/server/types/models/video/schedule-video-update.ts

20 lines
809 B
TypeScript
Raw Normal View History

2019-08-15 11:53:26 +02:00
import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update'
2020-06-23 14:10:17 +02:00
import { PickWith } from '@shared/core-utils'
import { MVideoAPWithoutCaption, MVideoWithBlacklistLight } from './video'
type Use<K extends keyof ScheduleVideoUpdateModel, M> = PickWith<ScheduleVideoUpdateModel, K, M>
// ############################################################################
2019-08-15 11:53:26 +02:00
export type MScheduleVideoUpdate = Omit<ScheduleVideoUpdateModel, 'Video'>
2019-08-20 19:05:31 +02:00
// ############################################################################
2020-01-31 16:56:52 +01:00
export type MScheduleVideoUpdateVideoAll =
MScheduleVideoUpdate &
Use<'Video', MVideoAPWithoutCaption & MVideoWithBlacklistLight>
2019-08-20 19:05:31 +02:00
// Format for API or AP object
export type MScheduleVideoUpdateFormattable = Pick<MScheduleVideoUpdate, 'updateAt' | 'privacy'>