@golemio/pid 3.15.2-rc.1828866938 → 3.15.2-rc.1852456410

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.
@@ -18,20 +18,18 @@ export declare class JISEventsRepository extends AbstractValidatableRepository {
18
18
  private sequelizeModel;
19
19
  private ropidGTFSRoutesRepository;
20
20
  constructor(connector: IDatabaseConnector, logger: ILogger, eventsRopidGTFSRoutesRepository: JISEventsRopidGTFSRoutesRepository);
21
- deleteAndCountAllLastUpdatedBefore(dateTime: Date, options?: RepositoryOptions): Promise<number>;
22
21
  getCurrentIncidents(organizationNames: string[]): Promise<Array<JISEventsModel & {
23
22
  routes: Array<{
24
23
  route_id: string;
25
24
  }>;
26
25
  }>>;
27
26
  /**
28
- * Refresh all data from VYMI and delete old data
27
+ * Refresh all data from VYMI
29
28
  *
30
29
  * @param data The data to be upserted
31
30
  * @param options Options for the operation
32
31
  */
33
- refreshData(data: IJISEvent[], options?: RepositoryOptions): Promise<JISEventsModel[]>;
32
+ upsertAll(data: IJISEvent[], options?: RepositoryOptions): Promise<JISEventsModel[]>;
34
33
  private getUpdateAttributes;
35
- deleteAndCountAll(options?: RepositoryOptions): Promise<number>;
36
34
  }
37
35
  export {};
@@ -44,23 +44,15 @@ let JISEventsRepository = exports.JISEventsRepository = class JISEventsRepositor
44
44
  as: "routes",
45
45
  });
46
46
  }
