diff options
Diffstat (limited to 'server/models')
33 files changed, 42 insertions, 42 deletions
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' |