@golemio/core 1.2.2-dev.486117229 → 1.2.2-dev.487919100
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.
- package/dist/integration-engine/models/PostgresModel.d.ts +3 -2
- package/dist/integration-engine/models/PostgresModel.js +10 -6
- package/dist/integration-engine/models/PostgresModel.js.map +1 -1
- package/dist/output-gateway/models/BaseModel.d.ts +2 -1
- package/dist/output-gateway/models/BaseModel.js.map +1 -1
- package/dist/output-gateway/models/GeoJsonModel.d.ts +5 -24
- package/dist/output-gateway/models/GeoJsonModel.js +2 -2
- package/dist/output-gateway/models/GeoJsonModel.js.map +1 -1
- package/dist/output-gateway/models/MongoModel.d.ts +2 -1
- package/dist/output-gateway/models/MongoModel.js +5 -1
- package/dist/output-gateway/models/MongoModel.js.map +1 -1
- package/dist/output-gateway/models/interfaces/IBaseModel.d.ts +5 -0
- package/dist/output-gateway/models/interfaces/IBaseModel.js +3 -0
- package/dist/output-gateway/models/interfaces/IBaseModel.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IGeoJsonModel.d.ts +8 -0
- package/dist/output-gateway/models/interfaces/IGeoJsonModel.js +3 -0
- package/dist/output-gateway/models/interfaces/IGeoJsonModel.js.map +1 -0
- package/dist/output-gateway/routes/BaseRouter.d.ts +2 -2
- package/dist/output-gateway/routes/BaseRouter.js +1 -1
- package/dist/output-gateway/routes/BaseRouter.js.map +1 -1
- package/dist/output-gateway/routes/GeoJsonRouter.d.ts +4 -4
- package/dist/output-gateway/routes/GeoJsonRouter.js +20 -22
- package/dist/output-gateway/routes/GeoJsonRouter.js.map +1 -1
- package/dist/output-gateway/routes/index.d.ts +1 -0
- package/dist/output-gateway/routes/index.js +1 -0
- package/dist/output-gateway/routes/index.js.map +1 -1
- package/dist/output-gateway/routes/interfaces/IGeoJsonAllFilterParameters.d.ts +22 -0
- package/dist/output-gateway/routes/interfaces/IGeoJsonAllFilterParameters.js +3 -0
- package/dist/output-gateway/routes/interfaces/IGeoJsonAllFilterParameters.js.map +1 -0
- package/dist/schema-definitions/SharedSchemaProvider.d.ts +85 -0
- package/dist/schema-definitions/SharedSchemaProvider.js +91 -0
- package/dist/schema-definitions/SharedSchemaProvider.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +1 -0
- package/dist/schema-definitions/index.js +1 -0
- package/dist/schema-definitions/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { JSONSchemaValidator, Validator } from "@golemio/validator";
|
|
2
|
-
import { ModelCtor, Transaction, Sequelize, Model } from "sequelize";
|
|
3
1
|
import { IModel, ISequelizeSettings } from "./";
|
|
2
|
+
import { JSONSchemaValidator, Validator } from "@golemio/validator";
|
|
3
|
+
import { Model, ModelCtor, Sequelize, Transaction } from "sequelize";
|
|
4
4
|
import { SyncOptions } from "sequelize/types/lib/sequelize";
|
|
5
5
|
export declare class PostgresModel implements IModel {
|
|
6
6
|
/** Model name */
|
|
@@ -19,6 +19,7 @@ export declare class PostgresModel implements IModel {
|
|
|
19
19
|
protected schema: string;
|
|
20
20
|
constructor(name: string, settings: ISequelizeSettings, validator: Validator | JSONSchemaValidator);
|
|
21
21
|
save: (data: any, useTmpTable?: boolean) => Promise<any>;
|
|
22
|
+
validate: (data: any) => Promise<boolean>;
|
|
22
23
|
query: (query: string) => Promise<[unknown[], unknown]>;
|
|
23
24
|
saveBySqlFunction: (data: any, primaryKeys: string[], useTmpTable?: boolean, transaction?: Transaction | null, connection?: Sequelize | null, batchId?: number | null) => Promise<any>;
|
|
24
25
|
truncate: (useTmpTable?: boolean) => Promise<any>;
|
|
@@ -10,17 +10,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PostgresModel = void 0;
|
|
13
|
-
const errors_1 = require("@golemio/errors");
|
|
14
|
-
const sequelize_1 = require("sequelize");
|
|
15
13
|
const connectors_1 = require("../connectors");
|
|
16
14
|
const helpers_1 = require("../helpers");
|
|
15
|
+
const errors_1 = require("@golemio/errors");
|
|
16
|
+
const sequelize_1 = require("sequelize");
|
|
17
17
|
class PostgresModel {
|
|
18
18
|
constructor(name, settings, validator) {
|
|
19
19
|
this.save = (data, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
|
|
20
20
|
// data validation
|
|
21
|
+
yield this.validate(data);
|
|
22
|
+
const model = yield this.getSequelizeModelSafely(useTmpTable);
|
|
23
|
+
// calling the method based on savingType (this.insertOnly() or this.insertOrUpdate())
|
|
24
|
+
return this[this.savingType](model, data);
|
|
25
|
+
});
|
|
26
|
+
this.validate = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
21
27
|
if (this.validator) {
|
|
22
28
|
try {
|
|
23
|
-
yield this.validator.Validate(data);
|
|
29
|
+
return yield this.validator.Validate(data);
|
|
24
30
|
}
|
|
25
31
|
catch (err) {
|
|
26
32
|
throw new errors_1.CustomError("Error while validating data.", true, this.name, 4005, err);
|
|
@@ -28,10 +34,8 @@ class PostgresModel {
|
|
|
28
34
|
}
|
|
29
35
|
else {
|
|
30
36
|
helpers_1.log.warn(this.name + ": Model validator is not set.");
|
|
37
|
+
return true;
|
|
31
38
|
}
|
|
32
|
-
const model = yield this.getSequelizeModelSafely(useTmpTable);
|
|
33
|
-
// calling the method based on savingType (this.insertOnly() or this.insertOrUpdate())
|
|
34
|
-
return this[this.savingType](model, data);
|
|
35
39
|
});
|
|
36
40
|
this.query = (query) => __awaiter(this, void 0, void 0, function* () {
|
|
37
41
|
return yield connectors_1.PostgresConnector.getConnection().query(query);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresModel.js","sourceRoot":"","sources":["../../../src/integration-engine/models/PostgresModel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"PostgresModel.js","sourceRoot":"","sources":["../../../src/integration-engine/models/PostgresModel.ts"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AM,EAAE,IAAI,CAAC,MAAM,IACrB,CAAC;QAEH,IAAI,QAAQ,CAAC,WAAW,EAAE;YACtB,IAAI,CAAC,iBAAiB,GAAG,8BAAiB,CAAC,aAAa,EAAE,CAAC,MAAM,CAC7D,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,yBAAyB,kCAC7B,QAAQ,CAAC,2BAA2B,KAAE,MAAM,EAAE,KAAK,IAC3D,CAAC;SACL;aAAM;YACH,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;SACjC;QAED,IAAI,QAAQ,CAAC,kBAAkB,EAAE;YAC7B,QAAQ,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACzC,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;gBAC1C,IAAI,IAAI,CAAC,iBAAiB,EAAE;oBACxB,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;iBAChD;YACL,CAAC,CAAC,CAAC;SACN;QAED,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IAC1C,CAAC;CAuLJ;AAvOD,sCAuOC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { IBaseModel } from "./interfaces/IBaseModel";
|
|
1
2
|
/**
|
|
2
3
|
* Base model class, defines basic structure of a model. GetAll, GetOne functions, mandatory name
|
|
3
4
|
*
|
|
4
5
|
* Model /DATA ACCESS LAYER/: Defines data structure, connects to DB storage and retrieves data directly from database.
|
|
5
6
|
* Performs database queries.
|
|
6
7
|
*/
|
|
7
|
-
export declare abstract class BaseModel {
|
|
8
|
+
export declare abstract class BaseModel implements IBaseModel {
|
|
8
9
|
/** Name of the model */
|
|
9
10
|
protected name: string;
|
|
10
11
|
protected constructor(name: string);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/BaseModel.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"BaseModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/BaseModel.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,MAAsB,SAAS;IAI3B,YAAsB,IAAY;QAO3B,YAAO,GAAG,GAAW,EAAE;YAC1B,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC;QARE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CAQJ;AAdD,8BAcC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { SchemaDefinition } from "mongoose";
|
|
2
1
|
import { IGeoJSONFeature } from "../Geo";
|
|
3
2
|
import { MongoModel } from "./";
|
|
4
3
|
import { IPropertyResponseModel } from "./response";
|
|
4
|
+
import { IGeoJsonAllFilterParameters } from "../routes/interfaces/IGeoJsonAllFilterParameters";
|
|
5
|
+
import { SchemaDefinition } from "mongoose";
|
|
6
|
+
import { IGeoJsonModel } from "./interfaces/IGeoJsonModel";
|
|
5
7
|
/**
|
|
6
8
|
* General model for GeoJSON data. Geo-spatial indexing and querying. Implements general GetAll and GetOne functions
|
|
7
9
|
*
|
|
@@ -16,7 +18,7 @@ import { IPropertyResponseModel } from "./response";
|
|
|
16
18
|
* Model /DATA ACCESS LAYER/: Defines data structure, connects to DB storage and retrieves data directly from database.
|
|
17
19
|
* Performs database queries.
|
|
18
20
|
*/
|
|
19
|
-
export declare class GeoJsonModel extends MongoModel {
|
|
21
|
+
export declare class GeoJsonModel extends MongoModel implements IGeoJsonModel {
|
|
20
22
|
/**
|
|
21
23
|
* Creates a model with specified schema definition
|
|
22
24
|
* @param inName Name of the model - corresponding with mongo collection name (eg. "parkings" for "Parking" model)
|
|
@@ -37,28 +39,7 @@ export declare class GeoJsonModel extends MongoModel {
|
|
|
37
39
|
* @param options.additionalFilters Object with additional filter conditions to be added to the selection
|
|
38
40
|
* @returns GeoJSON FeatureCollection with all retrieved objects in "features"
|
|
39
41
|
*/
|
|
40
|
-
GetAll(options?:
|
|
41
|
-
/** Latitude to sort results by (by proximity) */
|
|
42
|
-
lat?: number;
|
|
43
|
-
/** Longitute to sort results by */
|
|
44
|
-
lng?: number;
|
|
45
|
-
/** Maximum range from specified latLng. Only data within this range will be returned. */
|
|
46
|
-
range?: number;
|
|
47
|
-
/** Limit (can be used for pagination). Evaluated last, after all filters applied. */
|
|
48
|
-
limit?: number;
|
|
49
|
-
/** Offset (can be used for pagination). Evaluated last, after all filters applied. */
|
|
50
|
-
offset?: number;
|
|
51
|
-
/** Filters out all results with older updated_at than this parameter
|
|
52
|
-
* (filters not-updated data)
|
|
53
|
-
*/
|
|
54
|
-
updatedSince?: string;
|
|
55
|
-
/** Filters the data to include only these with one of the specified "district" value */
|
|
56
|
-
districts?: string[];
|
|
57
|
-
/** Filters the data to include only specified IDs */
|
|
58
|
-
ids?: number[];
|
|
59
|
-
/** Object with additional filter conditions to be added to the selection */
|
|
60
|
-
additionalFilters?: object;
|
|
61
|
-
}): Promise<any>;
|
|
42
|
+
GetAll(options?: IGeoJsonAllFilterParameters): Promise<any>;
|
|
62
43
|
/** Retrieves one record from database
|
|
63
44
|
* @param inId Id of the record to be retrieved
|
|
64
45
|
* @returns Object of the retrieved record or null
|
|
@@ -13,11 +13,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.GeoJsonModel = void 0;
|
|
16
|
-
const errors_1 = require("@golemio/errors");
|
|
17
|
-
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
18
16
|
const Geo_1 = require("../Geo");
|
|
19
17
|
const Logger_1 = require("../Logger");
|
|
20
18
|
const models_1 = require("./");
|
|
19
|
+
const errors_1 = require("@golemio/errors");
|
|
20
|
+
const moment_timezone_1 = __importDefault(require("moment-timezone"));
|
|
21
21
|
/**
|
|
22
22
|
* General model for GeoJSON data. Geo-spatial indexing and querying. Implements general GetAll and GetOne functions
|
|
23
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoJsonModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/GeoJsonModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"GeoJsonModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/GeoJsonModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gCAAwH;AACxH,sCAAiC;AACjC,+BAAwC;AAGxC,4CAA8C;AAC9C,sEAAqC;AAIrC;;;;;;;;;;;;;GAaG;AACH,MAAa,YAAa,SAAQ,mBAAU;IACxC;;;;;;OAMG;IACH,YAAmB,MAAc,EAAE,QAA0B,EAAE,gBAAyB;QACpF,KAAK,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QA2G9C;;;WAGG;QACI,kBAAa,GAAG,GAA4C,EAAE;YACjE,MAAM,MAAM,GAAU,MAAM,IAAI,CAAC,KAAK;iBACjC,SAAS,CAAC;gBACP,EAAE,OAAO,EAAE,wBAAwB,EAAE;gBACrC,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,2BAA2B,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,wBAAwB,EAAE,EAAE,EAAE;gBACjG,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE;aAC3D,CAAC;iBACD,IAAI,EAAE,CAAC;YACZ,OAAO,MAAM;iBACR,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;iBACxB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;iBAC7B,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE;gBAC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ACzB,MAAM,KAAK,GAAoB,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;YAC1H,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;gBAC1D,YAAG,CAAC,KAAK,CAAC,mDAAmD,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,CAAC;gBACtG,MAAM,IAAI,oBAAW,CAAC,MAAM,GAAG,IAAI,GAAG,aAAa,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,CAAC,CAAC;aACnF;iBAAM;gBACH,OAAO,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;aAC9C;QACL,CAAC;KAAA;CA6CJ;AA/JD,oCA+JC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Model, Schema, SchemaDefinition } from "mongoose";
|
|
2
1
|
import { BaseModel } from "./";
|
|
2
|
+
import { Model, Schema, SchemaDefinition } from "mongoose";
|
|
3
3
|
/**
|
|
4
4
|
* General model for data stored in MongoDB.
|
|
5
5
|
*
|
|
@@ -34,6 +34,7 @@ export declare abstract class MongoModel extends BaseModel {
|
|
|
34
34
|
* Searches by this selection in FindOne()
|
|
35
35
|
*/
|
|
36
36
|
PrimaryIdentifierSelection: (inId: any) => object;
|
|
37
|
+
IsPrimaryIdNumber: (idKey: string) => Promise<boolean>;
|
|
37
38
|
/**
|
|
38
39
|
* Adds a new selection condition to filter the retrieved results by
|
|
39
40
|
* @param newCondition New condition/filter object to be added to the "where" clause
|
|
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.MongoModel = void 0;
|
|
13
|
-
const mongoose_1 = require("mongoose");
|
|
14
13
|
const models_1 = require("./");
|
|
14
|
+
const mongoose_1 = require("mongoose");
|
|
15
15
|
/**
|
|
16
16
|
* General model for data stored in MongoDB.
|
|
17
17
|
*
|
|
@@ -47,6 +47,10 @@ class MongoModel extends models_1.BaseModel {
|
|
|
47
47
|
this.PrimaryIdentifierSelection = (inId) => {
|
|
48
48
|
return { "properties.id": inId };
|
|
49
49
|
};
|
|
50
|
+
this.IsPrimaryIdNumber = (idKey) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const schema = yield this.GetSchema();
|
|
52
|
+
return schema.path(idKey) instanceof mongoose_1.Schema.Types.Number;
|
|
53
|
+
});
|
|
50
54
|
/**
|
|
51
55
|
* Adds a new selection condition to filter the retrieved results by
|
|
52
56
|
* @param newCondition New condition/filter object to be added to the "where" clause
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MongoModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/MongoModel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkE;
|
|
1
|
+
{"version":3,"file":"MongoModel.js","sourceRoot":"","sources":["../../../src/output-gateway/models/MongoModel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+BAAuC;AACvC,uCAAkE;AAElE;;;;;GAKG;AACH,MAAsB,UAAW,SAAQ,kBAAS;IAY9C;;;;;;OAMG;IACH,YAAmB,MAAc,EAAE,QAA0B,EAAE,gBAAyB;QACpF,KAAK,CAAC,MAAM,CAAC,CAAC;QAblB,uDAAuD;QAC7C,cAAS,GAAW,EAAE,CAAC;QACjC,oEAAoE;QAC1D,eAAU,GAAW,EAAE,CAAC;QA4BlC;;WAEG;QACI,cAAS,GAAG,GAAS,EAAE;YAC1B,OAAO,IAAI,CAAC,MAAM,CAAC;QACvB,CAAC,CAAA,CAAC;QAEF,qGAAqG;QACrG,wFAAwF;QACxF;;;WAGG;QACI,+BAA0B,GAAG,CAAC,IAAS,E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AwCJ;AA5ED,gCA4EC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IBaseModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/models/interfaces/IBaseModel.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IBaseModel } from "./IBaseModel";
|
|
2
|
+
export interface IGeoJsonModel extends IBaseModel {
|
|
3
|
+
GetAll(options?: any): Promise<any>;
|
|
4
|
+
GetOne(id: string): Promise<any>;
|
|
5
|
+
GetName(): string;
|
|
6
|
+
IsPrimaryIdNumber(idKey: string): Promise<boolean>;
|
|
7
|
+
PrimaryIdentifierSelection(arg0: string): object;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IGeoJsonModel.js","sourceRoot":"","sources":["../../../../src/output-gateway/models/interfaces/IGeoJsonModel.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { IBaseModel } from "../models/interfaces/IBaseModel";
|
|
1
2
|
import { Router } from "express";
|
|
2
|
-
import { BaseModel } from "../models";
|
|
3
3
|
/**
|
|
4
4
|
* Router /WEB LAYER/: maps routes to specific model functions, passes request parameters and handles responses.
|
|
5
5
|
* Handles web logic (http request, response). Sets response headers, handles error responses.
|
|
6
6
|
*/
|
|
7
7
|
export declare class BaseRouter {
|
|
8
8
|
router: Router;
|
|
9
|
-
protected model?:
|
|
9
|
+
protected model?: IBaseModel;
|
|
10
10
|
/**
|
|
11
11
|
* Converts a single value of `any` type to an array containing this element
|
|
12
12
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BaseRouter = void 0;
|
|
4
|
-
const express_1 = require("express");
|
|
5
4
|
const Logger_1 = require("../Logger");
|
|
5
|
+
const express_1 = require("express");
|
|
6
6
|
/**
|
|
7
7
|
* Router /WEB LAYER/: maps routes to specific model functions, passes request parameters and handles responses.
|
|
8
8
|
* Handles web logic (http request, response). Sets response headers, handles error responses.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/BaseRouter.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"BaseRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/BaseRouter.ts"],"names":[],"mappings":";;;AAAA,sCAAiC;AAEjC,qCAAiC;AAEjC;;;GAGG;AACH,MAAa,UAAU;IAAvB;QACI,iDAAiD;QAC1C,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAIjC;;WAEG;QACI,mBAAc,GAAG,CAAC,SAAc,EAAE,EAAE;YACvC,IAAI,CAAC,CAAC,SAAS,YAAY,KAAK,CAAC,EAAE;gBAC/B,YAAG,CAAC,KAAK,CAAC,oBAAoB,GAAG,SAAS,GAAG,aAAa,CAAC,CAAC;gBAC5D,OAAO,CAAC,SAAS,CAAC,CAAC;aACtB;YACD,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC;IACN,CAAC;CAAA;AAhBD,gCAgBC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { IGeoJsonModel } from "../models/interfaces/IGeoJsonModel";
|
|
2
|
+
import { BaseRouter } from "./BaseRouter";
|
|
1
3
|
import { NextFunction, Request, Response, Router } from "express";
|
|
2
4
|
import { ValidationChain } from "express-validator/check";
|
|
3
|
-
import { GeoJsonModel } from "../models/GeoJsonModel";
|
|
4
|
-
import { BaseRouter } from "./BaseRouter";
|
|
5
5
|
/**
|
|
6
6
|
* Router for data in GeoJSON format using GeoJSON model -
|
|
7
7
|
* binds / and /:id to GetAll and GetOne methods of GeoJsonModel.
|
|
@@ -11,9 +11,9 @@ import { BaseRouter } from "./BaseRouter";
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class GeoJsonRouter extends BaseRouter {
|
|
13
13
|
router: Router;
|
|
14
|
-
protected model:
|
|
14
|
+
protected model: IGeoJsonModel;
|
|
15
15
|
protected standardParams: ValidationChain[];
|
|
16
|
-
constructor(inModel:
|
|
16
|
+
constructor(inModel: IGeoJsonModel);
|
|
17
17
|
/**
|
|
18
18
|
* Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
|
|
19
19
|
* @param {number|string} expire TTL for the caching middleware
|
|
@@ -10,15 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.GeoJsonRouter = void 0;
|
|
13
|
-
const express_1 = require("express");
|
|
14
|
-
const check_1 = require("express-validator/check");
|
|
15
|
-
const mongoose_1 = require("mongoose");
|
|
16
|
-
const lodash_1 = require("lodash");
|
|
17
13
|
const Geo_1 = require("../Geo");
|
|
18
14
|
const Logger_1 = require("../Logger");
|
|
19
15
|
const redis_1 = require("../redis");
|
|
20
|
-
const Validation_1 = require("../Validation");
|
|
21
16
|
const BaseRouter_1 = require("./BaseRouter");
|
|
17
|
+
const Validation_1 = require("../Validation");
|
|
18
|
+
const express_1 = require("express");
|
|
19
|
+
const check_1 = require("express-validator/check");
|
|
20
|
+
const lodash_1 = require("lodash");
|
|
22
21
|
/**
|
|
23
22
|
* Router for data in GeoJSON format using GeoJSON model -
|
|
24
23
|
* binds / and /:id to GetAll and GetOne methods of GeoJsonModel.
|
|
@@ -92,23 +91,22 @@ class GeoJsonRouter extends BaseRouter_1.BaseRouter {
|
|
|
92
91
|
};
|
|
93
92
|
this.GetIdQueryParamWithCorrectType = () => __awaiter(this, void 0, void 0, function* () {
|
|
94
93
|
let idParam;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
});
|
|
94
|
+
// Get the primary ID of the schema (the attribute name)
|
|
95
|
+
const idKey = Object.keys(this.model.PrimaryIdentifierSelection("0"))[0];
|
|
96
|
+
let message = "Created model " + this.model.GetName() + " has ID `" + idKey + "` of type ";
|
|
97
|
+
const isPrimaryIdNumber = yield this.model.IsPrimaryIdNumber(idKey);
|
|
98
|
+
if (isPrimaryIdNumber) {
|
|
99
|
+
message += "number.";
|
|
100
|
+
// Create a url parameter for detail route with type number
|
|
101
|
+
idParam = (0, check_1.param)("id").exists().isNumeric();
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
message += "string.";
|
|
105
|
+
// Create a url parameter for detail route with type string
|
|
106
|
+
idParam = (0, check_1.param)("id").exists().isString();
|
|
107
|
+
}
|
|
108
|
+
Logger_1.log.silly(message);
|
|
109
|
+
return idParam;
|
|
112
110
|
});
|
|
113
111
|
this.model = inModel;
|
|
114
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoJsonRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/GeoJsonRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"GeoJsonRouter.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/GeoJsonRouter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAA2C;AAC3C,sCAAiC;AAEjC,oCAA+C;AAC/C,6CAAmD;AACnD,8CAAoF;AACpF,qCAAkE;AAClE,mDAAwE;AACxE,mCAAkC;AAGlC;;;;;;GAMG;AACH,MAAa,aAAc,SAAQ,uBAAU;IAezC,YAAmB,OAAsB;QACrC,KAAK,EAAE,CAAC;QAfZ,iDAAiD;QAC1C,WAAM,GAAW,IAAA,gBAAM,GAAE,CAAC;QAIvB,mBAAc,GAAG;YACvB,IAAA,aAAK,EAAC,cAAc,CAAC,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE;YAC5C,IAAA,aAA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wB,CAAC;YAE7B,wDAAwD;YACxD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACzE,IAAI,OAAO,GAAW,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,WAAW,GAAG,KAAK,GAAG,YAAY,CAAC;YACnG,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAEpE,IAAI,iBAAiB,EAAE;gBACnB,OAAO,IAAI,SAAS,CAAC;gBACrB,2DAA2D;gBAC3D,OAAO,GAAG,IAAA,aAAK,EAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,CAAC;aAC9C;iBAAM;gBACH,OAAO,IAAI,SAAS,CAAC;gBACrB,2DAA2D;gBAC3D,OAAO,GAAG,IAAA,aAAK,EAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;aAC7C;YACD,YAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACnB,OAAO,OAAO,CAAC;QACnB,CAAC,CAAA,CAAC;QA5FE,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACzB,CAAC;CA4FJ;AA9GD,sCA8GC"}
|
|
@@ -13,4 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
13
|
__exportStar(require("./GeoJsonRouter"), exports);
|
|
14
14
|
__exportStar(require("./HistoryRouter"), exports);
|
|
15
15
|
__exportStar(require("./RouterBuilder"), exports);
|
|
16
|
+
__exportStar(require("./interfaces/IGeoJsonAllFilterParameters"), exports);
|
|
16
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC;AAChC,2EAAyD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface IGeoJsonAllFilterParameters {
|
|
2
|
+
/** Latitude to sort results by (by proximity) */
|
|
3
|
+
lat?: number;
|
|
4
|
+
/** Longitute to sort results by */
|
|
5
|
+
lng?: number | undefined | null;
|
|
6
|
+
/** Maximum range from specified latLng. Only data within this range will be returned. */
|
|
7
|
+
range?: number;
|
|
8
|
+
/** Limit (can be used for pagination). Evaluated last, after all filters applied. */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Offset (can be used for pagination). Evaluated last, after all filters applied. */
|
|
11
|
+
offset?: number;
|
|
12
|
+
/** Filters out all results with older updated_at than this parameter
|
|
13
|
+
* (filters not-updated data)
|
|
14
|
+
*/
|
|
15
|
+
updatedSince?: string;
|
|
16
|
+
/** Filters the data to include only these with one of the specified "district" value */
|
|
17
|
+
districts?: string[];
|
|
18
|
+
/** Filters the data to include only specified IDs */
|
|
19
|
+
ids?: number[];
|
|
20
|
+
/** Object with additional filter conditions to be added to the selection */
|
|
21
|
+
additionalFilters?: object;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IGeoJsonAllFilterParameters.js","sourceRoot":"","sources":["../../../../src/output-gateway/routes/interfaces/IGeoJsonAllFilterParameters.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export declare class SharedSchemaProvider {
|
|
2
|
+
static Geometry: {
|
|
3
|
+
$id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
type: string;
|
|
7
|
+
required: string[];
|
|
8
|
+
oneOf: ({
|
|
9
|
+
title: string;
|
|
10
|
+
properties: {
|
|
11
|
+
type: {
|
|
12
|
+
enum: string[];
|
|
13
|
+
};
|
|
14
|
+
coordinates: {
|
|
15
|
+
$ref: string;
|
|
16
|
+
type?: undefined;
|
|
17
|
+
items?: undefined;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
title: string;
|
|
22
|
+
properties: {
|
|
23
|
+
type: {
|
|
24
|
+
enum: string[];
|
|
25
|
+
};
|
|
26
|
+
coordinates: {
|
|
27
|
+
type: string;
|
|
28
|
+
items: {
|
|
29
|
+
$ref: string;
|
|
30
|
+
};
|
|
31
|
+
$ref?: undefined;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
})[];
|
|
35
|
+
definitions: {
|
|
36
|
+
position: {
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
minItems: number;
|
|
40
|
+
items: {
|
|
41
|
+
type: string;
|
|
42
|
+
}[];
|
|
43
|
+
additionalItems: boolean;
|
|
44
|
+
};
|
|
45
|
+
positionArray: {
|
|
46
|
+
description: string;
|
|
47
|
+
type: string;
|
|
48
|
+
items: {
|
|
49
|
+
$ref: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
lineString: {
|
|
53
|
+
description: string;
|
|
54
|
+
allOf: ({
|
|
55
|
+
$ref: string;
|
|
56
|
+
type?: undefined;
|
|
57
|
+
minItems?: undefined;
|
|
58
|
+
} | {
|
|
59
|
+
type: string;
|
|
60
|
+
minItems: number;
|
|
61
|
+
$ref?: undefined;
|
|
62
|
+
})[];
|
|
63
|
+
};
|
|
64
|
+
linearRing: {
|
|
65
|
+
description: string;
|
|
66
|
+
allOf: ({
|
|
67
|
+
$ref: string;
|
|
68
|
+
type?: undefined;
|
|
69
|
+
minItems?: undefined;
|
|
70
|
+
} | {
|
|
71
|
+
type: string;
|
|
72
|
+
minItems: number;
|
|
73
|
+
$ref?: undefined;
|
|
74
|
+
})[];
|
|
75
|
+
};
|
|
76
|
+
polygon: {
|
|
77
|
+
description: string;
|
|
78
|
+
type: string;
|
|
79
|
+
items: {
|
|
80
|
+
$ref: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SharedSchemaProvider = void 0;
|
|
4
|
+
class SharedSchemaProvider {
|
|
5
|
+
}
|
|
6
|
+
exports.SharedSchemaProvider = SharedSchemaProvider;
|
|
7
|
+
SharedSchemaProvider.Geometry = {
|
|
8
|
+
$id: "geometrySchema.json",
|
|
9
|
+
title: "geometry",
|
|
10
|
+
description: "One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json",
|
|
11
|
+
type: "object",
|
|
12
|
+
required: ["type", "coordinates"],
|
|
13
|
+
oneOf: [
|
|
14
|
+
{
|
|
15
|
+
title: "Point",
|
|
16
|
+
properties: {
|
|
17
|
+
type: { enum: ["Point"] },
|
|
18
|
+
coordinates: { $ref: "#/definitions/position" },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
title: "MultiPoint",
|
|
23
|
+
properties: {
|
|
24
|
+
type: { enum: ["MultiPoint"] },
|
|
25
|
+
coordinates: { $ref: "#/definitions/positionArray" },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: "LineString",
|
|
30
|
+
properties: {
|
|
31
|
+
type: { enum: ["LineString"] },
|
|
32
|
+
coordinates: { $ref: "#/definitions/lineString" },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "MultiLineString",
|
|
37
|
+
properties: {
|
|
38
|
+
type: { enum: ["MultiLineString"] },
|
|
39
|
+
coordinates: {
|
|
40
|
+
type: "array",
|
|
41
|
+
items: { $ref: "#/definitions/lineString" },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: "Polygon",
|
|
47
|
+
properties: {
|
|
48
|
+
type: { enum: ["Polygon"] },
|
|
49
|
+
coordinates: { $ref: "#/definitions/polygon" },
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: "MultiPolygon",
|
|
54
|
+
properties: {
|
|
55
|
+
type: { enum: ["MultiPolygon"] },
|
|
56
|
+
coordinates: {
|
|
57
|
+
type: "array",
|
|
58
|
+
items: { $ref: "#/definitions/polygon" },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
definitions: {
|
|
64
|
+
position: {
|
|
65
|
+
description: "A single position",
|
|
66
|
+
type: "array",
|
|
67
|
+
minItems: 2,
|
|
68
|
+
items: [{ type: "number" }, { type: "number" }],
|
|
69
|
+
additionalItems: false,
|
|
70
|
+
},
|
|
71
|
+
positionArray: {
|
|
72
|
+
description: "An array of positions",
|
|
73
|
+
type: "array",
|
|
74
|
+
items: { $ref: "#/definitions/position" },
|
|
75
|
+
},
|
|
76
|
+
lineString: {
|
|
77
|
+
description: "An array of two or more positions",
|
|
78
|
+
allOf: [{ $ref: "#/definitions/positionArray" }, { type: "array", minItems: 2 }],
|
|
79
|
+
},
|
|
80
|
+
linearRing: {
|
|
81
|
+
description: "An array of four positions where the first equals the last",
|
|
82
|
+
allOf: [{ $ref: "#/definitions/positionArray" }, { type: "array", minItems: 4 }],
|
|
83
|
+
},
|
|
84
|
+
polygon: {
|
|
85
|
+
description: "An array of linear rings",
|
|
86
|
+
type: "array",
|
|
87
|
+
items: { $ref: "#/definitions/linearRing" },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=SharedSchemaProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedSchemaProvider.js","sourceRoot":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AE;gBACR,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,cAAc,CAAC,EAAE;gBAChC,WAAW,EAAE;oBACT,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE;iBAC3C;aACJ;SACJ;KACJ;IACD,WAAW,EAAE;QACT,QAAQ,EAAE;YACN,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,OAAO;YACb,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC/C,eAAe,EAAE,KAAK;SACzB;QACD,aAAa,EAAE;YACX,WAAW,EAAE,uBAAuB;YACpC,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;SAC5C;QACD,UAAU,EAAE;YACR,WAAW,EAAE,mCAAmC;YAChD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;SACnF;QACD,UAAU,EAAE;YACR,WAAW,EAAE,4DAA4D;YACzE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;SACnF;QACD,OAAO,EAAE;YACL,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE;SAC9C;KACJ;CACJ,CAAC"}
|
|
@@ -12,4 +12,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
/* sch/index.ts */
|
|
14
14
|
__exportStar(require("./ErrorLog"), exports);
|
|
15
|
+
__exportStar(require("./SharedSchemaProvider"), exports);
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kBAAkB;AAClB,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kBAAkB;AAClB,6CAA2B;AAC3B,yDAAuC"}
|