@openeld/openeld 0.1.0
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/README.md +40 -0
- package/buf/buf.gen.yaml +8 -0
- package/buf/buf.work.yaml +3 -0
- package/docs/architecture/.gitkeep +0 -0
- package/docs/architecture/README.md +3 -0
- package/docs/decisions/.gitkeep +0 -0
- package/docs/decisions/README.md +3 -0
- package/docs/protobuf/.gitkeep +0 -0
- package/docs/protobuf/README.md +28 -0
- package/docs/providers/.gitkeep +0 -0
- package/docs/providers/README.md +73 -0
- package/docs/providers/capability-matrix.md +13 -0
- package/docs/providers/geotab.md +37 -0
- package/docs/providers/keeptruckin.md +35 -0
- package/docs/providers/motive.md +36 -0
- package/docs/providers/provider-template.md +56 -0
- package/docs/providers/samsara.md +38 -0
- package/docs/providers/verification-matrix.md +13 -0
- package/docs/services/.gitkeep +0 -0
- package/docs/services/README.md +3 -0
- package/examples/ts/.gitkeep +0 -0
- package/examples/ts/README.md +3 -0
- package/package.json +34 -0
- package/proto/.gitkeep +0 -0
- package/proto/README.md +9 -0
- package/proto/common/metadata/.gitkeep +0 -0
- package/proto/common/metadata/audit.proto +22 -0
- package/proto/common/metadata/source.proto +31 -0
- package/proto/common/primitives/.gitkeep +0 -0
- package/proto/common/primitives/ids.proto +21 -0
- package/proto/common/primitives/location.proto +23 -0
- package/proto/common/primitives/time.proto +24 -0
- package/proto/common/units/.gitkeep +0 -0
- package/proto/common/units/measurements.proto +28 -0
- package/proto/logistics/asset.proto +24 -0
- package/proto/logistics/asset_location.proto +19 -0
- package/proto/logistics/assets/.gitkeep +0 -0
- package/proto/logistics/carrier.proto +18 -0
- package/proto/logistics/compliance/.gitkeep +0 -0
- package/proto/logistics/data_consent.proto +24 -0
- package/proto/logistics/diagnostics/.gitkeep +0 -0
- package/proto/logistics/driver.proto +28 -0
- package/proto/logistics/drivers/.gitkeep +0 -0
- package/proto/logistics/dvir.proto +34 -0
- package/proto/logistics/enums.proto +197 -0
- package/proto/logistics/events/.gitkeep +0 -0
- package/proto/logistics/gps_location.proto +24 -0
- package/proto/logistics/hos/.gitkeep +0 -0
- package/proto/logistics/hos_daily_summary.proto +38 -0
- package/proto/logistics/hos_event.proto +41 -0
- package/proto/logistics/ifta_trip.proto +24 -0
- package/proto/logistics/locations/.gitkeep +0 -0
- package/proto/logistics/safety_event.proto +27 -0
- package/proto/logistics/trips/.gitkeep +0 -0
- package/proto/logistics/vehicle.proto +25 -0
- package/proto/logistics/vehicle_assignment.proto +25 -0
- package/proto/logistics/vehicles/.gitkeep +0 -0
- package/proto/providers/eld/geotab/.gitkeep +0 -0
- package/proto/providers/eld/geotab/contracts.proto +105 -0
- package/proto/providers/eld/keeptruckin/.gitkeep +0 -0
- package/proto/providers/eld/keeptruckin/contracts.proto +103 -0
- package/proto/providers/eld/motive/.gitkeep +0 -0
- package/proto/providers/eld/motive/contracts.proto +108 -0
- package/proto/providers/eld/samsara/.gitkeep +0 -0
- package/proto/providers/eld/samsara/contracts.proto +110 -0
- package/proto/providers/eld/shared/.gitkeep +0 -0
- package/proto/providers/eld/shared/common.proto +174 -0
- package/proto/providers/telematics/fleet_complete/.gitkeep +0 -0
- package/proto/providers/telematics/fleet_complete/contracts.proto +13 -0
- package/proto/providers/telematics/fourkites/.gitkeep +0 -0
- package/proto/providers/telematics/fourkites/contracts.proto +13 -0
- package/proto/providers/telematics/project44/.gitkeep +0 -0
- package/proto/providers/telematics/project44/contracts.proto +13 -0
- package/proto/providers/telematics/shared/.gitkeep +0 -0
- package/proto/providers/telematics/shared/common.proto +48 -0
- package/proto/providers/telematics/verizon_connect/.gitkeep +0 -0
- package/proto/providers/telematics/verizon_connect/contracts.proto +13 -0
- package/proto/services/ingestion/.gitkeep +0 -0
- package/proto/services/ingestion/service.proto +37 -0
- package/proto/services/normalization/.gitkeep +0 -0
- package/proto/services/normalization/service.proto +62 -0
- package/proto/services/query/.gitkeep +0 -0
- package/proto/services/query/service.proto +238 -0
- package/proto/services/sync/.gitkeep +0 -0
- package/proto/services/sync/service.proto +89 -0
- package/proto/v1/.gitkeep +0 -0
- package/proto/v1/openeld.proto +39 -0
- package/src/adapters/providers/.gitkeep +0 -0
- package/src/clients/.gitkeep +0 -0
- package/src/fixture-normalization.ts +471 -0
- package/src/generated/README.md +3 -0
- package/src/generated/ts/.gitkeep +0 -0
- package/src/index.ts +1 -0
- package/src/mappers/.gitkeep +0 -0
- package/src/registry/.gitkeep +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.eld.keeptruckin.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
import "providers/eld/shared/common.proto";
|
|
7
|
+
|
|
8
|
+
// * Represents a legacy KeepTruckin driver record.
|
|
9
|
+
message KeeptruckinDriverRecord {
|
|
10
|
+
string id = 1;
|
|
11
|
+
optional string first_name = 2;
|
|
12
|
+
optional string last_name = 3;
|
|
13
|
+
optional string status = 4;
|
|
14
|
+
optional string license_number = 5;
|
|
15
|
+
optional openeld.providers.eld.shared.v1.EldDriverRecord normalized_projection = 20;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// * Represents a legacy KeepTruckin vehicle record.
|
|
19
|
+
message KeeptruckinVehicleRecord {
|
|
20
|
+
string id = 1;
|
|
21
|
+
optional string number = 2;
|
|
22
|
+
optional string vin = 3;
|
|
23
|
+
optional double odometer_meters = 4;
|
|
24
|
+
optional double engine_hours_seconds = 5;
|
|
25
|
+
optional openeld.providers.eld.shared.v1.EldVehicleRecord normalized_projection = 20;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// * Represents a legacy KeepTruckin log record.
|
|
29
|
+
message KeeptruckinLogRecord {
|
|
30
|
+
string id = 1;
|
|
31
|
+
optional string driver_id = 2;
|
|
32
|
+
optional string vehicle_id = 3;
|
|
33
|
+
optional google.protobuf.Timestamp start_time = 4;
|
|
34
|
+
optional google.protobuf.Timestamp end_time = 5;
|
|
35
|
+
optional string status = 6;
|
|
36
|
+
optional double latitude = 7;
|
|
37
|
+
optional double longitude = 8;
|
|
38
|
+
optional string origin = 9;
|
|
39
|
+
optional string annotation = 10;
|
|
40
|
+
optional openeld.providers.eld.shared.v1.EldHosEventRecord normalized_projection = 20;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// * Represents a legacy KeepTruckin HOS clock record.
|
|
44
|
+
message KeeptruckinHosClockRecord {
|
|
45
|
+
string driver_id = 1;
|
|
46
|
+
optional double drive_remaining_seconds = 2;
|
|
47
|
+
optional double shift_remaining_seconds = 3;
|
|
48
|
+
optional double cycle_remaining_seconds = 4;
|
|
49
|
+
optional openeld.providers.eld.shared.v1.EldHosClockRecord normalized_projection = 20;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// * Represents a legacy KeepTruckin location record.
|
|
53
|
+
message KeeptruckinLocationRecord {
|
|
54
|
+
string id = 1;
|
|
55
|
+
optional string vehicle_id = 2;
|
|
56
|
+
optional string driver_id = 3;
|
|
57
|
+
optional google.protobuf.Timestamp timestamp = 4;
|
|
58
|
+
optional double latitude = 5;
|
|
59
|
+
optional double longitude = 6;
|
|
60
|
+
optional double speed_kilometers_per_hour = 7;
|
|
61
|
+
optional double heading_degrees = 8;
|
|
62
|
+
optional openeld.providers.eld.shared.v1.EldGpsLocationRecord normalized_projection = 20;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// * Represents a legacy KeepTruckin DVIR record.
|
|
66
|
+
message KeeptruckinDvirRecord {
|
|
67
|
+
string id = 1;
|
|
68
|
+
optional string driver_id = 2;
|
|
69
|
+
optional string vehicle_id = 3;
|
|
70
|
+
optional google.protobuf.Timestamp inspection_time = 4;
|
|
71
|
+
optional string inspection_type = 5;
|
|
72
|
+
optional bool is_safe_to_drive = 6;
|
|
73
|
+
repeated string defect_descriptions = 7;
|
|
74
|
+
optional string mechanic_notes = 8;
|
|
75
|
+
optional openeld.providers.eld.shared.v1.EldDvirRecord normalized_projection = 20;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// * Represents a legacy KeepTruckin diagnostic record.
|
|
79
|
+
message KeeptruckinDiagnosticRecord {
|
|
80
|
+
string id = 1;
|
|
81
|
+
optional string driver_id = 2;
|
|
82
|
+
optional string vehicle_id = 3;
|
|
83
|
+
optional google.protobuf.Timestamp detected_at = 4;
|
|
84
|
+
optional string type = 5;
|
|
85
|
+
optional string code = 6;
|
|
86
|
+
optional string description = 7;
|
|
87
|
+
optional bool active = 8;
|
|
88
|
+
optional openeld.providers.eld.shared.v1.EldDiagnosticRecord normalized_projection = 20;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// * Groups the stable subset of KeepTruckin records used by the normalization layer.
|
|
92
|
+
message KeeptruckinPayload {
|
|
93
|
+
optional openeld.providers.eld.shared.v1.EldPayloadMetadata metadata = 1;
|
|
94
|
+
repeated KeeptruckinDriverRecord drivers = 2;
|
|
95
|
+
repeated KeeptruckinVehicleRecord vehicles = 3;
|
|
96
|
+
repeated openeld.providers.eld.shared.v1.EldVehicleAssignmentRecord vehicle_assignments = 4;
|
|
97
|
+
repeated KeeptruckinLogRecord hos_logs = 5;
|
|
98
|
+
repeated KeeptruckinHosClockRecord hos_clocks = 6;
|
|
99
|
+
repeated KeeptruckinLocationRecord gps_locations = 7;
|
|
100
|
+
repeated KeeptruckinDvirRecord dvirs = 8;
|
|
101
|
+
repeated KeeptruckinDiagnosticRecord diagnostics = 9;
|
|
102
|
+
repeated openeld.providers.eld.shared.v1.EldSyncCheckpoint checkpoints = 10;
|
|
103
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.eld.motive.v1;
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/timestamp.proto";
|
|
6
|
+
import "providers/eld/shared/common.proto";
|
|
7
|
+
|
|
8
|
+
// * Represents a Motive driver record close to the native API shape.
|
|
9
|
+
message MotiveDriverRecord {
|
|
10
|
+
string id = 1;
|
|
11
|
+
optional string first_name = 2;
|
|
12
|
+
optional string last_name = 3;
|
|
13
|
+
optional string drivers_license_number = 4;
|
|
14
|
+
optional string status = 5;
|
|
15
|
+
optional string email = 6;
|
|
16
|
+
optional string phone = 7;
|
|
17
|
+
optional openeld.providers.eld.shared.v1.EldDriverRecord normalized_projection = 20;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// * Represents a Motive vehicle record close to the native API shape.
|
|
21
|
+
message MotiveVehicleRecord {
|
|
22
|
+
string id = 1;
|
|
23
|
+
optional string number = 2;
|
|
24
|
+
optional string vin = 3;
|
|
25
|
+
optional double current_odometer_miles = 4;
|
|
26
|
+
optional double engine_hours = 5;
|
|
27
|
+
optional openeld.providers.eld.shared.v1.EldVehicleRecord normalized_projection = 20;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// * Represents a Motive log record with native field semantics preserved.
|
|
31
|
+
message MotiveLogRecord {
|
|
32
|
+
string id = 1;
|
|
33
|
+
optional string driver_id = 2;
|
|
34
|
+
optional string vehicle_id = 3;
|
|
35
|
+
optional google.protobuf.Timestamp start_time = 4;
|
|
36
|
+
optional google.protobuf.Timestamp end_time = 5;
|
|
37
|
+
optional string status = 6;
|
|
38
|
+
optional double latitude = 7;
|
|
39
|
+
optional double longitude = 8;
|
|
40
|
+
optional string origin = 9;
|
|
41
|
+
optional string annotation = 10;
|
|
42
|
+
optional double odometer_meters = 11;
|
|
43
|
+
optional double engine_hours_seconds = 12;
|
|
44
|
+
optional openeld.providers.eld.shared.v1.EldHosEventRecord normalized_projection = 20;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// * Represents a Motive HOS availability record.
|
|
48
|
+
message MotiveHosClockRecord {
|
|
49
|
+
string driver_id = 1;
|
|
50
|
+
optional double drive_remaining_seconds = 2;
|
|
51
|
+
optional double shift_remaining_seconds = 3;
|
|
52
|
+
optional double cycle_remaining_seconds = 4;
|
|
53
|
+
optional double break_remaining_seconds = 5;
|
|
54
|
+
optional openeld.providers.eld.shared.v1.EldHosClockRecord normalized_projection = 20;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// * Represents a Motive vehicle location record.
|
|
58
|
+
message MotiveVehicleLocationRecord {
|
|
59
|
+
string id = 1;
|
|
60
|
+
optional string vehicle_id = 2;
|
|
61
|
+
optional string driver_id = 3;
|
|
62
|
+
optional google.protobuf.Timestamp located_at = 4;
|
|
63
|
+
optional double latitude = 5;
|
|
64
|
+
optional double longitude = 6;
|
|
65
|
+
optional double speed_kilometers_per_hour = 7;
|
|
66
|
+
optional double heading_degrees = 8;
|
|
67
|
+
optional openeld.providers.eld.shared.v1.EldGpsLocationRecord normalized_projection = 20;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// * Represents a Motive DVIR record.
|
|
71
|
+
message MotiveDvirRecord {
|
|
72
|
+
string id = 1;
|
|
73
|
+
optional string driver_id = 2;
|
|
74
|
+
optional string vehicle_id = 3;
|
|
75
|
+
optional google.protobuf.Timestamp inspection_time = 4;
|
|
76
|
+
optional string inspection_type = 5;
|
|
77
|
+
optional bool is_safe_to_drive = 6;
|
|
78
|
+
repeated string defect_descriptions = 7;
|
|
79
|
+
optional string mechanic_notes = 8;
|
|
80
|
+
optional openeld.providers.eld.shared.v1.EldDvirRecord normalized_projection = 20;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// * Represents a Motive diagnostic record.
|
|
84
|
+
message MotiveDiagnosticRecord {
|
|
85
|
+
string id = 1;
|
|
86
|
+
optional string driver_id = 2;
|
|
87
|
+
optional string vehicle_id = 3;
|
|
88
|
+
optional google.protobuf.Timestamp detected_at = 4;
|
|
89
|
+
optional string type = 5;
|
|
90
|
+
optional string code = 6;
|
|
91
|
+
optional string description = 7;
|
|
92
|
+
optional bool active = 8;
|
|
93
|
+
optional openeld.providers.eld.shared.v1.EldDiagnosticRecord normalized_projection = 20;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// * Groups the stable subset of Motive records used by the normalization layer.
|
|
97
|
+
message MotivePayload {
|
|
98
|
+
optional openeld.providers.eld.shared.v1.EldPayloadMetadata metadata = 1;
|
|
99
|
+
repeated MotiveDriverRecord drivers = 2;
|
|
100
|
+
repeated MotiveVehicleRecord vehicles = 3;
|
|
101
|
+
repeated openeld.providers.eld.shared.v1.EldVehicleAssignmentRecord vehicle_assignments = 4;
|
|
102
|
+
repeated MotiveLogRecord hos_logs = 5;
|
|
103
|
+
repeated MotiveHosClockRecord hos_clocks = 6;
|
|
104
|
+
repeated MotiveVehicleLocationRecord gps_locations = 7;
|
|
105
|
+
repeated MotiveDvirRecord dvirs = 8;
|
|
106
|
+
repeated MotiveDiagnosticRecord diagnostics = 9;
|
|
107
|
+
repeated openeld.providers.eld.shared.v1.EldSyncCheckpoint checkpoints = 10;
|
|
108
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.eld.samsara.v1;
|
|
4
|
+
|
|
5
|
+
import "common/primitives/location.proto";
|
|
6
|
+
import "google/protobuf/timestamp.proto";
|
|
7
|
+
import "providers/eld/shared/common.proto";
|
|
8
|
+
|
|
9
|
+
// * Represents a Samsara driver record close to the native API shape.
|
|
10
|
+
message SamsaraDriverRecord {
|
|
11
|
+
string id = 1;
|
|
12
|
+
optional string name = 2;
|
|
13
|
+
optional string license_number = 3;
|
|
14
|
+
optional string driver_activation_status = 4;
|
|
15
|
+
optional bool eld_exempt = 5;
|
|
16
|
+
optional string username = 6;
|
|
17
|
+
optional openeld.providers.eld.shared.v1.EldDriverRecord normalized_projection = 20;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// * Represents a Samsara vehicle record close to the native API shape.
|
|
21
|
+
message SamsaraVehicleRecord {
|
|
22
|
+
string id = 1;
|
|
23
|
+
optional string name = 2;
|
|
24
|
+
optional string vin = 3;
|
|
25
|
+
optional string license_plate = 4;
|
|
26
|
+
optional double obd_odometer_meters = 5;
|
|
27
|
+
optional double engine_seconds = 6;
|
|
28
|
+
optional string eld_device_id = 7;
|
|
29
|
+
optional openeld.providers.eld.shared.v1.EldVehicleRecord normalized_projection = 20;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// * Represents a Samsara HOS log record with native field semantics preserved.
|
|
33
|
+
message SamsaraHosLogRecord {
|
|
34
|
+
string id = 1;
|
|
35
|
+
optional string driver_id = 2;
|
|
36
|
+
optional string vehicle_id = 3;
|
|
37
|
+
optional google.protobuf.Timestamp start_time = 4;
|
|
38
|
+
optional google.protobuf.Timestamp end_time = 5;
|
|
39
|
+
optional string hos_status_type = 6;
|
|
40
|
+
optional string origin = 7;
|
|
41
|
+
optional openeld.common.primitives.v1.GeoLocation start_location = 8;
|
|
42
|
+
optional string remark = 9;
|
|
43
|
+
optional bool certified = 10;
|
|
44
|
+
optional uint32 sequence_number = 11;
|
|
45
|
+
optional double odometer_meters = 12;
|
|
46
|
+
optional double engine_hours_seconds = 13;
|
|
47
|
+
optional openeld.providers.eld.shared.v1.EldHosEventRecord normalized_projection = 20;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// * Represents a Samsara HOS clock record.
|
|
51
|
+
message SamsaraHosClockRecord {
|
|
52
|
+
string driver_id = 1;
|
|
53
|
+
optional double cycle_remaining_seconds = 2;
|
|
54
|
+
optional double shift_remaining_seconds = 3;
|
|
55
|
+
optional double drive_remaining_seconds = 4;
|
|
56
|
+
optional double break_remaining_seconds = 5;
|
|
57
|
+
optional openeld.providers.eld.shared.v1.EldHosClockRecord normalized_projection = 20;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// * Represents a Samsara vehicle location record.
|
|
61
|
+
message SamsaraVehicleLocationRecord {
|
|
62
|
+
string vehicle_id = 1;
|
|
63
|
+
optional string driver_id = 2;
|
|
64
|
+
optional google.protobuf.Timestamp time = 3;
|
|
65
|
+
optional double latitude = 4;
|
|
66
|
+
optional double longitude = 5;
|
|
67
|
+
optional double speed_miles_per_hour = 6;
|
|
68
|
+
optional double heading_degrees = 7;
|
|
69
|
+
optional openeld.providers.eld.shared.v1.EldGpsLocationRecord normalized_projection = 20;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// * Represents a Samsara DVIR record.
|
|
73
|
+
message SamsaraDvirRecord {
|
|
74
|
+
string id = 1;
|
|
75
|
+
optional string driver_id = 2;
|
|
76
|
+
optional string vehicle_id = 3;
|
|
77
|
+
optional google.protobuf.Timestamp inspection_time = 4;
|
|
78
|
+
optional string inspection_type = 5;
|
|
79
|
+
optional bool is_safe_to_drive = 6;
|
|
80
|
+
repeated string defects = 7;
|
|
81
|
+
optional string mechanic_notes = 8;
|
|
82
|
+
optional openeld.providers.eld.shared.v1.EldDvirRecord normalized_projection = 20;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// * Represents a Samsara compliance diagnostic or malfunction record.
|
|
86
|
+
message SamsaraDiagnosticRecord {
|
|
87
|
+
string id = 1;
|
|
88
|
+
optional string driver_id = 2;
|
|
89
|
+
optional string vehicle_id = 3;
|
|
90
|
+
optional google.protobuf.Timestamp detected_at = 4;
|
|
91
|
+
optional string type = 5;
|
|
92
|
+
optional string code = 6;
|
|
93
|
+
optional string description = 7;
|
|
94
|
+
optional bool is_active = 8;
|
|
95
|
+
optional openeld.providers.eld.shared.v1.EldDiagnosticRecord normalized_projection = 20;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// * Groups the stable subset of Samsara records used by the normalization layer.
|
|
99
|
+
message SamsaraPayload {
|
|
100
|
+
optional openeld.providers.eld.shared.v1.EldPayloadMetadata metadata = 1;
|
|
101
|
+
repeated SamsaraDriverRecord drivers = 2;
|
|
102
|
+
repeated SamsaraVehicleRecord vehicles = 3;
|
|
103
|
+
repeated openeld.providers.eld.shared.v1.EldVehicleAssignmentRecord vehicle_assignments = 4;
|
|
104
|
+
repeated SamsaraHosLogRecord hos_logs = 5;
|
|
105
|
+
repeated SamsaraHosClockRecord hos_clocks = 6;
|
|
106
|
+
repeated SamsaraVehicleLocationRecord gps_locations = 7;
|
|
107
|
+
repeated SamsaraDvirRecord dvirs = 8;
|
|
108
|
+
repeated SamsaraDiagnosticRecord diagnostics = 9;
|
|
109
|
+
repeated openeld.providers.eld.shared.v1.EldSyncCheckpoint checkpoints = 10;
|
|
110
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.eld.shared.v1;
|
|
4
|
+
|
|
5
|
+
import "common/metadata/source.proto";
|
|
6
|
+
import "common/primitives/location.proto";
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
|
|
9
|
+
// * Describes how a provider account authenticates and what environment it targets.
|
|
10
|
+
message EldAuthProfile {
|
|
11
|
+
string auth_method = 1;
|
|
12
|
+
optional string environment = 2;
|
|
13
|
+
optional string base_url = 3;
|
|
14
|
+
repeated string scope_hints = 4;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// * Identifies the provider account or tenant boundary used for a sync.
|
|
18
|
+
message EldProviderAccount {
|
|
19
|
+
string provider_account_id = 1;
|
|
20
|
+
optional string carrier_id = 2;
|
|
21
|
+
optional EldAuthProfile auth_profile = 3;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// * Represents a provider-specific driver record from an ELD source.
|
|
25
|
+
message EldDriverRecord {
|
|
26
|
+
string provider_driver_id = 1;
|
|
27
|
+
optional string first_name = 2;
|
|
28
|
+
optional string last_name = 3;
|
|
29
|
+
optional string full_name = 4;
|
|
30
|
+
optional string license_number = 5;
|
|
31
|
+
optional string status = 6;
|
|
32
|
+
optional string email = 7;
|
|
33
|
+
optional string phone = 8;
|
|
34
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// * Represents a provider-specific vehicle record from an ELD source.
|
|
38
|
+
message EldVehicleRecord {
|
|
39
|
+
string provider_vehicle_id = 1;
|
|
40
|
+
optional string vin = 2;
|
|
41
|
+
optional string name = 3;
|
|
42
|
+
optional string license_plate = 4;
|
|
43
|
+
optional string make = 5;
|
|
44
|
+
optional string model = 6;
|
|
45
|
+
optional int32 year = 7;
|
|
46
|
+
optional double odometer_meters = 8;
|
|
47
|
+
optional double engine_hours_seconds = 9;
|
|
48
|
+
optional string eld_device_id = 10;
|
|
49
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// * Represents a provider-specific driver/vehicle assignment from an ELD source.
|
|
53
|
+
message EldVehicleAssignmentRecord {
|
|
54
|
+
string provider_assignment_id = 1;
|
|
55
|
+
optional string provider_driver_id = 2;
|
|
56
|
+
optional string provider_vehicle_id = 3;
|
|
57
|
+
optional string provider_codriver_id = 4;
|
|
58
|
+
optional google.protobuf.Timestamp start_time = 5;
|
|
59
|
+
optional google.protobuf.Timestamp end_time = 6;
|
|
60
|
+
repeated string trailer_identifiers = 7;
|
|
61
|
+
optional string shipping_doc_number = 8;
|
|
62
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// * Represents a provider-specific HOS event record from an ELD source.
|
|
66
|
+
message EldHosEventRecord {
|
|
67
|
+
string provider_event_id = 1;
|
|
68
|
+
optional string provider_driver_id = 2;
|
|
69
|
+
optional string provider_vehicle_id = 3;
|
|
70
|
+
optional google.protobuf.Timestamp event_timestamp = 4;
|
|
71
|
+
optional string duty_status = 5;
|
|
72
|
+
optional string event_type = 6;
|
|
73
|
+
optional openeld.common.primitives.v1.GeoPoint position = 7;
|
|
74
|
+
optional string annotation = 8;
|
|
75
|
+
optional string origin = 9;
|
|
76
|
+
optional string record_status = 10;
|
|
77
|
+
optional double odometer_meters = 11;
|
|
78
|
+
optional double engine_hours_seconds = 12;
|
|
79
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// * Represents a provider-specific HOS clock summary from an ELD source.
|
|
83
|
+
message EldHosClockRecord {
|
|
84
|
+
string provider_clock_id = 1;
|
|
85
|
+
optional string provider_driver_id = 2;
|
|
86
|
+
optional string clock_type = 3;
|
|
87
|
+
optional double remaining_seconds = 4;
|
|
88
|
+
optional google.protobuf.Timestamp resets_at = 5;
|
|
89
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// * Represents a provider-specific GPS location record from an ELD source.
|
|
93
|
+
message EldGpsLocationRecord {
|
|
94
|
+
string provider_location_id = 1;
|
|
95
|
+
optional string provider_vehicle_id = 2;
|
|
96
|
+
optional string provider_driver_id = 3;
|
|
97
|
+
optional google.protobuf.Timestamp timestamp = 4;
|
|
98
|
+
optional openeld.common.primitives.v1.GeoPoint position = 5;
|
|
99
|
+
optional double speed_kilometers_per_hour = 6;
|
|
100
|
+
optional double heading_degrees = 7;
|
|
101
|
+
optional double odometer_meters = 8;
|
|
102
|
+
optional double engine_hours_seconds = 9;
|
|
103
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// * Represents a provider-specific malfunction or diagnostic record.
|
|
107
|
+
message EldDiagnosticRecord {
|
|
108
|
+
string provider_diagnostic_id = 1;
|
|
109
|
+
optional string provider_driver_id = 2;
|
|
110
|
+
optional string provider_vehicle_id = 3;
|
|
111
|
+
optional google.protobuf.Timestamp event_timestamp = 4;
|
|
112
|
+
optional string diagnostic_type = 5;
|
|
113
|
+
optional string diagnostic_code = 6;
|
|
114
|
+
optional string description = 7;
|
|
115
|
+
optional bool is_active = 8;
|
|
116
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// * Represents a provider-specific DVIR record from an ELD source.
|
|
120
|
+
message EldDvirRecord {
|
|
121
|
+
string provider_dvir_id = 1;
|
|
122
|
+
optional string provider_driver_id = 2;
|
|
123
|
+
optional string provider_vehicle_id = 3;
|
|
124
|
+
optional google.protobuf.Timestamp inspection_time = 4;
|
|
125
|
+
optional string inspection_type = 5;
|
|
126
|
+
optional bool is_safe_to_drive = 6;
|
|
127
|
+
repeated string defect_descriptions = 7;
|
|
128
|
+
optional string mechanic_notes = 8;
|
|
129
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// * Tracks incremental sync state for an ELD provider.
|
|
133
|
+
message EldSyncCheckpoint {
|
|
134
|
+
optional string provider_account_id = 1;
|
|
135
|
+
optional string resource_name = 2;
|
|
136
|
+
optional string cursor = 3;
|
|
137
|
+
optional string page_token = 4;
|
|
138
|
+
optional string version_token = 5;
|
|
139
|
+
optional google.protobuf.Timestamp window_start = 6;
|
|
140
|
+
optional google.protobuf.Timestamp synced_through = 7;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// * Captures the operational characteristics of a provider sync flow.
|
|
144
|
+
message EldSyncProfile {
|
|
145
|
+
string sync_model = 1;
|
|
146
|
+
bool supports_webhooks = 2;
|
|
147
|
+
bool supports_cursor = 3;
|
|
148
|
+
bool supports_page_polling = 4;
|
|
149
|
+
bool supports_version_token = 5;
|
|
150
|
+
bool requires_time_windowing = 6;
|
|
151
|
+
optional string rate_limit_notes = 7;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// * Declares which domains a provider payload currently carries.
|
|
155
|
+
message EldSupportedDomains {
|
|
156
|
+
bool drivers = 1;
|
|
157
|
+
bool vehicles = 2;
|
|
158
|
+
bool assignments = 3;
|
|
159
|
+
bool hos_events = 4;
|
|
160
|
+
bool hos_clocks = 5;
|
|
161
|
+
bool gps_locations = 6;
|
|
162
|
+
bool dvirs = 7;
|
|
163
|
+
bool diagnostics = 8;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// * Provides payload-level metadata for a provider sync batch.
|
|
167
|
+
message EldPayloadMetadata {
|
|
168
|
+
optional EldProviderAccount account = 1;
|
|
169
|
+
optional EldSyncProfile sync_profile = 2;
|
|
170
|
+
optional EldSupportedDomains supported_domains = 3;
|
|
171
|
+
optional string cursor = 4;
|
|
172
|
+
optional string provider_api_version = 5;
|
|
173
|
+
optional google.protobuf.Timestamp pulled_at = 6;
|
|
174
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.telematics.fleet_complete.v1;
|
|
4
|
+
|
|
5
|
+
import "providers/telematics/shared/common.proto";
|
|
6
|
+
|
|
7
|
+
// * Groups the stable subset of Fleet Complete records used by the normalization layer.
|
|
8
|
+
message FleetCompletePayload {
|
|
9
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsAssetRecord assets = 1;
|
|
10
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsPositionRecord positions = 2;
|
|
11
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsTripRecord trips = 3;
|
|
12
|
+
optional openeld.providers.telematics.shared.v1.TelematicsSyncCheckpoint checkpoint = 4;
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.telematics.fourkites.v1;
|
|
4
|
+
|
|
5
|
+
import "providers/telematics/shared/common.proto";
|
|
6
|
+
|
|
7
|
+
// * Groups the stable subset of FourKites records used by the normalization layer.
|
|
8
|
+
message FourKitesPayload {
|
|
9
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsAssetRecord assets = 1;
|
|
10
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsPositionRecord positions = 2;
|
|
11
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsTripRecord trips = 3;
|
|
12
|
+
optional openeld.providers.telematics.shared.v1.TelematicsSyncCheckpoint checkpoint = 4;
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.telematics.project44.v1;
|
|
4
|
+
|
|
5
|
+
import "providers/telematics/shared/common.proto";
|
|
6
|
+
|
|
7
|
+
// * Groups the stable subset of Project44 records used by the normalization layer.
|
|
8
|
+
message Project44Payload {
|
|
9
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsAssetRecord assets = 1;
|
|
10
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsPositionRecord positions = 2;
|
|
11
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsTripRecord trips = 3;
|
|
12
|
+
optional openeld.providers.telematics.shared.v1.TelematicsSyncCheckpoint checkpoint = 4;
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.telematics.shared.v1;
|
|
4
|
+
|
|
5
|
+
import "common/metadata/source.proto";
|
|
6
|
+
import "common/primitives/location.proto";
|
|
7
|
+
import "google/protobuf/timestamp.proto";
|
|
8
|
+
|
|
9
|
+
// * Represents a provider-specific asset record from a telematics source.
|
|
10
|
+
message TelematicsAssetRecord {
|
|
11
|
+
string provider_asset_id = 1;
|
|
12
|
+
optional string vin = 2;
|
|
13
|
+
optional string name = 3;
|
|
14
|
+
optional string license_plate = 4;
|
|
15
|
+
optional string device_id = 5;
|
|
16
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// * Represents a provider-specific position record from a telematics source.
|
|
20
|
+
message TelematicsPositionRecord {
|
|
21
|
+
string provider_position_id = 1;
|
|
22
|
+
optional string provider_asset_id = 2;
|
|
23
|
+
optional google.protobuf.Timestamp timestamp = 3;
|
|
24
|
+
optional openeld.common.primitives.v1.GeoPoint position = 4;
|
|
25
|
+
optional double speed_kilometers_per_hour = 5;
|
|
26
|
+
optional double heading_degrees = 6;
|
|
27
|
+
optional double odometer_meters = 7;
|
|
28
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// * Represents a provider-specific trip or stop update from a telematics source.
|
|
32
|
+
message TelematicsTripRecord {
|
|
33
|
+
string provider_trip_id = 1;
|
|
34
|
+
optional string provider_asset_id = 2;
|
|
35
|
+
optional string shipment_id = 3;
|
|
36
|
+
optional string status = 4;
|
|
37
|
+
optional google.protobuf.Timestamp start_time = 5;
|
|
38
|
+
optional google.protobuf.Timestamp end_time = 6;
|
|
39
|
+
optional openeld.common.metadata.v1.SourceRecord source = 20;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// * Tracks incremental sync state for a telematics provider.
|
|
43
|
+
message TelematicsSyncCheckpoint {
|
|
44
|
+
optional string cursor = 1;
|
|
45
|
+
optional string page_token = 2;
|
|
46
|
+
optional string version_token = 3;
|
|
47
|
+
optional google.protobuf.Timestamp synced_through = 4;
|
|
48
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.providers.telematics.verizon_connect.v1;
|
|
4
|
+
|
|
5
|
+
import "providers/telematics/shared/common.proto";
|
|
6
|
+
|
|
7
|
+
// * Groups the stable subset of Verizon Connect records used by the normalization layer.
|
|
8
|
+
message VerizonConnectPayload {
|
|
9
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsAssetRecord assets = 1;
|
|
10
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsPositionRecord positions = 2;
|
|
11
|
+
repeated openeld.providers.telematics.shared.v1.TelematicsTripRecord trips = 3;
|
|
12
|
+
optional openeld.providers.telematics.shared.v1.TelematicsSyncCheckpoint checkpoint = 4;
|
|
13
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.services.ingestion.v1;
|
|
4
|
+
|
|
5
|
+
import "providers/eld/geotab/contracts.proto";
|
|
6
|
+
import "providers/eld/keeptruckin/contracts.proto";
|
|
7
|
+
import "providers/eld/motive/contracts.proto";
|
|
8
|
+
import "providers/eld/samsara/contracts.proto";
|
|
9
|
+
import "providers/telematics/fleet_complete/contracts.proto";
|
|
10
|
+
import "providers/telematics/fourkites/contracts.proto";
|
|
11
|
+
import "providers/telematics/project44/contracts.proto";
|
|
12
|
+
import "providers/telematics/verizon_connect/contracts.proto";
|
|
13
|
+
|
|
14
|
+
// * Accepts provider-native payloads for persistence and downstream normalization.
|
|
15
|
+
message IngestProviderPayloadRequest {
|
|
16
|
+
optional string tenant_id = 1;
|
|
17
|
+
oneof provider_payload {
|
|
18
|
+
openeld.providers.eld.samsara.v1.SamsaraPayload samsara = 10;
|
|
19
|
+
openeld.providers.eld.motive.v1.MotivePayload motive = 11;
|
|
20
|
+
openeld.providers.eld.geotab.v1.GeotabPayload geotab = 12;
|
|
21
|
+
openeld.providers.eld.keeptruckin.v1.KeeptruckinPayload keeptruckin = 13;
|
|
22
|
+
openeld.providers.telematics.project44.v1.Project44Payload project44 = 14;
|
|
23
|
+
openeld.providers.telematics.fourkites.v1.FourKitesPayload four_kites = 15;
|
|
24
|
+
openeld.providers.telematics.verizon_connect.v1.VerizonConnectPayload verizon_connect = 16;
|
|
25
|
+
openeld.providers.telematics.fleet_complete.v1.FleetCompletePayload fleet_complete = 17;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// * Returns ingestion acceptance counts and non-fatal warnings.
|
|
30
|
+
message IngestProviderPayloadResponse {
|
|
31
|
+
uint32 accepted_record_count = 1;
|
|
32
|
+
repeated string warnings = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
service IngestionService {
|
|
36
|
+
rpc IngestProviderPayload(IngestProviderPayloadRequest) returns (IngestProviderPayloadResponse);
|
|
37
|
+
}
|
|
File without changes
|