@golemio/gardens 1.0.4-dev.568905056 → 1.0.4-dev.687605332
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/LICENSE +1 -1
- package/db/example/.config.json +3 -0
- package/db/example/00_truncate_tables.sql +1 -0
- package/db/example/01_gardens.sql +6 -0
- package/db/migrations/postgresql/.config.json +3 -0
- package/db/migrations/postgresql/20221027165643-init-mongo-to-pg.js +51 -0
- package/db/migrations/postgresql/package.json +3 -0
- package/db/migrations/postgresql/sqls/20221027165643-init-mongo-to-pg-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20221027165643-init-mongo-to-pg-up.sql +37 -0
- package/db/migrations/postgresql/sqls/package.json +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/integration-engine/datasources/GardensDataSourceFactory.d.ts +3 -0
- package/dist/integration-engine/datasources/GardensDataSourceFactory.js +22 -0
- package/dist/integration-engine/datasources/GardensDataSourceFactory.js.map +1 -0
- package/dist/integration-engine/index.d.ts +2 -3
- package/dist/integration-engine/index.js +4 -3
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/repositories/GardensRepository.d.ts +6 -0
- package/dist/integration-engine/repositories/GardensRepository.js +39 -0
- package/dist/integration-engine/repositories/GardensRepository.js.map +1 -0
- package/dist/integration-engine/transformations/GardensTransformation.d.ts +9 -0
- package/dist/integration-engine/transformations/GardensTransformation.js +58 -0
- package/dist/integration-engine/transformations/GardensTransformation.js.map +1 -0
- package/dist/integration-engine/workers/GardensWorker.d.ts +5 -0
- package/dist/integration-engine/workers/GardensWorker.js +14 -0
- package/dist/integration-engine/workers/GardensWorker.js.map +1 -0
- package/dist/integration-engine/workers/index.d.ts +2 -0
- package/dist/integration-engine/workers/index.js +6 -0
- package/dist/integration-engine/workers/index.js.map +1 -0
- package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.d.ts +10 -0
- package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.js +35 -0
- package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.js.map +1 -0
- package/dist/output-gateway/GardensRouter.d.ts +1 -8
- package/dist/output-gateway/GardensRouter.js +1 -19
- package/dist/output-gateway/GardensRouter.js.map +1 -1
- package/dist/output-gateway/index.d.ts +1 -1
- package/dist/output-gateway/index.js +1 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/repositories/FilterHelper.d.ts +8 -0
- package/dist/output-gateway/repositories/FilterHelper.js +47 -0
- package/dist/output-gateway/repositories/FilterHelper.js.map +1 -0
- package/dist/output-gateway/repositories/GardensRepository.d.ts +14 -0
- package/dist/output-gateway/repositories/GardensRepository.js +146 -0
- package/dist/output-gateway/repositories/GardensRepository.js.map +1 -0
- package/dist/schema-definitions/Gardens.d.ts +28 -0
- package/dist/schema-definitions/Gardens.js +8 -0
- package/dist/schema-definitions/Gardens.js.map +1 -0
- package/dist/schema-definitions/datasources/GardensJsonSchema.d.ts +27 -0
- package/dist/schema-definitions/datasources/GardensJsonSchema.js +45 -0
- package/dist/schema-definitions/datasources/GardensJsonSchema.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +1 -11
- package/dist/schema-definitions/index.js +9 -59
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/models/GardensModel.d.ts +28 -0
- package/dist/schema-definitions/models/GardensModel.js +67 -0
- package/dist/schema-definitions/models/GardensModel.js.map +1 -0
- package/docs/gardens_erd.png +0 -0
- package/docs/implementation_documentation.md +69 -0
- package/docs/openapi.yaml +264 -0
- package/package.json +65 -60
- package/db/example/mongo_data/dataplatform/gardens.bson +0 -0
- package/db/example/mongo_data/dataplatform/gardens.metadata.json +0 -1
- package/dist/integration-engine/GardensTransformation.d.ts +0 -7
- package/dist/integration-engine/GardensTransformation.js +0 -88
- package/dist/integration-engine/GardensTransformation.js.map +0 -1
- package/dist/integration-engine/GardensWorker.d.ts +0 -8
- package/dist/integration-engine/GardensWorker.js +0 -58
- package/dist/integration-engine/GardensWorker.js.map +0 -1
- package/dist/integration-engine/queueDefinitions.d.ts +0 -3
- package/dist/integration-engine/queueDefinitions.js +0 -26
- package/dist/integration-engine/queueDefinitions.js.map +0 -1
- package/dist/output-gateway/GardensModel.d.ts +0 -7
- package/dist/output-gateway/GardensModel.js +0 -17
- package/dist/output-gateway/GardensModel.js.map +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.GardensRepository = void 0;
|
|
27
|
+
const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
|
|
28
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
29
|
+
const output_gateway_2 = require("@golemio/core/dist/output-gateway");
|
|
30
|
+
const FilterHelper_1 = require("./FilterHelper");
|
|
31
|
+
const _sch_1 = require("../../schema-definitions");
|
|
32
|
+
const GardensModel_1 = require("../../schema-definitions/models/GardensModel");
|
|
33
|
+
class GardensRepository extends output_gateway_1.SequelizeModel {
|
|
34
|
+
constructor() {
|
|
35
|
+
super("GardensRepository", _sch_1.Gardens.definitions.gardens.pgTableName, GardensModel_1.GardensModel.attributeModel, {
|
|
36
|
+
schema: _sch_1.Gardens.pgSchema,
|
|
37
|
+
});
|
|
38
|
+
this.GetProperties = () => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
throw new Error("Method not implemented.");
|
|
40
|
+
});
|
|
41
|
+
this.GetAll = (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const result = yield this.sequelizeModel.findAll({
|
|
43
|
+
attributes: {
|
|
44
|
+
include: ["updated_at"],
|
|
45
|
+
},
|
|
46
|
+
where: options
|
|
47
|
+
? {
|
|
48
|
+
[sequelize_1.default.Op.and]: [
|
|
49
|
+
...FilterHelper_1.FilterHelper.prepareFilterForLocation(options),
|
|
50
|
+
...FilterHelper_1.FilterHelper.prepareFilterForUpdateSince(options),
|
|
51
|
+
...FilterHelper_1.FilterHelper.prepareFilterForDistricts(options),
|
|
52
|
+
],
|
|
53
|
+
}
|
|
54
|
+
: {},
|
|
55
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
56
|
+
offset: Number.isInteger(options === null || options === void 0 ? void 0 : options.offset) ? options === null || options === void 0 ? void 0 : options.offset : undefined,
|
|
57
|
+
order: FilterHelper_1.FilterHelper.prepareOrderFunction(options),
|
|
58
|
+
});
|
|
59
|
+
return (0, output_gateway_2.buildGeojsonFeatureCollection)(result.map((record) => {
|
|
60
|
+
return this.formatOutput(record);
|
|
61
|
+
}));
|
|
62
|
+
});
|
|
63
|
+
this.GetOne = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const result = yield this.sequelizeModel.findOne({
|
|
65
|
+
attributes: {
|
|
66
|
+
include: ["updated_at"],
|
|
67
|
+
},
|
|
68
|
+
where: { id },
|
|
69
|
+
});
|
|
70
|
+
return result ? this.formatOutput(result) : undefined;
|
|
71
|
+
});
|
|
72
|
+
this.formatOutput = (record) => {
|
|
73
|
+
const _a = record.get({
|
|
74
|
+
plain: true,
|
|
75
|
+
}), { geometry, address, image, description, district, id, name, updated_at, url } = _a, rest = __rest(_a, ["geometry", "address", "image", "description", "district", "id", "name", "updated_at", "url"]);
|
|
76
|
+
return (0, output_gateway_2.buildGeojsonFeatureLatLng)({
|
|
77
|
+
address: {
|
|
78
|
+
address_formatted: address,
|
|
79
|
+
},
|
|
80
|
+
image: {
|
|
81
|
+
url: image,
|
|
82
|
+
},
|
|
83
|
+
description,
|
|
84
|
+
district,
|
|
85
|
+
id,
|
|
86
|
+
name,
|
|
87
|
+
properties: this.formatOutputProperties(rest),
|
|
88
|
+
updated_at,
|
|
89
|
+
url,
|
|
90
|
+
}, geometry.coordinates[0], geometry.coordinates[1]);
|
|
91
|
+
};
|
|
92
|
+
this.formatOutputProperties = (restPropsObject) => {
|
|
93
|
+
const resultPropertiesArr = Object.entries(restPropsObject)
|
|
94
|
+
.map(([propertyId, value]) => {
|
|
95
|
+
if (value) {
|
|
96
|
+
return {
|
|
97
|
+
description: this.getPropertyDescription(propertyId),
|
|
98
|
+
id: propertyId,
|
|
99
|
+
value,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
})
|
|
104
|
+
.filter((item) => item);
|
|
105
|
+
return resultPropertiesArr;
|
|
106
|
+
};
|
|
107
|
+
this.getPropertyDescription = (id) => {
|
|
108
|
+
switch (id) {
|
|
109
|
+
case "restaurace":
|
|
110
|
+
return "Občerstvení";
|
|
111
|
+
case "wc":
|
|
112
|
+
return "WC";
|
|
113
|
+
case "misto":
|
|
114
|
+
return "Zajímavosti";
|
|
115
|
+
case "kolo":
|
|
116
|
+
return "Cyklostezky";
|
|
117
|
+
case "hriste":
|
|
118
|
+
return "Dětské hřiště";
|
|
119
|
+
case "brusle":
|
|
120
|
+
return "Bruslení";
|
|
121
|
+
case "sport":
|
|
122
|
+
return "Sportovní hřiště";
|
|
123
|
+
case "mhd":
|
|
124
|
+
return "MHD";
|
|
125
|
+
case "parking":
|
|
126
|
+
return "Parkování";
|
|
127
|
+
case "cesty":
|
|
128
|
+
return "Povrch cest";
|
|
129
|
+
case "provoz":
|
|
130
|
+
return "Provozovatel";
|
|
131
|
+
case "doba":
|
|
132
|
+
return "Otevírací doba";
|
|
133
|
+
default:
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
IsPrimaryIdNumber(idKey) {
|
|
139
|
+
return Promise.resolve(false);
|
|
140
|
+
}
|
|
141
|
+
PrimaryIdentifierSelection(id) {
|
|
142
|
+
return { id };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.GardensRepository = GardensRepository;
|
|
146
|
+
//# sourceMappingURL=GardensRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GardensRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/GardensRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oFAA4D;AAC5D,sEAAmE;AAEnE,sEAM2C;AAC3C,iDAA8C;AAE9C,mDAA+B;AAC/B,+EAAwD;AAiBxD,MAAa,iBAAkB,SAAQ,+BAAc;IACjD;QACI,KAAK,CAAC,mBAAmB,EAAE,cAAO,CAAC,WAAW,CAAC,OAAO,CAAC,WAAW,EAAE,2BAAY,CAAC,cAAc,EAAE;YAC7F,MAAM,EAA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wBACd,KAAK;qBACR,CAAC;iBACL;gBACD,OAAO,IAAI,CAAC;YAChB,CAAC,CAAC;iBACD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;YAC5B,OAAO,mBAAmB,CAAC;QAC/B,CAAC,CAAC;QAEM,2BAAsB,GAAG,CAAC,EAAU,EAAiB,EAAE;YAC3D,QAAQ,EAAE,EAAE;gBACR,KAAK,YAAY;oBACb,OAAO,aAAa,CAAC;gBACzB,KAAK,IAAI;oBACL,OAAO,IAAI,CAAC;gBAChB,KAAK,OAAO;oBACR,OAAO,aAAa,CAAC;gBACzB,KAAK,MAAM;oBACP,OAAO,aAAa,CAAC;gBACzB,KAAK,QAAQ;oBACT,OAAO,eAAe,CAAC;gBAC3B,KAAK,QAAQ;oBACT,OAAO,UAAU,CAAC;gBACtB,KAAK,OAAO;oBACR,OAAO,kBAAkB,CAAC;gBAC9B,KAAK,KAAK;oBACN,OAAO,KAAK,CAAC;gBACjB,KAAK,SAAS;oBACV,OAAO,WAAW,CAAC;gBACvB,KAAK,OAAO;oBACR,OAAO,aAAa,CAAC;gBACzB,KAAK,QAAQ;oBACT,OAAO,cAAc,CAAC;gBAC1B,KAAK,MAAM;oBACP,OAAO,gBAAgB,CAAC;gBAC5B;oBACI,OAAO,IAAI,CAAC;aACnB;QACL,CAAC,CAAC;IA5HF,CAAC;IAEM,iBAAiB,CAAC,KAAa;QAClC,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEM,0BAA0B,CAAC,EAAU;QACxC,OAAO,EAAE,EAAE,EAAE,CAAC;IAClB,CAAC;CAqHJ;AAlID,8CAkIC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Point } from "@golemio/core/dist/shared/geojson";
|
|
2
|
+
export interface IGarden {
|
|
3
|
+
id: string;
|
|
4
|
+
geometry: Point;
|
|
5
|
+
name: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
address?: string;
|
|
10
|
+
district?: string;
|
|
11
|
+
restaurace?: string;
|
|
12
|
+
brusle?: string;
|
|
13
|
+
cesty?: string;
|
|
14
|
+
doba?: string;
|
|
15
|
+
hriste?: string;
|
|
16
|
+
kolo?: string;
|
|
17
|
+
mhd?: string;
|
|
18
|
+
misto?: string;
|
|
19
|
+
parking?: string;
|
|
20
|
+
provoz?: string;
|
|
21
|
+
sport?: string;
|
|
22
|
+
wc?: string;
|
|
23
|
+
updated_at?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const gardens: {
|
|
26
|
+
name: string;
|
|
27
|
+
pgTableName: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gardens.js","sourceRoot":"","sources":["../../src/schema-definitions/Gardens.ts"],"names":[],"mappings":";;;AA6Ba,QAAA,OAAO,GAAG;IACnB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,SAAS;CACzB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
2
|
+
export interface IGardensInput {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
coordinates: number[];
|
|
6
|
+
image?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
address?: string;
|
|
10
|
+
district?: string;
|
|
11
|
+
properties_restaurace?: string;
|
|
12
|
+
properties_brusle?: string;
|
|
13
|
+
properties_cesty?: string;
|
|
14
|
+
properties_doba?: string;
|
|
15
|
+
properties_hriste?: string;
|
|
16
|
+
properties_kolo?: string;
|
|
17
|
+
properties_mhd?: string;
|
|
18
|
+
properties_misto?: string;
|
|
19
|
+
properties_parking?: string;
|
|
20
|
+
properties_provoz?: string;
|
|
21
|
+
properties_sport?: string;
|
|
22
|
+
properties_wc?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const gardensDatasource: {
|
|
25
|
+
name: string;
|
|
26
|
+
jsonSchema: JSONSchemaType<IGardensInput[]>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gardensDatasource = void 0;
|
|
4
|
+
const gardensJsonSchema = {
|
|
5
|
+
type: "array",
|
|
6
|
+
items: {
|
|
7
|
+
type: "object",
|
|
8
|
+
properties: {
|
|
9
|
+
name: { type: "string" },
|
|
10
|
+
slug: { type: "string" },
|
|
11
|
+
coordinates: {
|
|
12
|
+
type: "array",
|
|
13
|
+
items: {
|
|
14
|
+
type: "number",
|
|
15
|
+
},
|
|
16
|
+
minItems: 2,
|
|
17
|
+
maxItems: 2,
|
|
18
|
+
},
|
|
19
|
+
image: { type: "string", nullable: true },
|
|
20
|
+
description: { type: "string", nullable: true },
|
|
21
|
+
url: { type: "string", nullable: true },
|
|
22
|
+
address: { type: "string", nullable: true },
|
|
23
|
+
district: { type: "string", nullable: true },
|
|
24
|
+
properties_restaurace: { type: "string", nullable: true },
|
|
25
|
+
properties_brusle: { type: "string", nullable: true },
|
|
26
|
+
properties_cesty: { type: "string", nullable: true },
|
|
27
|
+
properties_doba: { type: "string", nullable: true },
|
|
28
|
+
properties_hriste: { type: "string", nullable: true },
|
|
29
|
+
properties_kolo: { type: "string", nullable: true },
|
|
30
|
+
properties_mhd: { type: "string", nullable: true },
|
|
31
|
+
properties_misto: { type: "string", nullable: true },
|
|
32
|
+
properties_parking: { type: "string", nullable: true },
|
|
33
|
+
properties_provoz: { type: "string", nullable: true },
|
|
34
|
+
properties_sport: { type: "string", nullable: true },
|
|
35
|
+
properties_wc: { type: "string", nullable: true },
|
|
36
|
+
},
|
|
37
|
+
required: ["name", "slug", "coordinates"],
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
exports.gardensDatasource = {
|
|
42
|
+
name: "GardensDatasource",
|
|
43
|
+
jsonSchema: gardensJsonSchema,
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=GardensJsonSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GardensJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/GardensJsonSchema.ts"],"names":[],"mappings":";;;AA2BA,MAAM,iBAAiB,GAAoC;IACvD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,WAAW,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE,CAAC;gBACX,QAAQ,EAAE,CAAC;aACd;YAED,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACzC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/C,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACvC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAE5C,qBAAqB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACzD,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrD,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACpD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACnD,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACnD,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAClD,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACpD,kBAAkB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACtD,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrD,gBAAgB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACpD,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;SACpD;QACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC;QACzC,oBAAoB,EAAE,KAAK;KAC9B;CACJ,CAAC;AAEW,QAAA,iBAAiB,GAAkE;IAC5F,IAAI,EAAE,mBAAmB;IACzB,UAAU,EAAE,iBAAiB;CAChC,CAAC"}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const forExport: {
|
|
3
|
-
datasourceMongooseSchemaObject: {
|
|
4
|
-
[path: string]: any | typeof import("mongoose").SchemaType | import("mongoose").Schema<any, any, any, any> | import("mongoose").Schema<any, any, any, any>[] | readonly import("mongoose").Schema<any, any, any, any>[] | Function[] | import("mongoose").SchemaTypeOptions<any> | import("mongoose").SchemaTypeOptions<any>[] | readonly import("mongoose").SchemaTypeOptions<any>[] | any[] | readonly any[];
|
|
5
|
-
};
|
|
6
|
-
mongoCollectionName: string;
|
|
7
|
-
name: string;
|
|
8
|
-
outputMongooseSchemaObject: {
|
|
9
|
-
[path: string]: any | typeof import("mongoose").SchemaType | import("mongoose").Schema<any, any, any, any> | import("mongoose").Schema<any, any, any, any>[] | readonly import("mongoose").Schema<any, any, any, any>[] | Function[] | import("mongoose").SchemaTypeOptions<any> | import("mongoose").SchemaTypeOptions<any>[] | readonly import("mongoose").SchemaTypeOptions<any>[] | any[] | readonly any[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
1
|
+
declare const forExport: any;
|
|
12
2
|
export { forExport as Gardens };
|
|
@@ -1,67 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Gardens = void 0;
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
address: { type: String },
|
|
7
|
-
coordinates: { type: Array, required: true },
|
|
8
|
-
description: { type: String },
|
|
9
|
-
district: { type: String },
|
|
10
|
-
image: { type: String },
|
|
11
|
-
name: { type: String, required: true },
|
|
12
|
-
properties_brusle: { type: String },
|
|
13
|
-
properties_cesty: { type: String },
|
|
14
|
-
properties_doba: { type: String },
|
|
15
|
-
properties_hriste: { type: String },
|
|
16
|
-
properties_kolo: { type: String },
|
|
17
|
-
properties_mhd: { type: String },
|
|
18
|
-
properties_misto: { type: String },
|
|
19
|
-
properties_parking: { type: String },
|
|
20
|
-
properties_provoz: { type: String },
|
|
21
|
-
properties_sport: { type: String },
|
|
22
|
-
properties_wc: { type: String },
|
|
23
|
-
slug: { type: String, required: true },
|
|
24
|
-
url: { type: String },
|
|
25
|
-
};
|
|
26
|
-
const outputMSO = {
|
|
27
|
-
geometry: {
|
|
28
|
-
coordinates: { type: Array, required: true },
|
|
29
|
-
type: { type: String, required: true },
|
|
30
|
-
},
|
|
31
|
-
properties: {
|
|
32
|
-
address: {
|
|
33
|
-
address_country: { type: String },
|
|
34
|
-
address_formatted: { type: String },
|
|
35
|
-
address_locality: { type: String },
|
|
36
|
-
address_region: { type: String },
|
|
37
|
-
postal_code: { type: String },
|
|
38
|
-
street_address: { type: String },
|
|
39
|
-
},
|
|
40
|
-
description: { type: String },
|
|
41
|
-
district: { type: String },
|
|
42
|
-
id: { type: String, required: true },
|
|
43
|
-
image: {
|
|
44
|
-
url: { type: String },
|
|
45
|
-
},
|
|
46
|
-
name: { type: String, required: true },
|
|
47
|
-
properties: [
|
|
48
|
-
{
|
|
49
|
-
_id: false,
|
|
50
|
-
description: { type: String },
|
|
51
|
-
id: { type: String, required: true },
|
|
52
|
-
value: { type: String },
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
updated_at: { type: Number, required: true },
|
|
56
|
-
url: { type: String },
|
|
57
|
-
},
|
|
58
|
-
type: { type: String, required: true },
|
|
59
|
-
};
|
|
4
|
+
const GardensJsonSchema_1 = require("./datasources/GardensJsonSchema");
|
|
5
|
+
const Gardens_1 = require("./Gardens");
|
|
60
6
|
const forExport = {
|
|
61
|
-
datasourceMongooseSchemaObject: datasourceMSO,
|
|
62
|
-
mongoCollectionName: "gardens",
|
|
63
7
|
name: "Gardens",
|
|
64
|
-
|
|
8
|
+
pgSchema: "gardens",
|
|
9
|
+
datasources: {
|
|
10
|
+
gardensDatasource: GardensJsonSchema_1.gardensDatasource,
|
|
11
|
+
},
|
|
12
|
+
definitions: {
|
|
13
|
+
gardens: Gardens_1.gardens,
|
|
14
|
+
},
|
|
65
15
|
};
|
|
66
16
|
exports.Gardens = forExport;
|
|
67
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-definitions/index.ts"],"names":[],"mappings":";;;AAAA,uEAAuE;AACvE,uCAAuC;AAEvC,MAAM,SAAS,GAAQ;IACnB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;IACnB,WAAW,EAAE;QACT,iBAAiB,EAAjB,qCAAiB;KACpB;IACD,WAAW,EAAE;QACT,OAAO,EAAP,iBAAO;KACV;CACJ,CAAC;AAEoB,4BAAO"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Point } from "@golemio/core/dist/shared/geojson";
|
|
2
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
3
|
+
import { Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
4
|
+
import { IGarden } from "../Gardens";
|
|
5
|
+
export declare class GardensModel extends Model<IGarden> implements IGarden {
|
|
6
|
+
id: string;
|
|
7
|
+
geometry: Point;
|
|
8
|
+
name: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
address?: string;
|
|
13
|
+
district?: string;
|
|
14
|
+
restaurace?: string;
|
|
15
|
+
brusle?: string;
|
|
16
|
+
cesty?: string;
|
|
17
|
+
doba?: string;
|
|
18
|
+
hriste?: string;
|
|
19
|
+
kolo?: string;
|
|
20
|
+
mhd?: string;
|
|
21
|
+
misto?: string;
|
|
22
|
+
parking?: string;
|
|
23
|
+
provoz?: string;
|
|
24
|
+
sport?: string;
|
|
25
|
+
wc?: string;
|
|
26
|
+
static attributeModel: ModelAttributes<GardensModel, IGarden>;
|
|
27
|
+
static jsonSchema: JSONSchemaType<IGarden[]>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GardensModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
const schema_definitions_1 = require("@golemio/core/dist/schema-definitions");
|
|
6
|
+
class GardensModel extends sequelize_1.Model {
|
|
7
|
+
}
|
|
8
|
+
exports.GardensModel = GardensModel;
|
|
9
|
+
GardensModel.attributeModel = {
|
|
10
|
+
id: {
|
|
11
|
+
type: sequelize_1.DataTypes.STRING,
|
|
12
|
+
primaryKey: true,
|
|
13
|
+
},
|
|
14
|
+
geometry: sequelize_1.DataTypes.GEOMETRY,
|
|
15
|
+
name: sequelize_1.DataTypes.STRING,
|
|
16
|
+
image: sequelize_1.DataTypes.TEXT,
|
|
17
|
+
description: sequelize_1.DataTypes.TEXT,
|
|
18
|
+
url: sequelize_1.DataTypes.TEXT,
|
|
19
|
+
address: sequelize_1.DataTypes.TEXT,
|
|
20
|
+
district: sequelize_1.DataTypes.STRING,
|
|
21
|
+
restaurace: sequelize_1.DataTypes.TEXT,
|
|
22
|
+
brusle: sequelize_1.DataTypes.TEXT,
|
|
23
|
+
cesty: sequelize_1.DataTypes.TEXT,
|
|
24
|
+
doba: sequelize_1.DataTypes.TEXT,
|
|
25
|
+
hriste: sequelize_1.DataTypes.TEXT,
|
|
26
|
+
kolo: sequelize_1.DataTypes.TEXT,
|
|
27
|
+
mhd: sequelize_1.DataTypes.TEXT,
|
|
28
|
+
misto: sequelize_1.DataTypes.TEXT,
|
|
29
|
+
parking: sequelize_1.DataTypes.TEXT,
|
|
30
|
+
provoz: sequelize_1.DataTypes.TEXT,
|
|
31
|
+
sport: sequelize_1.DataTypes.TEXT,
|
|
32
|
+
wc: sequelize_1.DataTypes.TEXT,
|
|
33
|
+
};
|
|
34
|
+
GardensModel.jsonSchema = {
|
|
35
|
+
type: "array",
|
|
36
|
+
items: {
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {
|
|
39
|
+
id: { type: "string" },
|
|
40
|
+
geometry: { $ref: "#/definitions/geometry" },
|
|
41
|
+
name: { type: "string" },
|
|
42
|
+
image: { type: "string", nullable: true },
|
|
43
|
+
description: { type: "string", nullable: true },
|
|
44
|
+
url: { type: "string", nullable: true },
|
|
45
|
+
address: { type: "string", nullable: true },
|
|
46
|
+
district: { type: "string", nullable: true },
|
|
47
|
+
restaurace: { type: "string", nullable: true },
|
|
48
|
+
brusle: { type: "string", nullable: true },
|
|
49
|
+
cesty: { type: "string", nullable: true },
|
|
50
|
+
doba: { type: "string", nullable: true },
|
|
51
|
+
hriste: { type: "string", nullable: true },
|
|
52
|
+
kolo: { type: "string", nullable: true },
|
|
53
|
+
mhd: { type: "string", nullable: true },
|
|
54
|
+
misto: { type: "string", nullable: true },
|
|
55
|
+
parking: { type: "string", nullable: true },
|
|
56
|
+
provoz: { type: "string", nullable: true },
|
|
57
|
+
sport: { type: "string", nullable: true },
|
|
58
|
+
wc: { type: "string", nullable: true },
|
|
59
|
+
},
|
|
60
|
+
required: ["id", "geometry", "name"],
|
|
61
|
+
},
|
|
62
|
+
definitions: {
|
|
63
|
+
// @ts-expect-error
|
|
64
|
+
geometry: schema_definitions_1.SharedSchemaProvider.Geometry,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=GardensModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GardensModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/GardensModel.ts"],"names":[],"mappings":";;;AAEA,mEAAwF;AACxF,8EAA6E;AAG7E,MAAa,YAAa,SAAQ,iBAAc;;AAAhD,oCAoFC;AA7DiB,2BAAc,GAA2C;IACnE,EAAE,EAAE;QACA,IAAI,EAAE,qBAAS,CAAC,MAAM;QACtB,UAAU,EAAE,IAAI;KACnB;IACD,QAAQ,EAAE,qBAAS,CAAC,QAAQ;IAC5B,IAAI,EAAE,qBAAS,CAAC,MAAM;IAEtB,KAAK,EAAE,qBAAS,CAAC,IAAI;IACrB,WAAW,EAAE,qBAAS,CAAC,IAAI;IAC3B,GAAG,EAAE,qBAAS,CAAC,IAAI;IACnB,OAAO,EAAE,qBAAS,CAAC,IAAI;IACvB,QAAQ,EAAE,qBAAS,CAAC,MAAM;IAC1B,UAAU,EAAE,qBAAS,CAAC,IAAI;IAC1B,MAAM,EAAE,qBAAS,CAAC,IAAI;IACtB,KAAK,EAAE,qBAAS,CAAC,IAAI;IACrB,IAAI,EAAE,qBAAS,CAAC,IAAI;IACpB,MAA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YACxC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1C,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACxC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACvC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACzC,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC3C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC1C,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACzC,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;SACzC;QACD,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC;KACvC;IACD,WAAW,EAAE;QACT,mBAAmB;QACnB,QAAQ,EAAE,yCAAoB,CAAC,QAAQ;KAC1C;CACJ,CAAC"}
|
|
Binary file
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Implementační dokumentace modulu _gardens_
|
|
2
|
+
|
|
3
|
+
## Záměr
|
|
4
|
+
|
|
5
|
+
Modul slouží k ukládání a poskytování informací o Gardens.
|
|
6
|
+
|
|
7
|
+
## Vstupní data
|
|
8
|
+
|
|
9
|
+
### Stahujeme data ze dvou zdrojů, zpracováváme je a ukládáme do samostatných tabulek.
|
|
10
|
+
|
|
11
|
+
#### _Protected endpoint at mojepraha.eu_
|
|
12
|
+
|
|
13
|
+
- zdroj dat
|
|
14
|
+
- url: [config.datasources.Gardens](https://www.mojepraha.eu/api/gardens)
|
|
15
|
+
- formát dat
|
|
16
|
+
- protokol: http
|
|
17
|
+
- datový typ: json
|
|
18
|
+
- validační schéma: [gardensJsonSchema](https://gitlab.com/operator-ict/golemio/code/modules/gardens/-/blob/development/src/integration-engine/datasources/GardensDataSource.ts)
|
|
19
|
+
- příklad [vstupních dat](https://gitlab.com/operator-ict/golemio/code/modules/gardens/-/blob/development/test/integration-engine/data/gardens-datasource.json)
|
|
20
|
+
- frekvence stahování
|
|
21
|
+
- cron definice:
|
|
22
|
+
- cron.dataplatform.gardens.refreshDataInDB
|
|
23
|
+
- rabin `0 23 7 * * *`
|
|
24
|
+
- prod `0 20 2 * * 5`
|
|
25
|
+
- název rabbitmq fronty
|
|
26
|
+
- dataplatform.gardens.refreshDataInDB
|
|
27
|
+
|
|
28
|
+
### Gardens
|
|
29
|
+
|
|
30
|
+
#### _task: RefreshDataInDBTask_
|
|
31
|
+
|
|
32
|
+
- vstupní rabbitmq fronta
|
|
33
|
+
- název: dataplatform.gardens.refreshDataInDB
|
|
34
|
+
- bez parametrů
|
|
35
|
+
- datové zdroje
|
|
36
|
+
- dataSource mojepraha.eu
|
|
37
|
+
- transformace
|
|
38
|
+
- [GardensTransformation.ts](https://gitlab.com/operator-ict/golemio/code/modules/gardens/-/blob/development/src/integration-engine/transformations/GardensTransformation.ts) - mapování pro `GardensModel`
|
|
39
|
+
|
|
40
|
+
## Uložení dat
|
|
41
|
+
|
|
42
|
+
- typ databáze
|
|
43
|
+
- PSQL
|
|
44
|
+
- databázové schéma
|
|
45
|
+
- 
|
|
46
|
+
|
|
47
|
+
## Output API
|
|
48
|
+
|
|
49
|
+
`GardensRouter` implementuje `GeoJsonRouter`.
|
|
50
|
+
|
|
51
|
+
### Obecné
|
|
52
|
+
|
|
53
|
+
- OpenAPI v3 dokumentace
|
|
54
|
+
- [OpenAPI](./openapi.yaml)
|
|
55
|
+
- api je veřejné
|
|
56
|
+
- postman kolekce
|
|
57
|
+
- TBD
|
|
58
|
+
|
|
59
|
+
#### /gardens
|
|
60
|
+
|
|
61
|
+
- zdrojové tabulky
|
|
62
|
+
- `gardens`
|
|
63
|
+
- dodatečná transformace: Feature collection
|
|
64
|
+
|
|
65
|
+
#### /gardens/:id
|
|
66
|
+
|
|
67
|
+
- zdrojové tabulky
|
|
68
|
+
- `gardens`
|
|
69
|
+
- dodatečná transformace: Feature
|