diff options
Diffstat (limited to 'server/types')
-rw-r--r-- | server/types/express.d.ts | 6 | ||||
-rw-r--r-- | server/types/models/video/index.ts | 1 | ||||
-rw-r--r-- | server/types/models/video/video-live-replay-setting.ts | 3 | ||||
-rw-r--r-- | server/types/models/video/video-live-session.ts | 6 | ||||
-rw-r--r-- | server/types/models/video/video-live.ts | 9 |
5 files changed, 19 insertions, 6 deletions
diff --git a/server/types/express.d.ts b/server/types/express.d.ts index c1c379b98..a992a9926 100644 --- a/server/types/express.d.ts +++ b/server/types/express.d.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { OutgoingHttpHeaders } from 'http' | 1 | import { OutgoingHttpHeaders } from 'http' |
2 | import { Writable } from 'stream' | ||
2 | import { RegisterServerAuthExternalOptions } from '@server/types' | 3 | import { RegisterServerAuthExternalOptions } from '@server/types' |
3 | import { | 4 | import { |
4 | MAbuseMessage, | 5 | MAbuseMessage, |
@@ -16,7 +17,7 @@ import { | |||
16 | MVideoFormattableDetails, | 17 | MVideoFormattableDetails, |
17 | MVideoId, | 18 | MVideoId, |
18 | MVideoImmutable, | 19 | MVideoImmutable, |
19 | MVideoLive, | 20 | MVideoLiveFormattable, |
20 | MVideoPlaylistFull, | 21 | MVideoPlaylistFull, |
21 | MVideoPlaylistFullSummary | 22 | MVideoPlaylistFullSummary |
22 | } from '@server/types/models' | 23 | } from '@server/types/models' |
@@ -43,7 +44,6 @@ import { | |||
43 | MVideoShareActor, | 44 | MVideoShareActor, |
44 | MVideoThumbnail | 45 | MVideoThumbnail |
45 | } from './models' | 46 | } from './models' |
46 | import { Writable } from 'stream' | ||
47 | import { MVideoSource } from './models/video/video-source' | 47 | import { MVideoSource } from './models/video/video-source' |
48 | 48 | ||
49 | declare module 'express' { | 49 | declare module 'express' { |
@@ -124,7 +124,7 @@ declare module 'express' { | |||
124 | onlyVideo?: MVideoThumbnail | 124 | onlyVideo?: MVideoThumbnail |
125 | videoId?: MVideoId | 125 | videoId?: MVideoId |
126 | 126 | ||
127 | videoLive?: MVideoLive | 127 | videoLive?: MVideoLiveFormattable |
128 | videoLiveSession?: MVideoLiveSession | 128 | videoLiveSession?: MVideoLiveSession |
129 | 129 | ||
130 | videoShare?: MVideoShareActor | 130 | videoShare?: MVideoShareActor |
diff --git a/server/types/models/video/index.ts b/server/types/models/video/index.ts index 940f0ac0d..6e45fcc79 100644 --- a/server/types/models/video/index.ts +++ b/server/types/models/video/index.ts | |||
@@ -13,6 +13,7 @@ export * from './video-channels' | |||
13 | export * from './video-comment' | 13 | export * from './video-comment' |
14 | export * from './video-file' | 14 | export * from './video-file' |
15 | export * from './video-import' | 15 | export * from './video-import' |
16 | export * from './video-live-replay-setting' | ||
16 | export * from './video-live-session' | 17 | export * from './video-live-session' |
17 | export * from './video-live' | 18 | export * from './video-live' |
18 | export * from './video-playlist' | 19 | export * from './video-playlist' |
diff --git a/server/types/models/video/video-live-replay-setting.ts b/server/types/models/video/video-live-replay-setting.ts new file mode 100644 index 000000000..c5a5adf54 --- /dev/null +++ b/server/types/models/video/video-live-replay-setting.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | import { VideoLiveReplaySettingModel } from '@server/models/video/video-live-replay-setting' | ||
2 | |||
3 | export type MLiveReplaySetting = Omit<VideoLiveReplaySettingModel, 'VideoLive' | 'VideoLiveSession'> | ||
diff --git a/server/types/models/video/video-live-session.ts b/server/types/models/video/video-live-session.ts index 2e5e4b684..852e2c24b 100644 --- a/server/types/models/video/video-live-session.ts +++ b/server/types/models/video/video-live-session.ts | |||
@@ -1,15 +1,17 @@ | |||
1 | import { VideoLiveSessionModel } from '@server/models/video/video-live-session' | 1 | import { VideoLiveSessionModel } from '@server/models/video/video-live-session' |
2 | import { PickWith } from '@shared/typescript-utils' | 2 | import { PickWith } from '@shared/typescript-utils' |
3 | import { MVideo } from './video' | 3 | import { MVideo } from './video' |
4 | import { MLiveReplaySetting } from './video-live-replay-setting' | ||
4 | 5 | ||
5 | type Use<K extends keyof VideoLiveSessionModel, M> = PickWith<VideoLiveSessionModel, K, M> | 6 | type Use<K extends keyof VideoLiveSessionModel, M> = PickWith<VideoLiveSessionModel, K, M> |
6 | 7 | ||
7 | // ############################################################################ | 8 | // ############################################################################ |
8 | 9 | ||
9 | export type MVideoLiveSession = Omit<VideoLiveSessionModel, 'Video' | 'VideoLive'> | 10 | export type MVideoLiveSession = Omit<VideoLiveSessionModel, 'Video' | 'VideoLive' | 'ReplaySetting'> |
10 | 11 | ||
11 | // ############################################################################ | 12 | // ############################################################################ |
12 | 13 | ||
13 | export type MVideoLiveSessionReplay = | 14 | export type MVideoLiveSessionReplay = |
14 | MVideoLiveSession & | 15 | MVideoLiveSession & |
15 | Use<'ReplayVideo', MVideo> | 16 | Use<'ReplayVideo', MVideo> & |
17 | Use<'ReplaySetting', MLiveReplaySetting> | ||
diff --git a/server/types/models/video/video-live.ts b/server/types/models/video/video-live.ts index 903cea982..a899edfa6 100644 --- a/server/types/models/video/video-live.ts +++ b/server/types/models/video/video-live.ts | |||
@@ -1,15 +1,22 @@ | |||
1 | import { VideoLiveModel } from '@server/models/video/video-live' | 1 | import { VideoLiveModel } from '@server/models/video/video-live' |
2 | import { PickWith } from '@shared/typescript-utils' | 2 | import { PickWith } from '@shared/typescript-utils' |
3 | import { MVideo } from './video' | 3 | import { MVideo } from './video' |
4 | import { MLiveReplaySetting } from './video-live-replay-setting' | ||
4 | 5 | ||
5 | type Use<K extends keyof VideoLiveModel, M> = PickWith<VideoLiveModel, K, M> | 6 | type Use<K extends keyof VideoLiveModel, M> = PickWith<VideoLiveModel, K, M> |
6 | 7 | ||
7 | // ############################################################################ | 8 | // ############################################################################ |
8 | 9 | ||
9 | export type MVideoLive = Omit<VideoLiveModel, 'Video'> | 10 | export type MVideoLive = Omit<VideoLiveModel, 'Video' | 'ReplaySetting'> |
10 | 11 | ||
11 | // ############################################################################ | 12 | // ############################################################################ |
12 | 13 | ||
13 | export type MVideoLiveVideo = | 14 | export type MVideoLiveVideo = |
14 | MVideoLive & | 15 | MVideoLive & |
15 | Use<'Video', MVideo> | 16 | Use<'Video', MVideo> |
17 | |||
18 | // ############################################################################ | ||
19 | |||
20 | export type MVideoLiveVideoWithSetting = | ||
21 | MVideoLiveVideo & | ||
22 | Use<'ReplaySetting', MLiveReplaySetting> | ||