diff --git a/index.d.ts b/index.d.ts index 0e0c149ea6..ca30e0f12f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -6,13 +6,13 @@ declare function feathers(): feathers.Application; declare namespace feathers { export var static: typeof express.static; - + type NullableId = number | string | null; interface Params { query?: any; } - + interface Pagination { total: Number, limit: Number, @@ -34,13 +34,13 @@ declare namespace feathers { get?(id: number | string, params?: Params, callback?: any): Promise; /** - * Creates a new resource with data. + * Creates a new resource with data. */ create?(data: T | T[], params?: Params, callback?: any): Promise; /** * Replaces the resource identified by id with data. - * Update multiples resources with id equal `null` + * Update multiples resources with id equal `null` */ update?(id: NullableId, data: T, params?: Params, callback?: any): Promise; @@ -58,9 +58,14 @@ declare namespace feathers { remove?(id: NullableId, params?: Params, callback?: any): Promise; /** - * Initialize your service with any special configuration or if connecting services that are very tightly coupled + * Initialize your service with any special configuration or if connecting services that are very tightly coupled */ setup?(app?: Application, path?: string): void; + + before(any?): this; + after(any?): this; + filter(any?): this; + } interface FeathersUseHandler extends expressCore.IRouterHandler, express.IRouterMatcher { @@ -74,7 +79,7 @@ declare namespace feathers { service(location: string): Service; /** - * Registers a new service for that path and returns the wrapped service object + * Registers a new service for that path and returns the wrapped service object */ service(location: string, service: Service, options?: any): Service; @@ -84,7 +89,7 @@ declare namespace feathers { setup(): this; /** - * Register a service object + * Register a service object */ use: FeathersUseHandler; } diff --git a/package.json b/package.json index dc379501a2..1e10fac7fd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "feathers", "description": "Build Better APIs, Faster than Ever.", - "version": "2.1.2", + "version": "2.1.3", "homepage": "http://feathersjs.com", "repository": { "type": "git", @@ -70,7 +70,7 @@ "body-parser": "^1.15.2", "eslint-if-supported": "^1.0.1", "feathers-rest": "^1.5.3", - "feathers-socketio": "^1.4.2", + "feathers-socketio": "^2.0.0", "istanbul": "^1.1.0-alpha.1", "jshint": "^2.9.4", "mocha": "^3.2.0",