@types/connect-mongodb-session
Advanced tools
Comparing version 0.0.4 to 2.4.0
@@ -1,31 +0,34 @@ | ||
// Type definitions for connect-mongodb-session | ||
// Type definitions for connect-mongodb-session 2.4 | ||
// Project: https://github.com/mongodb-js/connect-mongodb-session#readme | ||
// Definitions by: Nattapong Sirilappanich <https://github.com/NattapongSiri> | ||
// Ravi van Rooijen <https://github.com/HoldYourWaffle> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// Minimum TypeScript Version: 3.2 | ||
/// <reference types="express-session" /> | ||
import session = require('express-session'); | ||
import * as express from 'express'; | ||
import {MongoClient, MongoClientOptions} from 'mongodb' | ||
import { MongoClient, MongoClientOptions } from 'mongodb'; | ||
declare function connect(fn : (options?: session.SessionOptions) => express.RequestHandler) : connectMongodbSession.MongoDBStore | ||
export = ConnectMongoDBSession; | ||
declare namespace connectMongodbSession { | ||
export interface MongoDBStore extends session.Store { | ||
client : MongoClient | ||
new(connection?: ConnectionInfo, callback?: (error : Error) => void) : MongoDBStore | ||
declare function ConnectMongoDBSession(fn: typeof session): typeof ConnectMongoDBSession.MongoDBStore; | ||
declare namespace ConnectMongoDBSession { | ||
class MongoDBStore extends session.Store { | ||
constructor(connection?: MongoDBSessionOptions, callback?: (error: Error) => void); | ||
client: MongoClient; | ||
get(sid: string, callback: (err: any, session?: session.SessionData | null) => void): void; | ||
set(sid: string, session: session.SessionData, callback?: (err?: any) => void): void; | ||
destroy(sid: string, callback?: (err?: any) => void): void; | ||
all(callback: (err: any, obj?: session.SessionData[] | { [sid: string]: session.SessionData; } | null) => void): void; | ||
clear(callback?: (err?: any) => void): void; | ||
} | ||
export interface ConnectionInfo { | ||
idField? : string | ||
collection : string | ||
connectionOptions?: MongoClientOptions | ||
databaseName?: string | ||
expires?: number | ||
uri : string | ||
interface MongoDBSessionOptions { | ||
uri: string; | ||
collection: string; | ||
expires?: number; | ||
databaseName?: string; | ||
connectionOptions?: MongoClientOptions; | ||
idField?: string; | ||
} | ||
} | ||
export = connect |
{ | ||
"name": "@types/connect-mongodb-session", | ||
"version": "0.0.4", | ||
"version": "2.4.0", | ||
"description": "TypeScript definitions for connect-mongodb-session", | ||
@@ -11,2 +11,7 @@ "license": "MIT", | ||
"githubUsername": "NattapongSiri" | ||
}, | ||
{ | ||
"name": "Ravi van Rooijen", | ||
"url": "https://github.com/HoldYourWaffle", | ||
"githubUsername": "HoldYourWaffle" | ||
} | ||
@@ -23,8 +28,7 @@ ], | ||
"dependencies": { | ||
"@types/express": "*", | ||
"@types/express-session": "*", | ||
"@types/mongodb": "*" | ||
}, | ||
"typesPublisherContentHash": "4f99a481ed8a25b55625c2371ce698a26d172d53bca43c129bf2944e31865a02", | ||
"typeScriptVersion": "3.2" | ||
"typesPublisherContentHash": "095c2637f37b7d34ae3c952bf9bd829e419f0c5b97cce8da4a10e00b9ba583d3", | ||
"typeScriptVersion": "3.3" | ||
} |
@@ -11,7 +11,7 @@ # Installation | ||
### Additional Details | ||
* Last updated: Fri, 18 Sep 2020 23:40:32 GMT | ||
* Dependencies: [@types/express-session](https://npmjs.com/package/@types/express-session), [@types/express](https://npmjs.com/package/@types/express), [@types/mongodb](https://npmjs.com/package/@types/mongodb) | ||
* Last updated: Tue, 24 Nov 2020 11:27:55 GMT | ||
* Dependencies: [@types/express-session](https://npmjs.com/package/@types/express-session), [@types/mongodb](https://npmjs.com/package/@types/mongodb) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by [Nattapong Sirilappanich](https://github.com/NattapongSiri). | ||
These definitions were written by [Nattapong Sirilappanich](https://github.com/NattapongSiri), and [Ravi van Rooijen](https://github.com/HoldYourWaffle). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
4377
2
28
1
- Removed@types/express@*