aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-06-18 10:45:25 +0200
committerChocobozzz <me@florianbigard.com>2020-06-18 10:46:27 +0200
commit26d6bf6533023326fa017812cf31bbe20c752d36 (patch)
tree9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server/lib
parentd6d951ddc0c492f3261065b5dcb4df0534d252fc (diff)
downloadPeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst
PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip
Split types and typings
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/activitypub/actor.ts2
-rw-r--r--server/lib/activitypub/audience.ts2
-rw-r--r--server/lib/activitypub/cache-file.ts2
-rw-r--r--server/lib/activitypub/follow.ts2
-rw-r--r--server/lib/activitypub/playlist.ts6
-rw-r--r--server/lib/activitypub/process/process-accept.ts4
-rw-r--r--server/lib/activitypub/process/process-announce.ts4
-rw-r--r--server/lib/activitypub/process/process-create.ts4
-rw-r--r--server/lib/activitypub/process/process-delete.ts4
-rw-r--r--server/lib/activitypub/process/process-dislike.ts4
-rw-r--r--server/lib/activitypub/process/process-flag.ts4
-rw-r--r--server/lib/activitypub/process/process-follow.ts4
-rw-r--r--server/lib/activitypub/process/process-like.ts4
-rw-r--r--server/lib/activitypub/process/process-reject.ts4
-rw-r--r--server/lib/activitypub/process/process-undo.ts4
-rw-r--r--server/lib/activitypub/process/process-update.ts4
-rw-r--r--server/lib/activitypub/process/process-view.ts4
-rw-r--r--server/lib/activitypub/process/process.ts4
-rw-r--r--server/lib/activitypub/send/send-accept.ts2
-rw-r--r--server/lib/activitypub/send/send-announce.ts4
-rw-r--r--server/lib/activitypub/send/send-create.ts2
-rw-r--r--server/lib/activitypub/send/send-delete.ts4
-rw-r--r--server/lib/activitypub/send/send-dislike.ts2
-rw-r--r--server/lib/activitypub/send/send-flag.ts4
-rw-r--r--server/lib/activitypub/send/send-follow.ts2
-rw-r--r--server/lib/activitypub/send/send-like.ts2
-rw-r--r--server/lib/activitypub/send/send-reject.ts2
-rw-r--r--server/lib/activitypub/send/send-undo.ts2
-rw-r--r--server/lib/activitypub/send/send-update.ts2
-rw-r--r--server/lib/activitypub/send/send-view.ts2
-rw-r--r--server/lib/activitypub/send/utils.ts2
-rw-r--r--server/lib/activitypub/share.ts2
-rw-r--r--server/lib/activitypub/url.ts8
-rw-r--r--server/lib/activitypub/video-comments.ts2
-rw-r--r--server/lib/activitypub/video-rates.ts2
-rw-r--r--server/lib/activitypub/videos.ts6
-rw-r--r--server/lib/avatar.ts2
-rw-r--r--server/lib/blocklist.ts2
-rw-r--r--server/lib/client-html.ts2
-rw-r--r--server/lib/emailer.ts6
-rw-r--r--server/lib/hls.ts2
-rw-r--r--server/lib/job-queue/handlers/activitypub-follow.ts2
-rw-r--r--server/lib/job-queue/handlers/activitypub-http-fetcher.ts2
-rw-r--r--server/lib/job-queue/handlers/utils/activitypub-http-utils.ts2
-rw-r--r--server/lib/job-queue/handlers/video-file-import.ts2
-rw-r--r--server/lib/job-queue/handlers/video-import.ts4
-rw-r--r--server/lib/job-queue/handlers/video-transcoding.ts2
-rw-r--r--server/lib/moderation.ts2
-rw-r--r--server/lib/notifier.ts8
-rw-r--r--server/lib/oauth-model.ts4
-rw-r--r--server/lib/peertube-socket.ts2
-rw-r--r--server/lib/plugins/plugin-manager.ts2
-rw-r--r--server/lib/redundancy.ts2
-rw-r--r--server/lib/schedulers/update-videos-scheduler.ts2
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts2
-rw-r--r--server/lib/thumbnail.ts6
-rw-r--r--server/lib/user.ts4
-rw-r--r--server/lib/video-blacklist.ts2
-rw-r--r--server/lib/video-channel.ts2
-rw-r--r--server/lib/video-comment.ts2
-rw-r--r--server/lib/video-paths.ts2
-rw-r--r--server/lib/video-playlist.ts4
-rw-r--r--server/lib/video-transcoding.ts2
63 files changed, 97 insertions, 97 deletions
diff --git a/server/lib/activitypub/actor.ts b/server/lib/activitypub/actor.ts
index 0e5742071..73406e248 100644
--- a/server/lib/activitypub/actor.ts
+++ b/server/lib/activitypub/actor.ts
@@ -33,7 +33,7 @@ import {
33 MActorFullActor, 33 MActorFullActor,
34 MActorId, 34 MActorId,
35 MChannel 35 MChannel
36} from '../../typings/models' 36} from '../../types/models'
37import { extname } from 'path' 37import { extname } from 'path'
38import { getServerActor } from '@server/models/application/application' 38import { getServerActor } from '@server/models/application/application'
39 39
diff --git a/server/lib/activitypub/audience.ts b/server/lib/activitypub/audience.ts
index 4b30d1f6f..2986714d3 100644
--- a/server/lib/activitypub/audience.ts
+++ b/server/lib/activitypub/audience.ts
@@ -4,7 +4,7 @@ import { ACTIVITY_PUB } from '../../initializers/constants'
4import { ActorModel } from '../../models/activitypub/actor' 4import { ActorModel } from '../../models/activitypub/actor'
5import { VideoModel } from '../../models/video/video' 5import { VideoModel } from '../../models/video/video'
6import { VideoShareModel } from '../../models/video/video-share' 6import { VideoShareModel } from '../../models/video/video-share'
7import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../typings/models' 7import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../types/models'
8 8
9function getRemoteVideoAudience (accountActor: MActorUrl, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience { 9function getRemoteVideoAudience (accountActor: MActorUrl, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience {
10 return { 10 return {
diff --git a/server/lib/activitypub/cache-file.ts b/server/lib/activitypub/cache-file.ts
index 8252e95e9..2e6dd34e0 100644
--- a/server/lib/activitypub/cache-file.ts
+++ b/server/lib/activitypub/cache-file.ts
@@ -2,7 +2,7 @@ import { CacheFileObject } from '../../../shared/index'
2import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' 2import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy'
3import { Transaction } from 'sequelize' 3import { Transaction } from 'sequelize'
4import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' 4import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
5import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/typings/models' 5import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/types/models'
6 6
7function cacheFileActivityObjectToDBAttributes (cacheFileObject: CacheFileObject, video: MVideoWithAllFiles, byActor: MActorId) { 7function cacheFileActivityObjectToDBAttributes (cacheFileObject: CacheFileObject, video: MVideoWithAllFiles, byActor: MActorId) {
8 8
diff --git a/server/lib/activitypub/follow.ts b/server/lib/activitypub/follow.ts
index 3b5ad47c9..351499bd1 100644
--- a/server/lib/activitypub/follow.ts
+++ b/server/lib/activitypub/follow.ts
@@ -1,4 +1,4 @@
1import { MActorFollowActors } from '../../typings/models' 1import { MActorFollowActors } from '../../types/models'
2import { CONFIG } from '../../initializers/config' 2import { CONFIG } from '../../initializers/config'
3import { SERVER_ACTOR_NAME } from '../../initializers/constants' 3import { SERVER_ACTOR_NAME } from '../../initializers/constants'
4import { JobQueue } from '../job-queue' 4import { JobQueue } from '../job-queue'
diff --git a/server/lib/activitypub/playlist.ts b/server/lib/activitypub/playlist.ts
index c1d932a68..bd442b223 100644
--- a/server/lib/activitypub/playlist.ts
+++ b/server/lib/activitypub/playlist.ts
@@ -15,9 +15,9 @@ import { VideoPlaylistElementModel } from '../../models/video/video-playlist-ele
15import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' 15import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model'
16import { sequelizeTypescript } from '../../initializers/database' 16import { sequelizeTypescript } from '../../initializers/database'
17import { createPlaylistMiniatureFromUrl } from '../thumbnail' 17import { createPlaylistMiniatureFromUrl } from '../thumbnail'
18import { FilteredModelAttributes } from '../../typings/sequelize' 18import { FilteredModelAttributes } from '../../types/sequelize'
19import { MAccountDefault, MAccountId, MVideoId } from '../../typings/models' 19import { MAccountDefault, MAccountId, MVideoId } from '../../types/models'
20import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../typings/models/video/video-playlist' 20import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../types/models/video/video-playlist'
21 21
22function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { 22function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) {
23 const privacy = to.includes(ACTIVITY_PUB.PUBLIC) 23 const privacy = to.includes(ACTIVITY_PUB.PUBLIC)
diff --git a/server/lib/activitypub/process/process-accept.ts b/server/lib/activitypub/process/process-accept.ts
index dcfbb2c84..1799829f8 100644
--- a/server/lib/activitypub/process/process-accept.ts
+++ b/server/lib/activitypub/process/process-accept.ts
@@ -1,8 +1,8 @@
1import { ActivityAccept } from '../../../../shared/models/activitypub' 1import { ActivityAccept } from '../../../../shared/models/activitypub'
2import { ActorFollowModel } from '../../../models/activitypub/actor-follow' 2import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
3import { addFetchOutboxJob } from '../actor' 3import { addFetchOutboxJob } from '../actor'
4import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 4import { APProcessorOptions } from '../../../types/activitypub-processor.model'
5import { MActorDefault, MActorSignature } from '../../../typings/models' 5import { MActorDefault, MActorSignature } from '../../../types/models'
6 6
7async function processAcceptActivity (options: APProcessorOptions<ActivityAccept>) { 7async function processAcceptActivity (options: APProcessorOptions<ActivityAccept>) {
8 const { byActor: targetActor, inboxActor } = options 8 const { byActor: targetActor, inboxActor } = options
diff --git a/server/lib/activitypub/process/process-announce.ts b/server/lib/activitypub/process/process-announce.ts
index 26427aaa1..63082466e 100644
--- a/server/lib/activitypub/process/process-announce.ts
+++ b/server/lib/activitypub/process/process-announce.ts
@@ -6,8 +6,8 @@ import { forwardVideoRelatedActivity } from '../send/utils'
6import { getOrCreateVideoAndAccountAndChannel } from '../videos' 6import { getOrCreateVideoAndAccountAndChannel } from '../videos'
7import { Notifier } from '../../notifier' 7import { Notifier } from '../../notifier'
8import { logger } from '../../../helpers/logger' 8import { logger } from '../../../helpers/logger'
9import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 9import { APProcessorOptions } from '../../../types/activitypub-processor.model'
10import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' 10import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../types/models'
11 11
12async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) { 12async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) {
13 const { activity, byActor: actorAnnouncer } = options 13 const { activity, byActor: actorAnnouncer } = options
diff --git a/server/lib/activitypub/process/process-create.ts b/server/lib/activitypub/process/process-create.ts
index 5e737f49e..74f1032e2 100644
--- a/server/lib/activitypub/process/process-create.ts
+++ b/server/lib/activitypub/process/process-create.ts
@@ -5,8 +5,8 @@ import { VideoCommentObject } from '../../../../shared/models/activitypub/object
5import { retryTransactionWrapper } from '../../../helpers/database-utils' 5import { retryTransactionWrapper } from '../../../helpers/database-utils'
6import { logger } from '../../../helpers/logger' 6import { logger } from '../../../helpers/logger'
7import { sequelizeTypescript } from '../../../initializers/database' 7import { sequelizeTypescript } from '../../../initializers/database'
8import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 8import { APProcessorOptions } from '../../../types/activitypub-processor.model'
9import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' 9import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../types/models'
10import { Notifier } from '../../notifier' 10import { Notifier } from '../../notifier'
11import { createOrUpdateCacheFile } from '../cache-file' 11import { createOrUpdateCacheFile } from '../cache-file'
12import { createOrUpdateVideoPlaylist } from '../playlist' 12import { createOrUpdateVideoPlaylist } from '../playlist'
diff --git a/server/lib/activitypub/process/process-delete.ts b/server/lib/activitypub/process/process-delete.ts
index 7c8dc83e8..b9fc5e792 100644
--- a/server/lib/activitypub/process/process-delete.ts
+++ b/server/lib/activitypub/process/process-delete.ts
@@ -8,8 +8,8 @@ import { VideoCommentModel } from '../../../models/video/video-comment'
8import { markCommentAsDeleted } from '../../video-comment' 8import { markCommentAsDeleted } from '../../video-comment'
9import { forwardVideoRelatedActivity } from '../send/utils' 9import { forwardVideoRelatedActivity } from '../send/utils'
10import { VideoPlaylistModel } from '../../../models/video/video-playlist' 10import { VideoPlaylistModel } from '../../../models/video/video-playlist'
11import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 11import { APProcessorOptions } from '../../../types/activitypub-processor.model'
12import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../typings/models' 12import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../types/models'
13 13
14async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) { 14async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) {
15 const { activity, byActor } = options 15 const { activity, byActor } = options
diff --git a/server/lib/activitypub/process/process-dislike.ts b/server/lib/activitypub/process/process-dislike.ts
index fcdd0b86e..0cd204501 100644
--- a/server/lib/activitypub/process/process-dislike.ts
+++ b/server/lib/activitypub/process/process-dislike.ts
@@ -6,8 +6,8 @@ import { AccountVideoRateModel } from '../../../models/account/account-video-rat
6import { getOrCreateVideoAndAccountAndChannel } from '../videos' 6import { getOrCreateVideoAndAccountAndChannel } from '../videos'
7import { forwardVideoRelatedActivity } from '../send/utils' 7import { forwardVideoRelatedActivity } from '../send/utils'
8import { getVideoDislikeActivityPubUrl } from '../url' 8import { getVideoDislikeActivityPubUrl } from '../url'
9import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 9import { APProcessorOptions } from '../../../types/activitypub-processor.model'
10import { MActorSignature } from '../../../typings/models' 10import { MActorSignature } from '../../../types/models'
11 11
12async function processDislikeActivity (options: APProcessorOptions<ActivityCreate | ActivityDislike>) { 12async function processDislikeActivity (options: APProcessorOptions<ActivityCreate | ActivityDislike>) {
13 const { activity, byActor } = options 13 const { activity, byActor } = options
diff --git a/server/lib/activitypub/process/process-flag.ts b/server/lib/activitypub/process/process-flag.ts
index 7337f337c..8d1c9c869 100644
--- a/server/lib/activitypub/process/process-flag.ts
+++ b/server/lib/activitypub/process/process-flag.ts
@@ -7,8 +7,8 @@ import { VideoAbuseModel } from '../../../models/video/video-abuse'
7import { getOrCreateVideoAndAccountAndChannel } from '../videos' 7import { getOrCreateVideoAndAccountAndChannel } from '../videos'
8import { Notifier } from '../../notifier' 8import { Notifier } from '../../notifier'
9import { getAPId } from '../../../helpers/activitypub' 9import { getAPId } from '../../../helpers/activitypub'
10import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 10import { APProcessorOptions } from '../../../types/activitypub-processor.model'
11import { MActorSignature, MVideoAbuseAccountVideo } from '../../../typings/models' 11import { MActorSignature, MVideoAbuseAccountVideo } from '../../../types/models'
12import { AccountModel } from '@server/models/account/account' 12import { AccountModel } from '@server/models/account/account'
13 13
14async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { 14async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) {
diff --git a/server/lib/activitypub/process/process-follow.ts b/server/lib/activitypub/process/process-follow.ts
index 950d421dd..7eb7e828d 100644
--- a/server/lib/activitypub/process/process-follow.ts
+++ b/server/lib/activitypub/process/process-follow.ts
@@ -8,8 +8,8 @@ import { sendAccept, sendReject } from '../send'
8import { Notifier } from '../../notifier' 8import { Notifier } from '../../notifier'
9import { getAPId } from '../../../helpers/activitypub' 9import { getAPId } from '../../../helpers/activitypub'
10import { CONFIG } from '../../../initializers/config' 10import { CONFIG } from '../../../initializers/config'
11import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 11import { APProcessorOptions } from '../../../types/activitypub-processor.model'
12import { MActorFollowActors, MActorSignature } from '../../../typings/models' 12import { MActorFollowActors, MActorSignature } from '../../../types/models'
13import { autoFollowBackIfNeeded } from '../follow' 13import { autoFollowBackIfNeeded } from '../follow'
14import { getServerActor } from '@server/models/application/application' 14import { getServerActor } from '@server/models/application/application'
15 15
diff --git a/server/lib/activitypub/process/process-like.ts b/server/lib/activitypub/process/process-like.ts
index fba3c76a4..b800a5618 100644
--- a/server/lib/activitypub/process/process-like.ts
+++ b/server/lib/activitypub/process/process-like.ts
@@ -6,8 +6,8 @@ import { forwardVideoRelatedActivity } from '../send/utils'
6import { getOrCreateVideoAndAccountAndChannel } from '../videos' 6import { getOrCreateVideoAndAccountAndChannel } from '../videos'
7import { getVideoLikeActivityPubUrl } from '../url' 7import { getVideoLikeActivityPubUrl } from '../url'
8import { getAPId } from '../../../helpers/activitypub' 8import { getAPId } from '../../../helpers/activitypub'
9import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 9import { APProcessorOptions } from '../../../types/activitypub-processor.model'
10import { MActorSignature } from '../../../typings/models' 10import { MActorSignature } from '../../../types/models'
11 11
12async function processLikeActivity (options: APProcessorOptions<ActivityLike>) { 12async function processLikeActivity (options: APProcessorOptions<ActivityLike>) {
13 const { activity, byActor } = options 13 const { activity, byActor } = options
diff --git a/server/lib/activitypub/process/process-reject.ts b/server/lib/activitypub/process/process-reject.ts
index 9804436a2..03b669fd9 100644
--- a/server/lib/activitypub/process/process-reject.ts
+++ b/server/lib/activitypub/process/process-reject.ts
@@ -1,8 +1,8 @@
1import { ActivityReject } from '../../../../shared/models/activitypub/activity' 1import { ActivityReject } from '../../../../shared/models/activitypub/activity'
2import { sequelizeTypescript } from '../../../initializers/database' 2import { sequelizeTypescript } from '../../../initializers/database'
3import { ActorFollowModel } from '../../../models/activitypub/actor-follow' 3import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
4import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 4import { APProcessorOptions } from '../../../types/activitypub-processor.model'
5import { MActor } from '../../../typings/models' 5import { MActor } from '../../../types/models'
6 6
7async function processRejectActivity (options: APProcessorOptions<ActivityReject>) { 7async function processRejectActivity (options: APProcessorOptions<ActivityReject>) {
8 const { byActor: targetActor, inboxActor } = options 8 const { byActor: targetActor, inboxActor } = options
diff --git a/server/lib/activitypub/process/process-undo.ts b/server/lib/activitypub/process/process-undo.ts
index 9ef6a8a97..caf672cd6 100644
--- a/server/lib/activitypub/process/process-undo.ts
+++ b/server/lib/activitypub/process/process-undo.ts
@@ -10,8 +10,8 @@ import { forwardVideoRelatedActivity } from '../send/utils'
10import { getOrCreateVideoAndAccountAndChannel } from '../videos' 10import { getOrCreateVideoAndAccountAndChannel } from '../videos'
11import { VideoShareModel } from '../../../models/video/video-share' 11import { VideoShareModel } from '../../../models/video/video-share'
12import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' 12import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
13import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 13import { APProcessorOptions } from '../../../types/activitypub-processor.model'
14import { MActorSignature } from '../../../typings/models' 14import { MActorSignature } from '../../../types/models'
15 15
16async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { 16async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) {
17 const { activity, byActor } = options 17 const { activity, byActor } = options
diff --git a/server/lib/activitypub/process/process-update.ts b/server/lib/activitypub/process/process-update.ts
index 98ab0f83d..1bdf23d6f 100644
--- a/server/lib/activitypub/process/process-update.ts
+++ b/server/lib/activitypub/process/process-update.ts
@@ -14,8 +14,8 @@ import { createOrUpdateCacheFile } from '../cache-file'
14import { forwardVideoRelatedActivity } from '../send/utils' 14import { forwardVideoRelatedActivity } from '../send/utils'
15import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' 15import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object'
16import { createOrUpdateVideoPlaylist } from '../playlist' 16import { createOrUpdateVideoPlaylist } from '../playlist'
17import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 17import { APProcessorOptions } from '../../../types/activitypub-processor.model'
18import { MActorSignature, MAccountIdActor } from '../../../typings/models' 18import { MActorSignature, MAccountIdActor } from '../../../types/models'
19import { isRedundancyAccepted } from '@server/lib/redundancy' 19import { isRedundancyAccepted } from '@server/lib/redundancy'
20 20
21async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { 21async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) {
diff --git a/server/lib/activitypub/process/process-view.ts b/server/lib/activitypub/process/process-view.ts
index b3b6c933d..cc26180af 100644
--- a/server/lib/activitypub/process/process-view.ts
+++ b/server/lib/activitypub/process/process-view.ts
@@ -2,8 +2,8 @@ import { getOrCreateVideoAndAccountAndChannel } from '../videos'
2import { forwardVideoRelatedActivity } from '../send/utils' 2import { forwardVideoRelatedActivity } from '../send/utils'
3import { Redis } from '../../redis' 3import { Redis } from '../../redis'
4import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub' 4import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub'
5import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 5import { APProcessorOptions } from '../../../types/activitypub-processor.model'
6import { MActorSignature } from '../../../typings/models' 6import { MActorSignature } from '../../../types/models'
7 7
8async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) { 8async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) {
9 const { activity, byActor } = options 9 const { activity, byActor } = options
diff --git a/server/lib/activitypub/process/process.ts b/server/lib/activitypub/process/process.ts
index c602bf218..e60dd2a5b 100644
--- a/server/lib/activitypub/process/process.ts
+++ b/server/lib/activitypub/process/process.ts
@@ -14,8 +14,8 @@ import { getOrCreateActorAndServerAndModel } from '../actor'
14import { processDislikeActivity } from './process-dislike' 14import { processDislikeActivity } from './process-dislike'
15import { processFlagActivity } from './process-flag' 15import { processFlagActivity } from './process-flag'
16import { processViewActivity } from './process-view' 16import { processViewActivity } from './process-view'
17import { APProcessorOptions } from '../../../typings/activitypub-processor.model' 17import { APProcessorOptions } from '../../../types/activitypub-processor.model'
18import { MActorDefault, MActorSignature } from '../../../typings/models' 18import { MActorDefault, MActorSignature } from '../../../types/models'
19 19
20const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { 20const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = {
21 Create: processCreateActivity, 21 Create: processCreateActivity,
diff --git a/server/lib/activitypub/send/send-accept.ts b/server/lib/activitypub/send/send-accept.ts
index c4c6b849b..50e192bdd 100644
--- a/server/lib/activitypub/send/send-accept.ts
+++ b/server/lib/activitypub/send/send-accept.ts
@@ -3,7 +3,7 @@ import { getActorFollowAcceptActivityPubUrl, getActorFollowActivityPubUrl } from
3import { unicastTo } from './utils' 3import { unicastTo } from './utils'
4import { buildFollowActivity } from './send-follow' 4import { buildFollowActivity } from './send-follow'
5import { logger } from '../../../helpers/logger' 5import { logger } from '../../../helpers/logger'
6import { MActor, MActorFollowActors } from '../../../typings/models' 6import { MActor, MActorFollowActors } from '../../../types/models'
7 7
8function sendAccept (actorFollow: MActorFollowActors) { 8function sendAccept (actorFollow: MActorFollowActors) {
9 const follower = actorFollow.ActorFollower 9 const follower = actorFollow.ActorFollower
diff --git a/server/lib/activitypub/send/send-announce.ts b/server/lib/activitypub/send/send-announce.ts
index d03b358f1..471dcfa77 100644
--- a/server/lib/activitypub/send/send-announce.ts
+++ b/server/lib/activitypub/send/send-announce.ts
@@ -3,8 +3,8 @@ import { ActivityAnnounce, ActivityAudience } from '../../../../shared/models/ac
3import { broadcastToFollowers } from './utils' 3import { broadcastToFollowers } from './utils'
4import { audiencify, getActorsInvolvedInVideo, getAudience, getAudienceFromFollowersOf } from '../audience' 4import { audiencify, getActorsInvolvedInVideo, getAudience, getAudienceFromFollowersOf } from '../audience'
5import { logger } from '../../../helpers/logger' 5import { logger } from '../../../helpers/logger'
6import { MActorLight, MVideo } from '../../../typings/models' 6import { MActorLight, MVideo } from '../../../types/models'
7import { MVideoShare } from '../../../typings/models/video' 7import { MVideoShare } from '../../../types/models/video'
8 8
9async function buildAnnounceWithVideoAudience ( 9async function buildAnnounceWithVideoAudience (
10 byActor: MActorLight, 10 byActor: MActorLight,
diff --git a/server/lib/activitypub/send/send-create.ts b/server/lib/activitypub/send/send-create.ts
index e521cabbc..9fb218224 100644
--- a/server/lib/activitypub/send/send-create.ts
+++ b/server/lib/activitypub/send/send-create.ts
@@ -14,7 +14,7 @@ import {
14 MVideoPlaylistFull, 14 MVideoPlaylistFull,
15 MVideoRedundancyFileVideo, 15 MVideoRedundancyFileVideo,
16 MVideoRedundancyStreamingPlaylistVideo 16 MVideoRedundancyStreamingPlaylistVideo
17} from '../../../typings/models' 17} from '../../../types/models'
18import { getServerActor } from '@server/models/application/application' 18import { getServerActor } from '@server/models/application/application'
19import { ContextType } from '@shared/models/activitypub/context' 19import { ContextType } from '@shared/models/activitypub/context'
20 20
diff --git a/server/lib/activitypub/send/send-delete.ts b/server/lib/activitypub/send/send-delete.ts
index 2afd2c05d..e0acced18 100644
--- a/server/lib/activitypub/send/send-delete.ts
+++ b/server/lib/activitypub/send/send-delete.ts
@@ -5,8 +5,8 @@ import { logger } from '../../../helpers/logger'
5import { ActorModel } from '../../../models/activitypub/actor' 5import { ActorModel } from '../../../models/activitypub/actor'
6import { VideoCommentModel } from '../../../models/video/video-comment' 6import { VideoCommentModel } from '../../../models/video/video-comment'
7import { VideoShareModel } from '../../../models/video/video-share' 7import { VideoShareModel } from '../../../models/video/video-share'
8import { MActorUrl } from '../../../typings/models' 8import { MActorUrl } from '../../../types/models'
9import { MCommentOwnerVideo, MVideoAccountLight, MVideoPlaylistFullSummary } from '../../../typings/models/video' 9import { MCommentOwnerVideo, MVideoAccountLight, MVideoPlaylistFullSummary } from '../../../types/models/video'
10import { audiencify, getActorsInvolvedInVideo, getVideoCommentAudience } from '../audience' 10import { audiencify, getActorsInvolvedInVideo, getVideoCommentAudience } from '../audience'
11import { getDeleteActivityPubUrl } from '../url' 11import { getDeleteActivityPubUrl } from '../url'
12import { broadcastToActors, broadcastToFollowers, sendVideoRelatedActivity, unicastTo } from './utils' 12import { broadcastToActors, broadcastToFollowers, sendVideoRelatedActivity, unicastTo } from './utils'
diff --git a/server/lib/activitypub/send/send-dislike.ts b/server/lib/activitypub/send/send-dislike.ts
index 600469c71..1bb7dc937 100644
--- a/server/lib/activitypub/send/send-dislike.ts
+++ b/server/lib/activitypub/send/send-dislike.ts
@@ -4,7 +4,7 @@ import { logger } from '../../../helpers/logger'
4import { ActivityAudience, ActivityDislike } from '../../../../shared/models/activitypub' 4import { ActivityAudience, ActivityDislike } from '../../../../shared/models/activitypub'
5import { sendVideoRelatedActivity } from './utils' 5import { sendVideoRelatedActivity } from './utils'
6import { audiencify, getAudience } from '../audience' 6import { audiencify, getAudience } from '../audience'
7import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models' 7import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models'
8 8
9function sendDislike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { 9function sendDislike (byActor: MActor, video: MVideoAccountLight, t: Transaction) {
10 logger.info('Creating job to dislike %s.', video.url) 10 logger.info('Creating job to dislike %s.', video.url)
diff --git a/server/lib/activitypub/send/send-flag.ts b/server/lib/activitypub/send/send-flag.ts
index e4e523631..3a1fe0812 100644
--- a/server/lib/activitypub/send/send-flag.ts
+++ b/server/lib/activitypub/send/send-flag.ts
@@ -4,8 +4,8 @@ import { logger } from '../../../helpers/logger'
4import { ActivityAudience, ActivityFlag } from '../../../../shared/models/activitypub' 4import { ActivityAudience, ActivityFlag } from '../../../../shared/models/activitypub'
5import { audiencify, getAudience } from '../audience' 5import { audiencify, getAudience } from '../audience'
6import { Transaction } from 'sequelize' 6import { Transaction } from 'sequelize'
7import { MActor, MVideoFullLight } from '../../../typings/models' 7import { MActor, MVideoFullLight } from '../../../types/models'
8import { MVideoAbuseVideo } from '../../../typings/models/video' 8import { MVideoAbuseVideo } from '../../../types/models/video'
9 9
10function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, video: MVideoFullLight, t: Transaction) { 10function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, video: MVideoFullLight, t: Transaction) {
11 if (!video.VideoChannel.Account.Actor.serverId) return // Local user 11 if (!video.VideoChannel.Account.Actor.serverId) return // Local user
diff --git a/server/lib/activitypub/send/send-follow.ts b/server/lib/activitypub/send/send-follow.ts
index ce400d8ff..08f1d83f9 100644
--- a/server/lib/activitypub/send/send-follow.ts
+++ b/server/lib/activitypub/send/send-follow.ts
@@ -3,7 +3,7 @@ import { getActorFollowActivityPubUrl } from '../url'
3import { unicastTo } from './utils' 3import { unicastTo } from './utils'
4import { logger } from '../../../helpers/logger' 4import { logger } from '../../../helpers/logger'
5import { Transaction } from 'sequelize' 5import { Transaction } from 'sequelize'
6import { MActor, MActorFollowActors } from '../../../typings/models' 6import { MActor, MActorFollowActors } from '../../../types/models'
7 7
8function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { 8function sendFollow (actorFollow: MActorFollowActors, t: Transaction) {
9 const me = actorFollow.ActorFollower 9 const me = actorFollow.ActorFollower
diff --git a/server/lib/activitypub/send/send-like.ts b/server/lib/activitypub/send/send-like.ts
index 5db252325..29fcfc404 100644
--- a/server/lib/activitypub/send/send-like.ts
+++ b/server/lib/activitypub/send/send-like.ts
@@ -4,7 +4,7 @@ import { getVideoLikeActivityPubUrl } from '../url'
4import { sendVideoRelatedActivity } from './utils' 4import { sendVideoRelatedActivity } from './utils'
5import { audiencify, getAudience } from '../audience' 5import { audiencify, getAudience } from '../audience'
6import { logger } from '../../../helpers/logger' 6import { logger } from '../../../helpers/logger'
7import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models' 7import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models'
8 8
9function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { 9function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) {
10 logger.info('Creating job to like %s.', video.url) 10 logger.info('Creating job to like %s.', video.url)
diff --git a/server/lib/activitypub/send/send-reject.ts b/server/lib/activitypub/send/send-reject.ts
index 643c468a9..befbcb8da 100644
--- a/server/lib/activitypub/send/send-reject.ts
+++ b/server/lib/activitypub/send/send-reject.ts
@@ -3,7 +3,7 @@ import { getActorFollowActivityPubUrl, getActorFollowRejectActivityPubUrl } from
3import { unicastTo } from './utils' 3import { unicastTo } from './utils'
4import { buildFollowActivity } from './send-follow' 4import { buildFollowActivity } from './send-follow'
5import { logger } from '../../../helpers/logger' 5import { logger } from '../../../helpers/logger'
6import { MActor } from '../../../typings/models' 6import { MActor } from '../../../types/models'
7 7
8function sendReject (follower: MActor, following: MActor) { 8function sendReject (follower: MActor, following: MActor) {
9 if (!follower.serverId) { // This should never happen 9 if (!follower.serverId) { // This should never happen
diff --git a/server/lib/activitypub/send/send-undo.ts b/server/lib/activitypub/send/send-undo.ts
index 33f1d4921..6ed343300 100644
--- a/server/lib/activitypub/send/send-undo.ts
+++ b/server/lib/activitypub/send/send-undo.ts
@@ -26,7 +26,7 @@ import {
26 MVideoAccountLight, 26 MVideoAccountLight,
27 MVideoRedundancyVideo, 27 MVideoRedundancyVideo,
28 MVideoShare 28 MVideoShare
29} from '../../../typings/models' 29} from '../../../types/models'
30 30
31function sendUndoFollow (actorFollow: MActorFollowActors, t: Transaction) { 31function sendUndoFollow (actorFollow: MActorFollowActors, t: Transaction) {
32 const me = actorFollow.ActorFollower 32 const me = actorFollow.ActorFollower
diff --git a/server/lib/activitypub/send/send-update.ts b/server/lib/activitypub/send/send-update.ts
index 7a4cf3f56..305edf429 100644
--- a/server/lib/activitypub/send/send-update.ts
+++ b/server/lib/activitypub/send/send-update.ts
@@ -18,7 +18,7 @@ import {
18 MVideoAPWithoutCaption, 18 MVideoAPWithoutCaption,
19 MVideoPlaylistFull, 19 MVideoPlaylistFull,
20 MVideoRedundancyVideo 20 MVideoRedundancyVideo
21} from '../../../typings/models' 21} from '../../../types/models'
22import { getServerActor } from '@server/models/application/application' 22import { getServerActor } from '@server/models/application/application'
23 23
24async function sendUpdateVideo (videoArg: MVideoAPWithoutCaption, t: Transaction, overrodeByActor?: MActor) { 24async function sendUpdateVideo (videoArg: MVideoAPWithoutCaption, t: Transaction, overrodeByActor?: MActor) {
diff --git a/server/lib/activitypub/send/send-view.ts b/server/lib/activitypub/send/send-view.ts
index 1f864ea52..3358188a2 100644
--- a/server/lib/activitypub/send/send-view.ts
+++ b/server/lib/activitypub/send/send-view.ts
@@ -5,7 +5,7 @@ import { getVideoLikeActivityPubUrl } from '../url'
5import { sendVideoRelatedActivity } from './utils' 5import { sendVideoRelatedActivity } from './utils'
6import { audiencify, getAudience } from '../audience' 6import { audiencify, getAudience } from '../audience'
7import { logger } from '../../../helpers/logger' 7import { logger } from '../../../helpers/logger'
8import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/typings/models' 8import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/types/models'
9 9
10async function sendView (byActor: ActorModel, video: MVideoImmutable, t: Transaction) { 10async function sendView (byActor: ActorModel, video: MVideoImmutable, t: Transaction) {
11 logger.info('Creating job to send view of %s.', video.url) 11 logger.info('Creating job to send view of %s.', video.url)
diff --git a/server/lib/activitypub/send/utils.ts b/server/lib/activitypub/send/utils.ts
index 44a8926e5..85a9f009d 100644
--- a/server/lib/activitypub/send/utils.ts
+++ b/server/lib/activitypub/send/utils.ts
@@ -6,7 +6,7 @@ import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
6import { JobQueue } from '../../job-queue' 6import { JobQueue } from '../../job-queue'
7import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience' 7import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience'
8import { afterCommitIfTransaction } from '../../../helpers/database-utils' 8import { afterCommitIfTransaction } from '../../../helpers/database-utils'
9import { MActor, MActorId, MActorLight, MActorWithInboxes, MVideoAccountLight, MVideoId, MVideoImmutable } from '../../../typings/models' 9import { MActor, MActorId, MActorLight, MActorWithInboxes, MVideoAccountLight, MVideoId, MVideoImmutable } from '../../../types/models'
10import { getServerActor } from '@server/models/application/application' 10import { getServerActor } from '@server/models/application/application'
11import { ContextType } from '@shared/models/activitypub/context' 11import { ContextType } from '@shared/models/activitypub/context'
12 12
diff --git a/server/lib/activitypub/share.ts b/server/lib/activitypub/share.ts
index d2cbc59a8..5e426f5db 100644
--- a/server/lib/activitypub/share.ts
+++ b/server/lib/activitypub/share.ts
@@ -8,7 +8,7 @@ import { getOrCreateActorAndServerAndModel } from './actor'
8import { logger } from '../../helpers/logger' 8import { logger } from '../../helpers/logger'
9import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' 9import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants'
10import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' 10import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub'
11import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' 11import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../types/models/video'
12import { getServerActor } from '@server/models/application/application' 12import { getServerActor } from '@server/models/application/application'
13 13
14async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) { 14async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) {
diff --git a/server/lib/activitypub/url.ts b/server/lib/activitypub/url.ts
index 6290af34b..7f98751a1 100644
--- a/server/lib/activitypub/url.ts
+++ b/server/lib/activitypub/url.ts
@@ -9,10 +9,10 @@ import {
9 MVideoId, 9 MVideoId,
10 MVideoUrl, 10 MVideoUrl,
11 MVideoUUID 11 MVideoUUID
12} from '../../typings/models' 12} from '../../types/models'
13import { MVideoPlaylist, MVideoPlaylistUUID } from '../../typings/models/video/video-playlist' 13import { MVideoPlaylist, MVideoPlaylistUUID } from '../../types/models/video/video-playlist'
14import { MVideoFileVideoUUID } from '../../typings/models/video/video-file' 14import { MVideoFileVideoUUID } from '../../types/models/video/video-file'
15import { MStreamingPlaylist } from '../../typings/models/video/video-streaming-playlist' 15import { MStreamingPlaylist } from '../../types/models/video/video-streaming-playlist'
16 16
17function getVideoActivityPubUrl (video: MVideoUUID) { 17function getVideoActivityPubUrl (video: MVideoUUID) {
18 return WEBSERVER.URL + '/videos/watch/' + video.uuid 18 return WEBSERVER.URL + '/videos/watch/' + video.uuid
diff --git a/server/lib/activitypub/video-comments.ts b/server/lib/activitypub/video-comments.ts
index 3aee6799e..dcae2a255 100644
--- a/server/lib/activitypub/video-comments.ts
+++ b/server/lib/activitypub/video-comments.ts
@@ -7,7 +7,7 @@ import { getOrCreateActorAndServerAndModel } from './actor'
7import { getOrCreateVideoAndAccountAndChannel } from './videos' 7import { getOrCreateVideoAndAccountAndChannel } from './videos'
8import * as Bluebird from 'bluebird' 8import * as Bluebird from 'bluebird'
9import { checkUrlsSameHost } from '../../helpers/activitypub' 9import { checkUrlsSameHost } from '../../helpers/activitypub'
10import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../typings/models/video' 10import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../types/models/video'
11 11
12type ResolveThreadParams = { 12type ResolveThreadParams = {
13 url: string 13 url: string
diff --git a/server/lib/activitypub/video-rates.ts b/server/lib/activitypub/video-rates.ts
index 202368c8f..e09e5d9ec 100644
--- a/server/lib/activitypub/video-rates.ts
+++ b/server/lib/activitypub/video-rates.ts
@@ -10,7 +10,7 @@ import { doRequest } from '../../helpers/requests'
10import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' 10import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub'
11import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from './url' 11import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from './url'
12import { sendDislike } from './send/send-dislike' 12import { sendDislike } from './send/send-dislike'
13import { MAccountActor, MActorUrl, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models' 13import { MAccountActor, MActorUrl, MVideo, MVideoAccountLight, MVideoId } from '../../types/models'
14 14
15async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateType) { 15async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateType) {
16 let rateCounts = 0 16 let rateCounts = 0
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 6d20e0e65..6c5f7f306 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -52,7 +52,7 @@ import { sequelizeTypescript } from '../../initializers/database'
52import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' 52import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail'
53import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' 53import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
54import { join } from 'path' 54import { join } from 'path'
55import { FilteredModelAttributes } from '../../typings/sequelize' 55import { FilteredModelAttributes } from '../../types/sequelize'
56import { autoBlacklistVideoIfNeeded } from '../video-blacklist' 56import { autoBlacklistVideoIfNeeded } from '../video-blacklist'
57import { ActorFollowScoreCache } from '../files-cache' 57import { ActorFollowScoreCache } from '../files-cache'
58import { 58import {
@@ -71,8 +71,8 @@ import {
71 MVideoId, 71 MVideoId,
72 MVideoImmutable, 72 MVideoImmutable,
73 MVideoThumbnail 73 MVideoThumbnail
74} from '../../typings/models' 74} from '../../types/models'
75import { MThumbnail } from '../../typings/models/video/thumbnail' 75import { MThumbnail } from '../../types/models/video/thumbnail'
76import { maxBy, minBy } from 'lodash' 76import { maxBy, minBy } from 'lodash'
77 77
78async function federateVideoIfNeeded (videoArg: MVideoAPWithoutCaption, isNewVideo: boolean, transaction?: sequelize.Transaction) { 78async function federateVideoIfNeeded (videoArg: MVideoAPWithoutCaption, isNewVideo: boolean, transaction?: sequelize.Transaction) {
diff --git a/server/lib/avatar.ts b/server/lib/avatar.ts
index 282d834a2..be6657b6f 100644
--- a/server/lib/avatar.ts
+++ b/server/lib/avatar.ts
@@ -11,7 +11,7 @@ import { sequelizeTypescript } from '../initializers/database'
11import * as LRUCache from 'lru-cache' 11import * as LRUCache from 'lru-cache'
12import { queue } from 'async' 12import { queue } from 'async'
13import { downloadImage } from '../helpers/requests' 13import { downloadImage } from '../helpers/requests'
14import { MAccountDefault, MChannelDefault } from '../typings/models' 14import { MAccountDefault, MChannelDefault } from '../types/models'
15 15
16async function updateActorAvatarFile ( 16async function updateActorAvatarFile (
17 avatarPhysicalFile: Express.Multer.File, 17 avatarPhysicalFile: Express.Multer.File,
diff --git a/server/lib/blocklist.ts b/server/lib/blocklist.ts
index d282d091b..d6b684015 100644
--- a/server/lib/blocklist.ts
+++ b/server/lib/blocklist.ts
@@ -1,6 +1,6 @@
1import { sequelizeTypescript } from '@server/initializers/database' 1import { sequelizeTypescript } from '@server/initializers/database'
2import { getServerActor } from '@server/models/application/application' 2import { getServerActor } from '@server/models/application/application'
3import { MAccountBlocklist, MAccountId, MAccountServer, MServerBlocklist } from '@server/typings/models' 3import { MAccountBlocklist, MAccountId, MAccountServer, MServerBlocklist } from '@server/types/models'
4import { AccountBlocklistModel } from '../models/account/account-blocklist' 4import { AccountBlocklistModel } from '../models/account/account-blocklist'
5import { ServerBlocklistModel } from '../models/server/server-blocklist' 5import { ServerBlocklistModel } from '../models/server/server-blocklist'
6 6
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 4a4b0d12f..3e6da2898 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -13,7 +13,7 @@ import { VideoChannelModel } from '../models/video/video-channel'
13import * as Bluebird from 'bluebird' 13import * as Bluebird from 'bluebird'
14import { CONFIG } from '../initializers/config' 14import { CONFIG } from '../initializers/config'
15import { logger } from '../helpers/logger' 15import { logger } from '../helpers/logger'
16import { MAccountActor, MChannelActor, MVideo } from '../typings/models' 16import { MAccountActor, MChannelActor, MVideo } from '../types/models'
17 17
18export class ClientHtml { 18export class ClientHtml {
19 19
diff --git a/server/lib/emailer.ts b/server/lib/emailer.ts
index 04aade83a..c08732b48 100644
--- a/server/lib/emailer.ts
+++ b/server/lib/emailer.ts
@@ -12,9 +12,9 @@ import {
12 MVideoAccountLight, 12 MVideoAccountLight,
13 MVideoBlacklistLightVideo, 13 MVideoBlacklistLightVideo,
14 MVideoBlacklistVideo 14 MVideoBlacklistVideo
15} from '../typings/models/video' 15} from '../types/models/video'
16import { MActorFollowActors, MActorFollowFull, MUser } from '../typings/models' 16import { MActorFollowActors, MActorFollowFull, MUser } from '../types/models'
17import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' 17import { MVideoImport, MVideoImportVideo } from '@server/types/models/video/video-import'
18import { EmailPayload } from '@shared/models' 18import { EmailPayload } from '@shared/models'
19import { join } from 'path' 19import { join } from 'path'
20import { VideoAbuse } from '../../shared/models/videos' 20import { VideoAbuse } from '../../shared/models/videos'
diff --git a/server/lib/hls.ts b/server/lib/hls.ts
index 443a60088..60bb3ab7e 100644
--- a/server/lib/hls.ts
+++ b/server/lib/hls.ts
@@ -11,7 +11,7 @@ import { flatten, uniq } from 'lodash'
11import { VideoFileModel } from '../models/video/video-file' 11import { VideoFileModel } from '../models/video/video-file'
12import { CONFIG } from '../initializers/config' 12import { CONFIG } from '../initializers/config'
13import { sequelizeTypescript } from '../initializers/database' 13import { sequelizeTypescript } from '../initializers/database'
14import { MVideoWithFile } from '@server/typings/models' 14import { MVideoWithFile } from '@server/types/models'
15import { getVideoFilename, getVideoFilePath } from './video-paths' 15import { getVideoFilename, getVideoFilePath } from './video-paths'
16 16
17async function updateStreamingPlaylistsInfohashesIfNeeded () { 17async function updateStreamingPlaylistsInfohashesIfNeeded () {
diff --git a/server/lib/job-queue/handlers/activitypub-follow.ts b/server/lib/job-queue/handlers/activitypub-follow.ts
index 7034c10d0..7a4f85f8b 100644
--- a/server/lib/job-queue/handlers/activitypub-follow.ts
+++ b/server/lib/job-queue/handlers/activitypub-follow.ts
@@ -10,7 +10,7 @@ import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
10import { ActorModel } from '../../../models/activitypub/actor' 10import { ActorModel } from '../../../models/activitypub/actor'
11import { Notifier } from '../../notifier' 11import { Notifier } from '../../notifier'
12import { sequelizeTypescript } from '../../../initializers/database' 12import { sequelizeTypescript } from '../../../initializers/database'
13import { MActor, MActorFollowActors, MActorFull } from '../../../typings/models' 13import { MActor, MActorFollowActors, MActorFull } from '../../../types/models'
14import { ActivitypubFollowPayload } from '@shared/models' 14import { ActivitypubFollowPayload } from '@shared/models'
15 15
16async function processActivityPubFollow (job: Bull.Job) { 16async function processActivityPubFollow (job: Bull.Job) {
diff --git a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
index 524aadc27..a7c1a556c 100644
--- a/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
+++ b/server/lib/job-queue/handlers/activitypub-http-fetcher.ts
@@ -12,7 +12,7 @@ import { AccountModel } from '../../../models/account/account'
12import { AccountVideoRateModel } from '../../../models/account/account-video-rate' 12import { AccountVideoRateModel } from '../../../models/account/account-video-rate'
13import { VideoShareModel } from '../../../models/video/video-share' 13import { VideoShareModel } from '../../../models/video/video-share'
14import { VideoCommentModel } from '../../../models/video/video-comment' 14import { VideoCommentModel } from '../../../models/video/video-comment'
15import { MAccountDefault, MVideoFullLight } from '../../../typings/models' 15import { MAccountDefault, MVideoFullLight } from '../../../types/models'
16import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models' 16import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models'
17 17
18async function processActivityPubHttpFetcher (job: Bull.Job) { 18async function processActivityPubHttpFetcher (job: Bull.Job) {
diff --git a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
index bcb49a731..c030d31ef 100644
--- a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
+++ b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts
@@ -1,7 +1,7 @@
1import { buildSignedActivity } from '../../../../helpers/activitypub' 1import { buildSignedActivity } from '../../../../helpers/activitypub'
2import { ActorModel } from '../../../../models/activitypub/actor' 2import { ActorModel } from '../../../../models/activitypub/actor'
3import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' 3import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants'
4import { MActor } from '../../../../typings/models' 4import { MActor } from '../../../../types/models'
5import { getServerActor } from '@server/models/application/application' 5import { getServerActor } from '@server/models/application/application'
6import { buildDigest } from '@server/helpers/peertube-crypto' 6import { buildDigest } from '@server/helpers/peertube-crypto'
7import { ContextType } from '@shared/models/activitypub/context' 7import { ContextType } from '@shared/models/activitypub/context'
diff --git a/server/lib/job-queue/handlers/video-file-import.ts b/server/lib/job-queue/handlers/video-file-import.ts
index ae11f1de3..f9bc3137c 100644
--- a/server/lib/job-queue/handlers/video-file-import.ts
+++ b/server/lib/job-queue/handlers/video-file-import.ts
@@ -6,7 +6,7 @@ import { getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg
6import { copy, stat } from 'fs-extra' 6import { copy, stat } from 'fs-extra'
7import { VideoFileModel } from '../../../models/video/video-file' 7import { VideoFileModel } from '../../../models/video/video-file'
8import { extname } from 'path' 8import { extname } from 'path'
9import { MVideoFile, MVideoWithFile } from '@server/typings/models' 9import { MVideoFile, MVideoWithFile } from '@server/types/models'
10import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' 10import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
11import { getVideoFilePath } from '@server/lib/video-paths' 11import { getVideoFilePath } from '@server/lib/video-paths'
12import { VideoFileImportPayload } from '@shared/models' 12import { VideoFileImportPayload } from '@shared/models'
diff --git a/server/lib/job-queue/handlers/video-import.ts b/server/lib/job-queue/handlers/video-import.ts
index a197ef629..9b5f2bb2b 100644
--- a/server/lib/job-queue/handlers/video-import.ts
+++ b/server/lib/job-queue/handlers/video-import.ts
@@ -5,7 +5,7 @@ import { addOptimizeOrMergeAudioJob } from '@server/helpers/video'
5import { isPostImportVideoAccepted } from '@server/lib/moderation' 5import { isPostImportVideoAccepted } from '@server/lib/moderation'
6import { Hooks } from '@server/lib/plugins/hooks' 6import { Hooks } from '@server/lib/plugins/hooks'
7import { getVideoFilePath } from '@server/lib/video-paths' 7import { getVideoFilePath } from '@server/lib/video-paths'
8import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/typings/models/video/video-import' 8import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/types/models/video/video-import'
9import { 9import {
10 VideoImportPayload, 10 VideoImportPayload,
11 VideoImportTorrentPayload, 11 VideoImportTorrentPayload,
@@ -27,7 +27,7 @@ import { sequelizeTypescript } from '../../../initializers/database'
27import { VideoModel } from '../../../models/video/video' 27import { VideoModel } from '../../../models/video/video'
28import { VideoFileModel } from '../../../models/video/video-file' 28import { VideoFileModel } from '../../../models/video/video-file'
29import { VideoImportModel } from '../../../models/video/video-import' 29import { VideoImportModel } from '../../../models/video/video-import'
30import { MThumbnail } from '../../../typings/models/video/thumbnail' 30import { MThumbnail } from '../../../types/models/video/thumbnail'
31import { federateVideoIfNeeded } from '../../activitypub/videos' 31import { federateVideoIfNeeded } from '../../activitypub/videos'
32import { Notifier } from '../../notifier' 32import { Notifier } from '../../notifier'
33import { generateVideoMiniature } from '../../thumbnail' 33import { generateVideoMiniature } from '../../thumbnail'
diff --git a/server/lib/job-queue/handlers/video-transcoding.ts b/server/lib/job-queue/handlers/video-transcoding.ts
index 46d52e1cf..ce1c419e7 100644
--- a/server/lib/job-queue/handlers/video-transcoding.ts
+++ b/server/lib/job-queue/handlers/video-transcoding.ts
@@ -15,7 +15,7 @@ import { computeResolutionsToTranscode } from '../../../helpers/ffmpeg-utils'
15import { generateHlsPlaylist, mergeAudioVideofile, optimizeOriginalVideofile, transcodeNewResolution } from '../../video-transcoding' 15import { generateHlsPlaylist, mergeAudioVideofile, optimizeOriginalVideofile, transcodeNewResolution } from '../../video-transcoding'
16import { Notifier } from '../../notifier' 16import { Notifier } from '../../notifier'
17import { CONFIG } from '../../../initializers/config' 17import { CONFIG } from '../../../initializers/config'
18import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/typings/models' 18import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/types/models'
19 19
20async function processVideoTranscoding (job: Bull.Job) { 20async function processVideoTranscoding (job: Bull.Job) {
21 const payload = job.data as VideoTranscodingPayload 21 const payload = job.data as VideoTranscodingPayload
diff --git a/server/lib/moderation.ts b/server/lib/moderation.ts
index 4afebb32a..60d1b4053 100644
--- a/server/lib/moderation.ts
+++ b/server/lib/moderation.ts
@@ -9,7 +9,7 @@ import { ActorModel } from '../models/activitypub/actor'
9import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' 9import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object'
10import { VideoFileModel } from '@server/models/video/video-file' 10import { VideoFileModel } from '@server/models/video/video-file'
11import { PathLike } from 'fs-extra' 11import { PathLike } from 'fs-extra'
12import { MUser } from '@server/typings/models' 12import { MUser } from '@server/types/models'
13 13
14export type AcceptResult = { 14export type AcceptResult = {
15 accepted: boolean 15 accepted: boolean
diff --git a/server/lib/notifier.ts b/server/lib/notifier.ts
index 89f91e031..943a087d2 100644
--- a/server/lib/notifier.ts
+++ b/server/lib/notifier.ts
@@ -7,8 +7,8 @@ import {
7 MUserNotifSettingAccount, 7 MUserNotifSettingAccount,
8 MUserWithNotificationSetting, 8 MUserWithNotificationSetting,
9 UserNotificationModelForApi 9 UserNotificationModelForApi
10} from '@server/typings/models/user' 10} from '@server/types/models/user'
11import { MVideoImportVideo } from '@server/typings/models/video/video-import' 11import { MVideoImportVideo } from '@server/types/models/video/video-import'
12import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users' 12import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users'
13import { VideoAbuse, VideoPrivacy, VideoState } from '../../shared/models/videos' 13import { VideoAbuse, VideoPrivacy, VideoState } from '../../shared/models/videos'
14import { logger } from '../helpers/logger' 14import { logger } from '../helpers/logger'
@@ -16,7 +16,7 @@ import { CONFIG } from '../initializers/config'
16import { AccountBlocklistModel } from '../models/account/account-blocklist' 16import { AccountBlocklistModel } from '../models/account/account-blocklist'
17import { UserModel } from '../models/account/user' 17import { UserModel } from '../models/account/user'
18import { UserNotificationModel } from '../models/account/user-notification' 18import { UserNotificationModel } from '../models/account/user-notification'
19import { MAccountServer, MActorFollowFull } from '../typings/models' 19import { MAccountServer, MActorFollowFull } from '../types/models'
20import { 20import {
21 MCommentOwnerVideo, 21 MCommentOwnerVideo,
22 MVideoAbuseVideo, 22 MVideoAbuseVideo,
@@ -24,7 +24,7 @@ import {
24 MVideoBlacklistLightVideo, 24 MVideoBlacklistLightVideo,
25 MVideoBlacklistVideo, 25 MVideoBlacklistVideo,
26 MVideoFullLight 26 MVideoFullLight
27} from '../typings/models/video' 27} from '../types/models/video'
28import { isBlockedByServerOrAccount } from './blocklist' 28import { isBlockedByServerOrAccount } from './blocklist'
29import { Emailer } from './emailer' 29import { Emailer } from './emailer'
30import { PeerTubeSocket } from './peertube-socket' 30import { PeerTubeSocket } from './peertube-socket'
diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts
index db546efb1..3273c6c2d 100644
--- a/server/lib/oauth-model.ts
+++ b/server/lib/oauth-model.ts
@@ -8,8 +8,8 @@ import { LRU_CACHE } from '../initializers/constants'
8import { Transaction } from 'sequelize' 8import { Transaction } from 'sequelize'
9import { CONFIG } from '../initializers/config' 9import { CONFIG } from '../initializers/config'
10import * as LRUCache from 'lru-cache' 10import * as LRUCache from 'lru-cache'
11import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' 11import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token'
12import { MUser } from '@server/typings/models/user/user' 12import { MUser } from '@server/types/models/user/user'
13import { UserAdminFlag } from '@shared/models/users/user-flag.model' 13import { UserAdminFlag } from '@shared/models/users/user-flag.model'
14import { createUserAccountAndChannelAndPlaylist } from './user' 14import { createUserAccountAndChannelAndPlaylist } from './user'
15import { UserRole } from '@shared/models/users/user-role' 15import { UserRole } from '@shared/models/users/user-role'
diff --git a/server/lib/peertube-socket.ts b/server/lib/peertube-socket.ts
index 26ced351f..2e4b15b38 100644
--- a/server/lib/peertube-socket.ts
+++ b/server/lib/peertube-socket.ts
@@ -2,7 +2,7 @@ import * as SocketIO from 'socket.io'
2import { authenticateSocket } from '../middlewares' 2import { authenticateSocket } from '../middlewares'
3import { logger } from '../helpers/logger' 3import { logger } from '../helpers/logger'
4import { Server } from 'http' 4import { Server } from 'http'
5import { UserNotificationModelForApi } from '@server/typings/models/user' 5import { UserNotificationModelForApi } from '@server/types/models/user'
6 6
7class PeerTubeSocket { 7class PeerTubeSocket {
8 8
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index 950acf7ad..7fda5d9a4 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -21,7 +21,7 @@ import { ClientHtml } from '../client-html'
21import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model' 21import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model'
22import { RegisterHelpersStore } from './register-helpers-store' 22import { RegisterHelpersStore } from './register-helpers-store'
23import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' 23import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model'
24import { MOAuthTokenUser, MUser } from '@server/typings/models' 24import { MOAuthTokenUser, MUser } from '@server/types/models'
25import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' 25import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model'
26 26
27export interface RegisteredPlugin { 27export interface RegisteredPlugin {
diff --git a/server/lib/redundancy.ts b/server/lib/redundancy.ts
index 361b401a5..da620b607 100644
--- a/server/lib/redundancy.ts
+++ b/server/lib/redundancy.ts
@@ -1,7 +1,7 @@
1import { VideoRedundancyModel } from '../models/redundancy/video-redundancy' 1import { VideoRedundancyModel } from '../models/redundancy/video-redundancy'
2import { sendUndoCacheFile } from './activitypub/send' 2import { sendUndoCacheFile } from './activitypub/send'
3import { Transaction } from 'sequelize' 3import { Transaction } from 'sequelize'
4import { MActorSignature, MVideoRedundancyVideo } from '@server/typings/models' 4import { MActorSignature, MVideoRedundancyVideo } from '@server/types/models'
5import { CONFIG } from '@server/initializers/config' 5import { CONFIG } from '@server/initializers/config'
6import { logger } from '@server/helpers/logger' 6import { logger } from '@server/helpers/logger'
7import { ActorFollowModel } from '@server/models/activitypub/actor-follow' 7import { ActorFollowModel } from '@server/models/activitypub/actor-follow'
diff --git a/server/lib/schedulers/update-videos-scheduler.ts b/server/lib/schedulers/update-videos-scheduler.ts
index d32c1c068..3e75babcb 100644
--- a/server/lib/schedulers/update-videos-scheduler.ts
+++ b/server/lib/schedulers/update-videos-scheduler.ts
@@ -6,7 +6,7 @@ import { federateVideoIfNeeded } from '../activitypub/videos'
6import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' 6import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants'
7import { Notifier } from '../notifier' 7import { Notifier } from '../notifier'
8import { sequelizeTypescript } from '../../initializers/database' 8import { sequelizeTypescript } from '../../initializers/database'
9import { MVideoFullLight } from '@server/typings/models' 9import { MVideoFullLight } from '@server/types/models'
10 10
11export class UpdateVideosScheduler extends AbstractScheduler { 11export class UpdateVideosScheduler extends AbstractScheduler {
12 12
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 8da9d52b5..54d9a9894 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -22,7 +22,7 @@ import {
22 MVideoRedundancyStreamingPlaylistVideo, 22 MVideoRedundancyStreamingPlaylistVideo,
23 MVideoRedundancyVideo, 23 MVideoRedundancyVideo,
24 MVideoWithAllFiles 24 MVideoWithAllFiles
25} from '@server/typings/models' 25} from '@server/types/models'
26import { getVideoFilename } from '../video-paths' 26import { getVideoFilename } from '../video-paths'
27import { VideoModel } from '@server/models/video/video' 27import { VideoModel } from '@server/models/video/video'
28import { getServerActor } from '@server/models/application/application' 28import { getServerActor } from '@server/models/application/application'
diff --git a/server/lib/thumbnail.ts b/server/lib/thumbnail.ts
index 8dbd41771..78d2f69e3 100644
--- a/server/lib/thumbnail.ts
+++ b/server/lib/thumbnail.ts
@@ -6,9 +6,9 @@ import { ThumbnailType } from '../../shared/models/videos/thumbnail.type'
6import { processImage } from '../helpers/image-utils' 6import { processImage } from '../helpers/image-utils'
7import { join } from 'path' 7import { join } from 'path'
8import { downloadImage } from '../helpers/requests' 8import { downloadImage } from '../helpers/requests'
9import { MVideoPlaylistThumbnail } from '../typings/models/video/video-playlist' 9import { MVideoPlaylistThumbnail } from '../types/models/video/video-playlist'
10import { MVideoFile, MVideoThumbnail } from '../typings/models' 10import { MVideoFile, MVideoThumbnail } from '../types/models'
11import { MThumbnail } from '../typings/models/video/thumbnail' 11import { MThumbnail } from '../types/models/video/thumbnail'
12import { getVideoFilePath } from './video-paths' 12import { getVideoFilePath } from './video-paths'
13 13
14type ImageSize = { height: number, width: number } 14type ImageSize = { height: number, width: number }
diff --git a/server/lib/user.ts b/server/lib/user.ts
index 8b447583e..43eef8ab1 100644
--- a/server/lib/user.ts
+++ b/server/lib/user.ts
@@ -12,8 +12,8 @@ import { sequelizeTypescript } from '../initializers/database'
12import { Transaction } from 'sequelize/types' 12import { Transaction } from 'sequelize/types'
13import { Redis } from './redis' 13import { Redis } from './redis'
14import { Emailer } from './emailer' 14import { Emailer } from './emailer'
15import { MAccountDefault, MActorDefault, MChannelActor } from '../typings/models' 15import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models'
16import { MUser, MUserDefault, MUserId } from '../typings/models/user' 16import { MUser, MUserDefault, MUserId } from '../types/models/user'
17import { getAccountActivityPubUrl } from './activitypub/url' 17import { getAccountActivityPubUrl } from './activitypub/url'
18 18
19type ChannelNames = { name: string, displayName: string } 19type ChannelNames = { name: string, displayName: string }
diff --git a/server/lib/video-blacklist.ts b/server/lib/video-blacklist.ts
index 1ee92d22c..bdbcffda6 100644
--- a/server/lib/video-blacklist.ts
+++ b/server/lib/video-blacklist.ts
@@ -7,7 +7,7 @@ import {
7 MVideoBlacklistVideo, 7 MVideoBlacklistVideo,
8 MVideoFullLight, 8 MVideoFullLight,
9 MVideoWithBlacklistLight 9 MVideoWithBlacklistLight
10} from '@server/typings/models' 10} from '@server/types/models'
11import { UserRight, VideoBlacklistCreate, VideoBlacklistType } from '../../shared/models' 11import { UserRight, VideoBlacklistCreate, VideoBlacklistType } from '../../shared/models'
12import { UserAdminFlag } from '../../shared/models/users/user-flag.model' 12import { UserAdminFlag } from '../../shared/models/users/user-flag.model'
13import { logger } from '../helpers/logger' 13import { logger } from '../helpers/logger'
diff --git a/server/lib/video-channel.ts b/server/lib/video-channel.ts
index 102c1088d..8928dda12 100644
--- a/server/lib/video-channel.ts
+++ b/server/lib/video-channel.ts
@@ -4,7 +4,7 @@ import { VideoChannelCreate } from '../../shared/models'
4import { VideoChannelModel } from '../models/video/video-channel' 4import { VideoChannelModel } from '../models/video/video-channel'
5import { buildActorInstance } from './activitypub/actor' 5import { buildActorInstance } from './activitypub/actor'
6import { VideoModel } from '../models/video/video' 6import { VideoModel } from '../models/video/video'
7import { MAccountId, MChannelDefault, MChannelId } from '../typings/models' 7import { MAccountId, MChannelDefault, MChannelId } from '../types/models'
8import { getVideoChannelActivityPubUrl } from './activitypub/url' 8import { getVideoChannelActivityPubUrl } from './activitypub/url'
9import { federateVideoIfNeeded } from './activitypub/videos' 9import { federateVideoIfNeeded } from './activitypub/videos'
10 10
diff --git a/server/lib/video-comment.ts b/server/lib/video-comment.ts
index 97aa639fb..c92a7c43a 100644
--- a/server/lib/video-comment.ts
+++ b/server/lib/video-comment.ts
@@ -5,7 +5,7 @@ import { sequelizeTypescript } from '@server/initializers/database'
5import { ResultList } from '../../shared/models' 5import { ResultList } from '../../shared/models'
6import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' 6import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model'
7import { VideoCommentModel } from '../models/video/video-comment' 7import { VideoCommentModel } from '../models/video/video-comment'
8import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../typings/models' 8import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../types/models'
9import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' 9import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send'
10import { getVideoCommentActivityPubUrl } from './activitypub/url' 10import { getVideoCommentActivityPubUrl } from './activitypub/url'
11import { Hooks } from './plugins/hooks' 11import { Hooks } from './plugins/hooks'
diff --git a/server/lib/video-paths.ts b/server/lib/video-paths.ts
index 05aaca8af..a35661f02 100644
--- a/server/lib/video-paths.ts
+++ b/server/lib/video-paths.ts
@@ -1,4 +1,4 @@
1import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/typings/models' 1import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models'
2import { join } from 'path' 2import { join } from 'path'
3import { CONFIG } from '@server/initializers/config' 3import { CONFIG } from '@server/initializers/config'
4import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' 4import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants'
diff --git a/server/lib/video-playlist.ts b/server/lib/video-playlist.ts
index 75fbd6896..6eeb70c8e 100644
--- a/server/lib/video-playlist.ts
+++ b/server/lib/video-playlist.ts
@@ -3,8 +3,8 @@ import { VideoPlaylistModel } from '../models/video/video-playlist'
3import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' 3import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model'
4import { getVideoPlaylistActivityPubUrl } from './activitypub/url' 4import { getVideoPlaylistActivityPubUrl } from './activitypub/url'
5import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' 5import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model'
6import { MAccount } from '../typings/models' 6import { MAccount } from '../types/models'
7import { MVideoPlaylistOwner } from '../typings/models/video/video-playlist' 7import { MVideoPlaylistOwner } from '../types/models/video/video-playlist'
8 8
9async function createWatchLaterPlaylist (account: MAccount, t: Sequelize.Transaction) { 9async function createWatchLaterPlaylist (account: MAccount, t: Sequelize.Transaction) {
10 const videoPlaylist: MVideoPlaylistOwner = new VideoPlaylistModel({ 10 const videoPlaylist: MVideoPlaylistOwner = new VideoPlaylistModel({
diff --git a/server/lib/video-transcoding.ts b/server/lib/video-transcoding.ts
index dcda82e0a..628f22f5e 100644
--- a/server/lib/video-transcoding.ts
+++ b/server/lib/video-transcoding.ts
@@ -17,7 +17,7 @@ import { updateMasterHLSPlaylist, updateSha256Segments } from './hls'
17import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' 17import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
18import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' 18import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type'
19import { CONFIG } from '../initializers/config' 19import { CONFIG } from '../initializers/config'
20import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/typings/models' 20import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models'
21import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' 21import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
22import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' 22import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths'
23 23