aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-31 14:34:36 +0200
committerChocobozzz <me@florianbigard.com>2023-08-11 15:02:33 +0200
commit3a4992633ee62d5edfbb484d9c6bcb3cf158489d (patch)
treee4510b39bdac9c318fdb4b47018d08f15368b8f0 /client/src/app/shared
parent04d1da5621d25d59bd5fa1543b725c497bf5d9a8 (diff)
downloadPeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.tar.gz
PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.tar.zst
PeerTube-3a4992633ee62d5edfbb484d9c6bcb3cf158489d.zip
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge conflicts, but it's a major step forward: * Server can be faster at startup because imports() are async and we can easily lazy import big modules * Angular doesn't seem to support ES import (with .js extension), so we had to correctly organize peertube into a monorepo: * Use yarn workspace feature * Use typescript reference projects for dependencies * Shared projects have been moved into "packages", each one is now a node module (with a dedicated package.json/tsconfig.json) * server/tools have been moved into apps/ and is now a dedicated app bundled and published on NPM so users don't have to build peertube cli tools manually * server/tests have been moved into packages/ so we don't compile them every time we want to run the server * Use isolatedModule option: * Had to move from const enum to const (https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums) * Had to explictely specify "type" imports when used in decorators * Prefer tsx (that uses esbuild under the hood) instead of ts-node to load typescript files (tests with mocha or scripts): * To reduce test complexity as esbuild doesn't support decorator metadata, we only test server files that do not import server models * We still build tests files into js files for a faster CI * Remove unmaintained peertube CLI import script * Removed some barrels to speed up execution (less imports)
Diffstat (limited to 'client/src/app/shared')
-rw-r--r--client/src/app/shared/form-validators/video-playlist-validators.ts4
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-details.component.ts2
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts4
-rw-r--r--client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts2
-rw-r--r--client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts2
-rw-r--r--client/src/app/shared/shared-abuse-list/processed-abuse.model.ts2
-rw-r--r--client/src/app/shared/shared-actor-image/actor-avatar.component.ts2
-rw-r--r--client/src/app/shared/shared-custom-markup/custom-markup.service.ts2
-rw-r--r--client/src/app/shared/shared-custom-markup/dynamic-element.service.ts2
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts2
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts2
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts2
-rw-r--r--client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts4
-rw-r--r--client/src/app/shared/shared-forms/dynamic-form-field.component.ts2
-rw-r--r--client/src/app/shared/shared-forms/form-validator.service.ts2
-rw-r--r--client/src/app/shared/shared-forms/markdown-textarea.component.ts2
-rw-r--r--client/src/app/shared/shared-forms/preview-upload.component.ts2
-rw-r--r--client/src/app/shared/shared-forms/timestamp-input.component.ts2
-rw-r--r--client/src/app/shared/shared-instance/instance-about-accordion.component.ts3
-rw-r--r--client/src/app/shared/shared-instance/instance-features-table.component.ts2
-rw-r--r--client/src/app/shared/shared-instance/instance-follow.service.ts4
-rw-r--r--client/src/app/shared/shared-instance/instance.service.ts5
-rw-r--r--client/src/app/shared/shared-main/account/account.model.ts2
-rw-r--r--client/src/app/shared/shared-main/account/account.service.ts2
-rw-r--r--client/src/app/shared/shared-main/account/actor.model.ts2
-rw-r--r--client/src/app/shared/shared-main/auth/auth-interceptor.service.ts3
-rw-r--r--client/src/app/shared/shared-main/custom-page/custom-page.service.ts2
-rw-r--r--client/src/app/shared/shared-main/feeds/syndication.model.ts4
-rw-r--r--client/src/app/shared/shared-main/misc/help.component.ts2
-rw-r--r--client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts2
-rw-r--r--client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts2
-rw-r--r--client/src/app/shared/shared-main/users/user-history.service.ts2
-rw-r--r--client/src/app/shared/shared-main/users/user-notification.model.ts15
-rw-r--r--client/src/app/shared/shared-main/users/user-notification.service.ts2
-rw-r--r--client/src/app/shared/shared-main/users/user-notifications.component.ts2
-rw-r--r--client/src/app/shared/shared-main/video-caption/video-caption.service.ts4
-rw-r--r--client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts3
-rw-r--r--client/src/app/shared/shared-main/video-channel/video-channel.model.ts2
-rw-r--r--client/src/app/shared/shared-main/video-channel/video-channel.service.ts2
-rw-r--r--client/src/app/shared/shared-main/video/embed.component.ts4
-rw-r--r--client/src/app/shared/shared-main/video/redundancy.service.ts2
-rw-r--r--client/src/app/shared/shared-main/video/video-details.model.ts6
-rw-r--r--client/src/app/shared/shared-main/video/video-edit.model.ts6
-rw-r--r--client/src/app/shared/shared-main/video/video-file-token.service.ts2
-rw-r--r--client/src/app/shared/shared-main/video/video-import.service.ts4
-rw-r--r--client/src/app/shared/shared-main/video/video-ownership.service.ts2
-rw-r--r--client/src/app/shared/shared-main/video/video-password.service.ts2
-rw-r--r--client/src/app/shared/shared-main/video/video.model.ts11
-rw-r--r--client/src/app/shared/shared-main/video/video.service.ts17
-rw-r--r--client/src/app/shared/shared-moderation/abuse.service.ts2
-rw-r--r--client/src/app/shared/shared-moderation/account-block.model.ts2
-rw-r--r--client/src/app/shared/shared-moderation/blocklist.service.ts4
-rw-r--r--client/src/app/shared/shared-moderation/bulk.service.ts2
-rw-r--r--client/src/app/shared/shared-moderation/report-modals/account-report.component.ts4
-rw-r--r--client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts4
-rw-r--r--client/src/app/shared/shared-moderation/report-modals/video-report.component.ts4
-rw-r--r--client/src/app/shared/shared-moderation/server-blocklist.component.ts2
-rw-r--r--client/src/app/shared/shared-moderation/user-ban-modal.component.ts2
-rw-r--r--client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts2
-rw-r--r--client/src/app/shared/shared-moderation/video-block.service.ts6
-rw-r--r--client/src/app/shared/shared-search/advanced-search.model.ts2
-rw-r--r--client/src/app/shared/shared-search/find-in-bulk.service.ts4
-rw-r--r--client/src/app/shared/shared-search/search.service.ts2
-rw-r--r--client/src/app/shared/shared-share-modal/video-share.component.ts4
-rw-r--r--client/src/app/shared/shared-support-modal/support-modal.component.ts2
-rw-r--r--client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts2
-rw-r--r--client/src/app/shared/shared-user-settings/user-interface-settings.component.ts2
-rw-r--r--client/src/app/shared/shared-user-settings/user-video-settings.component.ts3
-rw-r--r--client/src/app/shared/shared-user-subscription/subscribe-button.component.ts2
-rw-r--r--client/src/app/shared/shared-user-subscription/user-subscription.service.ts2
-rw-r--r--client/src/app/shared/shared-users/two-factor.service.ts2
-rw-r--r--client/src/app/shared/shared-users/user-admin.service.ts4
-rw-r--r--client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts2
-rw-r--r--client/src/app/shared/shared-video-comment/video-comment.model.ts2
-rw-r--r--client/src/app/shared/shared-video-comment/video-comment.service.ts2
-rw-r--r--client/src/app/shared/shared-video-live/live-stream-information.component.ts4
-rw-r--r--client/src/app/shared/shared-video-live/live-video.service.ts2
-rw-r--r--client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts2
-rw-r--r--client/src/app/shared/shared-video-miniature/video-download.component.ts4
-rw-r--r--client/src/app/shared/shared-video-miniature/video-filters-header.component.ts2
-rw-r--r--client/src/app/shared/shared-video-miniature/video-filters.model.ts18
-rw-r--r--client/src/app/shared/shared-video-miniature/video-miniature.component.ts2
-rw-r--r--client/src/app/shared/shared-video-miniature/videos-list.component.ts4
-rw-r--r--client/src/app/shared/shared-video-miniature/videos-selection.component.ts4
-rw-r--r--client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts4
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts4
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts4
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist.model.ts14
-rw-r--r--client/src/app/shared/shared-video-playlist/video-playlist.service.ts2
89 files changed, 155 insertions, 151 deletions
diff --git a/client/src/app/shared/form-validators/video-playlist-validators.ts b/client/src/app/shared/form-validators/video-playlist-validators.ts
index 63af637a3..3cddcaad2 100644
--- a/client/src/app/shared/form-validators/video-playlist-validators.ts
+++ b/client/src/app/shared/form-validators/video-playlist-validators.ts
@@ -1,6 +1,6 @@
1import { Validators, AbstractControl } from '@angular/forms' 1import { Validators, AbstractControl } from '@angular/forms'
2import { BuildFormValidator } from './form-validator.model' 2import { BuildFormValidator } from './form-validator.model'
3import { VideoPlaylistPrivacy } from '@shared/models' 3import { VideoPlaylistPrivacy, VideoPlaylistPrivacyType } from '@peertube/peertube-models'
4 4
5export const VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR: BuildFormValidator = { 5export const VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR: BuildFormValidator = {
6 VALIDATORS: [ 6 VALIDATORS: [
@@ -42,7 +42,7 @@ export const VIDEO_PLAYLIST_CHANNEL_ID_VALIDATOR: BuildFormValidator = {
42 } 42 }
43} 43}
44 44
45export function setPlaylistChannelValidator (channelControl: AbstractControl, privacy: VideoPlaylistPrivacy) { 45export function setPlaylistChannelValidator (channelControl: AbstractControl, privacy: VideoPlaylistPrivacyType) {
46 if (privacy.toString() === VideoPlaylistPrivacy.PUBLIC.toString()) { 46 if (privacy.toString() === VideoPlaylistPrivacy.PUBLIC.toString()) {
47 channelControl.setValidators([ Validators.required ]) 47 channelControl.setValidators([ Validators.required ])
48 } else { 48 } else {
diff --git a/client/src/app/shared/shared-abuse-list/abuse-details.component.ts b/client/src/app/shared/shared-abuse-list/abuse-details.component.ts
index e15edf8c2..357dc4522 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-details.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-details.component.ts
@@ -1,6 +1,6 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { Component, Input, OnInit } from '@angular/core'
2import { durationToString } from '@app/helpers' 2import { durationToString } from '@app/helpers'
3import { AbusePredefinedReasonsString } from '@shared/models' 3import { AbusePredefinedReasonsString } from '@peertube/peertube-models'
4import { ProcessedAbuse } from './processed-abuse.model' 4import { ProcessedAbuse } from './processed-abuse.model'
5 5
6@Component({ 6@Component({
diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
index d8470e927..c38e1286f 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts
@@ -7,8 +7,8 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable }
7import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main' 7import { Account, Actor, DropdownAction, Video, VideoService } from '@app/shared/shared-main'
8import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation' 8import { AbuseService, BlocklistService, VideoBlockService } from '@app/shared/shared-moderation'
9import { VideoCommentService } from '@app/shared/shared-video-comment' 9import { VideoCommentService } from '@app/shared/shared-video-comment'
10import { AbuseState, AbuseStateType, AdminAbuse } from '@peertube/peertube-models'
10import { logger } from '@root-helpers/logger' 11import { logger } from '@root-helpers/logger'
11import { AbuseState, AdminAbuse } from '@shared/models'
12import { AdvancedInputFilter } from '../shared-forms' 12import { AdvancedInputFilter } from '../shared-forms'
13import { AbuseMessageModalComponent } from './abuse-message-modal.component' 13import { AbuseMessageModalComponent } from './abuse-message-modal.component'
14import { ModerationCommentModalComponent } from './moderation-comment-modal.component' 14import { ModerationCommentModalComponent } from './moderation-comment-modal.component'
@@ -144,7 +144,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {
144 }) 144 })
145 } 145 }
146 146
147 updateAbuseState (abuse: AdminAbuse, state: AbuseState) { 147 updateAbuseState (abuse: AdminAbuse, state: AbuseStateType) {
148 this.abuseService.updateAbuse(abuse, { state }) 148 this.abuseService.updateAbuse(abuse, { state })
149 .subscribe({ 149 .subscribe({
150 next: () => this.reloadData(), 150 next: () => this.reloadData(),
diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts
index 12d503f56..8d20166f6 100644
--- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts
+++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts
@@ -4,7 +4,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
4import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 4import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
5import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 5import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
6import { logger } from '@root-helpers/logger' 6import { logger } from '@root-helpers/logger'
7import { AbuseMessage, UserAbuse } from '@shared/models' 7import { AbuseMessage, UserAbuse } from '@peertube/peertube-models'
8import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' 8import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators'
9import { AbuseService } from '../shared-moderation' 9import { AbuseService } from '../shared-moderation'
10 10
diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
index 4ad807d25..e42939f96 100644
--- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
+++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts
@@ -4,7 +4,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
4import { AbuseService } from '@app/shared/shared-moderation' 4import { AbuseService } from '@app/shared/shared-moderation'
5import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 5import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 6import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
7import { AdminAbuse } from '@shared/models' 7import { AdminAbuse } from '@peertube/peertube-models'
8import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-validators' 8import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-validators'
9 9
10@Component({ 10@Component({
diff --git a/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts b/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts
index b9a9bd889..076ccb40b 100644
--- a/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts
+++ b/client/src/app/shared/shared-abuse-list/processed-abuse.model.ts
@@ -1,5 +1,5 @@
1import { Account } from '@app/shared/shared-main' 1import { Account } from '@app/shared/shared-main'
2import { AdminAbuse } from '@shared/models' 2import { AdminAbuse } from '@peertube/peertube-models'
3 3
4// Don't use an abuse model because we need external services to compute some properties 4// Don't use an abuse model because we need external services to compute some properties
5// And this model is only used in this component 5// And this model is only used in this component
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
index ab2e02ad7..36babbe34 100644
--- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
+++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
@@ -1,7 +1,7 @@
1import { Component, Input, OnChanges, OnInit } from '@angular/core' 1import { Component, Input, OnChanges, OnInit } from '@angular/core'
2import { VideoChannel } from '../shared-main' 2import { VideoChannel } from '../shared-main'
3import { Account } from '../shared-main/account/account.model' 3import { Account } from '../shared-main/account/account.model'
4import { objectKeysTyped } from '@shared/core-utils' 4import { objectKeysTyped } from '@peertube/peertube-core-utils'
5 5
6type ActorInput = { 6type ActorInput = {
7 name: string 7 name: string
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
index b49f64834..4ab78a250 100644
--- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
+++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts
@@ -10,7 +10,7 @@ import {
10 PlaylistMiniatureMarkupData, 10 PlaylistMiniatureMarkupData,
11 VideoMiniatureMarkupData, 11 VideoMiniatureMarkupData,
12 VideosListMarkupData 12 VideosListMarkupData
13} from '@shared/models' 13} from '@peertube/peertube-models'
14import { DynamicElementService } from './dynamic-element.service' 14import { DynamicElementService } from './dynamic-element.service'
15import { 15import {
16 ButtonMarkupComponent, 16 ButtonMarkupComponent,
diff --git a/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts b/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
index a12907055..dc4f683ac 100644
--- a/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
+++ b/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
@@ -10,7 +10,7 @@ import {
10 SimpleChanges, 10 SimpleChanges,
11 Type 11 Type
12} from '@angular/core' 12} from '@angular/core'
13import { objectKeysTyped } from '@shared/core-utils' 13import { objectKeysTyped } from '@peertube/peertube-core-utils'
14 14
15@Injectable() 15@Injectable()
16export class DynamicElementService { 16export class DynamicElementService {
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
index 4f00eabd3..b731ccc64 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
@@ -3,7 +3,7 @@ import { finalize, map, switchMap, tap } from 'rxjs/operators'
3import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 3import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
4import { MarkdownService, Notifier, UserService } from '@app/core' 4import { MarkdownService, Notifier, UserService } from '@app/core'
5import { FindInBulkService } from '@app/shared/shared-search' 5import { FindInBulkService } from '@app/shared/shared-search'
6import { VideoSortField } from '@shared/models' 6import { VideoSortField } from '@peertube/peertube-models'
7import { Video, VideoChannel, VideoService } from '../../shared-main' 7import { Video, VideoChannel, VideoService } from '../../shared-main'
8import { CustomMarkupComponent } from './shared' 8import { CustomMarkupComponent } from './shared'
9 9
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts
index 0baf2428b..bca7444ec 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/embed-markup.component.ts
@@ -1,7 +1,7 @@
1import { environment } from 'src/environments/environment' 1import { environment } from 'src/environments/environment'
2import { Component, ElementRef, Input, OnInit } from '@angular/core' 2import { Component, ElementRef, Input, OnInit } from '@angular/core'
3import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' 3import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
4import { buildPlaylistEmbedLink, buildVideoEmbedLink } from '@shared/core-utils' 4import { buildPlaylistEmbedLink, buildVideoEmbedLink } from '@peertube/peertube-core-utils'
5import { CustomMarkupComponent } from './shared' 5import { CustomMarkupComponent } from './shared'
6 6
7@Component({ 7@Component({
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
index bd93929c9..d692abbe3 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/video-miniature-markup.component.ts
@@ -2,7 +2,7 @@ import { finalize } from 'rxjs/operators'
2import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 2import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
3import { AuthService, Notifier } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
4import { FindInBulkService } from '@app/shared/shared-search' 4import { FindInBulkService } from '@app/shared/shared-search'
5import { objectKeysTyped } from '@shared/core-utils' 5import { objectKeysTyped } from '@peertube/peertube-core-utils'
6import { Video } from '../../shared-main' 6import { Video } from '../../shared-main'
7import { MiniatureDisplayOptions } from '../../shared-video-miniature' 7import { MiniatureDisplayOptions } from '../../shared-video-miniature'
8import { CustomMarkupComponent } from './shared' 8import { CustomMarkupComponent } from './shared'
diff --git a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts
index 81363be87..cbd5c7bf5 100644
--- a/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts
+++ b/client/src/app/shared/shared-custom-markup/peertube-custom-tags/videos-list-markup.component.ts
@@ -1,8 +1,8 @@
1import { finalize } from 'rxjs/operators' 1import { finalize } from 'rxjs/operators'
2import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 2import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
3import { AuthService, Notifier } from '@app/core' 3import { AuthService, Notifier } from '@app/core'
4import { objectKeysTyped } from '@shared/core-utils' 4import { objectKeysTyped } from '@peertube/peertube-core-utils'
5import { VideoSortField } from '@shared/models' 5import { VideoSortField } from '@peertube/peertube-models'
6import { Video, VideoService } from '../../shared-main' 6import { Video, VideoService } from '../../shared-main'
7import { MiniatureDisplayOptions } from '../../shared-video-miniature' 7import { MiniatureDisplayOptions } from '../../shared-video-miniature'
8import { CustomMarkupComponent } from './shared' 8import { CustomMarkupComponent } from './shared'
diff --git a/client/src/app/shared/shared-forms/dynamic-form-field.component.ts b/client/src/app/shared/shared-forms/dynamic-form-field.component.ts
index e1a1f8034..a95463944 100644
--- a/client/src/app/shared/shared-forms/dynamic-form-field.component.ts
+++ b/client/src/app/shared/shared-forms/dynamic-form-field.component.ts
@@ -1,6 +1,6 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { FormGroup } from '@angular/forms' 2import { FormGroup } from '@angular/forms'
3import { RegisterClientFormFieldOptions } from '@shared/models' 3import { RegisterClientFormFieldOptions } from '@peertube/peertube-models'
4 4
5@Component({ 5@Component({
6 selector: 'my-dynamic-form-field', 6 selector: 'my-dynamic-form-field',
diff --git a/client/src/app/shared/shared-forms/form-validator.service.ts b/client/src/app/shared/shared-forms/form-validator.service.ts
index 14ee044b5..e7dedf52a 100644
--- a/client/src/app/shared/shared-forms/form-validator.service.ts
+++ b/client/src/app/shared/shared-forms/form-validator.service.ts
@@ -1,6 +1,6 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { AsyncValidatorFn, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn } from '@angular/forms' 2import { AsyncValidatorFn, FormArray, FormBuilder, FormControl, FormGroup, ValidatorFn } from '@angular/forms'
3import { objectKeysTyped } from '@shared/core-utils' 3import { objectKeysTyped } from '@peertube/peertube-core-utils'
4import { BuildFormArgument, BuildFormDefaultValues } from '../form-validators/form-validator.model' 4import { BuildFormArgument, BuildFormDefaultValues } from '../form-validators/form-validator.model'
5import { FormReactiveErrors, FormReactiveValidationMessages } from './form-reactive.service' 5import { FormReactiveErrors, FormReactiveValidationMessages } from './form-reactive.service'
6 6
diff --git a/client/src/app/shared/shared-forms/markdown-textarea.component.ts b/client/src/app/shared/shared-forms/markdown-textarea.component.ts
index 036fab3d9..7edcf868c 100644
--- a/client/src/app/shared/shared-forms/markdown-textarea.component.ts
+++ b/client/src/app/shared/shared-forms/markdown-textarea.component.ts
@@ -6,7 +6,7 @@ import { Component, ElementRef, forwardRef, Input, OnInit, ViewChild } from '@an
6import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 6import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
7import { SafeHtml } from '@angular/platform-browser' 7import { SafeHtml } from '@angular/platform-browser'
8import { MarkdownService, ScreenService } from '@app/core' 8import { MarkdownService, ScreenService } from '@app/core'
9import { Video } from '@shared/models' 9import { Video } from '@peertube/peertube-models'
10 10
11@Component({ 11@Component({
12 selector: 'my-markdown-textarea', 12 selector: 'my-markdown-textarea',
diff --git a/client/src/app/shared/shared-forms/preview-upload.component.ts b/client/src/app/shared/shared-forms/preview-upload.component.ts
index cdfa26a23..3db7c34f7 100644
--- a/client/src/app/shared/shared-forms/preview-upload.component.ts
+++ b/client/src/app/shared/shared-forms/preview-upload.component.ts
@@ -2,7 +2,7 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'
2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import { ServerService } from '@app/core' 3import { ServerService } from '@app/core'
4import { imageToDataURL } from '@root-helpers/images' 4import { imageToDataURL } from '@root-helpers/images'
5import { HTMLServerConfig } from '@shared/models' 5import { HTMLServerConfig } from '@peertube/peertube-models'
6import { BytesPipe } from '../shared-main' 6import { BytesPipe } from '../shared-main'
7 7
8@Component({ 8@Component({
diff --git a/client/src/app/shared/shared-forms/timestamp-input.component.ts b/client/src/app/shared/shared-forms/timestamp-input.component.ts
index 79ca63673..280491852 100644
--- a/client/src/app/shared/shared-forms/timestamp-input.component.ts
+++ b/client/src/app/shared/shared-forms/timestamp-input.component.ts
@@ -1,6 +1,6 @@
1import { ChangeDetectorRef, Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core' 1import { ChangeDetectorRef, Component, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core'
2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms' 2import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'
3import { secondsToTime, timeToInt } from '@shared/core-utils' 3import { secondsToTime, timeToInt } from '@peertube/peertube-core-utils'
4 4
5@Component({ 5@Component({
6 selector: 'my-timestamp-input', 6 selector: 'my-timestamp-input',
diff --git a/client/src/app/shared/shared-instance/instance-about-accordion.component.ts b/client/src/app/shared/shared-instance/instance-about-accordion.component.ts
index a7c521876..78d960d93 100644
--- a/client/src/app/shared/shared-instance/instance-about-accordion.component.ts
+++ b/client/src/app/shared/shared-instance/instance-about-accordion.component.ts
@@ -1,8 +1,7 @@
1import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' 1import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'
2import { HooksService, Notifier } from '@app/core' 2import { HooksService, Notifier } from '@app/core'
3import { NgbAccordionDirective } from '@ng-bootstrap/ng-bootstrap' 3import { NgbAccordionDirective } from '@ng-bootstrap/ng-bootstrap'
4import { ClientFilterHookName, PluginClientScope } from '@shared/models/plugins' 4import { About, ClientFilterHookName, PluginClientScope } from '@peertube/peertube-models'
5import { About } from '@shared/models/server'
6import { InstanceService } from './instance.service' 5import { InstanceService } from './instance.service'
7 6
8@Component({ 7@Component({
diff --git a/client/src/app/shared/shared-instance/instance-features-table.component.ts b/client/src/app/shared/shared-instance/instance-features-table.component.ts
index ab1b1458a..11c6cc0ac 100644
--- a/client/src/app/shared/shared-instance/instance-features-table.component.ts
+++ b/client/src/app/shared/shared-instance/instance-features-table.component.ts
@@ -1,7 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ServerService } from '@app/core' 2import { ServerService } from '@app/core'
3import { formatICU } from '@app/helpers' 3import { formatICU } from '@app/helpers'
4import { ServerConfig } from '@shared/models' 4import { ServerConfig } from '@peertube/peertube-models'
5 5
6@Component({ 6@Component({
7 selector: 'my-instance-features-table', 7 selector: 'my-instance-features-table',
diff --git a/client/src/app/shared/shared-instance/instance-follow.service.ts b/client/src/app/shared/shared-instance/instance-follow.service.ts
index 7568fbbf4..f243273ba 100644
--- a/client/src/app/shared/shared-instance/instance-follow.service.ts
+++ b/client/src/app/shared/shared-instance/instance-follow.service.ts
@@ -4,8 +4,8 @@ import { catchError, concatMap, toArray } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
7import { arrayify } from '@shared/core-utils' 7import { arrayify } from '@peertube/peertube-core-utils'
8import { ActivityPubActorType, ActorFollow, FollowState, ResultList, ServerFollowCreate } from '@shared/models' 8import { ActivityPubActorType, ActorFollow, FollowState, ResultList, ServerFollowCreate } from '@peertube/peertube-models'
9import { environment } from '../../../environments/environment' 9import { environment } from '../../../environments/environment'
10import { AdvancedInputFilter } from '../shared-forms' 10import { AdvancedInputFilter } from '../shared-forms'
11 11
diff --git a/client/src/app/shared/shared-instance/instance.service.ts b/client/src/app/shared/shared-instance/instance.service.ts
index 3088f0899..9a55cf972 100644
--- a/client/src/app/shared/shared-instance/instance.service.ts
+++ b/client/src/app/shared/shared-instance/instance.service.ts
@@ -3,9 +3,8 @@ import { catchError, map } from 'rxjs/operators'
3import { HttpClient } from '@angular/common/http' 3import { HttpClient } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { MarkdownService, RestExtractor, ServerService } from '@app/core' 5import { MarkdownService, RestExtractor, ServerService } from '@app/core'
6import { objectKeysTyped } from '@shared/core-utils' 6import { objectKeysTyped, peertubeTranslate } from '@peertube/peertube-core-utils'
7import { peertubeTranslate } from '@shared/core-utils/i18n' 7import { About } from '@peertube/peertube-models'
8import { About } from '@shared/models'
9import { environment } from '../../../environments/environment' 8import { environment } from '../../../environments/environment'
10 9
11export type AboutHTML = Pick<About['instance'], 10export type AboutHTML = Pick<About['instance'],
diff --git a/client/src/app/shared/shared-main/account/account.model.ts b/client/src/app/shared/shared-main/account/account.model.ts
index e34f6ef64..3a308fde5 100644
--- a/client/src/app/shared/shared-main/account/account.model.ts
+++ b/client/src/app/shared/shared-main/account/account.model.ts
@@ -1,4 +1,4 @@
1import { Account as ServerAccount, ActorImage, BlockStatus } from '@shared/models' 1import { Account as ServerAccount, ActorImage, BlockStatus } from '@peertube/peertube-models'
2import { Actor } from './actor.model' 2import { Actor } from './actor.model'
3 3
4export class Account extends Actor implements ServerAccount { 4export class Account extends Actor implements ServerAccount {
diff --git a/client/src/app/shared/shared-main/account/account.service.ts b/client/src/app/shared/shared-main/account/account.service.ts
index 8f4abf070..9c1afaa73 100644
--- a/client/src/app/shared/shared-main/account/account.service.ts
+++ b/client/src/app/shared/shared-main/account/account.service.ts
@@ -3,7 +3,7 @@ import { catchError, map, tap } from 'rxjs/operators'
3import { HttpClient } from '@angular/common/http' 3import { HttpClient } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { RestExtractor } from '@app/core' 5import { RestExtractor } from '@app/core'
6import { Account as ServerAccount } from '@shared/models' 6import { Account as ServerAccount } from '@peertube/peertube-models'
7import { environment } from '../../../../environments/environment' 7import { environment } from '../../../../environments/environment'
8import { Account } from './account.model' 8import { Account } from './account.model'
9 9
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts
index bce040970..1a1dc2ce6 100644
--- a/client/src/app/shared/shared-main/account/actor.model.ts
+++ b/client/src/app/shared/shared-main/account/actor.model.ts
@@ -1,5 +1,5 @@
1import { getAbsoluteAPIUrl, getAPIHost } from '@app/helpers' 1import { getAbsoluteAPIUrl, getAPIHost } from '@app/helpers'
2import { Actor as ServerActor, ActorImage } from '@shared/models' 2import { Actor as ServerActor, ActorImage } from '@peertube/peertube-models'
3 3
4export abstract class Actor implements ServerActor { 4export abstract class Actor implements ServerActor {
5 id: number 5 id: number
diff --git a/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts b/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts
index 93b3a93d6..e1adf401b 100644
--- a/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts
+++ b/client/src/app/shared/shared-main/auth/auth-interceptor.service.ts
@@ -4,8 +4,7 @@ import { HTTP_INTERCEPTORS, HttpErrorResponse, HttpEvent, HttpHandler, HttpInter
4import { Injectable, Injector } from '@angular/core' 4import { Injectable, Injector } from '@angular/core'
5import { Router } from '@angular/router' 5import { Router } from '@angular/router'
6import { AuthService } from '@app/core/auth/auth.service' 6import { AuthService } from '@app/core/auth/auth.service'
7import { HttpStatusCode } from '@shared/models' 7import { HttpStatusCode, OAuth2ErrorCode, PeerTubeProblemDocument } from '@peertube/peertube-models'
8import { OAuth2ErrorCode, PeerTubeProblemDocument } from '@shared/models/server'
9 8
10@Injectable() 9@Injectable()
11export class AuthInterceptor implements HttpInterceptor { 10export class AuthInterceptor implements HttpInterceptor {
diff --git a/client/src/app/shared/shared-main/custom-page/custom-page.service.ts b/client/src/app/shared/shared-main/custom-page/custom-page.service.ts
index 2914dd6d9..6a2d3a1f5 100644
--- a/client/src/app/shared/shared-main/custom-page/custom-page.service.ts
+++ b/client/src/app/shared/shared-main/custom-page/custom-page.service.ts
@@ -3,7 +3,7 @@ import { catchError } from 'rxjs/operators'
3import { HttpClient } from '@angular/common/http' 3import { HttpClient } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { RestExtractor } from '@app/core' 5import { RestExtractor } from '@app/core'
6import { CustomPage } from '@shared/models' 6import { CustomPage } from '@peertube/peertube-models'
7import { environment } from '../../../../environments/environment' 7import { environment } from '../../../../environments/environment'
8 8
9@Injectable() 9@Injectable()
diff --git a/client/src/app/shared/shared-main/feeds/syndication.model.ts b/client/src/app/shared/shared-main/feeds/syndication.model.ts
index cd6fbdb48..a61515313 100644
--- a/client/src/app/shared/shared-main/feeds/syndication.model.ts
+++ b/client/src/app/shared/shared-main/feeds/syndication.model.ts
@@ -1,7 +1,7 @@
1import { FeedFormat } from '@shared/models' 1import { FeedFormatType } from '@peertube/peertube-models'
2 2
3export interface Syndication { 3export interface Syndication {
4 format: FeedFormat 4 format: FeedFormatType
5 label: string 5 label: string
6 url: string 6 url: string
7} 7}
diff --git a/client/src/app/shared/shared-main/misc/help.component.ts b/client/src/app/shared/shared-main/misc/help.component.ts
index 80fe0e160..53eafc74f 100644
--- a/client/src/app/shared/shared-main/misc/help.component.ts
+++ b/client/src/app/shared/shared-main/misc/help.component.ts
@@ -1,6 +1,6 @@
1import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core' 1import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core'
2import { GlobalIconName } from '@app/shared/shared-icons' 2import { GlobalIconName } from '@app/shared/shared-icons'
3import { ENHANCED_RULES, TEXT_RULES } from '@shared/core-utils/renderer/markdown' 3import { ENHANCED_RULES, TEXT_RULES } from '@peertube/peertube-core-utils'
4import { PeerTubeTemplateDirective } from '../angular' 4import { PeerTubeTemplateDirective } from '../angular'
5 5
6@Component({ 6@Component({
diff --git a/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts b/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts
index 858eff9ba..2064b9089 100644
--- a/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts
+++ b/client/src/app/shared/shared-main/plugins/plugin-placeholder.component.ts
@@ -1,5 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { PluginElementPlaceholder } from '@shared/models' 2import { PluginElementPlaceholder } from '@peertube/peertube-models'
3 3
4@Component({ 4@Component({
5 selector: 'my-plugin-placeholder', 5 selector: 'my-plugin-placeholder',
diff --git a/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts b/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts
index 576569f19..ddb431dec 100644
--- a/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts
+++ b/client/src/app/shared/shared-main/plugins/plugin-selector.directive.ts
@@ -1,5 +1,5 @@
1import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core' 1import { Directive, ElementRef, Input, OnInit, Renderer2 } from '@angular/core'
2import { PluginSelectorId } from '@shared/models' 2import { PluginSelectorId } from '@peertube/peertube-models'
3 3
4@Directive({ selector: '[myPluginSelector]' }) 4@Directive({ selector: '[myPluginSelector]' })
5export class PluginSelectorDirective implements OnInit { 5export class PluginSelectorDirective implements OnInit {
diff --git a/client/src/app/shared/shared-main/users/user-history.service.ts b/client/src/app/shared/shared-main/users/user-history.service.ts
index 4cebbc707..90a9a0eb9 100644
--- a/client/src/app/shared/shared-main/users/user-history.service.ts
+++ b/client/src/app/shared/shared-main/users/user-history.service.ts
@@ -2,7 +2,7 @@ import { catchError, switchMap } from 'rxjs/operators'
2import { HttpClient, HttpParams } from '@angular/common/http' 2import { HttpClient, HttpParams } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' 4import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core'
5import { ResultList } from '@shared/models' 5import { ResultList } from '@peertube/peertube-models'
6import { environment } from '../../../../environments/environment' 6import { environment } from '../../../../environments/environment'
7import { Video } from '../video/video.model' 7import { Video } from '../video/video.model'
8import { VideoService } from '../video/video.service' 8import { VideoService } from '../video/video.service'
diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.ts
index 96e7b4dd0..865eff378 100644
--- a/client/src/app/shared/shared-main/users/user-notification.model.ts
+++ b/client/src/app/shared/shared-main/users/user-notification.model.ts
@@ -2,22 +2,23 @@ import { AuthUser } from '@app/core'
2import { Account } from '@app/shared/shared-main/account/account.model' 2import { Account } from '@app/shared/shared-main/account/account.model'
3import { Actor } from '@app/shared/shared-main/account/actor.model' 3import { Actor } from '@app/shared/shared-main/account/actor.model'
4import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model' 4import { VideoChannel } from '@app/shared/shared-main/video-channel/video-channel.model'
5import { logger } from '@root-helpers/logger'
6import { 5import {
7 AbuseState, 6 AbuseStateType,
8 ActorInfo, 7 ActorInfo,
9 FollowState, 8 FollowState,
10 PluginType, 9 PluginType_Type,
11 UserNotification as UserNotificationServer, 10 UserNotification as UserNotificationServer,
12 UserNotificationType, 11 UserNotificationType,
12 UserNotificationType_Type,
13 UserRight, 13 UserRight,
14 VideoInfo 14 VideoInfo
15} from '@shared/models' 15} from '@peertube/peertube-models'
16import { logger } from '@root-helpers/logger'
16import { Video } from '../video' 17import { Video } from '../video'
17 18
18export class UserNotification implements UserNotificationServer { 19export class UserNotification implements UserNotificationServer {
19 id: number 20 id: number
20 type: UserNotificationType 21 type: UserNotificationType_Type
21 read: boolean 22 read: boolean
22 23
23 video?: VideoInfo & { 24 video?: VideoInfo & {
@@ -41,7 +42,7 @@ export class UserNotification implements UserNotificationServer {
41 42
42 abuse?: { 43 abuse?: {
43 id: number 44 id: number
44 state: AbuseState 45 state: AbuseStateType
45 46
46 video?: VideoInfo 47 video?: VideoInfo
47 48
@@ -75,7 +76,7 @@ export class UserNotification implements UserNotificationServer {
75 76
76 plugin?: { 77 plugin?: {
77 name: string 78 name: string
78 type: PluginType 79 type: PluginType_Type
79 latestVersion: string 80 latestVersion: string
80 } 81 }
81 82
diff --git a/client/src/app/shared/shared-main/users/user-notification.service.ts b/client/src/app/shared/shared-main/users/user-notification.service.ts
index 0b3dd9a53..1f7adb994 100644
--- a/client/src/app/shared/shared-main/users/user-notification.service.ts
+++ b/client/src/app/shared/shared-main/users/user-notification.service.ts
@@ -4,7 +4,7 @@ import { HttpClient, HttpContext, HttpParams } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { AuthService, ComponentPaginationLight, PeerTubeSocket, RestExtractor, RestService } from '@app/core' 5import { AuthService, ComponentPaginationLight, PeerTubeSocket, RestExtractor, RestService } from '@app/core'
6import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client' 6import { NGX_LOADING_BAR_IGNORED } from '@ngx-loading-bar/http-client'
7import { ResultList, UserNotification as UserNotificationServer, UserNotificationSetting } from '@shared/models' 7import { ResultList, UserNotification as UserNotificationServer, UserNotificationSetting } from '@peertube/peertube-models'
8import { environment } from '../../../../environments/environment' 8import { environment } from '../../../../environments/environment'
9import { UserNotification } from './user-notification.model' 9import { UserNotification } from './user-notification.model'
10 10
diff --git a/client/src/app/shared/shared-main/users/user-notifications.component.ts b/client/src/app/shared/shared-main/users/user-notifications.component.ts
index 50005b855..4318973fa 100644
--- a/client/src/app/shared/shared-main/users/user-notifications.component.ts
+++ b/client/src/app/shared/shared-main/users/user-notifications.component.ts
@@ -1,7 +1,7 @@
1import { Subject } from 'rxjs' 1import { Subject } from 'rxjs'
2import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 2import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
3import { ComponentPagination, hasMoreItems, Notifier } from '@app/core' 3import { ComponentPagination, hasMoreItems, Notifier } from '@app/core'
4import { AbuseState } from '@shared/models' 4import { AbuseState } from '@peertube/peertube-models'
5import { UserNotification } from './user-notification.model' 5import { UserNotification } from './user-notification.model'
6import { UserNotificationService } from './user-notification.service' 6import { UserNotificationService } from './user-notification.service'
7 7
diff --git a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
index 21f31a717..59c0969a9 100644
--- a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
+++ b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
@@ -5,8 +5,8 @@ import { Injectable } from '@angular/core'
5import { RestExtractor, ServerService } from '@app/core' 5import { RestExtractor, ServerService } from '@app/core'
6import { objectToFormData, sortBy } from '@app/helpers' 6import { objectToFormData, sortBy } from '@app/helpers'
7import { VideoPasswordService, VideoService } from '@app/shared/shared-main/video' 7import { VideoPasswordService, VideoService } from '@app/shared/shared-main/video'
8import { peertubeTranslate } from '@shared/core-utils/i18n' 8import { peertubeTranslate } from '@peertube/peertube-core-utils'
9import { ResultList, VideoCaption } from '@shared/models' 9import { ResultList, VideoCaption } from '@peertube/peertube-models'
10import { environment } from '../../../../environments/environment' 10import { environment } from '../../../../environments/environment'
11import { VideoCaptionEdit } from './video-caption-edit.model' 11import { VideoCaptionEdit } from './video-caption-edit.model'
12 12
diff --git a/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts b/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts
index a4e216869..a7d71c1e0 100644
--- a/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts
+++ b/client/src/app/shared/shared-main/video-channel-sync/video-channel-sync.service.ts
@@ -4,8 +4,7 @@ import { environment } from 'src/environments/environment'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
7import { ResultList } from '@shared/models/common' 7import { ResultList, VideoChannelSync, VideoChannelSyncCreate } from '@peertube/peertube-models'
8import { VideoChannelSync, VideoChannelSyncCreate } from '@shared/models/videos'
9import { Account, AccountService } from '../account' 8import { Account, AccountService } from '../account'
10 9
11@Injectable({ 10@Injectable({
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts
index db3e4b43f..f141d553a 100644
--- a/client/src/app/shared/shared-main/video-channel/video-channel.model.ts
+++ b/client/src/app/shared/shared-main/video-channel/video-channel.model.ts
@@ -1,5 +1,5 @@
1import { getAbsoluteAPIUrl } from '@app/helpers' 1import { getAbsoluteAPIUrl } from '@app/helpers'
2import { Account as ServerAccount, ActorImage, VideoChannel as ServerVideoChannel, ViewsPerDate } from '@shared/models' 2import { Account as ServerAccount, ActorImage, VideoChannel as ServerVideoChannel, ViewsPerDate } from '@peertube/peertube-models'
3import { Actor } from '../account/actor.model' 3import { Actor } from '../account/actor.model'
4 4
5export class VideoChannel extends Actor implements ServerVideoChannel { 5export class VideoChannel extends Actor implements ServerVideoChannel {
diff --git a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
index 08811afec..9a42fcc52 100644
--- a/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
+++ b/client/src/app/shared/shared-main/video-channel/video-channel.service.ts
@@ -10,7 +10,7 @@ import {
10 VideoChannelCreate, 10 VideoChannelCreate,
11 VideoChannelUpdate, 11 VideoChannelUpdate,
12 VideosImportInChannelCreate 12 VideosImportInChannelCreate
13} from '@shared/models' 13} from '@peertube/peertube-models'
14import { environment } from '../../../../environments/environment' 14import { environment } from '../../../../environments/environment'
15import { Account } from '../account' 15import { Account } from '../account'
16import { AccountService } from '../account/account.service' 16import { AccountService } from '../account/account.service'
diff --git a/client/src/app/shared/shared-main/video/embed.component.ts b/client/src/app/shared/shared-main/video/embed.component.ts
index 43e350197..017fbf357 100644
--- a/client/src/app/shared/shared-main/video/embed.component.ts
+++ b/client/src/app/shared/shared-main/video/embed.component.ts
@@ -2,8 +2,8 @@ import { environment } from 'src/environments/environment'
2import { Component, Input, OnInit } from '@angular/core' 2import { Component, Input, OnInit } from '@angular/core'
3import { DomSanitizer, SafeHtml } from '@angular/platform-browser' 3import { DomSanitizer, SafeHtml } from '@angular/platform-browser'
4import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' 4import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
5import { buildVideoEmbedLink, decorateVideoLink } from '@shared/core-utils' 5import { buildVideoEmbedLink, decorateVideoLink } from '@peertube/peertube-core-utils'
6import { Video } from '@shared/models' 6import { Video } from '@peertube/peertube-models'
7 7
8@Component({ 8@Component({
9 selector: 'my-embed', 9 selector: 'my-embed',
diff --git a/client/src/app/shared/shared-main/video/redundancy.service.ts b/client/src/app/shared/shared-main/video/redundancy.service.ts
index 4377d628a..8904ee425 100644
--- a/client/src/app/shared/shared-main/video/redundancy.service.ts
+++ b/client/src/app/shared/shared-main/video/redundancy.service.ts
@@ -4,7 +4,7 @@ import { catchError, toArray } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
7import { ResultList, Video, VideoRedundanciesTarget, VideoRedundancy } from '@shared/models' 7import { ResultList, Video, VideoRedundanciesTarget, VideoRedundancy } from '@peertube/peertube-models'
8import { environment } from '../../../../environments/environment' 8import { environment } from '../../../../environments/environment'
9 9
10@Injectable() 10@Injectable()
diff --git a/client/src/app/shared/shared-main/video/video-details.model.ts b/client/src/app/shared/shared-main/video/video-details.model.ts
index 5c36b5648..5ad0bb857 100644
--- a/client/src/app/shared/shared-main/video/video-details.model.ts
+++ b/client/src/app/shared/shared-main/video/video-details.model.ts
@@ -4,10 +4,10 @@ import {
4 VideoConstant, 4 VideoConstant,
5 VideoDetails as VideoDetailsServerModel, 5 VideoDetails as VideoDetailsServerModel,
6 VideoFile, 6 VideoFile,
7 VideoState, 7 VideoStateType,
8 VideoStreamingPlaylist, 8 VideoStreamingPlaylist,
9 VideoStreamingPlaylistType 9 VideoStreamingPlaylistType
10} from '@shared/models' 10} from '@peertube/peertube-models'
11import { Video } from './video.model' 11import { Video } from './video.model'
12 12
13export class VideoDetails extends Video implements VideoDetailsServerModel { 13export class VideoDetails extends Video implements VideoDetailsServerModel {
@@ -20,7 +20,7 @@ export class VideoDetails extends Video implements VideoDetailsServerModel {
20 downloadEnabled: boolean 20 downloadEnabled: boolean
21 21
22 waitTranscoding: boolean 22 waitTranscoding: boolean
23 state: VideoConstant<VideoState> 23 state: VideoConstant<VideoStateType>
24 24
25 likesPercent: number 25 likesPercent: number
26 dislikesPercent: number 26 dislikesPercent: number
diff --git a/client/src/app/shared/shared-main/video/video-edit.model.ts b/client/src/app/shared/shared-main/video/video-edit.model.ts
index 9129ab93f..a3e736c0f 100644
--- a/client/src/app/shared/shared-main/video/video-edit.model.ts
+++ b/client/src/app/shared/shared-main/video/video-edit.model.ts
@@ -1,7 +1,7 @@
1import { getAbsoluteAPIUrl } from '@app/helpers' 1import { getAbsoluteAPIUrl } from '@app/helpers'
2import { VideoPassword, VideoPrivacy, VideoScheduleUpdate, VideoUpdate } from '@shared/models' 2import { objectKeysTyped } from '@peertube/peertube-core-utils'
3import { VideoPassword, VideoPrivacy, VideoPrivacyType, VideoScheduleUpdate, VideoUpdate } from '@peertube/peertube-models'
3import { VideoDetails } from './video-details.model' 4import { VideoDetails } from './video-details.model'
4import { objectKeysTyped } from '@shared/core-utils'
5 5
6export class VideoEdit implements VideoUpdate { 6export class VideoEdit implements VideoUpdate {
7 static readonly SPECIAL_SCHEDULED_PRIVACY = -1 7 static readonly SPECIAL_SCHEDULED_PRIVACY = -1
@@ -17,7 +17,7 @@ export class VideoEdit implements VideoUpdate {
17 downloadEnabled: boolean 17 downloadEnabled: boolean
18 waitTranscoding: boolean 18 waitTranscoding: boolean
19 channelId: number 19 channelId: number
20 privacy: VideoPrivacy 20 privacy: VideoPrivacyType
21 videoPassword?: string 21 videoPassword?: string
22 support: string 22 support: string
23 thumbnailfile?: any 23 thumbnailfile?: any
diff --git a/client/src/app/shared/shared-main/video/video-file-token.service.ts b/client/src/app/shared/shared-main/video/video-file-token.service.ts
index 9bca5b9ec..87a952895 100644
--- a/client/src/app/shared/shared-main/video/video-file-token.service.ts
+++ b/client/src/app/shared/shared-main/video/video-file-token.service.ts
@@ -2,7 +2,7 @@ import { catchError, map, of, tap } from 'rxjs'
2import { HttpClient } from '@angular/common/http' 2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { VideoToken } from '@shared/models' 5import { VideoToken } from '@peertube/peertube-models'
6import { VideoService } from './video.service' 6import { VideoService } from './video.service'
7import { VideoPasswordService } from './video-password.service' 7import { VideoPasswordService } from './video-password.service'
8 8
diff --git a/client/src/app/shared/shared-main/video/video-import.service.ts b/client/src/app/shared/shared-main/video/video-import.service.ts
index 607c08d71..bb9052401 100644
--- a/client/src/app/shared/shared-main/video/video-import.service.ts
+++ b/client/src/app/shared/shared-main/video/video-import.service.ts
@@ -5,8 +5,8 @@ import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core' 6import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core'
7import { objectToFormData } from '@app/helpers' 7import { objectToFormData } from '@app/helpers'
8import { peertubeTranslate } from '@shared/core-utils/i18n' 8import { peertubeTranslate } from '@peertube/peertube-core-utils'
9import { ResultList, VideoImport, VideoImportCreate, VideoUpdate } from '@shared/models' 9import { ResultList, VideoImport, VideoImportCreate, VideoUpdate } from '@peertube/peertube-models'
10import { environment } from '../../../../environments/environment' 10import { environment } from '../../../../environments/environment'
11 11
12@Injectable() 12@Injectable()
diff --git a/client/src/app/shared/shared-main/video/video-ownership.service.ts b/client/src/app/shared/shared-main/video/video-ownership.service.ts
index 1e8f7f68c..03e8fc946 100644
--- a/client/src/app/shared/shared-main/video/video-ownership.service.ts
+++ b/client/src/app/shared/shared-main/video/video-ownership.service.ts
@@ -4,7 +4,7 @@ import { catchError } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
7import { ResultList, VideoChangeOwnership, VideoChangeOwnershipAccept, VideoChangeOwnershipCreate } from '@shared/models' 7import { ResultList, VideoChangeOwnership, VideoChangeOwnershipAccept, VideoChangeOwnershipCreate } from '@peertube/peertube-models'
8import { environment } from '../../../../environments/environment' 8import { environment } from '../../../../environments/environment'
9 9
10@Injectable() 10@Injectable()
diff --git a/client/src/app/shared/shared-main/video/video-password.service.ts b/client/src/app/shared/shared-main/video/video-password.service.ts
index d5b0406f8..156efd60f 100644
--- a/client/src/app/shared/shared-main/video/video-password.service.ts
+++ b/client/src/app/shared/shared-main/video/video-password.service.ts
@@ -1,4 +1,4 @@
1import { ResultList, VideoPassword } from '@shared/models' 1import { ResultList, VideoPassword } from '@peertube/peertube-models'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import { catchError, switchMap } from 'rxjs' 3import { catchError, switchMap } from 'rxjs'
4import { HttpClient, HttpHeaders } from '@angular/common/http' 4import { HttpClient, HttpHeaders } from '@angular/common/http'
diff --git a/client/src/app/shared/shared-main/video/video.model.ts b/client/src/app/shared/shared-main/video/video.model.ts
index 1d077a613..ed28fb3f8 100644
--- a/client/src/app/shared/shared-main/video/video.model.ts
+++ b/client/src/app/shared/shared-main/video/video.model.ts
@@ -2,8 +2,7 @@ import { AuthUser } from '@app/core'
2import { User } from '@app/core/users/user.model' 2import { User } from '@app/core/users/user.model'
3import { durationToString, formatICU, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' 3import { durationToString, formatICU, getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
4import { Actor } from '@app/shared/shared-main/account/actor.model' 4import { Actor } from '@app/shared/shared-main/account/actor.model'
5import { buildVideoWatchPath, getAllFiles } from '@shared/core-utils' 5import { buildVideoWatchPath, getAllFiles, peertubeTranslate } from '@peertube/peertube-core-utils'
6import { peertubeTranslate } from '@shared/core-utils/i18n'
7import { 6import {
8 ActorImage, 7 ActorImage,
9 HTMLServerConfig, 8 HTMLServerConfig,
@@ -12,11 +11,13 @@ import {
12 VideoConstant, 11 VideoConstant,
13 VideoFile, 12 VideoFile,
14 VideoPrivacy, 13 VideoPrivacy,
14 VideoPrivacyType,
15 VideoScheduleUpdate, 15 VideoScheduleUpdate,
16 VideoState, 16 VideoState,
17 VideoStateType,
17 VideoStreamingPlaylist, 18 VideoStreamingPlaylist,
18 VideoStreamingPlaylistType 19 VideoStreamingPlaylistType
19} from '@shared/models' 20} from '@peertube/peertube-models'
20 21
21export class Video implements VideoServerModel { 22export class Video implements VideoServerModel {
22 byVideoChannel: string 23 byVideoChannel: string
@@ -30,7 +31,7 @@ export class Video implements VideoServerModel {
30 category: VideoConstant<number> 31 category: VideoConstant<number>
31 licence: VideoConstant<number> 32 licence: VideoConstant<number>
32 language: VideoConstant<string> 33 language: VideoConstant<string>
33 privacy: VideoConstant<VideoPrivacy> 34 privacy: VideoConstant<VideoPrivacyType>
34 35
35 truncatedDescription: string 36 truncatedDescription: string
36 description: string 37 description: string
@@ -70,7 +71,7 @@ export class Video implements VideoServerModel {
70 originInstanceHost: string 71 originInstanceHost: string
71 72
72 waitTranscoding?: boolean 73 waitTranscoding?: boolean
73 state?: VideoConstant<VideoState> 74 state?: VideoConstant<VideoStateType>
74 scheduledUpdate?: VideoScheduleUpdate 75 scheduledUpdate?: VideoScheduleUpdate
75 76
76 blacklisted?: boolean 77 blacklisted?: boolean
diff --git a/client/src/app/shared/shared-main/video/video.service.ts b/client/src/app/shared/shared-main/video/video.service.ts
index a980c2dcf..9b2bc5dee 100644
--- a/client/src/app/shared/shared-main/video/video.service.ts
+++ b/client/src/app/shared/shared-main/video/video.service.ts
@@ -5,7 +5,7 @@ import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { AuthService, ComponentPaginationLight, ConfirmService, RestExtractor, RestService, ServerService, UserService } from '@app/core' 6import { AuthService, ComponentPaginationLight, ConfirmService, RestExtractor, RestService, ServerService, UserService } from '@app/core'
7import { objectToFormData } from '@app/helpers' 7import { objectToFormData } from '@app/helpers'
8import { arrayify } from '@shared/core-utils' 8import { arrayify } from '@peertube/peertube-core-utils'
9import { 9import {
10 BooleanBothQuery, 10 BooleanBothQuery,
11 FeedFormat, 11 FeedFormat,
@@ -21,13 +21,14 @@ import {
21 VideoConstant, 21 VideoConstant,
22 VideoDetails as VideoDetailsServerModel, 22 VideoDetails as VideoDetailsServerModel,
23 VideoFileMetadata, 23 VideoFileMetadata,
24 VideoInclude, 24 VideoIncludeType,
25 VideoPrivacy, 25 VideoPrivacy,
26 VideoPrivacyType,
26 VideoSortField, 27 VideoSortField,
28 VideoSource,
27 VideoTranscodingCreate, 29 VideoTranscodingCreate,
28 VideoUpdate 30 VideoUpdate
29} from '@shared/models' 31} from '@peertube/peertube-models'
30import { VideoSource } from '@shared/models/videos/video-source'
31import { environment } from '../../../../environments/environment' 32import { environment } from '../../../../environments/environment'
32import { Account } from '../account/account.model' 33import { Account } from '../account/account.model'
33import { AccountService } from '../account/account.service' 34import { AccountService } from '../account/account.service'
@@ -40,11 +41,11 @@ import { Video } from './video.model'
40export type CommonVideoParams = { 41export type CommonVideoParams = {
41 videoPagination?: ComponentPaginationLight 42 videoPagination?: ComponentPaginationLight
42 sort: VideoSortField | SortMeta 43 sort: VideoSortField | SortMeta
43 include?: VideoInclude 44 include?: VideoIncludeType
44 isLocal?: boolean 45 isLocal?: boolean
45 categoryOneOf?: number[] 46 categoryOneOf?: number[]
46 languageOneOf?: string[] 47 languageOneOf?: string[]
47 privacyOneOf?: VideoPrivacy[] 48 privacyOneOf?: VideoPrivacyType[]
48 isLive?: boolean 49 isLive?: boolean
49 skipCount?: boolean 50 skipCount?: boolean
50 nsfw?: BooleanBothQuery 51 nsfw?: BooleanBothQuery
@@ -455,7 +456,7 @@ export class VideoService {
455 ) 456 )
456 } 457 }
457 458
458 explainedPrivacyLabels (serverPrivacies: VideoConstant<VideoPrivacy>[], defaultPrivacyId = VideoPrivacy.PUBLIC) { 459 explainedPrivacyLabels (serverPrivacies: VideoConstant<VideoPrivacyType>[], defaultPrivacyId: VideoPrivacyType = VideoPrivacy.PUBLIC) {
459 const descriptions = { 460 const descriptions = {
460 [VideoPrivacy.PRIVATE]: $localize`Only I can see this video`, 461 [VideoPrivacy.PRIVATE]: $localize`Only I can see this video`,
461 [VideoPrivacy.UNLISTED]: $localize`Only shareable via a private link`, 462 [VideoPrivacy.UNLISTED]: $localize`Only shareable via a private link`,
@@ -478,7 +479,7 @@ export class VideoService {
478 } 479 }
479 } 480 }
480 481
481 getHighestAvailablePrivacy (serverPrivacies: VideoConstant<VideoPrivacy>[]) { 482 getHighestAvailablePrivacy (serverPrivacies: VideoConstant<VideoPrivacyType>[]) {
482 // We do not add a password as this requires additional configuration. 483 // We do not add a password as this requires additional configuration.
483 const order = [ 484 const order = [
484 VideoPrivacy.PRIVATE, 485 VideoPrivacy.PRIVATE,
diff --git a/client/src/app/shared/shared-moderation/abuse.service.ts b/client/src/app/shared/shared-moderation/abuse.service.ts
index 5d1539f69..8055b6dd1 100644
--- a/client/src/app/shared/shared-moderation/abuse.service.ts
+++ b/client/src/app/shared/shared-moderation/abuse.service.ts
@@ -15,7 +15,7 @@ import {
15 AdminAbuse, 15 AdminAbuse,
16 ResultList, 16 ResultList,
17 UserAbuse 17 UserAbuse
18} from '@shared/models' 18} from '@peertube/peertube-models'
19import { environment } from '../../../environments/environment' 19import { environment } from '../../../environments/environment'
20 20
21@Injectable() 21@Injectable()
diff --git a/client/src/app/shared/shared-moderation/account-block.model.ts b/client/src/app/shared/shared-moderation/account-block.model.ts
index 8f76c69dc..a5bde327a 100644
--- a/client/src/app/shared/shared-moderation/account-block.model.ts
+++ b/client/src/app/shared/shared-moderation/account-block.model.ts
@@ -1,4 +1,4 @@
1import { AccountBlock as AccountBlockServer } from '@shared/models' 1import { AccountBlock as AccountBlockServer } from '@peertube/peertube-models'
2import { Account } from '@app/shared/shared-main' 2import { Account } from '@app/shared/shared-main'
3 3
4export class AccountBlock implements AccountBlockServer { 4export class AccountBlock implements AccountBlockServer {
diff --git a/client/src/app/shared/shared-moderation/blocklist.service.ts b/client/src/app/shared/shared-moderation/blocklist.service.ts
index 0fb7536e5..f755b812a 100644
--- a/client/src/app/shared/shared-moderation/blocklist.service.ts
+++ b/client/src/app/shared/shared-moderation/blocklist.service.ts
@@ -4,8 +4,8 @@ import { catchError, concatMap, map, toArray } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
7import { arrayify } from '@shared/core-utils' 7import { arrayify } from '@peertube/peertube-core-utils'
8import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@shared/models' 8import { AccountBlock as AccountBlockServer, BlockStatus, ResultList, ServerBlock } from '@peertube/peertube-models'
9import { environment } from '../../../environments/environment' 9import { environment } from '../../../environments/environment'
10import { Account } from '../shared-main' 10import { Account } from '../shared-main'
11import { AccountBlock } from './account-block.model' 11import { AccountBlock } from './account-block.model'
diff --git a/client/src/app/shared/shared-moderation/bulk.service.ts b/client/src/app/shared/shared-moderation/bulk.service.ts
index f0b869421..36d1b0b1e 100644
--- a/client/src/app/shared/shared-moderation/bulk.service.ts
+++ b/client/src/app/shared/shared-moderation/bulk.service.ts
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators'
2import { HttpClient } from '@angular/common/http' 2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { BulkRemoveCommentsOfBody } from '@shared/models' 5import { BulkRemoveCommentsOfBody } from '@peertube/peertube-models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7 7
8@Injectable() 8@Injectable()
diff --git a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts
index d587a9709..042b57aa7 100644
--- a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts
+++ b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts
@@ -6,8 +6,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
6import { Account } from '@app/shared/shared-main' 6import { Account } from '@app/shared/shared-main'
7import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 7import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
8import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 8import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
9import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' 9import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils'
10import { AbusePredefinedReasonsString } from '@shared/models' 10import { AbusePredefinedReasonsString } from '@peertube/peertube-models'
11import { AbuseService } from '../abuse.service' 11import { AbuseService } from '../abuse.service'
12 12
13@Component({ 13@Component({
diff --git a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts
index e35d70c8f..fd50b745a 100644
--- a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts
+++ b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts
@@ -6,8 +6,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
6import { VideoComment } from '@app/shared/shared-video-comment' 6import { VideoComment } from '@app/shared/shared-video-comment'
7import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 7import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
8import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 8import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
9import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' 9import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils'
10import { AbusePredefinedReasonsString } from '@shared/models' 10import { AbusePredefinedReasonsString } from '@peertube/peertube-models'
11import { AbuseService } from '../abuse.service' 11import { AbuseService } from '../abuse.service'
12 12
13@Component({ 13@Component({
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts
index 16be8e0a1..479957d21 100644
--- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts
+++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts
@@ -6,8 +6,8 @@ import { ABUSE_REASON_VALIDATOR } from '@app/shared/form-validators/abuse-valida
6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
7import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 7import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
8import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 8import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
9import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' 9import { abusePredefinedReasonsMap } from '@peertube/peertube-core-utils'
10import { AbusePredefinedReasonsString } from '@shared/models' 10import { AbusePredefinedReasonsString } from '@peertube/peertube-models'
11import { Video } from '../../shared-main' 11import { Video } from '../../shared-main'
12import { AbuseService } from '../abuse.service' 12import { AbuseService } from '../abuse.service'
13 13
diff --git a/client/src/app/shared/shared-moderation/server-blocklist.component.ts b/client/src/app/shared/shared-moderation/server-blocklist.component.ts
index f1bcbd561..4105645fa 100644
--- a/client/src/app/shared/shared-moderation/server-blocklist.component.ts
+++ b/client/src/app/shared/shared-moderation/server-blocklist.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Directive, OnInit, ViewChild } from '@angular/core' 2import { Directive, OnInit, ViewChild } from '@angular/core'
3import { Notifier, RestPagination, RestTable } from '@app/core' 3import { Notifier, RestPagination, RestTable } from '@app/core'
4import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component' 4import { BatchDomainsModalComponent } from '@app/shared/shared-moderation/batch-domains-modal.component'
5import { ServerBlock } from '@shared/models' 5import { ServerBlock } from '@peertube/peertube-models'
6import { BlocklistComponentType, BlocklistService } from './blocklist.service' 6import { BlocklistComponentType, BlocklistService } from './blocklist.service'
7 7
8@Directive() 8@Directive()
diff --git a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
index 34295c34a..fcada7acc 100644
--- a/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
+++ b/client/src/app/shared/shared-moderation/user-ban-modal.component.ts
@@ -5,7 +5,7 @@ import { formatICU } from '@app/helpers'
5import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 5import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
6import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 6import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
7import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 7import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
8import { User } from '@shared/models' 8import { User } from '@peertube/peertube-models'
9import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators' 9import { USER_BAN_REASON_VALIDATOR } from '../form-validators/user-validators'
10import { Account } from '../shared-main' 10import { Account } from '../shared-main'
11import { UserAdminService } from '../shared-users' 11import { UserAdminService } from '../shared-users'
diff --git a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
index 50dccf862..7de152e60 100644
--- a/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
+++ b/client/src/app/shared/shared-moderation/user-moderation-dropdown.component.ts
@@ -1,7 +1,7 @@
1import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core' 1import { Component, EventEmitter, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'
2import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core' 2import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core'
3import { Account, DropdownAction } from '@app/shared/shared-main' 3import { Account, DropdownAction } from '@app/shared/shared-main'
4import { BulkRemoveCommentsOfBody, User, UserRight } from '@shared/models' 4import { BulkRemoveCommentsOfBody, User, UserRight } from '@peertube/peertube-models'
5import { UserAdminService } from '../shared-users' 5import { UserAdminService } from '../shared-users'
6import { BlocklistService } from './blocklist.service' 6import { BlocklistService } from './blocklist.service'
7import { BulkService } from './bulk.service' 7import { BulkService } from './bulk.service'
diff --git a/client/src/app/shared/shared-moderation/video-block.service.ts b/client/src/app/shared/shared-moderation/video-block.service.ts
index ab352a2d6..18950c92b 100644
--- a/client/src/app/shared/shared-moderation/video-block.service.ts
+++ b/client/src/app/shared/shared-moderation/video-block.service.ts
@@ -4,8 +4,8 @@ import { catchError, concatMap, toArray } from 'rxjs/operators'
4import { HttpClient, HttpParams } from '@angular/common/http' 4import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService } from '@app/core' 6import { RestExtractor, RestPagination, RestService } from '@app/core'
7import { arrayify } from '@shared/core-utils' 7import { arrayify } from '@peertube/peertube-core-utils'
8import { ResultList, VideoBlacklist, VideoBlacklistType } from '@shared/models' 8import { ResultList, VideoBlacklist, VideoBlacklistType, VideoBlacklistType_Type } from '@peertube/peertube-models'
9import { environment } from '../../../environments/environment' 9import { environment } from '../../../environments/environment'
10 10
11@Injectable() 11@Injectable()
@@ -22,7 +22,7 @@ export class VideoBlockService {
22 pagination: RestPagination 22 pagination: RestPagination
23 sort: SortMeta 23 sort: SortMeta
24 search?: string 24 search?: string
25 type?: VideoBlacklistType 25 type?: VideoBlacklistType_Type
26 }): Observable<ResultList<VideoBlacklist>> { 26 }): Observable<ResultList<VideoBlacklist>> {
27 const { pagination, sort, search, type } = options 27 const { pagination, sort, search, type } = options
28 28
diff --git a/client/src/app/shared/shared-search/advanced-search.model.ts b/client/src/app/shared/shared-search/advanced-search.model.ts
index 29fe3e8dc..b977a4801 100644
--- a/client/src/app/shared/shared-search/advanced-search.model.ts
+++ b/client/src/app/shared/shared-search/advanced-search.model.ts
@@ -6,7 +6,7 @@ import {
6 VideoChannelsSearchQuery, 6 VideoChannelsSearchQuery,
7 VideoPlaylistsSearchQuery, 7 VideoPlaylistsSearchQuery,
8 VideosSearchQuery 8 VideosSearchQuery
9} from '@shared/models' 9} from '@peertube/peertube-models'
10 10
11export type AdvancedSearchResultType = 'videos' | 'playlists' | 'channels' 11export type AdvancedSearchResultType = 'videos' | 'playlists' | 'channels'
12 12
diff --git a/client/src/app/shared/shared-search/find-in-bulk.service.ts b/client/src/app/shared/shared-search/find-in-bulk.service.ts
index 125d5e2b8..de57c7f64 100644
--- a/client/src/app/shared/shared-search/find-in-bulk.service.ts
+++ b/client/src/app/shared/shared-search/find-in-bulk.service.ts
@@ -3,11 +3,11 @@ import { Observable, Subject } from 'rxjs'
3import { filter, first, map } from 'rxjs/operators' 3import { filter, first, map } from 'rxjs/operators'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { buildBulkObservable } from '@app/helpers' 5import { buildBulkObservable } from '@app/helpers'
6import { ResultList } from '@shared/models/common' 6import { ResultList } from '@peertube/peertube-models'
7import { Video, VideoChannel } from '../shared-main' 7import { Video, VideoChannel } from '../shared-main'
8import { VideoPlaylist } from '../shared-video-playlist' 8import { VideoPlaylist } from '../shared-video-playlist'
9import { SearchService } from './search.service'
10import { AdvancedSearch } from './advanced-search.model' 9import { AdvancedSearch } from './advanced-search.model'
10import { SearchService } from './search.service'
11 11
12const debugLogger = debug('peertube:search:FindInBulkService') 12const debugLogger = debug('peertube:search:FindInBulkService')
13 13
diff --git a/client/src/app/shared/shared-search/search.service.ts b/client/src/app/shared/shared-search/search.service.ts
index ad2de0f37..281e0b4bd 100644
--- a/client/src/app/shared/shared-search/search.service.ts
+++ b/client/src/app/shared/shared-search/search.service.ts
@@ -9,7 +9,7 @@ import {
9 Video as VideoServerModel, 9 Video as VideoServerModel,
10 VideoChannel as VideoChannelServerModel, 10 VideoChannel as VideoChannelServerModel,
11 VideoPlaylist as VideoPlaylistServerModel 11 VideoPlaylist as VideoPlaylistServerModel
12} from '@shared/models' 12} from '@peertube/peertube-models'
13import { environment } from '../../../environments/environment' 13import { environment } from '../../../environments/environment'
14import { VideoPlaylist, VideoPlaylistService } from '../shared-video-playlist' 14import { VideoPlaylist, VideoPlaylistService } from '../shared-video-playlist'
15import { AdvancedSearch } from './advanced-search.model' 15import { AdvancedSearch } from './advanced-search.model'
diff --git a/client/src/app/shared/shared-share-modal/video-share.component.ts b/client/src/app/shared/shared-share-modal/video-share.component.ts
index b09222c3e..24c9cdeca 100644
--- a/client/src/app/shared/shared-share-modal/video-share.component.ts
+++ b/client/src/app/shared/shared-share-modal/video-share.component.ts
@@ -5,8 +5,8 @@ import { VideoDetails } from '@app/shared/shared-main'
5import { VideoPlaylist } from '@app/shared/shared-video-playlist' 5import { VideoPlaylist } from '@app/shared/shared-video-playlist'
6import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 6import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
7import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' 7import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
8import { buildPlaylistLink, buildVideoLink, decoratePlaylistLink, decorateVideoLink } from '@shared/core-utils' 8import { buildPlaylistLink, buildVideoLink, decoratePlaylistLink, decorateVideoLink } from '@peertube/peertube-core-utils'
9import { VideoCaption, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' 9import { VideoCaption, VideoPlaylistPrivacy, VideoPrivacy } from '@peertube/peertube-models'
10 10
11type Customizations = { 11type Customizations = {
12 startAtCheckbox: boolean 12 startAtCheckbox: boolean
diff --git a/client/src/app/shared/shared-support-modal/support-modal.component.ts b/client/src/app/shared/shared-support-modal/support-modal.component.ts
index f330228e1..d911b45d8 100644
--- a/client/src/app/shared/shared-support-modal/support-modal.component.ts
+++ b/client/src/app/shared/shared-support-modal/support-modal.component.ts
@@ -2,7 +2,7 @@ import { Component, Input, ViewChild } from '@angular/core'
2import { MarkdownService } from '@app/core' 2import { MarkdownService } from '@app/core'
3import { VideoDetails } from '@app/shared/shared-main' 3import { VideoDetails } from '@app/shared/shared-main'
4import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 4import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
5import { VideoChannel } from '@shared/models' 5import { VideoChannel } from '@peertube/peertube-models'
6 6
7@Component({ 7@Component({
8 selector: 'my-support-modal', 8 selector: 'my-support-modal',
diff --git a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
index ad5d30db2..c9a5c97db 100644
--- a/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
+++ b/client/src/app/shared/shared-thumbnail/video-thumbnail.component.ts
@@ -1,6 +1,6 @@
1import { Component, EventEmitter, Input, Output } from '@angular/core' 1import { Component, EventEmitter, Input, Output } from '@angular/core'
2import { ScreenService } from '@app/core' 2import { ScreenService } from '@app/core'
3import { VideoState } from '@shared/models' 3import { VideoState } from '@peertube/peertube-models'
4import { Video } from '../shared-main' 4import { Video } from '../shared-main'
5 5
6@Component({ 6@Component({
diff --git a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
index c2c30d38b..08c6b6933 100644
--- a/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-interface-settings.component.ts
@@ -2,7 +2,7 @@ import { Subject, Subscription } from 'rxjs'
2import { Component, Input, OnDestroy, OnInit } from '@angular/core' 2import { Component, Input, OnDestroy, OnInit } from '@angular/core'
3import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core' 3import { AuthService, Notifier, ServerService, ThemeService, UserService } from '@app/core'
4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
5import { HTMLServerConfig, User, UserUpdateMe } from '@shared/models' 5import { HTMLServerConfig, User, UserUpdateMe } from '@peertube/peertube-models'
6import { SelectOptionsItem } from 'src/types' 6import { SelectOptionsItem } from 'src/types'
7 7
8@Component({ 8@Component({
diff --git a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
index ed6e7fffd..234d5b217 100644
--- a/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
+++ b/client/src/app/shared/shared-user-settings/user-video-settings.component.ts
@@ -4,8 +4,7 @@ import { first } from 'rxjs/operators'
4import { Component, Input, OnDestroy, OnInit } from '@angular/core' 4import { Component, Input, OnDestroy, OnInit } from '@angular/core'
5import { AuthService, Notifier, ServerService, User, UserService } from '@app/core' 5import { AuthService, Notifier, ServerService, User, UserService } from '@app/core'
6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
7import { UserUpdateMe } from '@shared/models' 7import { NSFWPolicyType, UserUpdateMe } from '@peertube/peertube-models'
8import { NSFWPolicyType } from '@shared/models/videos/nsfw-policy.type'
9 8
10@Component({ 9@Component({
11 selector: 'my-user-video-settings', 10 selector: 'my-user-video-settings',
diff --git a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
index a002bf4e7..2a5751824 100644
--- a/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
+++ b/client/src/app/shared/shared-user-subscription/subscribe-button.component.ts
@@ -2,7 +2,7 @@ import { concat, forkJoin, merge } from 'rxjs'
2import { Component, Input, OnChanges, OnInit } from '@angular/core' 2import { Component, Input, OnChanges, OnInit } from '@angular/core'
3import { AuthService, Notifier, RedirectService } from '@app/core' 3import { AuthService, Notifier, RedirectService } from '@app/core'
4import { Account, VideoChannel, VideoService } from '@app/shared/shared-main' 4import { Account, VideoChannel, VideoService } from '@app/shared/shared-main'
5import { FeedFormat } from '@shared/models' 5import { FeedFormat } from '@peertube/peertube-models'
6import { UserSubscriptionService } from './user-subscription.service' 6import { UserSubscriptionService } from './user-subscription.service'
7 7
8@Component({ 8@Component({
diff --git a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
index 9cf6b4d16..b83f7ebc5 100644
--- a/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
+++ b/client/src/app/shared/shared-user-subscription/user-subscription.service.ts
@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core'
6import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core' 6import { ComponentPaginationLight, RestExtractor, RestService } from '@app/core'
7import { buildBulkObservable } from '@app/helpers' 7import { buildBulkObservable } from '@app/helpers'
8import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' 8import { Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
9import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@shared/models' 9import { ActorFollow, ResultList, VideoChannel as VideoChannelServer, VideoSortField } from '@peertube/peertube-models'
10import { environment } from '../../../environments/environment' 10import { environment } from '../../../environments/environment'
11 11
12const debugLogger = debug('peertube:subscriptions:UserSubscriptionService') 12const debugLogger = debug('peertube:subscriptions:UserSubscriptionService')
diff --git a/client/src/app/shared/shared-users/two-factor.service.ts b/client/src/app/shared/shared-users/two-factor.service.ts
index 9ff916f15..cb4450e8f 100644
--- a/client/src/app/shared/shared-users/two-factor.service.ts
+++ b/client/src/app/shared/shared-users/two-factor.service.ts
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators'
2import { HttpClient } from '@angular/common/http' 2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { RestExtractor, UserService } from '@app/core' 4import { RestExtractor, UserService } from '@app/core'
5import { TwoFactorEnableResult } from '@shared/models' 5import { TwoFactorEnableResult } from '@peertube/peertube-models'
6 6
7@Injectable() 7@Injectable()
8export class TwoFactorService { 8export class TwoFactorService {
diff --git a/client/src/app/shared/shared-users/user-admin.service.ts b/client/src/app/shared/shared-users/user-admin.service.ts
index 5842bd271..cc706343f 100644
--- a/client/src/app/shared/shared-users/user-admin.service.ts
+++ b/client/src/app/shared/shared-users/user-admin.service.ts
@@ -5,8 +5,8 @@ import { HttpClient, HttpParams } from '@angular/common/http'
5import { Injectable } from '@angular/core' 5import { Injectable } from '@angular/core'
6import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core' 6import { RestExtractor, RestPagination, RestService, ServerService, UserService } from '@app/core'
7import { getBytes } from '@root-helpers/bytes' 7import { getBytes } from '@root-helpers/bytes'
8import { arrayify, peertubeTranslate } from '@shared/core-utils' 8import { arrayify, peertubeTranslate } from '@peertube/peertube-core-utils'
9import { ResultList, User as UserServerModel, UserCreate, UserUpdate } from '@shared/models' 9import { ResultList, User as UserServerModel, UserCreate, UserUpdate } from '@peertube/peertube-models'
10 10
11@Injectable() 11@Injectable()
12export class UserAdminService { 12export class UserAdminService {
diff --git a/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts b/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts
index 9956c88a6..62683f57f 100644
--- a/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment-thread-tree.model.ts
@@ -1,4 +1,4 @@
1import { VideoCommentThreadTree as VideoCommentThreadTreeServerModel } from '@shared/models' 1import { VideoCommentThreadTree as VideoCommentThreadTreeServerModel } from '@peertube/peertube-models'
2import { VideoComment } from './video-comment.model' 2import { VideoComment } from './video-comment.model'
3 3
4export class VideoCommentThreadTree implements VideoCommentThreadTreeServerModel { 4export class VideoCommentThreadTree implements VideoCommentThreadTreeServerModel {
diff --git a/client/src/app/shared/shared-video-comment/video-comment.model.ts b/client/src/app/shared/shared-video-comment/video-comment.model.ts
index adab4cfbd..7048ed66f 100644
--- a/client/src/app/shared/shared-video-comment/video-comment.model.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment.model.ts
@@ -4,7 +4,7 @@ import {
4 Account as AccountInterface, 4 Account as AccountInterface,
5 VideoComment as VideoCommentServerModel, 5 VideoComment as VideoCommentServerModel,
6 VideoCommentAdmin as VideoCommentAdminServerModel 6 VideoCommentAdmin as VideoCommentAdminServerModel
7} from '@shared/models' 7} from '@peertube/peertube-models'
8 8
9export class VideoComment implements VideoCommentServerModel { 9export class VideoComment implements VideoCommentServerModel {
10 id: number 10 id: number
diff --git a/client/src/app/shared/shared-video-comment/video-comment.service.ts b/client/src/app/shared/shared-video-comment/video-comment.service.ts
index 3906652be..d1db773c4 100644
--- a/client/src/app/shared/shared-video-comment/video-comment.service.ts
+++ b/client/src/app/shared/shared-video-comment/video-comment.service.ts
@@ -14,7 +14,7 @@ import {
14 VideoCommentAdmin, 14 VideoCommentAdmin,
15 VideoCommentCreate, 15 VideoCommentCreate,
16 VideoCommentThreadTree as VideoCommentThreadTreeServerModel 16 VideoCommentThreadTree as VideoCommentThreadTreeServerModel
17} from '@shared/models' 17} from '@peertube/peertube-models'
18import { environment } from '../../../environments/environment' 18import { environment } from '../../../environments/environment'
19import { VideoCommentThreadTree } from './video-comment-thread-tree.model' 19import { VideoCommentThreadTree } from './video-comment-thread-tree.model'
20import { VideoComment } from './video-comment.model' 20import { VideoComment } from './video-comment.model'
diff --git a/client/src/app/shared/shared-video-live/live-stream-information.component.ts b/client/src/app/shared/shared-video-live/live-stream-information.component.ts
index 400a6fa01..4089c88fb 100644
--- a/client/src/app/shared/shared-video-live/live-stream-information.component.ts
+++ b/client/src/app/shared/shared-video-live/live-stream-information.component.ts
@@ -1,7 +1,7 @@
1import { Component, ElementRef, ViewChild } from '@angular/core' 1import { Component, ElementRef, ViewChild } from '@angular/core'
2import { Video } from '@app/shared/shared-main' 2import { Video } from '@app/shared/shared-main'
3import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4import { LiveVideo, LiveVideoError, LiveVideoSession } from '@shared/models' 4import { LiveVideo, LiveVideoError, LiveVideoErrorType, LiveVideoSession } from '@peertube/peertube-models'
5import { LiveVideoService } from './live-video.service' 5import { LiveVideoService } from './live-video.service'
6 6
7@Component({ 7@Component({
@@ -38,7 +38,7 @@ export class LiveStreamInformationComponent {
38 getErrorLabel (session: LiveVideoSession) { 38 getErrorLabel (session: LiveVideoSession) {
39 if (!session.error) return undefined 39 if (!session.error) return undefined
40 40
41 const errors: { [ id in LiveVideoError ]: string } = { 41 const errors: { [ id in LiveVideoErrorType ]: string } = {
42 [LiveVideoError.BAD_SOCKET_HEALTH]: $localize`Server too slow`, 42 [LiveVideoError.BAD_SOCKET_HEALTH]: $localize`Server too slow`,
43 [LiveVideoError.BLACKLISTED]: $localize`Live blacklisted`, 43 [LiveVideoError.BLACKLISTED]: $localize`Live blacklisted`,
44 [LiveVideoError.DURATION_EXCEEDED]: $localize`Max duration exceeded`, 44 [LiveVideoError.DURATION_EXCEEDED]: $localize`Max duration exceeded`,
diff --git a/client/src/app/shared/shared-video-live/live-video.service.ts b/client/src/app/shared/shared-video-live/live-video.service.ts
index 89bfd84a0..8ac0eb924 100644
--- a/client/src/app/shared/shared-video-live/live-video.service.ts
+++ b/client/src/app/shared/shared-video-live/live-video.service.ts
@@ -2,7 +2,7 @@ import { catchError } from 'rxjs/operators'
2import { HttpClient } from '@angular/common/http' 2import { HttpClient } from '@angular/common/http'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@shared/models' 5import { LiveVideo, LiveVideoCreate, LiveVideoSession, LiveVideoUpdate, ResultList, VideoCreateResult } from '@peertube/peertube-models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7import { VideoService } from '../shared-main' 7import { VideoService } from '../shared-main'
8 8
diff --git a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts
index 9891aae2e..4b3ed6e99 100644
--- a/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-actions-dropdown.component.ts
@@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@a
2import { AuthService, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core' 2import { AuthService, ConfirmService, Notifier, ScreenService, ServerService } from '@app/core'
3import { BlocklistService, VideoBlockComponent, VideoBlockService, VideoReportComponent } from '@app/shared/shared-moderation' 3import { BlocklistService, VideoBlockComponent, VideoBlockService, VideoReportComponent } from '@app/shared/shared-moderation'
4import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' 4import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
5import { VideoCaption } from '@shared/models' 5import { VideoCaption } from '@peertube/peertube-models'
6import { 6import {
7 Actor, 7 Actor,
8 DropdownAction, 8 DropdownAction,
diff --git a/client/src/app/shared/shared-video-miniature/video-download.component.ts b/client/src/app/shared/shared-video-miniature/video-download.component.ts
index 146ea7dfe..123f40b2f 100644
--- a/client/src/app/shared/shared-video-miniature/video-download.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-download.component.ts
@@ -6,8 +6,8 @@ import { HooksService } from '@app/core'
6import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' 6import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
7import { logger } from '@root-helpers/logger' 7import { logger } from '@root-helpers/logger'
8import { videoRequiresFileToken } from '@root-helpers/video' 8import { videoRequiresFileToken } from '@root-helpers/video'
9import { objectKeysTyped, pick } from '@shared/core-utils' 9import { objectKeysTyped, pick } from '@peertube/peertube-core-utils'
10import { VideoCaption, VideoFile } from '@shared/models' 10import { VideoCaption, VideoFile } from '@peertube/peertube-models'
11import { BytesPipe, NumberFormatterPipe, VideoDetails, VideoFileTokenService, VideoService } from '../shared-main' 11import { BytesPipe, NumberFormatterPipe, VideoDetails, VideoFileTokenService, VideoService } from '../shared-main'
12 12
13type DownloadType = 'video' | 'subtitles' 13type DownloadType = 'video' | 'subtitles'
diff --git a/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts b/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts
index a5da9ebf3..2826408e7 100644
--- a/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-filters-header.component.ts
@@ -4,7 +4,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angu
4import { FormBuilder, FormGroup } from '@angular/forms' 4import { FormBuilder, FormGroup } from '@angular/forms'
5import { AuthService } from '@app/core' 5import { AuthService } from '@app/core'
6import { ServerService } from '@app/core/server/server.service' 6import { ServerService } from '@app/core/server/server.service'
7import { UserRight } from '@shared/models' 7import { UserRight } from '@peertube/peertube-models'
8import { PeertubeModalService } from '../shared-main' 8import { PeertubeModalService } from '../shared-main'
9import { VideoFilters } from './video-filters.model' 9import { VideoFilters } from './video-filters.model'
10 10
diff --git a/client/src/app/shared/shared-video-miniature/video-filters.model.ts b/client/src/app/shared/shared-video-miniature/video-filters.model.ts
index f57a45eb1..8db17c015 100644
--- a/client/src/app/shared/shared-video-miniature/video-filters.model.ts
+++ b/client/src/app/shared/shared-video-miniature/video-filters.model.ts
@@ -1,8 +1,14 @@
1import { splitIntoArray, toBoolean } from '@app/helpers' 1import { splitIntoArray, toBoolean } from '@app/helpers'
2import { getAllPrivacies } from '@shared/core-utils' 2import { escapeHTML, getAllPrivacies } from '@peertube/peertube-core-utils'
3import { escapeHTML } from '@shared/core-utils/renderer' 3import {
4import { BooleanBothQuery, NSFWPolicyType, VideoInclude, VideoPrivacy, VideoSortField } from '@shared/models' 4 BooleanBothQuery,
5import { AttributesOnly } from '@shared/typescript-utils' 5 NSFWPolicyType,
6 VideoInclude,
7 VideoIncludeType,
8 VideoPrivacyType,
9 VideoSortField
10} from '@peertube/peertube-models'
11import { AttributesOnly } from '@peertube/peertube-typescript-utils'
6 12
7type VideoFiltersKeys = { 13type VideoFiltersKeys = {
8 [ id in keyof AttributesOnly<VideoFilters> ]: any 14 [ id in keyof AttributesOnly<VideoFilters> ]: any
@@ -207,8 +213,8 @@ export class VideoFilters {
207 213
208 toVideosAPIObject () { 214 toVideosAPIObject () {
209 let isLocal: boolean 215 let isLocal: boolean
210 let include: VideoInclude 216 let include: VideoIncludeType
211 let privacyOneOf: VideoPrivacy[] 217 let privacyOneOf: VideoPrivacyType[]
212 218
213 if (this.scope === 'local') { 219 if (this.scope === 'local') {
214 isLocal = true 220 isLocal = true
diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
index d453f37a1..11cd6726e 100644
--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.ts
@@ -11,7 +11,7 @@ import {
11 Output 11 Output
12} from '@angular/core' 12} from '@angular/core'
13import { AuthService, ScreenService, ServerService, User } from '@app/core' 13import { AuthService, ScreenService, ServerService, User } from '@app/core'
14import { HTMLServerConfig, VideoExistInPlaylist, VideoPlaylistType, VideoPrivacy, VideoState } from '@shared/models' 14import { HTMLServerConfig, VideoExistInPlaylist, VideoPlaylistType, VideoPrivacy, VideoState } from '@peertube/peertube-models'
15import { LinkType } from '../../../types/link.type' 15import { LinkType } from '../../../types/link.type'
16import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component' 16import { ActorAvatarSize } from '../shared-actor-image/actor-avatar.component'
17import { Video, VideoService } from '../shared-main' 17import { Video, VideoService } from '../shared-main'
diff --git a/client/src/app/shared/shared-video-miniature/videos-list.component.ts b/client/src/app/shared/shared-video-miniature/videos-list.component.ts
index 14a5abd7a..afdef5ace 100644
--- a/client/src/app/shared/shared-video-miniature/videos-list.component.ts
+++ b/client/src/app/shared/shared-video-miniature/videos-list.component.ts
@@ -15,8 +15,8 @@ import {
15} from '@app/core' 15} from '@app/core'
16import { GlobalIconName } from '@app/shared/shared-icons' 16import { GlobalIconName } from '@app/shared/shared-icons'
17import { logger } from '@root-helpers/logger' 17import { logger } from '@root-helpers/logger'
18import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@shared/core-utils' 18import { isLastMonth, isLastWeek, isThisMonth, isToday, isYesterday } from '@peertube/peertube-core-utils'
19import { ResultList, UserRight, VideoSortField } from '@shared/models' 19import { ResultList, UserRight, VideoSortField } from '@peertube/peertube-models'
20import { Syndication, Video } from '../shared-main' 20import { Syndication, Video } from '../shared-main'
21import { VideoFilters, VideoFilterScope } from './video-filters.model' 21import { VideoFilters, VideoFilterScope } from './video-filters.model'
22import { MiniatureDisplayOptions } from './video-miniature.component' 22import { MiniatureDisplayOptions } from './video-miniature.component'
diff --git a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts
index 86fe502e2..286b33dd4 100644
--- a/client/src/app/shared/shared-video-miniature/videos-selection.component.ts
+++ b/client/src/app/shared/shared-video-miniature/videos-selection.component.ts
@@ -2,8 +2,8 @@ import { Observable, Subject } from 'rxjs'
2import { AfterContentInit, Component, ContentChildren, EventEmitter, Input, Output, QueryList, TemplateRef } from '@angular/core' 2import { AfterContentInit, Component, ContentChildren, EventEmitter, Input, Output, QueryList, TemplateRef } from '@angular/core'
3import { ComponentPagination, Notifier, User } from '@app/core' 3import { ComponentPagination, Notifier, User } from '@app/core'
4import { logger } from '@root-helpers/logger' 4import { logger } from '@root-helpers/logger'
5import { objectKeysTyped } from '@shared/core-utils' 5import { objectKeysTyped } from '@peertube/peertube-core-utils'
6import { ResultList, VideosExistInPlaylists, VideoSortField } from '@shared/models' 6import { ResultList, VideosExistInPlaylists, VideoSortField } from '@peertube/peertube-models'
7import { PeerTubeTemplateDirective, Video } from '../shared-main' 7import { PeerTubeTemplateDirective, Video } from '../shared-main'
8import { MiniatureDisplayOptions } from './video-miniature.component' 8import { MiniatureDisplayOptions } from './video-miniature.component'
9 9
diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
index f802416a4..84173ba69 100644
--- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
+++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts
@@ -4,7 +4,7 @@ import { debounceTime, filter } from 'rxjs/operators'
4import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core' 4import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'
5import { AuthService, DisableForReuseHook, Notifier } from '@app/core' 5import { AuthService, DisableForReuseHook, Notifier } from '@app/core'
6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
7import { secondsToTime } from '@shared/core-utils' 7import { secondsToTime } from '@peertube/peertube-core-utils'
8import { 8import {
9 CachedVideoExistInPlaylist, 9 CachedVideoExistInPlaylist,
10 Video, 10 Video,
@@ -12,7 +12,7 @@ import {
12 VideoPlaylistElementCreate, 12 VideoPlaylistElementCreate,
13 VideoPlaylistElementUpdate, 13 VideoPlaylistElementUpdate,
14 VideoPlaylistPrivacy 14 VideoPlaylistPrivacy
15} from '@shared/models' 15} from '@peertube/peertube-models'
16import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators' 16import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators'
17import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service' 17import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service'
18 18
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
index b9a1d9623..0c0f11ecc 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.ts
@@ -2,8 +2,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In
2import { AuthService, Notifier, ServerService } from '@app/core' 2import { AuthService, Notifier, ServerService } from '@app/core'
3import { Video, VideoService } from '@app/shared/shared-main' 3import { Video, VideoService } from '@app/shared/shared-main'
4import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' 4import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
5import { secondsToTime } from '@shared/core-utils' 5import { secondsToTime } from '@peertube/peertube-core-utils'
6import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate, VideoPrivacy } from '@shared/models' 6import { HTMLServerConfig, VideoPlaylistElementType, VideoPlaylistElementUpdate, VideoPrivacy } from '@peertube/peertube-models'
7import { VideoPlaylistElement } from './video-playlist-element.model' 7import { VideoPlaylistElement } from './video-playlist-element.model'
8import { VideoPlaylist } from './video-playlist.model' 8import { VideoPlaylist } from './video-playlist.model'
9import { VideoPlaylistService } from './video-playlist.service' 9import { VideoPlaylistService } from './video-playlist.service'
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts
index b661378bd..16b212281 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element.model.ts
@@ -1,5 +1,5 @@
1import { Video } from '@app/shared/shared-main' 1import { Video } from '@app/shared/shared-main'
2import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType } from '@shared/models' 2import { VideoPlaylistElement as ServerVideoPlaylistElement, VideoPlaylistElementType_Type } from '@peertube/peertube-models'
3 3
4export class VideoPlaylistElement implements ServerVideoPlaylistElement { 4export class VideoPlaylistElement implements ServerVideoPlaylistElement {
5 id: number 5 id: number
@@ -7,7 +7,7 @@ export class VideoPlaylistElement implements ServerVideoPlaylistElement {
7 startTimestamp: number 7 startTimestamp: number
8 stopTimestamp: number 8 stopTimestamp: number
9 9
10 type: VideoPlaylistElementType 10 type: VideoPlaylistElementType_Type
11 11
12 video?: Video 12 video?: Video
13 13
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
index 6b38d9ca3..24f1041ce 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.model.ts
@@ -1,15 +1,15 @@
1import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers' 1import { getAbsoluteAPIUrl, getAbsoluteEmbedUrl } from '@app/helpers'
2import { Actor } from '@app/shared/shared-main' 2import { Actor } from '@app/shared/shared-main'
3import { buildPlaylistWatchPath } from '@shared/core-utils' 3import { buildPlaylistWatchPath, peertubeTranslate } from '@peertube/peertube-core-utils'
4import { peertubeTranslate } from '@shared/core-utils/i18n'
5import { 4import {
6 AccountSummary, 5 AccountSummary,
7 VideoChannelSummary, 6 VideoChannelSummary,
8 VideoConstant, 7 VideoConstant,
9 VideoPlaylist as ServerVideoPlaylist, 8 VideoPlaylist as ServerVideoPlaylist,
10 VideoPlaylistPrivacy, 9 VideoPlaylistPrivacyType,
11 VideoPlaylistType 10 VideoPlaylistType,
12} from '@shared/models' 11 VideoPlaylistType_Type
12} from '@peertube/peertube-models'
13 13
14export class VideoPlaylist implements ServerVideoPlaylist { 14export class VideoPlaylist implements ServerVideoPlaylist {
15 id: number 15 id: number
@@ -22,11 +22,11 @@ export class VideoPlaylist implements ServerVideoPlaylist {
22 22
23 displayName: string 23 displayName: string
24 description: string 24 description: string
25 privacy: VideoConstant<VideoPlaylistPrivacy> 25 privacy: VideoConstant<VideoPlaylistPrivacyType>
26 26
27 videosLength: number 27 videosLength: number
28 28
29 type: VideoConstant<VideoPlaylistType> 29 type: VideoConstant<VideoPlaylistType_Type>
30 30
31 createdAt: Date | string 31 createdAt: Date | string
32 updatedAt: Date | string 32 updatedAt: Date | string
diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
index bc9fb0d74..7f0da2be8 100644
--- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
+++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts
@@ -20,7 +20,7 @@ import {
20 VideoPlaylistReorder, 20 VideoPlaylistReorder,
21 VideoPlaylistUpdate, 21 VideoPlaylistUpdate,
22 VideosExistInPlaylists 22 VideosExistInPlaylists
23} from '@shared/models' 23} from '@peertube/peertube-models'
24import { environment } from '../../../environments/environment' 24import { environment } from '../../../environments/environment'
25import { VideoPlaylistElement } from './video-playlist-element.model' 25import { VideoPlaylistElement } from './video-playlist-element.model'
26import { VideoPlaylist } from './video-playlist.model' 26import { VideoPlaylist } from './video-playlist.model'