aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/users/me.ts2
-rw-r--r--server/lib/activitypub/playlists/create-update.ts2
-rw-r--r--server/lib/activitypub/playlists/shared/object-to-model-attributes.ts2
-rw-r--r--server/models/abuse/abuse-message.ts2
-rw-r--r--server/models/abuse/abuse.ts3
-rw-r--r--server/models/abuse/video-abuse.ts2
-rw-r--r--server/models/abuse/video-comment-abuse.ts2
-rw-r--r--server/models/account/account-blocklist.ts2
-rw-r--r--server/models/account/account-video-rate.ts2
-rw-r--r--server/models/account/account.ts2
-rw-r--r--server/models/actor/actor-follow.ts2
-rw-r--r--server/models/actor/actor-image.ts2
-rw-r--r--server/models/actor/actor.ts3
-rw-r--r--server/models/application/application.ts2
-rw-r--r--server/models/oauth/oauth-client.ts2
-rw-r--r--server/models/oauth/oauth-token.ts2
-rw-r--r--server/models/redundancy/video-redundancy.ts2
-rw-r--r--server/models/server/plugin.ts2
-rw-r--r--server/models/server/server-blocklist.ts2
-rw-r--r--server/models/server/server.ts2
-rw-r--r--server/models/server/tracker.ts2
-rw-r--r--server/models/server/video-tracker.ts2
-rw-r--r--server/models/user/user-notification-setting.ts2
-rw-r--r--server/models/user/user-notification.ts2
-rw-r--r--server/models/user/user-video-history.ts2
-rw-r--r--server/models/user/user.ts2
-rw-r--r--server/models/video/schedule-video-update.ts2
-rw-r--r--server/models/video/tag.ts2
-rw-r--r--server/models/video/thumbnail.ts2
-rw-r--r--server/models/video/video-blacklist.ts2
-rw-r--r--server/models/video/video-caption.ts2
-rw-r--r--server/models/video/video-change-ownership.ts2
-rw-r--r--server/models/video/video-channel.ts5
-rw-r--r--server/models/video/video-comment.ts2
-rw-r--r--server/models/video/video-file.ts2
-rw-r--r--server/models/video/video-import.ts2
-rw-r--r--server/models/video/video-job-info.ts2
-rw-r--r--server/models/video/video-live.ts2
-rw-r--r--server/models/video/video-playlist-element.ts2
-rw-r--r--server/models/video/video-playlist.ts5
-rw-r--r--server/models/video/video-share.ts2
-rw-r--r--server/models/video/video-streaming-playlist.ts2
-rw-r--r--server/models/video/video-tag.ts2
-rw-r--r--server/models/video/video-view.ts2
-rw-r--r--server/models/video/video.ts5
-rw-r--r--server/types/models/abuse/abuse-message.ts2
-rw-r--r--server/types/models/abuse/abuse.ts2
-rw-r--r--server/types/models/account/account-blocklist.ts2
-rw-r--r--server/types/models/account/account.ts2
-rw-r--r--server/types/models/account/actor-custom-page.ts1
-rw-r--r--server/types/models/actor/actor-follow.ts2
-rw-r--r--server/types/models/actor/actor-image.ts2
-rw-r--r--server/types/models/actor/actor.ts2
-rw-r--r--server/types/models/oauth/oauth-token.ts2
-rw-r--r--server/types/models/server/server-blocklist.ts2
-rw-r--r--server/types/models/server/server.ts2
-rw-r--r--server/types/models/user/user-notification.ts2
-rw-r--r--server/types/models/user/user.ts2
-rw-r--r--server/types/models/video/thumbnail.ts2
-rw-r--r--server/types/models/video/video-blacklist.ts2
-rw-r--r--server/types/models/video/video-caption.ts2
-rw-r--r--server/types/models/video/video-change-ownership.ts4
-rw-r--r--server/types/models/video/video-channels.ts2
-rw-r--r--server/types/models/video/video-comment.ts2
-rw-r--r--server/types/models/video/video-file.ts4
-rw-r--r--server/types/models/video/video-import.ts4
-rw-r--r--server/types/models/video/video-live.ts2
-rw-r--r--server/types/models/video/video-playlist-element.ts2
-rw-r--r--server/types/models/video/video-playlist.ts4
-rw-r--r--server/types/models/video/video-rate.ts2
-rw-r--r--server/types/models/video/video-redundancy.ts8
-rw-r--r--server/types/models/video/video-share.ts2
-rw-r--r--server/types/models/video/video-streaming-playlist.ts4
-rw-r--r--server/types/models/video/video.ts2
-rw-r--r--server/types/sequelize.ts2
75 files changed, 90 insertions, 86 deletions
diff --git a/server/controllers/api/users/me.ts b/server/controllers/api/users/me.ts
index 1125771d4..127b7ca5d 100644
--- a/server/controllers/api/users/me.ts
+++ b/server/controllers/api/users/me.ts
@@ -2,7 +2,7 @@ import 'multer'
2import express from 'express' 2import express from 'express'
3import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger' 3import { auditLoggerFactory, getAuditIdFromRes, UserAuditView } from '@server/helpers/audit-logger'
4import { Hooks } from '@server/lib/plugins/hooks' 4import { Hooks } from '@server/lib/plugins/hooks'
5import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/typescript-utils'
6import { ActorImageType, UserUpdateMe, UserVideoRate as FormattedUserVideoRate } from '../../../../shared' 6import { ActorImageType, UserUpdateMe, UserVideoRate as FormattedUserVideoRate } from '../../../../shared'
7import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes' 7import { HttpStatusCode } from '../../../../shared/models/http/http-error-codes'
8import { UserVideoQuota } from '../../../../shared/models/users/user-video-quota.model' 8import { UserVideoQuota } from '../../../../shared/models/users/user-video-quota.model'
diff --git a/server/lib/activitypub/playlists/create-update.ts b/server/lib/activitypub/playlists/create-update.ts
index b152d709c..ef572c803 100644
--- a/server/lib/activitypub/playlists/create-update.ts
+++ b/server/lib/activitypub/playlists/create-update.ts
@@ -9,7 +9,7 @@ import { VideoPlaylistModel } from '@server/models/video/video-playlist'
9import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' 9import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element'
10import { FilteredModelAttributes } from '@server/types' 10import { FilteredModelAttributes } from '@server/types'
11import { MThumbnail, MVideoPlaylist, MVideoPlaylistFull, MVideoPlaylistVideosLength } from '@server/types/models' 11import { MThumbnail, MVideoPlaylist, MVideoPlaylistFull, MVideoPlaylistVideosLength } from '@server/types/models'
12import { AttributesOnly } from '@shared/core-utils' 12import { AttributesOnly } from '@shared/typescript-utils'
13import { PlaylistObject } from '@shared/models' 13import { PlaylistObject } from '@shared/models'
14import { getOrCreateAPActor } from '../actors' 14import { getOrCreateAPActor } from '../actors'
15import { crawlCollectionPage } from '../crawl' 15import { crawlCollectionPage } from '../crawl'
diff --git a/server/lib/activitypub/playlists/shared/object-to-model-attributes.ts b/server/lib/activitypub/playlists/shared/object-to-model-attributes.ts
index 70fd335bc..753b5e660 100644
--- a/server/lib/activitypub/playlists/shared/object-to-model-attributes.ts
+++ b/server/lib/activitypub/playlists/shared/object-to-model-attributes.ts
@@ -2,7 +2,7 @@ import { ACTIVITY_PUB } from '@server/initializers/constants'
2import { VideoPlaylistModel } from '@server/models/video/video-playlist' 2import { VideoPlaylistModel } from '@server/models/video/video-playlist'
3import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' 3import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element'
4import { MVideoId, MVideoPlaylistId } from '@server/types/models' 4import { MVideoId, MVideoPlaylistId } from '@server/types/models'
5import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/typescript-utils'
6import { PlaylistElementObject, PlaylistObject, VideoPlaylistPrivacy } from '@shared/models' 6import { PlaylistElementObject, PlaylistObject, VideoPlaylistPrivacy } from '@shared/models'
7 7
8function playlistObjectToDBAttributes (playlistObject: PlaylistObject, to: string[]) { 8function playlistObjectToDBAttributes (playlistObject: PlaylistObject, to: string[]) {
diff --git a/server/models/abuse/abuse-message.ts b/server/models/abuse/abuse-message.ts
index 2c5987e96..6a441a210 100644
--- a/server/models/abuse/abuse-message.ts
+++ b/server/models/abuse/abuse-message.ts
@@ -1,7 +1,7 @@
1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { isAbuseMessageValid } from '@server/helpers/custom-validators/abuses' 2import { isAbuseMessageValid } from '@server/helpers/custom-validators/abuses'
3import { MAbuseMessage, MAbuseMessageFormattable } from '@server/types/models' 3import { MAbuseMessage, MAbuseMessageFormattable } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { AbuseMessage } from '@shared/models' 5import { AbuseMessage } from '@shared/models'
6import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' 6import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account'
7import { getSort, throwIfNotValid } from '../utils' 7import { getSort, throwIfNotValid } from '../utils'
diff --git a/server/models/abuse/abuse.ts b/server/models/abuse/abuse.ts
index 3518f5c02..4344df006 100644
--- a/server/models/abuse/abuse.ts
+++ b/server/models/abuse/abuse.ts
@@ -16,7 +16,7 @@ import {
16 UpdatedAt 16 UpdatedAt
17} from 'sequelize-typescript' 17} from 'sequelize-typescript'
18import { isAbuseModerationCommentValid, isAbuseReasonValid, isAbuseStateValid } from '@server/helpers/custom-validators/abuses' 18import { isAbuseModerationCommentValid, isAbuseReasonValid, isAbuseStateValid } from '@server/helpers/custom-validators/abuses'
19import { abusePredefinedReasonsMap, AttributesOnly } from '@shared/core-utils' 19import { abusePredefinedReasonsMap } from '@shared/core-utils'
20import { 20import {
21 AbuseFilter, 21 AbuseFilter,
22 AbuseObject, 22 AbuseObject,
@@ -30,6 +30,7 @@ import {
30 UserAbuse, 30 UserAbuse,
31 UserVideoAbuse 31 UserVideoAbuse
32} from '@shared/models' 32} from '@shared/models'
33import { AttributesOnly } from '@shared/typescript-utils'
33import { ABUSE_STATES, CONSTRAINTS_FIELDS } from '../../initializers/constants' 34import { ABUSE_STATES, CONSTRAINTS_FIELDS } from '../../initializers/constants'
34import { MAbuseAdminFormattable, MAbuseAP, MAbuseFull, MAbuseReporter, MAbuseUserFormattable, MUserAccountId } from '../../types/models' 35import { MAbuseAdminFormattable, MAbuseAP, MAbuseFull, MAbuseReporter, MAbuseUserFormattable, MUserAccountId } from '../../types/models'
35import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions as AccountSummaryOptions } from '../account/account' 36import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions as AccountSummaryOptions } from '../account/account'
diff --git a/server/models/abuse/video-abuse.ts b/server/models/abuse/video-abuse.ts
index 95bff50d0..773a9ebba 100644
--- a/server/models/abuse/video-abuse.ts
+++ b/server/models/abuse/video-abuse.ts
@@ -1,5 +1,5 @@
1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly } from '@shared/typescript-utils'
3import { VideoDetails } from '@shared/models' 3import { VideoDetails } from '@shared/models'
4import { VideoModel } from '../video/video' 4import { VideoModel } from '../video/video'
5import { AbuseModel } from './abuse' 5import { AbuseModel } from './abuse'
diff --git a/server/models/abuse/video-comment-abuse.ts b/server/models/abuse/video-comment-abuse.ts
index 32cb2ca64..337aaaa58 100644
--- a/server/models/abuse/video-comment-abuse.ts
+++ b/server/models/abuse/video-comment-abuse.ts
@@ -1,5 +1,5 @@
1import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly } from '@shared/typescript-utils'
3import { VideoCommentModel } from '../video/video-comment' 3import { VideoCommentModel } from '../video/video-comment'
4import { AbuseModel } from './abuse' 4import { AbuseModel } from './abuse'
5 5
diff --git a/server/models/account/account-blocklist.ts b/server/models/account/account-blocklist.ts
index 21983428a..1162962bf 100644
--- a/server/models/account/account-blocklist.ts
+++ b/server/models/account/account-blocklist.ts
@@ -2,7 +2,7 @@ import { Op, QueryTypes } from 'sequelize'
2import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 2import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
3import { handlesToNameAndHost } from '@server/helpers/actors' 3import { handlesToNameAndHost } from '@server/helpers/actors'
4import { MAccountBlocklist, MAccountBlocklistAccounts, MAccountBlocklistFormattable } from '@server/types/models' 4import { MAccountBlocklist, MAccountBlocklistAccounts, MAccountBlocklistFormattable } from '@server/types/models'
5import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/typescript-utils'
6import { AccountBlock } from '../../../shared/models' 6import { AccountBlock } from '../../../shared/models'
7import { ActorModel } from '../actor/actor' 7import { ActorModel } from '../actor/actor'
8import { ServerModel } from '../server/server' 8import { ServerModel } from '../server/server'
diff --git a/server/models/account/account-video-rate.ts b/server/models/account/account-video-rate.ts
index ee6dbc6da..218561952 100644
--- a/server/models/account/account-video-rate.ts
+++ b/server/models/account/account-video-rate.ts
@@ -7,7 +7,7 @@ import {
7 MAccountVideoRateAccountVideo, 7 MAccountVideoRateAccountVideo,
8 MAccountVideoRateFormattable 8 MAccountVideoRateFormattable
9} from '@server/types/models/video/video-rate' 9} from '@server/types/models/video/video-rate'
10import { AttributesOnly } from '@shared/core-utils' 10import { AttributesOnly } from '@shared/typescript-utils'
11import { AccountVideoRate } from '../../../shared' 11import { AccountVideoRate } from '../../../shared'
12import { VideoRateType } from '../../../shared/models/videos' 12import { VideoRateType } from '../../../shared/models/videos'
13import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 13import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
diff --git a/server/models/account/account.ts b/server/models/account/account.ts
index 71a9b8ccb..619a598dd 100644
--- a/server/models/account/account.ts
+++ b/server/models/account/account.ts
@@ -17,7 +17,7 @@ import {
17 UpdatedAt 17 UpdatedAt
18} from 'sequelize-typescript' 18} from 'sequelize-typescript'
19import { ModelCache } from '@server/models/model-cache' 19import { ModelCache } from '@server/models/model-cache'
20import { AttributesOnly } from '@shared/core-utils' 20import { AttributesOnly } from '@shared/typescript-utils'
21import { Account, AccountSummary } from '../../../shared/models/actors' 21import { Account, AccountSummary } from '../../../shared/models/actors'
22import { isAccountDescriptionValid } from '../../helpers/custom-validators/accounts' 22import { isAccountDescriptionValid } from '../../helpers/custom-validators/accounts'
23import { CONSTRAINTS_FIELDS, SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants' 23import { CONSTRAINTS_FIELDS, SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants'
diff --git a/server/models/actor/actor-follow.ts b/server/models/actor/actor-follow.ts
index d6a2387a5..006282530 100644
--- a/server/models/actor/actor-follow.ts
+++ b/server/models/actor/actor-follow.ts
@@ -30,7 +30,7 @@ import {
30 MActorFollowFormattable, 30 MActorFollowFormattable,
31 MActorFollowSubscriptions 31 MActorFollowSubscriptions
32} from '@server/types/models' 32} from '@server/types/models'
33import { AttributesOnly } from '@shared/core-utils' 33import { AttributesOnly } from '@shared/typescript-utils'
34import { ActivityPubActorType } from '@shared/models' 34import { ActivityPubActorType } from '@shared/models'
35import { FollowState } from '../../../shared/models/actors' 35import { FollowState } from '../../../shared/models/actors'
36import { ActorFollow } from '../../../shared/models/actors/follow.model' 36import { ActorFollow } from '../../../shared/models/actors/follow.model'
diff --git a/server/models/actor/actor-image.ts b/server/models/actor/actor-image.ts
index 98a7f6fba..8edff5ab4 100644
--- a/server/models/actor/actor-image.ts
+++ b/server/models/actor/actor-image.ts
@@ -2,7 +2,7 @@ import { remove } from 'fs-extra'
2import { join } from 'path' 2import { join } from 'path'
3import { AfterDestroy, AllowNull, Column, CreatedAt, Default, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 3import { AfterDestroy, AllowNull, Column, CreatedAt, Default, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
4import { MActorImageFormattable } from '@server/types/models' 4import { MActorImageFormattable } from '@server/types/models'
5import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/typescript-utils'
6import { ActorImageType } from '@shared/models' 6import { ActorImageType } from '@shared/models'
7import { ActorImage } from '../../../shared/models/actors/actor-image.model' 7import { ActorImage } from '../../../shared/models/actors/actor-image.model'
8import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 8import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
diff --git a/server/models/actor/actor.ts b/server/models/actor/actor.ts
index cbd3f0e4a..c12dcf634 100644
--- a/server/models/actor/actor.ts
+++ b/server/models/actor/actor.ts
@@ -17,7 +17,8 @@ import {
17 UpdatedAt 17 UpdatedAt
18} from 'sequelize-typescript' 18} from 'sequelize-typescript'
19import { ModelCache } from '@server/models/model-cache' 19import { ModelCache } from '@server/models/model-cache'
20import { getLowercaseExtension, AttributesOnly } from '@shared/core-utils' 20import { getLowercaseExtension } from '@shared/core-utils'
21import { AttributesOnly } from '@shared/typescript-utils'
21import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub' 22import { ActivityIconObject, ActivityPubActorType } from '../../../shared/models/activitypub'
22import { ActorImage } from '../../../shared/models/actors/actor-image.model' 23import { ActorImage } from '../../../shared/models/actors/actor-image.model'
23import { activityPubContextify } from '../../helpers/activitypub' 24import { activityPubContextify } from '../../helpers/activitypub'
diff --git a/server/models/application/application.ts b/server/models/application/application.ts
index e3939383b..a479de5d2 100644
--- a/server/models/application/application.ts
+++ b/server/models/application/application.ts
@@ -1,6 +1,6 @@
1import memoizee from 'memoizee' 1import memoizee from 'memoizee'
2import { AllowNull, Column, Default, DefaultScope, HasOne, IsInt, Model, Table } from 'sequelize-typescript' 2import { AllowNull, Column, Default, DefaultScope, HasOne, IsInt, Model, Table } from 'sequelize-typescript'
3import { AttributesOnly } from '@shared/core-utils' 3import { AttributesOnly } from '@shared/typescript-utils'
4import { AccountModel } from '../account/account' 4import { AccountModel } from '../account/account'
5 5
6export const getServerActor = memoizee(async function () { 6export const getServerActor = memoizee(async function () {
diff --git a/server/models/oauth/oauth-client.ts b/server/models/oauth/oauth-client.ts
index 890954bdb..860fa6f53 100644
--- a/server/models/oauth/oauth-client.ts
+++ b/server/models/oauth/oauth-client.ts
@@ -1,5 +1,5 @@
1import { AllowNull, Column, CreatedAt, DataType, HasMany, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, Column, CreatedAt, DataType, HasMany, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly } from '@shared/typescript-utils'
3import { OAuthTokenModel } from './oauth-token' 3import { OAuthTokenModel } from './oauth-token'
4 4
5@Table({ 5@Table({
diff --git a/server/models/oauth/oauth-token.ts b/server/models/oauth/oauth-token.ts
index af4b0ec42..f72423190 100644
--- a/server/models/oauth/oauth-token.ts
+++ b/server/models/oauth/oauth-token.ts
@@ -15,7 +15,7 @@ import {
15import { TokensCache } from '@server/lib/auth/tokens-cache' 15import { TokensCache } from '@server/lib/auth/tokens-cache'
16import { MUserAccountId } from '@server/types/models' 16import { MUserAccountId } from '@server/types/models'
17import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' 17import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token'
18import { AttributesOnly } from '@shared/core-utils' 18import { AttributesOnly } from '@shared/typescript-utils'
19import { logger } from '../../helpers/logger' 19import { logger } from '../../helpers/logger'
20import { AccountModel } from '../account/account' 20import { AccountModel } from '../account/account'
21import { ActorModel } from '../actor/actor' 21import { ActorModel } from '../actor/actor'
diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts
index e8d79a3ab..7e4c7ddf2 100644
--- a/server/models/redundancy/video-redundancy.ts
+++ b/server/models/redundancy/video-redundancy.ts
@@ -16,7 +16,7 @@ import {
16} from 'sequelize-typescript' 16} from 'sequelize-typescript'
17import { getServerActor } from '@server/models/application/application' 17import { getServerActor } from '@server/models/application/application'
18import { MActor, MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models' 18import { MActor, MVideoForRedundancyAPI, MVideoRedundancy, MVideoRedundancyAP, MVideoRedundancyVideo } from '@server/types/models'
19import { AttributesOnly } from '@shared/core-utils' 19import { AttributesOnly } from '@shared/typescript-utils'
20import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model' 20import { VideoRedundanciesTarget } from '@shared/models/redundancy/video-redundancies-filters.model'
21import { 21import {
22 FileRedundancyInformation, 22 FileRedundancyInformation,
diff --git a/server/models/server/plugin.ts b/server/models/server/plugin.ts
index c79178782..84f7a14e4 100644
--- a/server/models/server/plugin.ts
+++ b/server/models/server/plugin.ts
@@ -1,7 +1,7 @@
1import { FindAndCountOptions, json, QueryTypes } from 'sequelize' 1import { FindAndCountOptions, json, QueryTypes } from 'sequelize'
2import { AllowNull, Column, CreatedAt, DataType, DefaultScope, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, Column, CreatedAt, DataType, DefaultScope, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { MPlugin, MPluginFormattable } from '@server/types/models' 3import { MPlugin, MPluginFormattable } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { PeerTubePlugin, PluginType, RegisterServerSettingOptions } from '../../../shared/models' 5import { PeerTubePlugin, PluginType, RegisterServerSettingOptions } from '../../../shared/models'
6import { 6import {
7 isPluginDescriptionValid, 7 isPluginDescriptionValid,
diff --git a/server/models/server/server-blocklist.ts b/server/models/server/server-blocklist.ts
index 092998db3..9f64eeb7f 100644
--- a/server/models/server/server-blocklist.ts
+++ b/server/models/server/server-blocklist.ts
@@ -1,7 +1,7 @@
1import { Op, QueryTypes } from 'sequelize' 1import { Op, QueryTypes } from 'sequelize'
2import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 2import { BelongsTo, Column, CreatedAt, ForeignKey, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
3import { MServerBlocklist, MServerBlocklistAccountServer, MServerBlocklistFormattable } from '@server/types/models' 3import { MServerBlocklist, MServerBlocklistAccountServer, MServerBlocklistFormattable } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { ServerBlock } from '@shared/models' 5import { ServerBlock } from '@shared/models'
6import { AccountModel } from '../account/account' 6import { AccountModel } from '../account/account'
7import { createSafeIn, getSort, searchAttribute } from '../utils' 7import { createSafeIn, getSort, searchAttribute } from '../utils'
diff --git a/server/models/server/server.ts b/server/models/server/server.ts
index edbe92f73..ef42de090 100644
--- a/server/models/server/server.ts
+++ b/server/models/server/server.ts
@@ -1,7 +1,7 @@
1import { Transaction } from 'sequelize' 1import { Transaction } from 'sequelize'
2import { AllowNull, Column, CreatedAt, Default, HasMany, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, Column, CreatedAt, Default, HasMany, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { MServer, MServerFormattable } from '@server/types/models/server' 3import { MServer, MServerFormattable } from '@server/types/models/server'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { isHostValid } from '../../helpers/custom-validators/servers' 5import { isHostValid } from '../../helpers/custom-validators/servers'
6import { ActorModel } from '../actor/actor' 6import { ActorModel } from '../actor/actor'
7import { throwIfNotValid } from '../utils' 7import { throwIfNotValid } from '../utils'
diff --git a/server/models/server/tracker.ts b/server/models/server/tracker.ts
index c09fdd64b..ee087c4a3 100644
--- a/server/models/server/tracker.ts
+++ b/server/models/server/tracker.ts
@@ -1,7 +1,7 @@
1import { AllowNull, BelongsToMany, Column, CreatedAt, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsToMany, Column, CreatedAt, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { Transaction } from 'sequelize/types' 2import { Transaction } from 'sequelize/types'
3import { MTracker } from '@server/types/models/server/tracker' 3import { MTracker } from '@server/types/models/server/tracker'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { VideoModel } from '../video/video' 5import { VideoModel } from '../video/video'
6import { VideoTrackerModel } from './video-tracker' 6import { VideoTrackerModel } from './video-tracker'
7 7
diff --git a/server/models/server/video-tracker.ts b/server/models/server/video-tracker.ts
index c49fbd1c6..f14f3bd7d 100644
--- a/server/models/server/video-tracker.ts
+++ b/server/models/server/video-tracker.ts
@@ -1,5 +1,5 @@
1import { Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly } from '@shared/typescript-utils'
3import { VideoModel } from '../video/video' 3import { VideoModel } from '../video/video'
4import { TrackerModel } from './tracker' 4import { TrackerModel } from './tracker'
5 5
diff --git a/server/models/user/user-notification-setting.ts b/server/models/user/user-notification-setting.ts
index bee7d7851..f03b19e41 100644
--- a/server/models/user/user-notification-setting.ts
+++ b/server/models/user/user-notification-setting.ts
@@ -14,7 +14,7 @@ import {
14} from 'sequelize-typescript' 14} from 'sequelize-typescript'
15import { TokensCache } from '@server/lib/auth/tokens-cache' 15import { TokensCache } from '@server/lib/auth/tokens-cache'
16import { MNotificationSettingFormattable } from '@server/types/models' 16import { MNotificationSettingFormattable } from '@server/types/models'
17import { AttributesOnly } from '@shared/core-utils' 17import { AttributesOnly } from '@shared/typescript-utils'
18import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model' 18import { UserNotificationSetting, UserNotificationSettingValue } from '../../../shared/models/users/user-notification-setting.model'
19import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications' 19import { isUserNotificationSettingValid } from '../../helpers/custom-validators/user-notifications'
20import { throwIfNotValid } from '../utils' 20import { throwIfNotValid } from '../utils'
diff --git a/server/models/user/user-notification.ts b/server/models/user/user-notification.ts
index 55d65d6b2..4a9a84a5b 100644
--- a/server/models/user/user-notification.ts
+++ b/server/models/user/user-notification.ts
@@ -2,7 +2,7 @@ import { FindOptions, ModelIndexesOptions, Op, WhereOptions } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
3import { uuidToShort } from '@shared/core-utils/uuid' 3import { uuidToShort } from '@shared/core-utils/uuid'
4import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user' 4import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user'
5import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/typescript-utils'
6import { UserNotification, UserNotificationType } from '../../../shared' 6import { UserNotification, UserNotificationType } from '../../../shared'
7import { isBooleanValid } from '../../helpers/custom-validators/misc' 7import { isBooleanValid } from '../../helpers/custom-validators/misc'
8import { isUserNotificationTypeValid } from '../../helpers/custom-validators/user-notifications' 8import { isUserNotificationTypeValid } from '../../helpers/custom-validators/user-notifications'
diff --git a/server/models/user/user-video-history.ts b/server/models/user/user-video-history.ts
index 1aefdf02b..6d9f2e03f 100644
--- a/server/models/user/user-video-history.ts
+++ b/server/models/user/user-video-history.ts
@@ -1,7 +1,7 @@
1import { DestroyOptions, Op, Transaction } from 'sequelize' 1import { DestroyOptions, Op, Transaction } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, ForeignKey, IsInt, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, ForeignKey, IsInt, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { MUserAccountId, MUserId } from '@server/types/models' 3import { MUserAccountId, MUserId } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { VideoModel } from '../video/video' 5import { VideoModel } from '../video/video'
6import { UserModel } from './user' 6import { UserModel } from './user'
7import { getServerActor } from '../application/application' 7import { getServerActor } from '../application/application'
diff --git a/server/models/user/user.ts b/server/models/user/user.ts
index 88c3ff528..4ad76e5bc 100644
--- a/server/models/user/user.ts
+++ b/server/models/user/user.ts
@@ -31,7 +31,7 @@ import {
31 MUserWithNotificationSetting, 31 MUserWithNotificationSetting,
32 MVideoWithRights 32 MVideoWithRights
33} from '@server/types/models' 33} from '@server/types/models'
34import { AttributesOnly } from '@shared/core-utils' 34import { AttributesOnly } from '@shared/typescript-utils'
35import { hasUserRight, USER_ROLE_LABELS } from '../../../shared/core-utils/users' 35import { hasUserRight, USER_ROLE_LABELS } from '../../../shared/core-utils/users'
36import { AbuseState, MyUser, UserRight, VideoPlaylistType, VideoPrivacy } from '../../../shared/models' 36import { AbuseState, MyUser, UserRight, VideoPlaylistType, VideoPrivacy } from '../../../shared/models'
37import { User, UserRole } from '../../../shared/models/users' 37import { User, UserRole } from '../../../shared/models/users'
diff --git a/server/models/video/schedule-video-update.ts b/server/models/video/schedule-video-update.ts
index d462c20c7..b3cf26966 100644
--- a/server/models/video/schedule-video-update.ts
+++ b/server/models/video/schedule-video-update.ts
@@ -1,7 +1,7 @@
1import { Op, Transaction } from 'sequelize' 1import { Op, Transaction } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { MScheduleVideoUpdateFormattable, MScheduleVideoUpdate } from '@server/types/models' 3import { MScheduleVideoUpdateFormattable, MScheduleVideoUpdate } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { VideoPrivacy } from '../../../shared/models/videos' 5import { VideoPrivacy } from '../../../shared/models/videos'
6import { VideoModel } from './video' 6import { VideoModel } from './video'
7 7
diff --git a/server/models/video/tag.ts b/server/models/video/tag.ts
index 61dfb224d..7900e070d 100644
--- a/server/models/video/tag.ts
+++ b/server/models/video/tag.ts
@@ -1,7 +1,7 @@
1import { col, fn, QueryTypes, Transaction } from 'sequelize' 1import { col, fn, QueryTypes, Transaction } from 'sequelize'
2import { AllowNull, BelongsToMany, Column, CreatedAt, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsToMany, Column, CreatedAt, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { MTag } from '@server/types/models' 3import { MTag } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { VideoPrivacy, VideoState } from '../../../shared/models/videos' 5import { VideoPrivacy, VideoState } from '../../../shared/models/videos'
6import { isVideoTagValid } from '../../helpers/custom-validators/videos' 6import { isVideoTagValid } from '../../helpers/custom-validators/videos'
7import { throwIfNotValid } from '../utils' 7import { throwIfNotValid } from '../utils'
diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts
index 3388478d9..05c58cf19 100644
--- a/server/models/video/thumbnail.ts
+++ b/server/models/video/thumbnail.ts
@@ -17,7 +17,7 @@ import {
17} from 'sequelize-typescript' 17} from 'sequelize-typescript'
18import { afterCommitIfTransaction } from '@server/helpers/database-utils' 18import { afterCommitIfTransaction } from '@server/helpers/database-utils'
19import { MThumbnail, MThumbnailVideo, MVideo } from '@server/types/models' 19import { MThumbnail, MThumbnailVideo, MVideo } from '@server/types/models'
20import { AttributesOnly } from '@shared/core-utils' 20import { AttributesOnly } from '@shared/typescript-utils'
21import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type' 21import { ThumbnailType } from '../../../shared/models/videos/thumbnail.type'
22import { logger } from '../../helpers/logger' 22import { logger } from '../../helpers/logger'
23import { CONFIG } from '../../initializers/config' 23import { CONFIG } from '../../initializers/config'
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts
index 98f4ec9c5..1cd8224c0 100644
--- a/server/models/video/video-blacklist.ts
+++ b/server/models/video/video-blacklist.ts
@@ -1,7 +1,7 @@
1import { FindOptions } from 'sequelize' 1import { FindOptions } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript'
3import { MVideoBlacklist, MVideoBlacklistFormattable } from '@server/types/models' 3import { MVideoBlacklist, MVideoBlacklistFormattable } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos' 5import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos'
6import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist' 6import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist'
7import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 7import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts
index 590e72e52..642613cfe 100644
--- a/server/models/video/video-caption.ts
+++ b/server/models/video/video-caption.ts
@@ -17,7 +17,7 @@ import {
17} from 'sequelize-typescript' 17} from 'sequelize-typescript'
18import { buildUUID } from '@shared/core-utils/uuid' 18import { buildUUID } from '@shared/core-utils/uuid'
19import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models' 19import { MVideo, MVideoCaption, MVideoCaptionFormattable, MVideoCaptionVideo } from '@server/types/models'
20import { AttributesOnly } from '@shared/core-utils' 20import { AttributesOnly } from '@shared/typescript-utils'
21import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model' 21import { VideoCaption } from '../../../shared/models/videos/caption/video-caption.model'
22import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions' 22import { isVideoCaptionLanguageValid } from '../../helpers/custom-validators/video-captions'
23import { logger } from '../../helpers/logger' 23import { logger } from '../../helpers/logger'
diff --git a/server/models/video/video-change-ownership.ts b/server/models/video/video-change-ownership.ts
index 7d20a954d..1a1b8c88d 100644
--- a/server/models/video/video-change-ownership.ts
+++ b/server/models/video/video-change-ownership.ts
@@ -1,6 +1,6 @@
1import { AllowNull, BelongsTo, Column, CreatedAt, ForeignKey, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsTo, Column, CreatedAt, ForeignKey, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
2import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership' 2import { MVideoChangeOwnershipFormattable, MVideoChangeOwnershipFull } from '@server/types/models/video/video-change-ownership'
3import { AttributesOnly } from '@shared/core-utils' 3import { AttributesOnly } from '@shared/typescript-utils'
4import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos' 4import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '../../../shared/models/videos'
5import { AccountModel } from '../account/account' 5import { AccountModel } from '../account/account'
6import { getSort } from '../utils' 6import { getSort } from '../utils'
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index b652d8531..2c6669bcb 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -17,8 +17,10 @@ import {
17 Table, 17 Table,
18 UpdatedAt 18 UpdatedAt
19} from 'sequelize-typescript' 19} from 'sequelize-typescript'
20import { CONFIG } from '@server/initializers/config'
20import { MAccountActor } from '@server/types/models' 21import { MAccountActor } from '@server/types/models'
21import { AttributesOnly, pick } from '@shared/core-utils' 22import { pick } from '@shared/core-utils'
23import { AttributesOnly } from '@shared/typescript-utils'
22import { ActivityPubActor } from '../../../shared/models/activitypub' 24import { ActivityPubActor } from '../../../shared/models/activitypub'
23import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos' 25import { VideoChannel, VideoChannelSummary } from '../../../shared/models/videos'
24import { 26import {
@@ -44,7 +46,6 @@ import { setAsUpdated } from '../shared'
44import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils' 46import { buildServerIdsFollowedBy, buildTrigramSearchIndex, createSimilarityAttribute, getSort, throwIfNotValid } from '../utils'
45import { VideoModel } from './video' 47import { VideoModel } from './video'
46import { VideoPlaylistModel } from './video-playlist' 48import { VideoPlaylistModel } from './video-playlist'
47import { CONFIG } from '@server/initializers/config'
48 49
49export enum ScopeNames { 50export enum ScopeNames {
50 FOR_API = 'FOR_API', 51 FOR_API = 'FOR_API',
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index c89279c65..7f28b86b4 100644
--- a/server/models/video/video-comment.ts
+++ b/server/models/video/video-comment.ts
@@ -16,7 +16,7 @@ import {
16} from 'sequelize-typescript' 16} from 'sequelize-typescript'
17import { getServerActor } from '@server/models/application/application' 17import { getServerActor } from '@server/models/application/application'
18import { MAccount, MAccountId, MUserAccountId } from '@server/types/models' 18import { MAccount, MAccountId, MUserAccountId } from '@server/types/models'
19import { AttributesOnly } from '@shared/core-utils' 19import { AttributesOnly } from '@shared/typescript-utils'
20import { VideoPrivacy } from '@shared/models' 20import { VideoPrivacy } from '@shared/models'
21import { ActivityTagObject, ActivityTombstoneObject } from '../../../shared/models/activitypub/objects/common-objects' 21import { ActivityTagObject, ActivityTombstoneObject } from '../../../shared/models/activitypub/objects/common-objects'
22import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object' 22import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object'
diff --git a/server/models/video/video-file.ts b/server/models/video/video-file.ts
index 87311c0ed..2b5ec3a20 100644
--- a/server/models/video/video-file.ts
+++ b/server/models/video/video-file.ts
@@ -26,7 +26,7 @@ import { extractVideo } from '@server/helpers/video'
26import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage' 26import { getHLSPublicFileUrl, getWebTorrentPublicFileUrl } from '@server/lib/object-storage'
27import { getFSTorrentFilePath } from '@server/lib/paths' 27import { getFSTorrentFilePath } from '@server/lib/paths'
28import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models' 28import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo, MVideoWithHost } from '@server/types/models'
29import { AttributesOnly } from '@shared/core-utils' 29import { AttributesOnly } from '@shared/typescript-utils'
30import { VideoStorage } from '@shared/models' 30import { VideoStorage } from '@shared/models'
31import { 31import {
32 isVideoFileExtnameValid, 32 isVideoFileExtnameValid,
diff --git a/server/models/video/video-import.ts b/server/models/video/video-import.ts
index 5c73fb07c..c41085ef9 100644
--- a/server/models/video/video-import.ts
+++ b/server/models/video/video-import.ts
@@ -15,7 +15,7 @@ import {
15} from 'sequelize-typescript' 15} from 'sequelize-typescript'
16import { afterCommitIfTransaction } from '@server/helpers/database-utils' 16import { afterCommitIfTransaction } from '@server/helpers/database-utils'
17import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import' 17import { MVideoImportDefault, MVideoImportFormattable } from '@server/types/models/video/video-import'
18import { AttributesOnly } from '@shared/core-utils' 18import { AttributesOnly } from '@shared/typescript-utils'
19import { VideoImport, VideoImportState } from '../../../shared' 19import { VideoImport, VideoImportState } from '../../../shared'
20import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports' 20import { isVideoImportStateValid, isVideoImportTargetUrlValid } from '../../helpers/custom-validators/video-imports'
21import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos' 21import { isVideoMagnetUriValid } from '../../helpers/custom-validators/videos'
diff --git a/server/models/video/video-job-info.ts b/server/models/video/video-job-info.ts
index 7da5128d7..6a67a214c 100644
--- a/server/models/video/video-job-info.ts
+++ b/server/models/video/video-job-info.ts
@@ -1,6 +1,6 @@
1import { Op, QueryTypes, Transaction } from 'sequelize' 1import { Op, QueryTypes, Transaction } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, IsInt, Model, Table, Unique, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, IsInt, Model, Table, Unique, UpdatedAt } from 'sequelize-typescript'
3import { AttributesOnly } from '@shared/core-utils' 3import { AttributesOnly } from '@shared/typescript-utils'
4import { VideoModel } from './video' 4import { VideoModel } from './video'
5 5
6export type VideoJobInfoColumnType = 'pendingMove' | 'pendingTranscode' 6export type VideoJobInfoColumnType = 'pendingMove' | 'pendingTranscode'
diff --git a/server/models/video/video-live.ts b/server/models/video/video-live.ts
index 0bc8da022..e3fdcc0ba 100644
--- a/server/models/video/video-live.ts
+++ b/server/models/video/video-live.ts
@@ -1,7 +1,7 @@
1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { AllowNull, BelongsTo, Column, CreatedAt, DataType, DefaultScope, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { WEBSERVER } from '@server/initializers/constants' 2import { WEBSERVER } from '@server/initializers/constants'
3import { MVideoLive, MVideoLiveVideo } from '@server/types/models' 3import { MVideoLive, MVideoLiveVideo } from '@server/types/models'
4import { AttributesOnly } from '@shared/core-utils' 4import { AttributesOnly } from '@shared/typescript-utils'
5import { LiveVideo, VideoState } from '@shared/models' 5import { LiveVideo, VideoState } from '@shared/models'
6import { VideoModel } from './video' 6import { VideoModel } from './video'
7import { VideoBlacklistModel } from './video-blacklist' 7import { VideoBlacklistModel } from './video-blacklist'
diff --git a/server/models/video/video-playlist-element.ts b/server/models/video/video-playlist-element.ts
index a87b2bcae..e20e32f8b 100644
--- a/server/models/video/video-playlist-element.ts
+++ b/server/models/video/video-playlist-element.ts
@@ -32,7 +32,7 @@ import { AccountModel } from '../account/account'
32import { getSort, throwIfNotValid } from '../utils' 32import { getSort, throwIfNotValid } from '../utils'
33import { ForAPIOptions, ScopeNames as VideoScopeNames, VideoModel } from './video' 33import { ForAPIOptions, ScopeNames as VideoScopeNames, VideoModel } from './video'
34import { VideoPlaylistModel } from './video-playlist' 34import { VideoPlaylistModel } from './video-playlist'
35import { AttributesOnly } from '@shared/core-utils' 35import { AttributesOnly } from '@shared/typescript-utils'
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 d0c73cbd1..132fa0e68 100644
--- a/server/models/video/video-playlist.ts
+++ b/server/models/video/video-playlist.ts
@@ -17,9 +17,10 @@ import {
17 Table, 17 Table,
18 UpdatedAt 18 UpdatedAt
19} from 'sequelize-typescript' 19} from 'sequelize-typescript'
20import { buildUUID, uuidToShort } from '@shared/core-utils/uuid'
21import { MAccountId, MChannelId } from '@server/types/models' 20import { MAccountId, MChannelId } from '@server/types/models'
22import { AttributesOnly, buildPlaylistEmbedPath, buildPlaylistWatchPath, pick } from '@shared/core-utils' 21import { buildPlaylistEmbedPath, buildPlaylistWatchPath, pick } from '@shared/core-utils'
22import { buildUUID, uuidToShort } from '@shared/core-utils/uuid'
23import { AttributesOnly } from '@shared/typescript-utils'
23import { ActivityIconObject } from '../../../shared/models/activitypub/objects' 24import { ActivityIconObject } from '../../../shared/models/activitypub/objects'
24import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object' 25import { PlaylistObject } from '../../../shared/models/activitypub/objects/playlist-object'
25import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model' 26import { VideoPlaylistPrivacy } from '../../../shared/models/videos/playlist/video-playlist-privacy.model'
diff --git a/server/models/video/video-share.ts b/server/models/video/video-share.ts
index 505c305e2..f6659b992 100644
--- a/server/models/video/video-share.ts
+++ b/server/models/video/video-share.ts
@@ -1,6 +1,6 @@
1import { literal, Op, QueryTypes, Transaction } from 'sequelize' 1import { literal, Op, QueryTypes, Transaction } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
3import { AttributesOnly } from '@shared/core-utils' 3import { AttributesOnly } from '@shared/typescript-utils'
4import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc' 4import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
5import { CONSTRAINTS_FIELDS } from '../../initializers/constants' 5import { CONSTRAINTS_FIELDS } from '../../initializers/constants'
6import { MActorDefault } from '../../types/models' 6import { MActorDefault } from '../../types/models'
diff --git a/server/models/video/video-streaming-playlist.ts b/server/models/video/video-streaming-playlist.ts
index 23b3fbcbe..d813f89b5 100644
--- a/server/models/video/video-streaming-playlist.ts
+++ b/server/models/video/video-streaming-playlist.ts
@@ -18,7 +18,7 @@ import {
18import { getHLSPublicFileUrl } from '@server/lib/object-storage' 18import { getHLSPublicFileUrl } from '@server/lib/object-storage'
19import { VideoFileModel } from '@server/models/video/video-file' 19import { VideoFileModel } from '@server/models/video/video-file'
20import { MStreamingPlaylist, MVideo } from '@server/types/models' 20import { MStreamingPlaylist, MVideo } from '@server/types/models'
21import { AttributesOnly } from '@shared/core-utils' 21import { AttributesOnly } from '@shared/typescript-utils'
22import { VideoStorage } from '@shared/models' 22import { VideoStorage } from '@shared/models'
23import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type' 23import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
24import { sha1 } from '@shared/core-utils/crypto' 24import { sha1 } from '@shared/core-utils/crypto'
diff --git a/server/models/video/video-tag.ts b/server/models/video/video-tag.ts
index 1285d375b..7e880c968 100644
--- a/server/models/video/video-tag.ts
+++ b/server/models/video/video-tag.ts
@@ -1,5 +1,5 @@
1import { Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' 1import { Column, CreatedAt, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript'
2import { AttributesOnly } from '@shared/core-utils' 2import { AttributesOnly } from '@shared/typescript-utils'
3import { TagModel } from './tag' 3import { TagModel } from './tag'
4import { VideoModel } from './video' 4import { VideoModel } from './video'
5 5
diff --git a/server/models/video/video-view.ts b/server/models/video/video-view.ts
index b51f0f84d..d72df100f 100644
--- a/server/models/video/video-view.ts
+++ b/server/models/video/video-view.ts
@@ -1,6 +1,6 @@
1import { literal, Op } from 'sequelize' 1import { literal, Op } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Model, Table } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, DataType, ForeignKey, Model, Table } from 'sequelize-typescript'
3import { AttributesOnly } from '@shared/core-utils' 3import { AttributesOnly } from '@shared/typescript-utils'
4import { VideoModel } from './video' 4import { VideoModel } from './video'
5 5
6@Table({ 6@Table({
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index efd4d8462..a99b012b9 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -25,7 +25,6 @@ import {
25 UpdatedAt 25 UpdatedAt
26} from 'sequelize-typescript' 26} from 'sequelize-typescript'
27import { buildNSFWFilter } from '@server/helpers/express-utils' 27import { buildNSFWFilter } from '@server/helpers/express-utils'
28import { uuidToShort } from '@shared/core-utils/uuid'
29import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video' 28import { getPrivaciesForFederation, isPrivacyForFederation, isStateForFederation } from '@server/helpers/video'
30import { LiveManager } from '@server/lib/live/live-manager' 29import { LiveManager } from '@server/lib/live/live-manager'
31import { removeHLSObjectStorage, removeWebTorrentObjectStorage } from '@server/lib/object-storage' 30import { removeHLSObjectStorage, removeWebTorrentObjectStorage } from '@server/lib/object-storage'
@@ -33,8 +32,10 @@ import { getHLSDirectory, getHLSRedundancyDirectory } from '@server/lib/paths'
33import { VideoPathManager } from '@server/lib/video-path-manager' 32import { VideoPathManager } from '@server/lib/video-path-manager'
34import { getServerActor } from '@server/models/application/application' 33import { getServerActor } from '@server/models/application/application'
35import { ModelCache } from '@server/models/model-cache' 34import { ModelCache } from '@server/models/model-cache'
36import { AttributesOnly, buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils' 35import { buildVideoEmbedPath, buildVideoWatchPath, pick } from '@shared/core-utils'
36import { uuidToShort } from '@shared/core-utils/uuid'
37import { VideoFile, VideoInclude } from '@shared/models' 37import { VideoFile, VideoInclude } from '@shared/models'
38import { AttributesOnly } from '@shared/typescript-utils'
38import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared' 39import { ResultList, UserRight, VideoPrivacy, VideoState } from '../../../shared'
39import { VideoObject } from '../../../shared/models/activitypub/objects' 40import { VideoObject } from '../../../shared/models/activitypub/objects'
40import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos' 41import { Video, VideoDetails, VideoRateType, VideoStorage } from '../../../shared/models/videos'
diff --git a/server/types/models/abuse/abuse-message.ts b/server/types/models/abuse/abuse-message.ts
index 565eca706..2d7d09316 100644
--- a/server/types/models/abuse/abuse-message.ts
+++ b/server/types/models/abuse/abuse-message.ts
@@ -1,5 +1,5 @@
1import { AbuseMessageModel } from '@server/models/abuse/abuse-message' 1import { AbuseMessageModel } from '@server/models/abuse/abuse-message'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { AbuseModel } from '../../../models/abuse/abuse' 3import { AbuseModel } from '../../../models/abuse/abuse'
4import { MAccountFormattable } from '../account' 4import { MAccountFormattable } from '../account'
5 5
diff --git a/server/types/models/abuse/abuse.ts b/server/types/models/abuse/abuse.ts
index 6fd83684c..1b45b3879 100644
--- a/server/types/models/abuse/abuse.ts
+++ b/server/types/models/abuse/abuse.ts
@@ -1,7 +1,7 @@
1import { VideoAbuseModel } from '@server/models/abuse/video-abuse' 1import { VideoAbuseModel } from '@server/models/abuse/video-abuse'
2import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse' 2import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse'
3import { VideoCommentModel } from '@server/models/video/video-comment' 3import { VideoCommentModel } from '@server/models/video/video-comment'
4import { PickWith } from '@shared/core-utils' 4import { PickWith } from '@shared/typescript-utils'
5import { AbuseModel } from '../../../models/abuse/abuse' 5import { AbuseModel } from '../../../models/abuse/abuse'
6import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account' 6import { MAccountDefault, MAccountFormattable, MAccountLight, MAccountUrl } from '../account'
7import { MComment, MCommentOwner, MCommentUrl, MCommentVideo, MVideoUrl } from '../video' 7import { MComment, MCommentOwner, MCommentUrl, MCommentVideo, MVideoUrl } from '../video'
diff --git a/server/types/models/account/account-blocklist.ts b/server/types/models/account/account-blocklist.ts
index 3126fd0ab..9dae10915 100644
--- a/server/types/models/account/account-blocklist.ts
+++ b/server/types/models/account/account-blocklist.ts
@@ -1,5 +1,5 @@
1import { AccountBlocklistModel } from '../../../models/account/account-blocklist' 1import { AccountBlocklistModel } from '../../../models/account/account-blocklist'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MAccountDefault, MAccountFormattable } from './account' 3import { MAccountDefault, MAccountFormattable } from './account'
4 4
5type Use<K extends keyof AccountBlocklistModel, M> = PickWith<AccountBlocklistModel, K, M> 5type Use<K extends keyof AccountBlocklistModel, M> = PickWith<AccountBlocklistModel, K, M>
diff --git a/server/types/models/account/account.ts b/server/types/models/account/account.ts
index 71f6c79aa..282a2971b 100644
--- a/server/types/models/account/account.ts
+++ b/server/types/models/account/account.ts
@@ -1,4 +1,4 @@
1import { FunctionProperties, PickWith } from '@shared/core-utils' 1import { FunctionProperties, PickWith } from '@shared/typescript-utils'
2import { AccountModel } from '../../../models/account/account' 2import { AccountModel } from '../../../models/account/account'
3import { 3import {
4 MActor, 4 MActor,
diff --git a/server/types/models/account/actor-custom-page.ts b/server/types/models/account/actor-custom-page.ts
index 2cb8aa7e4..fcd8069be 100644
--- a/server/types/models/account/actor-custom-page.ts
+++ b/server/types/models/account/actor-custom-page.ts
@@ -1,4 +1,3 @@
1
2import { ActorCustomPageModel } from '../../../models/account/actor-custom-page' 1import { ActorCustomPageModel } from '../../../models/account/actor-custom-page'
3 2
4export type MActorCustomPage = Omit<ActorCustomPageModel, 'Actor'> 3export type MActorCustomPage = Omit<ActorCustomPageModel, 'Actor'>
diff --git a/server/types/models/actor/actor-follow.ts b/server/types/models/actor/actor-follow.ts
index 98a6ca8a5..338158561 100644
--- a/server/types/models/actor/actor-follow.ts
+++ b/server/types/models/actor/actor-follow.ts
@@ -1,4 +1,4 @@
1import { PickWith } from '@shared/core-utils' 1import { PickWith } from '@shared/typescript-utils'
2import { ActorFollowModel } from '../../../models/actor/actor-follow' 2import { ActorFollowModel } from '../../../models/actor/actor-follow'
3import { 3import {
4 MActor, 4 MActor,
diff --git a/server/types/models/actor/actor-image.ts b/server/types/models/actor/actor-image.ts
index 89adb01ae..521b4cc59 100644
--- a/server/types/models/actor/actor-image.ts
+++ b/server/types/models/actor/actor-image.ts
@@ -1,4 +1,4 @@
1import { FunctionProperties } from '@shared/core-utils' 1import { FunctionProperties } from '@shared/typescript-utils'
2import { ActorImageModel } from '../../../models/actor/actor-image' 2import { ActorImageModel } from '../../../models/actor/actor-image'
3 3
4export type MActorImage = ActorImageModel 4export type MActorImage = ActorImageModel
diff --git a/server/types/models/actor/actor.ts b/server/types/models/actor/actor.ts
index b3a70cbce..9ce97094f 100644
--- a/server/types/models/actor/actor.ts
+++ b/server/types/models/actor/actor.ts
@@ -1,4 +1,4 @@
1import { FunctionProperties, PickWith, PickWithOpt } from '@shared/core-utils' 1import { FunctionProperties, PickWith, PickWithOpt } from '@shared/typescript-utils'
2import { ActorModel } from '../../../models/actor/actor' 2import { ActorModel } from '../../../models/actor/actor'
3import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from '../account' 3import { MAccount, MAccountDefault, MAccountId, MAccountIdActor } from '../account'
4import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server' 4import { MServer, MServerHost, MServerHostBlocks, MServerRedundancyAllowed } from '../server'
diff --git a/server/types/models/oauth/oauth-token.ts b/server/types/models/oauth/oauth-token.ts
index 8399af8f1..6af087e3c 100644
--- a/server/types/models/oauth/oauth-token.ts
+++ b/server/types/models/oauth/oauth-token.ts
@@ -1,5 +1,5 @@
1import { OAuthTokenModel } from '@server/models/oauth/oauth-token' 1import { OAuthTokenModel } from '@server/models/oauth/oauth-token'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MUserAccountUrl } from '../user/user' 3import { MUserAccountUrl } from '../user/user'
4 4
5type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M> 5type Use<K extends keyof OAuthTokenModel, M> = PickWith<OAuthTokenModel, K, M>
diff --git a/server/types/models/server/server-blocklist.ts b/server/types/models/server/server-blocklist.ts
index 801f179fd..71a4ea963 100644
--- a/server/types/models/server/server-blocklist.ts
+++ b/server/types/models/server/server-blocklist.ts
@@ -1,5 +1,5 @@
1import { ServerBlocklistModel } from '@server/models/server/server-blocklist' 1import { ServerBlocklistModel } from '@server/models/server/server-blocklist'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MAccountDefault, MAccountFormattable } from '../account/account' 3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MServer, MServerFormattable } from './server' 4import { MServer, MServerFormattable } from './server'
5 5
diff --git a/server/types/models/server/server.ts b/server/types/models/server/server.ts
index 876186fc0..0b16186cd 100644
--- a/server/types/models/server/server.ts
+++ b/server/types/models/server/server.ts
@@ -1,5 +1,5 @@
1import { FunctionProperties, PickWith } from '@shared/typescript-utils'
1import { ServerModel } from '../../../models/server/server' 2import { ServerModel } from '../../../models/server/server'
2import { FunctionProperties, PickWith } from '@shared/core-utils'
3import { MAccountBlocklistId } from '../account' 3import { MAccountBlocklistId } from '../account'
4 4
5type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M> 5type Use<K extends keyof ServerModel, M> = PickWith<ServerModel, K, M>
diff --git a/server/types/models/user/user-notification.ts b/server/types/models/user/user-notification.ts
index 918614dd1..db9ec0400 100644
--- a/server/types/models/user/user-notification.ts
+++ b/server/types/models/user/user-notification.ts
@@ -3,7 +3,7 @@ import { VideoCommentAbuseModel } from '@server/models/abuse/video-comment-abuse
3import { ApplicationModel } from '@server/models/application/application' 3import { ApplicationModel } from '@server/models/application/application'
4import { PluginModel } from '@server/models/server/plugin' 4import { PluginModel } from '@server/models/server/plugin'
5import { UserNotificationModel } from '@server/models/user/user-notification' 5import { UserNotificationModel } from '@server/models/user/user-notification'
6import { PickWith, PickWithOpt } from '@shared/core-utils' 6import { PickWith, PickWithOpt } from '@shared/typescript-utils'
7import { AbuseModel } from '../../../models/abuse/abuse' 7import { AbuseModel } from '../../../models/abuse/abuse'
8import { AccountModel } from '../../../models/account/account' 8import { AccountModel } from '../../../models/account/account'
9import { ActorModel } from '../../../models/actor/actor' 9import { ActorModel } from '../../../models/actor/actor'
diff --git a/server/types/models/user/user.ts b/server/types/models/user/user.ts
index f79220e11..89092c242 100644
--- a/server/types/models/user/user.ts
+++ b/server/types/models/user/user.ts
@@ -1,7 +1,7 @@
1import { AccountModel } from '@server/models/account/account' 1import { AccountModel } from '@server/models/account/account'
2import { UserModel } from '@server/models/user/user' 2import { UserModel } from '@server/models/user/user'
3import { MVideoPlaylist } from '@server/types/models' 3import { MVideoPlaylist } from '@server/types/models'
4import { PickWith, PickWithOpt } from '@shared/core-utils' 4import { PickWith, PickWithOpt } from '@shared/typescript-utils'
5import { 5import {
6 MAccount, 6 MAccount,
7 MAccountDefault, 7 MAccountDefault,
diff --git a/server/types/models/video/thumbnail.ts b/server/types/models/video/thumbnail.ts
index 81a29e062..c3b27681f 100644
--- a/server/types/models/video/thumbnail.ts
+++ b/server/types/models/video/thumbnail.ts
@@ -1,4 +1,4 @@
1import { PickWith } from '@shared/core-utils' 1import { PickWith } from '@shared/typescript-utils'
2import { ThumbnailModel } from '../../../models/video/thumbnail' 2import { ThumbnailModel } from '../../../models/video/thumbnail'
3import { MVideo } from './video' 3import { MVideo } from './video'
4 4
diff --git a/server/types/models/video/video-blacklist.ts b/server/types/models/video/video-blacklist.ts
index 2ac912405..048b63bd2 100644
--- a/server/types/models/video/video-blacklist.ts
+++ b/server/types/models/video/video-blacklist.ts
@@ -1,5 +1,5 @@
1import { PickWith } from '@shared/typescript-utils'
1import { VideoBlacklistModel } from '../../../models/video/video-blacklist' 2import { VideoBlacklistModel } from '../../../models/video/video-blacklist'
2import { PickWith } from '@shared/core-utils'
3import { MVideo, MVideoFormattable } from './video' 3import { MVideo, MVideoFormattable } from './video'
4 4
5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M> 5type Use<K extends keyof VideoBlacklistModel, M> = PickWith<VideoBlacklistModel, K, M>
diff --git a/server/types/models/video/video-caption.ts b/server/types/models/video/video-caption.ts
index 1f761a866..8cd801064 100644
--- a/server/types/models/video/video-caption.ts
+++ b/server/types/models/video/video-caption.ts
@@ -1,4 +1,4 @@
1import { PickWith } from '@shared/core-utils' 1import { PickWith } from '@shared/typescript-utils'
2import { VideoCaptionModel } from '../../../models/video/video-caption' 2import { VideoCaptionModel } from '../../../models/video/video-caption'
3import { MVideo, MVideoUUID } from './video' 3import { MVideo, MVideoUUID } from './video'
4 4
diff --git a/server/types/models/video/video-change-ownership.ts b/server/types/models/video/video-change-ownership.ts
index 6cad48e4a..d99f25071 100644
--- a/server/types/models/video/video-change-ownership.ts
+++ b/server/types/models/video/video-change-ownership.ts
@@ -1,7 +1,7 @@
1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership' 1import { VideoChangeOwnershipModel } from '@server/models/video/video-change-ownership'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MAccountDefault, MAccountFormattable } from '../account/account' 3import { MAccountDefault, MAccountFormattable } from '../account/account'
4import { MVideoWithAllFiles, MVideoFormattable } from './video' 4import { MVideoFormattable, MVideoWithAllFiles } from './video'
5 5
6type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M> 6type Use<K extends keyof VideoChangeOwnershipModel, M> = PickWith<VideoChangeOwnershipModel, K, M>
7 7
diff --git a/server/types/models/video/video-channels.ts b/server/types/models/video/video-channels.ts
index c147567d9..af8c2ffe4 100644
--- a/server/types/models/video/video-channels.ts
+++ b/server/types/models/video/video-channels.ts
@@ -1,4 +1,4 @@
1import { FunctionProperties, PickWith, PickWithOpt } from '@shared/core-utils' 1import { FunctionProperties, PickWith, PickWithOpt } from '@shared/typescript-utils'
2import { VideoChannelModel } from '../../../models/video/video-channel' 2import { VideoChannelModel } from '../../../models/video/video-channel'
3import { 3import {
4 MAccountActor, 4 MAccountActor,
diff --git a/server/types/models/video/video-comment.ts b/server/types/models/video/video-comment.ts
index 83479e7b2..b66de064f 100644
--- a/server/types/models/video/video-comment.ts
+++ b/server/types/models/video/video-comment.ts
@@ -1,4 +1,4 @@
1import { PickWith, PickWithOpt } from '@shared/core-utils' 1import { PickWith, PickWithOpt } from '@shared/typescript-utils'
2import { VideoCommentModel } from '../../../models/video/video-comment' 2import { VideoCommentModel } from '../../../models/video/video-comment'
3import { MAccountDefault, MAccountFormattable, MAccountUrl } from '../account' 3import { MAccountDefault, MAccountFormattable, MAccountUrl } from '../account'
4import { MVideo, MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } from './video' 4import { MVideo, MVideoAccountLight, MVideoFeed, MVideoIdUrl, MVideoUrl } from './video'
diff --git a/server/types/models/video/video-file.ts b/server/types/models/video/video-file.ts
index 327a148ce..55603e59c 100644
--- a/server/types/models/video/video-file.ts
+++ b/server/types/models/video/video-file.ts
@@ -1,8 +1,8 @@
1import { PickWith, PickWithOpt } from '@shared/typescript-utils'
1import { VideoFileModel } from '../../../models/video/video-file' 2import { VideoFileModel } from '../../../models/video/video-file'
2import { PickWith, PickWithOpt } from '@shared/core-utils'
3import { MVideo, MVideoUUID } from './video' 3import { MVideo, MVideoUUID } from './video'
4import { MVideoRedundancy, MVideoRedundancyFileUrl } from './video-redundancy' 4import { MVideoRedundancy, MVideoRedundancyFileUrl } from './video-redundancy'
5import { MStreamingPlaylistVideo, MStreamingPlaylist } from './video-streaming-playlist' 5import { MStreamingPlaylist, MStreamingPlaylistVideo } from './video-streaming-playlist'
6 6
7type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M> 7type Use<K extends keyof VideoFileModel, M> = PickWith<VideoFileModel, K, M>
8 8
diff --git a/server/types/models/video/video-import.ts b/server/types/models/video/video-import.ts
index 759b13c6e..650c293f7 100644
--- a/server/types/models/video/video-import.ts
+++ b/server/types/models/video/video-import.ts
@@ -1,7 +1,7 @@
1import { VideoImportModel } from '@server/models/video/video-import' 1import { VideoImportModel } from '@server/models/video/video-import'
2import { PickWith, PickWithOpt } from '@shared/core-utils' 2import { PickWith, PickWithOpt } from '@shared/typescript-utils'
3import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video'
4import { MUser } from '../user/user' 3import { MUser } from '../user/user'
4import { MVideo, MVideoAccountLight, MVideoFormattable, MVideoTag, MVideoThumbnail, MVideoWithFile } from './video'
5 5
6type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M> 6type Use<K extends keyof VideoImportModel, M> = PickWith<VideoImportModel, K, M>
7 7
diff --git a/server/types/models/video/video-live.ts b/server/types/models/video/video-live.ts
index 346052417..903cea982 100644
--- a/server/types/models/video/video-live.ts
+++ b/server/types/models/video/video-live.ts
@@ -1,5 +1,5 @@
1import { VideoLiveModel } from '@server/models/video/video-live' 1import { VideoLiveModel } from '@server/models/video/video-live'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MVideo } from './video' 3import { MVideo } from './video'
4 4
5type Use<K extends keyof VideoLiveModel, M> = PickWith<VideoLiveModel, K, M> 5type Use<K extends keyof VideoLiveModel, M> = PickWith<VideoLiveModel, K, M>
diff --git a/server/types/models/video/video-playlist-element.ts b/server/types/models/video/video-playlist-element.ts
index f46ff4d49..eae676096 100644
--- a/server/types/models/video/video-playlist-element.ts
+++ b/server/types/models/video/video-playlist-element.ts
@@ -1,5 +1,5 @@
1import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element' 1import { VideoPlaylistElementModel } from '@server/models/video/video-playlist-element'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MVideoFormattable, MVideoThumbnail, MVideoUrl } from './video' 3import { MVideoFormattable, MVideoThumbnail, MVideoUrl } from './video'
4import { MVideoPlaylistPrivacy } from './video-playlist' 4import { MVideoPlaylistPrivacy } from './video-playlist'
5 5
diff --git a/server/types/models/video/video-playlist.ts b/server/types/models/video/video-playlist.ts
index 2f9537cf5..33fe5416a 100644
--- a/server/types/models/video/video-playlist.ts
+++ b/server/types/models/video/video-playlist.ts
@@ -1,9 +1,9 @@
1import { MVideoPlaylistElementLight } from '@server/types/models/video/video-playlist-element'
2import { PickWith } from '@shared/typescript-utils'
1import { VideoPlaylistModel } from '../../../models/video/video-playlist' 3import { VideoPlaylistModel } from '../../../models/video/video-playlist'
2import { PickWith } from '@shared/core-utils'
3import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account' 4import { MAccount, MAccountDefault, MAccountSummary, MAccountSummaryFormattable } from '../account'
4import { MThumbnail } from './thumbnail' 5import { MThumbnail } from './thumbnail'
5import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable, MChannelUrl } from './video-channels' 6import { MChannelDefault, MChannelSummary, MChannelSummaryFormattable, MChannelUrl } from './video-channels'
6import { MVideoPlaylistElementLight } from '@server/types/models/video/video-playlist-element'
7 7
8type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M> 8type Use<K extends keyof VideoPlaylistModel, M> = PickWith<VideoPlaylistModel, K, M>
9 9
diff --git a/server/types/models/video/video-rate.ts b/server/types/models/video/video-rate.ts
index 7bd54f7b0..0dbdf3c41 100644
--- a/server/types/models/video/video-rate.ts
+++ b/server/types/models/video/video-rate.ts
@@ -1,5 +1,5 @@
1import { AccountVideoRateModel } from '@server/models/account/account-video-rate' 1import { AccountVideoRateModel } from '@server/models/account/account-video-rate'
2import { PickWith } from '@shared/core-utils' 2import { PickWith } from '@shared/typescript-utils'
3import { MAccountAudience, MAccountUrl } from '../account/account' 3import { MAccountAudience, MAccountUrl } from '../account/account'
4import { MVideo, MVideoFormattable } from './video' 4import { MVideo, MVideoFormattable } from './video'
5 5
diff --git a/server/types/models/video/video-redundancy.ts b/server/types/models/video/video-redundancy.ts
index 411375c81..e2a9beb93 100644
--- a/server/types/models/video/video-redundancy.ts
+++ b/server/types/models/video/video-redundancy.ts
@@ -1,10 +1,10 @@
1import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
2import { PickWith, PickWithOpt } from '@shared/core-utils'
3import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
4import { VideoFileModel } from '@server/models/video/video-file' 1import { VideoFileModel } from '@server/models/video/video-file'
2import { VideoStreamingPlaylistModel } from '@server/models/video/video-streaming-playlist'
3import { PickWith, PickWithOpt } from '@shared/typescript-utils'
4import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy'
5import { MVideoUrl } from './video'
5import { MVideoFile, MVideoFileVideo } from './video-file' 6import { MVideoFile, MVideoFileVideo } from './video-file'
6import { MStreamingPlaylistVideo } from './video-streaming-playlist' 7import { MStreamingPlaylistVideo } from './video-streaming-playlist'
7import { MVideoUrl } from './video'
8 8
9type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M> 9type Use<K extends keyof VideoRedundancyModel, M> = PickWith<VideoRedundancyModel, K, M>
10 10
diff --git a/server/types/models/video/video-share.ts b/server/types/models/video/video-share.ts
index 78f44e58c..ffc0edad6 100644
--- a/server/types/models/video/video-share.ts
+++ b/server/types/models/video/video-share.ts
@@ -1,4 +1,4 @@
1import { PickWith } from '@shared/core-utils' 1import { PickWith } from '@shared/typescript-utils'
2import { VideoShareModel } from '../../../models/video/video-share' 2import { VideoShareModel } from '../../../models/video/video-share'
3import { MActorDefault } from '../actor' 3import { MActorDefault } from '../actor'
4import { MVideo } from './video' 4import { MVideo } from './video'
diff --git a/server/types/models/video/video-streaming-playlist.ts b/server/types/models/video/video-streaming-playlist.ts
index 1e4dccb8e..1c2f83489 100644
--- a/server/types/models/video/video-streaming-playlist.ts
+++ b/server/types/models/video/video-streaming-playlist.ts
@@ -1,8 +1,8 @@
1import { PickWith, PickWithOpt } from '@shared/typescript-utils'
1import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist' 2import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist'
2import { PickWith, PickWithOpt } from '@shared/core-utils'
3import { MVideoRedundancyFileUrl, MVideoRedundancy } from './video-redundancy'
4import { MVideo } from './video' 3import { MVideo } from './video'
5import { MVideoFile } from './video-file' 4import { MVideoFile } from './video-file'
5import { MVideoRedundancy, MVideoRedundancyFileUrl } from './video-redundancy'
6 6
7type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M> 7type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M>
8 8
diff --git a/server/types/models/video/video.ts b/server/types/models/video/video.ts
index 9a6b27888..d1af53b92 100644
--- a/server/types/models/video/video.ts
+++ b/server/types/models/video/video.ts
@@ -1,4 +1,4 @@
1import { PickWith, PickWithOpt } from '@shared/core-utils' 1import { PickWith, PickWithOpt } from '@shared/typescript-utils'
2import { VideoModel } from '../../../models/video/video' 2import { VideoModel } from '../../../models/video/video'
3import { MTrackerUrl } from '../server/tracker' 3import { MTrackerUrl } from '../server/tracker'
4import { MUserVideoHistoryTime } from '../user/user-video-history' 4import { MUserVideoHistoryTime } from '../user/user-video-history'
diff --git a/server/types/sequelize.ts b/server/types/sequelize.ts
index 535113d01..e399c3d5d 100644
--- a/server/types/sequelize.ts
+++ b/server/types/sequelize.ts
@@ -1,4 +1,4 @@
1import { AttributesOnly } from '@shared/core-utils' 1import { AttributesOnly } from '@shared/typescript-utils'
2import { Model } from 'sequelize' 2import { Model } from 'sequelize'
3 3
4// Thanks to sequelize-typescript: https://github.com/RobinBuschmann/sequelize-typescript 4// Thanks to sequelize-typescript: https://github.com/RobinBuschmann/sequelize-typescript