aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app')
-rw-r--r--client/src/app/+about/about-follows/about-follows.component.ts2
-rw-r--r--client/src/app/+about/about-instance/about-instance.component.ts2
-rw-r--r--client/src/app/+about/about-instance/about-instance.resolver.ts2
-rw-r--r--client/src/app/+about/about-instance/contact-admin-modal.component.ts2
-rw-r--r--client/src/app/+about/about-instance/instance-statistics.component.ts2
-rw-r--r--client/src/app/+accounts/account-video-channels/account-video-channels.component.ts2
-rw-r--r--client/src/app/+accounts/account-videos/account-videos.component.ts2
-rw-r--r--client/src/app/+accounts/accounts.component.ts2
-rw-r--r--client/src/app/+admin/admin.component.ts2
-rw-r--r--client/src/app/+admin/config/config.routes.ts2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts2
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts2
-rw-r--r--client/src/app/+admin/config/shared/config.service.ts2
-rw-r--r--client/src/app/+admin/follows/followers-list/followers-list.component.ts2
-rw-r--r--client/src/app/+admin/follows/following-list/following-list.component.ts2
-rw-r--r--client/src/app/+admin/follows/follows.routes.ts2
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts3
-rw-r--r--client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts2
-rw-r--r--client/src/app/+admin/moderation/moderation.routes.ts2
-rw-r--r--client/src/app/+admin/moderation/registration-list/admin-registration.service.ts4
-rw-r--r--client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts2
-rw-r--r--client/src/app/+admin/moderation/registration-list/registration-list.component.ts2
-rw-r--r--client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts6
-rw-r--r--client/src/app/+admin/overview/comments/video-comment-list.component.ts2
-rw-r--r--client/src/app/+admin/overview/comments/video-comment.routes.ts2
-rw-r--r--client/src/app/+admin/overview/users/user-edit/user-create.component.ts2
-rw-r--r--client/src/app/+admin/overview/users/user-edit/user-edit.ts5
-rw-r--r--client/src/app/+admin/overview/users/user-edit/user-password.component.ts2
-rw-r--r--client/src/app/+admin/overview/users/user-edit/user-update.component.ts2
-rw-r--r--client/src/app/+admin/overview/users/user-list/user-list.component.ts4
-rw-r--r--client/src/app/+admin/overview/users/users.routes.ts2
-rw-r--r--client/src/app/+admin/overview/videos/video-admin.service.ts4
-rw-r--r--client/src/app/+admin/overview/videos/video-list.component.ts4
-rw-r--r--client/src/app/+admin/overview/videos/video.routes.ts2
-rw-r--r--client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts8
-rw-r--r--client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts6
-rw-r--r--client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts2
-rw-r--r--client/src/app/+admin/plugins/plugins.routes.ts2
-rw-r--r--client/src/app/+admin/plugins/shared/plugin-api.service.ts19
-rw-r--r--client/src/app/+admin/plugins/shared/plugin-card.component.ts4
-rw-r--r--client/src/app/+admin/plugins/shared/plugin-navigation.component.ts4
-rw-r--r--client/src/app/+admin/shared/user-email-info.component.ts2
-rw-r--r--client/src/app/+admin/shared/user-real-quota-info.component.ts2
-rw-r--r--client/src/app/+admin/system/debug/debug.component.ts2
-rw-r--r--client/src/app/+admin/system/debug/debug.service.ts2
-rw-r--r--client/src/app/+admin/system/jobs/job.service.ts2
-rw-r--r--client/src/app/+admin/system/jobs/jobs.component.ts4
-rw-r--r--client/src/app/+admin/system/logs/log-row.model.ts2
-rw-r--r--client/src/app/+admin/system/logs/logs.component.ts2
-rw-r--r--client/src/app/+admin/system/logs/logs.service.ts2
-rw-r--r--client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts2
-rw-r--r--client/src/app/+admin/system/runners/runner-list/runner-list.component.ts2
-rw-r--r--client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts2
-rw-r--r--client/src/app/+admin/system/runners/runner.service.ts5
-rw-r--r--client/src/app/+admin/system/runners/runners.routes.ts2
-rw-r--r--client/src/app/+admin/system/system.routes.ts2
-rw-r--r--client/src/app/+error-page/error-page.component.ts4
-rw-r--r--client/src/app/+login/login.component.ts4
-rw-r--r--client/src/app/+manage/video-channel-edit/video-channel-create.component.ts2
-rw-r--r--client/src/app/+manage/video-channel-edit/video-channel-update.component.ts4
-rw-r--r--client/src/app/+my-account/my-account-applications/my-account-applications.component.ts3
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts2
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts2
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts2
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts6
-rw-r--r--client/src/app/+my-account/my-account-settings/my-account-settings.component.ts2
-rw-r--r--client/src/app/+my-library/my-follows/my-followers.component.ts2
-rw-r--r--client/src/app/+my-library/my-library.component.ts2
-rw-r--r--client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts2
-rw-r--r--client/src/app/+my-library/my-ownership/my-ownership.component.ts4
-rw-r--r--client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts5
-rw-r--r--client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts2
-rw-r--r--client/src/app/+my-library/my-video-imports/my-video-imports.component.ts4
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts3
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts5
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts2
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts2
-rw-r--r--client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts2
-rw-r--r--client/src/app/+my-library/my-videos/my-videos.component.ts2
-rw-r--r--client/src/app/+search/search-filters.component.ts2
-rw-r--r--client/src/app/+search/search.component.ts2
-rw-r--r--client/src/app/+search/shared/abstract-lazy-load.resolver.ts2
-rw-r--r--client/src/app/+signup/+register/register.component.ts3
-rw-r--r--client/src/app/+signup/shared/signup.service.ts2
-rw-r--r--client/src/app/+stats/video/video-stats.component.ts6
-rw-r--r--client/src/app/+stats/video/video-stats.service.ts2
-rw-r--r--client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts2
-rw-r--r--client/src/app/+video-channels/video-channels.component.ts2
-rw-r--r--client/src/app/+video-studio/edit/video-studio-edit.component.ts4
-rw-r--r--client/src/app/+video-studio/shared/video-studio.service.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-edit.component.ts15
-rw-r--r--client/src/app/+videos/+video-edit/shared/video-upload.service.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-send.ts8
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-add.component.ts2
-rw-r--r--client/src/app/+videos/+video-edit/video-update.component.ts5
-rw-r--r--client/src/app/+videos/+video-edit/video-update.resolver.ts4
-rw-r--r--client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts2
-rw-r--r--client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts2
-rw-r--r--client/src/app/+videos/+video-watch/video-watch.component.ts13
-rw-r--r--client/src/app/+videos/video-list/overview/overview.service.ts5
-rw-r--r--client/src/app/+videos/video-list/overview/videos-overview.model.ts2
-rw-r--r--client/src/app/+videos/video-list/video-user-subscriptions.component.ts2
-rw-r--r--client/src/app/+videos/video-list/videos-list-common-page.component.ts2
-rw-r--r--client/src/app/app-routing.module.ts2
-rw-r--r--client/src/app/app.component.ts4
-rw-r--r--client/src/app/core/auth/auth-user.model.ts10
-rw-r--r--client/src/app/core/auth/auth.service.ts2
-rw-r--r--client/src/app/core/menu/menu.service.ts2
-rw-r--r--client/src/app/core/notification/peertube-socket.service.ts2
-rw-r--r--client/src/app/core/plugins/hooks.service.ts2
-rw-r--r--client/src/app/core/plugins/plugin.service.ts10
-rw-r--r--client/src/app/core/renderer/html-renderer.service.ts2
-rw-r--r--client/src/app/core/renderer/markdown.service.ts5
-rw-r--r--client/src/app/core/rest/rest-extractor.service.ts10
-rw-r--r--client/src/app/core/routing/homepage-redirect.component.ts2
-rw-r--r--client/src/app/core/routing/meta.service.ts2
-rw-r--r--client/src/app/core/scoped-tokens/scoped-tokens.service.ts2
-rw-r--r--client/src/app/core/server/server.service.ts22
-rw-r--r--client/src/app/core/theme/theme.service.ts2
-rw-r--r--client/src/app/core/users/user-local-storage.service.ts10
-rw-r--r--client/src/app/core/users/user.model.ts15
-rw-r--r--client/src/app/core/users/user.service.ts2
-rw-r--r--client/src/app/header/search-typeahead.component.ts2
-rw-r--r--client/src/app/helpers/utils/channel.ts2
-rw-r--r--client/src/app/helpers/utils/upload.ts2
-rw-r--r--client/src/app/menu/language-chooser.component.ts3
-rw-r--r--client/src/app/menu/menu.component.ts4
-rw-r--r--client/src/app/modal/instance-config-warning-modal.component.ts2
-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
232 files changed, 397 insertions, 387 deletions
diff --git a/client/src/app/+about/about-follows/about-follows.component.ts b/client/src/app/+about/about-follows/about-follows.component.ts
index e1df8b813..a542cdbf1 100644
--- a/client/src/app/+about/about-follows/about-follows.component.ts
+++ b/client/src/app/+about/about-follows/about-follows.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { ComponentPagination, hasMoreItems, Notifier, RestService, ServerService } from '@app/core' 3import { ComponentPagination, hasMoreItems, Notifier, RestService, ServerService } from '@app/core'
4import { InstanceFollowService } from '@app/shared/shared-instance' 4import { InstanceFollowService } from '@app/shared/shared-instance'
5import { Actor } from '@shared/models/actors' 5import { Actor } from '@peertube/peertube-models'
6 6
7@Component({ 7@Component({
8 selector: 'my-about-follows', 8 selector: 'my-about-follows',
diff --git a/client/src/app/+about/about-instance/about-instance.component.ts b/client/src/app/+about/about-instance/about-instance.component.ts
index fc5214215..85e973d7b 100644
--- a/client/src/app/+about/about-instance/about-instance.component.ts
+++ b/client/src/app/+about/about-instance/about-instance.component.ts
@@ -3,8 +3,8 @@ import { AfterViewChecked, Component, ElementRef, OnInit, ViewChild } from '@ang
3import { ActivatedRoute } from '@angular/router' 3import { ActivatedRoute } from '@angular/router'
4import { Notifier, ServerService } from '@app/core' 4import { Notifier, ServerService } from '@app/core'
5import { AboutHTML } from '@app/shared/shared-instance' 5import { AboutHTML } from '@app/shared/shared-instance'
6import { HTMLServerConfig, ServerStats } from '@peertube/peertube-models'
6import { copyToClipboard } from '@root-helpers/utils' 7import { copyToClipboard } from '@root-helpers/utils'
7import { HTMLServerConfig, ServerStats } from '@shared/models/server'
8import { ResolverData } from './about-instance.resolver' 8import { ResolverData } from './about-instance.resolver'
9import { ContactAdminModalComponent } from './contact-admin-modal.component' 9import { ContactAdminModalComponent } from './contact-admin-modal.component'
10 10
diff --git a/client/src/app/+about/about-instance/about-instance.resolver.ts b/client/src/app/+about/about-instance/about-instance.resolver.ts
index f52a95b88..b5e8ccaa2 100644
--- a/client/src/app/+about/about-instance/about-instance.resolver.ts
+++ b/client/src/app/+about/about-instance/about-instance.resolver.ts
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core'
4import { ServerService } from '@app/core' 4import { ServerService } from '@app/core'
5import { CustomMarkupService } from '@app/shared/shared-custom-markup' 5import { CustomMarkupService } from '@app/shared/shared-custom-markup'
6import { AboutHTML, InstanceService } from '@app/shared/shared-instance' 6import { AboutHTML, InstanceService } from '@app/shared/shared-instance'
7import { About, ServerStats } from '@shared/models/server' 7import { About, ServerStats } from '@peertube/peertube-models'
8 8
9export type ResolverData = { 9export type ResolverData = {
10 serverStats: ServerStats 10 serverStats: ServerStats
diff --git a/client/src/app/+about/about-instance/contact-admin-modal.component.ts b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
index 0e2bf51e8..38e577fcd 100644
--- a/client/src/app/+about/about-instance/contact-admin-modal.component.ts
+++ b/client/src/app/+about/about-instance/contact-admin-modal.component.ts
@@ -11,7 +11,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
11import { InstanceService } from '@app/shared/shared-instance' 11import { InstanceService } from '@app/shared/shared-instance'
12import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 12import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
13import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' 13import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref'
14import { HTMLServerConfig, HttpStatusCode } from '@shared/models' 14import { HTMLServerConfig, HttpStatusCode } from '@peertube/peertube-models'
15 15
16type Prefill = { 16type Prefill = {
17 subject?: string 17 subject?: string
diff --git a/client/src/app/+about/about-instance/instance-statistics.component.ts b/client/src/app/+about/about-instance/instance-statistics.component.ts
index ac6984438..9eb56d0a4 100644
--- a/client/src/app/+about/about-instance/instance-statistics.component.ts
+++ b/client/src/app/+about/about-instance/instance-statistics.component.ts
@@ -1,5 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { ServerStats } from '@shared/models/server' 2import { ServerStats } from '@peertube/peertube-models'
3 3
4@Component({ 4@Component({
5 selector: 'my-instance-statistics', 5 selector: 'my-instance-statistics',
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
index 2ee168492..b8afa66ff 100644
--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts
@@ -5,7 +5,7 @@ import { ComponentPagination, hasMoreItems, MarkdownService, User, UserService }
5import { SimpleMemoize } from '@app/helpers' 5import { SimpleMemoize } from '@app/helpers'
6import { Account, AccountService, Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' 6import { Account, AccountService, Video, VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
7import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' 7import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature'
8import { NSFWPolicyType, VideoSortField } from '@shared/models' 8import { NSFWPolicyType, VideoSortField } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-account-video-channels', 11 selector: 'my-account-video-channels',
diff --git a/client/src/app/+accounts/account-videos/account-videos.component.ts b/client/src/app/+accounts/account-videos/account-videos.component.ts
index 13d1f857d..d8e8377e1 100644
--- a/client/src/app/+accounts/account-videos/account-videos.component.ts
+++ b/client/src/app/+accounts/account-videos/account-videos.component.ts
@@ -4,7 +4,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'
4import { ComponentPaginationLight, DisableForReuseHook, ScreenService } from '@app/core' 4import { ComponentPaginationLight, DisableForReuseHook, ScreenService } from '@app/core'
5import { Account, AccountService, VideoService } from '@app/shared/shared-main' 5import { Account, AccountService, VideoService } from '@app/shared/shared-main'
6import { VideoFilters } from '@app/shared/shared-video-miniature' 6import { VideoFilters } from '@app/shared/shared-video-miniature'
7import { VideoSortField } from '@shared/models' 7import { VideoSortField } from '@peertube/peertube-models'
8 8
9@Component({ 9@Component({
10 selector: 'my-account-videos', 10 selector: 'my-account-videos',
diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts
index 6d912e325..156f35804 100644
--- a/client/src/app/+accounts/accounts.component.ts
+++ b/client/src/app/+accounts/accounts.component.ts
@@ -13,7 +13,7 @@ import {
13 VideoService 13 VideoService
14} from '@app/shared/shared-main' 14} from '@app/shared/shared-main'
15import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation' 15import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation'
16import { HttpStatusCode, User, UserRight } from '@shared/models' 16import { HttpStatusCode, User, UserRight } from '@peertube/peertube-models'
17 17
18@Component({ 18@Component({
19 templateUrl: './accounts.component.html', 19 templateUrl: './accounts.component.html',
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index 49092ea2a..c0d7db99e 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'
2import { AuthService, ScreenService, ServerService } from '@app/core' 2import { AuthService, ScreenService, ServerService } from '@app/core'
3import { ListOverflowItem } from '@app/shared/shared-main' 3import { ListOverflowItem } from '@app/shared/shared-main'
4import { TopMenuDropdownParam } from '@app/shared/shared-main/misc/top-menu-dropdown.component' 4import { TopMenuDropdownParam } from '@app/shared/shared-main/misc/top-menu-dropdown.component'
5import { UserRight } from '@shared/models' 5import { UserRight } from '@peertube/peertube-models'
6 6
7@Component({ 7@Component({
8 templateUrl: './admin.component.html', 8 templateUrl: './admin.component.html',
diff --git a/client/src/app/+admin/config/config.routes.ts b/client/src/app/+admin/config/config.routes.ts
index 6d255ac46..96a4f3771 100644
--- a/client/src/app/+admin/config/config.routes.ts
+++ b/client/src/app/+admin/config/config.routes.ts
@@ -1,7 +1,7 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config' 2import { EditCustomConfigComponent } from '@app/+admin/config/edit-custom-config'
3import { UserRightGuard } from '@app/core' 3import { UserRightGuard } from '@app/core'
4import { UserRight } from '@shared/models' 4import { UserRight } from '@peertube/peertube-models'
5 5
6export const ConfigRoutes: Routes = [ 6export const ConfigRoutes: Routes = [
7 { 7 {
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts
index 2122e67b2..953c7d540 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts
@@ -3,7 +3,7 @@ import { SelectOptionsItem } from 'src/types/select-options-item.model'
3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' 3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { MenuService, ThemeService } from '@app/core' 5import { MenuService, ThemeService } from '@app/core'
6import { HTMLServerConfig } from '@shared/models' 6import { HTMLServerConfig } from '@peertube/peertube-models'
7import { ConfigService } from '../shared/config.service' 7import { ConfigService } from '../shared/config.service'
8 8
9@Component({ 9@Component({
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index c3b85b196..54c076b74 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -27,7 +27,7 @@ import {
27import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' 27import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators'
28import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 28import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
29import { CustomPageService } from '@app/shared/shared-main/custom-page' 29import { CustomPageService } from '@app/shared/shared-main/custom-page'
30import { CustomConfig, CustomPage, HTMLServerConfig } from '@shared/models' 30import { CustomConfig, CustomPage, HTMLServerConfig } from '@peertube/peertube-models'
31import { EditConfigurationService } from './edit-configuration.service' 31import { EditConfigurationService } from './edit-configuration.service'
32 32
33type ComponentCustomConfig = CustomConfig & { 33type ComponentCustomConfig = CustomConfig & {
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts
index 1d1fecf90..59629aa20 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts
@@ -2,7 +2,7 @@
2import { SelectOptionsItem } from 'src/types/select-options-item.model' 2import { SelectOptionsItem } from 'src/types/select-options-item.model'
3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' 3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { HTMLServerConfig } from '@shared/models' 5import { HTMLServerConfig } from '@peertube/peertube-models'
6import { ConfigService } from '../shared/config.service' 6import { ConfigService } from '../shared/config.service'
7import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' 7import { EditConfigurationService, ResolutionOption } from './edit-configuration.service'
8 8
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts
index 6496e8753..a2cd04396 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts
@@ -2,7 +2,7 @@
2import { SelectOptionsItem } from 'src/types/select-options-item.model' 2import { SelectOptionsItem } from 'src/types/select-options-item.model'
3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core' 3import { Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core'
4import { FormGroup } from '@angular/forms' 4import { FormGroup } from '@angular/forms'
5import { HTMLServerConfig } from '@shared/models' 5import { HTMLServerConfig } from '@peertube/peertube-models'
6import { ConfigService } from '../shared/config.service' 6import { ConfigService } from '../shared/config.service'
7import { EditConfigurationService, ResolutionOption } from './edit-configuration.service' 7import { EditConfigurationService, ResolutionOption } from './edit-configuration.service'
8 8
diff --git a/client/src/app/+admin/config/shared/config.service.ts b/client/src/app/+admin/config/shared/config.service.ts
index 80f495b41..3c3894945 100644
--- a/client/src/app/+admin/config/shared/config.service.ts
+++ b/client/src/app/+admin/config/shared/config.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 { CustomConfig } from '@shared/models' 5import { CustomConfig } from '@peertube/peertube-models'
6import { SelectOptionsItem } from '../../../../types/select-options-item.model' 6import { SelectOptionsItem } from '../../../../types/select-options-item.model'
7import { environment } from '../../../../environments/environment' 7import { environment } from '../../../../environments/environment'
8 8
diff --git a/client/src/app/+admin/follows/followers-list/followers-list.component.ts b/client/src/app/+admin/follows/followers-list/followers-list.component.ts
index 618892242..656a7bf87 100644
--- a/client/src/app/+admin/follows/followers-list/followers-list.component.ts
+++ b/client/src/app/+admin/follows/followers-list/followers-list.component.ts
@@ -5,7 +5,7 @@ import { formatICU } from '@app/helpers'
5import { AdvancedInputFilter } from '@app/shared/shared-forms' 5import { AdvancedInputFilter } from '@app/shared/shared-forms'
6import { InstanceFollowService } from '@app/shared/shared-instance' 6import { InstanceFollowService } from '@app/shared/shared-instance'
7import { DropdownAction } from '@app/shared/shared-main' 7import { DropdownAction } from '@app/shared/shared-main'
8import { ActorFollow } from '@shared/models' 8import { ActorFollow } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-followers-list', 11 selector: 'my-followers-list',
diff --git a/client/src/app/+admin/follows/following-list/following-list.component.ts b/client/src/app/+admin/follows/following-list/following-list.component.ts
index 6c8723c16..da6647f6b 100644
--- a/client/src/app/+admin/follows/following-list/following-list.component.ts
+++ b/client/src/app/+admin/follows/following-list/following-list.component.ts
@@ -3,7 +3,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
4import { AdvancedInputFilter } from '@app/shared/shared-forms' 4import { AdvancedInputFilter } from '@app/shared/shared-forms'
5import { InstanceFollowService } from '@app/shared/shared-instance' 5import { InstanceFollowService } from '@app/shared/shared-instance'
6import { ActorFollow } from '@shared/models' 6import { ActorFollow } from '@peertube/peertube-models'
7import { FollowModalComponent } from './follow-modal.component' 7import { FollowModalComponent } from './follow-modal.component'
8import { DropdownAction } from '@app/shared/shared-main' 8import { DropdownAction } from '@app/shared/shared-main'
9import { formatICU } from '@app/helpers' 9import { formatICU } from '@app/helpers'
diff --git a/client/src/app/+admin/follows/follows.routes.ts b/client/src/app/+admin/follows/follows.routes.ts
index 718493dc7..e187f83ea 100644
--- a/client/src/app/+admin/follows/follows.routes.ts
+++ b/client/src/app/+admin/follows/follows.routes.ts
@@ -1,7 +1,7 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list' 2import { VideoRedundanciesListComponent } from '@app/+admin/follows/video-redundancies-list'
3import { UserRightGuard } from '@app/core' 3import { UserRightGuard } from '@app/core'
4import { UserRight } from '@shared/models' 4import { UserRight } from '@peertube/peertube-models'
5import { FollowersListComponent } from './followers-list' 5import { FollowersListComponent } from './followers-list'
6import { FollowingListComponent } from './following-list/following-list.component' 6import { FollowingListComponent } from './following-list/following-list.component'
7 7
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
index efcefd509..09fc038ce 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancies-list.component.ts
@@ -3,9 +3,8 @@ import { SortMeta } from 'primeng/api'
3import { Component, OnInit } from '@angular/core' 3import { Component, OnInit } from '@angular/core'
4import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' 4import { ConfirmService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
5import { BytesPipe, RedundancyService } from '@app/shared/shared-main' 5import { BytesPipe, RedundancyService } from '@app/shared/shared-main'
6import { VideoRedundanciesTarget, VideoRedundancy, VideosRedundancyStats } from '@peertube/peertube-models'
6import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' 7import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
7import { VideoRedundanciesTarget, VideoRedundancy } from '@shared/models'
8import { VideosRedundancyStats } from '@shared/models/server'
9 8
10@Component({ 9@Component({
11 selector: 'my-video-redundancies-list', 10 selector: 'my-video-redundancies-list',
diff --git a/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts b/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts
index 6f3090c08..779d19059 100644
--- a/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts
+++ b/client/src/app/+admin/follows/video-redundancies-list/video-redundancy-information.component.ts
@@ -1,5 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { FileRedundancyInformation, StreamingPlaylistRedundancyInformation } from '@shared/models' 2import { FileRedundancyInformation, StreamingPlaylistRedundancyInformation } from '@peertube/peertube-models'
3 3
4@Component({ 4@Component({
5 selector: 'my-video-redundancy-information', 5 selector: 'my-video-redundancy-information',
diff --git a/client/src/app/+admin/moderation/moderation.routes.ts b/client/src/app/+admin/moderation/moderation.routes.ts
index 378d2bed7..f0494de7b 100644
--- a/client/src/app/+admin/moderation/moderation.routes.ts
+++ b/client/src/app/+admin/moderation/moderation.routes.ts
@@ -3,7 +3,7 @@ import { AbuseListComponent } from '@app/+admin/moderation/abuse-list'
3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist' 3import { InstanceAccountBlocklistComponent, InstanceServerBlocklistComponent } from '@app/+admin/moderation/instance-blocklist'
4import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list' 4import { VideoBlockListComponent } from '@app/+admin/moderation/video-block-list'
5import { UserRightGuard } from '@app/core' 5import { UserRightGuard } from '@app/core'
6import { UserRight } from '@shared/models' 6import { UserRight } from '@peertube/peertube-models'
7import { RegistrationListComponent } from './registration-list' 7import { RegistrationListComponent } from './registration-list'
8 8
9export const ModerationRoutes: Routes = [ 9export const ModerationRoutes: Routes = [
diff --git a/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts b/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts
index a9f13cf2f..f8ab04c71 100644
--- a/client/src/app/+admin/moderation/registration-list/admin-registration.service.ts
+++ b/client/src/app/+admin/moderation/registration-list/admin-registration.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, UserRegistration, UserRegistrationUpdateState } from '@shared/models' 8import { ResultList, UserRegistration, UserRegistrationUpdateState } from '@peertube/peertube-models'
9import { environment } from '../../../../environments/environment' 9import { environment } from '../../../../environments/environment'
10 10
11@Injectable() 11@Injectable()
diff --git a/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts b/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts
index 8f013cbd5..f8e346f50 100644
--- a/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts
+++ b/client/src/app/+admin/moderation/registration-list/process-registration-modal.component.ts
@@ -3,7 +3,7 @@ import { Notifier, ServerService } from '@app/core'
3import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 3import { 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 { UserRegistration } from '@shared/models' 6import { UserRegistration } from '@peertube/peertube-models'
7import { AdminRegistrationService } from './admin-registration.service' 7import { AdminRegistrationService } from './admin-registration.service'
8import { REGISTRATION_MODERATION_RESPONSE_VALIDATOR } from './process-registration-validators' 8import { REGISTRATION_MODERATION_RESPONSE_VALIDATOR } from './process-registration-validators'
9 9
diff --git a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts
index 35d9d13d7..1dc5e9077 100644
--- a/client/src/app/+admin/moderation/registration-list/registration-list.component.ts
+++ b/client/src/app/+admin/moderation/registration-list/registration-list.component.ts
@@ -5,7 +5,7 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, S
5import { formatICU } from '@app/helpers' 5import { formatICU } from '@app/helpers'
6import { AdvancedInputFilter } from '@app/shared/shared-forms' 6import { AdvancedInputFilter } from '@app/shared/shared-forms'
7import { DropdownAction } from '@app/shared/shared-main' 7import { DropdownAction } from '@app/shared/shared-main'
8import { UserRegistration, UserRegistrationState } from '@shared/models' 8import { UserRegistration, UserRegistrationState } from '@peertube/peertube-models'
9import { AdminRegistrationService } from './admin-registration.service' 9import { AdminRegistrationService } from './admin-registration.service'
10import { ProcessRegistrationModalComponent } from './process-registration-modal.component' 10import { ProcessRegistrationModalComponent } from './process-registration-modal.component'
11 11
diff --git a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
index f365a2500..3c6bda16c 100644
--- a/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
+++ b/client/src/app/+admin/moderation/video-block-list/video-block-list.component.ts
@@ -7,9 +7,9 @@ import { ConfirmService, MarkdownService, Notifier, RestPagination, RestTable, S
7import { AdvancedInputFilter } from '@app/shared/shared-forms' 7import { AdvancedInputFilter } from '@app/shared/shared-forms'
8import { DropdownAction, VideoService } from '@app/shared/shared-main' 8import { DropdownAction, VideoService } from '@app/shared/shared-main'
9import { VideoBlockService } from '@app/shared/shared-moderation' 9import { VideoBlockService } from '@app/shared/shared-moderation'
10import { buildVideoEmbedLink, decorateVideoLink } from '@peertube/peertube-core-utils'
11import { VideoBlacklist, VideoBlacklistType, VideoBlacklistType_Type } from '@peertube/peertube-models'
10import { buildVideoOrPlaylistEmbed } from '@root-helpers/video' 12import { buildVideoOrPlaylistEmbed } from '@root-helpers/video'
11import { buildVideoEmbedLink, decorateVideoLink } from '@shared/core-utils'
12import { VideoBlacklist, VideoBlacklistType } from '@shared/models'
13 13
14@Component({ 14@Component({
15 selector: 'my-video-block-list', 15 selector: 'my-video-block-list',
@@ -21,7 +21,7 @@ export class VideoBlockListComponent extends RestTable implements OnInit {
21 totalRecords = 0 21 totalRecords = 0
22 sort: SortMeta = { field: 'createdAt', order: -1 } 22 sort: SortMeta = { field: 'createdAt', order: -1 }
23 pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 23 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
24 blocklistTypeFilter: VideoBlacklistType = undefined 24 blocklistTypeFilter: VideoBlacklistType_Type
25 25
26 videoBlocklistActions: DropdownAction<VideoBlacklist>[][] = [] 26 videoBlocklistActions: DropdownAction<VideoBlacklist>[][] = []
27 27
diff --git a/client/src/app/+admin/overview/comments/video-comment-list.component.ts b/client/src/app/+admin/overview/comments/video-comment-list.component.ts
index b77072665..254e76a60 100644
--- a/client/src/app/+admin/overview/comments/video-comment-list.component.ts
+++ b/client/src/app/+admin/overview/comments/video-comment-list.component.ts
@@ -6,7 +6,7 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms'
6import { DropdownAction } from '@app/shared/shared-main' 6import { DropdownAction } from '@app/shared/shared-main'
7import { BulkService } from '@app/shared/shared-moderation' 7import { BulkService } from '@app/shared/shared-moderation'
8import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment' 8import { VideoCommentAdmin, VideoCommentService } from '@app/shared/shared-video-comment'
9import { FeedFormat, UserRight } from '@shared/models' 9import { FeedFormat, UserRight } from '@peertube/peertube-models'
10import { formatICU } from '@app/helpers' 10import { formatICU } from '@app/helpers'
11 11
12@Component({ 12@Component({
diff --git a/client/src/app/+admin/overview/comments/video-comment.routes.ts b/client/src/app/+admin/overview/comments/video-comment.routes.ts
index f0bd440ad..f67027430 100644
--- a/client/src/app/+admin/overview/comments/video-comment.routes.ts
+++ b/client/src/app/+admin/overview/comments/video-comment.routes.ts
@@ -1,6 +1,6 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { UserRightGuard } from '@app/core' 2import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models' 3import { UserRight } from '@peertube/peertube-models'
4import { VideoCommentListComponent } from './video-comment-list.component' 4import { VideoCommentListComponent } from './video-comment-list.component'
5 5
6export const commentRoutes: Routes = [ 6export const commentRoutes: Routes = [
diff --git a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts
index 0627aa887..77acb9988 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-create.component.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-create.component.ts
@@ -14,7 +14,7 @@ import {
14} from '@app/shared/form-validators/user-validators' 14} from '@app/shared/form-validators/user-validators'
15import { FormReactiveService } from '@app/shared/shared-forms' 15import { FormReactiveService } from '@app/shared/shared-forms'
16import { UserAdminService } from '@app/shared/shared-users' 16import { UserAdminService } from '@app/shared/shared-users'
17import { UserCreate, UserRole } from '@shared/models' 17import { UserCreate, UserRole } from '@peertube/peertube-models'
18import { UserEdit } from './user-edit' 18import { UserEdit } from './user-edit'
19 19
20@Component({ 20@Component({
diff --git a/client/src/app/+admin/overview/users/user-edit/user-edit.ts b/client/src/app/+admin/overview/users/user-edit/user-edit.ts
index 9547da2d1..d61b7b068 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-edit.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-edit.ts
@@ -2,9 +2,8 @@ import { Directive, OnInit } from '@angular/core'
2import { ConfigService } from '@app/+admin/config/shared/config.service' 2import { ConfigService } from '@app/+admin/config/shared/config.service'
3import { AuthService, ScreenService, ServerService, User } from '@app/core' 3import { AuthService, ScreenService, ServerService, User } from '@app/core'
4import { FormReactive } from '@app/shared/shared-forms' 4import { FormReactive } from '@app/shared/shared-forms'
5import { peertubeTranslate } from '@shared/core-utils' 5import { peertubeTranslate, USER_ROLE_LABELS } from '@peertube/peertube-core-utils'
6import { USER_ROLE_LABELS } from '@shared/core-utils/users' 6import { HTMLServerConfig, UserAdminFlag, UserRole } from '@peertube/peertube-models'
7import { HTMLServerConfig, UserAdminFlag, UserRole } from '@shared/models'
8import { SelectOptionsItem } from '../../../../../types/select-options-item.model' 7import { SelectOptionsItem } from '../../../../../types/select-options-item.model'
9 8
10@Directive() 9@Directive()
diff --git a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts
index ec93619f5..af39c82af 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-password.component.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-password.component.ts
@@ -3,7 +3,7 @@ import { Notifier } from '@app/core'
3import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' 3import { USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
5import { UserAdminService } from '@app/shared/shared-users' 5import { UserAdminService } from '@app/shared/shared-users'
6import { UserUpdate } from '@shared/models' 6import { UserUpdate } from '@peertube/peertube-models'
7 7
8@Component({ 8@Component({
9 selector: 'my-user-password', 9 selector: 'my-user-password',
diff --git a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts
index 25d02f000..b55a519f3 100644
--- a/client/src/app/+admin/overview/users/user-edit/user-update.component.ts
+++ b/client/src/app/+admin/overview/users/user-edit/user-update.component.ts
@@ -11,7 +11,7 @@ import {
11} from '@app/shared/form-validators/user-validators' 11} from '@app/shared/form-validators/user-validators'
12import { FormReactiveService } from '@app/shared/shared-forms' 12import { FormReactiveService } from '@app/shared/shared-forms'
13import { TwoFactorService, UserAdminService } from '@app/shared/shared-users' 13import { TwoFactorService, UserAdminService } from '@app/shared/shared-users'
14import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@shared/models' 14import { User as UserType, UserAdminFlag, UserRole, UserUpdate } from '@peertube/peertube-models'
15import { UserEdit } from './user-edit' 15import { UserEdit } from './user-edit'
16 16
17@Component({ 17@Component({
diff --git a/client/src/app/+admin/overview/users/user-list/user-list.component.ts b/client/src/app/+admin/overview/users/user-list/user-list.component.ts
index 5d5abf6f4..a5a1552da 100644
--- a/client/src/app/+admin/overview/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/overview/users/user-list/user-list.component.ts
@@ -7,8 +7,8 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms'
7import { Actor, DropdownAction } from '@app/shared/shared-main' 7import { Actor, DropdownAction } from '@app/shared/shared-main'
8import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation' 8import { AccountMutedStatus, BlocklistService, UserBanModalComponent, UserModerationDisplayType } from '@app/shared/shared-moderation'
9import { UserAdminService } from '@app/shared/shared-users' 9import { UserAdminService } from '@app/shared/shared-users'
10import { User, UserRole, UserRoleType } from '@peertube/peertube-models'
10import { logger } from '@root-helpers/logger' 11import { logger } from '@root-helpers/logger'
11import { User, UserRole } from '@shared/models'
12 12
13type UserForList = User & { 13type UserForList = User & {
14 rawVideoQuota: number 14 rawVideoQuota: number
@@ -166,7 +166,7 @@ export class UserListComponent extends RestTable <User> implements OnInit {
166 return 'UserListComponent' 166 return 'UserListComponent'
167 } 167 }
168 168
169 getRoleClass (role: UserRole) { 169 getRoleClass (role: UserRoleType) {
170 switch (role) { 170 switch (role) {
171 case UserRole.ADMINISTRATOR: 171 case UserRole.ADMINISTRATOR:
172 return 'badge-purple' 172 return 'badge-purple'
diff --git a/client/src/app/+admin/overview/users/users.routes.ts b/client/src/app/+admin/overview/users/users.routes.ts
index c9724e5fb..d66b8c762 100644
--- a/client/src/app/+admin/overview/users/users.routes.ts
+++ b/client/src/app/+admin/overview/users/users.routes.ts
@@ -1,6 +1,6 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { UserRightGuard } from '@app/core' 2import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models' 3import { UserRight } from '@peertube/peertube-models'
4import { UserCreateComponent, UserUpdateComponent } from './user-edit' 4import { UserCreateComponent, UserUpdateComponent } from './user-edit'
5import { UserListComponent } from './user-list' 5import { UserListComponent } from './user-list'
6 6
diff --git a/client/src/app/+admin/overview/videos/video-admin.service.ts b/client/src/app/+admin/overview/videos/video-admin.service.ts
index 722495706..9b33ed8e5 100644
--- a/client/src/app/+admin/overview/videos/video-admin.service.ts
+++ b/client/src/app/+admin/overview/videos/video-admin.service.ts
@@ -5,8 +5,8 @@ import { Injectable } from '@angular/core'
5import { RestExtractor, RestPagination, RestService } from '@app/core' 5import { RestExtractor, RestPagination, RestService } from '@app/core'
6import { AdvancedInputFilter } from '@app/shared/shared-forms' 6import { AdvancedInputFilter } from '@app/shared/shared-forms'
7import { CommonVideoParams, Video, VideoService } from '@app/shared/shared-main' 7import { CommonVideoParams, Video, VideoService } from '@app/shared/shared-main'
8import { ResultList, VideoInclude, VideoPrivacy } from '@shared/models' 8import { ResultList, VideoInclude, VideoPrivacy } from '@peertube/peertube-models'
9import { getAllPrivacies } from '@shared/core-utils' 9import { getAllPrivacies } from '@peertube/peertube-core-utils'
10 10
11@Injectable() 11@Injectable()
12export class VideoAdminService { 12export class VideoAdminService {
diff --git a/client/src/app/+admin/overview/videos/video-list.component.ts b/client/src/app/+admin/overview/videos/video-list.component.ts
index 2792a2d8a..2e12a2b31 100644
--- a/client/src/app/+admin/overview/videos/video-list.component.ts
+++ b/client/src/app/+admin/overview/videos/video-list.component.ts
@@ -8,8 +8,8 @@ import { AdvancedInputFilter } from '@app/shared/shared-forms'
8import { DropdownAction, Video, VideoService } from '@app/shared/shared-main' 8import { DropdownAction, Video, VideoService } from '@app/shared/shared-main'
9import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation' 9import { VideoBlockComponent, VideoBlockService } from '@app/shared/shared-moderation'
10import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature' 10import { VideoActionsDisplayType } from '@app/shared/shared-video-miniature'
11import { getAllFiles } from '@shared/core-utils' 11import { getAllFiles } from '@peertube/peertube-core-utils'
12import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@shared/models' 12import { UserRight, VideoFile, VideoPrivacy, VideoState, VideoStreamingPlaylistType } from '@peertube/peertube-models'
13import { VideoAdminService } from './video-admin.service' 13import { VideoAdminService } from './video-admin.service'
14 14
15@Component({ 15@Component({
diff --git a/client/src/app/+admin/overview/videos/video.routes.ts b/client/src/app/+admin/overview/videos/video.routes.ts
index 01cb5b497..dfffd2696 100644
--- a/client/src/app/+admin/overview/videos/video.routes.ts
+++ b/client/src/app/+admin/overview/videos/video.routes.ts
@@ -1,6 +1,6 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { UserRightGuard } from '@app/core' 2import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models' 3import { UserRight } from '@peertube/peertube-models'
4import { VideoListComponent } from './video-list.component' 4import { VideoListComponent } from './video-list.component'
5 5
6export const videosRoutes: Routes = [ 6export const videosRoutes: Routes = [
diff --git a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
index 3fa1c56dc..1b78a00cd 100644
--- a/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-list-installed/plugin-list-installed.component.ts
@@ -4,8 +4,8 @@ import { ActivatedRoute, Router } from '@angular/router'
4import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' 4import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
5import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core' 5import { ComponentPagination, ConfirmService, hasMoreItems, Notifier } from '@app/core'
6import { PluginService } from '@app/core/plugins/plugin.service' 6import { PluginService } from '@app/core/plugins/plugin.service'
7import { compareSemVer } from '@shared/core-utils' 7import { compareSemVer } from '@peertube/peertube-core-utils'
8import { PeerTubePlugin, PluginType } from '@shared/models' 8import { PeerTubePlugin, PluginType, PluginType_Type } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-plugin-list-installed', 11 selector: 'my-plugin-list-installed',
@@ -13,7 +13,7 @@ import { PeerTubePlugin, PluginType } from '@shared/models'
13 styleUrls: [ './plugin-list-installed.component.scss' ] 13 styleUrls: [ './plugin-list-installed.component.scss' ]
14}) 14})
15export class PluginListInstalledComponent implements OnInit { 15export class PluginListInstalledComponent implements OnInit {
16 pluginType: PluginType 16 pluginType: PluginType_Type
17 17
18 pagination: ComponentPagination = { 18 pagination: ComponentPagination = {
19 currentPage: 1, 19 currentPage: 1,
@@ -48,7 +48,7 @@ export class PluginListInstalledComponent implements OnInit {
48 this.route.queryParams.subscribe(query => { 48 this.route.queryParams.subscribe(query => {
49 if (!query['pluginType']) return 49 if (!query['pluginType']) return
50 50
51 this.pluginType = parseInt(query['pluginType'], 10) 51 this.pluginType = parseInt(query['pluginType'], 10) as PluginType_Type
52 52
53 this.reloadPlugins() 53 this.reloadPlugins()
54 }) 54 })
diff --git a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
index c03e37aa5..5539d1c13 100644
--- a/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
+++ b/client/src/app/+admin/plugins/plugin-search/plugin-search.component.ts
@@ -4,8 +4,8 @@ import { Component, OnInit } from '@angular/core'
4import { ActivatedRoute, Router } from '@angular/router' 4import { ActivatedRoute, Router } from '@angular/router'
5import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service' 5import { PluginApiService } from '@app/+admin/plugins/shared/plugin-api.service'
6import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, PluginService } from '@app/core' 6import { ComponentPagination, ConfirmService, hasMoreItems, Notifier, PluginService } from '@app/core'
7import { PeerTubePluginIndex, PluginType, PluginType_Type } from '@peertube/peertube-models'
7import { logger } from '@root-helpers/logger' 8import { logger } from '@root-helpers/logger'
8import { PeerTubePluginIndex, PluginType } from '@shared/models'
9 9
10@Component({ 10@Component({
11 selector: 'my-plugin-search', 11 selector: 'my-plugin-search',
@@ -13,7 +13,7 @@ import { PeerTubePluginIndex, PluginType } from '@shared/models'
13 styleUrls: [ './plugin-search.component.scss' ] 13 styleUrls: [ './plugin-search.component.scss' ]
14}) 14})
15export class PluginSearchComponent implements OnInit { 15export class PluginSearchComponent implements OnInit {
16 pluginType: PluginType 16 pluginType: PluginType_Type
17 17
18 pagination: ComponentPagination = { 18 pagination: ComponentPagination = {
19 currentPage: 1, 19 currentPage: 1,
@@ -53,7 +53,7 @@ export class PluginSearchComponent implements OnInit {
53 this.route.queryParams.subscribe(query => { 53 this.route.queryParams.subscribe(query => {
54 if (!query['pluginType']) return 54 if (!query['pluginType']) return
55 55
56 this.pluginType = parseInt(query['pluginType'], 10) 56 this.pluginType = parseInt(query['pluginType'], 10) as PluginType_Type
57 this.search = query['search'] || '' 57 this.search = query['search'] || ''
58 58
59 this.reloadPlugins() 59 this.reloadPlugins()
diff --git a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
index b1a41567e..9eee1a901 100644
--- a/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
+++ b/client/src/app/+admin/plugins/plugin-show-installed/plugin-show-installed.component.ts
@@ -5,7 +5,7 @@ import { ActivatedRoute } from '@angular/router'
5import { HooksService, Notifier, PluginService } from '@app/core' 5import { HooksService, Notifier, PluginService } from '@app/core'
6import { BuildFormArgument } from '@app/shared/form-validators' 6import { BuildFormArgument } from '@app/shared/form-validators'
7import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 7import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
8import { PeerTubePlugin, RegisterServerSettingOptions } from '@shared/models' 8import { PeerTubePlugin, RegisterServerSettingOptions } from '@peertube/peertube-models'
9import { PluginApiService } from '../shared/plugin-api.service' 9import { PluginApiService } from '../shared/plugin-api.service'
10 10
11@Component({ 11@Component({
diff --git a/client/src/app/+admin/plugins/plugins.routes.ts b/client/src/app/+admin/plugins/plugins.routes.ts
index f735a490b..40660f1f4 100644
--- a/client/src/app/+admin/plugins/plugins.routes.ts
+++ b/client/src/app/+admin/plugins/plugins.routes.ts
@@ -3,7 +3,7 @@ import { PluginListInstalledComponent } from '@app/+admin/plugins/plugin-list-in
3import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component' 3import { PluginSearchComponent } from '@app/+admin/plugins/plugin-search/plugin-search.component'
4import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component' 4import { PluginShowInstalledComponent } from '@app/+admin/plugins/plugin-show-installed/plugin-show-installed.component'
5import { UserRightGuard } from '@app/core' 5import { UserRightGuard } from '@app/core'
6import { UserRight } from '@shared/models' 6import { UserRight } from '@peertube/peertube-models'
7 7
8export const PluginsRoutes: Routes = [ 8export const PluginsRoutes: Routes = [
9 { 9 {
diff --git a/client/src/app/+admin/plugins/shared/plugin-api.service.ts b/client/src/app/+admin/plugins/shared/plugin-api.service.ts
index fbfdaea18..e1bd2f125 100644
--- a/client/src/app/+admin/plugins/shared/plugin-api.service.ts
+++ b/client/src/app/+admin/plugins/shared/plugin-api.service.ts
@@ -9,9 +9,10 @@ import {
9 PeerTubePlugin, 9 PeerTubePlugin,
10 PeerTubePluginIndex, 10 PeerTubePluginIndex,
11 PluginType, 11 PluginType,
12 PluginType_Type,
12 RegisteredServerSettings, 13 RegisteredServerSettings,
13 ResultList 14 ResultList
14} from '@shared/models' 15} from '@peertube/peertube-models'
15import { environment } from '../../../../environments/environment' 16import { environment } from '../../../../environments/environment'
16 17
17@Injectable() 18@Injectable()
@@ -25,7 +26,7 @@ export class PluginApiService {
25 private pluginService: PluginService 26 private pluginService: PluginService
26 ) { } 27 ) { }
27 28
28 getPluginTypeLabel (type: PluginType) { 29 getPluginTypeLabel (type: PluginType_Type) {
29 if (type === PluginType.PLUGIN) { 30 if (type === PluginType.PLUGIN) {
30 return $localize`plugin` 31 return $localize`plugin`
31 } 32 }
@@ -34,7 +35,7 @@ export class PluginApiService {
34 } 35 }
35 36
36 getPlugins ( 37 getPlugins (
37 pluginType: PluginType, 38 pluginType: PluginType_Type,
38 componentPagination: ComponentPagination, 39 componentPagination: ComponentPagination,
39 sort: string 40 sort: string
40 ) { 41 ) {
@@ -49,7 +50,7 @@ export class PluginApiService {
49 } 50 }
50 51
51 searchAvailablePlugins ( 52 searchAvailablePlugins (
52 pluginType: PluginType, 53 pluginType: PluginType_Type,
53 componentPagination: ComponentPagination, 54 componentPagination: ComponentPagination,
54 sort: string, 55 sort: string,
55 search?: string 56 search?: string
@@ -73,7 +74,7 @@ export class PluginApiService {
73 .pipe(catchError(res => this.restExtractor.handleError(res))) 74 .pipe(catchError(res => this.restExtractor.handleError(res)))
74 } 75 }
75 76
76 getPluginRegisteredSettings (pluginName: string, pluginType: PluginType) { 77 getPluginRegisteredSettings (pluginName: string, pluginType: PluginType_Type) {
77 const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) 78 const npmName = this.pluginService.nameToNpmName(pluginName, pluginType)
78 const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/registered-settings' 79 const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/registered-settings'
79 80
@@ -83,7 +84,7 @@ export class PluginApiService {
83 ) 84 )
84 } 85 }
85 86
86 updatePluginSettings (pluginName: string, pluginType: PluginType, settings: any) { 87 updatePluginSettings (pluginName: string, pluginType: PluginType_Type, settings: any) {
87 const npmName = this.pluginService.nameToNpmName(pluginName, pluginType) 88 const npmName = this.pluginService.nameToNpmName(pluginName, pluginType)
88 const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/settings' 89 const path = PluginApiService.BASE_PLUGIN_URL + '/' + npmName + '/settings'
89 90
@@ -91,7 +92,7 @@ export class PluginApiService {
91 .pipe(catchError(res => this.restExtractor.handleError(res))) 92 .pipe(catchError(res => this.restExtractor.handleError(res)))
92 } 93 }
93 94
94 uninstall (pluginName: string, pluginType: PluginType) { 95 uninstall (pluginName: string, pluginType: PluginType_Type) {
95 const body: ManagePlugin = { 96 const body: ManagePlugin = {
96 npmName: this.pluginService.nameToNpmName(pluginName, pluginType) 97 npmName: this.pluginService.nameToNpmName(pluginName, pluginType)
97 } 98 }
@@ -100,7 +101,7 @@ export class PluginApiService {
100 .pipe(catchError(res => this.restExtractor.handleError(res))) 101 .pipe(catchError(res => this.restExtractor.handleError(res)))
101 } 102 }
102 103
103 update (pluginName: string, pluginType: PluginType) { 104 update (pluginName: string, pluginType: PluginType_Type) {
104 const body: ManagePlugin = { 105 const body: ManagePlugin = {
105 npmName: this.pluginService.nameToNpmName(pluginName, pluginType) 106 npmName: this.pluginService.nameToNpmName(pluginName, pluginType)
106 } 107 }
@@ -118,7 +119,7 @@ export class PluginApiService {
118 .pipe(catchError(res => this.restExtractor.handleError(res))) 119 .pipe(catchError(res => this.restExtractor.handleError(res)))
119 } 120 }
120 121
121 getPluginOrThemeHref (type: PluginType, name: string) { 122 getPluginOrThemeHref (type: PluginType_Type, name: string) {
122 const typeString = type === PluginType.PLUGIN 123 const typeString = type === PluginType.PLUGIN
123 ? 'plugin' 124 ? 'plugin'
124 : 'theme' 125 : 'theme'
diff --git a/client/src/app/+admin/plugins/shared/plugin-card.component.ts b/client/src/app/+admin/plugins/shared/plugin-card.component.ts
index 462a6c213..ae91f6887 100644
--- a/client/src/app/+admin/plugins/shared/plugin-card.component.ts
+++ b/client/src/app/+admin/plugins/shared/plugin-card.component.ts
@@ -1,5 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { PeerTubePlugin, PeerTubePluginIndex, PluginType } from '@shared/models' 2import { PeerTubePlugin, PeerTubePluginIndex, PluginType_Type } from '@peertube/peertube-models'
3import { PluginApiService } from './plugin-api.service' 3import { PluginApiService } from './plugin-api.service'
4 4
5@Component({ 5@Component({
@@ -11,7 +11,7 @@ import { PluginApiService } from './plugin-api.service'
11export class PluginCardComponent { 11export class PluginCardComponent {
12 @Input() plugin: PeerTubePluginIndex | PeerTubePlugin 12 @Input() plugin: PeerTubePluginIndex | PeerTubePlugin
13 @Input() version: string 13 @Input() version: string
14 @Input() pluginType: PluginType 14 @Input() pluginType: PluginType_Type
15 15
16 constructor ( 16 constructor (
17 private pluginApiService: PluginApiService 17 private pluginApiService: PluginApiService
diff --git a/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts b/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts
index 1c963f521..c829bc975 100644
--- a/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts
+++ b/client/src/app/+admin/plugins/shared/plugin-navigation.component.ts
@@ -1,5 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { PluginType } from '@shared/models/plugins' 2import { PluginType_Type } from '@peertube/peertube-models'
3 3
4@Component({ 4@Component({
5 selector: 'my-plugin-navigation', 5 selector: 'my-plugin-navigation',
@@ -7,5 +7,5 @@ import { PluginType } from '@shared/models/plugins'
7 styleUrls: [ './plugin-navigation.component.scss' ] 7 styleUrls: [ './plugin-navigation.component.scss' ]
8}) 8})
9export class PluginNavigationComponent { 9export class PluginNavigationComponent {
10 @Input() pluginType: PluginType 10 @Input() pluginType: PluginType_Type
11} 11}
diff --git a/client/src/app/+admin/shared/user-email-info.component.ts b/client/src/app/+admin/shared/user-email-info.component.ts
index e33948b60..0af905c84 100644
--- a/client/src/app/+admin/shared/user-email-info.component.ts
+++ b/client/src/app/+admin/shared/user-email-info.component.ts
@@ -1,5 +1,5 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { User, UserRegistration } from '@shared/models/users' 2import { User, UserRegistration } from '@peertube/peertube-models'
3 3
4@Component({ 4@Component({
5 selector: 'my-user-email-info', 5 selector: 'my-user-email-info',
diff --git a/client/src/app/+admin/shared/user-real-quota-info.component.ts b/client/src/app/+admin/shared/user-real-quota-info.component.ts
index 0a342c799..dd78fa9f0 100644
--- a/client/src/app/+admin/shared/user-real-quota-info.component.ts
+++ b/client/src/app/+admin/shared/user-real-quota-info.component.ts
@@ -1,6 +1,6 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { Component, Input, OnInit } from '@angular/core'
2import { ServerService } from '@app/core' 2import { ServerService } from '@app/core'
3import { HTMLServerConfig, VideoResolution } from '@shared/models/index' 3import { HTMLServerConfig, VideoResolution } from '@peertube/peertube-models'
4 4
5@Component({ 5@Component({
6 selector: 'my-user-real-quota-info', 6 selector: 'my-user-real-quota-info',
diff --git a/client/src/app/+admin/system/debug/debug.component.ts b/client/src/app/+admin/system/debug/debug.component.ts
index 1f4e71e8a..5c86803ef 100644
--- a/client/src/app/+admin/system/debug/debug.component.ts
+++ b/client/src/app/+admin/system/debug/debug.component.ts
@@ -1,6 +1,6 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { Notifier } from '@app/core' 2import { Notifier } from '@app/core'
3import { Debug } from '@shared/models' 3import { Debug } from '@peertube/peertube-models'
4import { DebugService } from './debug.service' 4import { DebugService } from './debug.service'
5 5
6@Component({ 6@Component({
diff --git a/client/src/app/+admin/system/debug/debug.service.ts b/client/src/app/+admin/system/debug/debug.service.ts
index ab1d0a7fa..24d3b2ab8 100644
--- a/client/src/app/+admin/system/debug/debug.service.ts
+++ b/client/src/app/+admin/system/debug/debug.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 { Debug } from '@shared/models' 6import { Debug } 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/+admin/system/jobs/job.service.ts b/client/src/app/+admin/system/jobs/job.service.ts
index 031e2bad8..eae1dea7d 100644
--- a/client/src/app/+admin/system/jobs/job.service.ts
+++ b/client/src/app/+admin/system/jobs/job.service.ts
@@ -4,7 +4,7 @@ import { catchError, map } 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 { Job, ResultList } from '@shared/models' 7import { Job, ResultList } from '@peertube/peertube-models'
8import { environment } from '../../../../environments/environment' 8import { environment } from '../../../../environments/environment'
9import { JobStateClient } from '../../../../types/job-state-client.type' 9import { JobStateClient } from '../../../../types/job-state-client.type'
10import { JobTypeClient } from '../../../../types/job-type-client.type' 10import { JobTypeClient } from '../../../../types/job-type-client.type'
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts
index 6e10c81ff..4e6b4bf7b 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.ts
+++ b/client/src/app/+admin/system/jobs/jobs.component.ts
@@ -1,9 +1,9 @@
1import { SortMeta } from 'primeng/api' 1import { SortMeta } from 'primeng/api'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { Notifier, RestPagination, RestTable } from '@app/core' 3import { Notifier, RestPagination, RestTable } from '@app/core'
4import { escapeHTML } from '@peertube/peertube-core-utils'
5import { Job, JobState, JobType } from '@peertube/peertube-models'
4import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' 6import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
5import { escapeHTML } from '@shared/core-utils/renderer'
6import { Job, JobState, JobType } from '@shared/models'
7import { JobStateClient } from '../../../../types/job-state-client.type' 7import { JobStateClient } from '../../../../types/job-state-client.type'
8import { JobTypeClient } from '../../../../types/job-type-client.type' 8import { JobTypeClient } from '../../../../types/job-type-client.type'
9import { JobService } from './job.service' 9import { JobService } from './job.service'
diff --git a/client/src/app/+admin/system/logs/log-row.model.ts b/client/src/app/+admin/system/logs/log-row.model.ts
index e83c7b064..15799e8b0 100644
--- a/client/src/app/+admin/system/logs/log-row.model.ts
+++ b/client/src/app/+admin/system/logs/log-row.model.ts
@@ -1,6 +1,6 @@
1import omit from 'lodash-es/omit' 1import omit from 'lodash-es/omit'
2import { logger } from '@root-helpers/logger' 2import { logger } from '@root-helpers/logger'
3import { ServerLogLevel } from '@shared/models' 3import { ServerLogLevel } from '@peertube/peertube-models'
4 4
5export class LogRow { 5export class LogRow {
6 date: Date 6 date: Date
diff --git a/client/src/app/+admin/system/logs/logs.component.ts b/client/src/app/+admin/system/logs/logs.component.ts
index 939e710d7..22375fcd9 100644
--- a/client/src/app/+admin/system/logs/logs.component.ts
+++ b/client/src/app/+admin/system/logs/logs.component.ts
@@ -1,6 +1,6 @@
1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' 1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
2import { LocalStorageService, Notifier } from '@app/core' 2import { LocalStorageService, Notifier } from '@app/core'
3import { ServerLogLevel } from '@shared/models' 3import { ServerLogLevel } from '@peertube/peertube-models'
4import { LogRow } from './log-row.model' 4import { LogRow } from './log-row.model'
5import { LogsService } from './logs.service' 5import { LogsService } from './logs.service'
6 6
diff --git a/client/src/app/+admin/system/logs/logs.service.ts b/client/src/app/+admin/system/logs/logs.service.ts
index 933a074a8..9e774d7fd 100644
--- a/client/src/app/+admin/system/logs/logs.service.ts
+++ b/client/src/app/+admin/system/logs/logs.service.ts
@@ -3,7 +3,7 @@ import { catchError, map } from 'rxjs/operators'
3import { HttpClient, HttpParams } from '@angular/common/http' 3import { HttpClient, HttpParams } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { RestExtractor, RestService } from '@app/core' 5import { RestExtractor, RestService } from '@app/core'
6import { ServerLogLevel } from '@shared/models' 6import { ServerLogLevel } from '@peertube/peertube-models'
7import { environment } from '../../../../environments/environment' 7import { environment } from '../../../../environments/environment'
8import { LogRow } from './log-row.model' 8import { LogRow } from './log-row.model'
9 9
diff --git a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts
index 2670eac86..e75446d8c 100644
--- a/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts
+++ b/client/src/app/+admin/system/runners/runner-job-list/runner-job-list.component.ts
@@ -3,7 +3,7 @@ import { Component, OnInit } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
4import { formatICU } from '@app/helpers' 4import { formatICU } from '@app/helpers'
5import { DropdownAction } from '@app/shared/shared-main' 5import { DropdownAction } from '@app/shared/shared-main'
6import { RunnerJob, RunnerJobState } from '@shared/models' 6import { RunnerJob, RunnerJobState } from '@peertube/peertube-models'
7import { RunnerJobFormatted, RunnerService } from '../runner.service' 7import { RunnerJobFormatted, RunnerService } from '../runner.service'
8import { AdvancedInputFilter } from '@app/shared/shared-forms' 8import { AdvancedInputFilter } from '@app/shared/shared-forms'
9 9
diff --git a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts
index 7566f967e..0964471f9 100644
--- a/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts
+++ b/client/src/app/+admin/system/runners/runner-list/runner-list.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
4import { DropdownAction } from '@app/shared/shared-main' 4import { DropdownAction } from '@app/shared/shared-main'
5import { Runner } from '@shared/models' 5import { Runner } from '@peertube/peertube-models'
6import { RunnerService } from '../runner.service' 6import { RunnerService } from '../runner.service'
7 7
8@Component({ 8@Component({
diff --git a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts
index 77908a2e1..c8a597b18 100644
--- a/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts
+++ b/client/src/app/+admin/system/runners/runner-registration-token-list/runner-registration-token-list.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core' 3import { ConfirmService, Notifier, RestPagination, RestTable } from '@app/core'
4import { DropdownAction } from '@app/shared/shared-main' 4import { DropdownAction } from '@app/shared/shared-main'
5import { RunnerRegistrationToken } from '@shared/models' 5import { RunnerRegistrationToken } from '@peertube/peertube-models'
6import { RunnerService } from '../runner.service' 6import { RunnerService } from '../runner.service'
7 7
8@Component({ 8@Component({
diff --git a/client/src/app/+admin/system/runners/runner.service.ts b/client/src/app/+admin/system/runners/runner.service.ts
index 3ab36c4ff..94bdaad78 100644
--- a/client/src/app/+admin/system/runners/runner.service.ts
+++ b/client/src/app/+admin/system/runners/runner.service.ts
@@ -4,9 +4,8 @@ import { catchError, concatMap, forkJoin, from, map, toArray } from 'rxjs'
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, ServerService } from '@app/core' 6import { RestExtractor, RestPagination, RestService, ServerService } from '@app/core'
7import { arrayify, peertubeTranslate } from '@shared/core-utils' 7import { arrayify, peertubeTranslate } from '@peertube/peertube-core-utils'
8import { ResultList } from '@shared/models/common' 8import { ResultList, Runner, RunnerJob, RunnerJobAdmin, RunnerJobState, RunnerRegistrationToken } from '@peertube/peertube-models'
9import { Runner, RunnerJob, RunnerJobAdmin, RunnerJobState, RunnerRegistrationToken } from '@shared/models/runners'
10import { environment } from '../../../../environments/environment' 9import { environment } from '../../../../environments/environment'
11 10
12export type RunnerJobFormatted = RunnerJob & { 11export type RunnerJobFormatted = RunnerJob & {
diff --git a/client/src/app/+admin/system/runners/runners.routes.ts b/client/src/app/+admin/system/runners/runners.routes.ts
index fabe687d6..004c3bedd 100644
--- a/client/src/app/+admin/system/runners/runners.routes.ts
+++ b/client/src/app/+admin/system/runners/runners.routes.ts
@@ -1,6 +1,6 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { UserRightGuard } from '@app/core' 2import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models' 3import { UserRight } from '@peertube/peertube-models'
4import { RunnerJobListComponent } from './runner-job-list' 4import { RunnerJobListComponent } from './runner-job-list'
5import { RunnerListComponent } from './runner-list' 5import { RunnerListComponent } from './runner-list'
6import { RunnerRegistrationTokenListComponent } from './runner-registration-token-list' 6import { RunnerRegistrationTokenListComponent } from './runner-registration-token-list'
diff --git a/client/src/app/+admin/system/system.routes.ts b/client/src/app/+admin/system/system.routes.ts
index 87e4b25b3..169d52952 100644
--- a/client/src/app/+admin/system/system.routes.ts
+++ b/client/src/app/+admin/system/system.routes.ts
@@ -1,6 +1,6 @@
1import { Routes } from '@angular/router' 1import { Routes } from '@angular/router'
2import { UserRightGuard } from '@app/core' 2import { UserRightGuard } from '@app/core'
3import { UserRight } from '@shared/models' 3import { UserRight } from '@peertube/peertube-models'
4import { DebugComponent } from './debug' 4import { DebugComponent } from './debug'
5import { JobsComponent } from './jobs/jobs.component' 5import { JobsComponent } from './jobs/jobs.component'
6import { LogsComponent } from './logs' 6import { LogsComponent } from './logs'
diff --git a/client/src/app/+error-page/error-page.component.ts b/client/src/app/+error-page/error-page.component.ts
index 4fee01350..9cc4646df 100644
--- a/client/src/app/+error-page/error-page.component.ts
+++ b/client/src/app/+error-page/error-page.component.ts
@@ -1,7 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { Title } from '@angular/platform-browser' 2import { Title } from '@angular/platform-browser'
3import { Router } from '@angular/router' 3import { Router } from '@angular/router'
4import { HttpStatusCode } from '@shared/models' 4import { HttpStatusCode, HttpStatusCodeType } from '@peertube/peertube-models'
5 5
6@Component({ 6@Component({
7 selector: 'my-error-page', 7 selector: 'my-error-page',
@@ -9,7 +9,7 @@ import { HttpStatusCode } from '@shared/models'
9 styleUrls: [ './error-page.component.scss' ] 9 styleUrls: [ './error-page.component.scss' ]
10}) 10})
11export class ErrorPageComponent implements OnInit { 11export class ErrorPageComponent implements OnInit {
12 status = HttpStatusCode.NOT_FOUND_404 12 status: HttpStatusCodeType = HttpStatusCode.NOT_FOUND_404
13 type: 'video' | 'other' = 'other' 13 type: 'video' | 'other' = 'other'
14 14
15 public constructor ( 15 public constructor (
diff --git a/client/src/app/+login/login.component.ts b/client/src/app/+login/login.component.ts
index e486df61d..a6906efa2 100644
--- a/client/src/app/+login/login.component.ts
+++ b/client/src/app/+login/login.component.ts
@@ -8,8 +8,8 @@ import { USER_OTP_TOKEN_VALIDATOR } from '@app/shared/form-validators/user-valid
8import { FormReactive, FormReactiveService, InputTextComponent } from '@app/shared/shared-forms' 8import { FormReactive, FormReactiveService, InputTextComponent } from '@app/shared/shared-forms'
9import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' 9import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
10import { NgbAccordionDirective, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' 10import { NgbAccordionDirective, NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
11import { getExternalAuthHref } from '@shared/core-utils' 11import { getExternalAuthHref } from '@peertube/peertube-core-utils'
12import { RegisteredExternalAuthConfig, ServerConfig, ServerErrorCode } from '@shared/models' 12import { RegisteredExternalAuthConfig, ServerConfig, ServerErrorCode } from '@peertube/peertube-models'
13 13
14@Component({ 14@Component({
15 selector: 'my-login', 15 selector: 'my-login',
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
index 8ca94b0b3..3f876078f 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-create.component.ts
@@ -11,7 +11,7 @@ import {
11} from '@app/shared/form-validators/video-channel-validators' 11} from '@app/shared/form-validators/video-channel-validators'
12import { FormReactiveService } from '@app/shared/shared-forms' 12import { FormReactiveService } from '@app/shared/shared-forms'
13import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' 13import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
14import { HttpStatusCode, VideoChannelCreate } from '@shared/models' 14import { HttpStatusCode, VideoChannelCreate } from '@peertube/peertube-models'
15import { VideoChannelEdit } from './video-channel-edit' 15import { VideoChannelEdit } from './video-channel-edit'
16 16
17@Component({ 17@Component({
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
index f9045db35..3992e298e 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
+++ b/client/src/app/+manage/video-channel-edit/video-channel-update.component.ts
@@ -11,9 +11,9 @@ import {
11} from '@app/shared/form-validators/video-channel-validators' 11} from '@app/shared/form-validators/video-channel-validators'
12import { FormReactiveService } from '@app/shared/shared-forms' 12import { FormReactiveService } from '@app/shared/shared-forms'
13import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' 13import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
14import { HTMLServerConfig, VideoChannelUpdate } from '@shared/models' 14import { HTMLServerConfig, VideoChannelUpdate } from '@peertube/peertube-models'
15import { VideoChannelEdit } from './video-channel-edit' 15import { VideoChannelEdit } from './video-channel-edit'
16import { shallowCopy } from '@shared/core-utils' 16import { shallowCopy } from '@peertube/peertube-core-utils'
17 17
18@Component({ 18@Component({
19 selector: 'my-video-channel-update', 19 selector: 'my-video-channel-update',
diff --git a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts
index e88cdd228..281a12eda 100644
--- a/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts
+++ b/client/src/app/+my-account/my-account-applications/my-account-applications.component.ts
@@ -1,8 +1,7 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core' 2import { AuthService, ConfirmService, Notifier, ScopedTokensService } from '@app/core'
3import { VideoService } from '@app/shared/shared-main' 3import { VideoService } from '@app/shared/shared-main'
4import { FeedFormat } from '@shared/models' 4import { FeedFormat, ScopedToken } from '@peertube/peertube-models'
5import { ScopedToken } from '@shared/models/users/user-scoped-token'
6import { environment } from '../../../environments/environment' 5import { environment } from '../../../environments/environment'
7 6
8@Component({ 7@Component({
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
index 1e8fa2a56..7bbd240d0 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-email/my-account-change-email.component.ts
@@ -4,7 +4,7 @@ import { Component, OnInit } from '@angular/core'
4import { AuthService, Notifier, ServerService, UserService } from '@app/core' 4import { AuthService, Notifier, ServerService, UserService } from '@app/core'
5import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators' 5import { USER_EMAIL_VALIDATOR, USER_PASSWORD_VALIDATOR } from '@app/shared/form-validators/user-validators'
6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
7import { HttpStatusCode, User } from '@shared/models' 7import { HttpStatusCode, User } from '@peertube/peertube-models'
8 8
9@Component({ 9@Component({
10 selector: 'my-account-change-email', 10 selector: 'my-account-change-email',
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
index 805d50070..f916740be 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts
@@ -7,7 +7,7 @@ import {
7 USER_PASSWORD_VALIDATOR 7 USER_PASSWORD_VALIDATOR
8} from '@app/shared/form-validators/user-validators' 8} from '@app/shared/form-validators/user-validators'
9import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 9import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
10import { HttpStatusCode, User } from '@shared/models' 10import { HttpStatusCode, User } from '@peertube/peertube-models'
11 11
12@Component({ 12@Component({
13 selector: 'my-account-change-password', 13 selector: 'my-account-change-password',
diff --git a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts
index 381d18922..bf6accc3e 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-email-preferences/my-account-email-preferences.component.ts
@@ -2,7 +2,7 @@ import { Subject } from 'rxjs'
2import { Component, Input, OnInit } from '@angular/core' 2import { Component, Input, OnInit } from '@angular/core'
3import { Notifier, UserService } from '@app/core' 3import { Notifier, UserService } from '@app/core'
4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
5import { User, UserUpdateMe } from '@shared/models' 5import { User, UserUpdateMe } from '@peertube/peertube-models'
6 6
7@Component({ 7@Component({
8 selector: 'my-account-email-preferences', 8 selector: 'my-account-email-preferences',
diff --git a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
index 2adc276a9..f4181340d 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-notification-preferences/my-account-notification-preferences.component.ts
@@ -3,8 +3,8 @@ import { Subject } from 'rxjs'
3import { Component, Input, OnInit } from '@angular/core' 3import { Component, Input, OnInit } from '@angular/core'
4import { Notifier, ServerService, User } from '@app/core' 4import { Notifier, ServerService, User } from '@app/core'
5import { UserNotificationService } from '@app/shared/shared-main' 5import { UserNotificationService } from '@app/shared/shared-main'
6import { objectKeysTyped } from '@shared/core-utils' 6import { objectKeysTyped } from '@peertube/peertube-core-utils'
7import { UserNotificationSetting, UserNotificationSettingValue, UserRight } from '@shared/models' 7import { UserNotificationSetting, UserNotificationSettingValue, UserRight, UserRightType } from '@peertube/peertube-models'
8 8
9@Component({ 9@Component({
10 selector: 'my-account-notification-preferences', 10 selector: 'my-account-notification-preferences',
@@ -19,7 +19,7 @@ export class MyAccountNotificationPreferencesComponent implements OnInit {
19 emailNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {} 19 emailNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {}
20 webNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {} 20 webNotifications: { [ id in keyof UserNotificationSetting ]?: boolean } = {}
21 labelNotifications: { [ id in keyof UserNotificationSetting ]?: string } = {} 21 labelNotifications: { [ id in keyof UserNotificationSetting ]?: string } = {}
22 rightNotifications: { [ id in keyof Partial<UserNotificationSetting> ]?: UserRight } = {} 22 rightNotifications: { [ id in keyof Partial<UserNotificationSetting> ]?: UserRightType } = {}
23 emailEnabled = false 23 emailEnabled = false
24 24
25 private savePreferences = debounce(this.savePreferencesImpl.bind(this), 500) 25 private savePreferences = debounce(this.savePreferencesImpl.bind(this), 500)
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
index a276bb126..4b3b33bcc 100644
--- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
+++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts
@@ -3,7 +3,7 @@ import { HttpErrorResponse } from '@angular/common/http'
3import { AfterViewChecked, Component, OnInit } from '@angular/core' 3import { AfterViewChecked, Component, OnInit } from '@angular/core'
4import { AuthService, Notifier, User, UserService } from '@app/core' 4import { AuthService, Notifier, User, UserService } from '@app/core'
5import { genericUploadErrorHandler } from '@app/helpers' 5import { genericUploadErrorHandler } from '@app/helpers'
6import { shallowCopy } from '@shared/core-utils' 6import { shallowCopy } from '@peertube/peertube-core-utils'
7 7
8@Component({ 8@Component({
9 selector: 'my-account-settings', 9 selector: 'my-account-settings',
diff --git a/client/src/app/+my-library/my-follows/my-followers.component.ts b/client/src/app/+my-library/my-follows/my-followers.component.ts
index 0dd9bf6f5..4e3e5bcc4 100644
--- a/client/src/app/+my-library/my-follows/my-followers.component.ts
+++ b/client/src/app/+my-library/my-follows/my-followers.component.ts
@@ -4,7 +4,7 @@ import { ActivatedRoute } from '@angular/router'
4import { AuthService, ComponentPagination, Notifier } from '@app/core' 4import { AuthService, ComponentPagination, Notifier } from '@app/core'
5import { AdvancedInputFilter } from '@app/shared/shared-forms' 5import { AdvancedInputFilter } from '@app/shared/shared-forms'
6import { UserSubscriptionService } from '@app/shared/shared-user-subscription' 6import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
7import { ActorFollow } from '@shared/models' 7import { ActorFollow } from '@peertube/peertube-models'
8 8
9@Component({ 9@Component({
10 templateUrl: './my-followers.component.html', 10 templateUrl: './my-followers.component.html',
diff --git a/client/src/app/+my-library/my-library.component.ts b/client/src/app/+my-library/my-library.component.ts
index ff901952f..35eb617ab 100644
--- a/client/src/app/+my-library/my-library.component.ts
+++ b/client/src/app/+my-library/my-library.component.ts
@@ -1,6 +1,6 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { AuthService, AuthUser, ScreenService, ServerService } from '@app/core' 2import { AuthService, AuthUser, ScreenService, ServerService } from '@app/core'
3import { HTMLServerConfig } from '@shared/models' 3import { HTMLServerConfig } from '@peertube/peertube-models'
4import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component' 4import { TopMenuDropdownParam } from '../shared/shared-main/misc/top-menu-dropdown.component'
5 5
6@Component({ 6@Component({
diff --git a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
index ca7eb680b..87e389411 100644
--- a/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-accept-ownership/my-accept-ownership.component.ts
@@ -6,7 +6,7 @@ import { OWNERSHIP_CHANGE_CHANNEL_VALIDATOR } from '@app/shared/form-validators/
6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 6import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
7import { VideoOwnershipService } from '@app/shared/shared-main' 7import { VideoOwnershipService } from '@app/shared/shared-main'
8import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 8import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
9import { VideoChangeOwnership } from '@shared/models' 9import { VideoChangeOwnership } from '@peertube/peertube-models'
10 10
11@Component({ 11@Component({
12 selector: 'my-accept-ownership', 12 selector: 'my-accept-ownership',
diff --git a/client/src/app/+my-library/my-ownership/my-ownership.component.ts b/client/src/app/+my-library/my-ownership/my-ownership.component.ts
index 8d6a42dfb..4838eca27 100644
--- a/client/src/app/+my-library/my-ownership/my-ownership.component.ts
+++ b/client/src/app/+my-library/my-ownership/my-ownership.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Component, OnInit, ViewChild } from '@angular/core' 2import { Component, OnInit, ViewChild } from '@angular/core'
3import { Notifier, RestPagination, RestTable } from '@app/core' 3import { Notifier, RestPagination, RestTable } from '@app/core'
4import { Account, VideoOwnershipService } from '@app/shared/shared-main' 4import { Account, VideoOwnershipService } from '@app/shared/shared-main'
5import { VideoChangeOwnership, VideoChangeOwnershipStatus } from '@shared/models' 5import { VideoChangeOwnership, VideoChangeOwnershipStatus, VideoChangeOwnershipStatusType } from '@peertube/peertube-models'
6import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component' 6import { MyAcceptOwnershipComponent } from './my-accept-ownership/my-accept-ownership.component'
7 7
8@Component({ 8@Component({
@@ -32,7 +32,7 @@ export class MyOwnershipComponent extends RestTable implements OnInit {
32 return 'MyOwnershipComponent' 32 return 'MyOwnershipComponent'
33 } 33 }
34 34
35 getStatusClass (status: VideoChangeOwnershipStatus) { 35 getStatusClass (status: VideoChangeOwnershipStatusType) {
36 switch (status) { 36 switch (status) {
37 case VideoChangeOwnershipStatus.ACCEPTED: 37 case VideoChangeOwnershipStatus.ACCEPTED:
38 return 'badge-green' 38 return 'badge-green'
diff --git a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
index 1f7287f44..44e5c45b9 100644
--- a/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
+++ b/client/src/app/+my-library/my-video-channel-syncs/my-video-channel-syncs.component.ts
@@ -3,8 +3,7 @@ import { mergeMap } from 'rxjs'
3import { Component, OnInit } from '@angular/core' 3import { Component, OnInit } from '@angular/core'
4import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core' 4import { AuthService, Notifier, RestPagination, RestTable, ServerService } from '@app/core'
5import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' 5import { DropdownAction, VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main'
6import { HTMLServerConfig } from '@shared/models/server' 6import { HTMLServerConfig, VideoChannelSync, VideoChannelSyncState, VideoChannelSyncStateType } from '@peertube/peertube-models'
7import { VideoChannelSync, VideoChannelSyncState } from '@shared/models/videos'
8 7
9@Component({ 8@Component({
10 templateUrl: './my-video-channel-syncs.component.html', 9 templateUrl: './my-video-channel-syncs.component.html',
@@ -124,7 +123,7 @@ export class MyVideoChannelSyncsComponent extends RestTable implements OnInit {
124 return '/my-library/video-channel-syncs/create' 123 return '/my-library/video-channel-syncs/create'
125 } 124 }
126 125
127 getSyncStateClass (stateId: VideoChannelSyncState) { 126 getSyncStateClass (stateId: VideoChannelSyncStateType) {
128 return [ 'pt-badge', MyVideoChannelSyncsComponent.STATE_CLASS_BY_ID[stateId] ] 127 return [ 'pt-badge', MyVideoChannelSyncsComponent.STATE_CLASS_BY_ID[stateId] ]
129 } 128 }
130 129
diff --git a/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts b/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts
index a14ab5b92..a40a68764 100644
--- a/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts
+++ b/client/src/app/+my-library/my-video-channel-syncs/video-channel-sync-edit/video-channel-sync-edit.component.ts
@@ -7,7 +7,7 @@ import { listUserChannelsForSelect } from '@app/helpers'
7import { VIDEO_CHANNEL_EXTERNAL_URL_VALIDATOR } from '@app/shared/form-validators/video-channel-validators' 7import { VIDEO_CHANNEL_EXTERNAL_URL_VALIDATOR } from '@app/shared/form-validators/video-channel-validators'
8import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 8import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
9import { VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main' 9import { VideoChannelService, VideoChannelSyncService } from '@app/shared/shared-main'
10import { VideoChannelSyncCreate } from '@shared/models/videos' 10import { VideoChannelSyncCreate } from '@peertube/peertube-models'
11 11
12@Component({ 12@Component({
13 selector: 'my-video-channel-sync-edit', 13 selector: 'my-video-channel-sync-edit',
diff --git a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
index 7d82f62b9..76cefa7bd 100644
--- a/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
+++ b/client/src/app/+my-library/my-video-imports/my-video-imports.component.ts
@@ -2,7 +2,7 @@ import { SortMeta } from 'primeng/api'
2import { Component, OnInit } from '@angular/core' 2import { Component, OnInit } from '@angular/core'
3import { Notifier, RestPagination, RestTable } from '@app/core' 3import { Notifier, RestPagination, RestTable } from '@app/core'
4import { Video, VideoImportService } from '@app/shared/shared-main' 4import { Video, VideoImportService } from '@app/shared/shared-main'
5import { VideoImport, VideoImportState } from '@shared/models' 5import { VideoImport, VideoImportState, VideoImportStateType } from '@peertube/peertube-models'
6 6
7@Component({ 7@Component({
8 templateUrl: './my-video-imports.component.html', 8 templateUrl: './my-video-imports.component.html',
@@ -29,7 +29,7 @@ export class MyVideoImportsComponent extends RestTable implements OnInit {
29 return 'MyVideoImportsComponent' 29 return 'MyVideoImportsComponent'
30 } 30 }
31 31
32 getVideoImportStateClass (state: VideoImportState) { 32 getVideoImportStateClass (state: VideoImportStateType) {
33 switch (state) { 33 switch (state) {
34 case VideoImportState.FAILED: 34 case VideoImportState.FAILED:
35 return 'badge-red' 35 return 'badge-red'
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
index 63f72df3f..a54b3ca86 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-create.component.ts
@@ -11,8 +11,7 @@ import {
11} from '@app/shared/form-validators/video-playlist-validators' 11} from '@app/shared/form-validators/video-playlist-validators'
12import { FormReactiveService } from '@app/shared/shared-forms' 12import { FormReactiveService } from '@app/shared/shared-forms'
13import { VideoPlaylistService } from '@app/shared/shared-video-playlist' 13import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
14import { VideoPlaylistCreate } from '@shared/models/videos/playlist/video-playlist-create.model' 14import { VideoPlaylistCreate, VideoPlaylistPrivacy } from '@peertube/peertube-models'
15import { VideoPlaylistPrivacy } from '@shared/models/videos/playlist/video-playlist-privacy.model'
16import { MyVideoPlaylistEdit } from './my-video-playlist-edit' 15import { MyVideoPlaylistEdit } from './my-video-playlist-edit'
17 16
18@Component({ 17@Component({
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts
index 71db0592a..127960a58 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-edit.ts
@@ -1,13 +1,12 @@
1import { FormReactive } from '@app/shared/shared-forms' 1import { FormReactive } from '@app/shared/shared-forms'
2import { VideoConstant, VideoPlaylistPrivacy } from '@shared/models' 2import { VideoConstant, VideoPlaylist, VideoPlaylistPrivacyType } from '@peertube/peertube-models'
3import { VideoPlaylist } from '@shared/models/videos/playlist/video-playlist.model'
4import { SelectChannelItem } from '../../../types/select-options-item.model' 3import { SelectChannelItem } from '../../../types/select-options-item.model'
5 4
6export abstract class MyVideoPlaylistEdit extends FormReactive { 5export abstract class MyVideoPlaylistEdit extends FormReactive {
7 // Declare it here to avoid errors in create template 6 // Declare it here to avoid errors in create template
8 videoPlaylistToUpdate: VideoPlaylist 7 videoPlaylistToUpdate: VideoPlaylist
9 userVideoChannels: SelectChannelItem[] = [] 8 userVideoChannels: SelectChannelItem[] = []
10 videoPlaylistPrivacies: VideoConstant<VideoPlaylistPrivacy>[] = [] 9 videoPlaylistPrivacies: VideoConstant<VideoPlaylistPrivacyType>[] = []
11 10
12 abstract isCreation (): boolean 11 abstract isCreation (): boolean
13 abstract getFormButtonTitle (): string 12 abstract getFormButtonTitle (): string
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
index c9739b6cc..7a9588743 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-elements.component.ts
@@ -6,7 +6,7 @@ import { ComponentPagination, ConfirmService, HooksService, Notifier, ScreenServ
6import { DropdownAction } from '@app/shared/shared-main' 6import { DropdownAction } from '@app/shared/shared-main'
7import { VideoShareComponent } from '@app/shared/shared-share-modal' 7import { VideoShareComponent } from '@app/shared/shared-share-modal'
8import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' 8import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
9import { VideoPlaylistType } from '@shared/models' 9import { VideoPlaylistType } from '@peertube/peertube-models'
10 10
11@Component({ 11@Component({
12 templateUrl: './my-video-playlist-elements.component.html', 12 templateUrl: './my-video-playlist-elements.component.html',
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
index bbe8a5f80..f29a0cc45 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlist-update.component.ts
@@ -13,7 +13,7 @@ import {
13} from '@app/shared/form-validators/video-playlist-validators' 13} from '@app/shared/form-validators/video-playlist-validators'
14import { FormReactiveService } from '@app/shared/shared-forms' 14import { FormReactiveService } from '@app/shared/shared-forms'
15import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' 15import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
16import { VideoPlaylistUpdate } from '@shared/models' 16import { VideoPlaylistUpdate } from '@peertube/peertube-models'
17import { MyVideoPlaylistEdit } from './my-video-playlist-edit' 17import { MyVideoPlaylistEdit } from './my-video-playlist-edit'
18 18
19@Component({ 19@Component({
diff --git a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
index 634176744..08bd94fae 100644
--- a/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
+++ b/client/src/app/+my-library/my-video-playlists/my-video-playlists.component.ts
@@ -3,7 +3,7 @@ import { mergeMap } from 'rxjs/operators'
3import { Component } from '@angular/core' 3import { Component } from '@angular/core'
4import { AuthService, ComponentPagination, ConfirmService, Notifier } from '@app/core' 4import { AuthService, ComponentPagination, ConfirmService, Notifier } from '@app/core'
5import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' 5import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
6import { VideoPlaylistType } from '@shared/models' 6import { VideoPlaylistType } from '@peertube/peertube-models'
7 7
8@Component({ 8@Component({
9 templateUrl: './my-video-playlists.component.html', 9 templateUrl: './my-video-playlists.component.html',
diff --git a/client/src/app/+my-library/my-videos/my-videos.component.ts b/client/src/app/+my-library/my-videos/my-videos.component.ts
index 1827d6a0b..4a7604878 100644
--- a/client/src/app/+my-library/my-videos/my-videos.component.ts
+++ b/client/src/app/+my-library/my-videos/my-videos.component.ts
@@ -16,7 +16,7 @@ import {
16 VideosSelectionComponent 16 VideosSelectionComponent
17} from '@app/shared/shared-video-miniature' 17} from '@app/shared/shared-video-miniature'
18import { VideoPlaylistService } from '@app/shared/shared-video-playlist' 18import { VideoPlaylistService } from '@app/shared/shared-video-playlist'
19import { VideoChannel, VideoExistInPlaylist, VideosExistInPlaylists, VideoSortField } from '@shared/models' 19import { VideoChannel, VideoExistInPlaylist, VideosExistInPlaylists, VideoSortField } from '@peertube/peertube-models'
20import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component' 20import { VideoChangeOwnershipComponent } from './modals/video-change-ownership.component'
21 21
22@Component({ 22@Component({
diff --git a/client/src/app/+search/search-filters.component.ts b/client/src/app/+search/search-filters.component.ts
index a6fc51383..b98acee18 100644
--- a/client/src/app/+search/search-filters.component.ts
+++ b/client/src/app/+search/search-filters.component.ts
@@ -1,7 +1,7 @@
1import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core' 1import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
2import { ServerService } from '@app/core' 2import { ServerService } from '@app/core'
3import { AdvancedSearch } from '@app/shared/shared-search' 3import { AdvancedSearch } from '@app/shared/shared-search'
4import { HTMLServerConfig, VideoConstant } from '@shared/models' 4import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models'
5 5
6type FormOption = { id: string, label: string } 6type FormOption = { id: string, label: string }
7 7
diff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.ts
index 31394a1d1..62e349c40 100644
--- a/client/src/app/+search/search.component.ts
+++ b/client/src/app/+search/search.component.ts
@@ -9,7 +9,7 @@ import { Video, VideoChannel } from '@app/shared/shared-main'
9import { AdvancedSearch, SearchService } from '@app/shared/shared-search' 9import { AdvancedSearch, SearchService } from '@app/shared/shared-search'
10import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature' 10import { MiniatureDisplayOptions } from '@app/shared/shared-video-miniature'
11import { VideoPlaylist } from '@app/shared/shared-video-playlist' 11import { VideoPlaylist } from '@app/shared/shared-video-playlist'
12import { HTMLServerConfig, SearchTargetType } from '@shared/models' 12import { HTMLServerConfig, SearchTargetType } from '@peertube/peertube-models'
13 13
14@Component({ 14@Component({
15 selector: 'my-search', 15 selector: 'my-search',
diff --git a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
index 6765ba15e..4e8b71293 100644
--- a/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
+++ b/client/src/app/+search/shared/abstract-lazy-load.resolver.ts
@@ -2,7 +2,7 @@ import { Observable } from 'rxjs'
2import { map } from 'rxjs/operators' 2import { map } from 'rxjs/operators'
3import { ActivatedRouteSnapshot, Router } from '@angular/router' 3import { ActivatedRouteSnapshot, Router } from '@angular/router'
4import { logger } from '@root-helpers/logger' 4import { logger } from '@root-helpers/logger'
5import { ResultList } from '@shared/models' 5import { ResultList } from '@peertube/peertube-models'
6 6
7export abstract class AbstractLazyLoadResolver <T> { 7export abstract class AbstractLazyLoadResolver <T> {
8 protected router: Router 8 protected router: Router
diff --git a/client/src/app/+signup/+register/register.component.ts b/client/src/app/+signup/+register/register.component.ts
index be51c36d1..396971d98 100644
--- a/client/src/app/+signup/+register/register.component.ts
+++ b/client/src/app/+signup/+register/register.component.ts
@@ -5,8 +5,7 @@ import { ActivatedRoute } from '@angular/router'
5import { AuthService } from '@app/core' 5import { AuthService } from '@app/core'
6import { HooksService } from '@app/core/plugins/hooks.service' 6import { HooksService } from '@app/core/plugins/hooks.service'
7import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance' 7import { InstanceAboutAccordionComponent } from '@app/shared/shared-instance'
8import { UserRegister } from '@shared/models' 8import { ServerConfig, UserRegister } from '@peertube/peertube-models'
9import { ServerConfig } from '@shared/models/server'
10import { SignupService } from '../shared/signup.service' 9import { SignupService } from '../shared/signup.service'
11 10
12@Component({ 11@Component({
diff --git a/client/src/app/+signup/shared/signup.service.ts b/client/src/app/+signup/shared/signup.service.ts
index f647298be..7c331437e 100644
--- a/client/src/app/+signup/shared/signup.service.ts
+++ b/client/src/app/+signup/shared/signup.service.ts
@@ -2,7 +2,7 @@ import { catchError, tap } 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 { UserRegister, UserRegistrationRequest } from '@shared/models' 5import { UserRegister, UserRegistrationRequest } from '@peertube/peertube-models'
6 6
7@Injectable() 7@Injectable()
8export class SignupService { 8export class SignupService {
diff --git a/client/src/app/+stats/video/video-stats.component.ts b/client/src/app/+stats/video/video-stats.component.ts
index fa5e33ab6..5bde5b01d 100644
--- a/client/src/app/+stats/video/video-stats.component.ts
+++ b/client/src/app/+stats/video/video-stats.component.ts
@@ -7,15 +7,15 @@ import { ActivatedRoute } from '@angular/router'
7import { Notifier, PeerTubeRouterService } from '@app/core' 7import { Notifier, PeerTubeRouterService } from '@app/core'
8import { NumberFormatterPipe, VideoDetails } from '@app/shared/shared-main' 8import { NumberFormatterPipe, VideoDetails } from '@app/shared/shared-main'
9import { LiveVideoService } from '@app/shared/shared-video-live' 9import { LiveVideoService } from '@app/shared/shared-video-live'
10import { secondsToTime } from '@shared/core-utils' 10import { secondsToTime } from '@peertube/peertube-core-utils'
11import { HttpStatusCode } from '@shared/models/http'
12import { 11import {
12 HttpStatusCode,
13 LiveVideoSession, 13 LiveVideoSession,
14 VideoStatsOverall, 14 VideoStatsOverall,
15 VideoStatsRetention, 15 VideoStatsRetention,
16 VideoStatsTimeserie, 16 VideoStatsTimeserie,
17 VideoStatsTimeserieMetric 17 VideoStatsTimeserieMetric
18} from '@shared/models/videos' 18} from '@peertube/peertube-models'
19import { VideoStatsService } from './video-stats.service' 19import { VideoStatsService } from './video-stats.service'
20 20
21type ActiveGraphId = VideoStatsTimeserieMetric | 'retention' | 'countries' 21type ActiveGraphId = VideoStatsTimeserieMetric | 'retention' | 'countries'
diff --git a/client/src/app/+stats/video/video-stats.service.ts b/client/src/app/+stats/video/video-stats.service.ts
index e019c87f7..5d4817892 100644
--- a/client/src/app/+stats/video/video-stats.service.ts
+++ b/client/src/app/+stats/video/video-stats.service.ts
@@ -4,7 +4,7 @@ import { HttpClient, HttpParams } 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 { VideoService } from '@app/shared/shared-main' 6import { VideoService } from '@app/shared/shared-main'
7import { VideoStatsOverall, VideoStatsRetention, VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@shared/models/videos' 7import { VideoStatsOverall, VideoStatsRetention, VideoStatsTimeserie, VideoStatsTimeserieMetric } from '@peertube/peertube-models'
8 8
9@Injectable({ 9@Injectable({
10 providedIn: 'root' 10 providedIn: 'root'
diff --git a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
index 5e3946bf5..725990300 100644
--- a/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
+++ b/client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
@@ -4,7 +4,7 @@ import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'
4import { ComponentPaginationLight, DisableForReuseHook, HooksService, ScreenService } from '@app/core' 4import { ComponentPaginationLight, DisableForReuseHook, HooksService, ScreenService } from '@app/core'
5import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main' 5import { VideoChannel, VideoChannelService, VideoService } from '@app/shared/shared-main'
6import { MiniatureDisplayOptions, VideoFilters } from '@app/shared/shared-video-miniature' 6import { MiniatureDisplayOptions, VideoFilters } from '@app/shared/shared-video-miniature'
7import { Video, VideoSortField } from '@shared/models' 7import { Video, VideoSortField } from '@peertube/peertube-models'
8 8
9@Component({ 9@Component({
10 selector: 'my-video-channel-videos', 10 selector: 'my-video-channel-videos',
diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts
index f5bea66ec..40b3b19b7 100644
--- a/client/src/app/+video-channels/video-channels.component.ts
+++ b/client/src/app/+video-channels/video-channels.component.ts
@@ -8,7 +8,7 @@ import { Account, ListOverflowItem, VideoChannel, VideoChannelService, VideoServ
8import { BlocklistService } from '@app/shared/shared-moderation' 8import { BlocklistService } from '@app/shared/shared-moderation'
9import { SupportModalComponent } from '@app/shared/shared-support-modal' 9import { SupportModalComponent } from '@app/shared/shared-support-modal'
10import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' 10import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
11import { HttpStatusCode, UserRight } from '@shared/models' 11import { HttpStatusCode, UserRight } from '@peertube/peertube-models'
12 12
13@Component({ 13@Component({
14 templateUrl: './video-channels.component.html', 14 templateUrl: './video-channels.component.html',
diff --git a/client/src/app/+video-studio/edit/video-studio-edit.component.ts b/client/src/app/+video-studio/edit/video-studio-edit.component.ts
index 3d618fbe1..40e9cf40a 100644
--- a/client/src/app/+video-studio/edit/video-studio-edit.component.ts
+++ b/client/src/app/+video-studio/edit/video-studio-edit.component.ts
@@ -5,8 +5,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
5import { VideoDetails } from '@app/shared/shared-main' 5import { VideoDetails } from '@app/shared/shared-main'
6import { LoadingBarService } from '@ngx-loading-bar/core' 6import { LoadingBarService } from '@ngx-loading-bar/core'
7import { logger } from '@root-helpers/logger' 7import { logger } from '@root-helpers/logger'
8import { secondsToTime } from '@shared/core-utils' 8import { secondsToTime } from '@peertube/peertube-core-utils'
9import { VideoStudioTask, VideoStudioTaskCut } from '@shared/models' 9import { VideoStudioTask, VideoStudioTaskCut } from '@peertube/peertube-models'
10import { VideoStudioService } from '../shared' 10import { VideoStudioService } from '../shared'
11 11
12@Component({ 12@Component({
diff --git a/client/src/app/+video-studio/shared/video-studio.service.ts b/client/src/app/+video-studio/shared/video-studio.service.ts
index 8d8b2f0e5..a3aabd347 100644
--- a/client/src/app/+video-studio/shared/video-studio.service.ts
+++ b/client/src/app/+video-studio/shared/video-studio.service.ts
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core'
4import { RestExtractor } from '@app/core' 4import { RestExtractor } from '@app/core'
5import { objectToFormData } from '@app/helpers' 5import { objectToFormData } from '@app/helpers'
6import { VideoService } from '@app/shared/shared-main' 6import { VideoService } from '@app/shared/shared-main'
7import { VideoStudioCreateEdition, VideoStudioTask } from '@shared/models' 7import { VideoStudioCreateEdition, VideoStudioTask } from '@peertube/peertube-models'
8 8
9@Injectable() 9@Injectable()
10export class VideoStudioService { 10export class VideoStudioService {
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
index 4ab2d42db..e595cf2c9 100644
--- a/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-caption-add-modal.component.ts
@@ -4,7 +4,7 @@ import { VIDEO_CAPTION_FILE_VALIDATOR, VIDEO_CAPTION_LANGUAGE_VALIDATOR } from '
4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 4import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
5import { VideoCaptionEdit } from '@app/shared/shared-main' 5import { VideoCaptionEdit } from '@app/shared/shared-main'
6import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' 6import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
7import { HTMLServerConfig, VideoConstant } from '@shared/models' 7import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models'
8 8
9@Component({ 9@Component({
10 selector: 'my-video-caption-add-modal', 10 selector: 'my-video-caption-add-modal',
diff --git a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts
index 2cb470a24..6c6a30d96 100644
--- a/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-caption-edit-modal-content/video-caption-edit-modal-content.component.ts
@@ -3,7 +3,7 @@ import { VIDEO_CAPTION_FILE_CONTENT_VALIDATOR } from '@app/shared/form-validator
3import { FormReactive, FormReactiveService } from '@app/shared/shared-forms' 3import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
4import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main' 4import { VideoCaptionEdit, VideoCaptionService, VideoCaptionWithPathEdit } from '@app/shared/shared-main'
5import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' 5import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
6import { HTMLServerConfig, VideoConstant } from '@shared/models' 6import { HTMLServerConfig, VideoConstant } from '@peertube/peertube-models'
7import { ServerService } from '../../../../core' 7import { ServerService } from '../../../../core'
8 8
9/** 9/**
diff --git a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
index 460960a01..b0c1352f3 100644
--- a/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-edit.component.ts
@@ -24,8 +24,6 @@ import { FormReactiveValidationMessages, FormValidatorService } from '@app/share
24import { InstanceService } from '@app/shared/shared-instance' 24import { InstanceService } from '@app/shared/shared-instance'
25import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main' 25import { VideoCaptionEdit, VideoCaptionWithPathEdit, VideoEdit, VideoService } from '@app/shared/shared-main'
26import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 26import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
27import { logger } from '@root-helpers/logger'
28import { PluginInfo } from '@root-helpers/plugins-manager'
29import { 27import {
30 HTMLServerConfig, 28 HTMLServerConfig,
31 LiveVideo, 29 LiveVideo,
@@ -34,9 +32,12 @@ import {
34 RegisterClientVideoFieldOptions, 32 RegisterClientVideoFieldOptions,
35 VideoConstant, 33 VideoConstant,
36 VideoDetails, 34 VideoDetails,
37 VideoPrivacy 35 VideoPrivacy,
38} from '@shared/models' 36 VideoPrivacyType,
39import { VideoSource } from '@shared/models/videos/video-source' 37 VideoSource
38} from '@peertube/peertube-models'
39import { logger } from '@root-helpers/logger'
40import { PluginInfo } from '@root-helpers/plugins-manager'
40import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service' 41import { I18nPrimengCalendarService } from './i18n-primeng-calendar.service'
41import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component' 42import { VideoCaptionAddModalComponent } from './video-caption-add-modal.component'
42import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component' 43import { VideoCaptionEditModalContentComponent } from './video-caption-edit-modal-content/video-caption-edit-modal-content.component'
@@ -81,8 +82,8 @@ export class VideoEditComponent implements OnInit, OnDestroy {
81 // So that it can be accessed in the template 82 // So that it can be accessed in the template
82 readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY 83 readonly SPECIAL_SCHEDULED_PRIVACY = VideoEdit.SPECIAL_SCHEDULED_PRIVACY
83 84
84 videoPrivacies: VideoConstant<VideoPrivacy | typeof VideoEdit.SPECIAL_SCHEDULED_PRIVACY > [] = [] 85 videoPrivacies: VideoConstant<VideoPrivacyType | typeof VideoEdit.SPECIAL_SCHEDULED_PRIVACY > [] = []
85 replayPrivacies: VideoConstant<VideoPrivacy> [] = [] 86 replayPrivacies: VideoConstant<VideoPrivacyType> [] = []
86 videoCategories: VideoConstant<number>[] = [] 87 videoCategories: VideoConstant<number>[] = []
87 videoLicences: VideoConstant<number>[] = [] 88 videoLicences: VideoConstant<number>[] = []
88 videoLanguages: VideoLanguages[] = [] 89 videoLanguages: VideoLanguages[] = []
diff --git a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts
index 50ca1a60b..c3f8936a9 100644
--- a/client/src/app/+videos/+video-edit/shared/video-upload.service.ts
+++ b/client/src/app/+videos/+video-edit/shared/video-upload.service.ts
@@ -3,7 +3,7 @@ import { HttpErrorResponse, HttpEventType, HttpHeaders } from '@angular/common/h
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { AuthService, Notifier, ServerService } from '@app/core' 4import { AuthService, Notifier, ServerService } from '@app/core'
5import { BytesPipe, VideoService } from '@app/shared/shared-main' 5import { BytesPipe, VideoService } from '@app/shared/shared-main'
6import { HttpStatusCode } from '@shared/models' 6import { HttpStatusCode } from '@peertube/peertube-models'
7import { UploaderXFormData } from './uploaderx-form-data' 7import { UploaderXFormData } from './uploaderx-form-data'
8 8
9@Injectable() 9@Injectable()
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
index ba612f553..f7a570ed3 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-go-live.component.ts
@@ -16,7 +16,7 @@ import {
16 PeerTubeProblemDocument, 16 PeerTubeProblemDocument,
17 ServerErrorCode, 17 ServerErrorCode,
18 VideoPrivacy 18 VideoPrivacy
19} from '@shared/models' 19} from '@peertube/peertube-models'
20import { VideoSend } from './video-send' 20import { VideoSend } from './video-send'
21 21
22@Component({ 22@Component({
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
index 4a1408a4a..97517e1c7 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-torrent.component.ts
@@ -7,7 +7,7 @@ import { FormReactiveService } from '@app/shared/shared-forms'
7import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' 7import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main'
8import { LoadingBarService } from '@ngx-loading-bar/core' 8import { LoadingBarService } from '@ngx-loading-bar/core'
9import { logger } from '@root-helpers/logger' 9import { logger } from '@root-helpers/logger'
10import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@shared/models' 10import { PeerTubeProblemDocument, ServerErrorCode, VideoUpdate } from '@peertube/peertube-models'
11import { hydrateFormFromVideo } from '../shared/video-edit-utils' 11import { hydrateFormFromVideo } from '../shared/video-edit-utils'
12import { VideoSend } from './video-send' 12import { VideoSend } from './video-send'
13 13
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
index 502f3818e..634bd9914 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-import-url.component.ts
@@ -8,7 +8,7 @@ import { FormReactiveService } from '@app/shared/shared-forms'
8import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main' 8import { VideoCaptionService, VideoEdit, VideoImportService, VideoService } from '@app/shared/shared-main'
9import { LoadingBarService } from '@ngx-loading-bar/core' 9import { LoadingBarService } from '@ngx-loading-bar/core'
10import { logger } from '@root-helpers/logger' 10import { logger } from '@root-helpers/logger'
11import { VideoUpdate } from '@shared/models' 11import { VideoUpdate } from '@peertube/peertube-models'
12import { hydrateFormFromVideo } from '../shared/video-edit-utils' 12import { hydrateFormFromVideo } from '../shared/video-edit-utils'
13import { VideoSend } from './video-send' 13import { VideoSend } from './video-send'
14 14
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
index 9de373cd3..56dcfa0e6 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
@@ -6,16 +6,16 @@ import { listUserChannelsForSelect } from '@app/helpers'
6import { FormReactive } from '@app/shared/shared-forms' 6import { FormReactive } from '@app/shared/shared-forms'
7import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' 7import { VideoCaptionEdit, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main'
8import { LoadingBarService } from '@ngx-loading-bar/core' 8import { LoadingBarService } from '@ngx-loading-bar/core'
9import { HTMLServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' 9import { HTMLServerConfig, VideoConstant, VideoPrivacyType } from '@peertube/peertube-models'
10 10
11@Directive() 11@Directive()
12// eslint-disable-next-line @angular-eslint/directive-class-suffix 12// eslint-disable-next-line @angular-eslint/directive-class-suffix
13export abstract class VideoSend extends FormReactive implements OnInit { 13export abstract class VideoSend extends FormReactive implements OnInit {
14 userVideoChannels: SelectChannelItem[] = [] 14 userVideoChannels: SelectChannelItem[] = []
15 videoPrivacies: VideoConstant<VideoPrivacy>[] = [] 15 videoPrivacies: VideoConstant<VideoPrivacyType>[] = []
16 videoCaptions: VideoCaptionEdit[] = [] 16 videoCaptions: VideoCaptionEdit[] = []
17 17
18 firstStepPrivacyId: VideoPrivacy 18 firstStepPrivacyId: VideoPrivacyType
19 firstStepChannelId: number 19 firstStepChannelId: number
20 20
21 abstract firstStepDone: EventEmitter<string> 21 abstract firstStepDone: EventEmitter<string>
@@ -31,7 +31,7 @@ export abstract class VideoSend extends FormReactive implements OnInit {
31 31
32 protected serverConfig: HTMLServerConfig 32 protected serverConfig: HTMLServerConfig
33 33
34 protected highestPrivacy: VideoPrivacy 34 protected highestPrivacy: VideoPrivacyType
35 35
36 abstract canDeactivate (): CanComponentDeactivateResult 36 abstract canDeactivate (): CanComponentDeactivateResult
37 37
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
index f7e1872a5..cbf43ee5f 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-upload.component.ts
@@ -10,7 +10,7 @@ import { FormReactiveService } from '@app/shared/shared-forms'
10import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main' 10import { Video, VideoCaptionService, VideoEdit, VideoService } from '@app/shared/shared-main'
11import { LoadingBarService } from '@ngx-loading-bar/core' 11import { LoadingBarService } from '@ngx-loading-bar/core'
12import { logger } from '@root-helpers/logger' 12import { logger } from '@root-helpers/logger'
13import { HttpStatusCode, VideoCreateResult } from '@shared/models' 13import { HttpStatusCode, VideoCreateResult } from '@peertube/peertube-models'
14import { VideoUploadService } from '../shared/video-upload.service' 14import { VideoUploadService } from '../shared/video-upload.service'
15import { VideoSend } from './video-send' 15import { VideoSend } from './video-send'
16 16
diff --git a/client/src/app/+videos/+video-edit/video-add.component.ts b/client/src/app/+videos/+video-edit/video-add.component.ts
index 460c37a38..413fe4780 100644
--- a/client/src/app/+videos/+video-edit/video-add.component.ts
+++ b/client/src/app/+videos/+video-edit/video-add.component.ts
@@ -8,7 +8,7 @@ import {
8 ServerService, 8 ServerService,
9 UserService 9 UserService
10} from '@app/core' 10} from '@app/core'
11import { HTMLServerConfig } from '@shared/models' 11import { HTMLServerConfig } from '@peertube/peertube-models'
12import { VideoEditType } from './shared/video-edit.type' 12import { VideoEditType } from './shared/video-edit.type'
13import { VideoGoLiveComponent } from './video-add-components/video-go-live.component' 13import { VideoGoLiveComponent } from './video-add-components/video-go-live.component'
14import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component' 14import { VideoImportTorrentComponent } from './video-add-components/video-import-torrent.component'
diff --git a/client/src/app/+videos/+video-edit/video-update.component.ts b/client/src/app/+videos/+video-edit/video-update.component.ts
index 6ad08cbad..24d91a69a 100644
--- a/client/src/app/+videos/+video-edit/video-update.component.ts
+++ b/client/src/app/+videos/+video-edit/video-update.component.ts
@@ -12,9 +12,8 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
12import { Video, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main' 12import { Video, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main'
13import { LiveVideoService } from '@app/shared/shared-video-live' 13import { LiveVideoService } from '@app/shared/shared-video-live'
14import { LoadingBarService } from '@ngx-loading-bar/core' 14import { LoadingBarService } from '@ngx-loading-bar/core'
15import { pick, simpleObjectsDeepEqual } from '@shared/core-utils' 15import { pick, simpleObjectsDeepEqual } from '@peertube/peertube-core-utils'
16import { HttpStatusCode, LiveVideo, LiveVideoUpdate, VideoPrivacy, VideoState } from '@shared/models' 16import { HttpStatusCode, LiveVideo, LiveVideoUpdate, VideoPrivacy, VideoSource, VideoState } from '@peertube/peertube-models'
17import { VideoSource } from '@shared/models/videos/video-source'
18import { hydrateFormFromVideo } from './shared/video-edit-utils' 17import { hydrateFormFromVideo } from './shared/video-edit-utils'
19import { VideoUploadService } from './shared/video-upload.service' 18import { VideoUploadService } from './shared/video-upload.service'
20 19
diff --git a/client/src/app/+videos/+video-edit/video-update.resolver.ts b/client/src/app/+videos/+video-edit/video-update.resolver.ts
index 2c99b36a8..d114bfb2d 100644
--- a/client/src/app/+videos/+video-edit/video-update.resolver.ts
+++ b/client/src/app/+videos/+video-edit/video-update.resolver.ts
@@ -4,9 +4,9 @@ import { Injectable } from '@angular/core'
4import { ActivatedRouteSnapshot } from '@angular/router' 4import { ActivatedRouteSnapshot } from '@angular/router'
5import { AuthService } from '@app/core' 5import { AuthService } from '@app/core'
6import { listUserChannelsForSelect } from '@app/helpers' 6import { listUserChannelsForSelect } from '@app/helpers'
7import { VideoCaptionService, VideoDetails, VideoService, VideoPasswordService } from '@app/shared/shared-main' 7import { VideoCaptionService, VideoDetails, VideoPasswordService, VideoService } from '@app/shared/shared-main'
8import { LiveVideoService } from '@app/shared/shared-video-live' 8import { LiveVideoService } from '@app/shared/shared-video-live'
9import { VideoPrivacy } from '@shared/models/videos' 9import { VideoPrivacy } from '@peertube/peertube-models'
10 10
11@Injectable() 11@Injectable()
12export class VideoUpdateResolver { 12export class VideoUpdateResolver {
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
index e6c0d4de1..7c89b7e62 100644
--- a/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/action-buttons/action-buttons.component.ts
@@ -5,7 +5,7 @@ import { VideoShareComponent } from '@app/shared/shared-share-modal'
5import { SupportModalComponent } from '@app/shared/shared-support-modal' 5import { SupportModalComponent } from '@app/shared/shared-support-modal'
6import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/shared-video-miniature' 6import { VideoActionsDisplayType, VideoDownloadComponent } from '@app/shared/shared-video-miniature'
7import { VideoPlaylist } from '@app/shared/shared-video-playlist' 7import { VideoPlaylist } from '@app/shared/shared-video-playlist'
8import { UserVideoRateType, VideoCaption, VideoPrivacy } from '@shared/models/videos' 8import { UserVideoRateType, VideoCaption, VideoPrivacy } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-action-buttons', 11 selector: 'my-action-buttons',
diff --git a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts
index 11966ce34..13a709cb0 100644
--- a/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/action-buttons/video-rate.component.ts
@@ -3,7 +3,7 @@ import { Observable } from 'rxjs'
3import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core' 3import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core'
4import { Notifier, ScreenService } from '@app/core' 4import { Notifier, ScreenService } from '@app/core'
5import { VideoDetails, VideoService } from '@app/shared/shared-main' 5import { VideoDetails, VideoService } from '@app/shared/shared-main'
6import { UserVideoRateType } from '@shared/models' 6import { UserVideoRateType } from '@peertube/peertube-models'
7 7
8@Component({ 8@Component({
9 selector: 'my-video-rate', 9 selector: 'my-video-rate',
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
index 1d9e10d0a..a01bd31fe 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment-add.component.ts
@@ -19,7 +19,7 @@ import { FormReactive, FormReactiveService } from '@app/shared/shared-forms'
19import { Video } from '@app/shared/shared-main' 19import { Video } from '@app/shared/shared-main'
20import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment' 20import { VideoComment, VideoCommentService } from '@app/shared/shared-video-comment'
21import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 21import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
22import { VideoCommentCreate } from '@shared/models' 22import { VideoCommentCreate } from '@peertube/peertube-models'
23 23
24@Component({ 24@Component({
25 selector: 'my-video-comment-add', 25 selector: 'my-video-comment-add',
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
index 4c85df657..14422010f 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comment.component.ts
@@ -5,7 +5,7 @@ import { AuthService } from '@app/core/auth'
5import { Account, DropdownAction, Video } from '@app/shared/shared-main' 5import { Account, DropdownAction, Video } from '@app/shared/shared-main'
6import { CommentReportComponent } from '@app/shared/shared-moderation/report-modals/comment-report.component' 6import { CommentReportComponent } from '@app/shared/shared-moderation/report-modals/comment-report.component'
7import { VideoComment, VideoCommentThreadTree } from '@app/shared/shared-video-comment' 7import { VideoComment, VideoCommentThreadTree } from '@app/shared/shared-video-comment'
8import { User, UserRight } from '@shared/models' 8import { User, UserRight } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-video-comment', 11 selector: 'my-video-comment',
diff --git a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
index 848936f91..1a8c89bdc 100644
--- a/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/comment/video-comments.component.ts
@@ -5,7 +5,7 @@ import { AuthService, ComponentPagination, ConfirmService, hasMoreItems, Notifie
5import { HooksService } from '@app/core/plugins/hooks.service' 5import { HooksService } from '@app/core/plugins/hooks.service'
6import { Syndication, VideoDetails } from '@app/shared/shared-main' 6import { Syndication, VideoDetails } from '@app/shared/shared-main'
7import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/shared/shared-video-comment' 7import { VideoComment, VideoCommentService, VideoCommentThreadTree } from '@app/shared/shared-video-comment'
8import { PeerTubeProblemDocument, ServerErrorCode } from '@shared/models' 8import { PeerTubeProblemDocument, ServerErrorCode } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-video-comments', 11 selector: 'my-video-comments',
diff --git a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts
index b51457e02..d2f8aa45d 100644
--- a/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/information/privacy-concerns.component.ts
@@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core'
2import { ServerService, User, UserService } from '@app/core' 2import { ServerService, User, UserService } from '@app/core'
3import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' 3import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
4import { isP2PEnabled } from '@root-helpers/video' 4import { isP2PEnabled } from '@root-helpers/video'
5import { HTMLServerConfig, Video } from '@shared/models' 5import { HTMLServerConfig, Video } from '@peertube/peertube-models'
6 6
7@Component({ 7@Component({
8 selector: 'my-privacy-concerns', 8 selector: 'my-privacy-concerns',
diff --git a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
index 8781ead7e..497c48813 100644
--- a/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/information/video-alert.component.ts
@@ -1,7 +1,7 @@
1import { Component, Input } from '@angular/core' 1import { Component, Input } from '@angular/core'
2import { AuthUser } from '@app/core' 2import { AuthUser } from '@app/core'
3import { VideoDetails } from '@app/shared/shared-main' 3import { VideoDetails } from '@app/shared/shared-main'
4import { VideoPrivacy, VideoState } from '@shared/models' 4import { VideoPrivacy, VideoState } from '@peertube/peertube-models'
5 5
6@Component({ 6@Component({
7 selector: 'my-video-alert', 7 selector: 'my-video-alert',
diff --git a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
index 97d71a510..eca7cf87c 100644
--- a/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
+++ b/client/src/app/+videos/+video-watch/shared/playlist/video-watch-playlist.component.ts
@@ -5,7 +5,7 @@ import { isInViewport } from '@app/helpers'
5import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist' 5import { VideoPlaylist, VideoPlaylistElement, VideoPlaylistService } from '@app/shared/shared-video-playlist'
6import { getBoolOrDefault } from '@root-helpers/local-storage-utils' 6import { getBoolOrDefault } from '@root-helpers/local-storage-utils'
7import { peertubeSessionStorage } from '@root-helpers/peertube-web-storage' 7import { peertubeSessionStorage } from '@root-helpers/peertube-web-storage'
8import { VideoPlaylistPrivacy } from '@shared/models' 8import { VideoPlaylistPrivacy } from '@peertube/peertube-models'
9 9
10@Component({ 10@Component({
11 selector: 'my-video-watch-playlist', 11 selector: 'my-video-watch-playlist',
diff --git a/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
index ba0d30f3d..174fd6610 100644
--- a/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
+++ b/client/src/app/+videos/+video-watch/shared/recommendations/recent-videos-recommendation.service.ts
@@ -4,7 +4,7 @@ import { Injectable } from '@angular/core'
4import { ServerService, UserService } from '@app/core' 4import { ServerService, UserService } from '@app/core'
5import { Video, VideoService } from '@app/shared/shared-main' 5import { Video, VideoService } from '@app/shared/shared-main'
6import { AdvancedSearch, SearchService } from '@app/shared/shared-search' 6import { AdvancedSearch, SearchService } from '@app/shared/shared-search'
7import { HTMLServerConfig } from '@shared/models' 7import { HTMLServerConfig } from '@peertube/peertube-models'
8import { RecommendationInfo } from './recommendation-info.model' 8import { RecommendationInfo } from './recommendation-info.model'
9import { RecommendationService } from './recommendations.service' 9import { RecommendationService } from './recommendations.service'
10 10
diff --git a/client/src/app/+videos/+video-watch/video-watch.component.ts b/client/src/app/+videos/+video-watch/video-watch.component.ts
index 45de62519..f109427cc 100644
--- a/client/src/app/+videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/+videos/+video-watch/video-watch.component.ts
@@ -22,9 +22,7 @@ import { Video, VideoCaptionService, VideoDetails, VideoFileTokenService, VideoS
22import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' 22import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription'
23import { LiveVideoService } from '@app/shared/shared-video-live' 23import { LiveVideoService } from '@app/shared/shared-video-live'
24import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' 24import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist'
25import { logger } from '@root-helpers/logger' 25import { timeToInt } from '@peertube/peertube-core-utils'
26import { isP2PEnabled, videoRequiresFileToken, videoRequiresUserAuth } from '@root-helpers/video'
27import { timeToInt } from '@shared/core-utils'
28import { 26import {
29 HTMLServerConfig, 27 HTMLServerConfig,
30 HttpStatusCode, 28 HttpStatusCode,
@@ -34,8 +32,11 @@ import {
34 Storyboard, 32 Storyboard,
35 VideoCaption, 33 VideoCaption,
36 VideoPrivacy, 34 VideoPrivacy,
37 VideoState 35 VideoState,
38} from '@shared/models' 36 VideoStateType
37} from '@peertube/peertube-models'
38import { logger } from '@root-helpers/logger'
39import { isP2PEnabled, videoRequiresFileToken, videoRequiresUserAuth } from '@root-helpers/video'
39import { 40import {
40 HLSOptions, 41 HLSOptions,
41 PeerTubePlayer, 42 PeerTubePlayer,
@@ -812,7 +813,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
812 }) 813 })
813 } 814 }
814 815
815 private handleLiveStateChange (newState: VideoState) { 816 private handleLiveStateChange (newState: VideoStateType) {
816 if (newState !== VideoState.PUBLISHED) return 817 if (newState !== VideoState.PUBLISHED) return
817 818
818 logger.info('Loading video after live update.') 819 logger.info('Loading video after live update.')
diff --git a/client/src/app/+videos/video-list/overview/overview.service.ts b/client/src/app/+videos/video-list/overview/overview.service.ts
index 67a1adb28..581c6b846 100644
--- a/client/src/app/+videos/video-list/overview/overview.service.ts
+++ b/client/src/app/+videos/video-list/overview/overview.service.ts
@@ -5,9 +5,8 @@ import { Injectable } from '@angular/core'
5import { RestExtractor, ServerService } from '@app/core' 5import { RestExtractor, ServerService } from '@app/core'
6import { immutableAssign } from '@app/helpers' 6import { immutableAssign } from '@app/helpers'
7import { VideoService } from '@app/shared/shared-main' 7import { VideoService } from '@app/shared/shared-main'
8import { objectKeysTyped } from '@shared/core-utils' 8import { objectKeysTyped, peertubeTranslate } from '@peertube/peertube-core-utils'
9import { peertubeTranslate } from '@shared/core-utils/i18n' 9import { VideosOverview as VideosOverviewServer } from '@peertube/peertube-models'
10import { VideosOverview as VideosOverviewServer } from '@shared/models'
11import { environment } from '../../../../environments/environment' 10import { environment } from '../../../../environments/environment'
12import { VideosOverview } from './videos-overview.model' 11import { VideosOverview } from './videos-overview.model'
13 12
diff --git a/client/src/app/+videos/video-list/overview/videos-overview.model.ts b/client/src/app/+videos/video-list/overview/videos-overview.model.ts
index 6765ad9b7..1208d5a00 100644
--- a/client/src/app/+videos/video-list/overview/videos-overview.model.ts
+++ b/client/src/app/+videos/video-list/overview/videos-overview.model.ts
@@ -1,5 +1,5 @@
1import { Video } from '@app/shared/shared-main' 1import { Video } from '@app/shared/shared-main'
2import { VideoChannelSummary, VideoConstant, VideosOverview as VideosOverviewServer } from '@shared/models' 2import { VideoChannelSummary, VideoConstant, VideosOverview as VideosOverviewServer } from '@peertube/peertube-models'
3 3
4export class VideosOverview implements VideosOverviewServer { 4export class VideosOverview implements VideosOverviewServer {
5 channels: { 5 channels: {
diff --git a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
index 04f02c138..c9926488d 100644
--- a/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
+++ b/client/src/app/+videos/video-list/video-user-subscriptions.component.ts
@@ -7,7 +7,7 @@ import { HooksService } from '@app/core/plugins/hooks.service'
7import { VideoService } from '@app/shared/shared-main' 7import { VideoService } from '@app/shared/shared-main'
8import { UserSubscriptionService } from '@app/shared/shared-user-subscription' 8import { UserSubscriptionService } from '@app/shared/shared-user-subscription'
9import { VideoFilters } from '@app/shared/shared-video-miniature' 9import { VideoFilters } from '@app/shared/shared-video-miniature'
10import { VideoSortField } from '@shared/models' 10import { VideoSortField } from '@peertube/peertube-models'
11 11
12@Component({ 12@Component({
13 selector: 'my-videos-user-subscriptions', 13 selector: 'my-videos-user-subscriptions',
diff --git a/client/src/app/+videos/video-list/videos-list-common-page.component.ts b/client/src/app/+videos/video-list/videos-list-common-page.component.ts
index c8fa8ef30..32954f373 100644
--- a/client/src/app/+videos/video-list/videos-list-common-page.component.ts
+++ b/client/src/app/+videos/video-list/videos-list-common-page.component.ts
@@ -4,7 +4,7 @@ import { ComponentPaginationLight, DisableForReuseHook, MetaService, RedirectSer
4import { HooksService } from '@app/core/plugins/hooks.service' 4import { HooksService } from '@app/core/plugins/hooks.service'
5import { VideoService } from '@app/shared/shared-main' 5import { VideoService } from '@app/shared/shared-main'
6import { VideoFilters, VideoFilterScope } from '@app/shared/shared-video-miniature/video-filters.model' 6import { VideoFilters, VideoFilterScope } from '@app/shared/shared-video-miniature/video-filters.model'
7import { ClientFilterHookName, VideoSortField } from '@shared/models' 7import { ClientFilterHookName, VideoSortField } from '@peertube/peertube-models'
8import { Subscription } from 'rxjs' 8import { Subscription } from 'rxjs'
9 9
10export type VideosListCommonPageRouteData = { 10export type VideosListCommonPageRouteData = {
diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts
index 40e4ec35d..360524d69 100644
--- a/client/src/app/app-routing.module.ts
+++ b/client/src/app/app-routing.module.ts
@@ -2,7 +2,7 @@ import { NgModule } from '@angular/core'
2import { RouteReuseStrategy, RouterModule, Routes, UrlMatchResult, UrlSegment } from '@angular/router' 2import { RouteReuseStrategy, RouterModule, Routes, UrlMatchResult, UrlSegment } from '@angular/router'
3import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy' 3import { CustomReuseStrategy } from '@app/core/routing/custom-reuse-strategy'
4import { MenuGuards } from '@app/core/routing/menu-guard.service' 4import { MenuGuards } from '@app/core/routing/menu-guard.service'
5import { POSSIBLE_LOCALES } from '@shared/core-utils/i18n' 5import { POSSIBLE_LOCALES } from '@peertube/peertube-core-utils'
6import { HomepageRedirectComponent, MetaGuard, PreloadSelectedModulesList } from './core' 6import { HomepageRedirectComponent, MetaGuard, PreloadSelectedModulesList } from './core'
7import { EmptyComponent } from './empty.component' 7import { EmptyComponent } from './empty.component'
8import { USER_USERNAME_REGEX_CHARACTERS } from './shared/form-validators/user-validators' 8import { USER_USERNAME_REGEX_CHARACTERS } from './shared/form-validators/user-validators'
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index f6d90cb64..4ad20bfd6 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -25,10 +25,10 @@ import { CustomModalComponent } from '@app/modal/custom-modal.component'
25import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' 25import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component'
26import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap' 26import { NgbConfig, NgbModal } from '@ng-bootstrap/ng-bootstrap'
27import { LoadingBarService } from '@ngx-loading-bar/core' 27import { LoadingBarService } from '@ngx-loading-bar/core'
28import { getShortLocale } from '@peertube/peertube-core-utils'
29import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@peertube/peertube-models'
28import { logger } from '@root-helpers/logger' 30import { logger } from '@root-helpers/logger'
29import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' 31import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
30import { getShortLocale } from '@shared/core-utils/i18n'
31import { BroadcastMessageLevel, HTMLServerConfig, UserRole } from '@shared/models'
32import { MenuService } from './core/menu/menu.service' 32import { MenuService } from './core/menu/menu.service'
33import { POP_STATE_MODAL_DISMISS } from './helpers' 33import { POP_STATE_MODAL_DISMISS } from './helpers'
34import { GlobalIconName } from './shared/shared-icons' 34import { GlobalIconName } from './shared/shared-icons'
diff --git a/client/src/app/core/auth/auth-user.model.ts b/client/src/app/core/auth/auth-user.model.ts
index 226075265..a1e23bfbb 100644
--- a/client/src/app/core/auth/auth-user.model.ts
+++ b/client/src/app/core/auth/auth-user.model.ts
@@ -1,16 +1,16 @@
1import { Observable, of } from 'rxjs' 1import { Observable, of } from 'rxjs'
2import { map } from 'rxjs/operators' 2import { map } from 'rxjs/operators'
3import { User } from '@app/core/users/user.model' 3import { User } from '@app/core/users/user.model'
4import { OAuthUserTokens } from '@root-helpers/users' 4import { hasUserRight } from '@peertube/peertube-core-utils'
5import { hasUserRight } from '@shared/core-utils/users'
6import { 5import {
7 MyUser as ServerMyUserModel, 6 MyUser as ServerMyUserModel,
8 MyUserSpecialPlaylist, 7 MyUserSpecialPlaylist,
9 User as ServerUserModel, 8 User as ServerUserModel,
10 UserRight, 9 UserRightType,
11 UserRole, 10 UserRole,
12 UserVideoQuota 11 UserVideoQuota
13} from '@shared/models' 12} from '@peertube/peertube-models'
13import { OAuthUserTokens } from '@root-helpers/users'
14 14
15export class AuthUser extends User implements ServerMyUserModel { 15export class AuthUser extends User implements ServerMyUserModel {
16 oauthTokens: OAuthUserTokens 16 oauthTokens: OAuthUserTokens
@@ -42,7 +42,7 @@ export class AuthUser extends User implements ServerMyUserModel {
42 this.oauthTokens.refreshToken = refreshToken 42 this.oauthTokens.refreshToken = refreshToken
43 } 43 }
44 44
45 hasRight (right: UserRight) { 45 hasRight (right: UserRightType) {
46 return hasUserRight(this.role.id, right) 46 return hasUserRight(this.role.id, right)
47 } 47 }
48 48
diff --git a/client/src/app/core/auth/auth.service.ts b/client/src/app/core/auth/auth.service.ts
index 6fe601d8d..bc67ab7a0 100644
--- a/client/src/app/core/auth/auth.service.ts
+++ b/client/src/app/core/auth/auth.service.ts
@@ -6,7 +6,7 @@ import { Injectable } from '@angular/core'
6import { Router } from '@angular/router' 6import { Router } from '@angular/router'
7import { Notifier } from '@app/core/notification/notifier.service' 7import { Notifier } from '@app/core/notification/notifier.service'
8import { logger, OAuthUserTokens, objectToUrlEncoded, peertubeLocalStorage } from '@root-helpers/index' 8import { logger, OAuthUserTokens, objectToUrlEncoded, peertubeLocalStorage } from '@root-helpers/index'
9import { HttpStatusCode, MyUser as UserServerModel, OAuthClientLocal, User, UserLogin, UserRefreshToken } from '@shared/models' 9import { HttpStatusCode, MyUser as UserServerModel, OAuthClientLocal, User, UserLogin, UserRefreshToken } from '@peertube/peertube-models'
10import { environment } from '../../../environments/environment' 10import { environment } from '../../../environments/environment'
11import { RestExtractor } from '../rest/rest-extractor.service' 11import { RestExtractor } from '../rest/rest-extractor.service'
12import { RedirectService } from '../routing' 12import { RedirectService } from '../routing'
diff --git a/client/src/app/core/menu/menu.service.ts b/client/src/app/core/menu/menu.service.ts
index d865c7da2..39e89f6e3 100644
--- a/client/src/app/core/menu/menu.service.ts
+++ b/client/src/app/core/menu/menu.service.ts
@@ -2,7 +2,7 @@ import { fromEvent } from 'rxjs'
2import { debounceTime } from 'rxjs/operators' 2import { debounceTime } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { GlobalIconName } from '@app/shared/shared-icons' 4import { GlobalIconName } from '@app/shared/shared-icons'
5import { HTMLServerConfig } from '@shared/models/server' 5import { HTMLServerConfig } from '@peertube/peertube-models'
6import { ScreenService } from '../wrappers' 6import { ScreenService } from '../wrappers'
7 7
8export type MenuLink = { 8export type MenuLink = {
diff --git a/client/src/app/core/notification/peertube-socket.service.ts b/client/src/app/core/notification/peertube-socket.service.ts
index 50a11e948..15af9a310 100644
--- a/client/src/app/core/notification/peertube-socket.service.ts
+++ b/client/src/app/core/notification/peertube-socket.service.ts
@@ -1,7 +1,7 @@
1import { Subject } from 'rxjs' 1import { Subject } from 'rxjs'
2import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client' 2import { ManagerOptions, Socket, SocketOptions } from 'socket.io-client'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@shared/models' 4import { LiveVideoEventPayload, LiveVideoEventType, UserNotification as UserNotificationServer } from '@peertube/peertube-models'
5import { environment } from '../../../environments/environment' 5import { environment } from '../../../environments/environment'
6import { AuthService } from '../auth' 6import { AuthService } from '../auth'
7 7
diff --git a/client/src/app/core/plugins/hooks.service.ts b/client/src/app/core/plugins/hooks.service.ts
index d9fef8389..59c627c05 100644
--- a/client/src/app/core/plugins/hooks.service.ts
+++ b/client/src/app/core/plugins/hooks.service.ts
@@ -3,7 +3,7 @@ import { mergeMap, switchMap } from 'rxjs/operators'
3import { Injectable } from '@angular/core' 3import { Injectable } from '@angular/core'
4import { PluginService } from '@app/core/plugins/plugin.service' 4import { PluginService } from '@app/core/plugins/plugin.service'
5import { logger } from '@root-helpers/logger' 5import { logger } from '@root-helpers/logger'
6import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@shared/models' 6import { ClientActionHookName, ClientFilterHookName, PluginClientScope } from '@peertube/peertube-models'
7import { AuthService, AuthStatus } from '../auth' 7import { AuthService, AuthStatus } from '../auth'
8 8
9type RawFunction<U, T> = (params: U) => T 9type RawFunction<U, T> = (params: U) => T
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts
index bd8c61d9a..d37b2e5f7 100644
--- a/client/src/app/core/plugins/plugin.service.ts
+++ b/client/src/app/core/plugins/plugin.service.ts
@@ -10,22 +10,22 @@ import { RestExtractor } from '@app/core/rest'
10import { ServerService } from '@app/core/server/server.service' 10import { ServerService } from '@app/core/server/server.service'
11import { getDevLocale, isOnDevLocale } from '@app/helpers' 11import { getDevLocale, isOnDevLocale } from '@app/helpers'
12import { CustomModalComponent } from '@app/modal/custom-modal.component' 12import { CustomModalComponent } from '@app/modal/custom-modal.component'
13import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager' 13import { getCompleteLocale, getKeys, isDefaultLocale, peertubeTranslate } from '@peertube/peertube-core-utils'
14import { getKeys } from '@shared/core-utils'
15import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n'
16import { 14import {
17 ClientHook, 15 ClientHook,
18 ClientHookName, 16 ClientHookName,
19 PluginClientScope, 17 PluginClientScope,
20 PluginTranslation, 18 PluginTranslation,
21 PluginType, 19 PluginType,
20 PluginType_Type,
22 PublicServerSetting, 21 PublicServerSetting,
23 RegisterClientFormFieldOptions, 22 RegisterClientFormFieldOptions,
24 RegisterClientRouteOptions, 23 RegisterClientRouteOptions,
25 RegisterClientSettingsScriptOptions, 24 RegisterClientSettingsScriptOptions,
26 RegisterClientVideoFieldOptions, 25 RegisterClientVideoFieldOptions,
27 ServerConfigPlugin 26 ServerConfigPlugin
28} from '@shared/models' 27} from '@peertube/peertube-models'
28import { PluginInfo, PluginsManager } from '@root-helpers/plugins-manager'
29import { environment } from '../../../environments/environment' 29import { environment } from '../../../environments/environment'
30import { RegisterClientHelpers } from '../../../types/register-client-option.model' 30import { RegisterClientHelpers } from '../../../types/register-client-option.model'
31 31
@@ -110,7 +110,7 @@ export class PluginService implements ClientHook {
110 return this.pluginsManager.removePlugin(plugin) 110 return this.pluginsManager.removePlugin(plugin)
111 } 111 }
112 112
113 nameToNpmName (name: string, type: PluginType) { 113 nameToNpmName (name: string, type: PluginType_Type) {
114 const prefix = type === PluginType.PLUGIN 114 const prefix = type === PluginType.PLUGIN
115 ? 'peertube-plugin-' 115 ? 'peertube-plugin-'
116 : 'peertube-theme-' 116 : 'peertube-theme-'
diff --git a/client/src/app/core/renderer/html-renderer.service.ts b/client/src/app/core/renderer/html-renderer.service.ts
index 7776ccad5..37741c079 100644
--- a/client/src/app/core/renderer/html-renderer.service.ts
+++ b/client/src/app/core/renderer/html-renderer.service.ts
@@ -1,5 +1,5 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { getCustomMarkupSanitizeOptions, getDefaultSanitizeOptions } from '@shared/core-utils/renderer/html' 2import { getCustomMarkupSanitizeOptions, getDefaultSanitizeOptions } from '@peertube/peertube-core-utils'
3import { LinkifierService } from './linkifier.service' 3import { LinkifierService } from './linkifier.service'
4 4
5@Injectable() 5@Injectable()
diff --git a/client/src/app/core/renderer/markdown.service.ts b/client/src/app/core/renderer/markdown.service.ts
index ec3b683bb..907b92232 100644
--- a/client/src/app/core/renderer/markdown.service.ts
+++ b/client/src/app/core/renderer/markdown.service.ts
@@ -1,13 +1,14 @@
1import * as MarkdownIt from 'markdown-it' 1import * as MarkdownIt from 'markdown-it'
2import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
3import { buildVideoLink, decorateVideoLink } from '@shared/core-utils'
4import { 3import {
4 buildVideoLink,
5 COMPLETE_RULES, 5 COMPLETE_RULES,
6 decorateVideoLink,
6 ENHANCED_RULES, 7 ENHANCED_RULES,
7 ENHANCED_WITH_HTML_RULES, 8 ENHANCED_WITH_HTML_RULES,
8 TEXT_RULES, 9 TEXT_RULES,
9 TEXT_WITH_HTML_RULES 10 TEXT_WITH_HTML_RULES
10} from '@shared/core-utils/renderer/markdown' 11} from '@peertube/peertube-core-utils'
11import { HtmlRendererService } from './html-renderer.service' 12import { HtmlRendererService } from './html-renderer.service'
12 13
13type MarkdownParsers = { 14type MarkdownParsers = {
diff --git a/client/src/app/core/rest/rest-extractor.service.ts b/client/src/app/core/rest/rest-extractor.service.ts
index c6c1e183f..bcc50c0f4 100644
--- a/client/src/app/core/rest/rest-extractor.service.ts
+++ b/client/src/app/core/rest/rest-extractor.service.ts
@@ -1,10 +1,10 @@
1import { throwError as observableThrowError } from 'rxjs' 1import { throwError as observableThrowError } from 'rxjs'
2import { HttpHeaderResponse } from '@angular/common/http'
2import { Inject, Injectable, LOCALE_ID } from '@angular/core' 3import { Inject, Injectable, LOCALE_ID } from '@angular/core'
3import { Router } from '@angular/router' 4import { Router } from '@angular/router'
4import { DateFormat, dateToHuman } from '@app/helpers' 5import { DateFormat, dateToHuman } from '@app/helpers'
6import { HttpStatusCode, HttpStatusCodeType, ResultList } from '@peertube/peertube-models'
5import { logger } from '@root-helpers/logger' 7import { logger } from '@root-helpers/logger'
6import { HttpStatusCode, ResultList } from '@shared/models'
7import { HttpHeaderResponse } from '@angular/common/http'
8 8
9@Injectable() 9@Injectable()
10export class RestExtractor { 10export class RestExtractor {
@@ -45,7 +45,11 @@ export class RestExtractor {
45 return target 45 return target
46 } 46 }
47 47
48 redirectTo404IfNotFound (obj: { status: number }, type: 'video' | 'other', status = [ HttpStatusCode.NOT_FOUND_404 ]) { 48 redirectTo404IfNotFound (
49 obj: { status: HttpStatusCodeType },
50 type: 'video' | 'other',
51 status: HttpStatusCodeType[] = [ HttpStatusCode.NOT_FOUND_404 ]
52 ) {
49 if (obj?.status && status.includes(obj.status)) { 53 if (obj?.status && status.includes(obj.status)) {
50 // Do not use redirectService to avoid circular dependencies 54 // Do not use redirectService to avoid circular dependencies
51 this.router.navigate([ '/404' ], { state: { type, obj }, skipLocationChange: true }) 55 this.router.navigate([ '/404' ], { state: { type, obj }, skipLocationChange: true })
diff --git a/client/src/app/core/routing/homepage-redirect.component.ts b/client/src/app/core/routing/homepage-redirect.component.ts
index 9e3848038..e9be832e0 100644
--- a/client/src/app/core/routing/homepage-redirect.component.ts
+++ b/client/src/app/core/routing/homepage-redirect.component.ts
@@ -1,6 +1,6 @@
1import { Component, OnInit } from '@angular/core' 1import { Component, OnInit } from '@angular/core'
2import { ActivatedRoute } from '@angular/router' 2import { ActivatedRoute } from '@angular/router'
3import { is18nPath } from '@shared/core-utils/i18n/i18n' 3import { is18nPath } from '@peertube/peertube-core-utils'
4import { RedirectService } from './redirect.service' 4import { RedirectService } from './redirect.service'
5 5
6/* 6/*
diff --git a/client/src/app/core/routing/meta.service.ts b/client/src/app/core/routing/meta.service.ts
index 97e440faf..d50f0d65a 100644
--- a/client/src/app/core/routing/meta.service.ts
+++ b/client/src/app/core/routing/meta.service.ts
@@ -1,6 +1,6 @@
1import { Injectable } from '@angular/core' 1import { Injectable } from '@angular/core'
2import { Meta, Title } from '@angular/platform-browser' 2import { Meta, Title } from '@angular/platform-browser'
3import { HTMLServerConfig } from '@shared/models/server' 3import { HTMLServerConfig } from '@peertube/peertube-models'
4import { ServerService } from '../server' 4import { ServerService } from '../server'
5 5
6export interface MetaSettings { 6export interface MetaSettings {
diff --git a/client/src/app/core/scoped-tokens/scoped-tokens.service.ts b/client/src/app/core/scoped-tokens/scoped-tokens.service.ts
index 038e5031c..f7d192feb 100644
--- a/client/src/app/core/scoped-tokens/scoped-tokens.service.ts
+++ b/client/src/app/core/scoped-tokens/scoped-tokens.service.ts
@@ -1,7 +1,7 @@
1import { catchError } from 'rxjs/operators' 1import { 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 { ScopedToken } from '@shared/models/users/user-scoped-token' 4import { ScopedToken } from '@peertube/peertube-models'
5import { environment } from '../../../environments/environment' 5import { environment } from '../../../environments/environment'
6import { RestExtractor } from '../rest' 6import { RestExtractor } from '../rest'
7 7
diff --git a/client/src/app/core/server/server.service.ts b/client/src/app/core/server/server.service.ts
index 41cb4791a..75ac8ddc1 100644
--- a/client/src/app/core/server/server.service.ts
+++ b/client/src/app/core/server/server.service.ts
@@ -3,9 +3,16 @@ import { first, map, share, shareReplay, switchMap, tap } from 'rxjs/operators'
3import { HttpClient } from '@angular/common/http' 3import { HttpClient } from '@angular/common/http'
4import { Inject, Injectable, LOCALE_ID } from '@angular/core' 4import { Inject, Injectable, LOCALE_ID } from '@angular/core'
5import { getDevLocale, isOnDevLocale } from '@app/helpers' 5import { getDevLocale, isOnDevLocale } from '@app/helpers'
6import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@peertube/peertube-core-utils'
7import {
8 HTMLServerConfig,
9 ServerConfig,
10 ServerStats,
11 VideoConstant,
12 VideoPlaylistPrivacyType,
13 VideoPrivacyType
14} from '@peertube/peertube-models'
6import { logger } from '@root-helpers/logger' 15import { logger } from '@root-helpers/logger'
7import { getCompleteLocale, isDefaultLocale, peertubeTranslate } from '@shared/core-utils/i18n'
8import { HTMLServerConfig, ServerConfig, ServerStats, VideoConstant } from '@shared/models'
9import { environment } from '../../../environments/environment' 16import { environment } from '../../../environments/environment'
10 17
11@Injectable() 18@Injectable()
@@ -21,8 +28,8 @@ export class ServerService {
21 private localeObservable: Observable<any> 28 private localeObservable: Observable<any>
22 private videoLicensesObservable: Observable<VideoConstant<number>[]> 29 private videoLicensesObservable: Observable<VideoConstant<number>[]>
23 private videoCategoriesObservable: Observable<VideoConstant<number>[]> 30 private videoCategoriesObservable: Observable<VideoConstant<number>[]>
24 private videoPrivaciesObservable: Observable<VideoConstant<number>[]> 31 private videoPrivaciesObservable: Observable<VideoConstant<VideoPrivacyType>[]>
25 private videoPlaylistPrivaciesObservable: Observable<VideoConstant<number>[]> 32 private videoPlaylistPrivaciesObservable: Observable<VideoConstant<VideoPlaylistPrivacyType>[]>
26 private videoLanguagesObservable: Observable<VideoConstant<string>[]> 33 private videoLanguagesObservable: Observable<VideoConstant<string>[]>
27 private configObservable: Observable<ServerConfig> 34 private configObservable: Observable<ServerConfig>
28 35
@@ -123,7 +130,7 @@ export class ServerService {
123 130
124 getVideoPrivacies () { 131 getVideoPrivacies () {
125 if (!this.videoPrivaciesObservable) { 132 if (!this.videoPrivaciesObservable) {
126 this.videoPrivaciesObservable = this.loadAttributeEnum<number>(ServerService.BASE_VIDEO_URL, 'privacies') 133 this.videoPrivaciesObservable = this.loadAttributeEnum<VideoPrivacyType>(ServerService.BASE_VIDEO_URL, 'privacies')
127 } 134 }
128 135
129 return this.videoPrivaciesObservable.pipe(first()) 136 return this.videoPrivaciesObservable.pipe(first())
@@ -131,7 +138,10 @@ export class ServerService {
131 138
132 getVideoPlaylistPrivacies () { 139 getVideoPlaylistPrivacies () {
133 if (!this.videoPlaylistPrivaciesObservable) { 140 if (!this.videoPlaylistPrivaciesObservable) {
134 this.videoPlaylistPrivaciesObservable = this.loadAttributeEnum<number>(ServerService.BASE_VIDEO_PLAYLIST_URL, 'privacies') 141 this.videoPlaylistPrivaciesObservable = this.loadAttributeEnum<VideoPlaylistPrivacyType>(
142 ServerService.BASE_VIDEO_PLAYLIST_URL,
143 'privacies'
144 )
135 } 145 }
136 146
137 return this.videoPlaylistPrivaciesObservable.pipe(first()) 147 return this.videoPlaylistPrivaciesObservable.pipe(first())
diff --git a/client/src/app/core/theme/theme.service.ts b/client/src/app/core/theme/theme.service.ts
index ead1770ba..22eb5ddd3 100644
--- a/client/src/app/core/theme/theme.service.ts
+++ b/client/src/app/core/theme/theme.service.ts
@@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'
2import { logger } from '@root-helpers/logger' 2import { logger } from '@root-helpers/logger'
3import { capitalizeFirstLetter } from '@root-helpers/string' 3import { capitalizeFirstLetter } from '@root-helpers/string'
4import { UserLocalStorageKeys } from '@root-helpers/users' 4import { UserLocalStorageKeys } from '@root-helpers/users'
5import { HTMLServerConfig, ServerConfigTheme } from '@shared/models' 5import { HTMLServerConfig, ServerConfigTheme } from '@peertube/peertube-models'
6import { environment } from '../../../environments/environment' 6import { environment } from '../../../environments/environment'
7import { AuthService } from '../auth' 7import { AuthService } from '../auth'
8import { PluginService } from '../plugins/plugin.service' 8import { PluginService } from '../plugins/plugin.service'
diff --git a/client/src/app/core/users/user-local-storage.service.ts b/client/src/app/core/users/user-local-storage.service.ts
index a87f3b98a..431a57343 100644
--- a/client/src/app/core/users/user-local-storage.service.ts
+++ b/client/src/app/core/users/user-local-storage.service.ts
@@ -1,13 +1,11 @@
1
2import { filter, throttleTime } from 'rxjs' 1import { filter, throttleTime } from 'rxjs'
3import { Injectable } from '@angular/core' 2import { Injectable } from '@angular/core'
4import { AuthService, AuthStatus } from '@app/core/auth' 3import { AuthService, AuthStatus } from '@app/core/auth'
4import { objectKeysTyped } from '@peertube/peertube-core-utils'
5import { NSFWPolicyType, UserRoleType, UserUpdateMe } from '@peertube/peertube-models'
5import { getBoolOrDefault } from '@root-helpers/local-storage-utils' 6import { getBoolOrDefault } from '@root-helpers/local-storage-utils'
6import { logger } from '@root-helpers/logger' 7import { logger } from '@root-helpers/logger'
7import { OAuthUserTokens, UserLocalStorageKeys } from '@root-helpers/users' 8import { OAuthUserTokens, UserLocalStorageKeys } from '@root-helpers/users'
8import { objectKeysTyped } from '@shared/core-utils'
9import { UserRole, UserUpdateMe } from '@shared/models'
10import { NSFWPolicyType } from '@shared/models/videos'
11import { ServerService } from '../server' 9import { ServerService } from '../server'
12import { LocalStorageService } from '../wrappers/storage.service' 10import { LocalStorageService } from '../wrappers/storage.service'
13 11
@@ -61,7 +59,7 @@ export class UserLocalStorageService {
61 username: this.localStorageService.getItem(UserLocalStorageKeys.USERNAME), 59 username: this.localStorageService.getItem(UserLocalStorageKeys.USERNAME),
62 email: this.localStorageService.getItem(UserLocalStorageKeys.EMAIL), 60 email: this.localStorageService.getItem(UserLocalStorageKeys.EMAIL),
63 role: { 61 role: {
64 id: parseInt(this.localStorageService.getItem(UserLocalStorageKeys.ROLE), 10) as UserRole, 62 id: parseInt(this.localStorageService.getItem(UserLocalStorageKeys.ROLE), 10) as UserRoleType,
65 label: '' 63 label: ''
66 }, 64 },
67 65
@@ -74,7 +72,7 @@ export class UserLocalStorageService {
74 username: string 72 username: string
75 email: string 73 email: string
76 role: { 74 role: {
77 id: UserRole 75 id: UserRoleType
78 } 76 }
79 }) { 77 }) {
80 this.localStorageService.setItem(UserLocalStorageKeys.ID, user.id.toString()) 78 this.localStorageService.setItem(UserLocalStorageKeys.ID, user.id.toString())
diff --git a/client/src/app/core/users/user.model.ts b/client/src/app/core/users/user.model.ts
index 54b749a4c..ffc7c2b44 100644
--- a/client/src/app/core/users/user.model.ts
+++ b/client/src/app/core/users/user.model.ts
@@ -1,17 +1,18 @@
1import { Account } from '@app/shared/shared-main/account/account.model' 1import { Account } from '@app/shared/shared-main/account/account.model'
2import { objectKeysTyped } from '@shared/core-utils' 2import { hasUserRight, objectKeysTyped } from '@peertube/peertube-core-utils'
3import { hasUserRight } from '@shared/core-utils/users'
4import { 3import {
5 ActorImage, 4 ActorImage,
6 HTMLServerConfig, 5 HTMLServerConfig,
7 NSFWPolicyType, 6 NSFWPolicyType,
8 User as UserServerModel, 7 User as UserServerModel,
9 UserAdminFlag, 8 UserAdminFlag,
9 UserAdminFlagType,
10 UserNotificationSetting, 10 UserNotificationSetting,
11 UserRight, 11 UserRightType,
12 UserRole, 12 UserRole,
13 UserRoleType,
13 VideoChannel 14 VideoChannel
14} from '@shared/models' 15} from '@peertube/peertube-models'
15 16
16export class User implements UserServerModel { 17export class User implements UserServerModel {
17 id: number 18 id: number
@@ -23,7 +24,7 @@ export class User implements UserServerModel {
23 emailPublic: boolean 24 emailPublic: boolean
24 nsfwPolicy: NSFWPolicyType 25 nsfwPolicy: NSFWPolicyType
25 26
26 adminFlags?: UserAdminFlag 27 adminFlags?: UserAdminFlagType
27 28
28 autoPlayVideo: boolean 29 autoPlayVideo: boolean
29 autoPlayNextVideo: boolean 30 autoPlayNextVideo: boolean
@@ -35,7 +36,7 @@ export class User implements UserServerModel {
35 videoLanguages: string[] 36 videoLanguages: string[]
36 37
37 role: { 38 role: {
38 id: UserRole 39 id: UserRoleType
39 label: string 40 label: string
40 } 41 }
41 42
@@ -124,7 +125,7 @@ export class User implements UserServerModel {
124 } 125 }
125 } 126 }
126 127
127 hasRight (right: UserRight) { 128 hasRight (right: UserRightType) {
128 return hasUserRight(this.role.id, right) 129 return hasUserRight(this.role.id, right)
129 } 130 }
130 131
diff --git a/client/src/app/core/users/user.service.ts b/client/src/app/core/users/user.service.ts
index b4024c02d..7ad0ee9bf 100644
--- a/client/src/app/core/users/user.service.ts
+++ b/client/src/app/core/users/user.service.ts
@@ -3,7 +3,7 @@ import { catchError, first, map, shareReplay } from 'rxjs/operators'
3import { HttpClient, HttpParams } from '@angular/common/http' 3import { HttpClient, HttpParams } from '@angular/common/http'
4import { Injectable } from '@angular/core' 4import { Injectable } from '@angular/core'
5import { AuthService } from '@app/core/auth' 5import { AuthService } from '@app/core/auth'
6import { ActorImage, User as UserServerModel, UserUpdateMe, UserVideoQuota } from '@shared/models' 6import { ActorImage, User as UserServerModel, UserUpdateMe, UserVideoQuota } from '@peertube/peertube-models'
7import { environment } from '../../../environments/environment' 7import { environment } from '../../../environments/environment'
8import { RestExtractor } from '../rest' 8import { RestExtractor } from '../rest'
9import { UserLocalStorageService } from './user-local-storage.service' 9import { UserLocalStorageService } from './user-local-storage.service'
diff --git a/client/src/app/header/search-typeahead.component.ts b/client/src/app/header/search-typeahead.component.ts
index d2549315c..a3a04041f 100644
--- a/client/src/app/header/search-typeahead.component.ts
+++ b/client/src/app/header/search-typeahead.component.ts
@@ -5,7 +5,7 @@ import { AfterViewChecked, Component, OnDestroy, OnInit, QueryList, ViewChildren
5import { ActivatedRoute, Params, Router } from '@angular/router' 5import { ActivatedRoute, Params, Router } from '@angular/router'
6import { AuthService, ServerService } from '@app/core' 6import { AuthService, ServerService } from '@app/core'
7import { logger } from '@root-helpers/logger' 7import { logger } from '@root-helpers/logger'
8import { HTMLServerConfig, SearchTargetType } from '@shared/models' 8import { HTMLServerConfig, SearchTargetType } from '@peertube/peertube-models'
9import { SuggestionComponent, SuggestionPayload, SuggestionPayloadType } from './suggestion.component' 9import { SuggestionComponent, SuggestionPayload, SuggestionPayloadType } from './suggestion.component'
10 10
11@Component({ 11@Component({
diff --git a/client/src/app/helpers/utils/channel.ts b/client/src/app/helpers/utils/channel.ts
index 83f36b70f..fe59ea567 100644
--- a/client/src/app/helpers/utils/channel.ts
+++ b/client/src/app/helpers/utils/channel.ts
@@ -1,7 +1,7 @@
1import { minBy } from 'lodash-es' 1import { minBy } from 'lodash-es'
2import { first, map } from 'rxjs/operators' 2import { first, map } from 'rxjs/operators'
3import { SelectChannelItem } from 'src/types/select-options-item.model' 3import { SelectChannelItem } from 'src/types/select-options-item.model'
4import { VideoChannel } from '@shared/models' 4import { VideoChannel } from '@peertube/peertube-models'
5import { AuthService } from '../../core/auth' 5import { AuthService } from '../../core/auth'
6 6
7function listUserChannelsForSelect (authService: AuthService) { 7function listUserChannelsForSelect (authService: AuthService) {
diff --git a/client/src/app/helpers/utils/upload.ts b/client/src/app/helpers/utils/upload.ts
index b60951612..b55415064 100644
--- a/client/src/app/helpers/utils/upload.ts
+++ b/client/src/app/helpers/utils/upload.ts
@@ -1,6 +1,6 @@
1import { HttpErrorResponse } from '@angular/common/http' 1import { HttpErrorResponse } from '@angular/common/http'
2import { Notifier } from '@app/core' 2import { Notifier } from '@app/core'
3import { HttpStatusCode } from '@shared/models' 3import { HttpStatusCode } from '@peertube/peertube-models'
4 4
5function genericUploadErrorHandler (options: { 5function genericUploadErrorHandler (options: {
6 err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'> 6 err: Pick<HttpErrorResponse, 'message' | 'status' | 'headers'>
diff --git a/client/src/app/menu/language-chooser.component.ts b/client/src/app/menu/language-chooser.component.ts
index f7ae69717..1ec5987c2 100644
--- a/client/src/app/menu/language-chooser.component.ts
+++ b/client/src/app/menu/language-chooser.component.ts
@@ -1,8 +1,7 @@
1import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core' 1import { Component, ElementRef, Inject, LOCALE_ID, ViewChild } from '@angular/core'
2import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers' 2import { getDevLocale, isOnDevLocale, sortBy } from '@app/helpers'
3import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4import { objectKeysTyped } from '@shared/core-utils' 4import { getCompleteLocale, getShortLocale, I18N_LOCALES, objectKeysTyped } from '@peertube/peertube-core-utils'
5import { getCompleteLocale, getShortLocale, I18N_LOCALES } from '@shared/core-utils/i18n'
6 5
7@Component({ 6@Component({
8 selector: 'my-language-chooser', 7 selector: 'my-language-chooser',
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 410abe6fa..6d309f15a 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -22,7 +22,7 @@ import { LanguageChooserComponent } from '@app/menu/language-chooser.component'
22import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component' 22import { QuickSettingsModalComponent } from '@app/modal/quick-settings-modal.component'
23import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service' 23import { PeertubeModalService } from '@app/shared/shared-main/peertube-modal/peertube-modal.service'
24import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap' 24import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'
25import { HTMLServerConfig, ServerConfig, UserRight, VideoConstant } from '@shared/models' 25import { HTMLServerConfig, ServerConfig, UserRight, UserRightType, VideoConstant } from '@peertube/peertube-models'
26 26
27const debugLogger = debug('peertube:menu:MenuComponent') 27const debugLogger = debug('peertube:menu:MenuComponent')
28 28
@@ -54,7 +54,7 @@ export class MenuComponent implements OnInit, OnDestroy {
54 private htmlServerConfig: HTMLServerConfig 54 private htmlServerConfig: HTMLServerConfig
55 private serverConfig: ServerConfig 55 private serverConfig: ServerConfig
56 56
57 private routesPerRight: { [role in UserRight]?: string } = { 57 private routesPerRight: { [role in UserRightType]?: string } = {
58 [UserRight.MANAGE_USERS]: '/admin/users', 58 [UserRight.MANAGE_USERS]: '/admin/users',
59 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends', 59 [UserRight.MANAGE_SERVER_FOLLOW]: '/admin/friends',
60 [UserRight.MANAGE_ABUSES]: '/admin/moderation/abuses', 60 [UserRight.MANAGE_ABUSES]: '/admin/moderation/abuses',
diff --git a/client/src/app/modal/instance-config-warning-modal.component.ts b/client/src/app/modal/instance-config-warning-modal.component.ts
index 23c2c777e..f8ab155ae 100644
--- a/client/src/app/modal/instance-config-warning-modal.component.ts
+++ b/client/src/app/modal/instance-config-warning-modal.component.ts
@@ -2,9 +2,9 @@ import { Location } from '@angular/common'
2import { Component, ElementRef, ViewChild } from '@angular/core' 2import { Component, ElementRef, ViewChild } from '@angular/core'
3import { Notifier, User, UserService } from '@app/core' 3import { Notifier, User, UserService } from '@app/core'
4import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 4import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
5import { About, ServerConfig } from '@peertube/peertube-models'
5import { logger } from '@root-helpers/logger' 6import { logger } from '@root-helpers/logger'
6import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage' 7import { peertubeLocalStorage } from '@root-helpers/peertube-web-storage'
7import { About, ServerConfig } from '@shared/models/server'
8 8
9@Component({ 9@Component({
10 selector: 'my-instance-config-warning-modal', 10 selector: 'my-instance-config-warning-modal',
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'