@tmlmobilidade/interfaces 20260322.1655.45 → 20260322.1829.11
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/dist/clickhouse/index.d.ts +1 -0
- package/dist/clickhouse/index.js +1 -0
- package/dist/clickhouse/simplified-apex-locations/service.js +1 -1
- package/dist/clickhouse/simplified-apex-on-board-refunds/service.js +1 -1
- package/dist/clickhouse/simplified-apex-on-board-sales/service.js +1 -1
- package/dist/clickhouse/simplified-apex-validations/service.js +1 -1
- package/dist/clickhouse/simplified-vehicle-events/index.d.ts +2 -0
- package/dist/clickhouse/simplified-vehicle-events/index.js +2 -0
- package/dist/clickhouse/simplified-vehicle-events/schema.d.ts +3 -0
- package/dist/clickhouse/simplified-vehicle-events/schema.js +24 -0
- package/dist/clickhouse/simplified-vehicle-events/service.d.ts +32 -0
- package/dist/clickhouse/simplified-vehicle-events/service.js +15 -0
- package/package.json +1 -1
|
@@ -2,3 +2,4 @@ export * from './simplified-apex-locations/index.js';
|
|
|
2
2
|
export * from './simplified-apex-on-board-refunds/index.js';
|
|
3
3
|
export * from './simplified-apex-on-board-sales/index.js';
|
|
4
4
|
export * from './simplified-apex-validations/index.js';
|
|
5
|
+
export * from './simplified-vehicle-events/index.js';
|
package/dist/clickhouse/index.js
CHANGED
|
@@ -2,3 +2,4 @@ export * from './simplified-apex-locations/index.js';
|
|
|
2
2
|
export * from './simplified-apex-on-board-refunds/index.js';
|
|
3
3
|
export * from './simplified-apex-on-board-sales/index.js';
|
|
4
4
|
export * from './simplified-apex-validations/index.js';
|
|
5
|
+
export * from './simplified-vehicle-events/index.js';
|
|
@@ -4,7 +4,7 @@ import { ClickHouseTable } from '@tmlmobilidade/clickhouse';
|
|
|
4
4
|
/* * */
|
|
5
5
|
class SimplifiedApexLocationsNewClass extends ClickHouseTable {
|
|
6
6
|
//
|
|
7
|
-
databaseName = '
|
|
7
|
+
databaseName = 'operation';
|
|
8
8
|
schema = simplifiedApexLocationsSchema;
|
|
9
9
|
tableName = 'simplified_apex_locations';
|
|
10
10
|
async postInit() {
|
|
@@ -4,7 +4,7 @@ import { ClickHouseTable } from '@tmlmobilidade/clickhouse';
|
|
|
4
4
|
/* * */
|
|
5
5
|
class SimplifiedApexOnBoardRefundsNewClass extends ClickHouseTable {
|
|
6
6
|
//
|
|
7
|
-
databaseName = '
|
|
7
|
+
databaseName = 'operation';
|
|
8
8
|
schema = simplifiedApexOnBoardRefundsSchema;
|
|
9
9
|
tableName = 'simplified_apex_on-board-refunds';
|
|
10
10
|
async postInit() {
|
|
@@ -4,7 +4,7 @@ import { ClickHouseTable } from '@tmlmobilidade/clickhouse';
|
|
|
4
4
|
/* * */
|
|
5
5
|
class SimplifiedApexOnBoardSalesNewClass extends ClickHouseTable {
|
|
6
6
|
//
|
|
7
|
-
databaseName = '
|
|
7
|
+
databaseName = 'operation';
|
|
8
8
|
schema = simplifiedApexOnBoardSalesSchema;
|
|
9
9
|
tableName = 'simplified_apex_on-board-sales';
|
|
10
10
|
async postInit() {
|
|
@@ -4,7 +4,7 @@ import { ClickHouseTable } from '@tmlmobilidade/clickhouse';
|
|
|
4
4
|
/* * */
|
|
5
5
|
class SimplifiedApexValidationsNewClass extends ClickHouseTable {
|
|
6
6
|
//
|
|
7
|
-
databaseName = '
|
|
7
|
+
databaseName = 'operation';
|
|
8
8
|
schema = simplifiedApexValidationsSchema;
|
|
9
9
|
tableName = 'simplified_apex_validations';
|
|
10
10
|
async postInit() {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
/* * */
|
|
3
|
+
export const simplifiedVehicleEventsSchema = [
|
|
4
|
+
//
|
|
5
|
+
// Required Fields
|
|
6
|
+
{ name: '_id', type: 'String' },
|
|
7
|
+
{ name: 'agency_id', type: 'String' },
|
|
8
|
+
{ name: 'created_at', type: 'UInt64' },
|
|
9
|
+
{ name: 'latitude', type: 'Float64' },
|
|
10
|
+
{ name: 'longitude', type: 'Float64' },
|
|
11
|
+
{ name: 'received_at', type: 'UInt64' },
|
|
12
|
+
{ name: 'trip_id', type: 'String' },
|
|
13
|
+
{ name: 'vehicle_id', type: 'String' },
|
|
14
|
+
// Optional Fields
|
|
15
|
+
{ name: 'bearing', type: 'Nullable(Float64)' },
|
|
16
|
+
{ name: 'current_status', type: 'Nullable(String)' },
|
|
17
|
+
{ name: 'door', type: 'Nullable(String)' },
|
|
18
|
+
{ name: 'driver_id', type: 'Nullable(String)' },
|
|
19
|
+
{ name: 'extra_trip_id', type: 'Nullable(String)' },
|
|
20
|
+
{ name: 'odometer', type: 'Nullable(Float64)' },
|
|
21
|
+
{ name: 'pattern_id', type: 'Nullable(String)' },
|
|
22
|
+
{ name: 'stop_id', type: 'Nullable(String)' },
|
|
23
|
+
];
|
|
24
|
+
/* * */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ClickHouseTable } from '@tmlmobilidade/clickhouse';
|
|
2
|
+
import { type SimplifiedVehicleEvent } from '@tmlmobilidade/types';
|
|
3
|
+
declare class SimplifiedVehicleEventsNewClass extends ClickHouseTable<SimplifiedVehicleEvent> {
|
|
4
|
+
databaseName: string;
|
|
5
|
+
schema: import("@tmlmobilidade/clickhouse").ClickHouseColumn<{
|
|
6
|
+
_id: string;
|
|
7
|
+
created_at: number & {
|
|
8
|
+
__brand: "UnixTimestamp";
|
|
9
|
+
};
|
|
10
|
+
latitude: number;
|
|
11
|
+
longitude: number;
|
|
12
|
+
agency_id: string;
|
|
13
|
+
pattern_id: string | null;
|
|
14
|
+
received_at: number & {
|
|
15
|
+
__brand: "UnixTimestamp";
|
|
16
|
+
};
|
|
17
|
+
stop_id: string | null;
|
|
18
|
+
trip_id: string;
|
|
19
|
+
vehicle_id: string;
|
|
20
|
+
bearing: number | null;
|
|
21
|
+
odometer: number | null;
|
|
22
|
+
speed: number | null;
|
|
23
|
+
current_status: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO" | null;
|
|
24
|
+
door: string | null;
|
|
25
|
+
driver_id: string | null;
|
|
26
|
+
extra_trip_id: string | null;
|
|
27
|
+
}>[];
|
|
28
|
+
tableName: string;
|
|
29
|
+
postInit(): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
export declare const simplifiedVehicleEventsNew: SimplifiedVehicleEventsNewClass;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { simplifiedVehicleEventsSchema } from './schema.js';
|
|
3
|
+
import { ClickHouseTable } from '@tmlmobilidade/clickhouse';
|
|
4
|
+
/* * */
|
|
5
|
+
class SimplifiedVehicleEventsNewClass extends ClickHouseTable {
|
|
6
|
+
//
|
|
7
|
+
databaseName = 'operation';
|
|
8
|
+
schema = simplifiedVehicleEventsSchema;
|
|
9
|
+
tableName = 'simplified_vehicle_events';
|
|
10
|
+
async postInit() {
|
|
11
|
+
console.log('Post init ClickHouse service for Simplified Vehicle Events...');
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
/* * */
|
|
15
|
+
export const simplifiedVehicleEventsNew = new SimplifiedVehicleEventsNewClass();
|