diff --git a/ghost/adapter-manager/types/index.d.ts b/ghost/adapter-manager/types/index.d.ts deleted file mode 100644 index db6227abd1..0000000000 --- a/ghost/adapter-manager/types/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _exports: typeof import("./lib/AdapterManager"); -export = _exports; diff --git a/ghost/adapter-manager/types/lib/AdapterManager.d.ts b/ghost/adapter-manager/types/lib/AdapterManager.d.ts deleted file mode 100644 index 57beca9fd5..0000000000 --- a/ghost/adapter-manager/types/lib/AdapterManager.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export = AdapterManager; -declare class AdapterManager { - /** - * @param {object} config - * @param {string[]} config.pathsToAdapters The paths to check, e.g. ['content/adapters', 'core/server/adapters'] - * @param {(path: string) => AdapterConstructor} config.loadAdapterFromPath A function to load adapters, e.g. global.require - */ - constructor({ pathsToAdapters, loadAdapterFromPath }: { - pathsToAdapters: string[]; - loadAdapterFromPath: (path: string) => AdapterConstructor; - }); - /** - * @private - * @type {Object.} - */ - private baseClasses; - /** - * @private - * @type {Object.>} - */ - private instanceCache; - /** - * @private - * @type {string[]} - */ - private pathsToAdapters; - /** - * @private - * @type {(path: string) => AdapterConstructor} - */ - private loadAdapterFromPath; - /** - * Register an adapter type and the corresponding base class. Must be called before requesting adapters of that type - * - * @param {string} type The name for the type of adapter - * @param {AdapterConstructor} BaseClass The class from which all adapters of this type must extend - */ - registerAdapter(type: string, BaseClass: AdapterConstructor): void; - /** - * getAdapter - * - * @param {string} adapterType The type of adapter, e.g. "storage" or "scheduling" - * @param {string} adapterName The active adapter, e.g. "LocalFileStorage" - * @param {object} config The config the adapter should be instantiated with - * - * @returns {Adapter} The resolved and instantiated adapter - */ - getAdapter(adapterType: string, adapterName: string, config: object): Adapter; -} -declare namespace AdapterManager { - export { AdapterConstructor, Adapter }; -} -type AdapterConstructor = new (arg1: object) => Adapter; -type Adapter = { - requiredFns: string[]; -}; diff --git a/ghost/adapter-manager/types/test/AdapterManager.test.d.ts b/ghost/adapter-manager/types/test/AdapterManager.test.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/ghost/adapter-manager/types/test/AdapterManager.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/ghost/mw-session-from-token/types/index.d.ts b/ghost/mw-session-from-token/types/index.d.ts deleted file mode 100644 index d0d75cd027..0000000000 --- a/ghost/mw-session-from-token/types/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _exports: typeof import("./lib/SessionFromToken"); -export = _exports; diff --git a/ghost/mw-session-from-token/types/lib/SessionFromToken.d.ts b/ghost/mw-session-from-token/types/lib/SessionFromToken.d.ts deleted file mode 100644 index a687887864..0000000000 --- a/ghost/mw-session-from-token/types/lib/SessionFromToken.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export = SessionFromToken; -/** - * @typedef {object} User - * @prop {string} id - */ -/** - * @typedef {import('express').Request} Req - * @typedef {import('express').Response} Res - * @typedef {import('express').NextFunction} Next - * @typedef {import('express').RequestHandler} RequestHandler - */ -/** - * Returns a connect middleware function which exchanges a token for a session - * - * @template Token - * @template Lookup - * - * @param { object } deps - * @param { (req: Req) => Promise } deps.getTokenFromRequest - * @param { (token: Token) => Promise } deps.getLookupFromToken - * @param { (lookup: Lookup) => Promise } deps.findUserByLookup - * @param { (req: Req, res: Res, user: User) => Promise } deps.createSession - * @param { boolean } deps.callNextWithError - Whether next should be call with an error or just pass through - * - * @returns {RequestHandler} - */ -declare function SessionFromToken({ getTokenFromRequest, getLookupFromToken, findUserByLookup, createSession, callNextWithError }: { - getTokenFromRequest: (req: Req) => Promise; - getLookupFromToken: (token: Token) => Promise; - findUserByLookup: (lookup: Lookup) => Promise; - createSession: (req: Req, res: Res, user: User) => Promise; - callNextWithError: boolean; -}): RequestHandler; -declare namespace SessionFromToken { - export { User, Req, Res, Next, RequestHandler }; -} -type Req = import('express').Request; -type User = { - id: string; -}; -type Res = import('express').Response; -type RequestHandler = import('express').RequestHandler; -type Next = import('express').NextFunction; diff --git a/ghost/mw-session-from-token/types/test/SessionFromToken.test.d.ts b/ghost/mw-session-from-token/types/test/SessionFromToken.test.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/ghost/mw-session-from-token/types/test/SessionFromToken.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/ghost/session-service/types/index.d.ts b/ghost/session-service/types/index.d.ts deleted file mode 100644 index 7bda0dbcab..0000000000 --- a/ghost/session-service/types/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare function _exports({ getSession, findUserById, getOriginOfRequest }: { - getSession: (req: import("express").Request>, res: import("express").Response>) => Promise; - findUserById: (data: { - id: string; - }) => Promise; - getOriginOfRequest: (req: import("express").Request>) => string; -}): import("./lib/SessionService").SessionService; -export = _exports; diff --git a/ghost/session-service/types/lib/SessionService.d.ts b/ghost/session-service/types/lib/SessionService.d.ts deleted file mode 100644 index 3e187d6be0..0000000000 --- a/ghost/session-service/types/lib/SessionService.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -declare function _exports({ getSession, findUserById, getOriginOfRequest }: { - getSession: (req: Req, res: Res) => Promise; - findUserById: (data: { - id: string; - }) => Promise; - getOriginOfRequest: (req: Req) => string; -}): SessionService; -export = _exports; -export type User = { - id: string; -}; -export type Session = { - destroy: (cb: (err: Error | null) => any) => void; - user_id: string; - origin: string; - user_agent: string; - ip: string; -}; -export type Req = import('express').Request; -export type Res = import('express').Response; -export type SessionService = { - getUserForSession: (req: Req, res: Res) => Promise; - destroyCurrentSession: (req: Req, res: Res) => Promise; - createSessionForUser: (req: Req, res: Res, user: User) => Promise; -}; diff --git a/ghost/session-service/types/test/SessionService.test.d.ts b/ghost/session-service/types/test/SessionService.test.d.ts deleted file mode 100644 index cb0ff5c3b5..0000000000 --- a/ghost/session-service/types/test/SessionService.test.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {};