diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-18 10:45:25 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-18 10:46:27 +0200 |
commit | 26d6bf6533023326fa017812cf31bbe20c752d36 (patch) | |
tree | 9c4e3ecdc344420190f17d429bdf05d78fae7a8c /server | |
parent | d6d951ddc0c492f3261065b5dcb4df0534d252fc (diff) | |
download | PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.gz PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.tar.zst PeerTube-26d6bf6533023326fa017812cf31bbe20c752d36.zip |
Split types and typings
Diffstat (limited to 'server')
172 files changed, 204 insertions, 203 deletions
diff --git a/server/controllers/activitypub/client.ts b/server/controllers/activitypub/client.ts index e48641836..acce53713 100644 --- a/server/controllers/activitypub/client.ts +++ b/server/controllers/activitypub/client.ts | |||
@@ -35,7 +35,7 @@ import { buildDislikeActivity } from '../../lib/activitypub/send/send-dislike' | |||
35 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' | 35 | import { videoPlaylistElementAPGetValidator, videoPlaylistsGetValidator } from '../../middlewares/validators/videos/video-playlists' |
36 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 36 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
37 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | 37 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' |
38 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId, MChannelId } from '@server/typings/models' | 38 | import { MAccountId, MActorId, MVideoAPWithoutCaption, MVideoId, MChannelId } from '@server/types/models' |
39 | import { getServerActor } from '@server/models/application/application' | 39 | import { getServerActor } from '@server/models/application/application' |
40 | import { getRateUrl } from '@server/lib/activitypub/video-rates' | 40 | import { getRateUrl } from '@server/lib/activitypub/video-rates' |
41 | 41 | ||
diff --git a/server/controllers/activitypub/inbox.ts b/server/controllers/activitypub/inbox.ts index c5edf86b7..8b42478ee 100644 --- a/server/controllers/activitypub/inbox.ts +++ b/server/controllers/activitypub/inbox.ts | |||
@@ -6,7 +6,7 @@ import { processActivities } from '../../lib/activitypub/process/process' | |||
6 | import { asyncMiddleware, checkSignature, localAccountValidator, localVideoChannelValidator, signatureValidator } from '../../middlewares' | 6 | import { asyncMiddleware, checkSignature, localAccountValidator, localVideoChannelValidator, signatureValidator } from '../../middlewares' |
7 | import { activityPubValidator } from '../../middlewares/validators/activitypub/activity' | 7 | import { activityPubValidator } from '../../middlewares/validators/activitypub/activity' |
8 | import { queue } from 'async' | 8 | import { queue } from 'async' |
9 | import { MActorDefault, MActorSignature } from '../../typings/models' | 9 | import { MActorDefault, MActorSignature } from '../../types/models' |
10 | 10 | ||
11 | const inboxRouter = express.Router() | 11 | const inboxRouter = express.Router() |
12 | 12 | ||
diff --git a/server/controllers/activitypub/outbox.ts b/server/controllers/activitypub/outbox.ts index 916a110a8..22328da7f 100644 --- a/server/controllers/activitypub/outbox.ts +++ b/server/controllers/activitypub/outbox.ts | |||
@@ -8,7 +8,7 @@ import { buildAudience } from '../../lib/activitypub/audience' | |||
8 | import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares' | 8 | import { asyncMiddleware, localAccountValidator, localVideoChannelValidator } from '../../middlewares' |
9 | import { VideoModel } from '../../models/video/video' | 9 | import { VideoModel } from '../../models/video/video' |
10 | import { activityPubResponse } from './utils' | 10 | import { activityPubResponse } from './utils' |
11 | import { MActorLight } from '@server/typings/models' | 11 | import { MActorLight } from '@server/types/models' |
12 | import { apPaginationValidator } from '../../middlewares/validators/activitypub' | 12 | import { apPaginationValidator } from '../../middlewares/validators/activitypub' |
13 | 13 | ||
14 | const outboxRouter = express.Router() | 14 | const outboxRouter = express.Router() |
diff --git a/server/controllers/api/search.ts b/server/controllers/api/search.ts index a0da5e30c..2d98b5d34 100644 --- a/server/controllers/api/search.ts +++ b/server/controllers/api/search.ts | |||
@@ -28,7 +28,7 @@ import { | |||
28 | } from '../../middlewares' | 28 | } from '../../middlewares' |
29 | import { VideoModel } from '../../models/video/video' | 29 | import { VideoModel } from '../../models/video/video' |
30 | import { VideoChannelModel } from '../../models/video/video-channel' | 30 | import { VideoChannelModel } from '../../models/video/video-channel' |
31 | import { MChannelAccountDefault, MVideoAccountLightBlacklistAllFiles } from '../../typings/models' | 31 | import { MChannelAccountDefault, MVideoAccountLightBlacklistAllFiles } from '../../types/models' |
32 | 32 | ||
33 | const searchRouter = express.Router() | 33 | const searchRouter = express.Router() |
34 | 34 | ||
diff --git a/server/controllers/api/users/index.ts b/server/controllers/api/users/index.ts index 06a43d7a3..c8e9eaeaa 100644 --- a/server/controllers/api/users/index.ts +++ b/server/controllers/api/users/index.ts | |||
@@ -47,7 +47,7 @@ import { CONFIG } from '../../../initializers/config' | |||
47 | import { sequelizeTypescript } from '../../../initializers/database' | 47 | import { sequelizeTypescript } from '../../../initializers/database' |
48 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' | 48 | import { UserAdminFlag } from '../../../../shared/models/users/user-flag.model' |
49 | import { UserRegister } from '../../../../shared/models/users/user-register.model' | 49 | import { UserRegister } from '../../../../shared/models/users/user-register.model' |
50 | import { MUser, MUserAccountDefault } from '@server/typings/models' | 50 | import { MUser, MUserAccountDefault } from '@server/types/models' |
51 | import { Hooks } from '@server/lib/plugins/hooks' | 51 | import { Hooks } from '@server/lib/plugins/hooks' |
52 | import { tokensRouter } from '@server/controllers/api/users/token' | 52 | import { tokensRouter } from '@server/controllers/api/users/token' |
53 | 53 | ||
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index d779f1aab..4d8cfa340 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -35,7 +35,7 @@ import { VideoPlaylistModel } from '../../models/video/video-playlist' | |||
35 | import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists' | 35 | import { commonVideoPlaylistFiltersValidator } from '../../middlewares/validators/videos/video-playlists' |
36 | import { CONFIG } from '../../initializers/config' | 36 | import { CONFIG } from '../../initializers/config' |
37 | import { sequelizeTypescript } from '../../initializers/database' | 37 | import { sequelizeTypescript } from '../../initializers/database' |
38 | import { MChannelAccountDefault } from '@server/typings/models' | 38 | import { MChannelAccountDefault } from '@server/types/models' |
39 | import { getServerActor } from '@server/models/application/application' | 39 | import { getServerActor } from '@server/models/application/application' |
40 | 40 | ||
41 | const auditLogger = auditLoggerFactory('channels') | 41 | const auditLogger = auditLoggerFactory('channels') |
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts index 375d711fd..88a2314fb 100644 --- a/server/controllers/api/video-playlist.ts +++ b/server/controllers/api/video-playlist.ts | |||
@@ -40,7 +40,7 @@ import { JobQueue } from '../../lib/job-queue' | |||
40 | import { CONFIG } from '../../initializers/config' | 40 | import { CONFIG } from '../../initializers/config' |
41 | import { sequelizeTypescript } from '../../initializers/database' | 41 | import { sequelizeTypescript } from '../../initializers/database' |
42 | import { createPlaylistMiniatureFromExisting } from '../../lib/thumbnail' | 42 | import { createPlaylistMiniatureFromExisting } from '../../lib/thumbnail' |
43 | import { MVideoPlaylistFull, MVideoPlaylistThumbnail, MVideoThumbnail } from '@server/typings/models' | 43 | import { MVideoPlaylistFull, MVideoPlaylistThumbnail, MVideoThumbnail } from '@server/types/models' |
44 | import { getServerActor } from '@server/models/application/application' | 44 | import { getServerActor } from '@server/models/application/application' |
45 | 45 | ||
46 | const reqThumbnailFile = createReqFiles([ 'thumbnailfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { thumbnailfile: CONFIG.STORAGE.TMP_DIR }) | 46 | const reqThumbnailFile = createReqFiles([ 'thumbnailfile' ], MIMETYPES.IMAGE.MIMETYPE_EXT, { thumbnailfile: CONFIG.STORAGE.TMP_DIR }) |
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts index 2af7b3864..77843f149 100644 --- a/server/controllers/api/videos/abuse.ts +++ b/server/controllers/api/videos/abuse.ts | |||
@@ -22,9 +22,9 @@ import { VideoAbuseModel } from '../../../models/video/video-abuse' | |||
22 | import { auditLoggerFactory, VideoAbuseAuditView } from '../../../helpers/audit-logger' | 22 | import { auditLoggerFactory, VideoAbuseAuditView } from '../../../helpers/audit-logger' |
23 | import { Notifier } from '../../../lib/notifier' | 23 | import { Notifier } from '../../../lib/notifier' |
24 | import { sendVideoAbuse } from '../../../lib/activitypub/send/send-flag' | 24 | import { sendVideoAbuse } from '../../../lib/activitypub/send/send-flag' |
25 | import { MVideoAbuseAccountVideo } from '../../../typings/models/video' | 25 | import { MVideoAbuseAccountVideo } from '../../../types/models/video' |
26 | import { getServerActor } from '@server/models/application/application' | 26 | import { getServerActor } from '@server/models/application/application' |
27 | import { MAccountDefault } from '@server/typings/models' | 27 | import { MAccountDefault } from '@server/types/models' |
28 | 28 | ||
29 | const auditLogger = auditLoggerFactory('abuse') | 29 | const auditLogger = auditLoggerFactory('abuse') |
30 | const abuseVideoRouter = express.Router() | 30 | const abuseVideoRouter = express.Router() |
diff --git a/server/controllers/api/videos/captions.ts b/server/controllers/api/videos/captions.ts index 8c1d12ca8..c4e2ee72c 100644 --- a/server/controllers/api/videos/captions.ts +++ b/server/controllers/api/videos/captions.ts | |||
@@ -10,7 +10,7 @@ import { federateVideoIfNeeded } from '../../../lib/activitypub/videos' | |||
10 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' | 10 | import { moveAndProcessCaptionFile } from '../../../helpers/captions-utils' |
11 | import { CONFIG } from '../../../initializers/config' | 11 | import { CONFIG } from '../../../initializers/config' |
12 | import { sequelizeTypescript } from '../../../initializers/database' | 12 | import { sequelizeTypescript } from '../../../initializers/database' |
13 | import { MVideoCaptionVideo } from '@server/typings/models' | 13 | import { MVideoCaptionVideo } from '@server/types/models' |
14 | 14 | ||
15 | const reqVideoCaptionAdd = createReqFiles( | 15 | const reqVideoCaptionAdd = createReqFiles( |
16 | [ 'captionfile' ], | 16 | [ 'captionfile' ], |
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts index ec270148d..24a237304 100644 --- a/server/controllers/api/videos/import.ts +++ b/server/controllers/api/videos/import.ts | |||
@@ -34,8 +34,8 @@ import { | |||
34 | MVideoTag, | 34 | MVideoTag, |
35 | MVideoThumbnailAccountDefault, | 35 | MVideoThumbnailAccountDefault, |
36 | MVideoWithBlacklistLight | 36 | MVideoWithBlacklistLight |
37 | } from '@server/typings/models' | 37 | } from '@server/types/models' |
38 | import { MVideoImport, MVideoImportFormattable } from '@server/typings/models/video/video-import' | 38 | import { MVideoImport, MVideoImportFormattable } from '@server/types/models/video/video-import' |
39 | 39 | ||
40 | const auditLogger = auditLoggerFactory('video-imports') | 40 | const auditLogger = auditLoggerFactory('video-imports') |
41 | const videoImportsRouter = express.Router() | 41 | const videoImportsRouter = express.Router() |
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index 3ca5a9192..45c613c75 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -58,7 +58,7 @@ import { sequelizeTypescript } from '../../../initializers/database' | |||
58 | import { createVideoMiniatureFromExisting, generateVideoMiniature } from '../../../lib/thumbnail' | 58 | import { createVideoMiniatureFromExisting, generateVideoMiniature } from '../../../lib/thumbnail' |
59 | import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type' | 59 | import { ThumbnailType } from '../../../../shared/models/videos/thumbnail.type' |
60 | import { Hooks } from '../../../lib/plugins/hooks' | 60 | import { Hooks } from '../../../lib/plugins/hooks' |
61 | import { MVideoDetails, MVideoFullLight } from '@server/typings/models' | 61 | import { MVideoDetails, MVideoFullLight } from '@server/types/models' |
62 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 62 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
63 | import { getVideoFilePath } from '@server/lib/video-paths' | 63 | import { getVideoFilePath } from '@server/lib/video-paths' |
64 | import toInt from 'validator/lib/toInt' | 64 | import toInt from 'validator/lib/toInt' |
diff --git a/server/controllers/api/videos/ownership.ts b/server/controllers/api/videos/ownership.ts index 540a49010..d76fee51d 100644 --- a/server/controllers/api/videos/ownership.ts +++ b/server/controllers/api/videos/ownership.ts | |||
@@ -18,7 +18,7 @@ import { getFormattedObjects } from '../../../helpers/utils' | |||
18 | import { changeVideoChannelShare } from '../../../lib/activitypub/share' | 18 | import { changeVideoChannelShare } from '../../../lib/activitypub/share' |
19 | import { sendUpdateVideo } from '../../../lib/activitypub/send' | 19 | import { sendUpdateVideo } from '../../../lib/activitypub/send' |
20 | import { VideoModel } from '../../../models/video/video' | 20 | import { VideoModel } from '../../../models/video/video' |
21 | import { MVideoFullLight } from '@server/typings/models' | 21 | import { MVideoFullLight } from '@server/types/models' |
22 | 22 | ||
23 | const ownershipVideoRouter = express.Router() | 23 | const ownershipVideoRouter = express.Router() |
24 | 24 | ||
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 271b788f6..3f7bbdbae 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -22,7 +22,7 @@ import { root } from '../helpers/core-utils' | |||
22 | import { CONFIG, isEmailEnabled } from '../initializers/config' | 22 | import { CONFIG, isEmailEnabled } from '../initializers/config' |
23 | import { getPreview, getVideoCaption } from './lazy-static' | 23 | import { getPreview, getVideoCaption } from './lazy-static' |
24 | import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type' | 24 | import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type' |
25 | import { MVideoFile, MVideoFullLight } from '@server/typings/models' | 25 | import { MVideoFile, MVideoFullLight } from '@server/types/models' |
26 | import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths' | 26 | import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths' |
27 | import { getThemeOrDefault } from '../lib/plugins/theme-utils' | 27 | import { getThemeOrDefault } from '../lib/plugins/theme-utils' |
28 | import { getEnabledResolutions, getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config' | 28 | import { getEnabledResolutions, getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config' |
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index ce48fc543..d28453d79 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -6,7 +6,7 @@ import { ACTIVITY_PUB, REMOTE_SCHEME } from '../initializers/constants' | |||
6 | import { signJsonLDObject } from './peertube-crypto' | 6 | import { signJsonLDObject } from './peertube-crypto' |
7 | import { pageToStartAndCount } from './core-utils' | 7 | import { pageToStartAndCount } from './core-utils' |
8 | import { URL } from 'url' | 8 | import { URL } from 'url' |
9 | import { MActor, MVideoAccountLight } from '../typings/models' | 9 | import { MActor, MVideoAccountLight } from '../types/models' |
10 | import { ContextType } from '@shared/models/activitypub/context' | 10 | import { ContextType } from '@shared/models/activitypub/context' |
11 | 11 | ||
12 | function getContextData (type: ContextType) { | 12 | function getContextData (type: ContextType) { |
diff --git a/server/helpers/actor.ts b/server/helpers/actor.ts index 117548a60..015b4a39f 100644 --- a/server/helpers/actor.ts +++ b/server/helpers/actor.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ActorModel } from '../models/activitypub/actor' | 1 | import { ActorModel } from '../models/activitypub/actor' |
2 | import * as Bluebird from 'bluebird' | 2 | import * as Bluebird from 'bluebird' |
3 | import { MActorFull, MActorAccountChannelId } from '../typings/models' | 3 | import { MActorFull, MActorAccountChannelId } from '../types/models' |
4 | 4 | ||
5 | type ActorFetchByUrlType = 'all' | 'association-ids' | 5 | type ActorFetchByUrlType = 'all' | 'association-ids' |
6 | 6 | ||
diff --git a/server/helpers/captions-utils.ts b/server/helpers/captions-utils.ts index 73b6d166d..0dad23759 100644 --- a/server/helpers/captions-utils.ts +++ b/server/helpers/captions-utils.ts | |||
@@ -2,7 +2,7 @@ import { join } from 'path' | |||
2 | import { CONFIG } from '../initializers/config' | 2 | import { CONFIG } from '../initializers/config' |
3 | import * as srt2vtt from 'srt-to-vtt' | 3 | import * as srt2vtt from 'srt-to-vtt' |
4 | import { createReadStream, createWriteStream, move, remove } from 'fs-extra' | 4 | import { createReadStream, createWriteStream, move, remove } from 'fs-extra' |
5 | import { MVideoCaptionFormattable } from '@server/typings/models' | 5 | import { MVideoCaptionFormattable } from '@server/types/models' |
6 | 6 | ||
7 | async function moveAndProcessCaptionFile (physicalFile: { filename: string, path: string }, videoCaption: MVideoCaptionFormattable) { | 7 | async function moveAndProcessCaptionFile (physicalFile: { filename: string, path: string }, videoCaption: MVideoCaptionFormattable) { |
8 | const videoCaptionsDir = CONFIG.STORAGE.CAPTIONS_DIR | 8 | const videoCaptionsDir = CONFIG.STORAGE.CAPTIONS_DIR |
diff --git a/server/helpers/custom-validators/video-ownership.ts b/server/helpers/custom-validators/video-ownership.ts index 2d1849332..ed5f8cc2f 100644 --- a/server/helpers/custom-validators/video-ownership.ts +++ b/server/helpers/custom-validators/video-ownership.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { VideoChangeOwnershipModel } from '../../models/video/video-change-ownership' | 2 | import { VideoChangeOwnershipModel } from '../../models/video/video-change-ownership' |
3 | import { MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' | 3 | import { MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership' |
4 | import { MUserId } from '@server/typings/models' | 4 | import { MUserId } from '@server/types/models' |
5 | 5 | ||
6 | export async function doesChangeVideoOwnershipExist (idArg: number | string, res: Response) { | 6 | export async function doesChangeVideoOwnershipExist (idArg: number | string, res: Response) { |
7 | const id = parseInt(idArg + '', 10) | 7 | const id = parseInt(idArg + '', 10) |
diff --git a/server/helpers/middlewares/accounts.ts b/server/helpers/middlewares/accounts.ts index f5aa0bada..bddea7eaa 100644 --- a/server/helpers/middlewares/accounts.ts +++ b/server/helpers/middlewares/accounts.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { AccountModel } from '../../models/account/account' | 2 | import { AccountModel } from '../../models/account/account' |
3 | import * as Bluebird from 'bluebird' | 3 | import * as Bluebird from 'bluebird' |
4 | import { MAccountDefault } from '../../typings/models' | 4 | import { MAccountDefault } from '../../types/models' |
5 | 5 | ||
6 | function doesAccountIdExist (id: number, res: Response, sendNotFound = true) { | 6 | function doesAccountIdExist (id: number, res: Response, sendNotFound = true) { |
7 | const promise = AccountModel.load(id) | 7 | const promise = AccountModel.load(id) |
diff --git a/server/helpers/middlewares/video-captions.ts b/server/helpers/middlewares/video-captions.ts index 1b2513b60..f5ce29807 100644 --- a/server/helpers/middlewares/video-captions.ts +++ b/server/helpers/middlewares/video-captions.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Response } from 'express' | 1 | import { Response } from 'express' |
2 | import { VideoCaptionModel } from '../../models/video/video-caption' | 2 | import { VideoCaptionModel } from '../../models/video/video-caption' |
3 | import { MVideoId } from '@server/typings/models' | 3 | import { MVideoId } from '@server/types/models' |
4 | 4 | ||
5 | async function doesVideoCaptionExist (video: MVideoId, language: string, res: Response) { | 5 | async function doesVideoCaptionExist (video: MVideoId, language: string, res: Response) { |
6 | const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language) | 6 | const videoCaption = await VideoCaptionModel.loadByVideoIdAndLanguage(video.id, language) |
diff --git a/server/helpers/middlewares/video-channels.ts b/server/helpers/middlewares/video-channels.ts index 1595ecd94..6eecb8ee5 100644 --- a/server/helpers/middlewares/video-channels.ts +++ b/server/helpers/middlewares/video-channels.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { VideoChannelModel } from '../../models/video/video-channel' | 2 | import { VideoChannelModel } from '../../models/video/video-channel' |
3 | import { MChannelAccountDefault } from '@server/typings/models' | 3 | import { MChannelAccountDefault } from '@server/types/models' |
4 | 4 | ||
5 | async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { | 5 | async function doesLocalVideoChannelNameExist (name: string, res: express.Response) { |
6 | const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) | 6 | const videoChannel = await VideoChannelModel.loadLocalByNameAndPopulateAccount(name) |
diff --git a/server/helpers/middlewares/video-playlists.ts b/server/helpers/middlewares/video-playlists.ts index 8e7484483..344104f7c 100644 --- a/server/helpers/middlewares/video-playlists.ts +++ b/server/helpers/middlewares/video-playlists.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { VideoPlaylistModel } from '../../models/video/video-playlist' | 2 | import { VideoPlaylistModel } from '../../models/video/video-playlist' |
3 | import { MVideoPlaylist } from '../../typings/models/video/video-playlist' | 3 | import { MVideoPlaylist } from '../../types/models/video/video-playlist' |
4 | 4 | ||
5 | export type VideoPlaylistFetchType = 'summary' | 'all' | 5 | export type VideoPlaylistFetchType = 'summary' | 'all' |
6 | async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') { | 6 | async function doesVideoPlaylistExist (id: number | string, res: express.Response, fetchType: VideoPlaylistFetchType = 'summary') { |
diff --git a/server/helpers/middlewares/videos.ts b/server/helpers/middlewares/videos.ts index a0bbcdb21..77a48a467 100644 --- a/server/helpers/middlewares/videos.ts +++ b/server/helpers/middlewares/videos.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | MVideoImmutable, | 11 | MVideoImmutable, |
12 | MVideoThumbnail, | 12 | MVideoThumbnail, |
13 | MVideoWithRights | 13 | MVideoWithRights |
14 | } from '@server/typings/models' | 14 | } from '@server/types/models' |
15 | import { VideoFileModel } from '@server/models/video/video-file' | 15 | import { VideoFileModel } from '@server/models/video/video-file' |
16 | 16 | ||
17 | async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { | 17 | async function doesVideoExist (id: number | string, res: Response, fetchType: VideoFetchType = 'all') { |
diff --git a/server/helpers/peertube-crypto.ts b/server/helpers/peertube-crypto.ts index 394e97fd5..1655cd7b5 100644 --- a/server/helpers/peertube-crypto.ts +++ b/server/helpers/peertube-crypto.ts | |||
@@ -6,7 +6,7 @@ import { logger } from './logger' | |||
6 | import { cloneDeep } from 'lodash' | 6 | import { cloneDeep } from 'lodash' |
7 | import { createSign, createVerify } from 'crypto' | 7 | import { createSign, createVerify } from 'crypto' |
8 | import * as bcrypt from 'bcrypt' | 8 | import * as bcrypt from 'bcrypt' |
9 | import { MActor } from '../typings/models' | 9 | import { MActor } from '../types/models' |
10 | 10 | ||
11 | const bcryptComparePromise = promisify2<any, string, boolean>(bcrypt.compare) | 11 | const bcryptComparePromise = promisify2<any, string, boolean>(bcrypt.compare) |
12 | const bcryptGenSaltPromise = promisify1<number, string>(bcrypt.genSalt) | 12 | const bcryptGenSaltPromise = promisify1<number, string>(bcrypt.genSalt) |
diff --git a/server/helpers/video.ts b/server/helpers/video.ts index 4bcc6d0b9..89c85accb 100644 --- a/server/helpers/video.ts +++ b/server/helpers/video.ts | |||
@@ -11,7 +11,7 @@ import { | |||
11 | MVideoImmutable, | 11 | MVideoImmutable, |
12 | MVideoThumbnail, | 12 | MVideoThumbnail, |
13 | MVideoWithRights | 13 | MVideoWithRights |
14 | } from '@server/typings/models' | 14 | } from '@server/types/models' |
15 | import { Response } from 'express' | 15 | import { Response } from 'express' |
16 | import { DEFAULT_AUDIO_RESOLUTION } from '@server/initializers/constants' | 16 | import { DEFAULT_AUDIO_RESOLUTION } from '@server/initializers/constants' |
17 | import { JobQueue } from '@server/lib/job-queue' | 17 | import { JobQueue } from '@server/lib/job-queue' |
diff --git a/server/helpers/webfinger.ts b/server/helpers/webfinger.ts index 5443a266b..da7e88077 100644 --- a/server/helpers/webfinger.ts +++ b/server/helpers/webfinger.ts | |||
@@ -4,7 +4,7 @@ import { ActorModel } from '../models/activitypub/actor' | |||
4 | import { isTestInstance } from './core-utils' | 4 | import { isTestInstance } from './core-utils' |
5 | import { isActivityPubUrlValid } from './custom-validators/activitypub/misc' | 5 | import { isActivityPubUrlValid } from './custom-validators/activitypub/misc' |
6 | import { WEBSERVER } from '../initializers/constants' | 6 | import { WEBSERVER } from '../initializers/constants' |
7 | import { MActorFull } from '../typings/models' | 7 | import { MActorFull } from '../types/models' |
8 | 8 | ||
9 | const webfinger = new WebFinger({ | 9 | const webfinger = new WebFinger({ |
10 | webfist_fallback: false, | 10 | webfist_fallback: false, |
diff --git a/server/helpers/webtorrent.ts b/server/helpers/webtorrent.ts index 7cd76d708..089954e32 100644 --- a/server/helpers/webtorrent.ts +++ b/server/helpers/webtorrent.ts | |||
@@ -6,9 +6,9 @@ import { CONFIG } from '../initializers/config' | |||
6 | import { dirname, join } from 'path' | 6 | import { dirname, join } from 'path' |
7 | import * as createTorrent from 'create-torrent' | 7 | import * as createTorrent from 'create-torrent' |
8 | import { promisify2 } from './core-utils' | 8 | import { promisify2 } from './core-utils' |
9 | import { MVideo } from '@server/typings/models/video/video' | 9 | import { MVideo } from '@server/types/models/video/video' |
10 | import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/typings/models/video/video-file' | 10 | import { MVideoFile, MVideoFileRedundanciesOpt } from '@server/types/models/video/video-file' |
11 | import { isStreamingPlaylist, MStreamingPlaylistVideo } from '@server/typings/models/video/video-streaming-playlist' | 11 | import { isStreamingPlaylist, MStreamingPlaylistVideo } from '@server/types/models/video/video-streaming-playlist' |
12 | import { WEBSERVER } from '@server/initializers/constants' | 12 | import { WEBSERVER } from '@server/initializers/constants' |
13 | import * as parseTorrent from 'parse-torrent' | 13 | import * as parseTorrent from 'parse-torrent' |
14 | import * as magnetUtil from 'magnet-uri' | 14 | import * as magnetUtil from 'magnet-uri' |
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' |
37 | import { extname } from 'path' | 37 | import { extname } from 'path' |
38 | import { getServerActor } from '@server/models/application/application' | 38 | import { 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' | |||
4 | import { ActorModel } from '../../models/activitypub/actor' | 4 | import { ActorModel } from '../../models/activitypub/actor' |
5 | import { VideoModel } from '../../models/video/video' | 5 | import { VideoModel } from '../../models/video/video' |
6 | import { VideoShareModel } from '../../models/video/video-share' | 6 | import { VideoShareModel } from '../../models/video/video-share' |
7 | import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../typings/models' | 7 | import { MActorFollowersUrl, MActorLight, MActorUrl, MCommentOwner, MCommentOwnerVideo, MVideoId } from '../../types/models' |
8 | 8 | ||
9 | function getRemoteVideoAudience (accountActor: MActorUrl, actorsInvolvedInVideo: MActorFollowersUrl[]): ActivityAudience { | 9 | function 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' | |||
2 | import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' | 2 | import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' |
3 | import { Transaction } from 'sequelize' | 3 | import { Transaction } from 'sequelize' |
4 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' | 4 | import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' |
5 | import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/typings/models' | 5 | import { MActorId, MVideoRedundancy, MVideoWithAllFiles } from '@server/types/models' |
6 | 6 | ||
7 | function cacheFileActivityObjectToDBAttributes (cacheFileObject: CacheFileObject, video: MVideoWithAllFiles, byActor: MActorId) { | 7 | function 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 @@ | |||
1 | import { MActorFollowActors } from '../../typings/models' | 1 | import { MActorFollowActors } from '../../types/models' |
2 | import { CONFIG } from '../../initializers/config' | 2 | import { CONFIG } from '../../initializers/config' |
3 | import { SERVER_ACTOR_NAME } from '../../initializers/constants' | 3 | import { SERVER_ACTOR_NAME } from '../../initializers/constants' |
4 | import { JobQueue } from '../job-queue' | 4 | 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 | |||
15 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' | 15 | import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' |
16 | import { sequelizeTypescript } from '../../initializers/database' | 16 | import { sequelizeTypescript } from '../../initializers/database' |
17 | import { createPlaylistMiniatureFromUrl } from '../thumbnail' | 17 | import { createPlaylistMiniatureFromUrl } from '../thumbnail' |
18 | import { FilteredModelAttributes } from '../../typings/sequelize' | 18 | import { FilteredModelAttributes } from '../../types/sequelize' |
19 | import { MAccountDefault, MAccountId, MVideoId } from '../../typings/models' | 19 | import { MAccountDefault, MAccountId, MVideoId } from '../../types/models' |
20 | import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../typings/models/video/video-playlist' | 20 | import { MVideoPlaylist, MVideoPlaylistId, MVideoPlaylistOwner } from '../../types/models/video/video-playlist' |
21 | 21 | ||
22 | function playlistObjectToDBAttributes (playlistObject: PlaylistObject, byAccount: MAccountId, to: string[]) { | 22 | function 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 @@ | |||
1 | import { ActivityAccept } from '../../../../shared/models/activitypub' | 1 | import { ActivityAccept } from '../../../../shared/models/activitypub' |
2 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 2 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
3 | import { addFetchOutboxJob } from '../actor' | 3 | import { addFetchOutboxJob } from '../actor' |
4 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 4 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
5 | import { MActorDefault, MActorSignature } from '../../../typings/models' | 5 | import { MActorDefault, MActorSignature } from '../../../types/models' |
6 | 6 | ||
7 | async function processAcceptActivity (options: APProcessorOptions<ActivityAccept>) { | 7 | async 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' | |||
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
7 | import { Notifier } from '../../notifier' | 7 | import { Notifier } from '../../notifier' |
8 | import { logger } from '../../../helpers/logger' | 8 | import { logger } from '../../../helpers/logger' |
9 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' | 10 | import { MActorSignature, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' |
11 | 11 | ||
12 | async function processAnnounceActivity (options: APProcessorOptions<ActivityAnnounce>) { | 12 | async 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 | |||
5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' | 5 | import { retryTransactionWrapper } from '../../../helpers/database-utils' |
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
7 | import { sequelizeTypescript } from '../../../initializers/database' | 7 | import { sequelizeTypescript } from '../../../initializers/database' |
8 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 8 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
9 | import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../typings/models' | 9 | import { MActorSignature, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../../types/models' |
10 | import { Notifier } from '../../notifier' | 10 | import { Notifier } from '../../notifier' |
11 | import { createOrUpdateCacheFile } from '../cache-file' | 11 | import { createOrUpdateCacheFile } from '../cache-file' |
12 | import { createOrUpdateVideoPlaylist } from '../playlist' | 12 | 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' | |||
8 | import { markCommentAsDeleted } from '../../video-comment' | 8 | import { markCommentAsDeleted } from '../../video-comment' |
9 | import { forwardVideoRelatedActivity } from '../send/utils' | 9 | import { forwardVideoRelatedActivity } from '../send/utils' |
10 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' | 10 | import { VideoPlaylistModel } from '../../../models/video/video-playlist' |
11 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 11 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
12 | import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../typings/models' | 12 | import { MAccountActor, MActor, MActorSignature, MChannelActor, MChannelActorAccountActor } from '../../../types/models' |
13 | 13 | ||
14 | async function processDeleteActivity (options: APProcessorOptions<ActivityDelete>) { | 14 | async 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 | |||
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
7 | import { forwardVideoRelatedActivity } from '../send/utils' | 7 | import { forwardVideoRelatedActivity } from '../send/utils' |
8 | import { getVideoDislikeActivityPubUrl } from '../url' | 8 | import { getVideoDislikeActivityPubUrl } from '../url' |
9 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature } from '../../../typings/models' | 10 | import { MActorSignature } from '../../../types/models' |
11 | 11 | ||
12 | async function processDislikeActivity (options: APProcessorOptions<ActivityCreate | ActivityDislike>) { | 12 | async 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' | |||
7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 7 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
8 | import { Notifier } from '../../notifier' | 8 | import { Notifier } from '../../notifier' |
9 | import { getAPId } from '../../../helpers/activitypub' | 9 | import { getAPId } from '../../../helpers/activitypub' |
10 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 10 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
11 | import { MActorSignature, MVideoAbuseAccountVideo } from '../../../typings/models' | 11 | import { MActorSignature, MVideoAbuseAccountVideo } from '../../../types/models' |
12 | import { AccountModel } from '@server/models/account/account' | 12 | import { AccountModel } from '@server/models/account/account' |
13 | 13 | ||
14 | async function processFlagActivity (options: APProcessorOptions<ActivityCreate | ActivityFlag>) { | 14 | async 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' | |||
8 | import { Notifier } from '../../notifier' | 8 | import { Notifier } from '../../notifier' |
9 | import { getAPId } from '../../../helpers/activitypub' | 9 | import { getAPId } from '../../../helpers/activitypub' |
10 | import { CONFIG } from '../../../initializers/config' | 10 | import { CONFIG } from '../../../initializers/config' |
11 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 11 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
12 | import { MActorFollowActors, MActorSignature } from '../../../typings/models' | 12 | import { MActorFollowActors, MActorSignature } from '../../../types/models' |
13 | import { autoFollowBackIfNeeded } from '../follow' | 13 | import { autoFollowBackIfNeeded } from '../follow' |
14 | import { getServerActor } from '@server/models/application/application' | 14 | import { 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' | |||
6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 6 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
7 | import { getVideoLikeActivityPubUrl } from '../url' | 7 | import { getVideoLikeActivityPubUrl } from '../url' |
8 | import { getAPId } from '../../../helpers/activitypub' | 8 | import { getAPId } from '../../../helpers/activitypub' |
9 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 9 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
10 | import { MActorSignature } from '../../../typings/models' | 10 | import { MActorSignature } from '../../../types/models' |
11 | 11 | ||
12 | async function processLikeActivity (options: APProcessorOptions<ActivityLike>) { | 12 | async 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 @@ | |||
1 | import { ActivityReject } from '../../../../shared/models/activitypub/activity' | 1 | import { ActivityReject } from '../../../../shared/models/activitypub/activity' |
2 | import { sequelizeTypescript } from '../../../initializers/database' | 2 | import { sequelizeTypescript } from '../../../initializers/database' |
3 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 3 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
4 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 4 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
5 | import { MActor } from '../../../typings/models' | 5 | import { MActor } from '../../../types/models' |
6 | 6 | ||
7 | async function processRejectActivity (options: APProcessorOptions<ActivityReject>) { | 7 | async 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' | |||
10 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | 10 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' |
11 | import { VideoShareModel } from '../../../models/video/video-share' | 11 | import { VideoShareModel } from '../../../models/video/video-share' |
12 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' | 12 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' |
13 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 13 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
14 | import { MActorSignature } from '../../../typings/models' | 14 | import { MActorSignature } from '../../../types/models' |
15 | 15 | ||
16 | async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { | 16 | async 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' | |||
14 | import { forwardVideoRelatedActivity } from '../send/utils' | 14 | import { forwardVideoRelatedActivity } from '../send/utils' |
15 | import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' | 15 | import { PlaylistObject } from '../../../../shared/models/activitypub/objects/playlist-object' |
16 | import { createOrUpdateVideoPlaylist } from '../playlist' | 16 | import { createOrUpdateVideoPlaylist } from '../playlist' |
17 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 17 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
18 | import { MActorSignature, MAccountIdActor } from '../../../typings/models' | 18 | import { MActorSignature, MAccountIdActor } from '../../../types/models' |
19 | import { isRedundancyAccepted } from '@server/lib/redundancy' | 19 | import { isRedundancyAccepted } from '@server/lib/redundancy' |
20 | 20 | ||
21 | async function processUpdateActivity (options: APProcessorOptions<ActivityUpdate>) { | 21 | async 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' | |||
2 | import { forwardVideoRelatedActivity } from '../send/utils' | 2 | import { forwardVideoRelatedActivity } from '../send/utils' |
3 | import { Redis } from '../../redis' | 3 | import { Redis } from '../../redis' |
4 | import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub' | 4 | import { ActivityCreate, ActivityView, ViewObject } from '../../../../shared/models/activitypub' |
5 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 5 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
6 | import { MActorSignature } from '../../../typings/models' | 6 | import { MActorSignature } from '../../../types/models' |
7 | 7 | ||
8 | async function processViewActivity (options: APProcessorOptions<ActivityCreate | ActivityView>) { | 8 | async 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' | |||
14 | import { processDislikeActivity } from './process-dislike' | 14 | import { processDislikeActivity } from './process-dislike' |
15 | import { processFlagActivity } from './process-flag' | 15 | import { processFlagActivity } from './process-flag' |
16 | import { processViewActivity } from './process-view' | 16 | import { processViewActivity } from './process-view' |
17 | import { APProcessorOptions } from '../../../typings/activitypub-processor.model' | 17 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
18 | import { MActorDefault, MActorSignature } from '../../../typings/models' | 18 | import { MActorDefault, MActorSignature } from '../../../types/models' |
19 | 19 | ||
20 | const processActivity: { [ P in ActivityType ]: (options: APProcessorOptions<Activity>) => Promise<any> } = { | 20 | const 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 | |||
3 | import { unicastTo } from './utils' | 3 | import { unicastTo } from './utils' |
4 | import { buildFollowActivity } from './send-follow' | 4 | import { buildFollowActivity } from './send-follow' |
5 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
6 | import { MActor, MActorFollowActors } from '../../../typings/models' | 6 | import { MActor, MActorFollowActors } from '../../../types/models' |
7 | 7 | ||
8 | function sendAccept (actorFollow: MActorFollowActors) { | 8 | function 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 | |||
3 | import { broadcastToFollowers } from './utils' | 3 | import { broadcastToFollowers } from './utils' |
4 | import { audiencify, getActorsInvolvedInVideo, getAudience, getAudienceFromFollowersOf } from '../audience' | 4 | import { audiencify, getActorsInvolvedInVideo, getAudience, getAudienceFromFollowersOf } from '../audience' |
5 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
6 | import { MActorLight, MVideo } from '../../../typings/models' | 6 | import { MActorLight, MVideo } from '../../../types/models' |
7 | import { MVideoShare } from '../../../typings/models/video' | 7 | import { MVideoShare } from '../../../types/models/video' |
8 | 8 | ||
9 | async function buildAnnounceWithVideoAudience ( | 9 | async 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' |
18 | import { getServerActor } from '@server/models/application/application' | 18 | import { getServerActor } from '@server/models/application/application' |
19 | import { ContextType } from '@shared/models/activitypub/context' | 19 | import { 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' | |||
5 | import { ActorModel } from '../../../models/activitypub/actor' | 5 | import { ActorModel } from '../../../models/activitypub/actor' |
6 | import { VideoCommentModel } from '../../../models/video/video-comment' | 6 | import { VideoCommentModel } from '../../../models/video/video-comment' |
7 | import { VideoShareModel } from '../../../models/video/video-share' | 7 | import { VideoShareModel } from '../../../models/video/video-share' |
8 | import { MActorUrl } from '../../../typings/models' | 8 | import { MActorUrl } from '../../../types/models' |
9 | import { MCommentOwnerVideo, MVideoAccountLight, MVideoPlaylistFullSummary } from '../../../typings/models/video' | 9 | import { MCommentOwnerVideo, MVideoAccountLight, MVideoPlaylistFullSummary } from '../../../types/models/video' |
10 | import { audiencify, getActorsInvolvedInVideo, getVideoCommentAudience } from '../audience' | 10 | import { audiencify, getActorsInvolvedInVideo, getVideoCommentAudience } from '../audience' |
11 | import { getDeleteActivityPubUrl } from '../url' | 11 | import { getDeleteActivityPubUrl } from '../url' |
12 | import { broadcastToActors, broadcastToFollowers, sendVideoRelatedActivity, unicastTo } from './utils' | 12 | 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' | |||
4 | import { ActivityAudience, ActivityDislike } from '../../../../shared/models/activitypub' | 4 | import { ActivityAudience, ActivityDislike } from '../../../../shared/models/activitypub' |
5 | import { sendVideoRelatedActivity } from './utils' | 5 | import { sendVideoRelatedActivity } from './utils' |
6 | import { audiencify, getAudience } from '../audience' | 6 | import { audiencify, getAudience } from '../audience' |
7 | import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models' | 7 | import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models' |
8 | 8 | ||
9 | function sendDislike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { | 9 | function 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' | |||
4 | import { ActivityAudience, ActivityFlag } from '../../../../shared/models/activitypub' | 4 | import { ActivityAudience, ActivityFlag } from '../../../../shared/models/activitypub' |
5 | import { audiencify, getAudience } from '../audience' | 5 | import { audiencify, getAudience } from '../audience' |
6 | import { Transaction } from 'sequelize' | 6 | import { Transaction } from 'sequelize' |
7 | import { MActor, MVideoFullLight } from '../../../typings/models' | 7 | import { MActor, MVideoFullLight } from '../../../types/models' |
8 | import { MVideoAbuseVideo } from '../../../typings/models/video' | 8 | import { MVideoAbuseVideo } from '../../../types/models/video' |
9 | 9 | ||
10 | function sendVideoAbuse (byActor: MActor, videoAbuse: MVideoAbuseVideo, video: MVideoFullLight, t: Transaction) { | 10 | function 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' | |||
3 | import { unicastTo } from './utils' | 3 | import { unicastTo } from './utils' |
4 | import { logger } from '../../../helpers/logger' | 4 | import { logger } from '../../../helpers/logger' |
5 | import { Transaction } from 'sequelize' | 5 | import { Transaction } from 'sequelize' |
6 | import { MActor, MActorFollowActors } from '../../../typings/models' | 6 | import { MActor, MActorFollowActors } from '../../../types/models' |
7 | 7 | ||
8 | function sendFollow (actorFollow: MActorFollowActors, t: Transaction) { | 8 | function 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' | |||
4 | import { sendVideoRelatedActivity } from './utils' | 4 | import { sendVideoRelatedActivity } from './utils' |
5 | import { audiencify, getAudience } from '../audience' | 5 | import { audiencify, getAudience } from '../audience' |
6 | import { logger } from '../../../helpers/logger' | 6 | import { logger } from '../../../helpers/logger' |
7 | import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../typings/models' | 7 | import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models' |
8 | 8 | ||
9 | function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { | 9 | function 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 | |||
3 | import { unicastTo } from './utils' | 3 | import { unicastTo } from './utils' |
4 | import { buildFollowActivity } from './send-follow' | 4 | import { buildFollowActivity } from './send-follow' |
5 | import { logger } from '../../../helpers/logger' | 5 | import { logger } from '../../../helpers/logger' |
6 | import { MActor } from '../../../typings/models' | 6 | import { MActor } from '../../../types/models' |
7 | 7 | ||
8 | function sendReject (follower: MActor, following: MActor) { | 8 | function 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 | ||
31 | function sendUndoFollow (actorFollow: MActorFollowActors, t: Transaction) { | 31 | function 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' |
22 | import { getServerActor } from '@server/models/application/application' | 22 | import { getServerActor } from '@server/models/application/application' |
23 | 23 | ||
24 | async function sendUpdateVideo (videoArg: MVideoAPWithoutCaption, t: Transaction, overrodeByActor?: MActor) { | 24 | 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' | |||
5 | import { sendVideoRelatedActivity } from './utils' | 5 | import { sendVideoRelatedActivity } from './utils' |
6 | import { audiencify, getAudience } from '../audience' | 6 | import { audiencify, getAudience } from '../audience' |
7 | import { logger } from '../../../helpers/logger' | 7 | import { logger } from '../../../helpers/logger' |
8 | import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/typings/models' | 8 | import { MActorAudience, MVideoImmutable, MVideoUrl } from '@server/types/models' |
9 | 9 | ||
10 | async function sendView (byActor: ActorModel, video: MVideoImmutable, t: Transaction) { | 10 | async 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' | |||
6 | import { JobQueue } from '../../job-queue' | 6 | import { JobQueue } from '../../job-queue' |
7 | import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience' | 7 | import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience' |
8 | import { afterCommitIfTransaction } from '../../../helpers/database-utils' | 8 | import { afterCommitIfTransaction } from '../../../helpers/database-utils' |
9 | import { MActor, MActorId, MActorLight, MActorWithInboxes, MVideoAccountLight, MVideoId, MVideoImmutable } from '../../../typings/models' | 9 | import { MActor, MActorId, MActorLight, MActorWithInboxes, MVideoAccountLight, MVideoId, MVideoImmutable } from '../../../types/models' |
10 | import { getServerActor } from '@server/models/application/application' | 10 | import { getServerActor } from '@server/models/application/application' |
11 | import { ContextType } from '@shared/models/activitypub/context' | 11 | import { 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' | |||
8 | import { logger } from '../../helpers/logger' | 8 | import { logger } from '../../helpers/logger' |
9 | import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' | 9 | import { CRAWL_REQUEST_CONCURRENCY } from '../../initializers/constants' |
10 | import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' | 10 | import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' |
11 | import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models/video' | 11 | import { MChannelActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../types/models/video' |
12 | import { getServerActor } from '@server/models/application/application' | 12 | import { getServerActor } from '@server/models/application/application' |
13 | 13 | ||
14 | async function shareVideoByServerAndChannel (video: MVideoAccountLight, t: Transaction) { | 14 | 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 { | |||
9 | MVideoId, | 9 | MVideoId, |
10 | MVideoUrl, | 10 | MVideoUrl, |
11 | MVideoUUID | 11 | MVideoUUID |
12 | } from '../../typings/models' | 12 | } from '../../types/models' |
13 | import { MVideoPlaylist, MVideoPlaylistUUID } from '../../typings/models/video/video-playlist' | 13 | import { MVideoPlaylist, MVideoPlaylistUUID } from '../../types/models/video/video-playlist' |
14 | import { MVideoFileVideoUUID } from '../../typings/models/video/video-file' | 14 | import { MVideoFileVideoUUID } from '../../types/models/video/video-file' |
15 | import { MStreamingPlaylist } from '../../typings/models/video/video-streaming-playlist' | 15 | import { MStreamingPlaylist } from '../../types/models/video/video-streaming-playlist' |
16 | 16 | ||
17 | function getVideoActivityPubUrl (video: MVideoUUID) { | 17 | function 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' | |||
7 | import { getOrCreateVideoAndAccountAndChannel } from './videos' | 7 | import { getOrCreateVideoAndAccountAndChannel } from './videos' |
8 | import * as Bluebird from 'bluebird' | 8 | import * as Bluebird from 'bluebird' |
9 | import { checkUrlsSameHost } from '../../helpers/activitypub' | 9 | import { checkUrlsSameHost } from '../../helpers/activitypub' |
10 | import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../typings/models/video' | 10 | import { MCommentOwner, MCommentOwnerVideo, MVideoAccountLightBlacklistAllFiles } from '../../types/models/video' |
11 | 11 | ||
12 | type ResolveThreadParams = { | 12 | type 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' | |||
10 | import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' | 10 | import { checkUrlsSameHost, getAPId } from '../../helpers/activitypub' |
11 | import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from './url' | 11 | import { getVideoDislikeActivityPubUrl, getVideoLikeActivityPubUrl } from './url' |
12 | import { sendDislike } from './send/send-dislike' | 12 | import { sendDislike } from './send/send-dislike' |
13 | import { MAccountActor, MActorUrl, MVideo, MVideoAccountLight, MVideoId } from '../../typings/models' | 13 | import { MAccountActor, MActorUrl, MVideo, MVideoAccountLight, MVideoId } from '../../types/models' |
14 | 14 | ||
15 | async function createRates (ratesUrl: string[], video: MVideo, rate: VideoRateType) { | 15 | async 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' | |||
52 | import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' | 52 | import { createPlaceholderThumbnail, createVideoMiniatureFromUrl } from '../thumbnail' |
53 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' | 53 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' |
54 | import { join } from 'path' | 54 | import { join } from 'path' |
55 | import { FilteredModelAttributes } from '../../typings/sequelize' | 55 | import { FilteredModelAttributes } from '../../types/sequelize' |
56 | import { autoBlacklistVideoIfNeeded } from '../video-blacklist' | 56 | import { autoBlacklistVideoIfNeeded } from '../video-blacklist' |
57 | import { ActorFollowScoreCache } from '../files-cache' | 57 | import { ActorFollowScoreCache } from '../files-cache' |
58 | import { | 58 | import { |
@@ -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' |
75 | import { MThumbnail } from '../../typings/models/video/thumbnail' | 75 | import { MThumbnail } from '../../types/models/video/thumbnail' |
76 | import { maxBy, minBy } from 'lodash' | 76 | import { maxBy, minBy } from 'lodash' |
77 | 77 | ||
78 | async function federateVideoIfNeeded (videoArg: MVideoAPWithoutCaption, isNewVideo: boolean, transaction?: sequelize.Transaction) { | 78 | 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' | |||
11 | import * as LRUCache from 'lru-cache' | 11 | import * as LRUCache from 'lru-cache' |
12 | import { queue } from 'async' | 12 | import { queue } from 'async' |
13 | import { downloadImage } from '../helpers/requests' | 13 | import { downloadImage } from '../helpers/requests' |
14 | import { MAccountDefault, MChannelDefault } from '../typings/models' | 14 | import { MAccountDefault, MChannelDefault } from '../types/models' |
15 | 15 | ||
16 | async function updateActorAvatarFile ( | 16 | async 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 @@ | |||
1 | import { sequelizeTypescript } from '@server/initializers/database' | 1 | import { sequelizeTypescript } from '@server/initializers/database' |
2 | import { getServerActor } from '@server/models/application/application' | 2 | import { getServerActor } from '@server/models/application/application' |
3 | import { MAccountBlocklist, MAccountId, MAccountServer, MServerBlocklist } from '@server/typings/models' | 3 | import { MAccountBlocklist, MAccountId, MAccountServer, MServerBlocklist } from '@server/types/models' |
4 | import { AccountBlocklistModel } from '../models/account/account-blocklist' | 4 | import { AccountBlocklistModel } from '../models/account/account-blocklist' |
5 | import { ServerBlocklistModel } from '../models/server/server-blocklist' | 5 | import { 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' | |||
13 | import * as Bluebird from 'bluebird' | 13 | import * as Bluebird from 'bluebird' |
14 | import { CONFIG } from '../initializers/config' | 14 | import { CONFIG } from '../initializers/config' |
15 | import { logger } from '../helpers/logger' | 15 | import { logger } from '../helpers/logger' |
16 | import { MAccountActor, MChannelActor, MVideo } from '../typings/models' | 16 | import { MAccountActor, MChannelActor, MVideo } from '../types/models' |
17 | 17 | ||
18 | export class ClientHtml { | 18 | export 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' |
16 | import { MActorFollowActors, MActorFollowFull, MUser } from '../typings/models' | 16 | import { MActorFollowActors, MActorFollowFull, MUser } from '../types/models' |
17 | import { MVideoImport, MVideoImportVideo } from '@server/typings/models/video/video-import' | 17 | import { MVideoImport, MVideoImportVideo } from '@server/types/models/video/video-import' |
18 | import { EmailPayload } from '@shared/models' | 18 | import { EmailPayload } from '@shared/models' |
19 | import { join } from 'path' | 19 | import { join } from 'path' |
20 | import { VideoAbuse } from '../../shared/models/videos' | 20 | 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' | |||
11 | import { VideoFileModel } from '../models/video/video-file' | 11 | import { VideoFileModel } from '../models/video/video-file' |
12 | import { CONFIG } from '../initializers/config' | 12 | import { CONFIG } from '../initializers/config' |
13 | import { sequelizeTypescript } from '../initializers/database' | 13 | import { sequelizeTypescript } from '../initializers/database' |
14 | import { MVideoWithFile } from '@server/typings/models' | 14 | import { MVideoWithFile } from '@server/types/models' |
15 | import { getVideoFilename, getVideoFilePath } from './video-paths' | 15 | import { getVideoFilename, getVideoFilePath } from './video-paths' |
16 | 16 | ||
17 | async function updateStreamingPlaylistsInfohashesIfNeeded () { | 17 | 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' | |||
10 | import { ActorModel } from '../../../models/activitypub/actor' | 10 | import { ActorModel } from '../../../models/activitypub/actor' |
11 | import { Notifier } from '../../notifier' | 11 | import { Notifier } from '../../notifier' |
12 | import { sequelizeTypescript } from '../../../initializers/database' | 12 | import { sequelizeTypescript } from '../../../initializers/database' |
13 | import { MActor, MActorFollowActors, MActorFull } from '../../../typings/models' | 13 | import { MActor, MActorFollowActors, MActorFull } from '../../../types/models' |
14 | import { ActivitypubFollowPayload } from '@shared/models' | 14 | import { ActivitypubFollowPayload } from '@shared/models' |
15 | 15 | ||
16 | async function processActivityPubFollow (job: Bull.Job) { | 16 | 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' | |||
12 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 12 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
13 | import { VideoShareModel } from '../../../models/video/video-share' | 13 | import { VideoShareModel } from '../../../models/video/video-share' |
14 | import { VideoCommentModel } from '../../../models/video/video-comment' | 14 | import { VideoCommentModel } from '../../../models/video/video-comment' |
15 | import { MAccountDefault, MVideoFullLight } from '../../../typings/models' | 15 | import { MAccountDefault, MVideoFullLight } from '../../../types/models' |
16 | import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models' | 16 | import { ActivitypubHttpFetcherPayload, FetchType } from '@shared/models' |
17 | 17 | ||
18 | async function processActivityPubHttpFetcher (job: Bull.Job) { | 18 | 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 @@ | |||
1 | import { buildSignedActivity } from '../../../../helpers/activitypub' | 1 | import { buildSignedActivity } from '../../../../helpers/activitypub' |
2 | import { ActorModel } from '../../../../models/activitypub/actor' | 2 | import { ActorModel } from '../../../../models/activitypub/actor' |
3 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' | 3 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' |
4 | import { MActor } from '../../../../typings/models' | 4 | import { MActor } from '../../../../types/models' |
5 | import { getServerActor } from '@server/models/application/application' | 5 | import { getServerActor } from '@server/models/application/application' |
6 | import { buildDigest } from '@server/helpers/peertube-crypto' | 6 | import { buildDigest } from '@server/helpers/peertube-crypto' |
7 | import { ContextType } from '@shared/models/activitypub/context' | 7 | 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 | |||
6 | import { copy, stat } from 'fs-extra' | 6 | import { copy, stat } from 'fs-extra' |
7 | import { VideoFileModel } from '../../../models/video/video-file' | 7 | import { VideoFileModel } from '../../../models/video/video-file' |
8 | import { extname } from 'path' | 8 | import { extname } from 'path' |
9 | import { MVideoFile, MVideoWithFile } from '@server/typings/models' | 9 | import { MVideoFile, MVideoWithFile } from '@server/types/models' |
10 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 10 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
11 | import { getVideoFilePath } from '@server/lib/video-paths' | 11 | import { getVideoFilePath } from '@server/lib/video-paths' |
12 | import { VideoFileImportPayload } from '@shared/models' | 12 | 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' | |||
5 | import { isPostImportVideoAccepted } from '@server/lib/moderation' | 5 | import { isPostImportVideoAccepted } from '@server/lib/moderation' |
6 | import { Hooks } from '@server/lib/plugins/hooks' | 6 | import { Hooks } from '@server/lib/plugins/hooks' |
7 | import { getVideoFilePath } from '@server/lib/video-paths' | 7 | import { getVideoFilePath } from '@server/lib/video-paths' |
8 | import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/typings/models/video/video-import' | 8 | import { MVideoImportDefault, MVideoImportDefaultFiles, MVideoImportVideo } from '@server/types/models/video/video-import' |
9 | import { | 9 | import { |
10 | VideoImportPayload, | 10 | VideoImportPayload, |
11 | VideoImportTorrentPayload, | 11 | VideoImportTorrentPayload, |
@@ -27,7 +27,7 @@ import { sequelizeTypescript } from '../../../initializers/database' | |||
27 | import { VideoModel } from '../../../models/video/video' | 27 | import { VideoModel } from '../../../models/video/video' |
28 | import { VideoFileModel } from '../../../models/video/video-file' | 28 | import { VideoFileModel } from '../../../models/video/video-file' |
29 | import { VideoImportModel } from '../../../models/video/video-import' | 29 | import { VideoImportModel } from '../../../models/video/video-import' |
30 | import { MThumbnail } from '../../../typings/models/video/thumbnail' | 30 | import { MThumbnail } from '../../../types/models/video/thumbnail' |
31 | import { federateVideoIfNeeded } from '../../activitypub/videos' | 31 | import { federateVideoIfNeeded } from '../../activitypub/videos' |
32 | import { Notifier } from '../../notifier' | 32 | import { Notifier } from '../../notifier' |
33 | import { generateVideoMiniature } from '../../thumbnail' | 33 | 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' | |||
15 | import { generateHlsPlaylist, mergeAudioVideofile, optimizeOriginalVideofile, transcodeNewResolution } from '../../video-transcoding' | 15 | import { generateHlsPlaylist, mergeAudioVideofile, optimizeOriginalVideofile, transcodeNewResolution } from '../../video-transcoding' |
16 | import { Notifier } from '../../notifier' | 16 | import { Notifier } from '../../notifier' |
17 | import { CONFIG } from '../../../initializers/config' | 17 | import { CONFIG } from '../../../initializers/config' |
18 | import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/typings/models' | 18 | import { MVideoFullLight, MVideoUUID, MVideoWithFile } from '@server/types/models' |
19 | 19 | ||
20 | async function processVideoTranscoding (job: Bull.Job) { | 20 | async 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' | |||
9 | import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' | 9 | import { VideoCommentObject } from '../../shared/models/activitypub/objects/video-comment-object' |
10 | import { VideoFileModel } from '@server/models/video/video-file' | 10 | import { VideoFileModel } from '@server/models/video/video-file' |
11 | import { PathLike } from 'fs-extra' | 11 | import { PathLike } from 'fs-extra' |
12 | import { MUser } from '@server/typings/models' | 12 | import { MUser } from '@server/types/models' |
13 | 13 | ||
14 | export type AcceptResult = { | 14 | export 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' |
11 | import { MVideoImportVideo } from '@server/typings/models/video/video-import' | 11 | import { MVideoImportVideo } from '@server/types/models/video/video-import' |
12 | import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users' | 12 | import { UserNotificationSettingValue, UserNotificationType, UserRight } from '../../shared/models/users' |
13 | import { VideoAbuse, VideoPrivacy, VideoState } from '../../shared/models/videos' | 13 | import { VideoAbuse, VideoPrivacy, VideoState } from '../../shared/models/videos' |
14 | import { logger } from '../helpers/logger' | 14 | import { logger } from '../helpers/logger' |
@@ -16,7 +16,7 @@ import { CONFIG } from '../initializers/config' | |||
16 | import { AccountBlocklistModel } from '../models/account/account-blocklist' | 16 | import { AccountBlocklistModel } from '../models/account/account-blocklist' |
17 | import { UserModel } from '../models/account/user' | 17 | import { UserModel } from '../models/account/user' |
18 | import { UserNotificationModel } from '../models/account/user-notification' | 18 | import { UserNotificationModel } from '../models/account/user-notification' |
19 | import { MAccountServer, MActorFollowFull } from '../typings/models' | 19 | import { MAccountServer, MActorFollowFull } from '../types/models' |
20 | import { | 20 | import { |
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' |
28 | import { isBlockedByServerOrAccount } from './blocklist' | 28 | import { isBlockedByServerOrAccount } from './blocklist' |
29 | import { Emailer } from './emailer' | 29 | import { Emailer } from './emailer' |
30 | import { PeerTubeSocket } from './peertube-socket' | 30 | 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' | |||
8 | import { Transaction } from 'sequelize' | 8 | import { Transaction } from 'sequelize' |
9 | import { CONFIG } from '../initializers/config' | 9 | import { CONFIG } from '../initializers/config' |
10 | import * as LRUCache from 'lru-cache' | 10 | import * as LRUCache from 'lru-cache' |
11 | import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' | 11 | import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' |
12 | import { MUser } from '@server/typings/models/user/user' | 12 | import { MUser } from '@server/types/models/user/user' |
13 | import { UserAdminFlag } from '@shared/models/users/user-flag.model' | 13 | import { UserAdminFlag } from '@shared/models/users/user-flag.model' |
14 | import { createUserAccountAndChannelAndPlaylist } from './user' | 14 | import { createUserAccountAndChannelAndPlaylist } from './user' |
15 | import { UserRole } from '@shared/models/users/user-role' | 15 | 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' | |||
2 | import { authenticateSocket } from '../middlewares' | 2 | import { authenticateSocket } from '../middlewares' |
3 | import { logger } from '../helpers/logger' | 3 | import { logger } from '../helpers/logger' |
4 | import { Server } from 'http' | 4 | import { Server } from 'http' |
5 | import { UserNotificationModelForApi } from '@server/typings/models/user' | 5 | import { UserNotificationModelForApi } from '@server/types/models/user' |
6 | 6 | ||
7 | class PeerTubeSocket { | 7 | class 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' | |||
21 | import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model' | 21 | import { PluginTranslation } from '../../../shared/models/plugins/plugin-translation.model' |
22 | import { RegisterHelpersStore } from './register-helpers-store' | 22 | import { RegisterHelpersStore } from './register-helpers-store' |
23 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' | 23 | import { RegisterServerHookOptions } from '@shared/models/plugins/register-server-hook.model' |
24 | import { MOAuthTokenUser, MUser } from '@server/typings/models' | 24 | import { MOAuthTokenUser, MUser } from '@server/types/models' |
25 | import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' | 25 | import { RegisterServerAuthPassOptions, RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' |
26 | 26 | ||
27 | export interface RegisteredPlugin { | 27 | 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 @@ | |||
1 | import { VideoRedundancyModel } from '../models/redundancy/video-redundancy' | 1 | import { VideoRedundancyModel } from '../models/redundancy/video-redundancy' |
2 | import { sendUndoCacheFile } from './activitypub/send' | 2 | import { sendUndoCacheFile } from './activitypub/send' |
3 | import { Transaction } from 'sequelize' | 3 | import { Transaction } from 'sequelize' |
4 | import { MActorSignature, MVideoRedundancyVideo } from '@server/typings/models' | 4 | import { MActorSignature, MVideoRedundancyVideo } from '@server/types/models' |
5 | import { CONFIG } from '@server/initializers/config' | 5 | import { CONFIG } from '@server/initializers/config' |
6 | import { logger } from '@server/helpers/logger' | 6 | import { logger } from '@server/helpers/logger' |
7 | import { ActorFollowModel } from '@server/models/activitypub/actor-follow' | 7 | 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' | |||
6 | import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' | 6 | import { SCHEDULER_INTERVALS_MS } from '../../initializers/constants' |
7 | import { Notifier } from '../notifier' | 7 | import { Notifier } from '../notifier' |
8 | import { sequelizeTypescript } from '../../initializers/database' | 8 | import { sequelizeTypescript } from '../../initializers/database' |
9 | import { MVideoFullLight } from '@server/typings/models' | 9 | import { MVideoFullLight } from '@server/types/models' |
10 | 10 | ||
11 | export class UpdateVideosScheduler extends AbstractScheduler { | 11 | export 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' |
26 | import { getVideoFilename } from '../video-paths' | 26 | import { getVideoFilename } from '../video-paths' |
27 | import { VideoModel } from '@server/models/video/video' | 27 | import { VideoModel } from '@server/models/video/video' |
28 | import { getServerActor } from '@server/models/application/application' | 28 | 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' | |||
6 | import { processImage } from '../helpers/image-utils' | 6 | import { processImage } from '../helpers/image-utils' |
7 | import { join } from 'path' | 7 | import { join } from 'path' |
8 | import { downloadImage } from '../helpers/requests' | 8 | import { downloadImage } from '../helpers/requests' |
9 | import { MVideoPlaylistThumbnail } from '../typings/models/video/video-playlist' | 9 | import { MVideoPlaylistThumbnail } from '../types/models/video/video-playlist' |
10 | import { MVideoFile, MVideoThumbnail } from '../typings/models' | 10 | import { MVideoFile, MVideoThumbnail } from '../types/models' |
11 | import { MThumbnail } from '../typings/models/video/thumbnail' | 11 | import { MThumbnail } from '../types/models/video/thumbnail' |
12 | import { getVideoFilePath } from './video-paths' | 12 | import { getVideoFilePath } from './video-paths' |
13 | 13 | ||
14 | type ImageSize = { height: number, width: number } | 14 | 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' | |||
12 | import { Transaction } from 'sequelize/types' | 12 | import { Transaction } from 'sequelize/types' |
13 | import { Redis } from './redis' | 13 | import { Redis } from './redis' |
14 | import { Emailer } from './emailer' | 14 | import { Emailer } from './emailer' |
15 | import { MAccountDefault, MActorDefault, MChannelActor } from '../typings/models' | 15 | import { MAccountDefault, MActorDefault, MChannelActor } from '../types/models' |
16 | import { MUser, MUserDefault, MUserId } from '../typings/models/user' | 16 | import { MUser, MUserDefault, MUserId } from '../types/models/user' |
17 | import { getAccountActivityPubUrl } from './activitypub/url' | 17 | import { getAccountActivityPubUrl } from './activitypub/url' |
18 | 18 | ||
19 | type ChannelNames = { name: string, displayName: string } | 19 | 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 { | |||
7 | MVideoBlacklistVideo, | 7 | MVideoBlacklistVideo, |
8 | MVideoFullLight, | 8 | MVideoFullLight, |
9 | MVideoWithBlacklistLight | 9 | MVideoWithBlacklistLight |
10 | } from '@server/typings/models' | 10 | } from '@server/types/models' |
11 | import { UserRight, VideoBlacklistCreate, VideoBlacklistType } from '../../shared/models' | 11 | import { UserRight, VideoBlacklistCreate, VideoBlacklistType } from '../../shared/models' |
12 | import { UserAdminFlag } from '../../shared/models/users/user-flag.model' | 12 | import { UserAdminFlag } from '../../shared/models/users/user-flag.model' |
13 | import { logger } from '../helpers/logger' | 13 | 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' | |||
4 | import { VideoChannelModel } from '../models/video/video-channel' | 4 | import { VideoChannelModel } from '../models/video/video-channel' |
5 | import { buildActorInstance } from './activitypub/actor' | 5 | import { buildActorInstance } from './activitypub/actor' |
6 | import { VideoModel } from '../models/video/video' | 6 | import { VideoModel } from '../models/video/video' |
7 | import { MAccountId, MChannelDefault, MChannelId } from '../typings/models' | 7 | import { MAccountId, MChannelDefault, MChannelId } from '../types/models' |
8 | import { getVideoChannelActivityPubUrl } from './activitypub/url' | 8 | import { getVideoChannelActivityPubUrl } from './activitypub/url' |
9 | import { federateVideoIfNeeded } from './activitypub/videos' | 9 | import { 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' | |||
5 | import { ResultList } from '../../shared/models' | 5 | import { ResultList } from '../../shared/models' |
6 | import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' | 6 | import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' |
7 | import { VideoCommentModel } from '../models/video/video-comment' | 7 | import { VideoCommentModel } from '../models/video/video-comment' |
8 | import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../typings/models' | 8 | import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../types/models' |
9 | import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' | 9 | import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' |
10 | import { getVideoCommentActivityPubUrl } from './activitypub/url' | 10 | import { getVideoCommentActivityPubUrl } from './activitypub/url' |
11 | import { Hooks } from './plugins/hooks' | 11 | 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 @@ | |||
1 | import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/typings/models' | 1 | import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoFile, MVideoUUID } from '@server/types/models' |
2 | import { join } from 'path' | 2 | import { join } from 'path' |
3 | import { CONFIG } from '@server/initializers/config' | 3 | import { CONFIG } from '@server/initializers/config' |
4 | import { HLS_REDUNDANCY_DIRECTORY, HLS_STREAMING_PLAYLIST_DIRECTORY } from '@server/initializers/constants' | 4 | 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' | |||
3 | import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' | 3 | import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' |
4 | import { getVideoPlaylistActivityPubUrl } from './activitypub/url' | 4 | import { getVideoPlaylistActivityPubUrl } from './activitypub/url' |
5 | import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' | 5 | import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' |
6 | import { MAccount } from '../typings/models' | 6 | import { MAccount } from '../types/models' |
7 | import { MVideoPlaylistOwner } from '../typings/models/video/video-playlist' | 7 | import { MVideoPlaylistOwner } from '../types/models/video/video-playlist' |
8 | 8 | ||
9 | async function createWatchLaterPlaylist (account: MAccount, t: Sequelize.Transaction) { | 9 | async 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' | |||
17 | import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' | 17 | import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' |
18 | import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' | 18 | import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type' |
19 | import { CONFIG } from '../initializers/config' | 19 | import { CONFIG } from '../initializers/config' |
20 | import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/typings/models' | 20 | import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models' |
21 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' | 21 | import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent' |
22 | import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' | 22 | import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths' |
23 | 23 | ||
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts index 7808135f7..2c1ddf2df 100644 --- a/server/middlewares/validators/follows.ts +++ b/server/middlewares/validators/follows.ts | |||
@@ -9,7 +9,7 @@ import { areValidationErrors } from './utils' | |||
9 | import { ActorModel } from '../../models/activitypub/actor' | 9 | import { ActorModel } from '../../models/activitypub/actor' |
10 | import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' | 10 | import { loadActorUrlOrGetFromWebfinger } from '../../helpers/webfinger' |
11 | import { isActorTypeValid, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' | 11 | import { isActorTypeValid, isValidActorHandle } from '../../helpers/custom-validators/activitypub/actor' |
12 | import { MActorFollowActorsDefault } from '@server/typings/models' | 12 | import { MActorFollowActorsDefault } from '@server/types/models' |
13 | import { isFollowStateValid } from '@server/helpers/custom-validators/follows' | 13 | import { isFollowStateValid } from '@server/helpers/custom-validators/follows' |
14 | import { getServerActor } from '@server/models/application/application' | 14 | import { getServerActor } from '@server/models/application/application' |
15 | 15 | ||
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 3bdbcdf6a..4a9ed6830 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -35,7 +35,7 @@ import { isThemeNameValid } from '../../helpers/custom-validators/plugins' | |||
35 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' | 35 | import { isThemeRegistered } from '../../lib/plugins/theme-utils' |
36 | import { doesVideoExist } from '../../helpers/middlewares' | 36 | import { doesVideoExist } from '../../helpers/middlewares' |
37 | import { UserRole } from '../../../shared/models/users' | 37 | import { UserRole } from '../../../shared/models/users' |
38 | import { MUserDefault } from '@server/typings/models' | 38 | import { MUserDefault } from '@server/types/models' |
39 | import { Hooks } from '@server/lib/plugins/hooks' | 39 | import { Hooks } from '@server/lib/plugins/hooks' |
40 | 40 | ||
41 | const usersAddValidator = [ | 41 | const usersAddValidator = [ |
diff --git a/server/middlewares/validators/videos/video-channels.ts b/server/middlewares/validators/videos/video-channels.ts index 6604ae6a8..2e4e755e7 100644 --- a/server/middlewares/validators/videos/video-channels.ts +++ b/server/middlewares/validators/videos/video-channels.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { body, param, query } from 'express-validator' | 2 | import { body, param, query } from 'express-validator' |
3 | import { VIDEO_CHANNELS } from '@server/initializers/constants' | 3 | import { VIDEO_CHANNELS } from '@server/initializers/constants' |
4 | import { MChannelAccountDefault, MUser } from '@server/typings/models' | 4 | import { MChannelAccountDefault, MUser } from '@server/types/models' |
5 | import { UserRight } from '../../../../shared' | 5 | import { UserRight } from '../../../../shared' |
6 | import { isActorPreferredUsernameValid } from '../../../helpers/custom-validators/activitypub/actor' | 6 | import { isActorPreferredUsernameValid } from '../../../helpers/custom-validators/activitypub/actor' |
7 | import { isBooleanValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc' | 7 | import { isBooleanValid, toBooleanOrNull } from '../../../helpers/custom-validators/misc' |
diff --git a/server/middlewares/validators/videos/video-comments.ts b/server/middlewares/validators/videos/video-comments.ts index 4846a5e9e..ef019fcf9 100644 --- a/server/middlewares/validators/videos/video-comments.ts +++ b/server/middlewares/validators/videos/video-comments.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { body, param } from 'express-validator' | 2 | import { body, param } from 'express-validator' |
3 | import { MUserAccountUrl } from '@server/typings/models' | 3 | import { MUserAccountUrl } from '@server/types/models' |
4 | import { UserRight } from '../../../../shared' | 4 | import { UserRight } from '../../../../shared' |
5 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' | 5 | import { isIdOrUUIDValid, isIdValid } from '../../../helpers/custom-validators/misc' |
6 | import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' | 6 | import { isValidVideoCommentText } from '../../../helpers/custom-validators/video-comments' |
@@ -9,7 +9,7 @@ import { doesVideoExist } from '../../../helpers/middlewares' | |||
9 | import { AcceptResult, isLocalVideoCommentReplyAccepted, isLocalVideoThreadAccepted } from '../../../lib/moderation' | 9 | import { AcceptResult, isLocalVideoCommentReplyAccepted, isLocalVideoThreadAccepted } from '../../../lib/moderation' |
10 | import { Hooks } from '../../../lib/plugins/hooks' | 10 | import { Hooks } from '../../../lib/plugins/hooks' |
11 | import { VideoCommentModel } from '../../../models/video/video-comment' | 11 | import { VideoCommentModel } from '../../../models/video/video-comment' |
12 | import { MCommentOwnerVideoReply, MVideo, MVideoFullLight, MVideoId } from '../../../typings/models/video' | 12 | import { MCommentOwnerVideoReply, MVideo, MVideoFullLight, MVideoId } from '../../../types/models/video' |
13 | import { areValidationErrors } from '../utils' | 13 | import { areValidationErrors } from '../utils' |
14 | 14 | ||
15 | const listVideoCommentThreadsValidator = [ | 15 | const listVideoCommentThreadsValidator = [ |
diff --git a/server/middlewares/validators/videos/video-playlists.ts b/server/middlewares/validators/videos/video-playlists.ts index 6b15c5464..07fd8533c 100644 --- a/server/middlewares/validators/videos/video-playlists.ts +++ b/server/middlewares/validators/videos/video-playlists.ts | |||
@@ -27,8 +27,8 @@ import { authenticatePromiseIfNeeded } from '../../oauth' | |||
27 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' | 27 | import { VideoPlaylistPrivacy } from '../../../../shared/models/videos/playlist/video-playlist-privacy.model' |
28 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' | 28 | import { VideoPlaylistType } from '../../../../shared/models/videos/playlist/video-playlist-type.model' |
29 | import { doesVideoChannelIdExist, doesVideoExist, doesVideoPlaylistExist, VideoPlaylistFetchType } from '../../../helpers/middlewares' | 29 | import { doesVideoChannelIdExist, doesVideoExist, doesVideoPlaylistExist, VideoPlaylistFetchType } from '../../../helpers/middlewares' |
30 | import { MVideoPlaylist } from '../../../typings/models/video/video-playlist' | 30 | import { MVideoPlaylist } from '../../../types/models/video/video-playlist' |
31 | import { MUserAccountId } from '@server/typings/models' | 31 | import { MUserAccountId } from '@server/types/models' |
32 | 32 | ||
33 | const videoPlaylistsAddValidator = getCommonPlaylistEditAttributes().concat([ | 33 | const videoPlaylistsAddValidator = getCommonPlaylistEditAttributes().concat([ |
34 | body('displayName') | 34 | body('displayName') |
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 867c05fc1..40a34d3b8 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -47,7 +47,7 @@ import { | |||
47 | doesVideoExist, | 47 | doesVideoExist, |
48 | doesVideoFileOfVideoExist | 48 | doesVideoFileOfVideoExist |
49 | } from '../../../helpers/middlewares' | 49 | } from '../../../helpers/middlewares' |
50 | import { MVideoFullLight } from '@server/typings/models' | 50 | import { MVideoFullLight } from '@server/types/models' |
51 | import { getVideoWithAttributes } from '../../../helpers/video' | 51 | import { getVideoWithAttributes } from '../../../helpers/video' |
52 | import { getServerActor } from '@server/models/application/application' | 52 | import { getServerActor } from '@server/models/application/application' |
53 | 53 | ||
diff --git a/server/models/account/account-blocklist.ts b/server/models/account/account-blocklist.ts index 2c6b756d2..cf8872fd5 100644 --- a/server/models/account/account-blocklist.ts +++ b/server/models/account/account-blocklist.ts | |||
@@ -4,7 +4,7 @@ import { getSort, searchAttribute } from '../utils' | |||
4 | import { AccountBlock } from '../../../shared/models/blocklist' | 4 | import { AccountBlock } from '../../../shared/models/blocklist' |
5 | import { Op } from 'sequelize' | 5 | import { Op } from 'sequelize' |
6 | import * as Bluebird from 'bluebird' | 6 | import * as Bluebird from 'bluebird' |
7 | import { MAccountBlocklist, MAccountBlocklistAccounts, MAccountBlocklistFormattable } from '@server/typings/models' | 7 | import { MAccountBlocklist, MAccountBlocklistAccounts, MAccountBlocklistFormattable } from '@server/types/models' |
8 | import { ActorModel } from '../activitypub/actor' | 8 | import { ActorModel } from '../activitypub/actor' |
9 | import { ServerModel } from '../server/server' | 9 | import { ServerModel } from '../server/server' |
10 | 10 | ||
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts index 8aeb486d1..5064987dc 100644 --- a/server/models/account/account-video-rate.ts +++ b/server/models/account/account-video-rate.ts | |||
@@ -16,7 +16,7 @@ import { | |||
16 | MAccountVideoRateAccountUrl, | 16 | MAccountVideoRateAccountUrl, |
17 | MAccountVideoRateAccountVideo, | 17 | MAccountVideoRateAccountVideo, |
18 | MAccountVideoRateFormattable | 18 | MAccountVideoRateFormattable |
19 | } from '@server/typings/models/video/video-rate' | 19 | } from '@server/types/models/video/video-rate' |
20 | 20 | ||
21 | /* | 21 | /* |
22 | Account rates per video. | 22 | Account rates per video. |
diff --git a/server/models/account/account.ts b/server/models/account/account.ts index ad649837a..4395d179a 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts | |||
@@ -32,7 +32,7 @@ import { FindOptions, IncludeOptions, Op, Transaction, WhereOptions } from 'sequ | |||
32 | import { AccountBlocklistModel } from './account-blocklist' | 32 | import { AccountBlocklistModel } from './account-blocklist' |
33 | import { ServerBlocklistModel } from '../server/server-blocklist' | 33 | import { ServerBlocklistModel } from '../server/server-blocklist' |
34 | import { ActorFollowModel } from '../activitypub/actor-follow' | 34 | import { ActorFollowModel } from '../activitypub/actor-follow' |
35 | import { MAccountActor, MAccountAP, MAccountDefault, MAccountFormattable, MAccountSummaryFormattable, MAccount } from '../../typings/models' | 35 | import { MAccountActor, MAccountAP, MAccountDefault, MAccountFormattable, MAccountSummaryFormattable, MAccount } from '../../types/models' |
36 | import * as Bluebird from 'bluebird' | 36 | import * as Bluebird from 'bluebird' |
37 | import { ModelCache } from '@server/models/model-cache' | 37 | import { ModelCache } from '@server/models/model-cache' |
38 | import { VideoModel } from '../video/video' | 38 | import { VideoModel } from '../video/video' |
diff --git a/server/models/account/user-notification-setting.ts b/server/models/account/user-notification-setting.ts index dc69a17fd..b69b47265 100644 --- a/server/models/account/user-notification-setting.ts +++ b/server/models/account/user-notification-setting.ts | |||
@@ -17,7 +17,7 @@ import { UserModel } from './user' | |||
17 | import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications' | 17 | import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications' |
18 | import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model' | 18 | import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model' |
19 | import { clearCacheByUserId } from '../../lib/oauth-model' | 19 | import { clearCacheByUserId } from '../../lib/oauth-model' |
20 | import { MNotificationSettingFormattable } from '@server/typings/models' | 20 | import { MNotificationSettingFormattable } from '@server/types/models' |
21 | 21 | ||
22 | @Table({ | 22 | @Table({ |
23 | tableName: 'userNotificationSetting', | 23 | tableName: 'userNotificationSetting', |
diff --git a/server/models/account/user-notification.ts b/server/models/account/user-notification.ts index 5a725187a..30985bb0f 100644 --- a/server/models/account/user-notification.ts +++ b/server/models/account/user-notification.ts | |||
@@ -16,7 +16,7 @@ import { ActorModel } from '../activitypub/actor' | |||
16 | import { ActorFollowModel } from '../activitypub/actor-follow' | 16 | import { ActorFollowModel } from '../activitypub/actor-follow' |
17 | import { AvatarModel } from '../avatar/avatar' | 17 | import { AvatarModel } from '../avatar/avatar' |
18 | import { ServerModel } from '../server/server' | 18 | import { ServerModel } from '../server/server' |
19 | import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/typings/models/user' | 19 | import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user' |
20 | 20 | ||
21 | enum ScopeNames { | 21 | enum ScopeNames { |
22 | WITH_ALL = 'WITH_ALL' | 22 | WITH_ALL = 'WITH_ALL' |
diff --git a/server/models/account/user-video-history.ts b/server/models/account/user-video-history.ts index 522eebeaf..76b469fbf 100644 --- a/server/models/account/user-video-history.ts +++ b/server/models/account/user-video-history.ts | |||
@@ -2,7 +2,7 @@ import { AllowNull, BelongsTo, Column, CreatedAt, ForeignKey, IsInt, Model, Tabl | |||
2 | import { VideoModel } from '../video/video' | 2 | import { VideoModel } from '../video/video' |
3 | import { UserModel } from './user' | 3 | import { UserModel } from './user' |
4 | import { DestroyOptions, Op, Transaction } from 'sequelize' | 4 | import { DestroyOptions, Op, Transaction } from 'sequelize' |
5 | import { MUserAccountId, MUserId } from '@server/typings/models' | 5 | import { MUserAccountId, MUserId } from '@server/types/models' |
6 | 6 | ||
7 | @Table({ | 7 | @Table({ |
8 | tableName: 'userVideoHistory', | 8 | tableName: 'userVideoHistory', |
diff --git a/server/models/account/user.ts b/server/models/account/user.ts index fbd3080c6..3bde1e744 100644 --- a/server/models/account/user.ts +++ b/server/models/account/user.ts | |||
@@ -68,7 +68,7 @@ import { | |||
68 | MUserNotifSettingChannelDefault, | 68 | MUserNotifSettingChannelDefault, |
69 | MUserWithNotificationSetting, | 69 | MUserWithNotificationSetting, |
70 | MVideoFullLight | 70 | MVideoFullLight |
71 | } from '@server/typings/models' | 71 | } from '@server/types/models' |
72 | 72 | ||
73 | enum ScopeNames { | 73 | enum ScopeNames { |
74 | FOR_ME_API = 'FOR_ME_API', | 74 | FOR_ME_API = 'FOR_ME_API', |
diff --git a/server/models/activitypub/actor-follow.ts b/server/models/activitypub/actor-follow.ts index 85a371026..3e85cc329 100644 --- a/server/models/activitypub/actor-follow.ts +++ b/server/models/activitypub/actor-follow.ts | |||
@@ -33,7 +33,7 @@ import { | |||
33 | MActorFollowFollowingHost, | 33 | MActorFollowFollowingHost, |
34 | MActorFollowFormattable, | 34 | MActorFollowFormattable, |
35 | MActorFollowSubscriptions | 35 | MActorFollowSubscriptions |
36 | } from '@server/typings/models' | 36 | } from '@server/types/models' |
37 | import { ActivityPubActorType } from '@shared/models' | 37 | import { ActivityPubActorType } from '@shared/models' |
38 | import { VideoModel } from '@server/models/video/video' | 38 | import { VideoModel } from '@server/models/video/video' |
39 | import { getServerActor } from '@server/models/application/application' | 39 | import { getServerActor } from '@server/models/application/application' |
diff --git a/server/models/activitypub/actor.ts b/server/models/activitypub/actor.ts index 34bc91706..b6dacc534 100644 --- a/server/models/activitypub/actor.ts +++ b/server/models/activitypub/actor.ts | |||
@@ -45,7 +45,7 @@ import { | |||
45 | MActorServer, | 45 | MActorServer, |
46 | MActorSummaryFormattable, MActorUrl, | 46 | MActorSummaryFormattable, MActorUrl, |
47 | MActorWithInboxes | 47 | MActorWithInboxes |
48 | } from '../../typings/models' | 48 | } from '../../types/models' |
49 | import * as Bluebird from 'bluebird' | 49 | import * as Bluebird from 'bluebird' |
50 | import { Op, Transaction, literal } from 'sequelize' | 50 | import { Op, Transaction, literal } from 'sequelize' |
51 | import { ModelCache } from '@server/models/model-cache' | 51 | import { ModelCache } from '@server/models/model-cache' |
diff --git a/server/models/avatar/avatar.ts b/server/models/avatar/avatar.ts index 950e4b181..d874dec99 100644 --- a/server/models/avatar/avatar.ts +++ b/server/models/avatar/avatar.ts | |||
@@ -7,7 +7,7 @@ import { remove } from 'fs-extra' | |||
7 | import { CONFIG } from '../../initializers/config' | 7 | import { CONFIG } from '../../initializers/config' |
8 | import { throwIfNotValid } from '../utils' | 8 | import { throwIfNotValid } from '../utils' |
9 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' | 9 | import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' |
10 | import { MAvatarFormattable } from '@server/typings/models' | 10 | import { MAvatarFormattable } from '@server/types/models' |
11 | 11 | ||
12 | @Table({ | 12 | @Table({ |
13 | tableName: 'avatar', | 13 | tableName: 'avatar', |
diff --git a/server/models/oauth/oauth-token.ts b/server/models/oauth/oauth-token.ts index 38953e8ad..7f2313dad 100644 --- a/server/models/oauth/oauth-token.ts +++ b/server/models/oauth/oauth-token.ts | |||
@@ -19,7 +19,7 @@ import { AccountModel } from '../account/account' | |||
19 | import { ActorModel } from '../activitypub/actor' | 19 | import { ActorModel } from '../activitypub/actor' |
20 | import { clearCacheByToken } from '../../lib/oauth-model' | 20 | import { clearCacheByToken } from '../../lib/oauth-model' |
21 | import * as Bluebird from 'bluebird' | 21 | import * as Bluebird from 'bluebird' |
22 | import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' | 22 | import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' |
23 | 23 | ||
24 | export type OAuthTokenInfo = { | 24 | export type OAuthTokenInfo = { |
25 | refreshToken: string | 25 | refreshToken: string |
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index 6021408bf..1c8b2cf78 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts | |||
@@ -29,7 +29,7 @@ import * as Bluebird from 'bluebird' | |||
29 | import { col, FindOptions, fn, literal, Op, Transaction, WhereOptions } from 'sequelize' | 29 | import { col, FindOptions, fn, literal, Op, Transaction, WhereOptions } from 'sequelize' |
30 | import { VideoStreamingPlaylistModel } from '../video/video-streaming-playlist' | 30 | import { VideoStreamingPlaylistModel } from '../video/video-streaming-playlist' |
31 | import { CONFIG } from '../../initializers/config' | 31 | import { CONFIG } from '../../initializers/config' |
32 | import { MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/typings/models' | 32 | import { MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models' |
33 | import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model' | 33 | import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model' |
34 | import { | 34 | import { |
35 | FileRedundancyInformation, | 35 | FileRedundancyInformation, |
diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts index 53b6227d7..95fb386b5 100644 --- a/server/models/server/plugin.ts +++ b/server/models/server/plugin.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
2 | import { FindAndCountOptions, json, QueryTypes } from 'sequelize' | 2 | import { FindAndCountOptions, json, QueryTypes } from 'sequelize' |
3 | import { AllowNull, Column, CreatedAt, DataType, DefaultScope, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' | 3 | import { AllowNull, Column, CreatedAt, DataType, DefaultScope, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' |
4 | import { MPlugin, MPluginFormattable } from '@server/typings/models' | 4 | import { MPlugin, MPluginFormattable } from '@server/types/models' |
5 | import { PeerTubePlugin } from '../../../shared/models/plugins/peertube-plugin.model' | 5 | import { PeerTubePlugin } from '../../../shared/models/plugins/peertube-plugin.model' |
6 | import { PluginType } from '../../../shared/models/plugins/plugin.type' | 6 | import { PluginType } from '../../../shared/models/plugins/plugin.type' |
7 | import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model' | 7 | import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model' |
diff --git a/server/models/server/server-blocklist.ts b/server/models/server/server-blocklist.ts index ad8e3d1e8..30f0525e5 100644 --- a/server/models/server/server-blocklist.ts +++ b/server/models/server/server-blocklist.ts | |||
@@ -4,7 +4,7 @@ import { ServerModel } from './server' | |||
4 | import { ServerBlock } from '../../../shared/models/blocklist' | 4 | import { ServerBlock } from '../../../shared/models/blocklist' |
5 | import { getSort, searchAttribute } from '../utils' | 5 | import { getSort, searchAttribute } from '../utils' |
6 | import * as Bluebird from 'bluebird' | 6 | import * as Bluebird from 'bluebird' |
7 | import { MServerBlocklist, MServerBlocklistAccountServer, MServerBlocklistFormattable } from '@server/typings/models' | 7 | import { MServerBlocklist, MServerBlocklistAccountServer, MServerBlocklistFormattable } from '@server/types/models' |
8 | import { Op } from 'sequelize' | 8 | import { Op } from 'sequelize' |
9 | 9 | ||
10 | enum ScopeNames { | 10 | enum ScopeNames { |
diff --git a/server/models/server/server.ts b/server/models/server/server.ts index 5131257ec..771200797 100644 --- a/server/models/server/server.ts +++ b/server/models/server/server.ts | |||
@@ -4,7 +4,7 @@ import { ActorModel } from '../activitypub/actor' | |||
4 | import { throwIfNotValid } from '../utils' | 4 | import { throwIfNotValid } from '../utils' |
5 | import { ServerBlocklistModel } from './server-blocklist' | 5 | import { ServerBlocklistModel } from './server-blocklist' |
6 | import * as Bluebird from 'bluebird' | 6 | import * as Bluebird from 'bluebird' |
7 | import { MServer, MServerFormattable } from '@server/typings/models/server' | 7 | import { MServer, MServerFormattable } from '@server/types/models/server' |
8 | 8 | ||
9 | @Table({ | 9 | @Table({ |
10 | tableName: 'server', | 10 | tableName: 'server', |
diff --git a/server/models/video/schedule-video-update.ts b/server/models/video/schedule-video-update.ts index 00b7f5524..1ce6bbfe5 100644 --- a/server/models/video/schedule-video-update.ts +++ b/server/models/video/schedule-video-update.ts | |||
@@ -2,7 +2,7 @@ import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Ta | |||
2 | import { ScopeNames as VideoScopeNames, VideoModel } from './video' | 2 | import { ScopeNames as VideoScopeNames, VideoModel } from './video' |
3 | import { VideoPrivacy } from '../../../shared/models/videos' | 3 | import { VideoPrivacy } from '../../../shared/models/videos' |
4 | import { Op, Transaction } from 'sequelize' | 4 | import { Op, Transaction } from 'sequelize' |
5 | import { MScheduleVideoUpdateFormattable, MScheduleVideoUpdateVideoAll } from '@server/typings/models' | 5 | import { MScheduleVideoUpdateFormattable, MScheduleVideoUpdateVideoAll } from '@server/types/models' |
6 | 6 | ||
7 | @Table({ | 7 | @Table({ |
8 | tableName: 'scheduleVideoUpdate', | 8 | tableName: 'scheduleVideoUpdate', |
diff --git a/server/models/video/tag.ts b/server/models/video/tag.ts index ed8df8b48..adbc4fb7d 100644 --- a/server/models/video/tag.ts +++ b/server/models/video/tag.ts | |||
@@ -6,7 +6,7 @@ import { throwIfNotValid } from '../utils' | |||
6 | import { VideoModel } from './video' | 6 | import { VideoModel } from './video' |
7 | import { VideoTagModel } from './video-tag' | 7 | import { VideoTagModel } from './video-tag' |
8 | import { VideoPrivacy, VideoState } from '../../../shared/models/videos' | 8 | import { VideoPrivacy, VideoState } from '../../../shared/models/videos' |
9 | import { MTag } from '@server/typings/models' | 9 | import { MTag } from '@server/types/models' |
10 | 10 | ||
11 | @Table({ | 11 | @Table({ |
12 | tableName: 'tag', | 12 | tableName: 'tag', |
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts index e396784d2..20c1e5858 100644 --- a/server/models/video/thumbnail.ts +++ b/server/models/video/thumbnail.ts | |||
@@ -19,7 +19,7 @@ import { CONFIG } from '../../initializers/config' | |||
19 | import { VideoModel } from './video' | 19 | import { VideoModel } from './video' |
20 | import { VideoPlaylistModel } from './video-playlist' | 20 | import { VideoPlaylistModel } from './video-playlist' |
21 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' | 21 | import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' |
22 | import { MVideoAccountLight } from '@server/typings/models' | 22 | import { MVideoAccountLight } from '@server/types/models' |
23 | import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' | 23 | import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' |
24 | 24 | ||
25 | @Table({ | 25 | @Table({ |
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts index 40f0ce12b..b2f111337 100644 --- a/server/models/video/video-abuse.ts +++ b/server/models/video/video-abuse.ts | |||
@@ -24,7 +24,7 @@ import { | |||
24 | isVideoAbuseStateValid | 24 | isVideoAbuseStateValid |
25 | } from '../../helpers/custom-validators/video-abuses' | 25 | } from '../../helpers/custom-validators/video-abuses' |
26 | import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants' | 26 | import { CONSTRAINTS_FIELDS, VIDEO_ABUSE_STATES } from '../../initializers/constants' |
27 | import { MUserAccountId, MVideoAbuse, MVideoAbuseFormattable, MVideoAbuseVideo } from '../../typings/models' | 27 | import { MUserAccountId, MVideoAbuse, MVideoAbuseFormattable, MVideoAbuseVideo } from '../../types/models' |
28 | import { AccountModel } from '../account/account' | 28 | import { AccountModel } from '../account/account' |
29 | import { buildBlockedAccountSQL, getSort, searchAttribute, throwIfNotValid } from '../utils' | 29 | import { buildBlockedAccountSQL, getSort, searchAttribute, throwIfNotValid } from '../utils' |
30 | import { ThumbnailModel } from './thumbnail' | 30 | import { ThumbnailModel } from './thumbnail' |
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts index 8cbfe362e..36d2a30fa 100644 --- a/server/models/video/video-blacklist.ts +++ b/server/models/video/video-blacklist.ts | |||
@@ -8,7 +8,7 @@ import { CONSTRAINTS_FIELDS } from '../../initializers/constants' | |||
8 | import { FindOptions } from 'sequelize' | 8 | import { FindOptions } from 'sequelize' |
9 | import { ThumbnailModel } from './thumbnail' | 9 | import { ThumbnailModel } from './thumbnail' |
10 | import * as Bluebird from 'bluebird' | 10 | import * as Bluebird from 'bluebird' |
11 | import { MVideoBlacklist, MVideoBlacklistFormattable } from '@server/typings/models' | 11 | import { MVideoBlacklist, MVideoBlacklistFormattable } from '@server/types/models' |
12 | 12 | ||
13 | @Table({ | 13 | @Table({ |
14 | tableName: 'videoBlacklist', | 14 | tableName: 'videoBlacklist', |
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts index 59d3e1050..b68a6e99f 100644 --- a/server/models/video/video-caption.ts +++ b/server/models/video/video-caption.ts | |||
@@ -23,7 +23,7 @@ import { logger } from '../../helpers/logger' | |||
23 | import { remove } from 'fs-extra' | 23 | import { remove } from 'fs-extra' |
24 | import { CONFIG } from '../../initializers/config' | 24 | import { CONFIG } from '../../initializers/config' |
25 | import * as Bluebird from 'bluebird' | 25 | import * as Bluebird from 'bluebird' |
26 | import { MVideoAccountLight, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/typings/models' | 26 | import { MVideoAccountLight, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' |
27 | import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' | 27 | import { buildRemoteVideoBaseUrl } from '@server/helpers/activitypub' |
28 | 28 | ||
29 | export enum ScopeNames { | 29 | export enum ScopeNames { |
diff --git a/server/models/video/video-change-ownership.ts b/server/models/video/video-change-ownership.ts index 3259b6c02..aecb03c14 100644 --- a/server/models/video/video-change-ownership.ts +++ b/server/models/video/video-change-ownership.ts | |||
@@ -3,7 +3,7 @@ import { AccountModel } from '../account/account' | |||
3 | import { ScopeNames as VideoScopeNames, VideoModel } from './video' | 3 | import { ScopeNames as VideoScopeNames, VideoModel } from './video' |
4 | import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos' | 4 | import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos' |
5 | import { getSort } from '../utils' | 5 | import { getSort } from '../utils' |
6 | import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/typings/models/video/video-change-ownership' | 6 | import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership' |
7 | import * as Bluebird from 'bluebird' | 7 | import * as Bluebird from 'bluebird' |
8 | 8 | ||
9 | enum ScopeNames { | 9 | enum ScopeNames { |
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index a4231b6b3..9cee64229 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -41,7 +41,7 @@ import { | |||
41 | MChannelAP, | 41 | MChannelAP, |
42 | MChannelFormattable, | 42 | MChannelFormattable, |
43 | MChannelSummaryFormattable | 43 | MChannelSummaryFormattable |
44 | } from '../../typings/models/video' | 44 | } from '../../types/models/video' |
45 | 45 | ||
46 | export enum ScopeNames { | 46 | export enum ScopeNames { |
47 | FOR_API = 'FOR_API', | 47 | FOR_API = 'FOR_API', |
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index cf2a80d53..091cc2a88 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -3,7 +3,7 @@ import { uniq } from 'lodash' | |||
3 | import { FindOptions, Op, Order, ScopeOptions, Sequelize, Transaction } from 'sequelize' | 3 | import { FindOptions, Op, Order, ScopeOptions, Sequelize, Transaction } from 'sequelize' |
4 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' | 4 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' |
5 | import { getServerActor } from '@server/models/application/application' | 5 | import { getServerActor } from '@server/models/application/application' |
6 | import { MAccount, MAccountId, MUserAccountId } from '@server/typings/models' | 6 | import { MAccount, MAccountId, MUserAccountId } from '@server/types/models' |
7 | import { VideoPrivacy } from '@shared/models' | 7 | import { VideoPrivacy } from '@shared/models' |
8 | import { ActivityTagObject, ActivityTombstoneObject } from '../../../shared/models/activitypub/objects/common-objects' | 8 | import { ActivityTagObject, ActivityTombstoneObject } from '../../../shared/models/activitypub/objects/common-objects' |
9 | import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' | 9 | import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' |
@@ -23,7 +23,7 @@ import { | |||
23 | MCommentOwnerVideoFeed, | 23 | MCommentOwnerVideoFeed, |
24 | MCommentOwnerVideoReply, | 24 | MCommentOwnerVideoReply, |
25 | MVideoImmutable | 25 | MVideoImmutable |
26 | } from '../../typings/models/video' | 26 | } from '../../types/models/video' |
27 | import { AccountModel } from '../account/account' | 27 | import { AccountModel } from '../account/account' |
28 | import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' | 28 | import { ActorModel, unusedActorAttributesForAPI } from '../activitypub/actor' |
29 | import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils' | 29 | import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils' |
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts index 201f0c0f1..f95022383 100644 --- a/server/models/video/video-file.ts +++ b/server/models/video/video-file.ts | |||
@@ -27,8 +27,8 @@ import { VideoRedundancyModel } from '../redundancy/video-redundancy' | |||
27 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' | 27 | import { VideoStreamingPlaylistModel } from './video-streaming-playlist' |
28 | import { FindOptions, Op, QueryTypes, Transaction } from 'sequelize' | 28 | import { FindOptions, Op, QueryTypes, Transaction } from 'sequelize' |
29 | import { MIMETYPES, MEMOIZE_LENGTH, MEMOIZE_TTL } from '../../initializers/constants' | 29 | import { MIMETYPES, MEMOIZE_LENGTH, MEMOIZE_TTL } from '../../initializers/constants' |
30 | import { MVideoFile, MVideoFileStreamingPlaylistVideo, MVideoFileVideo } from '../../typings/models/video/video-file' | 30 | import { MVideoFile, MVideoFileStreamingPlaylistVideo, MVideoFileVideo } from '../../types/models/video/video-file' |
31 | import { MStreamingPlaylistVideo, MVideo } from '@server/typings/models' | 31 | import { MStreamingPlaylistVideo, MVideo } from '@server/types/models' |
32 | import * as memoizee from 'memoizee' | 32 | import * as memoizee from 'memoizee' |
33 | import validator from 'validator' | 33 | import validator from 'validator' |
34 | 34 | ||
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts index 89b0f5050..9b6509dfd 100644 --- a/server/models/video/video-format-utils.ts +++ b/server/models/video/video-format-utils.ts | |||
@@ -19,8 +19,8 @@ import { | |||
19 | MVideoFile, | 19 | MVideoFile, |
20 | MVideoFormattable, | 20 | MVideoFormattable, |
21 | MVideoFormattableDetails | 21 | MVideoFormattableDetails |
22 | } from '../../typings/models' | 22 | } from '../../types/models' |
23 | import { MVideoFileRedundanciesOpt } from '../../typings/models/video/video-file' | 23 | import { MVideoFileRedundanciesOpt } from '../../types/models/video/video-file' |
24 | import { VideoFile } from '@shared/models/videos/video-file.model' | 24 | import { VideoFile } from '@shared/models/videos/video-file.model' |
25 | import { generateMagnetUri } from '@server/helpers/webtorrent' | 25 | import { generateMagnetUri } from '@server/helpers/webtorrent' |
26 | import { extractVideo } from '@server/helpers/video' | 26 | import { extractVideo } from '@server/helpers/video' |
diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts index fbe0ee0a7..ea1e085af 100644 --- a/server/models/video/video-import.ts +++ b/server/models/video/video-import.ts | |||
@@ -21,7 +21,7 @@ import { VideoImport, VideoImportState } from '../../../shared' | |||
21 | import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' | 21 | import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' |
22 | import { UserModel } from '../account/user' | 22 | import { UserModel } from '../account/user' |
23 | import * as Bluebird from 'bluebird' | 23 | import * as Bluebird from 'bluebird' |
24 | import { MVideoImportDefault, MVideoImportFormattable } from '@server/typings/models/video/video-import' | 24 | import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' |
25 | 25 | ||
26 | @DefaultScope(() => ({ | 26 | @DefaultScope(() => ({ |
27 | include: [ | 27 | include: [ |
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts index 9ea73e82e..ba92e129a 100644 --- a/server/models/video/video-playlist-element.ts +++ b/server/models/video/video-playlist-element.ts | |||
@@ -31,8 +31,8 @@ import { | |||
31 | MVideoPlaylistElementFormattable, | 31 | MVideoPlaylistElementFormattable, |
32 | MVideoPlaylistElementVideoUrlPlaylistPrivacy, | 32 | MVideoPlaylistElementVideoUrlPlaylistPrivacy, |
33 | MVideoPlaylistVideoThumbnail | 33 | MVideoPlaylistVideoThumbnail |
34 | } from '@server/typings/models/video/video-playlist-element' | 34 | } from '@server/types/models/video/video-playlist-element' |
35 | import { MUserAccountId } from '@server/typings/models' | 35 | import { MUserAccountId } from '@server/types/models' |
36 | 36 | ||
37 | @Table({ | 37 | @Table({ |
38 | tableName: 'videoPlaylistElement', | 38 | tableName: 'videoPlaylistElement', |
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index d66518c9f..51fe04fc4 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts | |||
@@ -51,9 +51,9 @@ import { | |||
51 | MVideoPlaylistFull, | 51 | MVideoPlaylistFull, |
52 | MVideoPlaylistFullSummary, | 52 | MVideoPlaylistFullSummary, |
53 | MVideoPlaylistIdWithElements | 53 | MVideoPlaylistIdWithElements |
54 | } from '../../typings/models/video/video-playlist' | 54 | } from '../../types/models/video/video-playlist' |
55 | import { MThumbnail } from '../../typings/models/video/thumbnail' | 55 | import { MThumbnail } from '../../types/models/video/thumbnail' |
56 | import { MAccountId, MChannelId } from '@server/typings/models' | 56 | import { MAccountId, MChannelId } from '@server/types/models' |
57 | 57 | ||
58 | enum ScopeNames { | 58 | enum ScopeNames { |
59 | AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', | 59 | AVAILABLE_FOR_LIST = 'AVAILABLE_FOR_LIST', |
diff --git a/server/models/video/video-query-builder.ts b/server/models/video/video-query-builder.ts index 6211c9e56..984b0e6af 100644 --- a/server/models/video/video-query-builder.ts +++ b/server/models/video/video-query-builder.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { VideoFilter, VideoPrivacy, VideoState } from '@shared/models' | 1 | import { VideoFilter, VideoPrivacy, VideoState } from '@shared/models' |
2 | import { buildDirectionAndField, createSafeIn } from '@server/models/utils' | 2 | import { buildDirectionAndField, createSafeIn } from '@server/models/utils' |
3 | import { Model } from 'sequelize-typescript' | 3 | import { Model } from 'sequelize-typescript' |
4 | import { MUserAccountId, MUserId } from '@server/typings/models' | 4 | import { MUserAccountId, MUserId } from '@server/types/models' |
5 | import validator from 'validator' | 5 | import validator from 'validator' |
6 | import { exists } from '@server/helpers/custom-validators/misc' | 6 | import { exists } from '@server/helpers/custom-validators/misc' |
7 | 7 | ||
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts index 4bbef75e6..f9ee94589 100644 --- a/server/models/video/video-share.ts +++ b/server/models/video/video-share.ts | |||
@@ -6,8 +6,8 @@ import { ActorModel } from '../activitypub/actor' | |||
6 | import { buildLocalActorIdsIn, throwIfNotValid } from '../utils' | 6 | import { buildLocalActorIdsIn, throwIfNotValid } from '../utils' |
7 | import { VideoModel } from './video' | 7 | import { VideoModel } from './video' |
8 | import { literal, Op, Transaction } from 'sequelize' | 8 | import { literal, Op, Transaction } from 'sequelize' |
9 | import { MVideoShareActor, MVideoShareFull } from '../../typings/models/video' | 9 | import { MVideoShareActor, MVideoShareFull } from '../../types/models/video' |
10 | import { MActorDefault } from '../../typings/models' | 10 | import { MActorDefault } from '../../types/models' |
11 | 11 | ||
12 | enum ScopeNames { | 12 | enum ScopeNames { |
13 | FULL = 'FULL', | 13 | FULL = 'FULL', |
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts index 249596218..021b9b063 100644 --- a/server/models/video/video-streaming-playlist.ts +++ b/server/models/video/video-streaming-playlist.ts | |||
@@ -17,7 +17,7 @@ import { join } from 'path' | |||
17 | import { sha1 } from '../../helpers/core-utils' | 17 | import { sha1 } from '../../helpers/core-utils' |
18 | import { isArrayOf } from '../../helpers/custom-validators/misc' | 18 | import { isArrayOf } from '../../helpers/custom-validators/misc' |
19 | import { Op, QueryTypes } from 'sequelize' | 19 | import { Op, QueryTypes } from 'sequelize' |
20 | import { MStreamingPlaylist, MStreamingPlaylistVideo, MVideoFile } from '@server/typings/models' | 20 | import { MStreamingPlaylist, MStreamingPlaylistVideo, MVideoFile } from '@server/types/models' |
21 | import { VideoFileModel } from '@server/models/video/video-file' | 21 | import { VideoFileModel } from '@server/models/video/video-file' |
22 | import { getTorrentFileName, getTorrentFilePath, getVideoFilename } from '@server/lib/video-paths' | 22 | import { getTorrentFileName, getTorrentFilePath, getVideoFilename } from '@server/lib/video-paths' |
23 | import * as memoizee from 'memoizee' | 23 | import * as memoizee from 'memoizee' |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index b4efb76ee..e2718300e 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -117,9 +117,9 @@ import { | |||
117 | MVideoWithAllFiles, | 117 | MVideoWithAllFiles, |
118 | MVideoWithFile, | 118 | MVideoWithFile, |
119 | MVideoWithRights | 119 | MVideoWithRights |
120 | } from '../../typings/models' | 120 | } from '../../types/models' |
121 | import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../typings/models/video/video-file' | 121 | import { MVideoFile, MVideoFileStreamingPlaylistVideo } from '../../types/models/video/video-file' |
122 | import { MThumbnail } from '../../typings/models/video/thumbnail' | 122 | import { MThumbnail } from '../../types/models/video/thumbnail' |
123 | import { VideoFile } from '@shared/models/videos/video-file.model' | 123 | import { VideoFile } from '@shared/models/videos/video-file.model' |
124 | import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths' | 124 | import { getHLSDirectory, getTorrentFileName, getTorrentFilePath, getVideoFilename, getVideoFilePath } from '@server/lib/video-paths' |
125 | import { ModelCache } from '@server/models/model-cache' | 125 | import { ModelCache } from '@server/models/model-cache' |
diff --git a/server/tools/tsconfig.json b/server/tools/tsconfig.json index f8a1c705c..156a8ed22 100644 --- a/server/tools/tsconfig.json +++ b/server/tools/tsconfig.json | |||
@@ -1,4 +1,5 @@ | |||
1 | { | 1 | { |
2 | "extends": "../../tsconfig.json", | 2 | "extends": "../../tsconfig.json", |
3 | "include": [ ".", "../typings" ], | ||
3 | "exclude": [ ] // Overwrite exclude property | 4 | "exclude": [ ] // Overwrite exclude property |
4 | } | 5 | } |
diff --git a/server/typings/activitypub-processor.model.ts b/server/types/activitypub-processor.model.ts index 7ed3a65b1..7ed3a65b1 100644 --- a/server/typings/activitypub-processor.model.ts +++ b/server/types/activitypub-processor.model.ts | |||
diff --git a/server/typings/models/account/account-blocklist.ts b/server/types/models/account/account-blocklist.ts index 0d8bf11bd..0d8bf11bd 100644 --- a/server/typings/models/account/account-blocklist.ts +++ b/server/types/models/account/account-blocklist.ts | |||
diff --git a/server/typings/models/account/account.ts b/server/types/models/account/account.ts index 7b826ee04..7b826ee04 100644 --- a/server/typings/models/account/account.ts +++ b/server/types/models/account/account.ts | |||
diff --git a/server/typings/models/account/actor-follow.ts b/server/types/models/account/actor-follow.ts index 5d0c03c8d..5d0c03c8d 100644 --- a/server/typings/models/account/actor-follow.ts +++ b/server/types/models/account/actor-follow.ts | |||
diff --git a/server/typings/models/account/actor.ts b/server/types/models/account/actor.ts index 1160e84cb..1160e84cb 100644 --- a/server/typings/models/account/actor.ts +++ b/server/types/models/account/actor.ts | |||
diff --git a/server/typings/models/account/avatar.ts b/server/types/models/account/avatar.ts index 21b47180f..6eba59ee4 100644 --- a/server/typings/models/account/avatar.ts +++ b/server/types/models/account/avatar.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { AvatarModel } from '../../../models/avatar/avatar' | 1 | import { AvatarModel } from '../../../models/avatar/avatar' |
2 | import { FunctionProperties } from '@server/typings/utils' | 2 | import { FunctionProperties } from '@server/types/utils' |
3 | 3 | ||
4 | export type MAvatar = AvatarModel | 4 | export type MAvatar = AvatarModel |
5 | 5 | ||
diff --git a/server/typings/models/account/index.ts b/server/types/models/account/index.ts index 513c09c40..513c09c40 100644 --- a/server/typings/models/account/index.ts +++ b/server/types/models/account/index.ts | |||
diff --git a/server/typings/models/index.ts b/server/types/models/index.ts index 78b4948ce..78b4948ce 100644 --- a/server/typings/models/index.ts +++ b/server/types/models/index.ts | |||
diff --git a/server/typings/models/oauth/index.ts b/server/types/models/oauth/index.ts index 36b7ea8ca..36b7ea8ca 100644 --- a/server/typings/models/oauth/index.ts +++ b/server/types/models/oauth/index.ts | |||
diff --git a/server/typings/models/oauth/oauth-client.ts b/server/types/models/oauth/oauth-client.ts index 904a07863..904a07863 100644 --- a/server/typings/models/oauth/oauth-client.ts +++ b/server/types/models/oauth/oauth-client.ts | |||
diff --git a/server/typings/models/oauth/oauth-token.ts b/server/types/models/oauth/oauth-token.ts index b24a95fd8..396cf6429 100644 --- a/server/typings/models/oauth/oauth-token.ts +++ b/server/types/models/oauth/oauth-token.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { OAuthTokenModel } from '@server/models/oauth/oauth-token' | 1 | import { OAuthTokenModel } from '@server/models/oauth/oauth-token' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MUserAccountUrl } from '../user/user' | 3 | import { MUserAccountUrl } from '../user/user' |
4 | 4 | ||
5 | type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M> | 5 | type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M> |
diff --git a/server/typings/models/server/index.ts b/server/types/models/server/index.ts index c853795ad..c853795ad 100644 --- a/server/typings/models/server/index.ts +++ b/server/types/models/server/index.ts | |||
diff --git a/server/typings/models/server/plugin.ts b/server/types/models/server/plugin.ts index 83eb83794..83eb83794 100644 --- a/server/typings/models/server/plugin.ts +++ b/server/types/models/server/plugin.ts | |||
diff --git a/server/typings/models/server/server-blocklist.ts b/server/types/models/server/server-blocklist.ts index ff6f49176..cfbf3b73a 100644 --- a/server/typings/models/server/server-blocklist.ts +++ b/server/types/models/server/server-blocklist.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ServerBlocklistModel } from '@server/models/server/server-blocklist' | 1 | import { ServerBlocklistModel } from '@server/models/server/server-blocklist' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MAccountDefault, MAccountFormattable } from '../account/account' | 3 | import { MAccountDefault, MAccountFormattable } from '../account/account' |
4 | import { MServer, MServerFormattable } from './server' | 4 | import { MServer, MServerFormattable } from './server' |
5 | 5 | ||
diff --git a/server/typings/models/server/server.ts b/server/types/models/server/server.ts index b35e55aeb..b35e55aeb 100644 --- a/server/typings/models/server/server.ts +++ b/server/types/models/server/server.ts | |||
diff --git a/server/typings/models/user/index.ts b/server/types/models/user/index.ts index 6657b2128..6657b2128 100644 --- a/server/typings/models/user/index.ts +++ b/server/types/models/user/index.ts | |||
diff --git a/server/typings/models/user/user-notification-setting.ts b/server/types/models/user/user-notification-setting.ts index c674add1b..c674add1b 100644 --- a/server/typings/models/user/user-notification-setting.ts +++ b/server/types/models/user/user-notification-setting.ts | |||
diff --git a/server/typings/models/user/user-notification.ts b/server/types/models/user/user-notification.ts index 2080360e1..2080360e1 100644 --- a/server/typings/models/user/user-notification.ts +++ b/server/types/models/user/user-notification.ts | |||
diff --git a/server/typings/models/user/user-video-history.ts b/server/types/models/user/user-video-history.ts index 62673ab1b..62673ab1b 100644 --- a/server/typings/models/user/user-video-history.ts +++ b/server/types/models/user/user-video-history.ts | |||
diff --git a/server/typings/models/user/user.ts b/server/types/models/user/user.ts index 31cf075ef..7938ea288 100644 --- a/server/typings/models/user/user.ts +++ b/server/types/models/user/user.ts | |||
@@ -12,7 +12,7 @@ import { | |||
12 | import { MNotificationSetting, MNotificationSettingFormattable } from './user-notification-setting' | 12 | import { MNotificationSetting, MNotificationSettingFormattable } from './user-notification-setting' |
13 | import { AccountModel } from '@server/models/account/account' | 13 | import { AccountModel } from '@server/models/account/account' |
14 | import { MChannelFormattable } from '../video/video-channels' | 14 | import { MChannelFormattable } from '../video/video-channels' |
15 | import { MVideoPlaylist } from '@server/typings/models' | 15 | import { MVideoPlaylist } from '@server/types/models' |
16 | 16 | ||
17 | type Use<K extends keyof UserModel, M> = PickWith<UserModel, K, M> | 17 | type Use<K extends keyof UserModel, M> = PickWith<UserModel, K, M> |
18 | 18 | ||
diff --git a/server/typings/models/video/index.ts b/server/types/models/video/index.ts index bd69c8a4b..bd69c8a4b 100644 --- a/server/typings/models/video/index.ts +++ b/server/types/models/video/index.ts | |||
diff --git a/server/typings/models/video/schedule-video-update.ts b/server/types/models/video/schedule-video-update.ts index 95a53d139..6336fdabe 100644 --- a/server/typings/models/video/schedule-video-update.ts +++ b/server/types/models/video/schedule-video-update.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' | 1 | import { ScheduleVideoUpdateModel } from '../../../models/video/schedule-video-update' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MVideoAPWithoutCaption, MVideoWithBlacklistLight } from './video' | 3 | import { MVideoAPWithoutCaption, MVideoWithBlacklistLight } from './video' |
4 | 4 | ||
5 | type Use<K extends keyof ScheduleVideoUpdateModel, M> = PickWith<ScheduleVideoUpdateModel, K, M> | 5 | type Use<K extends keyof ScheduleVideoUpdateModel, M> = PickWith<ScheduleVideoUpdateModel, K, M> |
diff --git a/server/typings/models/video/tag.ts b/server/types/models/video/tag.ts index 64a68873e..64a68873e 100644 --- a/server/typings/models/video/tag.ts +++ b/server/types/models/video/tag.ts | |||
diff --git a/server/typings/models/video/thumbnail.ts b/server/types/models/video/thumbnail.ts index c03ba55ac..c03ba55ac 100644 --- a/server/typings/models/video/thumbnail.ts +++ b/server/types/models/video/thumbnail.ts | |||
diff --git a/server/typings/models/video/video-abuse.ts b/server/types/models/video/video-abuse.ts index d60f05e4c..d60f05e4c 100644 --- a/server/typings/models/video/video-abuse.ts +++ b/server/types/models/video/video-abuse.ts | |||
diff --git a/server/typings/models/video/video-blacklist.ts b/server/types/models/video/video-blacklist.ts index ddb4db832..08e59284a 100644 --- a/server/typings/models/video/video-blacklist.ts +++ b/server/types/models/video/video-blacklist.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' | 1 | import { VideoBlacklistModel } from '../../../models/video/video-blacklist' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MVideo, MVideoFormattable } from './video' | 3 | import { MVideo, MVideoFormattable } from './video' |
4 | 4 | ||
5 | type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M> | 5 | type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M> |
diff --git a/server/typings/models/video/video-caption.ts b/server/types/models/video/video-caption.ts index e7aff6956..9bb067001 100644 --- a/server/typings/models/video/video-caption.ts +++ b/server/types/models/video/video-caption.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoCaptionModel } from '../../../models/video/video-caption' | 1 | import { VideoCaptionModel } from '../../../models/video/video-caption' |
2 | import { FunctionProperties, PickWith } from '@server/typings/utils' | 2 | import { FunctionProperties, PickWith } from '@server/types/utils' |
3 | import { MVideo, MVideoUUID } from './video' | 3 | import { MVideo, MVideoUUID } from './video' |
4 | 4 | ||
5 | type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M> | 5 | type Use<K extends keyof VideoCaptionModel, M> = PickWith<VideoCaptionModel, K, M> |
diff --git a/server/typings/models/video/video-change-ownership.ts b/server/types/models/video/video-change-ownership.ts index 971dc3db5..7421e081e 100644 --- a/server/typings/models/video/video-change-ownership.ts +++ b/server/types/models/video/video-change-ownership.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' | 1 | import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MAccountDefault, MAccountFormattable } from '../account/account' | 3 | import { MAccountDefault, MAccountFormattable } from '../account/account' |
4 | import { MVideo, MVideoWithAllFiles } from './video' | 4 | import { MVideo, MVideoWithAllFiles } from './video' |
5 | 5 | ||
diff --git a/server/typings/models/video/video-channels.ts b/server/types/models/video/video-channels.ts index 50f7c2d8a..50f7c2d8a 100644 --- a/server/typings/models/video/video-channels.ts +++ b/server/types/models/video/video-channels.ts | |||
diff --git a/server/typings/models/video/video-comment.ts b/server/types/models/video/video-comment.ts index d6e0b66f5..d6e0b66f5 100644 --- a/server/typings/models/video/video-comment.ts +++ b/server/types/models/video/video-comment.ts | |||
diff --git a/server/typings/models/video/video-file.ts b/server/types/models/video/video-file.ts index 3fcaca78f..3fcaca78f 100644 --- a/server/typings/models/video/video-file.ts +++ b/server/types/models/video/video-file.ts | |||
diff --git a/server/typings/models/video/video-import.ts b/server/types/models/video/video-import.ts index 4e5c2e4f0..f1385877e 100644 --- a/server/typings/models/video/video-import.ts +++ b/server/types/models/video/video-import.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoImportModel } from '@server/models/video/video-import' | 1 | import { VideoImportModel } from '@server/models/video/video-import' |
2 | import { PickWith, PickWithOpt } from '@server/typings/utils' | 2 | import { PickWith, PickWithOpt } from '@server/types/utils' |
3 | import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video' | 3 | import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video' |
4 | import { MUser } from '../user/user' | 4 | import { MUser } from '../user/user' |
5 | 5 | ||
diff --git a/server/typings/models/video/video-playlist-element.ts b/server/types/models/video/video-playlist-element.ts index f33c76594..c50992da7 100644 --- a/server/typings/models/video/video-playlist-element.ts +++ b/server/types/models/video/video-playlist-element.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' | 1 | import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MVideoFormattable, MVideoThumbnail, MVideoUrl } from './video' | 3 | import { MVideoFormattable, MVideoThumbnail, MVideoUrl } from './video' |
4 | import { MVideoPlaylistPrivacy } from './video-playlist' | 4 | import { MVideoPlaylistPrivacy } from './video-playlist' |
5 | 5 | ||
diff --git a/server/typings/models/video/video-playlist.ts b/server/types/models/video/video-playlist.ts index 49c27f4a7..b504d1664 100644 --- a/server/typings/models/video/video-playlist.ts +++ b/server/types/models/video/video-playlist.ts | |||
@@ -3,7 +3,7 @@ import { PickWith } from '../../utils' | |||
3 | import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account' | 3 | import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account' |
4 | import { MThumbnail } from './thumbnail' | 4 | import { MThumbnail } from './thumbnail' |
5 | import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable, MChannelUrl } from './video-channels' | 5 | import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable, MChannelUrl } from './video-channels' |
6 | import { MVideoPlaylistElementLight } from '@server/typings/models/video/video-playlist-element' | 6 | import { MVideoPlaylistElementLight } from '@server/types/models/video/video-playlist-element' |
7 | 7 | ||
8 | type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M> | 8 | type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M> |
9 | 9 | ||
diff --git a/server/typings/models/video/video-rate.ts b/server/types/models/video/video-rate.ts index 64ce4965b..a7682ef31 100644 --- a/server/typings/models/video/video-rate.ts +++ b/server/types/models/video/video-rate.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { AccountVideoRateModel } from '@server/models/account/account-video-rate' | 1 | import { AccountVideoRateModel } from '@server/models/account/account-video-rate' |
2 | import { PickWith } from '@server/typings/utils' | 2 | import { PickWith } from '@server/types/utils' |
3 | import { MAccountAudience, MAccountUrl } from '../account/account' | 3 | import { MAccountAudience, MAccountUrl } from '../account/account' |
4 | import { MVideo, MVideoFormattable } from './video' | 4 | import { MVideo, MVideoFormattable } from './video' |
5 | 5 | ||
diff --git a/server/typings/models/video/video-redundancy.ts b/server/types/models/video/video-redundancy.ts index 5107aa7f4..7c7d52035 100644 --- a/server/typings/models/video/video-redundancy.ts +++ b/server/types/models/video/video-redundancy.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' | 1 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' |
2 | import { PickWith, PickWithOpt } from '@server/typings/utils' | 2 | import { PickWith, PickWithOpt } from '@server/types/utils' |
3 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' | 3 | import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist' |
4 | import { VideoFileModel } from '@server/models/video/video-file' | 4 | import { VideoFileModel } from '@server/models/video/video-file' |
5 | import { MVideoFile, MVideoFileVideo } from './video-file' | 5 | import { MVideoFile, MVideoFileVideo } from './video-file' |
diff --git a/server/typings/models/video/video-share.ts b/server/types/models/video/video-share.ts index 50ca75d26..50ca75d26 100644 --- a/server/typings/models/video/video-share.ts +++ b/server/types/models/video/video-share.ts | |||
diff --git a/server/typings/models/video/video-streaming-playlist.ts b/server/types/models/video/video-streaming-playlist.ts index 3f54aa560..3f54aa560 100644 --- a/server/typings/models/video/video-streaming-playlist.ts +++ b/server/types/models/video/video-streaming-playlist.ts | |||
diff --git a/server/typings/models/video/video.ts b/server/types/models/video/video.ts index 022a9566d..022a9566d 100644 --- a/server/typings/models/video/video.ts +++ b/server/types/models/video/video.ts | |||
diff --git a/server/typings/sequelize.ts b/server/types/sequelize.ts index 9cd83612d..9cd83612d 100644 --- a/server/typings/sequelize.ts +++ b/server/types/sequelize.ts | |||
diff --git a/server/typings/utils.ts b/server/types/utils.ts index 55500d8c4..55500d8c4 100644 --- a/server/typings/utils.ts +++ b/server/types/utils.ts | |||
diff --git a/server/typings/express.ts b/server/typings/express.d.ts index 15d445c2d..451bf9103 100644 --- a/server/typings/express.ts +++ b/server/typings/express.d.ts | |||
@@ -18,21 +18,21 @@ import { | |||
18 | MVideoShareActor, | 18 | MVideoShareActor, |
19 | MVideoThumbnail, | 19 | MVideoThumbnail, |
20 | MVideoWithRights | 20 | MVideoWithRights |
21 | } from './models' | 21 | } from '../types/models' |
22 | import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from './models/video/video-playlist' | 22 | import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from '../types/models/video/video-playlist' |
23 | import { MVideoImportDefault } from '@server/typings/models/video/video-import' | 23 | import { MVideoImportDefault } from '@server/types/models/video/video-import' |
24 | import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/typings/models' | 24 | import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/types/models' |
25 | import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/typings/models/video/video-playlist-element' | 25 | import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element' |
26 | import { MAccountVideoRateAccountVideo } from '@server/typings/models/video/video-rate' | 26 | import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate' |
27 | import { MVideoChangeOwnershipFull } from './models/video/video-change-ownership' | 27 | import { MVideoChangeOwnershipFull } from '../types/models/video/video-change-ownership' |
28 | import { MPlugin, MServer } from '@server/typings/models/server' | 28 | import { MPlugin, MServer } from '@server/types/models/server' |
29 | import { MServerBlocklist } from './models/server/server-blocklist' | 29 | import { MServerBlocklist } from '../types/models/server/server-blocklist' |
30 | import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' | 30 | import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' |
31 | import { UserRole } from '@shared/models' | 31 | import { UserRole } from '@shared/models' |
32 | import { RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' | 32 | import { RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' |
33 | 33 | ||
34 | declare module 'express' { | 34 | declare module 'express' { |
35 | interface Request { | 35 | export interface Request { |
36 | query: any | 36 | query: any |
37 | } | 37 | } |
38 | 38 | ||
diff --git a/server/typings/plugins/register-server-option.model.ts b/server/typings/plugins/register-server-option.model.ts index 8f1d66007..b4594c6cd 100644 --- a/server/typings/plugins/register-server-option.model.ts +++ b/server/typings/plugins/register-server-option.model.ts | |||
@@ -17,7 +17,7 @@ import { PluginVideoLanguageManager } from '../../../shared/models/plugins/plugi | |||
17 | import { PluginVideoLicenceManager } from '../../../shared/models/plugins/plugin-video-licence-manager.model' | 17 | import { PluginVideoLicenceManager } from '../../../shared/models/plugins/plugin-video-licence-manager.model' |
18 | import { RegisterServerHookOptions } from '../../../shared/models/plugins/register-server-hook.model' | 18 | import { RegisterServerHookOptions } from '../../../shared/models/plugins/register-server-hook.model' |
19 | import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model' | 19 | import { RegisterServerSettingOptions } from '../../../shared/models/plugins/register-server-setting.model' |
20 | import { MVideoThumbnail } from '../models' | 20 | import { MVideoThumbnail } from '../../types/models' |
21 | 21 | ||
22 | export type PeerTubeHelpers = { | 22 | export type PeerTubeHelpers = { |
23 | logger: Logger | 23 | logger: Logger |