@tmlmobilidade/go-interfaces-labdb 20260902.1453.48 → 20260902.1821.41

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.
@@ -1,6 +1,6 @@
1
1
  import { ClickHouseInterfaceTemplate } from '../interface.template.js';
2
2
  import { ClickHouseClient } from '@tmlmobilidade/go-clients-clickhouse';
3
- import { HashedShape, RideProcessingWindow, type HashedTrip, type RideAnalysisAtLeastOneVehicleEventOnFirstStop, type RideAnalysisAtLeastOneVehicleEventOnLastStop, type RideAnalysisExpectedApexValidationInterval, type RideAnalysisExpectedDriverIdQty, type RideAnalysisExpectedStartTime, type RideAnalysisExpectedVehicleEventDelay, type RideAnalysisExpectedVehicleEventInterval, type RideAnalysisExpectedVehicleEventQty, type RideAnalysisExpectedVehicleIdQty, type RideAnalysisMatchingApexLocations, type RideAnalysisMatchingVehicleIds, type RideAnalysisSimpleOneApexValidation, type RideAnalysisSimpleOneVehicleEventOrApexValidation, type RideAnalysisSimpleThreeVehicleEvents, type RideAnalysisTransactionSequentiality } from '@tmlmobilidade/go-types-operation';
3
+ import { HashedShape, EventRideOpportunity, type HashedTrip, type RideAnalysisAtLeastOneVehicleEventOnFirstStop, type RideAnalysisAtLeastOneVehicleEventOnLastStop, type RideAnalysisExpectedApexValidationInterval, type RideAnalysisExpectedDriverIdQty, type RideAnalysisExpectedStartTime, type RideAnalysisExpectedVehicleEventDelay, type RideAnalysisExpectedVehicleEventInterval, type RideAnalysisExpectedVehicleEventQty, type RideAnalysisExpectedVehicleIdQty, type RideAnalysisMatchingApexLocations, type RideAnalysisMatchingVehicleIds, type RideAnalysisSimpleOneApexValidation, type RideAnalysisSimpleOneVehicleEventOrApexValidation, type RideAnalysisSimpleThreeVehicleEvents, type RideAnalysisTransactionSequentiality } from '@tmlmobilidade/go-types-operation';
4
4
  import { type Ride } from '@tmlmobilidade/go-types-operation';
5
5
  import { type SimplifiedVehicleEvent } from '@tmlmobilidade/go-types-vehicle-events';
