mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2026-03-25 17:13:29 +00:00
initial commit
This commit is contained in:
16
src/types/bcrypt-nodejs.d.ts
vendored
Normal file
16
src/types/bcrypt-nodejs.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/** Declaration file generated by dts-gen */
|
||||
|
||||
export function compare(data: any, encrypted: any, callback: any): void;
|
||||
|
||||
export function compareSync(data: any, encrypted: any): any;
|
||||
|
||||
export function genSalt(rounds: any, callback: (err: any, salt: any) => any): void;
|
||||
|
||||
export function genSaltSync(rounds: any): any;
|
||||
|
||||
export function getRounds(encrypted: any): any;
|
||||
|
||||
export function hash(data: any, salt: any, progress: any, hash: (err: any, salt: any) => any): void;
|
||||
|
||||
export function hashSync(data: any, salt: any, progress: any): any;
|
||||
|
||||
1
src/types/compression.d.ts
vendored
Normal file
1
src/types/compression.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module "compression";
|
||||
14
src/types/express-flash.d.ts
vendored
Normal file
14
src/types/express-flash.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
/// <reference types="express" />
|
||||
|
||||
// Add RequestValidation Interface on to Express's Request Interface.
|
||||
declare namespace Express {
|
||||
interface Request extends Flash {}
|
||||
}
|
||||
|
||||
interface Flash {
|
||||
flash(type: string, message: any): void;
|
||||
}
|
||||
|
||||
declare module "express-flash";
|
||||
|
||||
1
src/types/express-status-monitor.d.ts
vendored
Normal file
1
src/types/express-status-monitor.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare module "express-status-monitor";
|
||||
55
src/types/fbgraph.d.ts
vendored
Normal file
55
src/types/fbgraph.d.ts
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/** Declaration file generated by dts-gen */
|
||||
|
||||
export const version: string;
|
||||
|
||||
export function authorize(params: any, callback: any): any;
|
||||
|
||||
export function batch(reqs: any, additionalData: any, callback: any): any;
|
||||
|
||||
export function del(url: any, postData: any, callback: any): any;
|
||||
|
||||
export function extendAccessToken(params: any, callback: any): any;
|
||||
|
||||
export function fql(query: any, params: any, callback: any): any;
|
||||
|
||||
export function get(url: any, params?: any, callback?: any): any;
|
||||
|
||||
export function getAccessToken(): any;
|
||||
|
||||
export function getAppSecret(): any;
|
||||
|
||||
export function getGraphUrl(): any;
|
||||
|
||||
export function getOauthUrl(params: any, opts: any): any;
|
||||
|
||||
export function getOptions(): any;
|
||||
|
||||
export function post(url: any, postData: any, callback: any): any;
|
||||
|
||||
export function search(options: any, callback: any): any;
|
||||
|
||||
export function setAccessToken(token: any): any;
|
||||
|
||||
export function setAppSecret(token: any): any;
|
||||
|
||||
export function setGraphUrl(url: any): any;
|
||||
|
||||
export function setOptions(options: any): any;
|
||||
|
||||
export function setVersion(version: any): any;
|
||||
|
||||
/**
|
||||
* Fairly incomplete. I only added some commonly used fields.
|
||||
*/
|
||||
export type FacebookUser = {
|
||||
id: string,
|
||||
name: string,
|
||||
email: string,
|
||||
first_name: string,
|
||||
last_name: string,
|
||||
gender: string,
|
||||
link: string,
|
||||
locale: string,
|
||||
timezone: number
|
||||
};
|
||||
|
||||
2
src/types/lusca.d.ts
vendored
Normal file
2
src/types/lusca.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export function xframe(type: string): any;
|
||||
export function xssProtection(enabled: boolean): any;
|
||||
48
src/types/passport-local.d.ts
vendored
Normal file
48
src/types/passport-local.d.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
// Type definitions for passport-local 1.0.0
|
||||
// Project: https://github.com/jaredhanson/passport-local
|
||||
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="passport"/>
|
||||
|
||||
|
||||
|
||||
import passport = require("passport");
|
||||
import express = require("express");
|
||||
|
||||
interface IStrategyOptions {
|
||||
usernameField?: string;
|
||||
passwordField?: string;
|
||||
passReqToCallback?: boolean;
|
||||
}
|
||||
|
||||
interface IStrategyOptionsWithRequest {
|
||||
usernameField?: string;
|
||||
passwordField?: string;
|
||||
passReqToCallback: boolean;
|
||||
}
|
||||
|
||||
interface IVerifyOptions {
|
||||
message: string;
|
||||
}
|
||||
|
||||
interface VerifyFunctionWithRequest {
|
||||
(req: express.Request, username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
|
||||
}
|
||||
|
||||
interface VerifyFunction {
|
||||
(username: string, password: string, done: (error: any, user?: any, options?: IVerifyOptions) => void): void;
|
||||
}
|
||||
|
||||
declare class Strategy implements passport.Strategy {
|
||||
constructor(options: IStrategyOptionsWithRequest, verify: VerifyFunctionWithRequest);
|
||||
constructor(options: IStrategyOptions, verify: VerifyFunction);
|
||||
constructor(verify: VerifyFunction);
|
||||
|
||||
name: string;
|
||||
authenticate: (req: express.Request, options?: Object) => void;
|
||||
}
|
||||
|
||||
interface LocalStrategyInfo {
|
||||
message: string;
|
||||
}
|
||||
Reference in New Issue
Block a user