supertokens-node
Version:
NodeJS driver for SuperTokens core
17 lines (16 loc) • 1.41 kB
TypeScript
import { AppInfo, NormalisedAppinfo, HTTPMethod } from "./types";
import * as express from "express";
export declare function getLargestVersionFromIntersection(v1: string[], v2: string[]): string | undefined;
export declare function maxVersion(version1: string, version2: string): string;
export declare function normaliseInputAppInfoOrThrowError(appInfo: AppInfo): NormalisedAppinfo;
export declare function getRIDFromRequest(req: express.Request): string | undefined;
export declare function normaliseHttpMethod(method: string): HTTPMethod;
export declare function getHeader(req: express.Request, key: string): string | undefined;
export declare function sendNon200Response(res: express.Response, message: string, statusCode: number): void;
export declare function send200Response(res: express.Response, responseJson: any): void;
export declare function assertThatBodyParserHasBeenUsed(req: express.Request, res: express.Response): Promise<void>;
export declare function isAnIpAddress(ipaddress: string): boolean;
export declare function validateTheStructureOfUserInput(config: any, inputSchema: any, configRoot: string): void;
export declare function getDataFromFileForServerlessCache<T>(filePath: string): Promise<T | undefined>;
export declare function storeIntoTempFolderForServerlessCache(filePath: string, data: any): Promise<void>;
export declare function removeServerlessCache(): Promise<void>;