6
6
  export declare class OperationDatabase {
@@ -21,7 +21,7 @@ export declare class OperationDatabase {
21
21
  readonly rideAnalysisSimpleOneVehicleEventOrApexValidation: ClickHouseInterfaceTemplate<RideAnalysisSimpleOneVehicleEventOrApexValidation>;
22
22
  readonly rideAnalysisSimpleThreeVehicleEvents: ClickHouseInterfaceTemplate<RideAnalysisSimpleThreeVehicleEvents>;
23
23
  readonly rideAnalysisTransactionSequentiality: ClickHouseInterfaceTemplate<RideAnalysisTransactionSequentiality>;
24
- readonly rideProcessingWindows: ClickHouseInterfaceTemplate<RideProcessingWindow>;
24
+ readonly eventRideOpportunities: ClickHouseInterfaceTemplate<EventRideOpportunity>;
25
25
  readonly rides: ClickHouseInterfaceTemplate<Ride>;
26
26
  readonly simplifiedVehicleEvents: ClickHouseInterfaceTemplate<SimplifiedVehicleEvent>;
27
27
  private readonly databaseName;
@@ -1,6 +1,6 @@
1
1
  /* * */
2
2
  import { ClickHouseInterfaceTemplate } from '../interface.template.js';
3
- import { hashedShapeTableSchema, hashedTripTableSchema, rideAnalysisAtLeastOneVehicleEventOnFirstStopTableSchema, rideAnalysisAtLeastOneVehicleEventOnLastStopTableSchema, rideAnalysisExpectedApexValidationIntervalTableSchema, rideAnalysisExpectedDriverIdQtyTableSchema, rideAnalysisExpectedStartTimeTableSchema, rideAnalysisExpectedVehicleEventDelayTableSchema, rideAnalysisExpectedVehicleEventIntervalTableSchema, rideAnalysisExpectedVehicleEventQtyTableSchema, rideAnalysisExpectedVehicleIdQtyTableSchema, rideAnalysisMatchingApexLocationsTableSchema, rideAnalysisMatchingVehicleIdsTableSchema, rideAnalysisSimpleOneApexValidationTableSchema, rideAnalysisSimpleOneVehicleEventOrApexValidationTableSchema, rideAnalysisSimpleThreeVehicleEventsTableSchema, rideAnalysisTransactionSequentialityTableSchema, rideProcessingWindowTableSchema, ridesTableSchema, simplifiedVehicleEventTableSchema } from '../schemas/operation.js';
3
+ import { eventRideOpportunitiesTableSchema, hashedShapeTableSchema, hashedTripTableSchema, rideAnalysisAtLeastOneVehicleEventOnFirstStopTableSchema, rideAnalysisAtLeastOneVehicleEventOnLastStopTableSchema, rideAnalysisExpectedApexValidationIntervalTableSchema, rideAnalysisExpectedDriverIdQtyTableSchema, rideAnalysisExpectedStartTimeTableSchema, rideAnalysisExpectedVehicleEventDelayTableSchema, rideAnalysisExpectedVehicleEventIntervalTableSchema, rideAnalysisExpectedVehicleEventQtyTableSchema, rideAnalysisExpectedVehicleIdQtyTableSchema, rideAnalysisMatchingApexLocationsTableSchema, rideAnalysisMatchingVehicleIdsTableSchema, rideAnalysisSimpleOneApexValidationTableSchema, rideAnalysisSimpleOneVehicleEventOrApexValidationTableSchema, rideAnalysisSimpleThreeVehicleEventsTableSchema, rideAnalysisTransactionSequentialityTableSchema, ridesTableSchema, simplifiedVehicleEventTableSchema } from '../schemas/operation.js';
4
4
  /* * */
5
5
  export class OperationDatabase {
6
6
  //
@@ -21,7 +21,7 @@ export class OperationDatabase {
21
21
  rideAnalysisSimpleOneVehicleEventOrApexValidation;
22
22
  rideAnalysisSimpleThreeVehicleEvents;
23
23
  rideAnalysisTransactionSequentiality;
24
- rideProcessingWindows;
24
+ eventRideOpportunities;
25
25
  rides;
26
26
  simplifiedVehicleEvents;
27
27
  databaseName = 'operation';
@@ -111,8 +111,8 @@ export class OperationDatabase {
111
111
  orderBy: ['ride_id'],
112
112
  partitionBy: 'intDiv(operational_date, 100)',
113
113
  });
114
- this.rideProcessingWindows = new ClickHouseInterfaceTemplate(instance, this.databaseName, 'ride_processing_windows', rideProcessingWindowTableSchema, {
115
- engine: 'ReplacingMergeTree(generated_at)',
114
+ this.eventRideOpportunities = new ClickHouseInterfaceTemplate(instance, this.databaseName, 'event_ride_opportunities', eventRideOpportunitiesTableSchema, {
115
+ engine: 'ReplacingMergeTree(_id)',
116
116
  orderBy: ['agency_id', 'trip_id', 'window_start', 'window_end'],
117
117
  });
118
118
  this.rides = new ClickHouseInterfaceTemplate(instance, this.databaseName, 'rides', ridesTableSchema, {
@@ -144,7 +144,7 @@ export class OperationDatabase {
144
144
  await this.rideAnalysisSimpleOneVehicleEventOrApexValidation.init();
145
145
  await this.rideAnalysisSimpleThreeVehicleEvents.init();
146
146
  await this.rideAnalysisTransactionSequentiality.init();
147
- await this.rideProcessingWindows.init();
147
+ await this.eventRideOpportunities.init();
148
148
  await this.rides.init();
149
149
  await this.simplifiedVehicleEvents.init();
150
150
  }
@@ -1,5 +1,5 @@
1
1
  import { type ClickHouseTableSchema } from '@tmlmobilidade/go-clients-clickhouse';
2
- import { RideProcessingWindow, type HashedShape, type HashedTrip, type Ride, type RideAnalysisAtLeastOneVehicleEventOnFirstStop, type RideAnalysisAtLeastOneVehicleEventOnLastStop, type RideAnalysisExpectedApexValidationInterval, type RideAnalysisExpectedDriverIdQty, type RideAnalysisExpectedStartTime, type RideAnalysisExpectedVehicleEventDelay, type RideAnalysisExpectedVehicleEventInterval, type RideAnalysisExpectedVehicleEventQty, type RideAnalysisExpectedVehicleIdQty, type RideAnalysisMatchingApexLocations, type RideAnalysisMatchingVehicleIds, type RideAnalysisSimpleOneApexValidation, type RideAnalysisSimpleOneVehicleEventOrApexValidation, type RideAnalysisSimpleThreeVehicleEvents, type RideAnalysisTransactionSequentiality } from '@tmlmobilidade/go-types-operation';
2
+ import { EventRideOpportunity, type HashedShape, type HashedTrip, type Ride, type RideAnalysisAtLeastOneVehicleEventOnFirstStop, type RideAnalysisAtLeastOneVehicleEventOnLastStop, type RideAnalysisExpectedApexValidationInterval, type RideAnalysisExpectedDriverIdQty, type RideAnalysisExpectedStartTime, type RideAnalysisExpectedVehicleEventDelay, type RideAnalysisExpectedVehicleEventInterval, type RideAnalysisExpectedVehicleEventQty, type RideAnalysisExpectedVehicleIdQty, type RideAnalysisMatchingApexLocations, type RideAnalysisMatchingVehicleIds, type RideAnalysisSimpleOneApexValidation, type RideAnalysisSimpleOneVehicleEventOrApexValidation, type RideAnalysisSimpleThreeVehicleEvents, type RideAnalysisTransactionSequentiality } from '@tmlmobilidade/go-types-operation';
3
3
  import { type SimplifiedVehicleEvent } from '@tmlmobilidade/go-types-vehicle-events';
4
4
  export declare const simplifiedVehicleEventTableSchema: ClickHouseTableSchema<SimplifiedVehicleEvent>;
5
5
  export declare const hashedShapeTableSchema: ClickHouseTableSchema<HashedShape>;
@@ -20,4 +20,4 @@ export declare const rideAnalysisSimpleOneVehicleEventOrApexValidationTableSchem
20
20
  export declare const rideAnalysisSimpleThreeVehicleEventsTableSchema: ClickHouseTableSchema<RideAnalysisSimpleThreeVehicleEvents>;
21
21
  export declare const rideAnalysisTransactionSequentialityTableSchema: ClickHouseTableSchema<RideAnalysisTransactionSequentiality>;
22
22
  export declare const ridesTableSchema: ClickHouseTableSchema<Ride>;
23
- export declare const rideProcessingWindowTableSchema: ClickHouseTableSchema<RideProcessingWindow>;
23
+ export declare const eventRideOpportunitiesTableSchema: ClickHouseTableSchema<EventRideOpportunity>;
@@ -198,11 +198,13 @@ export const ridesTableSchema = {
198
198
  vehicle_ids: { type: 'Array(LowCardinality(String))' },
199
199
  };
200
200
  /* * */
201
- export const rideProcessingWindowTableSchema = {
201
+ export const eventRideOpportunitiesTableSchema = {
202
+ _id: { type: 'String' },
202
203
  agency_id: { type: 'LowCardinality(String)' },
203
204
  trip_id: { type: 'LowCardinality(String)' },
204
205
  window_start: { type: 'Int64 CODEC(DoubleDelta, ZSTD)' },
205
206
  window_end: { type: 'Int64 CODEC(DoubleDelta, ZSTD)' },
206
- operational_dates: { type: 'Array(UInt32 CODEC(T64, ZSTD))' },
207
- generated_at: { type: 'Int64 CODEC(DoubleDelta, ZSTD)' },
207
+ operational_dates: { type: 'Array(UInt32) CODEC(ZSTD)' },
208
+ processing_status: { type: 'LowCardinality(String)' },
209
+ updated_at: { type: 'Int64 CODEC(DoubleDelta, ZSTD)' },
208
210
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/go-interfaces-labdb",
3
- "version": "20260902.1453.48",
3
+ "version": "20260902.1821.41",
4
4
  "author": {
5
5
  "email": "iso@tmlmobilidade.pt",
6
6
  "name": "TML-ISO"