@golemio/playgrounds 1.0.3-dev.442767601 → 1.0.3-dev.488256458
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/00_truncate_tables.sql +6 -0
- package/db/example/01_playgrounds.sql +30 -0
- package/db/migrations/postgresql/.config.json +3 -0
- package/db/migrations/postgresql/20220223135414-playgrounds-to-postgres.js +53 -0
- package/db/migrations/postgresql/package.json +3 -0
- package/db/migrations/postgresql/sqls/20220223135414-playgrounds-to-postgres-down.sql +3 -0
- package/db/migrations/postgresql/sqls/20220223135414-playgrounds-to-postgres-up.sql +52 -0
- package/db/migrations/postgresql/sqls/package.json +3 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/integration-engine/PlaygroundsDataSource.d.ts +5 -0
- package/dist/integration-engine/PlaygroundsDataSource.js +21 -0
- package/dist/integration-engine/PlaygroundsDataSource.js.map +1 -0
- package/dist/integration-engine/PlaygroundsTransformation.d.ts +6 -1
- package/dist/integration-engine/PlaygroundsTransformation.js +35 -27
- package/dist/integration-engine/PlaygroundsTransformation.js.map +1 -1
- package/dist/integration-engine/PlaygroundsWorker.d.ts +7 -1
- package/dist/integration-engine/PlaygroundsWorker.js +114 -81
- package/dist/integration-engine/PlaygroundsWorker.js.map +1 -1
- package/dist/integration-engine/helpers/AddressHelper.d.ts +11 -0
- package/dist/integration-engine/helpers/AddressHelper.js +68 -0
- package/dist/integration-engine/helpers/AddressHelper.js.map +1 -0
- package/dist/integration-engine/models/CityDistrictsModel.d.ts +4 -0
- package/dist/integration-engine/models/CityDistrictsModel.js +22 -0
- package/dist/integration-engine/models/CityDistrictsModel.js.map +1 -0
- package/dist/integration-engine/models/PlaygroundPropertyModel.d.ts +4 -0
- package/dist/integration-engine/models/PlaygroundPropertyModel.js +21 -0
- package/dist/integration-engine/models/PlaygroundPropertyModel.js.map +1 -0
- package/dist/integration-engine/models/PlaygroundsModel.d.ts +12 -0
- package/dist/integration-engine/models/PlaygroundsModel.js +47 -0
- package/dist/integration-engine/models/PlaygroundsModel.js.map +1 -0
- package/dist/integration-engine/models/PropertyModel.d.ts +4 -0
- package/dist/integration-engine/models/PropertyModel.js +21 -0
- package/dist/integration-engine/models/PropertyModel.js.map +1 -0
- package/dist/integration-engine/queueDefinitions.js +3 -3
- package/dist/integration-engine/queueDefinitions.js.map +1 -1
- package/dist/output-gateway/PlaygroundsRouter.d.ts +2 -1
- package/dist/output-gateway/PlaygroundsRouter.js +6 -4
- package/dist/output-gateway/PlaygroundsRouter.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/models/FilterHelper.d.ts +8 -0
- package/dist/output-gateway/models/FilterHelper.js +49 -0
- package/dist/output-gateway/models/FilterHelper.js.map +1 -0
- package/dist/output-gateway/models/PlaygroundPropertyModel.d.ts +6 -0
- package/dist/output-gateway/models/PlaygroundPropertyModel.js +22 -0
- package/dist/output-gateway/models/PlaygroundPropertyModel.js.map +1 -0
- package/dist/output-gateway/models/PlaygroundsModel.d.ts +15 -0
- package/dist/output-gateway/models/PlaygroundsModel.js +87 -0
- package/dist/output-gateway/models/PlaygroundsModel.js.map +1 -0
- package/dist/output-gateway/models/PropertyModel.d.ts +6 -0
- package/dist/output-gateway/models/PropertyModel.js +22 -0
- package/dist/output-gateway/models/PropertyModel.js.map +1 -0
- package/dist/schema-definitions/PlaygroundSchemaTables.d.ts +5 -0
- package/dist/schema-definitions/PlaygroundSchemaTables.js +10 -0
- package/dist/schema-definitions/PlaygroundSchemaTables.js.map +1 -0
- package/dist/schema-definitions/PlaygroundsInfo.d.ts +12 -0
- package/dist/schema-definitions/PlaygroundsInfo.js +41 -0
- package/dist/schema-definitions/PlaygroundsInfo.js.map +1 -0
- package/dist/schema-definitions/json-schema/OutputSchemaProvider.d.ts +9 -0
- package/dist/schema-definitions/json-schema/OutputSchemaProvider.js +58 -0
- package/dist/schema-definitions/json-schema/OutputSchemaProvider.js.map +1 -0
- package/dist/schema-definitions/json-schema/SourceSchemaProvider.d.ts +5 -0
- package/dist/schema-definitions/json-schema/SourceSchemaProvider.js +48 -0
- package/dist/schema-definitions/json-schema/SourceSchemaProvider.js.map +1 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourcePlayground.d.ts +14 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourcePlayground.js +3 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourcePlayground.js.map +1 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourcePlaygroundCategory.d.ts +4 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourcePlaygroundCategory.js +3 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourcePlaygroundCategory.js.map +1 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourceResponse.d.ts +8 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourceResponse.js +3 -0
- package/dist/schema-definitions/json-schema/interfaces/ISourceResponse.js.map +1 -0
- package/dist/schema-definitions/output/IOutputPlaygroundProperties.d.ts +24 -0
- package/dist/schema-definitions/output/IOutputPlaygroundProperties.js +3 -0
- package/dist/schema-definitions/output/IOutputPlaygroundProperties.js.map +1 -0
- package/dist/schema-definitions/output/OutputPlayground.d.ts +9 -0
- package/dist/schema-definitions/output/OutputPlayground.js +38 -0
- package/dist/schema-definitions/output/OutputPlayground.js.map +1 -0
- package/dist/schema-definitions/sequelize-models/Playground.d.ts +24 -0
- package/dist/schema-definitions/sequelize-models/Playground.js +30 -0
- package/dist/schema-definitions/sequelize-models/Playground.js.map +1 -0
- package/dist/schema-definitions/sequelize-models/PlaygroundProperty.d.ts +7 -0
- package/dist/schema-definitions/sequelize-models/PlaygroundProperty.js +27 -0
- package/dist/schema-definitions/sequelize-models/PlaygroundProperty.js.map +1 -0
- package/dist/schema-definitions/sequelize-models/Property.d.ts +7 -0
- package/dist/schema-definitions/sequelize-models/Property.js +12 -0
- package/dist/schema-definitions/sequelize-models/Property.js.map +1 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IPlayground.d.ts +20 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IPlayground.js +3 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IPlayground.js.map +1 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IPlaygroundProperty.d.ts +4 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IPlaygroundProperty.js +3 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IPlaygroundProperty.js.map +1 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IProperty.d.ts +4 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IProperty.js +3 -0
- package/dist/schema-definitions/sequelize-models/interfaces/IProperty.js.map +1 -0
- package/package.json +6 -4
- package/db/example/mongo_data/dataplatform/playgrounds.bson +0 -0
- package/db/example/mongo_data/dataplatform/playgrounds.metadata.json +0 -1
- package/dist/output-gateway/PlaygroundsModel.d.ts +0 -7
- package/dist/output-gateway/PlaygroundsModel.js +0 -17
- package/dist/output-gateway/PlaygroundsModel.js.map +0 -1
- package/dist/schema-definitions/index.d.ts +0 -12
- package/dist/schema-definitions/index.js +0 -66
- package/dist/schema-definitions/index.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
INSERT INTO properties (id,description,updated_at,created_at) VALUES
|
|
2
|
+
(4,'Fitness prvky','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
3
|
+
(9,'Kultura (muzea, galerie, venkovní sochy, divadla, planetária)','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
4
|
+
(5,'Voda-hydrant nebo umyvadlo','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
5
|
+
(6,'WC na hřišti nebo v bezprostřední blízkosti','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
6
|
+
(8,'Částečný stín','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
7
|
+
(3,'Jiné sporty (lanová centra, minigolf, discgolf, boby)','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
8
|
+
(13,'Bazény, vodní atrakce, vodní soustavy','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
9
|
+
(1,'Plocha pro míčové hry','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
10
|
+
(2,'In line stezky, skate parky, BMX areály, dopravní hřiště','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
11
|
+
(7,'Správce na hřišti','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672');
|
|
12
|
+
INSERT INTO properties (id,description,updated_at,created_at) VALUES
|
|
13
|
+
(12,'Restaurace nebo kavárny v bezprostřední blízkosti','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
14
|
+
(10,'Naučné stezky','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672'),
|
|
15
|
+
(11,'ZOO koutky','2022-03-09 10:17:31.703','2022-03-09 10:16:05.672');
|
|
16
|
+
|
|
17
|
+
INSERT INTO playgrounds.playground ("internal_id","location","content",external_id,"name",perex,updated_at,created_at,url,image_url,district,address_region,address_country,address_formatted,address_locality,postal_code,street_address) VALUES
|
|
18
|
+
(1,'SRID=4326;POINT (14.613753319 50.11164856)'::geometry,'Dětské hřiště (62.A) se rozkládá v parčíku, u konečné autobusu č. 223. Tvoří ho hned 3 části. První je oplocena vyšším...',89,' Horní Počernice - hřiště 62.A','Lokalita vám nabídne velmi pěkné hřiště a několik zajímavých doprovodných aktivit.','2022-03-09 10:17:31.063','2022-03-09 10:16:03.574','http://www.hristepraha.cz/hriste/mapa/horni-pocernice-hriste-62-a','http://www.hristepraha.cz/images/img/840ce044e65195caa5465818342e3ac4o.jpg','Praha 20','Horní Počernice','Česko','Běluňská, 19300 Hlavní město Praha-Horní Počernice, Česko','Hlavní město Praha','19300','Běluňská'),
|
|
19
|
+
(2,'SRID=4326;POINT (14.428703308 50.130802155)'::geometry,'Větší hřiště se rozkládá, mezi ulicemi Toruňská a Gdaňská (29.A). Děti mohou vyzkoušet asi deset atrakcí. Atraktivní je...',42,'Bohnice a Čimice - Bohnice','Nedaleko od sebe leží 2 pěkná hřiště.','2022-03-09 10:17:31.063','2022-03-09 10:16:03.575','http://www.hristepraha.cz/hriste/mapa/bohnice-a-cimice-bohnice','http://www.hristepraha.cz/images/img/124f60c9d87bda76b3a42d3b6730bdf6o.jpg','Praha 8','Bohnice','Česko','Toruňská 326/3, 18100 Hlavní město Praha-Bohnice, Česko','Hlavní město Praha','18100','Toruňská 326/3'),
|
|
20
|
+
(3,'SRID=4326;POINT (14.338401794 50.048431396)'::geometry,'U stanice metra Lužiny se rozkládá rozlehlý park. Přestože je místy poněkud zanedbaný, stojí za návštěvu. Procházku...',66,'Centrální park Prahy 13','Chcete si prohlédnout Central park? Pak není nutné trmácet se do New Yorku. Stačí zajet na Lužiny!','2022-03-09 10:17:31.063','2022-03-09 10:16:03.575','http://www.hristepraha.cz/hriste/mapa/centralni-park-prahy-13','http://www.hristepraha.cz/images/img/9bf858de61f4e14add5c39a944b4b7fdo.jpg','Praha 13','Stodůlky','Česko','Pod Hranicí, 155 00 Hlavní město Praha-Stodůlky, Česko','Hlavní město Praha','155 00','Pod Hranicí'),
|
|
21
|
+
(4,'SRID=4326;POINT (14.572277069 50.105449677)'::geometry,'V zeleni u panelových domů, mezi ulicemi Breitcetlova a Šebelova (u mateřské školky), se rozkládá první areál (72.A)...',81,'Černý Most - hřiště 72.A','Na sídlišti Černý Most můžete nedaleko sebe navštívit dva menší areály s dětskými hřišti.','2022-03-09 10:17:31.063','2022-03-09 10:16:03.575','http://www.hristepraha.cz/hriste/mapa/cerny-most-hriste-72-a','http://www.hristepraha.cz/images/img/05884db0382d642111108750be85da6fo.jpg','Praha 14','Černý Most','Česko','Šebelova 875/4, 19800 Hlavní město Praha-Černý Most, Česko','Hlavní město Praha','19800','Šebelova 875/4');
|
|
22
|
+
|
|
23
|
+
INSERT INTO playgrounds.playground_properties (playground_id,properties_id,updated_at,created_at) VALUES
|
|
24
|
+
(1,4,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782'),
|
|
25
|
+
(1,9,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782'),
|
|
26
|
+
(2,9,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782'),
|
|
27
|
+
(3,5,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782'),
|
|
28
|
+
(3,6,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782'),
|
|
29
|
+
(3,8,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782'),
|
|
30
|
+
(4,5,'2022-03-09 10:17:31.782','2022-03-09 10:16:05.782');
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var dbm;
|
|
4
|
+
var type;
|
|
5
|
+
var seed;
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var Promise;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We receive the dbmigrate dependency from dbmigrate initially.
|
|
12
|
+
* This enables us to not have to rely on NODE_PATH.
|
|
13
|
+
*/
|
|
14
|
+
exports.setup = function(options, seedLink) {
|
|
15
|
+
dbm = options.dbmigrate;
|
|
16
|
+
type = dbm.dataType;
|
|
17
|
+
seed = seedLink;
|
|
18
|
+
Promise = options.Promise;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.up = function(db) {
|
|
22
|
+
var filePath = path.join(__dirname, 'sqls', '20220223135414-playgrounds-to-postgres-up.sql');
|
|
23
|
+
return new Promise( function( resolve, reject ) {
|
|
24
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
25
|
+
if (err) return reject(err);
|
|
26
|
+
console.log('received data: ' + data);
|
|
27
|
+
|
|
28
|
+
resolve(data);
|
|
29
|
+
});
|
|
30
|
+
})
|
|
31
|
+
.then(function(data) {
|
|
32
|
+
return db.runSql(data);
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.down = function(db) {
|
|
37
|
+
var filePath = path.join(__dirname, 'sqls', '20220223135414-playgrounds-to-postgres-down.sql');
|
|
38
|
+
return new Promise( function( resolve, reject ) {
|
|
39
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
40
|
+
if (err) return reject(err);
|
|
41
|
+
console.log('received data: ' + data);
|
|
42
|
+
|
|
43
|
+
resolve(data);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.then(function(data) {
|
|
47
|
+
return db.runSql(data);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports._meta = {
|
|
52
|
+
"version": 1
|
|
53
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
-- playgrounds.properties definition
|
|
2
|
+
|
|
3
|
+
CREATE TABLE properties (
|
|
4
|
+
"id" int4 NOT NULL,
|
|
5
|
+
"description" text NULL,
|
|
6
|
+
"updated_at" timestamptz NOT NULL,
|
|
7
|
+
"created_at" timestamptz NOT NULL,
|
|
8
|
+
CONSTRAINT properties_pk PRIMARY KEY ("id")
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
-- playgrounds.playground definition
|
|
12
|
+
|
|
13
|
+
CREATE TABLE playground (
|
|
14
|
+
"internal_id" serial4 NOT NULL,
|
|
15
|
+
"location" geometry NULL,
|
|
16
|
+
"content" text NOT NULL,
|
|
17
|
+
"external_id" int4 NOT NULL,
|
|
18
|
+
"name" text NOT NULL,
|
|
19
|
+
"perex" text NULL,
|
|
20
|
+
"updated_at" timestamptz NOT NULL,
|
|
21
|
+
"created_at" timestamptz NOT NULL,
|
|
22
|
+
"url" text NOT NULL,
|
|
23
|
+
"image_url" text NOT NULL,
|
|
24
|
+
"district" text NULL,
|
|
25
|
+
"address_region" varchar NULL,
|
|
26
|
+
"address_country" varchar NULL,
|
|
27
|
+
"address_formatted" text NULL,
|
|
28
|
+
"address_locality" varchar NULL,
|
|
29
|
+
"postal_code" varchar NULL,
|
|
30
|
+
"street_address" varchar NULL,
|
|
31
|
+
CONSTRAINT playground_pkey PRIMARY KEY ("internal_id"),
|
|
32
|
+
CONSTRAINT playground_un UNIQUE ("external_id")
|
|
33
|
+
);
|
|
34
|
+
CREATE INDEX idx_playground_geom ON playground USING gist ("location");
|
|
35
|
+
CREATE INDEX playground_district_idx ON playground USING btree ("district");
|
|
36
|
+
CREATE UNIQUE INDEX playground_external_id_idx ON playground USING btree ("external_id");
|
|
37
|
+
CREATE INDEX playground_updated_at_idx ON playground USING btree ("updated_at");
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
-- playgrounds.playground_properties definition
|
|
41
|
+
|
|
42
|
+
CREATE TABLE playground_properties (
|
|
43
|
+
"playground_id" int4 NOT NULL,
|
|
44
|
+
"properties_id" int4 NOT NULL,
|
|
45
|
+
"updated_at" timestamptz NOT NULL,
|
|
46
|
+
"created_at" timestamptz NOT NULL,
|
|
47
|
+
CONSTRAINT playground_fk FOREIGN KEY ("playground_id") REFERENCES playground("internal_id") ON DELETE CASCADE,
|
|
48
|
+
CONSTRAINT playground_properties_fk FOREIGN KEY ("playground_id") REFERENCES playground("internal_id") ON DELETE CASCADE,
|
|
49
|
+
CONSTRAINT properties_fk FOREIGN KEY ("properties_id") REFERENCES properties("id") ON DELETE CASCADE,
|
|
50
|
+
CONSTRAINT playground_properties_pk PRIMARY KEY ("playground_id", "properties_id")
|
|
51
|
+
);
|
|
52
|
+
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,9 +19,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.
|
|
22
|
+
exports.OutputGateway = exports.IntegrationEngine = void 0;
|
|
23
23
|
// Library exports
|
|
24
24
|
exports.IntegrationEngine = __importStar(require("./integration-engine/index"));
|
|
25
25
|
exports.OutputGateway = __importStar(require("./output-gateway/index"));
|
|
26
|
-
exports.SchemaDefinitions = __importStar(require("./schema-definitions/index"));
|
|
27
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkB;AAClB,gFAA+C;AAC/C,wEAA2C
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAkB;AAClB,gFAA+C;AAC/C,wEAA2C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PlaygroundsDataSource = void 0;
|
|
5
|
+
const SourceSchemaProvider_1 = require("../schema-definitions/json-schema/SourceSchemaProvider");
|
|
6
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
7
|
+
const config_1 = require("@golemio/core/dist/integration-engine/config");
|
|
8
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
9
|
+
class PlaygroundsDataSource {
|
|
10
|
+
}
|
|
11
|
+
exports.PlaygroundsDataSource = PlaygroundsDataSource;
|
|
12
|
+
_a = PlaygroundsDataSource;
|
|
13
|
+
PlaygroundsDataSource.dataSourceName = "PlaygroundsDataSource";
|
|
14
|
+
PlaygroundsDataSource.get = () => {
|
|
15
|
+
return new integration_engine_1.DataSource(_a.dataSourceName, new integration_engine_1.HTTPProtocolStrategy({
|
|
16
|
+
headers: {},
|
|
17
|
+
method: "GET",
|
|
18
|
+
url: config_1.config.datasources.Playgrounds,
|
|
19
|
+
}), new integration_engine_1.JSONDataTypeStrategy({ resultsPath: "items" }), new golemio_validator_1.JSONSchemaValidator(_a.dataSourceName + "Validator", SourceSchemaProvider_1.SourceSchemaProvider.playground, true));
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=PlaygroundsDataSource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlaygroundsDataSource.js","sourceRoot":"","sources":["../../src/integration-engine/PlaygroundsDataSource.ts"],"names":[],"mappings":";;;;AAAA,iGAA6E;AAC7E,8EAA+G;AAC/G,yEAAsE;AACtE,mFAAkF;AAElF,MAAa,qBAAqB;;AAAlC,sDAeC;;AAdkB,oCAAc,GAAG,uBAAwB,CAAA;AAE1C,yBAAG,GAAG,GAAe,EAAE;IACjC,OAAO,IAAI,+BAAU,CACjB,EAAI,CAAC,cAAc,EACnB,IAAI,yCAAoB,CAAC;QACrB,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,KAAK;QACb,GAAG,EAAE,eAAM,CAAC,WAAW,CAAC,WAAW;KACtC,CAAC,EACF,IAAI,yCAAoB,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAClD,IAAI,uCAAmB,CAAC,EAAI,CAAC,cAAc,GAAG,WAAW,EAAE,2CAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CACpG,CAAC;AACN,CAAE,CAAA"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import { ISourcePlayground } from "../schema-definitions/json-schema/interfaces/ISourcePlayground";
|
|
2
|
+
import { IPlayground } from "../schema-definitions/sequelize-models/interfaces/IPlayground";
|
|
3
|
+
import { IProperty } from "../schema-definitions/sequelize-models/interfaces/IProperty";
|
|
1
4
|
import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
|
|
2
5
|
export declare class PlaygroundsTransformation extends BaseTransformation implements ITransformation {
|
|
3
6
|
name: string;
|
|
4
7
|
constructor();
|
|
5
|
-
protected transformElement: (element:
|
|
8
|
+
protected transformElement: (element: ISourcePlayground) => Promise<IPlayground>;
|
|
9
|
+
private removeIdentifier;
|
|
10
|
+
static getUniqueProperties: (playgroundsTransformedData: IPlayground[]) => IProperty[];
|
|
6
11
|
}
|
|
@@ -10,41 +10,49 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PlaygroundsTransformation = void 0;
|
|
13
|
+
const PlaygroundsInfo_1 = require("../schema-definitions/PlaygroundsInfo");
|
|
13
14
|
const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
|
|
14
|
-
const index_1 = require("../schema-definitions/index");
|
|
15
15
|
class PlaygroundsTransformation extends transformations_1.BaseTransformation {
|
|
16
16
|
constructor() {
|
|
17
17
|
super();
|
|
18
18
|
this.transformElement = (element) => __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
name: element.title.replace(/\d{1,2}\.(\D){0,1} /g, ""),
|
|
28
|
-
perex: element.perex ? element.perex : null,
|
|
29
|
-
properties: [],
|
|
30
|
-
updated_at: new Date().getTime(),
|
|
31
|
-
url: element.url,
|
|
32
|
-
},
|
|
33
|
-
type: "Feature",
|
|
19
|
+
const playground = {
|
|
20
|
+
location: element.geometry,
|
|
21
|
+
image_url: element.image && element.image.originalUrl ? element.image.originalUrl : null,
|
|
22
|
+
content: element.content,
|
|
23
|
+
external_id: element.itemId,
|
|
24
|
+
name: this.removeIdentifier(element.title),
|
|
25
|
+
perex: element.perex ? element.perex : "",
|
|
26
|
+
url: element.url,
|
|
34
27
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
res.properties.properties = yield Promise.all(properties);
|
|
43
|
-
}
|
|
44
|
-
return res;
|
|
28
|
+
playground.properties = element.category.map((element) => {
|
|
29
|
+
return {
|
|
30
|
+
id: element.id,
|
|
31
|
+
description: element.nazev,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
return playground;
|
|
45
35
|
});
|
|
46
|
-
this.name =
|
|
36
|
+
this.name = PlaygroundsInfo_1.PlaygroundsInfo.moduleName;
|
|
37
|
+
}
|
|
38
|
+
removeIdentifier(title) {
|
|
39
|
+
return title.replace(/\d{1,2}\.(\D){0,1} /g, "");
|
|
47
40
|
}
|
|
48
41
|
}
|
|
49
42
|
exports.PlaygroundsTransformation = PlaygroundsTransformation;
|
|
43
|
+
PlaygroundsTransformation.getUniqueProperties = (playgroundsTransformedData) => {
|
|
44
|
+
const result = [];
|
|
45
|
+
for (let index = 0; index < playgroundsTransformedData.length; index++) {
|
|
46
|
+
const element = playgroundsTransformedData[index];
|
|
47
|
+
if (element.properties) {
|
|
48
|
+
for (let index = 0; index < element.properties.length; index++) {
|
|
49
|
+
const property = element.properties[index];
|
|
50
|
+
if (result.every((element) => element.id != property.id)) {
|
|
51
|
+
result.push(property);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return result;
|
|
57
|
+
};
|
|
50
58
|
//# sourceMappingURL=PlaygroundsTransformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaygroundsTransformation.js","sourceRoot":"","sources":["../../src/integration-engine/PlaygroundsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PlaygroundsTransformation.js","sourceRoot":"","sources":["../../src/integration-engine/PlaygroundsTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2EAAuD;AAGvD,2FAA4G;AAE5G,MAAa,yBAA0B,SAAQ,oCAAkB;IAG7D;QACI,KAAK,EAAE,CAAC;QAIF,qBAAgB,GAAG,CAAO,OAA0B,EAAwB,EAAE;YACpF,MAAM,UA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,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBAC5D,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;gBAC3C,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,QAAQ,CAAC,EAAE,CAAC,EAAE;oBACtD,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;iBACzB;aACJ;SACJ;KACJ;IAED,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Playground } from "../schema-definitions/sequelize-models/Playground";
|
|
1
2
|
import { BaseWorker } from "@golemio/core/dist/integration-engine/workers";
|
|
2
3
|
export declare class PlaygroundsWorker extends BaseWorker {
|
|
3
4
|
private dataSource;
|
|
@@ -7,5 +8,10 @@ export declare class PlaygroundsWorker extends BaseWorker {
|
|
|
7
8
|
private cityDistrictsModel;
|
|
8
9
|
constructor();
|
|
9
10
|
refreshDataInDB: (msg: any) => Promise<void>;
|
|
10
|
-
updateAddressAndDistrict: (msg: any) => Promise<
|
|
11
|
+
updateAddressAndDistrict: (msg: any) => Promise<Playground>;
|
|
12
|
+
private savePlaygroundsData;
|
|
13
|
+
private validateAndSavePlaygrounds;
|
|
14
|
+
private validateAndSaveProperties;
|
|
15
|
+
private getTransformedDataWithId;
|
|
16
|
+
private getPlaygroundPropertyRelationData;
|
|
11
17
|
}
|
|
@@ -10,103 +10,136 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.PlaygroundsWorker = void 0;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const PlaygroundsInfo_1 = require("../schema-definitions/PlaygroundsInfo");
|
|
14
|
+
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
15
15
|
const config_1 = require("@golemio/core/dist/integration-engine/config");
|
|
16
|
-
const datasources_1 = require("@golemio/core/dist/integration-engine/datasources");
|
|
17
|
-
const helpers_1 = require("@golemio/core/dist/integration-engine/helpers");
|
|
18
|
-
const models_1 = require("@golemio/core/dist/integration-engine/models");
|
|
19
16
|
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
20
|
-
const
|
|
21
|
-
const index_1 = require("../schema-definitions/index");
|
|
17
|
+
const errors_1 = require("@golemio/errors");
|
|
22
18
|
const _1 = require("./");
|
|
19
|
+
const AddressHelper_1 = require("./helpers/AddressHelper");
|
|
20
|
+
const CityDistrictsModel_1 = require("./models/CityDistrictsModel");
|
|
21
|
+
const PlaygroundsModel_1 = require("./models/PlaygroundsModel");
|
|
22
|
+
const PlaygroundsDataSource_1 = require("./PlaygroundsDataSource");
|
|
23
23
|
class PlaygroundsWorker extends workers_1.BaseWorker {
|
|
24
24
|
constructor() {
|
|
25
25
|
super();
|
|
26
26
|
this.refreshDataInDB = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
try {
|
|
28
|
+
const playgroundIdsForLocationSync = yield this.savePlaygroundsData();
|
|
29
|
+
// send messages for updating district and address and average occupancy
|
|
30
|
+
const promises = playgroundIdsForLocationSync.map((external_id) => {
|
|
31
|
+
this.sendMessageToExchange("workers." + this.queuePrefix + ".updateAddressAndDistrict", JSON.stringify({ external_id: external_id }));
|
|
32
|
+
});
|
|
33
|
+
yield Promise.all(promises);
|
|
34
|
+
}
|
|
35
|
+
catch (exception) {
|
|
36
|
+
throw exception instanceof errors_1.CustomError
|
|
37
|
+
? exception
|
|
38
|
+
: new errors_1.CustomError("Error while refreshing playgrounds data", true, this.constructor.name, undefined, exception);
|
|
39
|
+
}
|
|
35
40
|
});
|
|
36
41
|
this.updateAddressAndDistrict = (msg) => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
42
|
+
const playground = JSON.parse(msg.content.toString());
|
|
43
|
+
if (playground.external_id) {
|
|
44
|
+
const dbData = (yield this.model.findOne({
|
|
45
|
+
where: { external_id: playground.external_id },
|
|
46
|
+
}));
|
|
47
|
+
yield AddressHelper_1.AddressHelper.updateDistrict(dbData, this.cityDistrictsModel);
|
|
48
|
+
yield AddressHelper_1.AddressHelper.updateAddress(dbData);
|
|
49
|
+
return dbData;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
throw new errors_1.CustomError("Unknown type of message for playground address and district type", true, this.constructor.name);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
this.getTransformedDataWithId = () => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const data = yield this.dataSource.getAll();
|
|
57
|
+
const transformedData = yield this.transformation.transform(data);
|
|
58
|
+
const dataIdsWithNewLocation = [];
|
|
59
|
+
for (let index = 0; index < transformedData.length; index++) {
|
|
60
|
+
const playground = transformedData[index];
|
|
61
|
+
const dbPlayground = yield this.model.getPlayground(playground.external_id);
|
|
62
|
+
// get internal ids for already existing data
|
|
63
|
+
if (dbPlayground) {
|
|
64
|
+
playground.internal_id = dbPlayground.internal_id;
|
|
65
|
+
if (AddressHelper_1.AddressHelper.needsUpdate(playground, dbPlayground)) {
|
|
66
|
+
dataIdsWithNewLocation.push(playground.external_id);
|
|
67
|
+
}
|
|
57
68
|
}
|
|
58
|
-
|
|
59
|
-
|
|
69
|
+
else {
|
|
70
|
+
// new playground
|
|
71
|
+
dataIdsWithNewLocation.push(playground.external_id);
|
|
60
72
|
}
|
|
61
73
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
return { transformedData: transformedData, playgroundIdsForLocationSync: dataIdsWithNewLocation };
|
|
75
|
+
});
|
|
76
|
+
this.getPlaygroundPropertyRelationData = (playgroundsTransformedData, t) => __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
var _a;
|
|
78
|
+
const result = [];
|
|
79
|
+
for (let index = 0; index < playgroundsTransformedData.length; index++) {
|
|
80
|
+
const element = playgroundsTransformedData[index];
|
|
81
|
+
const internalId = (_a = element.internal_id) !== null && _a !== void 0 ? _a : (yield this.model.getPlaygroundId(element.external_id, t));
|
|
82
|
+
if (element.properties) {
|
|
83
|
+
for (let index = 0; index < element.properties.length; index++) {
|
|
84
|
+
const property = element.properties[index];
|
|
85
|
+
if (internalId) {
|
|
86
|
+
result.push({
|
|
87
|
+
playground_id: internalId,
|
|
88
|
+
properties_id: property.id,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
73
92
|
}
|
|
74
93
|
}
|
|
75
|
-
return
|
|
94
|
+
return result;
|
|
76
95
|
});
|
|
77
|
-
this.dataSource =
|
|
78
|
-
|
|
79
|
-
method: "GET",
|
|
80
|
-
url: config_1.config.datasources.Playgrounds,
|
|
81
|
-
}), new datasources_1.JSONDataTypeStrategy({ resultsPath: "items" }), new golemio_validator_1.Validator(index_1.Playgrounds.name + "DataSource", index_1.Playgrounds.datasourceMongooseSchemaObject));
|
|
82
|
-
this.model = new models_1.MongoModel(index_1.Playgrounds.name + "Model", {
|
|
83
|
-
identifierPath: "properties.id",
|
|
84
|
-
mongoCollectionName: index_1.Playgrounds.mongoCollectionName,
|
|
85
|
-
outputMongooseSchemaObject: index_1.Playgrounds.outputMongooseSchemaObject,
|
|
86
|
-
resultsPath: "properties",
|
|
87
|
-
savingType: "insertOrUpdate",
|
|
88
|
-
searchPath: (id, multiple) => (multiple ? { "properties.id": { $in: id } } : { "properties.id": id }),
|
|
89
|
-
updateValues: (a, b) => {
|
|
90
|
-
a.properties.name = b.properties.name;
|
|
91
|
-
a.properties.url = b.properties.url;
|
|
92
|
-
a.properties.perex = b.properties.perex;
|
|
93
|
-
a.properties.content = b.properties.content;
|
|
94
|
-
a.properties.image = b.properties.image;
|
|
95
|
-
a.properties.properties = b.properties.properties;
|
|
96
|
-
a.properties.updated_at = b.properties.updated_at;
|
|
97
|
-
return a;
|
|
98
|
-
},
|
|
99
|
-
}, new golemio_validator_1.Validator(index_1.Playgrounds.name + "ModelValidator", index_1.Playgrounds.outputMongooseSchemaObject));
|
|
96
|
+
this.dataSource = PlaygroundsDataSource_1.PlaygroundsDataSource.get();
|
|
97
|
+
this.model = new PlaygroundsModel_1.PlaygroundsModel();
|
|
100
98
|
this.transformation = new _1.PlaygroundsTransformation();
|
|
101
|
-
this.queuePrefix = config_1.config.RABBIT_EXCHANGE_NAME + "." +
|
|
102
|
-
this.cityDistrictsModel = new
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
this.queuePrefix = config_1.config.RABBIT_EXCHANGE_NAME + "." + PlaygroundsInfo_1.PlaygroundsInfo.moduleName.toLowerCase();
|
|
100
|
+
this.cityDistrictsModel = new CityDistrictsModel_1.CityDistrictsModel();
|
|
101
|
+
}
|
|
102
|
+
savePlaygroundsData() {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const connection = integration_engine_1.PostgresConnector.getConnection();
|
|
105
|
+
const t = yield connection.transaction();
|
|
106
|
+
try {
|
|
107
|
+
const result = yield this.getTransformedDataWithId();
|
|
108
|
+
yield this.validateAndSavePlaygrounds(result.transformedData, t);
|
|
109
|
+
yield this.validateAndSaveProperties(result.transformedData, t);
|
|
110
|
+
yield t.commit();
|
|
111
|
+
return result.playgroundIdsForLocationSync;
|
|
112
|
+
}
|
|
113
|
+
catch (err) {
|
|
114
|
+
yield t.rollback();
|
|
115
|
+
throw err;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
validateAndSavePlaygrounds(transformedData, t) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
this.model.validate(transformedData);
|
|
122
|
+
const promises = transformedData.map((playground) => __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
yield this.model["sequelizeModel"].upsert(Object.assign({}, playground), { transaction: t });
|
|
124
|
+
}));
|
|
125
|
+
yield Promise.all(promises);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
validateAndSaveProperties(transformedData, t) {
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const propertiesData = _1.PlaygroundsTransformation.getUniqueProperties(transformedData);
|
|
131
|
+
const propertiesRelationData = yield this.getPlaygroundPropertyRelationData(transformedData, t);
|
|
132
|
+
this.model.propertiesModel.validate(propertiesData);
|
|
133
|
+
this.model.playgroundPropertyModel.validate(propertiesRelationData);
|
|
134
|
+
const promises = propertiesData.map((property) => __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
yield this.model.propertiesModel["sequelizeModel"].upsert(Object.assign({}, property), { transaction: t });
|
|
136
|
+
}));
|
|
137
|
+
yield Promise.all(promises);
|
|
138
|
+
const promises2 = propertiesRelationData.map((playgroundProperty) => __awaiter(this, void 0, void 0, function* () {
|
|
139
|
+
yield this.model.playgroundPropertyModel["sequelizeModel"].upsert(Object.assign({}, playgroundProperty), { transaction: t });
|
|
140
|
+
}));
|
|
141
|
+
yield Promise.all(promises2);
|
|
142
|
+
});
|
|
110
143
|
}
|
|
111
144
|
}
|
|
112
145
|
exports.PlaygroundsWorker = PlaygroundsWorker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaygroundsWorker.js","sourceRoot":"","sources":["../../src/integration-engine/PlaygroundsWorker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"PlaygroundsWorker.js","sourceRoot":"","sources":["../../src/integration-engine/PlaygroundsWorker.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAuD;AAIvD,8EAA0E;AAC1E,yEAAsE;AAGtE,2EAA2E;AAE3E,4CAA8C;AAC9C,yBAA+C;AAC/C,2DAAwD;AACxD,oEAAiE;AACjE,gEAA6D;AAC7D,mEAAgE;AAEhE,MAAa,iBAAkB,SAAQ,oBAAU;IAO7C;QACI,KAAK,EAAE,CAAC;QAQL,oBAAe,GAAG,CAAO,GAAQ,EAAiB,EAAE;YACvD,IAAI;gBACA,MAAM,4BAA4B,GAAG,MAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAEtE,wEAAwE;gBACxE,MAAM,QAAQ,GAAG,4BAA4B,CAAC,GAAG,CAAC,CAAC,WAAmB,EAAE,EAAE;oBACtE,IAAI,CAAC,qBAAqB,CACtB,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,2BAA2B,EAC3D,IAAI,CAAC,SAAS,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC,CAC/C,CAAC;gBACN,CAAC,CAAC,CAAC;gBAEH,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;aAC/B;YAAC,OAAO,SAAS,EAAE;gBAChB,MAAM,SAAS,YAAY,oBAAW;oBAClC,CAAC,CAAC,SAAS;oBACX,CAAC,CAAC,IAAI,oBAAW,CAAC,yCAAyC,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;aACvH;QACL,CAAC,CAAA,CAAC;QAEK,6BAAwB,GAAG,CAAO,GAAQ,EAAuB,EAAE;YACtE,MAAM,UAAU,GA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