@golemio/pid 5.9.2-dev.2471016942 → 5.9.2-dev.2487723561
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/migrations/postgresql/20260428091015-jis-infotexts-presets.js +49 -0
- package/db/migrations/postgresql/sqls/20260428091015-jis-infotexts-presets-down.sql +2 -0
- package/db/migrations/postgresql/sqls/20260428091015-jis-infotexts-presets-up.sql +8 -0
- package/dist/integration-engine/jis/ioc/Di.js +2 -0
- package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
- package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +1 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.js +1 -0
- package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.d.ts +32 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.js +89 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsPresetsRepository.js.map +1 -0
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +3 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +15 -2
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.d.ts +6 -15
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +12 -20
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISInfotextsDataService.d.ts +7 -8
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +17 -12
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.d.ts +2 -1
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +5 -0
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +8 -4
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js +12 -0
- package/dist/schema-definitions/jis/datasources/JISInfotextsJsonSchema.js.map +1 -1
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotext.d.ts +2 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.d.ts +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.js +3 -0
- package/dist/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.js.map +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/index.d.ts +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/index.js +1 -0
- package/dist/schema-definitions/jis/datasources/interfaces/index.js.map +1 -1
- package/dist/schema-definitions/jis/models/JISInfotextsModel.d.ts +2 -0
- package/dist/schema-definitions/jis/models/JISInfotextsModel.js.map +1 -1
- package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.d.ts +12 -0
- package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.js +41 -0
- package/dist/schema-definitions/jis/models/JISInfotextsPresetsModel.js.map +1 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.d.ts +4 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.js +3 -0
- package/dist/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.js.map +1 -0
- package/dist/schema-definitions/jis/models/interfaces/index.d.ts +1 -0
- package/dist/schema-definitions/jis/models/interfaces/index.js +1 -0
- package/dist/schema-definitions/jis/models/interfaces/index.js.map +1 -1
- package/docs/asyncapi.yaml +16 -5
- package/docs/openapi-input.yaml +14 -3
- package/package.json +2 -2
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
exports.setup = function(options, seedLink) {
|
|
11
|
+
dbm = options.dbmigrate;
|
|
12
|
+
type = dbm.dataType;
|
|
13
|
+
seed = seedLink;
|
|
14
|
+
Promise = options.Promise;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.up = function(db) {
|
|
18
|
+
var filePath = path.join(__dirname, 'sqls', '20260428091015-jis-infotexts-presets-up.sql');
|
|
19
|
+
return new Promise( function( resolve, reject ) {
|
|
20
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
21
|
+
if (err) return reject(err);
|
|
22
|
+
console.log('received data: ' + data);
|
|
23
|
+
|
|
24
|
+
resolve(data);
|
|
25
|
+
});
|
|
26
|
+
})
|
|
27
|
+
.then(function(data) {
|
|
28
|
+
return db.runSql(data);
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.down = function(db) {
|
|
33
|
+
var filePath = path.join(__dirname, 'sqls', '20260428091015-jis-infotexts-presets-down.sql');
|
|
34
|
+
return new Promise( function( resolve, reject ) {
|
|
35
|
+
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
|
36
|
+
if (err) return reject(err);
|
|
37
|
+
console.log('received data: ' + data);
|
|
38
|
+
|
|
39
|
+
resolve(data);
|
|
40
|
+
});
|
|
41
|
+
})
|
|
42
|
+
.then(function(data) {
|
|
43
|
+
return db.runSql(data);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
exports._meta = {
|
|
48
|
+
"version": 1
|
|
49
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
create table jis_infotexts_presets (
|
|
2
|
+
infotext_id uuid not null,
|
|
3
|
+
route_name varchar(100) not null,
|
|
4
|
+
created_at timestamptz not null,
|
|
5
|
+
updated_at timestamptz not null,
|
|
6
|
+
constraint jis_infotexts_presets_pk primary key (infotext_id, route_name)
|
|
7
|
+
);
|
|
8
|
+
create index jis_infotexts_presets_route_name_idx on jis_infotexts_presets (route_name);
|
|
@@ -8,6 +8,7 @@ const JISInfotextsDataSourceFactory_1 = require("../datasources/JISInfotextsData
|
|
|
8
8
|
const JISEventsRepository_1 = require("../repositories/JISEventsRepository");
|
|
9
9
|
const JISEventsRopidGTFSRoutesRepository_1 = require("../repositories/JISEventsRopidGTFSRoutesRepository");
|
|
10
10
|
const JISInfotextsRedisRepository_1 = require("../repositories/JISInfotextsRedisRepository");
|
|
11
|
+
const JISInfotextsPresetsRepository_1 = require("../repositories/JISInfotextsPresetsRepository");
|
|
11
12
|
const JISInfotextsRepository_1 = require("../repositories/JISInfotextsRepository");
|
|
12
13
|
const JISInfotextsRopidGTFSStopsRepository_1 = require("../repositories/JISInfotextsRopidGTFSStopsRepository");
|
|
13
14
|
const JISMetadataRepository_1 = require("../repositories/JISMetadataRepository");
|
|
@@ -42,6 +43,7 @@ JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsRe
|
|
|
42
43
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISEventsRopidGTFSRoutesRepository, JISEventsRopidGTFSRoutesRepository_1.JISEventsRopidGTFSRoutesRepository);
|
|
43
44
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsRepository, JISInfotextsRepository_1.JISInfotextsRepository);
|
|
44
45
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsRopidGTFSStopsRepository, JISInfotextsRopidGTFSStopsRepository_1.JISInfotextsRopidGTFSStopsRepository);
|
|
46
|
+
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISInfotextsPresetsRepository, JISInfotextsPresetsRepository_1.JISInfotextsPresetsRepository);
|
|
45
47
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.JISMetadataRepository, JISMetadataRepository_1.JISMetadataRepository);
|
|
46
48
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.RopidGTFSStopsRepository, RopidGTFSStopsModel_1.RopidGTFSStopsModel);
|
|
47
49
|
JISContainer.registerSingleton(JISContainerToken_1.JISContainerToken.RopidGTFSRoutesRepository, RopidGTFSRoutesRepository_1.RopidGTFSRoutesRepository);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,8EAAyE;AAEzE,0FAAuF;AACvF,gGAA6F;AAC7F,6EAA0E;AAC1E,2GAAwG;AACxG,6FAA0F;AAC1F,mFAAgF;AAChF,+GAA4G;AAC5G,iFAA8E;AAC9E,2EAAwE;AACxE,iFAA8E;AAC9E,oGAAiG;AACjG,wFAAqF;AACrF,oGAAiG;AACjG,8FAA2F;AAC3F,0GAAuG;AACvG,4EAAyE;AACzE,kFAA+E;AAC/E,gFAA6E;AAC7E,gGAA6F;AAC7F,sFAAmF;AACnF,oFAAiF;AACjF,2DAAwD;AACxD,sGAAiG;AAEjG,wBAAwB;AACxB,MAAM,YAAY,GAAwB,iBAAY,CAAC,oBAAoB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,8EAAyE;AAEzE,0FAAuF;AACvF,gGAA6F;AAC7F,6EAA0E;AAC1E,2GAAwG;AACxG,6FAA0F;AAC1F,iGAA8F;AAC9F,mFAAgF;AAChF,+GAA4G;AAC5G,iFAA8E;AAC9E,2EAAwE;AACxE,iFAA8E;AAC9E,oGAAiG;AACjG,wFAAqF;AACrF,oGAAiG;AACjG,8FAA2F;AAC3F,0GAAuG;AACvG,4EAAyE;AACzE,kFAA+E;AAC/E,gFAA6E;AAC7E,gGAA6F;AAC7F,sFAAmF;AACnF,oFAAiF;AACjF,2DAAwD;AACxD,sG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qCAAiB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AAC1F,YAAY;AAEZ,eAAe;AACf,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,kBAAkB,EAAE,uCAAkB,CAAC,CAAC;AACzF,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,qBAAqB,EAAE,6CAAqB,CAAC,CAAC;AAC/F,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,oBAAoB,EAAE,2CAAoB,CAAC,CAAC;AAC7F,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AACnG,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,4BAA4B,EAAE,2DAA4B,CAAC,CAAC;AAC7G,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,sBAAsB,EAAE,+CAAsB,CAAC,CAAC;AACjG,YAAY;AAEZ,yBAAyB;AACzB,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AACnG,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AAC/G,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AACzG,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AAC/G,YAAY,CAAC,iBAAiB,CAAC,qCAAiB,CAAC,gCAAgC,EAAE,mEAAgC,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ declare const JISContainerToken: {
|
|
|
6
6
|
JISEventsRopidGTFSRoutesRepository: symbol;
|
|
7
7
|
JISInfotextsRepository: symbol;
|
|
8
8
|
JISInfotextsRopidGTFSStopsRepository: symbol;
|
|
9
|
+
JISInfotextsPresetsRepository: symbol;
|
|
9
10
|
JISMetadataRepository: symbol;
|
|
10
11
|
RopidGTFSStopsRepository: symbol;
|
|
11
12
|
RopidGTFSRoutesRepository: symbol;
|
|
@@ -12,6 +12,7 @@ const JISContainerToken = {
|
|
|
12
12
|
JISEventsRopidGTFSRoutesRepository: Symbol("JISEventsRopidGTFSRoutesRepository"),
|
|
13
13
|
JISInfotextsRepository: Symbol("JISInfotextsRepository"),
|
|
14
14
|
JISInfotextsRopidGTFSStopsRepository: Symbol("JISInfotextsRopidGTFSStopsRepository"),
|
|
15
|
+
JISInfotextsPresetsRepository: Symbol("JISInfotextsPresetsRepository"),
|
|
15
16
|
JISMetadataRepository: Symbol("JISMetadataRepository"),
|
|
16
17
|
RopidGTFSStopsRepository: Symbol("RopidGTFSStopsRepository"),
|
|
17
18
|
RopidGTFSRoutesRepository: Symbol("RopidGTFSRoutesRepository"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/JISContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG;IACtB,kBAAkB;IAClB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,wBAAwB;IACxB,2BAA2B,EAAE,MAAM,CAAC,6BAA6B,CAAC;IAClE,kBAAkB;IAClB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,kCAAkC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAChF,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;IACxD,oCAAoC,EAAE,MAAM,CAAC,sCAAsC,CAAC;IACpF,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC;IAC9D,cAAc;IACd,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,qBAAqB;IACrB,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,WAAW;IACX,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;CAC3D,CAAC;AAEO,8CAAiB"}
|
|
1
|
+
{"version":3,"file":"JISContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/ioc/JISContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,iBAAiB,GAAG;IACtB,kBAAkB;IAClB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,wBAAwB;IACxB,2BAA2B,EAAE,MAAM,CAAC,6BAA6B,CAAC;IAClE,kBAAkB;IAClB,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,kCAAkC,EAAE,MAAM,CAAC,oCAAoC,CAAC;IAChF,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;IACxD,oCAAoC,EAAE,MAAM,CAAC,sCAAsC,CAAC;IACpF,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC;IAC9D,cAAc;IACd,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,qBAAqB;IACrB,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,gCAAgC,EAAE,MAAM,CAAC,kCAAkC,CAAC;IAC5E,WAAW;IACX,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IAChD,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,sBAAsB,EAAE,MAAM,CAAC,wBAAwB,CAAC;CAC3D,CAAC;AAEO,8CAAiB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { JISInfotextsPresetsModel } from "../../../schema-definitions/jis/models/JISInfotextsPresetsModel";
|
|
2
|
+
import { IJISInfotextsPresets } from "../../../schema-definitions/jis/models/interfaces";
|
|
3
|
+
import { ILogger } from "@golemio/core/dist/helpers";
|
|
4
|
+
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
5
|
+
import { AbstractValidatableRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository";
|
|
6
|
+
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
7
|
+
import { ModelStatic, Transaction } from "@golemio/core/dist/shared/sequelize";
|
|
8
|
+
type RepositoryOptions = {
|
|
9
|
+
transaction?: Transaction;
|
|
10
|
+
};
|
|
11
|
+
export declare class JISInfotextsPresetsRepository extends AbstractValidatableRepository {
|
|
12
|
+
validator: JSONSchemaValidator;
|
|
13
|
+
schema: string;
|
|
14
|
+
tableName: string;
|
|
15
|
+
private sequelizeModel;
|
|
16
|
+
constructor(connector: IDatabaseConnector, logger: ILogger);
|
|
17
|
+
/**
|
|
18
|
+
* Inserts new rows or updates existing ones. On conflict, all columns except `created_at` are overwritten —
|
|
19
|
+
* `created_at` is intentionally preserved to track when a row was first seen, while `updated_at` advances
|
|
20
|
+
* each cycle so stale-record cleanup can identify entries missing from the latest feed.
|
|
21
|
+
*/
|
|
22
|
+
upsertAll(data: IJISInfotextsPresets[], options?: RepositoryOptions): ReturnType<ModelStatic<JISInfotextsPresetsModel>["bulkCreate"]>;
|
|
23
|
+
/**
|
|
24
|
+
* Removes rows that were not touched during the current refresh cycle — any row whose `updated_at`
|
|
25
|
+
* predates `dateTime` was absent from the latest feed and is considered stale.
|
|
26
|
+
* Call this after `upsertAll` with the timestamp captured at the start of the save to clean up vanished entries.
|
|
27
|
+
*/
|
|
28
|
+
deleteAllLastUpdatedBefore(dateTime: Date, options?: RepositoryOptions): Promise<number>;
|
|
29
|
+
deleteAll(options?: RepositoryOptions): Promise<number>;
|
|
30
|
+
private getUpdateAttributes;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.JISInfotextsPresetsRepository = void 0;
|
|
16
|
+
const const_1 = require("../../../schema-definitions/const");
|
|
17
|
+
const JISInfotextsPresetsModel_1 = require("../../../schema-definitions/jis/models/JISInfotextsPresetsModel");
|
|
18
|
+
const AbstractValidatableRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository");
|
|
19
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
|
+
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
21
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
22
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
23
|
+
const RepositoryUtils_1 = require("../../shared/RepositoryUtils");
|
|
24
|
+
let JISInfotextsPresetsRepository = class JISInfotextsPresetsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
25
|
+
constructor(connector, logger) {
|
|
26
|
+
super(connector, logger);
|
|
27
|
+
this.schema = const_1.PG_SCHEMA;
|
|
28
|
+
this.tableName = JISInfotextsPresetsModel_1.JISInfotextsPresetsModel.tableName;
|
|
29
|
+
this.validator = new golemio_validator_1.JSONSchemaValidator("JISInfotextsPresetsRepository", JISInfotextsPresetsModel_1.JISInfotextsPresetsModel.jsonSchema);
|
|
30
|
+
this.sequelizeModel = connector
|
|
31
|
+
.getConnection()
|
|
32
|
+
.define(this.tableName, JISInfotextsPresetsModel_1.JISInfotextsPresetsModel.attributeModel, { schema: this.schema });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Inserts new rows or updates existing ones. On conflict, all columns except `created_at` are overwritten —
|
|
36
|
+
* `created_at` is intentionally preserved to track when a row was first seen, while `updated_at` advances
|
|
37
|
+
* each cycle so stale-record cleanup can identify entries missing from the latest feed.
|
|
38
|
+
*/
|
|
39
|
+
async upsertAll(data, options) {
|
|
40
|
+
try {
|
|
41
|
+
return await this.sequelizeModel.bulkCreate(data, {
|
|
42
|
+
updateOnDuplicate: this.getUpdateAttributes(),
|
|
43
|
+
transaction: options?.transaction,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
throw RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "upsertAll");
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Removes rows that were not touched during the current refresh cycle — any row whose `updated_at`
|
|
52
|
+
* predates `dateTime` was absent from the latest feed and is considered stale.
|
|
53
|
+
* Call this after `upsertAll` with the timestamp captured at the start of the save to clean up vanished entries.
|
|
54
|
+
*/
|
|
55
|
+
async deleteAllLastUpdatedBefore(dateTime, options) {
|
|
56
|
+
try {
|
|
57
|
+
return await this.sequelizeModel.destroy({
|
|
58
|
+
where: {
|
|
59
|
+
updated_at: { [sequelize_1.Op.lt]: dateTime },
|
|
60
|
+
},
|
|
61
|
+
transaction: options?.transaction,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
catch (err) {
|
|
65
|
+
throw RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "deleteAllLastUpdatedBefore");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async deleteAll(options) {
|
|
69
|
+
try {
|
|
70
|
+
return await this.sequelizeModel.destroy({ where: {}, transaction: options?.transaction });
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
throw RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "deleteAll");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// created_at is excluded so that re-upserting an existing row doesn't overwrite
|
|
77
|
+
// when it was first seen — only updated_at should advance on subsequent refreshes.
|
|
78
|
+
getUpdateAttributes() {
|
|
79
|
+
return Object.keys(JISInfotextsPresetsModel_1.JISInfotextsPresetsModel.attributeModel).filter((attribute) => attribute !== "created_at");
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
exports.JISInfotextsPresetsRepository = JISInfotextsPresetsRepository;
|
|
83
|
+
exports.JISInfotextsPresetsRepository = JISInfotextsPresetsRepository = __decorate([
|
|
84
|
+
(0, tsyringe_1.injectable)(),
|
|
85
|
+
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
86
|
+
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
87
|
+
__metadata("design:paramtypes", [Object, Object])
|
|
88
|
+
], JISInfotextsPresetsRepository);
|
|
89
|
+
//# sourceMappingURL=JISInfotextsPresetsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISInfotextsPresetsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsPresetsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,8GAAoF;AAIpF,8IAA2I;AAC3I,wEAAqE;AACrE,mFAAkF;AAClF,mEAAmF;AACnF,iEAAwE;AACxE,kEAA6D;AAOtD,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,6DAA6B;IAO5E,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QANtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,mDAAwB,CAAC,SAAS,CAAC;QAMlD,IAAI,CAAC,SAAS,GAAG,IAAI,u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OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/F,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,iCAAe,CAAC,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACrF,CAAC;IACL,CAAC;IAED,gFAAgF;IAChF,mFAAmF;IAC3E,mBAAmB;QACvB,OAAO,MAAM,CAAC,IAAI,CAAC,mDAAwB,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,YAAY,CAAC,CAAC;IAClH,CAAC;CACJ,CAAA;AAjEY,sEAA6B;wCAA7B,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAQI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GAPhG,6BAA6B,CAiEzC"}
|
|
@@ -6,6 +6,7 @@ import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postg
|
|
|
6
6
|
import { AbstractValidatableRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository";
|
|
7
7
|
import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
|
|
8
8
|
import { Transaction } from "@golemio/core/dist/shared/sequelize";
|
|
9
|
+
import { JISInfotextsPresetsRepository } from "./JISInfotextsPresetsRepository";
|
|
9
10
|
import { JISInfotextsRopidGTFSStopsRepository } from "./JISInfotextsRopidGTFSStopsRepository";
|
|
10
11
|
type RepositoryOptions = {
|
|
11
12
|
transaction?: Transaction;
|
|
@@ -13,12 +14,13 @@ type RepositoryOptions = {
|
|
|
13
14
|
export declare class JISInfotextsRepository extends AbstractValidatableRepository {
|
|
14
15
|
private logger;
|
|
15
16
|
private infotextStopRepository;
|
|
17
|
+
private infotextPresetsRepository;
|
|
16
18
|
private gtfsStopRepository;
|
|
17
19
|
validator: JSONSchemaValidator;
|
|
18
20
|
schema: string;
|
|
19
21
|
tableName: string;
|
|
20
22
|
private sequelizeModel;
|
|
21
|
-
constructor(connector: IDatabaseConnector, logger: ILogger, infotextStopRepository: JISInfotextsRopidGTFSStopsRepository, gtfsStopRepository: RopidGTFSStopsModel);
|
|
23
|
+
constructor(connector: IDatabaseConnector, logger: ILogger, infotextStopRepository: JISInfotextsRopidGTFSStopsRepository, infotextPresetsRepository: JISInfotextsPresetsRepository, gtfsStopRepository: RopidGTFSStopsModel);
|
|
22
24
|
/**
|
|
23
25
|
* Refresh all data from VYMI and delete old data
|
|
24
26
|
*
|
|
@@ -24,12 +24,14 @@ const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
|
24
24
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
25
25
|
const RepositoryUtils_1 = require("../../shared/RepositoryUtils");
|
|
26
26
|
const JISContainerToken_1 = require("../ioc/JISContainerToken");
|
|
27
|
+
const JISInfotextsPresetsRepository_1 = require("./JISInfotextsPresetsRepository");
|
|
27
28
|
const JISInfotextsRopidGTFSStopsRepository_1 = require("./JISInfotextsRopidGTFSStopsRepository");
|
|
28
29
|
let JISInfotextsRepository = class JISInfotextsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
29
|
-
constructor(connector, logger, infotextStopRepository, gtfsStopRepository) {
|
|
30
|
+
constructor(connector, logger, infotextStopRepository, infotextPresetsRepository, gtfsStopRepository) {
|
|
30
31
|
super(connector, logger);
|
|
31
32
|
this.logger = logger;
|
|
32
33
|
this.infotextStopRepository = infotextStopRepository;
|
|
34
|
+
this.infotextPresetsRepository = infotextPresetsRepository;
|
|
33
35
|
this.gtfsStopRepository = gtfsStopRepository;
|
|
34
36
|
this.schema = const_1.PG_SCHEMA;
|
|
35
37
|
this.tableName = JISInfotextsModel_1.JISInfotextsModel.tableName;
|
|
@@ -64,6 +66,15 @@ let JISInfotextsRepository = class JISInfotextsRepository extends AbstractValida
|
|
|
64
66
|
sourceKey: "stop_id",
|
|
65
67
|
foreignKey: "stop_id",
|
|
66
68
|
});
|
|
69
|
+
this.sequelizeModel.hasMany(this.infotextPresetsRepository["sequelizeModel"], {
|
|
70
|
+
sourceKey: "id",
|
|
71
|
+
foreignKey: "infotext_id",
|
|
72
|
+
as: "presets",
|
|
73
|
+
});
|
|
74
|
+
this.infotextPresetsRepository["sequelizeModel"].belongsTo(this.sequelizeModel, {
|
|
75
|
+
targetKey: "id",
|
|
76
|
+
foreignKey: "infotext_id",
|
|
77
|
+
});
|
|
67
78
|
}
|
|
68
79
|
/**
|
|
69
80
|
* Refresh all data from VYMI and delete old data
|
|
@@ -146,8 +157,10 @@ exports.JISInfotextsRepository = JISInfotextsRepository = __decorate([
|
|
|
146
157
|
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
147
158
|
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
148
159
|
__param(2, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.JISInfotextsRopidGTFSStopsRepository)),
|
|
149
|
-
__param(3, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.
|
|
160
|
+
__param(3, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.JISInfotextsPresetsRepository)),
|
|
161
|
+
__param(4, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.RopidGTFSStopsRepository)),
|
|
150
162
|
__metadata("design:paramtypes", [Object, Object, JISInfotextsRopidGTFSStopsRepository_1.JISInfotextsRopidGTFSStopsRepository,
|
|
163
|
+
JISInfotextsPresetsRepository_1.JISInfotextsPresetsRepository,
|
|
151
164
|
ropid_gtfs_1.RopidGTFSStopsModel])
|
|
152
165
|
], JISInfotextsRepository);
|
|
153
166
|
//# sourceMappingURL=JISInfotextsRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iDAAqD;AACrD,6DAAuC;AACvC,gGAAsE;AAItE,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAwE;AACxE,mFAAkF;AAClF,mEAAmF;AACnF,iEAAwE;AACxE,kEAA6D;AAC7D,gEAA6D;AAC7D,iGAA8F;AAOvF,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,6DAA6B;IAOrE,YACyC,SAA6B,EACxC,MAAuB,EAEjD,sBAAoE,EAEpE,kBAA+C;QAE/C,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"JISInfotextsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iDAAqD;AACrD,6DAAuC;AACvC,gGAAsE;AAItE,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAwE;AACxE,mFAAkF;AAClF,mEAAmF;AACnF,iEAAwE;AACxE,kEAA6D;AAC7D,gEAA6D;AAC7D,mFAAgF;AAChF,iGAA8F;AAOvF,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,6DAA6B;IAOrE,YACyC,SAA6B,EACxC,MAAuB,EAEjD,sBAAoE,EAEpE,yBAAgE,EAEhE,kBAA+C;QAE/C,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QARS,WAAM,GAAN,MAAM,CAAS;QAEzC,2BAAsB,GAAtB,sBAAsB,CAAsC;QAE5D,8BAAyB,GAAzB,yBAAyB,CAA+B;QAExD,uBAAkB,GAAlB,kBAAkB,CAAqB;QAb5C,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,qCAAiB,CAAC,SAAS,CAAC;QAe3C,IAAI,C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|
11
11
|
export declare class JISInfotextsRopidGTFSStopsRepository extends AbstractValidatableRepository {
|
|
12
|
-
private logger;
|
|
13
12
|
validator: JSONSchemaValidator;
|
|
14
13
|
schema: string;
|
|
15
14
|
tableName: string;
|
|
16
15
|
private sequelizeModel;
|
|
17
16
|
constructor(connector: IDatabaseConnector, logger: ILogger);
|
|
18
17
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @param options Options for the operation
|
|
23
|
-
* @returns The number of deleted items
|
|
18
|
+
* Removes rows that were not touched during the current refresh cycle — any row whose `updated_at`
|
|
19
|
+
* predates `dateTime` was absent from the latest feed and is considered stale.
|
|
20
|
+
* Call this after `upsertAll` with the timestamp captured at the start of the save to clean up vanished entries.
|
|
24
21
|
*/
|
|
25
22
|
deleteAllLastUpdatedBefore(dateTime: Date, options?: RepositoryOptions): Promise<number>;
|
|
26
23
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @param options Options for the operation
|
|
31
|
-
* @returns The upserted items
|
|
24
|
+
* Inserts new rows or updates existing ones. On conflict, all columns except `created_at` are overwritten —
|
|
25
|
+
* `created_at` is intentionally preserved to track when a row was first seen, while `updated_at` advances
|
|
26
|
+
* each cycle so stale-record cleanup can identify entries missing from the latest feed.
|
|
32
27
|
*/
|
|
33
28
|
upsertAll(data: IJISInfotextsRopidGTFSStops[], options?: RepositoryOptions): ReturnType<ModelStatic<JISInfotextsRopidGTFSStopsModel>["bulkCreate"]>;
|
|
34
29
|
private getUpdateAttributes;
|
|
35
|
-
/**
|
|
36
|
-
* @param options
|
|
37
|
-
* @returns The number of deleted items
|
|
38
|
-
*/
|
|
39
30
|
deleteAll(options?: RepositoryOptions): Promise<number>;
|
|
40
31
|
}
|
|
41
32
|
export {};
|
|
@@ -17,7 +17,6 @@ const const_1 = require("../../../schema-definitions/const");
|
|
|
17
17
|
const JISInfotextsRopidGTFSStopsModel_1 = require("../../../schema-definitions/jis/models/JISInfotextsRopidGTFSStopsModel");
|
|
18
18
|
const AbstractValidatableRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractValidatableRepository");
|
|
19
19
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
|
-
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
21
20
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
22
21
|
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
23
22
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
@@ -25,7 +24,6 @@ const RepositoryUtils_1 = require("../../shared/RepositoryUtils");
|
|
|
25
24
|
let JISInfotextsRopidGTFSStopsRepository = class JISInfotextsRopidGTFSStopsRepository extends AbstractValidatableRepository_1.AbstractValidatableRepository {
|
|
26
25
|
constructor(connector, logger) {
|
|
27
26
|
super(connector, logger);
|
|
28
|
-
this.logger = logger;
|
|
29
27
|
this.schema = const_1.PG_SCHEMA;
|
|
30
28
|
this.tableName = JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.tableName;
|
|
31
29
|
this.validator = new golemio_validator_1.JSONSchemaValidator("JISInfotextsRopidGTFSStopsRepository", JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.jsonSchema);
|
|
@@ -34,11 +32,9 @@ let JISInfotextsRopidGTFSStopsRepository = class JISInfotextsRopidGTFSStopsRepos
|
|
|
34
32
|
.define(this.tableName, JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.attributeModel, { schema: this.schema });
|
|
35
33
|
}
|
|
36
34
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @param options Options for the operation
|
|
41
|
-
* @returns The number of deleted items
|
|
35
|
+
* Removes rows that were not touched during the current refresh cycle — any row whose `updated_at`
|
|
36
|
+
* predates `dateTime` was absent from the latest feed and is considered stale.
|
|
37
|
+
* Call this after `upsertAll` with the timestamp captured at the start of the save to clean up vanished entries.
|
|
42
38
|
*/
|
|
43
39
|
async deleteAllLastUpdatedBefore(dateTime, options) {
|
|
44
40
|
try {
|
|
@@ -50,15 +46,13 @@ let JISInfotextsRopidGTFSStopsRepository = class JISInfotextsRopidGTFSStopsRepos
|
|
|
50
46
|
});
|
|
51
47
|
}
|
|
52
48
|
catch (err) {
|
|
53
|
-
throw
|
|
49
|
+
throw RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "deleteAllLastUpdatedBefore");
|
|
54
50
|
}
|
|
55
51
|
}
|
|
56
52
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* @param options Options for the operation
|
|
61
|
-
* @returns The upserted items
|
|
53
|
+
* Inserts new rows or updates existing ones. On conflict, all columns except `created_at` are overwritten —
|
|
54
|
+
* `created_at` is intentionally preserved to track when a row was first seen, while `updated_at` advances
|
|
55
|
+
* each cycle so stale-record cleanup can identify entries missing from the latest feed.
|
|
62
56
|
*/
|
|
63
57
|
async upsertAll(data, options) {
|
|
64
58
|
try {
|
|
@@ -68,22 +62,20 @@ let JISInfotextsRopidGTFSStopsRepository = class JISInfotextsRopidGTFSStopsRepos
|
|
|
68
62
|
});
|
|
69
63
|
}
|
|
70
64
|
catch (err) {
|
|
71
|
-
RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "upsertAll");
|
|
65
|
+
throw RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "upsertAll");
|
|
72
66
|
}
|
|
73
67
|
}
|
|
68
|
+
// created_at is excluded so that re-upserting an existing row doesn't overwrite
|
|
69
|
+
// when it was first seen — only updated_at should advance on subsequent refreshes.
|
|
74
70
|
getUpdateAttributes() {
|
|
75
|
-
return Object.keys(JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.attributeModel).filter((attribute) =>
|
|
71
|
+
return Object.keys(JISInfotextsRopidGTFSStopsModel_1.JISInfotextsRopidGTFSStopsModel.attributeModel).filter((attribute) => attribute !== "created_at");
|
|
76
72
|
}
|
|
77
|
-
/**
|
|
78
|
-
* @param options
|
|
79
|
-
* @returns The number of deleted items
|
|
80
|
-
*/
|
|
81
73
|
async deleteAll(options) {
|
|
82
74
|
try {
|
|
83
75
|
return await this.sequelizeModel.destroy({ where: {}, transaction: options?.transaction });
|
|
84
76
|
}
|
|
85
77
|
catch (err) {
|
|
86
|
-
throw
|
|
78
|
+
throw RepositoryUtils_1.RepositoryUtils.mapSequelizeError(err, this.constructor.name, "deleteAll");
|
|
87
79
|
}
|
|
88
80
|
}
|
|
89
81
|
};
|
package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,4HAAkG;AAIlG,8IAA2I;AAC3I,wEAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"JISInfotextsRopidGTFSStopsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,4HAAkG;AAIlG,8IAA2I;AAC3I,wEAAqE;AACrE,mFAAkF;AAClF,mEAAmF;AACnF,iEAAwE;AACxE,kEAA6D;AAOtD,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,6DAA6B;IAOnF,YAAiD,SAA6B,EAA4B,MAAe;QACrH,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QANtB,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,iEAA+B,CAAC,SAAS,CAAC;QAMzD,IA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I,CAAC,iEAA+B,CAAC,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,KAAK,YAAY,CAAC,CAAC;IACzH,CAAC;IAEM,KAAK,CAAC,SAAS,CAAC,OAA2B;QAC9C,IAAI,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;QAC/F,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,iCAAe,CAAC,iBAAiB,CAAC,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACrF,CAAC;IACL,CAAC;CACJ,CAAA;AApEY,oFAAoC;+CAApC,oCAAoC;IADhD,IAAA,qBAAU,GAAE;IAQI,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IAAiC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GAPhG,oCAAoC,CAoEhD"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
+
import { JISInfotextsPresetsRepository } from "../repositories/JISInfotextsPresetsRepository";
|
|
1
2
|
import { JISInfotextsRepository } from "../repositories/JISInfotextsRepository";
|
|
2
3
|
import { JISInfotextsRopidGTFSStopsRepository } from "../repositories/JISInfotextsRopidGTFSStopsRepository";
|
|
3
|
-
import { IJISInfotext, IJISInfotextsRopidGTFSStops } from "../../../schema-definitions/jis/models/interfaces";
|
|
4
|
+
import { IJISInfotext, IJISInfotextsPresets, IJISInfotextsRopidGTFSStops } from "../../../schema-definitions/jis/models/interfaces";
|
|
4
5
|
import { ILogger } from "@golemio/core/dist/helpers";
|
|
5
6
|
import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
|
|
6
7
|
export declare class JISInfotextsDataService {
|
|
7
8
|
private infotextsRepository;
|
|
8
9
|
private infotextsRopidGTFSStopsRepository;
|
|
10
|
+
private infotextsPresetsRepository;
|
|
9
11
|
private databaseConnector;
|
|
10
12
|
private logger;
|
|
11
|
-
constructor(infotextsRepository: JISInfotextsRepository, infotextsRopidGTFSStopsRepository: JISInfotextsRopidGTFSStopsRepository, databaseConnector: IDatabaseConnector, logger: ILogger);
|
|
13
|
+
constructor(infotextsRepository: JISInfotextsRepository, infotextsRopidGTFSStopsRepository: JISInfotextsRopidGTFSStopsRepository, infotextsPresetsRepository: JISInfotextsPresetsRepository, databaseConnector: IDatabaseConnector, logger: ILogger);
|
|
12
14
|
/**
|
|
13
|
-
* Insert or update all given infotexts and
|
|
14
|
-
* `created_at` shall be overwritten.
|
|
15
|
-
*
|
|
16
|
-
* @param infotexts The infotexts data to be upserted
|
|
17
|
-
* @param infotextsRopidGTFSStops The infotextsRopidGTFSStops data to be upserted
|
|
15
|
+
* Insert or update all given infotexts, their stop links and preset links. In case of an update, all attributes except for
|
|
16
|
+
* `created_at` shall be overwritten. Rows absent from this refresh cycle are deleted as stale.
|
|
18
17
|
*/
|
|
19
|
-
refreshData(infotexts: IJISInfotext[], infotextsRopidGTFSStops: IJISInfotextsRopidGTFSStops[]): Promise<void>;
|
|
18
|
+
refreshData(infotexts: IJISInfotext[], infotextsRopidGTFSStops: IJISInfotextsRopidGTFSStops[], infotextsPresets: IJISInfotextsPresets[]): Promise<void>;
|
|
20
19
|
}
|
|
@@ -14,32 +14,32 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.JISInfotextsDataService = void 0;
|
|
16
16
|
const JISContainerToken_1 = require("../ioc/JISContainerToken");
|
|
17
|
+
const JISInfotextsPresetsRepository_1 = require("../repositories/JISInfotextsPresetsRepository");
|
|
17
18
|
const JISInfotextsRepository_1 = require("../repositories/JISInfotextsRepository");
|
|
18
19
|
const JISInfotextsRopidGTFSStopsRepository_1 = require("../repositories/JISInfotextsRopidGTFSStopsRepository");
|
|
19
20
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
20
21
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
21
22
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
23
|
let JISInfotextsDataService = class JISInfotextsDataService {
|
|
23
|
-
constructor(infotextsRepository, infotextsRopidGTFSStopsRepository, databaseConnector, logger) {
|
|
24
|
+
constructor(infotextsRepository, infotextsRopidGTFSStopsRepository, infotextsPresetsRepository, databaseConnector, logger) {
|
|
24
25
|
this.infotextsRepository = infotextsRepository;
|
|
25
26
|
this.infotextsRopidGTFSStopsRepository = infotextsRopidGTFSStopsRepository;
|
|
27
|
+
this.infotextsPresetsRepository = infotextsPresetsRepository;
|
|
26
28
|
this.databaseConnector = databaseConnector;
|
|
27
29
|
this.logger = logger;
|
|
28
30
|
// do nothing
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
|
-
* Insert or update all given infotexts and
|
|
32
|
-
* `created_at` shall be overwritten.
|
|
33
|
-
*
|
|
34
|
-
* @param infotexts The infotexts data to be upserted
|
|
35
|
-
* @param infotextsRopidGTFSStops The infotextsRopidGTFSStops data to be upserted
|
|
33
|
+
* Insert or update all given infotexts, their stop links and preset links. In case of an update, all attributes except for
|
|
34
|
+
* `created_at` shall be overwritten. Rows absent from this refresh cycle are deleted as stale.
|
|
36
35
|
*/
|
|
37
|
-
async refreshData(infotexts, infotextsRopidGTFSStops) {
|
|
36
|
+
async refreshData(infotexts, infotextsRopidGTFSStops, infotextsPresets) {
|
|
38
37
|
const connection = this.databaseConnector.getConnection();
|
|
39
38
|
const transaction = await connection.transaction();
|
|
40
39
|
const saveTime = new Date();
|
|
41
40
|
try {
|
|
42
41
|
if (infotexts.length === 0) {
|
|
42
|
+
await this.infotextsPresetsRepository.deleteAll({ transaction });
|
|
43
43
|
await this.infotextsRopidGTFSStopsRepository.deleteAll({ transaction });
|
|
44
44
|
await this.infotextsRepository.deleteAll({ transaction });
|
|
45
45
|
await transaction.commit();
|
|
@@ -49,9 +49,12 @@ let JISInfotextsDataService = class JISInfotextsDataService {
|
|
|
49
49
|
await this.infotextsRepository.refreshData(infotexts, { transaction });
|
|
50
50
|
await this.infotextsRopidGTFSStopsRepository.upsertAll(infotextsRopidGTFSStops, { transaction });
|
|
51
51
|
await this.infotextsRopidGTFSStopsRepository.deleteAllLastUpdatedBefore(saveTime, { transaction });
|
|
52
|
+
await this.infotextsPresetsRepository.upsertAll(infotextsPresets, { transaction });
|
|
53
|
+
await this.infotextsPresetsRepository.deleteAllLastUpdatedBefore(saveTime, { transaction });
|
|
52
54
|
await transaction.commit();
|
|
53
|
-
this.logger.info(`${this.constructor.name}.refreshData: ${infotexts.length} JIS infotexts
|
|
54
|
-
`${infotextsRopidGTFSStops.length} JIS infotextsRopidGTFSStops
|
|
55
|
+
this.logger.info(`${this.constructor.name}.refreshData: ${infotexts.length} JIS infotexts, ` +
|
|
56
|
+
`${infotextsRopidGTFSStops.length} JIS infotextsRopidGTFSStops and ` +
|
|
57
|
+
`${infotextsPresets.length} JIS infotextsPresets were saved`);
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
catch (err) {
|
|
@@ -67,9 +70,11 @@ exports.JISInfotextsDataService = JISInfotextsDataService = __decorate([
|
|
|
67
70
|
(0, tsyringe_1.injectable)(),
|
|
68
71
|
__param(0, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.JISInfotextsRepository)),
|
|
69
72
|
__param(1, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.JISInfotextsRopidGTFSStopsRepository)),
|
|
70
|
-
__param(2, (0, tsyringe_1.inject)(
|
|
71
|
-
__param(3, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.
|
|
73
|
+
__param(2, (0, tsyringe_1.inject)(JISContainerToken_1.JISContainerToken.JISInfotextsPresetsRepository)),
|
|
74
|
+
__param(3, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
|
|
75
|
+
__param(4, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
72
76
|
__metadata("design:paramtypes", [JISInfotextsRepository_1.JISInfotextsRepository,
|
|
73
|
-
JISInfotextsRopidGTFSStopsRepository_1.JISInfotextsRopidGTFSStopsRepository,
|
|
77
|
+
JISInfotextsRopidGTFSStopsRepository_1.JISInfotextsRopidGTFSStopsRepository,
|
|
78
|
+
JISInfotextsPresetsRepository_1.JISInfotextsPresetsRepository, Object, Object])
|
|
74
79
|
], JISInfotextsDataService);
|
|
75
80
|
//# sourceMappingURL=JISInfotextsDataService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsDataService.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/services/JISInfotextsDataService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAkE;AAClE,mFAAqF;AACrF,+GAAiH;AAIjH,wEAAqE;AACrE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAChC,YAEY,mBAA2C,EAE3C,iCAAuE,
|
|
1
|
+
{"version":3,"file":"JISInfotextsDataService.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/services/JISInfotextsDataService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAkE;AAClE,iGAAmG;AACnG,mFAAqF;AACrF,+GAAiH;AAIjH,wEAAqE;AACrE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAChC,YAEY,mBAA2C,EAE3C,iCAAuE,EAEvE,0BAAyD,EACpB,iBAAqC,EAChD,MAAe;QANzC,wBAAmB,GAAnB,mBAAmB,CAAwB;QAE3C,sCAAiC,GAAjC,iCAAiC,CAAsC;QAEvE,+BAA0B,GAA1B,0BAA0B,CAA+B;QACpB,sBAAiB,GAAjB,iBA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AAC,0BAA0B,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBAC5F,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iBAAiB,SAAS,CAAC,MAAM,kBAAkB;oBACvE,GAAG,uBAAuB,CAAC,MAAM,mCAAmC;oBACpE,GAAG,gBAAgB,CAAC,MAAM,kCAAkC,CACnE,CAAC;YACN,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG,YAAY,6BAAY;gBAAE,MAAM,GAAG,CAAC;YAC3C,MAAM,IAAI,6BAAY,CAAC,6CAA6C,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QACtG,CAAC;IACL,CAAC;CACJ,CAAA;AAvDY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,sBAAsB,CAAC,CAAA;IAEhD,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,oCAAoC,CAAC,CAAA;IAE9D,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,6BAA6B,CAAC,CAAA;IAEvD,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCANI,+CAAsB;QAER,2EAAoC;QAE3C,6DAA6B;GAP5D,uBAAuB,CAuDnC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IJISInfotext as IJISInfotextDataSource } from "../../../schema-definitions/jis/datasources/interfaces";
|
|
2
|
-
import { IJISInfotext as IJISInfotextModel, IJISInfotextsRopidGTFSStops as IJISInfotextsRopidGTFSStopsModel } from "../../../schema-definitions/jis/models/interfaces";
|
|
2
|
+
import { IJISInfotext as IJISInfotextModel, IJISInfotextsPresets as IJISInfotextsPresetsModel, IJISInfotextsRopidGTFSStops as IJISInfotextsRopidGTFSStopsModel } from "../../../schema-definitions/jis/models/interfaces";
|
|
3
3
|
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
4
4
|
type TransformIn = IJISInfotextDataSource;
|
|
5
5
|
type TransformOut = {
|
|
6
6
|
infotext: IJISInfotextModel;
|
|
7
7
|
infotextsRopidGTFSStops: IJISInfotextsRopidGTFSStopsModel[];
|
|
8
|
+
infotextsPresets: IJISInfotextsPresetsModel[];
|
|
8
9
|
};
|
|
9
10
|
export declare class JISInfotextsTransformation extends AbstractTransformation<TransformIn, TransformOut> {
|
|
10
11
|
name: string;
|
|
@@ -31,9 +31,14 @@ let JISInfotextsTransformation = class JISInfotextsTransformation extends Abstra
|
|
|
31
31
|
infotext_id: data.id,
|
|
32
32
|
stop_id: id,
|
|
33
33
|
})) ?? [];
|
|
34
|
+
const infotextsPresets = data.informed_entity?.presets?.map(({ route_name }) => ({
|
|
35
|
+
infotext_id: data.id,
|
|
36
|
+
route_name,
|
|
37
|
+
})) ?? [];
|
|
34
38
|
return {
|
|
35
39
|
infotext,
|
|
36
40
|
infotextsRopidGTFSStops,
|
|
41
|
+
infotextsPresets,
|
|
37
42
|
};
|
|
38
43
|
};
|
|
39
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/transformations/JISInfotextsTransformation.ts"],"names":[],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"JISInfotextsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/transformations/JISInfotextsTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAMA,6GAA0G;AAC1G,iEAAgE;AAUzD,IAAM,0BAA0B,GAAhC,M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E;gBACpB,UAAU;aACb,CAAC,CAAC,IAAI,EAAE,CAAC;YACd,OAAO;gBACH,QAAQ;gBACR,uBAAuB;gBACvB,gBAAgB;aACnB,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;AAjCY,gEAA0B;qCAA1B,0BAA0B;IADtC,IAAA,qBAAU,GAAE;GACA,0BAA0B,CAiCtC"}
|
|
@@ -33,23 +33,27 @@ let RefreshJISInfotextsTask = class RefreshJISInfotextsTask extends AbstractTask
|
|
|
33
33
|
}
|
|
34
34
|
async execute(data) {
|
|
35
35
|
const transformedData = this.infotextsTransformation.transformArray(data);
|
|
36
|
-
const { infotexts, infotextsRopidGTFSStops } = this.getEntitiesFromTransformationResult(transformedData);
|
|
37
|
-
await this.infotextsDataService.refreshData(infotexts, infotextsRopidGTFSStops);
|
|
36
|
+
const { infotexts, infotextsRopidGTFSStops, infotextsPresets } = this.getEntitiesFromTransformationResult(transformedData);
|
|
37
|
+
await this.infotextsDataService.refreshData(infotexts, infotextsRopidGTFSStops, infotextsPresets);
|
|
38
38
|
await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshJISInfotextsCache", {});
|
|
39
39
|
}
|
|
40
40
|
getEntitiesFromTransformationResult(transformedData) {
|
|
41
41
|
const infotextEntities = [];
|
|
42
42
|
const infotextsRopidGTFSStopsEntities = [];
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
const infotextsPresetsEntities = [];
|
|
44
|
+
for (const data of transformedData) {
|
|
45
|
+
const { infotext, infotextsRopidGTFSStops, infotextsPresets } = data;
|
|
46
|
+
if (infotextsRopidGTFSStops.length === 0 && infotextsPresets.length === 0) {
|
|
45
47
|
continue;
|
|
46
48
|
}
|
|
47
49
|
infotextEntities.push(infotext);
|
|
48
50
|
infotextsRopidGTFSStopsEntities.push(...infotextsRopidGTFSStops);
|
|
51
|
+
infotextsPresetsEntities.push(...infotextsPresets);
|
|
49
52
|
}
|
|
50
53
|
return {
|
|
51
54
|
infotexts: infotextEntities,
|
|
52
55
|
infotextsRopidGTFSStops: infotextsRopidGTFSStopsEntities,
|
|
56
|
+
infotextsPresets: infotextsPresetsEntities,
|
|
53
57
|
};
|
|
54
58
|
}
|
|
55
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshJISInfotextsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAkE;AAClE,oFAAmF;AACnF,iGAAgG;AAEhG,kHAAqF;AAErF,8EAAqE;AACrE,iHAA8G;AAC9G,mFAAkF;AAClF,iEAAwE;AACxE,4CAA+C;AAGxC,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,+CAAsC;IAK/E,YAEI,oBAAqD,EAErD,uBAA2D;QAE3D,KAAK,CAAC,2BAAe,CAAC,WAAW,EAAE,CAAC,CAAC;QAJ7B,yBAAoB,GAApB,oBAAoB,CAAyB;QAE7C,4BAAuB,GAAvB,uBAAuB,CAA4B;QAR/C,WAAM,GAAG,IAAI,uCAAmB,CAAC,4BAA4B,EAAE,+CAAsB,CAAC,CAAC;QACvF,cAAS,GAAG,qBAAqB,CAAC;QAClC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,WAAW;IASjD,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,IAAoB;QACxC,MAAM,eAAe,GAAG,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1E,MAAM,EAAE,SAAS,EAAE,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"RefreshJISInfotextsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAkE;AAClE,oFAAmF;AACnF,iGAAgG;AAEhG,kHAAqF;AAErF,8EAAqE;AACrE,iHAA8G;AA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K,CAAC,EAAE,CAAC;gBACxE,SAAS;YACb,CAAC;YACD,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAChC,+BAA+B,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAAC,CAAC;YACjE,wBAAwB,CAAC,IAAI,CAAC,GAAG,gBAAgB,CAAC,CAAC;QACvD,CAAC;QACD,OAAO;YACH,SAAS,EAAE,gBAAgB;YAC3B,uBAAuB,EAAE,+BAA+B;YACxD,gBAAgB,EAAE,wBAAwB;SAC7C,CAAC;IACN,CAAC;CACJ,CAAA;AAzCY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAOJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,uBAAuB,CAAC,CAAA;IAEjD,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,0BAA0B,CAAC,CAAA;qCADvB,iDAAuB;QAEpB,uDAA0B;GATtD,uBAAuB,CAyCnC"}
|
|
@@ -65,6 +65,18 @@ exports.jisInfotextsJsonSchema = {
|
|
|
65
65
|
required: ["id"],
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
|
+
presets: {
|
|
69
|
+
type: "array",
|
|
70
|
+
nullable: true,
|
|
71
|
+
items: {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {
|
|
74
|
+
route_name: { type: "string" },
|
|
75
|
+
},
|
|
76
|
+
additionalProperties: false,
|
|
77
|
+
required: ["route_name"],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
68
80
|
},
|
|
69
81
|
additionalProperties: false,
|
|
70
82
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/datasources/JISInfotextsJsonSchema.ts"],"names":[],"mappings":";;;AAAA,oGAAqF;AAIxE,QAAA,sBAAsB,GAAmC;IAClE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,Q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QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE;SACnE;QACD,QAAQ,EAAE;YACN,IAAI;YACJ,gBAAgB;YAChB,cAAc;YACd,eAAe;YACf,kBAAkB;YAClB,mBAAmB;YACnB,yBAAyB;SAC5B;KACJ;CACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JISInfotextSeverityLevel } from "../../../../helpers/jis/JISInfotextSeverityLevelEnum";
|
|
2
2
|
import { IJISInfotextStop } from "./IJISInfotextStop";
|
|
3
|
+
import { IJISInfotextPreset } from "./IJISInfotextPreset";
|
|
3
4
|
import { IJISTranslationText } from "./IJISTranslationText";
|
|
4
5
|
export interface IJISInfotext {
|
|
5
6
|
id: string;
|
|
@@ -17,6 +18,7 @@ export interface IJISInfotext {
|
|
|
17
18
|
} | null;
|
|
18
19
|
informed_entity?: {
|
|
19
20
|
stops?: IJISInfotextStop[] | null;
|
|
21
|
+
presets?: IJISInfotextPreset[] | null;
|
|
20
22
|
} | null;
|
|
21
23
|
created_timestamp: string;
|
|
22
24
|
last_modified_timestamp: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJISInfotextPreset.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/datasources/interfaces/IJISInfotextPreset.ts"],"names":[],"mappings":""}
|
|
@@ -18,5 +18,6 @@ __exportStar(require("./IJISEvent"), exports);
|
|
|
18
18
|
__exportStar(require("./IJISEventRoute"), exports);
|
|
19
19
|
__exportStar(require("./IJISInfotext"), exports);
|
|
20
20
|
__exportStar(require("./IJISInfotextStop"), exports);
|
|
21
|
+
__exportStar(require("./IJISInfotextPreset"), exports);
|
|
21
22
|
__exportStar(require("./IJISTranslationText"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/datasources/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,mDAAiC;AACjC,iDAA+B;AAC/B,qDAAmC;AACnC,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/datasources/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,mDAAiC;AACjC,iDAA+B;AAC/B,qDAAmC;AACnC,uDAAqC;AACrC,wDAAsC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JISInfotextSeverityLevel } from "../../../helpers/jis/JISInfotextSeverityLevelEnum";
|
|
2
|
+
import { JISInfotextsPresetsModel } from "./JISInfotextsPresetsModel";
|
|
2
3
|
import { StopDto } from "../../ropid-gtfs/models/StopDto";
|
|
3
4
|
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
4
5
|
import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
@@ -19,6 +20,7 @@ export declare class JISInfotextsModel extends Model<InferAttributes<JISInfotext
|
|
|
19
20
|
created_at: CreationOptional<Date>;
|
|
20
21
|
updated_at: CreationOptional<Date>;
|
|
21
22
|
stops?: StopDto[];
|
|
23
|
+
presets?: JISInfotextsPresetsModel[];
|
|
22
24
|
static attributeModel: ModelAttributes<JISInfotextsModel>;
|
|
23
25
|
static jsonSchema: JSONSchemaType<IJISInfotext[]>;
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JISInfotextsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISInfotextsModel.ts"],"names":[],"mappings":";;;AAAA,oGAAqF;
|
|
1
|
+
{"version":3,"file":"JISInfotextsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISInfotextsModel.ts"],"names":[],"mappings":";;;AAAA,oGAAqF;AAIrF,mEAO6C;AAG7C,MAAa,iBACT,SAAQ,iBAAqF;;AADjG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E;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE;YACN,IAAI;YACJ,gBAAgB;YAChB,cAAc;YACd,qBAAqB;YACrB,kBAAkB;YAClB,mBAAmB;YACnB,mBAAmB;SACtB;KACJ;IACD,WAAW,EAAE;QACT,WAAW,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACR,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACtB,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;aACxE;YACD,oBAAoB,EAAE,KAAK;YAC3B,QAAQ,EAAE,CAAC,IAAI,CAAC;SACnB;KACJ;CACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
|
|
2
|
+
import { CreationOptional, InferAttributes, InferCreationAttributes, Model, ModelAttributes } from "@golemio/core/dist/shared/sequelize";
|
|
3
|
+
import { IJISInfotextsPresets } from "./interfaces";
|
|
4
|
+
export declare class JISInfotextsPresetsModel extends Model<InferAttributes<JISInfotextsPresetsModel>, InferCreationAttributes<JISInfotextsPresetsModel>> implements IJISInfotextsPresets {
|
|
5
|
+
static tableName: string;
|
|
6
|
+
infotext_id: string;
|
|
7
|
+
route_name: string;
|
|
8
|
+
created_at: CreationOptional<Date>;
|
|
9
|
+
updated_at: CreationOptional<Date>;
|
|
10
|
+
static attributeModel: ModelAttributes<JISInfotextsPresetsModel>;
|
|
11
|
+
static jsonSchema: JSONSchemaType<IJISInfotextsPresets[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JISInfotextsPresetsModel = void 0;
|
|
4
|
+
const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
|
|
5
|
+
class JISInfotextsPresetsModel extends sequelize_1.Model {
|
|
6
|
+
}
|
|
7
|
+
exports.JISInfotextsPresetsModel = JISInfotextsPresetsModel;
|
|
8
|
+
JISInfotextsPresetsModel.tableName = "jis_infotexts_presets";
|
|
9
|
+
JISInfotextsPresetsModel.attributeModel = {
|
|
10
|
+
infotext_id: {
|
|
11
|
+
primaryKey: true,
|
|
12
|
+
type: sequelize_1.DataTypes.UUID,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
},
|
|
15
|
+
route_name: {
|
|
16
|
+
primaryKey: true,
|
|
17
|
+
type: sequelize_1.DataTypes.STRING(100),
|
|
18
|
+
allowNull: false,
|
|
19
|
+
},
|
|
20
|
+
created_at: {
|
|
21
|
+
type: sequelize_1.DataTypes.DATE,
|
|
22
|
+
allowNull: false,
|
|
23
|
+
},
|
|
24
|
+
updated_at: {
|
|
25
|
+
type: sequelize_1.DataTypes.DATE,
|
|
26
|
+
allowNull: false,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
JISInfotextsPresetsModel.jsonSchema = {
|
|
30
|
+
type: "array",
|
|
31
|
+
items: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
infotext_id: { type: "string" },
|
|
35
|
+
route_name: { type: "string" },
|
|
36
|
+
},
|
|
37
|
+
additionalProperties: false,
|
|
38
|
+
required: ["infotext_id", "route_name"],
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=JISInfotextsPresetsModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JISInfotextsPresetsModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/models/JISInfotextsPresetsModel.ts"],"names":[],"mappings":";;;AACA,mEAO6C;AAG7C,MAAa,wBACT,SAAQ,iBAAmG;;AAD/G,4DA4CC;AAxCiB,kCAAS,GAAG,uBAAuB,CAAC;AAOpC,uCAAc,GAA8C;IACtE,WAAW,EAAE;QACT,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;IACD,UAAU,EAAE;QACR,IAAI,EAAE,qBAAS,CAAC,IAAI;QACpB,SAAS,EAAE,KAAK;KACnB;CACJ,CAAC;AAEY,mCAAU,GAA2C;IAC/D,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACjC;QACD,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC;KAC1C;CACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IJISInfotextsPresets.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/IJISInfotextsPresets.ts"],"names":[],"mappings":""}
|
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./IJISEvent"), exports);
|
|
18
18
|
__exportStar(require("./IJISEventsRopidGTFSRoutes"), exports);
|
|
19
19
|
__exportStar(require("./IJISInfotext"), exports);
|
|
20
|
+
__exportStar(require("./IJISInfotextsPresets"), exports);
|
|
20
21
|
__exportStar(require("./IJISInfotextsRopidGTFSStops"), exports);
|
|
21
22
|
__exportStar(require("./IJISTranslationText"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,iDAA+B;AAC/B,gEAA8C;AAC9C,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/jis/models/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8DAA4C;AAC5C,iDAA+B;AAC/B,yDAAuC;AACvC,gEAA8C;AAC9C,wDAAsC"}
|
package/docs/asyncapi.yaml
CHANGED
|
@@ -1959,19 +1959,31 @@ components:
|
|
|
1959
1959
|
description: Localized descriptions of the infotext
|
|
1960
1960
|
informed_entity:
|
|
1961
1961
|
type: object
|
|
1962
|
+
nullable: true
|
|
1962
1963
|
properties:
|
|
1963
1964
|
stops:
|
|
1964
1965
|
type: array
|
|
1966
|
+
nullable: true
|
|
1965
1967
|
items:
|
|
1966
1968
|
type: object
|
|
1967
1969
|
properties:
|
|
1968
|
-
|
|
1970
|
+
id:
|
|
1969
1971
|
type: string
|
|
1970
1972
|
description: Unique identifier for the stop
|
|
1971
1973
|
required:
|
|
1972
|
-
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1974
|
+
- id
|
|
1975
|
+
presets:
|
|
1976
|
+
type: array
|
|
1977
|
+
nullable: true
|
|
1978
|
+
description: Departure presets connected to this infotext (optional, migration period)
|
|
1979
|
+
items:
|
|
1980
|
+
type: object
|
|
1981
|
+
properties:
|
|
1982
|
+
route_name:
|
|
1983
|
+
type: string
|
|
1984
|
+
description: Route name of the departure preset (ropid_departures_presets.route_name)
|
|
1985
|
+
required:
|
|
1986
|
+
- route_name
|
|
1975
1987
|
created_timestamp:
|
|
1976
1988
|
type: string
|
|
1977
1989
|
format: date-time
|
|
@@ -1986,6 +1998,5 @@ components:
|
|
|
1986
1998
|
- display_type
|
|
1987
1999
|
- active_period
|
|
1988
2000
|
- description_text
|
|
1989
|
-
- informed_entity
|
|
1990
2001
|
- created_timestamp
|
|
1991
2002
|
- last_modified_timestamp
|
package/docs/openapi-input.yaml
CHANGED
|
@@ -786,9 +786,11 @@ components:
|
|
|
786
786
|
description: Localized descriptions of the infotext
|
|
787
787
|
informed_entity:
|
|
788
788
|
type: object
|
|
789
|
+
nullable: true
|
|
789
790
|
properties:
|
|
790
791
|
stops:
|
|
791
792
|
type: array
|
|
793
|
+
nullable: true
|
|
792
794
|
items:
|
|
793
795
|
type: object
|
|
794
796
|
properties:
|
|
@@ -797,8 +799,18 @@ components:
|
|
|
797
799
|
description: Unique identifier for the stop
|
|
798
800
|
required:
|
|
799
801
|
- id
|
|
800
|
-
|
|
801
|
-
|
|
802
|
+
presets:
|
|
803
|
+
type: array
|
|
804
|
+
nullable: true
|
|
805
|
+
description: Departure presets connected to this infotext (optional, migration period)
|
|
806
|
+
items:
|
|
807
|
+
type: object
|
|
808
|
+
properties:
|
|
809
|
+
route_name:
|
|
810
|
+
type: string
|
|
811
|
+
description: Route name of the departure preset (ropid_departures_presets.route_name)
|
|
812
|
+
required:
|
|
813
|
+
- route_name
|
|
802
814
|
created_timestamp:
|
|
803
815
|
type: string
|
|
804
816
|
format: date-time
|
|
@@ -813,7 +825,6 @@ components:
|
|
|
813
825
|
- display_type
|
|
814
826
|
- active_period
|
|
815
827
|
- description_text
|
|
816
|
-
- informed_entity
|
|
817
828
|
- created_timestamp
|
|
818
829
|
- last_modified_timestamp
|
|
819
830
|
examples:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "5.9.2-dev.
|
|
3
|
+
"version": "5.9.2-dev.2487723561",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"npm": ">=8.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@apideck/portman": "
|
|
40
|
+
"@apideck/portman": "1.29.3",
|
|
41
41
|
"@commitlint/cli": "^11.0.0",
|
|
42
42
|
"@commitlint/config-conventional": "^11.0.0",
|
|
43
43
|
"@golemio/cli": "1.11.2",
|