From c24aac6bc73033195c37d81cf2b7449c9b54712c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 18 Jun 2020 13:38:20 +0200 Subject: Fix tests --- server/typings/express.d.ts | 128 -------------------------------------- server/typings/express/index.d.ts | 128 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+), 128 deletions(-) delete mode 100644 server/typings/express.d.ts create mode 100644 server/typings/express/index.d.ts (limited to 'server/typings') diff --git a/server/typings/express.d.ts b/server/typings/express.d.ts deleted file mode 100644 index 451bf9103..000000000 --- a/server/typings/express.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -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 '../types/models' -import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from '../types/models/video/video-playlist' -import { MVideoImportDefault } from '@server/types/models/video/video-import' -import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/types/models' -import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element' -import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate' -import { MVideoChangeOwnershipFull } from '../types/models/video/video-change-ownership' -import { MPlugin, MServer } from '@server/types/models/server' -import { MServerBlocklist } from '../types/models/server/server-blocklist' -import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' -import { UserRole } from '@shared/models' -import { RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' - -declare module 'express' { - export interface Request { - query: any - } - - interface Response { - - locals: { - bypassLogin?: { - bypass: boolean - pluginName: string - authName?: string - user: { - username: string - email: string - displayName: string - role: UserRole - } - } - - refreshTokenAuthName?: string - - explicitLogout: boolean - - videoAll?: MVideoFullLight - onlyImmutableVideo?: MVideoImmutable - onlyVideo?: MVideoThumbnail - onlyVideoWithRights?: MVideoWithRights - videoId?: MVideoIdThumbnail - - videoShare?: MVideoShareActor - - videoFile?: MVideoFile - - videoImport?: MVideoImportDefault - - videoBlacklist?: MVideoBlacklist - - videoCaption?: MVideoCaptionVideo - - videoAbuse?: MVideoAbuse - - videoStreamingPlaylist?: MStreamingPlaylist - - videoChannel?: MChannelAccountDefault - - videoPlaylistFull?: MVideoPlaylistFull - videoPlaylistSummary?: MVideoPlaylistFullSummary - - videoPlaylistElement?: MVideoPlaylistElement - videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy - - accountVideoRate?: MAccountVideoRateAccountVideo - - videoCommentFull?: MCommentOwnerVideoReply - videoCommentThread?: MComment - - follow?: MActorFollowActorsDefault - subscription?: MActorFollowActorsDefaultSubscription - - nextOwner?: MAccountDefault - videoChangeOwnership?: MVideoChangeOwnershipFull - - account?: MAccountDefault - - actorUrl?: MActorUrl - actorFull?: MActorFull - - user?: MUserDefault - - server?: MServer - - videoRedundancy?: MVideoRedundancyVideo - - accountBlock?: MAccountBlocklist - serverBlock?: MServerBlocklist - - oauth?: { - token: MOAuthTokenUser - } - - signature?: { - actor: MActorAccountChannelId - } - - authenticated?: boolean - - registeredPlugin?: RegisteredPlugin - - externalAuth?: RegisterServerAuthExternalOptions - - plugin?: MPlugin - } - } -} diff --git a/server/typings/express/index.d.ts b/server/typings/express/index.d.ts new file mode 100644 index 000000000..ad3212340 --- /dev/null +++ b/server/typings/express/index.d.ts @@ -0,0 +1,128 @@ +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 '../../types/models' +import { MVideoPlaylistFull, MVideoPlaylistFullSummary } from '../../types/models/video/video-playlist' +import { MVideoImportDefault } from '@server/types/models/video/video-import' +import { MAccountBlocklist, MActorUrl, MStreamingPlaylist, MVideoFile, MVideoImmutable } from '@server/types/models' +import { MVideoPlaylistElement, MVideoPlaylistElementVideoUrlPlaylistPrivacy } from '@server/types/models/video/video-playlist-element' +import { MAccountVideoRateAccountVideo } from '@server/types/models/video/video-rate' +import { MVideoChangeOwnershipFull } from '../../types/models/video/video-change-ownership' +import { MPlugin, MServer } from '@server/types/models/server' +import { MServerBlocklist } from '../../types/models/server/server-blocklist' +import { MOAuthTokenUser } from '@server/types/models/oauth/oauth-token' +import { UserRole } from '@shared/models' +import { RegisterServerAuthExternalOptions } from '@shared/models/plugins/register-server-auth.model' + +declare module 'express' { + export interface Request { + query: any + } + + interface Response { + + locals: { + bypassLogin?: { + bypass: boolean + pluginName: string + authName?: string + user: { + username: string + email: string + displayName: string + role: UserRole + } + } + + refreshTokenAuthName?: string + + explicitLogout: boolean + + videoAll?: MVideoFullLight + onlyImmutableVideo?: MVideoImmutable + onlyVideo?: MVideoThumbnail + onlyVideoWithRights?: MVideoWithRights + videoId?: MVideoIdThumbnail + + videoShare?: MVideoShareActor + + videoFile?: MVideoFile + + videoImport?: MVideoImportDefault + + videoBlacklist?: MVideoBlacklist + + videoCaption?: MVideoCaptionVideo + + videoAbuse?: MVideoAbuse + + videoStreamingPlaylist?: MStreamingPlaylist + + videoChannel?: MChannelAccountDefault + + videoPlaylistFull?: MVideoPlaylistFull + videoPlaylistSummary?: MVideoPlaylistFullSummary + + videoPlaylistElement?: MVideoPlaylistElement + videoPlaylistElementAP?: MVideoPlaylistElementVideoUrlPlaylistPrivacy + + accountVideoRate?: MAccountVideoRateAccountVideo + + videoCommentFull?: MCommentOwnerVideoReply + videoCommentThread?: MComment + + follow?: MActorFollowActorsDefault + subscription?: MActorFollowActorsDefaultSubscription + + nextOwner?: MAccountDefault + videoChangeOwnership?: MVideoChangeOwnershipFull + + account?: MAccountDefault + + actorUrl?: MActorUrl + actorFull?: MActorFull + + user?: MUserDefault + + server?: MServer + + videoRedundancy?: MVideoRedundancyVideo + + accountBlock?: MAccountBlocklist + serverBlock?: MServerBlocklist + + oauth?: { + token: MOAuthTokenUser + } + + signature?: { + actor: MActorAccountChannelId + } + + authenticated?: boolean + + registeredPlugin?: RegisteredPlugin + + externalAuth?: RegisterServerAuthExternalOptions + + plugin?: MPlugin + } + } +} -- cgit v1.2.3