express-ext 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,8 +19,8 @@ var search_1 = require("./search");
|
|
|
19
19
|
var search_func_1 = require("./search_func");
|
|
20
20
|
var GenericSearchController = (function (_super) {
|
|
21
21
|
__extends(GenericSearchController, _super);
|
|
22
|
-
function GenericSearchController(log, find, service, config, validate, dates, numbers) {
|
|
23
|
-
var _this = _super.call(this, log, service, config, validate) || this;
|
|
22
|
+
function GenericSearchController(log, find, service, config, validate, build, dates, numbers) {
|
|
23
|
+
var _this = _super.call(this, log, service, config, validate, build) || this;
|
|
24
24
|
_this.find = find;
|
|
25
25
|
_this.search = _this.search.bind(_this);
|
|
26
26
|
_this.config = search_1.initializeConfig(config);
|
package/lib/LowCodeController.js
CHANGED
|
@@ -19,8 +19,8 @@ var search_1 = require("./search");
|
|
|
19
19
|
var search_func_1 = require("./search_func");
|
|
20
20
|
var Controller = (function (_super) {
|
|
21
21
|
__extends(Controller, _super);
|
|
22
|
-
function Controller(log, lowCodeService, config, validate, dates, numbers) {
|
|
23
|
-
var _this = _super.call(this, log, lowCodeService, config, validate) || this;
|
|
22
|
+
function Controller(log, lowCodeService, config, validate, build, dates, numbers) {
|
|
23
|
+
var _this = _super.call(this, log, lowCodeService, config, validate, build) || this;
|
|
24
24
|
_this.lowCodeService = lowCodeService;
|
|
25
25
|
_this.search = _this.search.bind(_this);
|
|
26
26
|
_this.config = search_1.initializeConfig(config);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Request, Response} from 'express';
|
|
2
2
|
import {ResultInfo, StatusConfig} from './edit';
|
|
3
|
-
import {GenericController, GenericService} from './GenericController';
|
|
3
|
+
import {Build, GenericController, GenericService} from './GenericController';
|
|
4
4
|
import {handleError, Log} from './http';
|
|
5
5
|
import {ErrorMessage} from './metadata';
|
|
6
6
|
import {buildArray, Filter, format, fromRequest, getParameters, initializeConfig, jsonResult, SearchConfig, SearchResult} from './search';
|
|
@@ -16,8 +16,8 @@ export class GenericSearchController<T, ID, S extends Filter> extends GenericCon
|
|
|
16
16
|
fields?: string;
|
|
17
17
|
excluding?: string;
|
|
18
18
|
array?: string[];
|
|
19
|
-
constructor(log: Log, public find: (s: S, limit?: number, skip?: number|string, fields?: string[]) => Promise<SearchResult<T>>, service: GenericService<T, ID, number|ResultInfo<T>>, config?: Config, validate?: (obj: T, patch?: boolean) => Promise<ErrorMessage[]>, dates?: string[], numbers?: string[]) {
|
|
20
|
-
super(log, service, config, validate);
|
|
19
|
+
constructor(log: Log, public find: (s: S, limit?: number, skip?: number|string, fields?: string[]) => Promise<SearchResult<T>>, service: GenericService<T, ID, number|ResultInfo<T>>, config?: Config, validate?: (obj: T, patch?: boolean) => Promise<ErrorMessage[]>, build?: Build<T>, dates?: string[], numbers?: string[]) {
|
|
20
|
+
super(log, service, config, validate, build);
|
|
21
21
|
this.search = this.search.bind(this);
|
|
22
22
|
this.config = initializeConfig(config);
|
|
23
23
|
if (this.config) {
|
package/src/LowCodeController.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {Request, Response} from 'express';
|
|
2
2
|
import {ResultInfo, StatusConfig} from './edit';
|
|
3
|
-
import {GenericController, GenericService} from './GenericController';
|
|
3
|
+
import {Build, GenericController, GenericService} from './GenericController';
|
|
4
4
|
import {handleError, Log} from './http';
|
|
5
5
|
import {ErrorMessage} from './metadata';
|
|
6
6
|
import {buildArray, Filter, format, fromRequest, getParameters, initializeConfig, jsonResult, SearchConfig, SearchResult} from './search';
|
|
@@ -19,8 +19,8 @@ export class Controller<T, ID, S extends Filter> extends GenericController<T, ID
|
|
|
19
19
|
fields?: string;
|
|
20
20
|
excluding?: string;
|
|
21
21
|
array?: string[];
|
|
22
|
-
constructor(log: Log, public lowCodeService: Service<T, ID, number|ResultInfo<T>, S>, config?: LowCodeConfig, validate?: (obj: T, patch?: boolean) => Promise<ErrorMessage[]>, dates?: string[], numbers?: string[]) {
|
|
23
|
-
super(log, lowCodeService, config, validate);
|
|
22
|
+
constructor(log: Log, public lowCodeService: Service<T, ID, number|ResultInfo<T>, S>, config?: LowCodeConfig, validate?: (obj: T, patch?: boolean) => Promise<ErrorMessage[]>, build?: Build<T>, dates?: string[], numbers?: string[]) {
|
|
23
|
+
super(log, lowCodeService, config, validate, build);
|
|
24
24
|
this.search = this.search.bind(this);
|
|
25
25
|
this.config = initializeConfig(config);
|
|
26
26
|
if (this.config) {
|