X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftypings%2Fexpress.ts;h=43a9b2c99026839df00ea0235cc22a4131c8ae03;hb=0374b6b5cd685316f924874b2a3068bb345eb0dd;hp=324d78662ca75786f674ac31e9aef08adcc30562;hpb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/typings/express.ts b/server/typings/express.ts index 324d78662..43a9b2c99 100644 --- a/server/typings/express.ts +++ b/server/typings/express.ts @@ -1,82 +1,104 @@ -import { VideoChannelModel } from '../models/video/video-channel' -import { VideoPlaylistModel } from '../models/video/video-playlist' -import { VideoPlaylistElementModel } from '../models/video/video-playlist-element' -import { UserModel } from '../models/account/user' -import { VideoModel } from '../models/video/video' -import { AccountModel } from '../models/account/account' -import { VideoChangeOwnershipModel } from '../models/video/video-change-ownership' -import { ActorModel } from '../models/activitypub/actor' -import { VideoCommentModel } from '../models/video/video-comment' -import { VideoShareModel } from '../models/video/video-share' -import { AccountVideoRateModel } from '../models/account/account-video-rate' -import { ActorFollowModel } from '../models/activitypub/actor-follow' -import { ServerModel } from '../models/server/server' -import { VideoFileModel } from '../models/video/video-file' -import { VideoRedundancyModel } from '../models/redundancy/video-redundancy' -import { ServerBlocklistModel } from '../models/server/server-blocklist' -import { AccountBlocklistModel } from '../models/account/account-blocklist' -import { VideoImportModel } from '../models/video/video-import' -import { VideoAbuseModel } from '../models/video/video-abuse' -import { VideoBlacklistModel } from '../models/video/video-blacklist' -import { VideoCaptionModel } from '../models/video/video-caption' -import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist' +import { RegisteredPlugin } from '../lib/plugins/plugin-manager' +import { + MAccountDefault, + MActorAccountChannelId, + MActorFollowActorsDefault, + MActorFollowActorsDefaultSubscription, + MActorFull, + MChannelAccountDefault, + MComment, + MCommentOwnerVideoReply, + MUserDefault, + MVideoAbuse, + MVideoBlacklist, + MVideoCaptionVideo, + MVideoFullLight, + MVideoIdThumbnail, + MVideoRedundancyVideo, + MVideoShareActor, + MVideoThumbnail, + MVideoWithRights +} from './models' +import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from './models/video/video-playlist' +import { MVideoImportDefault } from '@server/typings/models/video/video-import' +import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile } from '@server/typings/models' +import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/typings/models/video/video-playlist-element' +import { MAccountVideoRateAccountVideo } from '@server/typings/models/video/video-rate' +import { MVideoChangeOwnershipFull } from './models/video/video-change-ownership' +import { MPlugin, MServer } from '@server/typings/models/server' +import { MServerBlocklist } from './models/server/server-blocklist' +import { MOAuthTokenUser } from '@server/typings/models/oauth/oauth-token' declare module 'express' { interface Response { + locals: { - video?: VideoModel - videoShare?: VideoShareModel - videoFile?: VideoFileModel + videoAll?: MVideoFullLight + onlyVideo?: MVideoThumbnail + onlyVideoWithRights?: MVideoWithRights + videoId?: MVideoIdThumbnail + + videoShare?: MVideoShareActor + + videoFile?: MVideoFile + + videoImport?: MVideoImportDefault + + videoBlacklist?: MVideoBlacklist - videoImport?: VideoImportModel + videoCaption?: MVideoCaptionVideo - videoBlacklist?: VideoBlacklistModel + videoAbuse?: MVideoAbuse - videoCaption?: VideoCaptionModel + videoStreamingPlaylist?: MStreamingPlaylist - videoAbuse?: VideoAbuseModel + videoChannel?: MChannelAccountDefault - videoStreamingPlaylist?: VideoStreamingPlaylistModel + videoPlaylistFull?: MVideoPlaylistFull + videoPlaylistSummary?: MVideoPlaylistFullSummary - videoChannel?: VideoChannelModel + videoPlaylistElement?: MVideoPlaylistElement + videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy - videoPlaylist?: VideoPlaylistModel - videoPlaylistElement?: VideoPlaylistElementModel + accountVideoRate?: MAccountVideoRateAccountVideo - accountVideoRate?: AccountVideoRateModel + videoCommentFull?: MCommentOwnerVideoReply + videoCommentThread?: MComment - videoComment?: VideoCommentModel - videoCommentThread?: VideoCommentModel + follow?: MActorFollowActorsDefault + subscription?: MActorFollowActorsDefaultSubscription - follow?: ActorFollowModel - subscription?: ActorFollowModel + nextOwner?: MAccountDefault + videoChangeOwnership?: MVideoChangeOwnershipFull - nextOwner?: AccountModel - videoChangeOwnership?: VideoChangeOwnershipModel - account?: AccountModel - actor?: ActorModel - user?: UserModel + account?: MAccountDefault - server?: ServerModel + actorUrl?: MActorUrl + actorFull?: MActorFull - videoRedundancy?: VideoRedundancyModel + user?: MUserDefault - accountBlock?: AccountBlocklistModel - serverBlock?: ServerBlocklistModel + server?: MServer + + videoRedundancy?: MVideoRedundancyVideo + + accountBlock?: MAccountBlocklist + serverBlock?: MServerBlocklist oauth?: { - token: { - User: UserModel - user: UserModel - } + token: MOAuthTokenUser } signature?: { - actor: ActorModel + actor: MActorAccountChannelId } authenticated?: boolean + + registeredPlugin?: RegisteredPlugin + + plugin?: MPlugin } } }