@golemio/city-districts 1.1.0 → 1.2.0-dev.775903079
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/db/example/.config.json +3 -0
- package/db/example/citydistricts.sql +15 -0
- package/dist/integration-engine/datasources/CityDistrictsDataSource.d.ts +4 -0
- package/dist/integration-engine/datasources/CityDistrictsDataSource.js +18 -0
- package/dist/integration-engine/datasources/CityDistrictsDataSource.js.map +1 -0
- package/dist/integration-engine/datasources/index.d.ts +1 -0
- package/dist/integration-engine/datasources/index.js +19 -0
- package/dist/integration-engine/datasources/index.js.map +1 -0
- package/dist/integration-engine/index.d.ts +2 -5
- package/dist/integration-engine/index.js +4 -5
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/repositories/CityDistrictMongoRepository.d.ts +5 -0
- package/dist/integration-engine/repositories/CityDistrictMongoRepository.js +26 -0
- package/dist/integration-engine/repositories/CityDistrictMongoRepository.js.map +1 -0
- package/dist/integration-engine/repositories/CityDistrictPostgresRepository.d.ts +7 -0
- package/dist/integration-engine/{models/CityDistrictModel.js → repositories/CityDistrictPostgresRepository.js} +17 -12
- package/dist/integration-engine/repositories/CityDistrictPostgresRepository.js.map +1 -0
- package/dist/integration-engine/repositories/index.d.ts +2 -0
- package/dist/integration-engine/repositories/index.js +20 -0
- package/dist/integration-engine/repositories/index.js.map +1 -0
- package/dist/integration-engine/{CityDistrictsMongoTransformation.d.ts → transformations/CityDistrictsMongoTransformation.d.ts} +0 -0
- package/dist/integration-engine/{CityDistrictsMongoTransformation.js → transformations/CityDistrictsMongoTransformation.js} +2 -2
- package/dist/integration-engine/transformations/CityDistrictsMongoTransformation.js.map +1 -0
- package/dist/integration-engine/{CityDistrictsPostgresTransformation.d.ts → transformations/CityDistrictsPostgresTransformation.d.ts} +2 -1
- package/dist/integration-engine/{CityDistrictsPostgresTransformation.js → transformations/CityDistrictsPostgresTransformation.js} +2 -2
- package/dist/integration-engine/transformations/CityDistrictsPostgresTransformation.js.map +1 -0
- package/dist/integration-engine/transformations/index.d.ts +2 -0
- package/dist/integration-engine/transformations/index.js +20 -0
- package/dist/integration-engine/transformations/index.js.map +1 -0
- package/dist/integration-engine/workers/CityDistrictsWorker.d.ts +5 -0
- package/dist/integration-engine/workers/CityDistrictsWorker.js +15 -0
- package/dist/integration-engine/workers/CityDistrictsWorker.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 +12 -0
- package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.js +43 -0
- package/dist/integration-engine/workers/tasks/RefreshDataInDBTask.js.map +1 -0
- package/dist/integration-engine/workers/tasks/index.d.ts +1 -0
- package/dist/integration-engine/workers/tasks/index.js +19 -0
- package/dist/integration-engine/workers/tasks/index.js.map +1 -0
- package/dist/output-gateway/CityDistrictsMongoRouter.d.ts +8 -0
- package/dist/output-gateway/CityDistrictsMongoRouter.js +15 -0
- package/dist/output-gateway/CityDistrictsMongoRouter.js.map +1 -0
- package/dist/output-gateway/CityDistrictsPostgresRouter.d.ts +8 -0
- package/dist/output-gateway/CityDistrictsPostgresRouter.js +15 -0
- package/dist/output-gateway/CityDistrictsPostgresRouter.js.map +1 -0
- package/dist/output-gateway/index.d.ts +3 -2
- package/dist/output-gateway/index.js +3 -2
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/{CityDistrictsModel.d.ts → repositories/CityDistrictsMongoRepository.d.ts} +1 -4
- package/dist/output-gateway/repositories/CityDistrictsMongoRepository.js +17 -0
- package/dist/output-gateway/repositories/CityDistrictsMongoRepository.js.map +1 -0
- package/dist/output-gateway/repositories/CityDistrictsPostgresRepository.d.ts +27 -0
- package/dist/output-gateway/repositories/CityDistrictsPostgresRepository.js +88 -0
- package/dist/output-gateway/repositories/CityDistrictsPostgresRepository.js.map +1 -0
- package/dist/output-gateway/repositories/index.d.ts +2 -0
- package/dist/output-gateway/repositories/index.js +20 -0
- package/dist/output-gateway/repositories/index.js.map +1 -0
- package/dist/schema-definitions/datasources/CityDistrictsJsonSchema.d.ts +25 -0
- package/dist/schema-definitions/datasources/CityDistrictsJsonSchema.js +45 -0
- package/dist/schema-definitions/datasources/CityDistrictsJsonSchema.js.map +1 -0
- package/dist/schema-definitions/index.d.ts +1 -43
- package/dist/schema-definitions/index.js +5 -81
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/interfaces/CityDistricts.d.ts +21 -0
- package/dist/schema-definitions/interfaces/CityDistricts.js +3 -0
- package/dist/schema-definitions/interfaces/CityDistricts.js.map +1 -0
- package/dist/schema-definitions/models/CityDistrictModel.d.ts +27 -0
- package/dist/schema-definitions/models/CityDistrictModel.js +87 -0
- package/dist/schema-definitions/models/CityDistrictModel.js.map +1 -0
- package/package.json +11 -6
- package/dist/integration-engine/CityDistrictsMongoTransformation.js.map +0 -1
- package/dist/integration-engine/CityDistrictsPostgresTransformation.js.map +0 -1
- package/dist/integration-engine/CityDistrictsWorker.d.ts +0 -10
- package/dist/integration-engine/CityDistrictsWorker.js +0 -60
- package/dist/integration-engine/CityDistrictsWorker.js.map +0 -1
- package/dist/integration-engine/models/CityDistrictModel.d.ts +0 -5
- package/dist/integration-engine/models/CityDistrictModel.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/CityDistrictsModel.js +0 -20
- package/dist/output-gateway/CityDistrictsModel.js.map +0 -1
- package/dist/output-gateway/CityDistrictsRouter.d.ts +0 -14
- package/dist/output-gateway/CityDistrictsRouter.js +0 -21
- package/dist/output-gateway/CityDistrictsRouter.js.map +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CityDistrictsPostgresRepository = void 0;
|
|
16
|
+
const sequelize_1 = __importDefault(require("@golemio/core/dist/shared/sequelize"));
|
|
17
|
+
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
18
|
+
const output_gateway_2 = require("@golemio/core/dist/output-gateway");
|
|
19
|
+
const Geo_1 = require("@golemio/core/dist/output-gateway/Geo");
|
|
20
|
+
const _sch_1 = require("../../schema-definitions");
|
|
21
|
+
const CityDistrictModel_1 = require("../../schema-definitions/models/CityDistrictModel");
|
|
22
|
+
class CityDistrictsPostgresRepository extends output_gateway_1.SequelizeModel {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(_sch_1.CityDistricts.name + "Repository", _sch_1.CityDistricts.pgTableName, CityDistrictModel_1.CityDistrictModel.attributeModel, {
|
|
25
|
+
schema: _sch_1.CityDistricts.pgSchema,
|
|
26
|
+
});
|
|
27
|
+
this.GetProperties = () => __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
throw new Error("Not implemented");
|
|
29
|
+
});
|
|
30
|
+
this.GetAll = (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const whereAttributes = {};
|
|
32
|
+
const order = [];
|
|
33
|
+
if (options.updatedSince) {
|
|
34
|
+
whereAttributes.updated_at = {
|
|
35
|
+
[sequelize_1.default.Op.gte]: options.updatedSince,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (options.lat && options.lng) {
|
|
39
|
+
if (options.range) {
|
|
40
|
+
whereAttributes.range = sequelize_1.default.where(sequelize_1.default.fn("ST_DWithin", sequelize_1.default.col("geometry"), sequelize_1.default.cast(sequelize_1.default.fn("ST_SetSRID", sequelize_1.default.fn("ST_MakePoint", options.lng, options.lat), 4326), "geography"), options.range, true), "true");
|
|
41
|
+
}
|
|
42
|
+
order.push(sequelize_1.default.fn("ST_Distance", sequelize_1.default.col("geometry"), sequelize_1.default.cast(sequelize_1.default.fn("ST_SetSRID", sequelize_1.default.fn("ST_MakePoint", options.lng, options.lat), 4326), "geography")));
|
|
43
|
+
}
|
|
44
|
+
const result = (yield this.sequelizeModel.findAll({
|
|
45
|
+
attributes: [
|
|
46
|
+
"id",
|
|
47
|
+
["district_name", "name"],
|
|
48
|
+
["district_name_slug", "slug"],
|
|
49
|
+
"geom",
|
|
50
|
+
[sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date::double precision / 1000")), "updated_at"],
|
|
51
|
+
],
|
|
52
|
+
raw: true,
|
|
53
|
+
where: whereAttributes,
|
|
54
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
55
|
+
offset: Number.isInteger(options === null || options === void 0 ? void 0 : options.offset) ? options === null || options === void 0 ? void 0 : options.offset : undefined,
|
|
56
|
+
order,
|
|
57
|
+
}));
|
|
58
|
+
return (0, output_gateway_2.buildGeojsonFeatureCollection)(result.map((record) => {
|
|
59
|
+
return this.formatOutput(record);
|
|
60
|
+
}));
|
|
61
|
+
});
|
|
62
|
+
this.GetOne = (id) => __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const result = (yield this.sequelizeModel.findOne({
|
|
64
|
+
attributes: [
|
|
65
|
+
"id",
|
|
66
|
+
["district_name", "name"],
|
|
67
|
+
["district_name_slug", "slug"],
|
|
68
|
+
"geom",
|
|
69
|
+
[sequelize_1.default.fn("to_timestamp", sequelize_1.default.literal("change_date::double precision / 1000")), "updated_at"],
|
|
70
|
+
],
|
|
71
|
+
where: { district_name_slug: id },
|
|
72
|
+
raw: true,
|
|
73
|
+
}));
|
|
74
|
+
return result ? this.formatOutput(result) : undefined;
|
|
75
|
+
});
|
|
76
|
+
this.formatOutput = (record) => {
|
|
77
|
+
return (0, Geo_1.buildGeojsonFeatureType)("geom", record);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
IsPrimaryIdNumber() {
|
|
81
|
+
return Promise.resolve(false);
|
|
82
|
+
}
|
|
83
|
+
PrimaryIdentifierSelection(id) {
|
|
84
|
+
return { id };
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.CityDistrictsPostgresRepository = CityDistrictsPostgresRepository;
|
|
88
|
+
//# sourceMappingURL=CityDistrictsPostgresRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CityDistrictsPostgresRepository.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/CityDistrictsPostgresRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oFAA4D;AAC5D,sEAAmE;AAEnE,sEAI2C;AAC3C,+DAAwG;AACxG,mDAAqC;AACrC,yFAAkE;AASlE,MAAa,+BAAgC,SAAQ,+BAAc;IAC/D;QACI,KAAK,CAAC,oBAAa,CAAC,IAAI,GAAG,YAAY,EAAE,oBAAa,CAAC,WAAW,EAAE,qCAAiB,CAAC,cAAc,EAAE;YAClG,MAAM,EAAE,oBAAa,CAAC,QAAQ;SACjC,CAAC,CAAC;QAWA,kBAAa,GAAG,GAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACvC,CAAC,CAAA,CAAC;QAEK,WAAM,GAAG,CAAO,UAAuC,EAAE,EAAsC,EAA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,GAAG,CAAC,MAA4B,EAAE,EAAE;YACpD,OAAO,IAAA,6BAAuB,EAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnD,CAAC,CAAC;IA7FF,CAAC;IAEM,iBAAiB;QACpB,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEM,0BAA0B,CAAC,EAAU;QACxC,OAAO,EAAE,EAAE,EAAE,CAAC;IAClB,CAAC;CAsFJ;AAnGD,0EAmGC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* og/repositories/index.ts */
|
|
18
|
+
__exportStar(require("./CityDistrictsMongoRepository"), exports);
|
|
19
|
+
__exportStar(require("./CityDistrictsPostgresRepository"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/repositories/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8BAA8B;AAC9B,iEAA+C;AAC/C,oEAAkD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
2
|
+
export interface ICityDistrictInput {
|
|
3
|
+
type: string;
|
|
4
|
+
geometry: object;
|
|
5
|
+
properties: ICityDistrictPropertiesInput;
|
|
6
|
+
}
|
|
7
|
+
export interface ICityDistrictPropertiesInput {
|
|
8
|
+
DAT_VZNIK: number;
|
|
9
|
+
DAT_ZMENA: number;
|
|
10
|
+
ID: number;
|
|
11
|
+
ID_POSKYT: number;
|
|
12
|
+
KOD_MC: number;
|
|
13
|
+
KOD_MO: number;
|
|
14
|
+
KOD_SO: number;
|
|
15
|
+
NAZEV_1: string;
|
|
16
|
+
NAZEV_MC: string;
|
|
17
|
+
OBJECTID: number;
|
|
18
|
+
PLOCHA: number;
|
|
19
|
+
POSKYT: string;
|
|
20
|
+
STAV_ZMENA: string;
|
|
21
|
+
Shape_Area: number;
|
|
22
|
+
Shape_Length: number;
|
|
23
|
+
TID_TMMESTSKECASTI_P: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const cityDistrictsDatasourceJsonSchema: JSONSchemaType<ICityDistrictInput[]>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cityDistrictsDatasourceJsonSchema = void 0;
|
|
4
|
+
const schema_definitions_1 = require("@golemio/core/dist/schema-definitions");
|
|
5
|
+
exports.cityDistrictsDatasourceJsonSchema = {
|
|
6
|
+
type: "array",
|
|
7
|
+
additionalItems: false,
|
|
8
|
+
items: {
|
|
9
|
+
type: "object",
|
|
10
|
+
required: ["type", "geometry", "properties"],
|
|
11
|
+
additionalProperties: false,
|
|
12
|
+
properties: {
|
|
13
|
+
type: { type: "string" },
|
|
14
|
+
geometry: { $ref: "#/definitions/geometry" },
|
|
15
|
+
properties: {
|
|
16
|
+
type: "object",
|
|
17
|
+
required: ["KOD_MC", "NAZEV_MC"],
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
properties: {
|
|
20
|
+
DAT_VZNIK: { type: "integer" },
|
|
21
|
+
DAT_ZMENA: { type: "integer" },
|
|
22
|
+
ID: { type: "integer" },
|
|
23
|
+
ID_POSKYT: { type: "integer" },
|
|
24
|
+
KOD_MC: { type: "integer" },
|
|
25
|
+
KOD_MO: { type: "integer" },
|
|
26
|
+
KOD_SO: { type: "string" },
|
|
27
|
+
NAZEV_1: { type: "string" },
|
|
28
|
+
NAZEV_MC: { type: "string" },
|
|
29
|
+
OBJECTID: { type: "integer" },
|
|
30
|
+
PLOCHA: { type: "number" },
|
|
31
|
+
POSKYT: { type: "string" },
|
|
32
|
+
STAV_ZMENA: { type: "string" },
|
|
33
|
+
Shape_Area: { type: "number" },
|
|
34
|
+
Shape_Length: { type: "number" },
|
|
35
|
+
TID_TMMESTSKECASTI_P: { type: "integer" },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
definitions: {
|
|
41
|
+
// @ts-expect-error
|
|
42
|
+
geometry: schema_definitions_1.SharedSchemaProvider.Geometry,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=CityDistrictsJsonSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CityDistrictsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/CityDistrictsJsonSchema.ts"],"names":[],"mappings":";;;AACA,8EAA6E;AA2BhE,QAAA,iCAAiC,GAAyC;IACnF,IAAI,EAAE,OAAO;IACb,eAAe,EAAE,KAAK;IACtB,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC;QAC5C,oBAAoB,EAAE,KAAK;QAC3B,UAAU,EAAE;YACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,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/>
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose" />
|
|
25
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
-
import Sequelize from "@golemio/core/dist/shared/sequelize";
|
|
27
|
-
declare const forExport: {
|
|
28
|
-
datasourceMongooseSchemaObject: {
|
|
29
|
-
[path: string]: import("mongoose").SchemaDefinitionProperty<undefined>;
|
|
30
|
-
};
|
|
31
|
-
mongoCollectionName: string;
|
|
32
|
-
name: string;
|
|
33
|
-
outputMongooseSchemaObject: {
|
|
34
|
-
[path: string]: import("mongoose").SchemaDefinitionProperty<undefined>;
|
|
35
|
-
};
|
|
36
|
-
postgres: {
|
|
37
|
-
outputMongooseSchemaObject: {
|
|
38
|
-
[path: string]: import("mongoose").SchemaDefinitionProperty<undefined>;
|
|
39
|
-
};
|
|
40
|
-
outputSequelizeAttributes: Sequelize.ModelAttributes<any, any>;
|
|
41
|
-
pgTableName: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
1
|
+
declare const forExport: any;
|
|
44
2
|
export { forExport as CityDistricts };
|
|
@@ -1,37 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.CityDistricts = void 0;
|
|
7
|
-
const
|
|
8
|
-
// MSO = Mongoose SchemaObject
|
|
9
|
-
// SDMA = Sequelize DefineModelAttributes
|
|
10
|
-
const datasourceMSO = {
|
|
11
|
-
geometry: {
|
|
12
|
-
coordinates: { type: Array, required: true },
|
|
13
|
-
type: { type: String, required: true },
|
|
14
|
-
},
|
|
15
|
-
properties: {
|
|
16
|
-
DAT_VZNIK: { type: Number },
|
|
17
|
-
DAT_ZMENA: { type: Number },
|
|
18
|
-
ID: { type: Number },
|
|
19
|
-
ID_POSKYT: { type: Number },
|
|
20
|
-
KOD_MC: { type: Number, required: true },
|
|
21
|
-
KOD_MO: { type: Number },
|
|
22
|
-
KOD_SO: { type: Number },
|
|
23
|
-
NAZEV_1: { type: String },
|
|
24
|
-
NAZEV_MC: { type: String, required: true },
|
|
25
|
-
OBJECTID: { type: Number },
|
|
26
|
-
PLOCHA: { type: Number },
|
|
27
|
-
POSKYT: { type: String },
|
|
28
|
-
STAV_ZMENA: { type: String },
|
|
29
|
-
Shape_Area: { type: Number },
|
|
30
|
-
Shape_Length: { type: Number },
|
|
31
|
-
TID_TMMESTSKECASTI_P: { type: Number },
|
|
32
|
-
},
|
|
33
|
-
type: { type: String, required: true },
|
|
34
|
-
};
|
|
4
|
+
const CityDistrictsJsonSchema_1 = require("./datasources/CityDistrictsJsonSchema");
|
|
35
5
|
const outputMongoMSO = {
|
|
36
6
|
geometry: {
|
|
37
7
|
coordinates: { type: Array },
|
|
@@ -45,59 +15,13 @@ const outputMongoMSO = {
|
|
|
45
15
|
},
|
|
46
16
|
type: { type: String, required: true },
|
|
47
17
|
};
|
|
48
|
-
const outputPostgresSDMA = {
|
|
49
|
-
area: sequelize_1.default.DOUBLE(25),
|
|
50
|
-
change_date: sequelize_1.default.STRING,
|
|
51
|
-
change_status: sequelize_1.default.STRING,
|
|
52
|
-
create_date: sequelize_1.default.STRING,
|
|
53
|
-
district_name: sequelize_1.default.STRING,
|
|
54
|
-
district_short_name: sequelize_1.default.STRING,
|
|
55
|
-
geom: sequelize_1.default.GEOMETRY,
|
|
56
|
-
id: {
|
|
57
|
-
primaryKey: true,
|
|
58
|
-
type: sequelize_1.default.INTEGER,
|
|
59
|
-
},
|
|
60
|
-
id_provider: sequelize_1.default.INTEGER,
|
|
61
|
-
kod_mo: sequelize_1.default.INTEGER,
|
|
62
|
-
kod_so: sequelize_1.default.STRING,
|
|
63
|
-
objectid: sequelize_1.default.INTEGER,
|
|
64
|
-
provider: sequelize_1.default.STRING,
|
|
65
|
-
shape_area: sequelize_1.default.DOUBLE(25),
|
|
66
|
-
shape_length: sequelize_1.default.DOUBLE(25),
|
|
67
|
-
tid_tmmestckecasti_p: sequelize_1.default.INTEGER,
|
|
68
|
-
zip: sequelize_1.default.INTEGER,
|
|
69
|
-
district_name_slug: sequelize_1.default.STRING,
|
|
70
|
-
};
|
|
71
|
-
const outputPostgresMSO = {
|
|
72
|
-
area: { type: Number },
|
|
73
|
-
change_date: { type: String },
|
|
74
|
-
change_status: { type: String },
|
|
75
|
-
create_date: { type: String },
|
|
76
|
-
district_name: { type: String },
|
|
77
|
-
district_short_name: { type: String },
|
|
78
|
-
geom: { type: Object },
|
|
79
|
-
id: { type: Number },
|
|
80
|
-
id_provider: { type: Number },
|
|
81
|
-
kod_mo: { type: Number },
|
|
82
|
-
kod_so: { type: String },
|
|
83
|
-
objectid: { type: Number },
|
|
84
|
-
provider: { type: String },
|
|
85
|
-
shape_area: { type: Number },
|
|
86
|
-
shape_length: { type: Number },
|
|
87
|
-
tid_tmmestckecasti_p: { type: Number },
|
|
88
|
-
zip: { type: Number },
|
|
89
|
-
district_name_slug: { type: String },
|
|
90
|
-
};
|
|
91
18
|
const forExport = {
|
|
92
|
-
datasourceMongooseSchemaObject: datasourceMSO,
|
|
93
|
-
mongoCollectionName: "citydistricts",
|
|
94
19
|
name: "CityDistricts",
|
|
20
|
+
pgSchema: "common",
|
|
21
|
+
pgTableName: "citydistricts",
|
|
22
|
+
mongoCollectionName: "citydistricts",
|
|
23
|
+
datasourceJsonSchema: CityDistrictsJsonSchema_1.cityDistrictsDatasourceJsonSchema,
|
|
95
24
|
outputMongooseSchemaObject: outputMongoMSO,
|
|
96
|
-
postgres: {
|
|
97
|
-
outputMongooseSchemaObject: outputPostgresMSO,
|
|
98
|
-
outputSequelizeAttributes: outputPostgresSDMA,
|
|
99
|
-
pgTableName: "citydistricts",
|
|
100
|
-
},
|
|
101
25
|
};
|
|
102
26
|
exports.CityDistricts = forExport;
|
|
103
27
|
//# 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":";;;AACA,mFAA6F;AAE7F,MAAM,cAAc,GAAqB;IACrC,QAAQ,EAAE;QACN,WAAW,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;QAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACzB;IACD,UAAU,EAAE;QACR,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACpC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACtC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QACtC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC/C;IACD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;CACzC,CAAC;AAEF,MAAM,SAAS,GAAQ;IACnB,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,QAAQ;IAClB,WAAW,EAAE,eAAe;IAC5B,mBAAmB,EAAE,eAAe;IACpC,oBAAoB,EAAE,2DAAiC;IACvD,0BAA0B,EAAE,cAAc;CAC7C,CAAC;AAEoB,kCAAa"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Polygon } from "@golemio/core/dist/shared/geojson";
|
|
2
|
+
export interface ICityDistricts {
|
|
3
|
+
id: number;
|
|
4
|
+
area: number;
|
|
5
|
+
change_date: string;
|
|
6
|
+
change_status: string;
|
|
7
|
+
create_date: string;
|
|
8
|
+
district_name: string;
|
|
9
|
+
district_short_name: string;
|
|
10
|
+
geom: Polygon;
|
|
11
|
+
id_provider: number;
|
|
12
|
+
kod_mo: number;
|
|
13
|
+
kod_so: string;
|
|
14
|
+
objectid: number;
|
|
15
|
+
provider: string;
|
|
16
|
+
shape_area: number;
|
|
17
|
+
shape_length: number;
|
|
18
|
+
tid_tmmestckecasti_p: number;
|
|
19
|
+
zip: number;
|
|
20
|
+
district_name_slug: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CityDistricts.js","sourceRoot":"","sources":["../../../src/schema-definitions/interfaces/CityDistricts.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Polygon } 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 { ICityDistricts } from "../interfaces/CityDistricts";
|
|
5
|
+
export declare class CityDistrictModel extends Model<ICityDistricts> implements ICityDistricts {
|
|
6
|
+
id: number;
|
|
7
|
+
area: number;
|
|
8
|
+
change_date: string;
|
|
9
|
+
change_status: string;
|
|
10
|
+
create_date: string;
|
|
11
|
+
district_name: string;
|
|
12
|
+
district_short_name: string;
|
|
13
|
+
geom: Polygon;
|
|
14
|
+
id_provider: number;
|
|
15
|
+
kod_mo: number;
|
|
16
|
+
kod_so: string;
|
|
17
|
+
objectid: number;
|
|
18
|
+
provider: string;
|
|
19
|
+
shape_area: number;
|
|
20
|
+
shape_length: number;
|
|
21
|
+
tid_tmmestckecasti_p: number;
|
|
22
|
+
zip: number;
|
|
23
|
+
district_name_slug: string;
|
|
24
|
+
static attributeModel: ModelAttributes<CityDistrictModel, ICityDistricts>;
|
|
25
|
+
static updateAttributes: (keyof ICityDistricts)[];
|
|
26
|
+
static jsonSchema: JSONSchemaType<ICityDistricts[]>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.CityDistrictModel = void 0;
|
|
27
|
+
const sequelize_1 = __importStar(require("@golemio/core/dist/shared/sequelize"));
|
|
28
|
+
const schema_definitions_1 = require("@golemio/core/dist/schema-definitions");
|
|
29
|
+
class CityDistrictModel extends sequelize_1.Model {
|
|
30
|
+
}
|
|
31
|
+
exports.CityDistrictModel = CityDistrictModel;
|
|
32
|
+
CityDistrictModel.attributeModel = {
|
|
33
|
+
area: sequelize_1.default.DOUBLE(25),
|
|
34
|
+
change_date: sequelize_1.default.STRING,
|
|
35
|
+
change_status: sequelize_1.default.STRING,
|
|
36
|
+
create_date: sequelize_1.default.STRING,
|
|
37
|
+
district_name: sequelize_1.default.STRING,
|
|
38
|
+
district_short_name: sequelize_1.default.STRING,
|
|
39
|
+
geom: sequelize_1.default.GEOMETRY,
|
|
40
|
+
id: {
|
|
41
|
+
primaryKey: true,
|
|
42
|
+
type: sequelize_1.default.INTEGER,
|
|
43
|
+
},
|
|
44
|
+
id_provider: sequelize_1.default.INTEGER,
|
|
45
|
+
kod_mo: sequelize_1.default.INTEGER,
|
|
46
|
+
kod_so: sequelize_1.default.STRING,
|
|
47
|
+
objectid: sequelize_1.default.INTEGER,
|
|
48
|
+
provider: sequelize_1.default.STRING,
|
|
49
|
+
shape_area: sequelize_1.default.DOUBLE(25),
|
|
50
|
+
shape_length: sequelize_1.default.DOUBLE(25),
|
|
51
|
+
tid_tmmestckecasti_p: sequelize_1.default.INTEGER,
|
|
52
|
+
zip: sequelize_1.default.INTEGER,
|
|
53
|
+
district_name_slug: sequelize_1.default.STRING,
|
|
54
|
+
};
|
|
55
|
+
CityDistrictModel.updateAttributes = Object.keys(CityDistrictModel.attributeModel).filter((att) => att !== "id");
|
|
56
|
+
CityDistrictModel.jsonSchema = {
|
|
57
|
+
type: "array",
|
|
58
|
+
items: {
|
|
59
|
+
type: "object",
|
|
60
|
+
properties: {
|
|
61
|
+
area: { type: "number" },
|
|
62
|
+
change_date: { type: "string" },
|
|
63
|
+
change_status: { type: "string" },
|
|
64
|
+
create_date: { type: "string" },
|
|
65
|
+
district_name: { type: "string" },
|
|
66
|
+
district_short_name: { type: "string" },
|
|
67
|
+
geom: { $ref: "#/definitions/geometry" },
|
|
68
|
+
id: { type: "integer" },
|
|
69
|
+
id_provider: { type: "integer" },
|
|
70
|
+
kod_mo: { type: "integer" },
|
|
71
|
+
kod_so: { type: "string" },
|
|
72
|
+
objectid: { type: "integer" },
|
|
73
|
+
provider: { type: "string" },
|
|
74
|
+
shape_area: { type: "number" },
|
|
75
|
+
shape_length: { type: "number" },
|
|
76
|
+
tid_tmmestckecasti_p: { type: "integer" },
|
|
77
|
+
zip: { type: "integer" },
|
|
78
|
+
district_name_slug: { type: "string" },
|
|
79
|
+
},
|
|
80
|
+
required: ["id", "geom", "district_name", "district_name_slug"],
|
|
81
|
+
},
|
|
82
|
+
definitions: {
|
|
83
|
+
// @ts-expect-error
|
|
84
|
+
geometry: schema_definitions_1.SharedSchemaProvider.Geometry,
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=CityDistrictModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CityDistrictModel.js","sourceRoot":"","sources":["../../../src/schema-definitions/models/CityDistrictModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,iFAAwF;AACxF,8EAA6E;AAG7E,MAAa,iBAAkB,SAAQ,iBAAqB;;AAA5D,8CA+EC;AA3DiB,gCAAc,GAAuD;IAC/E,IAAI,EAAE,mBAAS,CAAC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aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACjC,mBAAmB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvC,IAAI,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;YACxC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACvB,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAChC,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC5B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC9B,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,oBAAoB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACzC,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YACxB,kBAAkB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACzC;QACD,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,oBAAoB,CAAC;KAClE;IACD,WAAW,EAAE;QACT,mBAAmB;QACnB,QAAQ,EAAE,yCAAoB,CAAC,QAAQ;KAC1C;CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/city-districts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-dev.775903079",
|
|
4
4
|
"description": "Golemio City Districts Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
|
|
9
9
|
"build-minimal": "run-s 'build -- --sourceMap false --declaration false'",
|
|
10
10
|
"build-watch": "run-s 'build -- --watch --preserveWatchOutput'",
|
|
11
|
-
"pretest": "golemio-import-test-data",
|
|
12
|
-
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config 'test/**/*.test.ts'",
|
|
11
|
+
"pretest": "golemio import-db-data --postgres && export SQL_DUMP_FILES='' && npx golemio-import-test-data",
|
|
12
|
+
"test": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' mocha --exit --check-leaks --timeout 120000 -r ts-node/register -r dotenv/config --file 'test/setup.ts' 'test/**/*.test.ts'",
|
|
13
13
|
"test-debug": "run-s 'test -- --inspect-brk=9230'",
|
|
14
14
|
"code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
|
|
15
15
|
"generate-docs": "typedoc --out docs/typedoc src",
|
|
@@ -32,14 +32,18 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@commitlint/cli": "^11.0.0",
|
|
34
34
|
"@commitlint/config-conventional": "^11.0.0",
|
|
35
|
-
"@golemio/
|
|
36
|
-
"@golemio/
|
|
35
|
+
"@golemio/cli": "1.4.1",
|
|
36
|
+
"@golemio/core": "1.5.0",
|
|
37
|
+
"@golemio/db-common": "1.1.0",
|
|
38
|
+
"@golemio/eslint-config": "1.1.0",
|
|
39
|
+
"@golemio/schema-definitions": "^2.2.0",
|
|
37
40
|
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
38
41
|
"@types/chai": "4.2.3",
|
|
39
42
|
"@types/chai-as-promised": "7.1.2",
|
|
40
43
|
"@types/mocha": "^9.1.0",
|
|
41
44
|
"@types/node": "^16.11.35",
|
|
42
45
|
"@types/sinon": "^9.0.10",
|
|
46
|
+
"@types/supertest": "^2.0.12",
|
|
43
47
|
"chai": "4.2.0",
|
|
44
48
|
"chai-as-promised": "7.1.1",
|
|
45
49
|
"cross-env": "^7.0.3",
|
|
@@ -54,6 +58,7 @@
|
|
|
54
58
|
"rimraf": "^3.0.2",
|
|
55
59
|
"sinon": "^9.2.3",
|
|
56
60
|
"source-map-support": "0.5.19",
|
|
61
|
+
"supertest": "^6.3.3",
|
|
57
62
|
"ts-node": "^10.7.0",
|
|
58
63
|
"ttypescript": "^1.5.13",
|
|
59
64
|
"typedoc": "^0.22.15",
|
|
@@ -65,4 +70,4 @@
|
|
|
65
70
|
"dependencies": {
|
|
66
71
|
"slugify": "1.3.2"
|
|
67
72
|
}
|
|
68
|
-
}
|
|
73
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CityDistrictsMongoTransformation.js","sourceRoot":"","sources":["../../src/integration-engine/CityDistrictsMongoTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAA2B;AAC3B,8EAA4F;AAC5F,uDAA2C;AAE3C,MAAa,gCAAiC,SAAQ,uCAAkB;IAGpE;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,CAAO,OAAY,EAAgB,EAAE;YAC9D,OAAO;gBACH,QAAQ,EAAE;oBACN,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,WAAW;oBACzC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;iBAC9B;gBACD,UAAU,EAAE;oBACR,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,CAAC;oBAC3C,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;oBACjC,IAAI,EAAE,IAAA,iBAAI,EAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;oBAClF,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;iBACnC;gBACD,IAAI,EAAE,OAAO,CAAC,IAAI;aACrB,CAAC;QACN,CAAC,CAAA,CAAC;QAjBE,IAAI,CAAC,IAAI,GAAG,qBAAa,CAAC,IAAI,CAAC;IACnC,CAAC;CAiBJ;AAvBD,4EAuBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CityDistrictsPostgresTransformation.js","sourceRoot":"","sources":["../../src/integration-engine/CityDistrictsPostgresTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uDAA2C;AAC3C,8EAA4F;AAC5F,sDAA2B;AAE3B,MAAa,mCAAoC,SAAQ,uCAAkB;IAGvE;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,CAAO,OAAY,EAAgB,EAAE;YAC9D,OAAO;gBACH,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBAC/B,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACzC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU;gBAC5C,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACzC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;gBAC1C,mBAAmB,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO;gBAC/C,IAAI,kCACG,OAAO,CAAC,QAAQ,KACnB,GAAG,EAAE;wBACD,UAAU,EAAE;4BACR,IAAI,EAAE,WAAW;yBACpB;wBACD,IAAI,EAAE,MAAM;qBACf,GACJ;gBACD,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE;gBACzB,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,SAAS;gBACzC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACjC,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACjC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;gBACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACnC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,UAAU;gBACzC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY;gBAC7C,oBAAoB,EAAE,OAAO,CAAC,UAAU,CAAC,oBAAoB;gBAC7D,GAAG,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBAC9B,kBAAkB,EAAE,IAAA,iBAAI,EAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,CAAC;aACnG,CAAC;QACN,CAAC,CAAA,CAAC;QAhCE,IAAI,CAAC,IAAI,GAAG,qBAAa,CAAC,IAAI,CAAC;IACnC,CAAC;CAgCJ;AAtCD,kFAsCC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseWorker } from "@golemio/core/dist/integration-engine/workers";
|
|
2
|
-
export declare class CityDistrictsWorker extends BaseWorker {
|
|
3
|
-
private dataSource;
|
|
4
|
-
private transformation;
|
|
5
|
-
private model;
|
|
6
|
-
private postgresTransformation;
|
|
7
|
-
private postgresModel;
|
|
8
|
-
constructor();
|
|
9
|
-
refreshDataInDB: (msg: any) => Promise<void>;
|
|
10
|
-
}
|