From 26d6bf6533023326fa017812cf31bbe20c752d36 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jun 2020 10:45:25 +0200 Subject: Split types and typings --- server/lib/activitypub/actor.ts | 2 +- server/lib/activitypub/audience.ts | 2 +- server/lib/activitypub/cache-file.ts | 2 +- server/lib/activitypub/follow.ts | 2 +- server/lib/activitypub/playlist.ts | 6 +++--- server/lib/activitypub/process/process-accept.ts | 4 ++-- server/lib/activitypub/process/process-announce.ts | 4 ++-- server/lib/activitypub/process/process-create.ts | 4 ++-- server/lib/activitypub/process/process-delete.ts | 4 ++-- server/lib/activitypub/process/process-dislike.ts | 4 ++-- server/lib/activitypub/process/process-flag.ts | 4 ++-- server/lib/activitypub/process/process-follow.ts | 4 ++-- server/lib/activitypub/process/process-like.ts | 4 ++-- server/lib/activitypub/process/process-reject.ts | 4 ++-- server/lib/activitypub/process/process-undo.ts | 4 ++-- server/lib/activitypub/process/process-update.ts | 4 ++-- server/lib/activitypub/process/process-view.ts | 4 ++-- server/lib/activitypub/process/process.ts | 4 ++-- server/lib/activitypub/send/send-accept.ts | 2 +- server/lib/activitypub/send/send-announce.ts | 4 ++-- server/lib/activitypub/send/send-create.ts | 2 +- server/lib/activitypub/send/send-delete.ts | 4 ++-- server/lib/activitypub/send/send-dislike.ts | 2 +- server/lib/activitypub/send/send-flag.ts | 4 ++-- server/lib/activitypub/send/send-follow.ts | 2 +- server/lib/activitypub/send/send-like.ts | 2 +- server/lib/activitypub/send/send-reject.ts | 2 +- server/lib/activitypub/send/send-undo.ts | 2 +- server/lib/activitypub/send/send-update.ts | 2 +- server/lib/activitypub/send/send-view.ts | 2 +- server/lib/activitypub/send/utils.ts | 2 +- server/lib/activitypub/share.ts | 2 +- server/lib/activitypub/url.ts | 8 ++++---- server/lib/activitypub/video-comments.ts | 2 +- server/lib/activitypub/video-rates.ts | 2 +- server/lib/activitypub/videos.ts | 6 +++--- server/lib/avatar.ts | 2 +- server/lib/blocklist.ts | 2 +- server/lib/client-html.ts | 2 +- server/lib/emailer.ts | 6 +++--- server/lib/hls.ts | 2 +- server/lib/job-queue/handlers/activitypub-follow.ts | 2 +- server/lib/job-queue/handlers/activitypub-http-fetcher.ts | 2 +- server/lib/job-queue/handlers/utils/activitypub-http-utils.ts | 2 +- server/lib/job-queue/handlers/video-file-import.ts | 2 +- server/lib/job-queue/handlers/video-import.ts | 4 ++-- server/lib/job-queue/handlers/video-transcoding.ts | 2 +- server/lib/moderation.ts | 2 +- server/lib/notifier.ts | 8 ++++---- server/lib/oauth-model.ts | 4 ++-- server/lib/peertube-socket.ts | 2 +- server/lib/plugins/plugin-manager.ts | 2 +- server/lib/redundancy.ts | 2 +- server/lib/schedulers/update-videos-scheduler.ts | 2 +- server/lib/schedulers/videos-redundancy-scheduler.ts | 2 +- server/lib/thumbnail.ts | 6 +++--- server/lib/user.ts | 4 ++-- server/lib/video-blacklist.ts | 2 +- server/lib/video-channel.ts | 2 +- server/lib/video-comment.ts | 2 +- server/lib/video-paths.ts | 2 +- server/lib/video-playlist.ts | 4 ++-- server/lib/video-transcoding.ts | 2 +- 63 files changed, 97 insertions(+), 97 deletions(-) (limited to 'server/lib') 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 { MActorFullActor, MActorId, MChannel -} from '../../typings/models' +} from '../../types/models' import { extname } from 'path' import { getServerActor } from '@server/models/application/application' 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' import { ActorModel } from '../../models/activitypub/actor' import { VideoModel } from '../../models/video/video' import { VideoShareModel } from '../../models/video/video-share' -import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../typings/models' +import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../types/models' function getRemoteVideoAudience (accountActor: MActorUrl, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience { 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' import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' import { Transaction } from 'sequelize' import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' -import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/typings/models' +import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/types/models' function cacheFileActivityObjectToDBAttributes (cacheFileObject: CacheFileObject, video: MVideoWithAllFiles, byActor: MActorId) { 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 @@ -import { MActorFollowActors } from '../../typings/models' +import { MActorFollowActors } from '../../types/models' import { CONFIG } from '../../initializers/config' import { SERVER_ACTOR_NAME } from '../../initializers/constants' import { 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 import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' import { sequelizeTypescript } from '../../initializers/database' import { createPlaylistMiniatureFromUrl } from '../thumbnail' -import { FilteredModelAttributes } from '../../typings/sequelize' -import { MAccountDefault, MAccountId, MVideoId } from '../../typings/models' -import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../typings/models/video/video-playlist' +import { FilteredModelAttributes } from '../../types/sequelize' +import { MAccountDefault, MAccountId, MVideoId } from '../../types/models' +import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../types/models/video/video-playlist' function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { 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 @@ import { ActivityAccept } from '../../../../shared/models/activitypub' import { ActorFollowModel } from '../../../models/activitypub/actor-follow' import { addFetchOutboxJob } from '../actor' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorDefault, MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorDefault, MActorSignature } from '../../../types/models' async function processAcceptActivity (options: APProcessorOptions) { 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' import { getOrCreateVideoAndAccountAndChannel } from '../videos' import { Notifier } from '../../notifier' import { logger } from '../../../helpers/logger' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' async function processAnnounceActivity (options: APProcessorOptions) { 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 import { retryTransactionWrapper } from '../../../helpers/database-utils' import { logger } from '../../../helpers/logger' import { sequelizeTypescript } from '../../../initializers/database' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' import { Notifier } from '../../notifier' import { createOrUpdateCacheFile } from '../cache-file' import { 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' import { markCommentAsDeleted } from '../../video-comment' import { forwardVideoRelatedActivity } from '../send/utils' import { VideoPlaylistModel } from '../../../models/video/video-playlist' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../types/models' async function processDeleteActivity (options: APProcessorOptions) { 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 import { getOrCreateVideoAndAccountAndChannel } from '../videos' import { forwardVideoRelatedActivity } from '../send/utils' import { getVideoDislikeActivityPubUrl } from '../url' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature } from '../../../types/models' async function processDislikeActivity (options: APProcessorOptions) { 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' import { getOrCreateVideoAndAccountAndChannel } from '../videos' import { Notifier } from '../../notifier' import { getAPId } from '../../../helpers/activitypub' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature, MVideoAbuseAccountVideo } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature, MVideoAbuseAccountVideo } from '../../../types/models' import { AccountModel } from '@server/models/account/account' async function processFlagActivity (options: APProcessorOptions) { 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' import { Notifier } from '../../notifier' import { getAPId } from '../../../helpers/activitypub' import { CONFIG } from '../../../initializers/config' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorFollowActors, MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorFollowActors, MActorSignature } from '../../../types/models' import { autoFollowBackIfNeeded } from '../follow' import { getServerActor } from '@server/models/application/application' 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' import { getOrCreateVideoAndAccountAndChannel } from '../videos' import { getVideoLikeActivityPubUrl } from '../url' import { getAPId } from '../../../helpers/activitypub' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature } from '../../../types/models' async function processLikeActivity (options: APProcessorOptions) { 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 @@ import { ActivityReject } from '../../../../shared/models/activitypub/activity' import { sequelizeTypescript } from '../../../initializers/database' import { ActorFollowModel } from '../../../models/activitypub/actor-follow' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActor } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActor } from '../../../types/models' async function processRejectActivity (options: APProcessorOptions) { 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' import { getOrCreateVideoAndAccountAndChannel } from '../videos' import { VideoShareModel } from '../../../models/video/video-share' import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature } from '../../../types/models' async function processUndoActivity (options: APProcessorOptions) { 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' import { forwardVideoRelatedActivity } from '../send/utils' import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' import { createOrUpdateVideoPlaylist } from '../playlist' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature, MAccountIdActor } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature, MAccountIdActor } from '../../../types/models' import { isRedundancyAccepted } from '@server/lib/redundancy' async function processUpdateActivity (options: APProcessorOptions) { 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' import { forwardVideoRelatedActivity } from '../send/utils' import { Redis } from '../../redis' import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorSignature } from '../../../types/models' async function processViewActivity (options: APProcessorOptions) { 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' import { processDislikeActivity } from './process-dislike' import { processFlagActivity } from './process-flag' import { processViewActivity } from './process-view' -import { APProcessorOptions } from '../../../typings/activitypub-processor.model' -import { MActorDefault, MActorSignature } from '../../../typings/models' +import { APProcessorOptions } from '../../../types/activitypub-processor.model' +import { MActorDefault, MActorSignature } from '../../../types/models' const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions) => Promise } = { 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 import { unicastTo } from './utils' import { buildFollowActivity } from './send-follow' import { logger } from '../../../helpers/logger' -import { MActor, MActorFollowActors } from '../../../typings/models' +import { MActor, MActorFollowActors } from '../../../types/models' function sendAccept (actorFollow: MActorFollowActors) { 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 import { broadcastToFollowers } from './utils' import { audiencify, getActorsInvolvedInVideo, getAudience, getAudienceFromFollowersOf } from '../audience' import { logger } from '../../../helpers/logger' -import { MActorLight, MVideo } from '../../../typings/models' -import { MVideoShare } from '../../../typings/models/video' +import { MActorLight, MVideo } from '../../../types/models' +import { MVideoShare } from '../../../types/models/video' async function buildAnnounceWithVideoAudience ( 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 { MVideoPlaylistFull, MVideoRedundancyFileVideo, MVideoRedundancyStreamingPlaylistVideo -} from '../../../typings/models' +} from '../../../types/models' import { getServerActor } from '@server/models/application/application' import { ContextType } from '@shared/models/activitypub/context' 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' import { ActorModel } from '../../../models/activitypub/actor' import { VideoCommentModel } from '../../../models/video/video-comment' import { VideoShareModel } from '../../../models/video/video-share' -import { MActorUrl } from '../../../typings/models' -import { MCommentOwnerVideo, MVideoAccountLight, MVideoPlaylistFullSummary } from '../../../typings/models/video' +import { MActorUrl } from '../../../types/models' +import { MCommentOwnerVideo, MVideoAccountLight, MVideoPlaylistFullSummary } from '../../../types/models/video' import { audiencify, getActorsInvolvedInVideo, getVideoCommentAudience } from '../audience' import { getDeleteActivityPubUrl } from '../url' import { 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' import { ActivityAudience, ActivityDislike } from '../../../../shared/models/activitypub' import { sendVideoRelatedActivity } from './utils' import { audiencify, getAudience } from '../audience' -import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models' +import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models' function sendDislike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { 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' import { ActivityAudience, ActivityFlag } from '../../../../shared/models/activitypub' import { audiencify, getAudience } from '../audience' import { Transaction } from 'sequelize' -import { MActor, MVideoFullLight } from '../../../typings/models' -import { MVideoAbuseVideo } from '../../../typings/models/video' +import { MActor, MVideoFullLight } from '../../../types/models' +import { MVideoAbuseVideo } from '../../../types/models/video' function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, video: MVideoFullLight, t: Transaction) { 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' import { unicastTo } from './utils' import { logger } from '../../../helpers/logger' import { Transaction } from 'sequelize' -import { MActor, MActorFollowActors } from '../../../typings/models' +import { MActor, MActorFollowActors } from '../../../types/models' function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { 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' import { sendVideoRelatedActivity } from './utils' import { audiencify, getAudience } from '../audience' import { logger } from '../../../helpers/logger' -import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models' +import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models' function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { 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 import { unicastTo } from './utils' import { buildFollowActivity } from './send-follow' import { logger } from '../../../helpers/logger' -import { MActor } from '../../../typings/models' +import { MActor } from '../../../types/models' function sendReject (follower: MActor, following: MActor) { 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 { MVideoAccountLight, MVideoRedundancyVideo, MVideoShare -} from '../../../typings/models' +} from '../../../types/models' function sendUndoFollow (actorFollow: MActorFollowActors, t: Transaction) { 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 { MVideoAPWithoutCaption, MVideoPlaylistFull, MVideoRedundancyVideo -} from '../../../typings/models' +} from '../../../types/models' import { getServerActor } from '@server/models/application/application' async 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' import { sendVideoRelatedActivity } from './utils' import { audiencify, getAudience } from '../audience' import { logger } from '../../../helpers/logger' -import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/typings/models' +import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/types/models' async function sendView (byActor: ActorModel, video: MVideoImmutable, t: Transaction) { 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' import { JobQueue } from '../../job-queue' import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience' import { afterCommitIfTransaction } from '../../../helpers/database-utils' -import { MActor, MActorId, MActorLight, MActorWithInboxes, MVideoAccountLight, MVideoId, MVideoImmutable } from '../../../typings/models' +import { MActor, MActorId, MActorLight, MActorWithInboxes, MVideoAccountLight, MVideoId, MVideoImmutable } from '../../../types/models' import { getServerActor } from '@server/models/application/application' import { ContextType } from '@shared/models/activitypub/context' 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' import { logger } from '../../helpers/logger' import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' -import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' +import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../types/models/video' import { getServerActor } from '@server/models/application/application' async 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 { MVideoId, MVideoUrl, MVideoUUID -} from '../../typings/models' -import { MVideoPlaylist, MVideoPlaylistUUID } from '../../typings/models/video/video-playlist' -import { MVideoFileVideoUUID } from '../../typings/models/video/video-file' -import { MStreamingPlaylist } from '../../typings/models/video/video-streaming-playlist' +} from '../../types/models' +import { MVideoPlaylist, MVideoPlaylistUUID } from '../../types/models/video/video-playlist' +import { MVideoFileVideoUUID } from '../../types/models/video/video-file' +import { MStreamingPlaylist } from '../../types/models/video/video-streaming-playlist' function getVideoActivityPubUrl (video: MVideoUUID) { 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' import { getOrCreateVideoAndAccountAndChannel } from './videos' import * as Bluebird from 'bluebird' import { checkUrlsSameHost } from '../../helpers/activitypub' -import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../typings/models/video' +import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../types/models/video' type ResolveThreadParams = { 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' import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from './url' import { sendDislike } from './send/send-dislike' -import { MAccountActor, MActorUrl, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models' +import { MAccountActor, MActorUrl, MVideo, MVideoAccountLight, MVideoId } from '../../types/models' async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateType) { 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' import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' import { join } from 'path' -import { FilteredModelAttributes } from '../../typings/sequelize' +import { FilteredModelAttributes } from '../../types/sequelize' import { autoBlacklistVideoIfNeeded } from '../video-blacklist' import { ActorFollowScoreCache } from '../files-cache' import { @@ -71,8 +71,8 @@ import { MVideoId, MVideoImmutable, MVideoThumbnail -} from '../../typings/models' -import { MThumbnail } from '../../typings/models/video/thumbnail' +} from '../../types/models' +import { MThumbnail } from '../../types/models/video/thumbnail' import { maxBy, minBy } from 'lodash' async 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' import * as LRUCache from 'lru-cache' import { queue } from 'async' import { downloadImage } from '../helpers/requests' -import { MAccountDefault, MChannelDefault } from '../typings/models' +import { MAccountDefault, MChannelDefault } from '../types/models' async function updateActorAvatarFile ( 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 @@ import { sequelizeTypescript } from '@server/initializers/database' import { getServerActor } from '@server/models/application/application' -import { MAccountBlocklist, MAccountId, MAccountServer, MServerBlocklist } from '@server/typings/models' +import { MAccountBlocklist, MAccountId, MAccountServer, MServerBlocklist } from '@server/types/models' import { AccountBlocklistModel } from '../models/account/account-blocklist' import { ServerBlocklistModel } from '../models/server/server-blocklist' 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' import * as Bluebird from 'bluebird' import { CONFIG } from '../initializers/config' import { logger } from '../helpers/logger' -import { MAccountActor, MChannelActor, MVideo } from '../typings/models' +import { MAccountActor, MChannelActor, MVideo } from '../types/models' export class ClientHtml { 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 { MVideoAccountLight, MVideoBlacklistLightVideo, MVideoBlacklistVideo -} from '../typings/models/video' -import { MActorFollowActors, MActorFollowFull, MUser } from '../typings/models' -import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' +} from '../types/models/video' +import { MActorFollowActors, MActorFollowFull, MUser } from '../types/models' +import { MVideoImport, MVideoImportVideo } from '@server/types/models/video/video-import' import { EmailPayload } from '@shared/models' import { join } from 'path' import { 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' import { VideoFileModel } from '../models/video/video-file' import { CONFIG } from '../initializers/config' import { sequelizeTypescript } from '../initializers/database' -import { MVideoWithFile } from '@server/typings/models' +import { MVideoWithFile } from '@server/types/models' import { getVideoFilename, getVideoFilePath } from './video-paths' async 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' import { ActorModel } from '../../../models/activitypub/actor' import { Notifier } from '../../notifier' import { sequelizeTypescript } from '../../../initializers/database' -import { MActor, MActorFollowActors, MActorFull } from '../../../typings/models' +import { MActor, MActorFollowActors, MActorFull } from '../../../types/models' import { ActivitypubFollowPayload } from '@shared/models' async 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' import { AccountVideoRateModel } from '../../../models/account/account-video-rate' import { VideoShareModel } from '../../../models/video/video-share' import { VideoCommentModel } from '../../../models/video/video-comment' -import { MAccountDefault, MVideoFullLight } from '../../../typings/models' +import { MAccountDefault, MVideoFullLight } from '../../../types/models' import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models' async 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 @@ import { buildSignedActivity } from '../../../../helpers/activitypub' import { ActorModel } from '../../../../models/activitypub/actor' import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' -import { MActor } from '../../../../typings/models' +import { MActor } from '../../../../types/models' import { getServerActor } from '@server/models/application/application' import { buildDigest } from '@server/helpers/peertube-crypto' import { 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 import { copy, stat } from 'fs-extra' import { VideoFileModel } from '../../../models/video/video-file' import { extname } from 'path' -import { MVideoFile, MVideoWithFile } from '@server/typings/models' +import { MVideoFile, MVideoWithFile } from '@server/types/models' import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' import { getVideoFilePath } from '@server/lib/video-paths' import { 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' import { isPostImportVideoAccepted } from '@server/lib/moderation' import { Hooks } from '@server/lib/plugins/hooks' import { getVideoFilePath } from '@server/lib/video-paths' -import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/typings/models/video/video-import' +import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/types/models/video/video-import' import { VideoImportPayload, VideoImportTorrentPayload, @@ -27,7 +27,7 @@ import { sequelizeTypescript } from '../../../initializers/database' import { VideoModel } from '../../../models/video/video' import { VideoFileModel } from '../../../models/video/video-file' import { VideoImportModel } from '../../../models/video/video-import' -import { MThumbnail } from '../../../typings/models/video/thumbnail' +import { MThumbnail } from '../../../types/models/video/thumbnail' import { federateVideoIfNeeded } from '../../activitypub/videos' import { Notifier } from '../../notifier' import { 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' import { generateHlsPlaylist, mergeAudioVideofile, optimizeOriginalVideofile, transcodeNewResolution } from '../../video-transcoding' import { Notifier } from '../../notifier' import { CONFIG } from '../../../initializers/config' -import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/typings/models' +import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/types/models' async function processVideoTranscoding (job: Bull.Job) { 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' import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' import { VideoFileModel } from '@server/models/video/video-file' import { PathLike } from 'fs-extra' -import { MUser } from '@server/typings/models' +import { MUser } from '@server/types/models' export type AcceptResult = { 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 { MUserNotifSettingAccount, MUserWithNotificationSetting, UserNotificationModelForApi -} from '@server/typings/models/user' -import { MVideoImportVideo } from '@server/typings/models/video/video-import' +} from '@server/types/models/user' +import { MVideoImportVideo } from '@server/types/models/video/video-import' import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users' import { VideoAbuse, VideoPrivacy, VideoState } from '../../shared/models/videos' import { logger } from '../helpers/logger' @@ -16,7 +16,7 @@ import { CONFIG } from '../initializers/config' import { AccountBlocklistModel } from '../models/account/account-blocklist' import { UserModel } from '../models/account/user' import { UserNotificationModel } from '../models/account/user-notification' -import { MAccountServer, MActorFollowFull } from '../typings/models' +import { MAccountServer, MActorFollowFull } from '../types/models' import { MCommentOwnerVideo, MVideoAbuseVideo, @@ -24,7 +24,7 @@ import { MVideoBlacklistLightVideo, MVideoBlacklistVideo, MVideoFullLight -} from '../typings/models/video' +} from '../types/models/video' import { isBlockedByServerOrAccount } from './blocklist' import { Emailer } from './emailer' import { 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' import { Transaction } from 'sequelize' import { CONFIG } from '../initializers/config' import * as LRUCache from 'lru-cache' -import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' -import { MUser } from '@server/typings/models/user/user' +import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' +import { MUser } from '@server/types/models/user/user' import { UserAdminFlag } from '@shared/models/users/user-flag.model' import { createUserAccountAndChannelAndPlaylist } from './user' import { 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' import { authenticateSocket } from '../middlewares' import { logger } from '../helpers/logger' import { Server } from 'http' -import { UserNotificationModelForApi } from '@server/typings/models/user' +import { UserNotificationModelForApi } from '@server/types/models/user' class PeerTubeSocket { 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' import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model' import { RegisterHelpersStore } from './register-helpers-store' import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' -import { MOAuthTokenUser, MUser } from '@server/typings/models' +import { MOAuthTokenUser, MUser } from '@server/types/models' import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' export 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 @@ import { VideoRedundancyModel } from '../models/redundancy/video-redundancy' import { sendUndoCacheFile } from './activitypub/send' import { Transaction } from 'sequelize' -import { MActorSignature, MVideoRedundancyVideo } from '@server/typings/models' +import { MActorSignature, MVideoRedundancyVideo } from '@server/types/models' import { CONFIG } from '@server/initializers/config' import { logger } from '@server/helpers/logger' import { 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' import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' import { Notifier } from '../notifier' import { sequelizeTypescript } from '../../initializers/database' -import { MVideoFullLight } from '@server/typings/models' +import { MVideoFullLight } from '@server/types/models' export class UpdateVideosScheduler extends AbstractScheduler { 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 { MVideoRedundancyStreamingPlaylistVideo, MVideoRedundancyVideo, MVideoWithAllFiles -} from '@server/typings/models' +} from '@server/types/models' import { getVideoFilename } from '../video-paths' import { VideoModel } from '@server/models/video/video' import { 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' import { processImage } from '../helpers/image-utils' import { join } from 'path' import { downloadImage } from '../helpers/requests' -import { MVideoPlaylistThumbnail } from '../typings/models/video/video-playlist' -import { MVideoFile, MVideoThumbnail } from '../typings/models' -import { MThumbnail } from '../typings/models/video/thumbnail' +import { MVideoPlaylistThumbnail } from '../types/models/video/video-playlist' +import { MVideoFile, MVideoThumbnail } from '../types/models' +import { MThumbnail } from '../types/models/video/thumbnail' import { getVideoFilePath } from './video-paths' type 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' import { Transaction } from 'sequelize/types' import { Redis } from './redis' import { Emailer } from './emailer' -import { MAccountDefault, MActorDefault, MChannelActor } from '../typings/models' -import { MUser, MUserDefault, MUserId } from '../typings/models/user' +import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models' +import { MUser, MUserDefault, MUserId } from '../types/models/user' import { getAccountActivityPubUrl } from './activitypub/url' type 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 { MVideoBlacklistVideo, MVideoFullLight, MVideoWithBlacklistLight -} from '@server/typings/models' +} from '@server/types/models' import { UserRight, VideoBlacklistCreate, VideoBlacklistType } from '../../shared/models' import { UserAdminFlag } from '../../shared/models/users/user-flag.model' import { 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' import { VideoChannelModel } from '../models/video/video-channel' import { buildActorInstance } from './activitypub/actor' import { VideoModel } from '../models/video/video' -import { MAccountId, MChannelDefault, MChannelId } from '../typings/models' +import { MAccountId, MChannelDefault, MChannelId } from '../types/models' import { getVideoChannelActivityPubUrl } from './activitypub/url' import { federateVideoIfNeeded } from './activitypub/videos' 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' import { ResultList } from '../../shared/models' import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' import { VideoCommentModel } from '../models/video/video-comment' -import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../typings/models' +import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../types/models' import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' import { getVideoCommentActivityPubUrl } from './activitypub/url' import { 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 @@ -import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/typings/models' +import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models' import { join } from 'path' import { CONFIG } from '@server/initializers/config' import { 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' import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' import { getVideoPlaylistActivityPubUrl } from './activitypub/url' import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' -import { MAccount } from '../typings/models' -import { MVideoPlaylistOwner } from '../typings/models/video/video-playlist' +import { MAccount } from '../types/models' +import { MVideoPlaylistOwner } from '../types/models/video/video-playlist' async function createWatchLaterPlaylist (account: MAccount, t: Sequelize.Transaction) { 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' import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' import { CONFIG } from '../initializers/config' -import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/typings/models' +import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models' import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' -- cgit v1.2.3