47
- async deleteAndCountAllLastUpdatedBefore(dateTime, options) {
48
- try {
49
- return await this.sequelizeModel.destroy({
50
- where: {
51
- updated_at: { [sequelize_1.Op.lt]: dateTime },
52
- },
53
- transaction: options?.transaction,
54
- });
55
- }
56
- catch (err) {
57
- throw new golemio_errors_1.GeneralError("Error in deleteAndCountAllLastUpdatedBefore", this.constructor.name, err);
58
- }
59
- }
60
47
  async getCurrentIncidents(organizationNames) {
48
+ const now = new Date();
61
49
  try {
62
50
  return (await this.sequelizeModel.findAll({
63
- where: { type: "INCIDENT", organization_name: organizationNames },
51
+ where: {
52
+ type: "INCIDENT",
53
+ organization_name: organizationNames,
54
+ [sequelize_1.Op.or]: [{ active_period_end: null }, { active_period_end: { [sequelize_1.Op.gte]: now } }],
55
+ },
64
56
  include: [
65
57
  {
66
58
  model: this.ropidGTFSRoutesRepository["sequelizeModel"],
@@ -76,63 +68,31 @@ let JISEventsRepository = exports.JISEventsRepository = class JISEventsRepositor
76
68
  }
77
69
  }
78
70
  /**
79
- * Refresh all data from VYMI and delete old data
71
+ * Refresh all data from VYMI
80
72
  *
81
73
  * @param data The data to be upserted
82
74
  * @param options Options for the operation
83
75
  */
84
- async refreshData(data, options) {
76
+ async upsertAll(data, options) {
85
77
  try {
86
- const currentEvents = await this.sequelizeModel.findAll({ transaction: options?.transaction });
87
- const currentEventsMap = new Map();
88
- for (const event of currentEvents) {
89
- currentEventsMap.set(event.id, event);
90
- }
91
- const toBeUpserted = [];
92
- for (const event of data) {
93
- const info = currentEventsMap.get(event.id);
94
- if (!info || info.updated_at <= event.updated_timestamp) {
95
- toBeUpserted.push(event);
96
- }
97
- currentEventsMap.delete(event.id);
98
- }
99
- const toBeDeleted = [];
100
- for (const { id } of currentEventsMap.values()) {
101
- toBeDeleted.push(id);
102
- }
103
- const [upserted] = await Promise.all([
104
- this.sequelizeModel.bulkCreate(toBeUpserted, {
105
- updateOnDuplicate: this.getUpdateAttributes(),
106
- transaction: options?.transaction,
107
- }),
108
- this.sequelizeModel.destroy({
109
- where: {
110
- id: { [sequelize_1.Op.in]: toBeDeleted },
111
- },
112
- transaction: options?.transaction,
113
- }),
114
- ]);
78
+ const upserted = await this.sequelizeModel.bulkCreate(data, {
79
+ updateOnDuplicate: this.getUpdateAttributes(),
80
+ transaction: options?.transaction,
81
+ });
82
+ this.logger.info(`${this.constructor.name}.upsertAll: upserted ${upserted.length} JIS events.`);
115
83
  return upserted;
116
84
  }
117
85
  catch (err) {
118
- if (err instanceof sequelize_1.ValidationError && err.errors?.length > 0) {
86
+ if (err instanceof sequelize_1.ValidationError && err.errors?.length) {
119
87
  const mappedErrors = err.errors.map((e) => `${e.message} (${e.value})`).join(", ");
120
- throw new golemio_errors_1.ValidationError(`Validation error in refreshData: ${mappedErrors}`, this.constructor.name, err, undefined, "pid");
88
+ throw new golemio_errors_1.ValidationError(`Validation error in upsertAll: ${mappedErrors}`, this.constructor.name, err, undefined, "pid");
121
89
  }
122
- throw new golemio_errors_1.GeneralError("Error in refreshData", this.constructor.name, err);
90
+ throw new golemio_errors_1.GeneralError("Error in upsertAll", this.constructor.name, err);
123
91
  }
124
92
  }
125
93
  getUpdateAttributes() {
126
94
  return Object.keys(JISEventsModel_1.JISEventsModel.attributeModel).filter((attribute) => !["created_at"].includes(attribute));
127
95
  }
128
- async deleteAndCountAll(options) {
129
- try {
130
- return await this.sequelizeModel.destroy({ where: {}, transaction: options?.transaction });
131
- }
132
- catch (err) {
133
- throw new golemio_errors_1.GeneralError("Error in deleteAndCountAll", this.constructor.name, err);
134
- }
135
- }
136
96
  };
137
97
  exports.JISEventsRepository = JISEventsRepository = __decorate([
138
98
  (0, tsyringe_1.injectable)(),
@@ -1 +1 @@
1
- {"version":3,"file":"JISEventsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,0FAAgE;AAIhE,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAyF;AACzF,mFAAkF;AAClF,mEAAgI;AAChI,iEAAwE;AACxE,gEAA6D;AAC7D,6FAA0F;AAC1F,gDAA2D;AAC3D,0FAAqF;AAO9E,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,6DAA6B;IAQlE,YACyC,SAA6B,EACxC,MAAuB,EAEjD,+BAA2E;QAE3E,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAJS,WAAM,GAAN,MAAM,CAAS;QAEzC,oCAA+B,GAA/B,+BAA+B,CAAoC;QAVxE,WAAM,GAAG,iBAAS,CAAC;Q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AAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACjH,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,OAA2B;QACtD,IAAI;YACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;SAC9F;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,4BAA4B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACpF;IACL,CAAC;CACJ,CAAA;8BAtIY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAUJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,kCAAkC,CAAC,CAAA;qDACpB,uEAAkC;GAZtE,mBAAmB,CAsI/B"}
1
+ {"version":3,"file":"JISEventsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,6DAAuC;AACvC,0FAAgE;AAIhE,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAyF;AACzF,mFAAkF;AAClF,mEAAgI;AAChI,iEAAwE;AACxE,gEAA6D;AAC7D,6FAA0F;AAC1F,gDAA2D;AAC3D,0FAAqF;AAO9E,IAAM,mBAAmB,iCAAzB,MAAM,mBAAoB,SAAQ,6DAA6B;IAQlE,YACyC,SAA6B,EACxC,MAAuB,EAEjD,+BAA2E;QAE3E,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAJS,WAAM,GAAN,MAAM,CAAS;QAEzC,oCAA+B,GAA/B,+BAA+B,CAAoC;QAVxE,WAAM,GAAG,iBAAS,CAAC;QACnB,cAA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AAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;IACjH,CAAC;CACJ,CAAA;8BA1FY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAUJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,kCAAkC,CAAC,CAAA;qDACpB,uEAAkC;GAZtE,mBAAmB,CA0F/B"}
@@ -15,7 +15,6 @@ export declare class JISEventsRopidGTFSRoutesRepository extends AbstractValidata
15
15
  tableName: string;
16
16
  private sequelizeModel;
17
17
  constructor(connector: IDatabaseConnector, logger: ILogger);
18
- deleteAndCountAllLastUpdatedBefore(dateTime: Date, options?: RepositoryOptions): Promise<number>;
19
18
  /**
20
19
  * Insert or update all given data. In case of an update, all attributes except for `created_at` shall be overwritten.
21
20
  *
@@ -25,6 +24,5 @@ export declare class JISEventsRopidGTFSRoutesRepository extends AbstractValidata
25
24
  */
26
25
  upsertAll(data: IJISEventsRopidGTFSRoutes[], options?: RepositoryOptions): ReturnType<ModelStatic<JISEventsRopidGTFSRoutesModel>["bulkCreate"]>;
27
26
  private getUpdateAttributes;
28
- deleteAndCountAll(options?: RepositoryOptions): Promise<number>;
29
27
  }
30
28
  export {};
@@ -32,19 +32,6 @@ let JISEventsRopidGTFSRoutesRepository = exports.JISEventsRopidGTFSRoutesReposit
32
32
  .getConnection()
33
33
  .define(this.tableName, JISEventsRopidGTFSRoutesModel_1.JISEventsRopidGTFSRoutesModel.attributeModel, { schema: this.schema });
34
34
  }
35
- async deleteAndCountAllLastUpdatedBefore(dateTime, options) {
36
- try {
37
- return await this.sequelizeModel.destroy({
38
- where: {
39
- updated_at: { [sequelize_1.Op.lt]: dateTime },
40
- },
41
- transaction: options?.transaction,
42
- });
43
- }
44
- catch (err) {
45
- throw new golemio_errors_1.GeneralError("Error in deleteAndCountAllLastUpdatedBefore", this.constructor.name, err);
46
- }
47
- }
48
35
  /**
49
36
  * Insert or update all given data. In case of an update, all attributes except for `created_at` shall be overwritten.
50
37
  *
@@ -70,14 +57,6 @@ let JISEventsRopidGTFSRoutesRepository = exports.JISEventsRopidGTFSRoutesReposit
70
57
  getUpdateAttributes() {
71
58
  return Object.keys(JISEventsRopidGTFSRoutesModel_1.JISEventsRopidGTFSRoutesModel.attributeModel).filter((attribute) => !["created_at"].includes(attribute));
72
59
  }
73
- async deleteAndCountAll(options) {
74
- try {
75
- return await this.sequelizeModel.destroy({ where: {}, transaction: options?.transaction });
76
- }
77
- catch (err) {
78
- throw new golemio_errors_1.GeneralError("Error in deleteAndCountAll", this.constructor.name, err);
79
- }
80
- }
81
60
  };
82
61
  exports.JISEventsRopidGTFSRoutesRepository = JISEventsRopidGTFSRoutesRepository = __decorate([
83
62
  (0, tsyringe_1.injectable)(),
@@ -1 +1 @@
1
- {"version":3,"file":"JISEventsRopidGTFSRoutesRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,wHAA8F;AAI9F,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAyF;AACzF,mFAAkF;AAClF,mEAAgI;AAChI,iEAAwE;AAOjE,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,6DAA6B;IAOjF,YACyC,SAA6B,EACxC,MAAuB;QAEjD,KAAK,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAFS,WAAM,GAAN,MAAM,CAAS;QAP9C,WAAM,GAAG,iBAAS,CAAC;QACnB,cAAS,GAAG,6DAA6B,CAAC,SAAS,CAAC;QASvD,IAAI,CAAC,SAAS,GAAG,IAAI,uCAAmB,CAAC,oCAAoC,EAAE,6DAA6B,CAAC,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IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,EACH,SAAS,EACT,KAAK,CACR,CAAC;aACL;YACD,MAAM,IAAI,6BAAY,CAAC,oBAAoB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC5E;IACL,CAAC;IAEO,mBAAmB;QACvB,OAAO,MAAM,CAAC,IAAI,CAAC,6DAA6B,CAAC,cAAc,CAAC,CAAC,MAAM,CACnE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CACrD,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,OAA2B;QACtD,IAAI;YACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;SAC9F;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,4BAA4B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACpF;IACL,CAAC;CACJ,CAAA;6CA3EY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,kCAAkC,CA2E9C"}
1
+ {"version":3,"file":"JISEventsRopidGTFSRoutesRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/repositories/JISEventsRopidGTFSRoutesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AACvC,wHAA8F;AAI9F,8IAA2I;AAC3I,wEAAqE;AACrE,6EAAyF;AACzF,mFAAkF;AAClF,mEAAgI;AAChI,iEAAwE;AAOjE,IAAM,kCAAkC,gDAAxC,MAAM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AE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC5E;IACL,CAAC;IAEO,mBAAmB;QACvB,OAAO,MAAM,CAAC,IAAI,CAAC,6DAA6B,CAAC,cAAc,CAAC,CAAC,MAAM,CACnE,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CACrD,CAAC;IACN,CAAC;CACJ,CAAA;6CAtDY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,kCAAkC,CAsD9C"}
@@ -10,11 +10,11 @@ export declare class JISEventsDataService {
10
10
  private logger;
11
11
  constructor(eventsRepository: JISEventsRepository, eventsRopidGTFSRoutesRepository: JISEventsRopidGTFSRoutesRepository, databaseConnector: IDatabaseConnector, logger: ILogger);
12
12
  /**
13
- * Insert or update all given events and eventsRopidGTFSRoutes data. In case of an update, all attributes except for
14
- * `created_at` shall be overwritten. Delete all non-updated data from before the refresh.
13
+ * Refresh all JIS event data by inserting or updating the given events and their ROPID-GTFS routes.
14
+ * Existing records are preserved and only incoming events/routes are upserted.
15
15
  *
16
- * @param events The events data to be upserted
17
- * @param eventsRopidGTFSRoutes The eventsRopidGTFSRoutes data to be upserted
16
+ * @param events Array of JIS events to insert or update.
17
+ * @param eventsRopidGTFSRoutes Array of corresponding ROPID-GTFS route records to insert or update.
18
18
  */
19
- refreshData(events: IJISEvent[], eventsRopidGTFSRoutes: IJISEventsRopidGTFSRoutes[]): Promise<void>;
19
+ upsertAll(events: IJISEvent[], eventsRopidGTFSRoutes: IJISEventsRopidGTFSRoutes[]): Promise<void>;
20
20
  }
@@ -28,29 +28,25 @@ let JISEventsDataService = exports.JISEventsDataService = class JISEventsDataSer
28
28
  // do nothing
29
29
  }
30
30
  /**
31
- * Insert or update all given events and eventsRopidGTFSRoutes data. In case of an update, all attributes except for
32
- * `created_at` shall be overwritten. Delete all non-updated data from before the refresh.
31
+ * Refresh all JIS event data by inserting or updating the given events and their ROPID-GTFS routes.
32
+ * Existing records are preserved and only incoming events/routes are upserted.
33
33
  *
34
- * @param events The events data to be upserted
35
- * @param eventsRopidGTFSRoutes The eventsRopidGTFSRoutes data to be upserted
34
+ * @param events Array of JIS events to insert or update.
35
+ * @param eventsRopidGTFSRoutes Array of corresponding ROPID-GTFS route records to insert or update.
36
36
  */
37
- async refreshData(events, eventsRopidGTFSRoutes) {
37
+ async upsertAll(events, eventsRopidGTFSRoutes) {
38
38
  const connection = this.databaseConnector.getConnection();
39
39
  const transaction = await connection.transaction();
40
- const saveTime = new Date();
41
40
  try {
42
41
  if (events.length === 0) {
43
- await this.eventsRopidGTFSRoutesRepository.deleteAndCountAll({ transaction });
44
- await this.eventsRepository.deleteAndCountAll({ transaction });
42
+ this.logger.info(`${this.constructor.name}.upsertAll: 0 events were imported - keeping existing data`);
45
43
  await transaction.commit();
46
- this.logger.info(`${this.constructor.name}.refreshData: all JIS events were deleted because 0 events were imported`);
47
44
  }
48
45
  else {
49
- await this.eventsRepository.refreshData(events, { transaction });
46
+ await this.eventsRepository.upsertAll(events, { transaction });
50
47
  await this.eventsRopidGTFSRoutesRepository.upsertAll(eventsRopidGTFSRoutes, { transaction });
51
- await this.eventsRopidGTFSRoutesRepository.deleteAndCountAllLastUpdatedBefore(saveTime, { transaction });
52
48
  await transaction.commit();
53
- this.logger.info(`${this.constructor.name}.refreshData: ${events.length} JIS events and ` +
49
+ this.logger.info(`${this.constructor.name}.upsertAll: ${events.length} JIS events and ` +
54
50
  `${eventsRopidGTFSRoutes.length} JIS eventsRopidGTFSRoutes were saved`);
55
51
  }
56
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"JISEventsDataService.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/services/JISEventsDataService.ts"],"names":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IAAI,CAAC,+BAA+B,CAAC,kCAAkC,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;gBACzG,MAAM,WAAW,CAAC,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CACZ,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iBAAiB,MAAM,CAAC,MAAM,kBAAkB;oBACpE,GAAG,qBAAqB,CAAC,MAAM,uCAAuC,CAC7E,CAAC;aACL;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,WAAW,CAAC,QAAQ,EAAE,CAAC;YAC7B,IAAI,GAAG,YAAY,6BAAY;gBAAE,MAAM,GAAG,CAAC;YAC3C,MAAM,IAAI,6BAAY,CAAC,0CAA0C,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAClG;IACL,CAAC;CACJ,CAAA;+BAhDY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,mBAAmB,CAAC,CAAA;IAE7C,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,kCAAkC,CAAC,CAAA;IAE5D,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCAJC,yCAAmB;QAEJ,uEAAkC;GALtE,oBAAoB,CAgDhC"}
1
+ {"version":3,"file":"JISEventsDataService.js","sourceRoot":"","sources":["../../../../src/integration-engine/jis/services/JISEventsDataService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAkE;AAClE,6EAA+E;AAC/E,2GAA6G;AAI7G,wEAAqE;AACrE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,oBAAoB,kCAA1B,MAAM,oBAAoB;IAC7B,YAEY,gBAAqC,EAErC,+BAAmE,EAC9B,iBAAqC,EAChD,MAA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;IACL,CAAC;CACJ,CAAA;+BA1CY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,mBAAmB,CAAC,CAAA;IAE7C,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,kCAAkC,CAAC,CAAA;IAE5D,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCAJC,yCAAmB;QAEJ,uEAAkC;GALtE,oBAAoB,CA0ChC"}
@@ -33,7 +33,7 @@ let RefreshJISEventsTask = exports.RefreshJISEventsTask = class RefreshJISEvents
33
33
  async execute(data) {
34
34
  const transformedData = this.eventsTransformation.transformArray(data);
35
35
  const { events, eventsRopidGTFSRoutes } = this.getEntitiesFromTransformationResult(transformedData);
36
- await this.eventsDataService.refreshData(events, eventsRopidGTFSRoutes);
36
+ await this.eventsDataService.upsertAll(events, eventsRopidGTFSRoutes);
37
37
  }
38
38
  getEntitiesFromTransformationResult(transformedData) {
39
39
  const eventEntities = [];
@@ -1 +1 @@
1
- {"version":3,"file":"RefreshJISEventsTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/jis/workers/tasks/RefreshJISEventsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mEAAkE;AAClE,8EAA6E;AAC7E,2FAA0F;AAE1F,4GAA+E;AAE/E,iHAA8G;AAC9G,mFAAkF;AAClF,iEAAwE;AACxE,4CAA+C;AAGxC,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,+CAAmC;IAKzE,YAEI,iBAA+C,EAE/C,oBAAqD;QAErD,KAAK,CAAC,2BAAe,CAAC,WAAW,EAAE,CAAC,CAAC;QAJ7B,sBAAiB,GAAjB,iBAAiB,CAAsB;QAEvC,yBAAoB,GAApB,oBAAoB,CAAyB;QARzC,WAAM,GAAG,IAAI,uCAAmB,C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AO;YACH,MAAM,EAAE,aAAa;YACrB,qBAAqB,EAAE,6BAA6B;SACvD,CAAC;IACN,CAAC;CACJ,CAAA;+BAnCY,oBAAoB;IADhC,IAAA,qBAAU,GAAE;IAOJ,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,oBAAoB,CAAC,CAAA;IAE9C,WAAA,IAAA,iBAAM,EAAC,qCAAiB,CAAC,uBAAuB,CAAC,CAAA;qCADvB,2CAAoB;QAEjB,iDAAuB;GAThD,oBAAoB,CAmChC"}
@@ -1205,7 +1205,7 @@ paths:
1205
1205
  - headsign
1206
1206
  - id
1207
1207
  properties:
1208
- headsign:
1208
+ headsign:
1209
1209
  type: string
1210
1210
  example: "Benešov u Prahy"
1211
1211
  nullable: false
@@ -1237,7 +1237,7 @@ paths:
1237
1237
  - "inline"
1238
1238
  - "general"
1239
1239
  nullable: false
1240
-
1240
+
1241
1241
  "401":
1242
1242
  $ref: "#/components/responses/UnauthorizedError"
1243
1243
  "404":
@@ -1337,12 +1337,12 @@ paths:
1337
1337
  /v3/pid/departurepresets:
1338
1338
  get:
1339
1339
  summary: Get ROPID departures presets linked with gtfs stops
1340
- tags:
1340
+ tags:
1341
1341
  - 🚏 PID Departure Boards (v3) - internal
1342
-
1342
+
1343
1343
  responses:
1344
1344
  200:
1345
-
1345
+
1346
1346
  description: A list of ROPID departures presets linked with gtfs stops
1347
1347
  headers:
1348
1348
  Cache-Control:
@@ -2467,7 +2467,7 @@ components:
2467
2467
  enum:
2468
2468
  - inline
2469
2469
  - general
2470
- description: Type of display on board by the intended form of presentation (where applicable). Enumerating `inline` (to be presented along with departures, usually in a marquee), `general` (to be displayed full screen instead of departures), `general-alternate` (full screen alternates with departures).
2470
+ description: Type of display on board by the intended form of presentation (where applicable). Enumerating `inline` (to be presented along with departures, usually in a marquee), `general` (to be displayed full screen instead of departures).
2471
2471
  example: "inline"
2472
2472
 
2473
2473
  required:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/pid",
3
- "version": "3.15.2-rc.1828866938",
3
+ "version": "3.15.2-rc.1852456410",
4
4
  "description": "Golemio PID Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",