@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,62 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.services.normalization.v1;
|
|
4
|
+
|
|
5
|
+
import "logistics/asset.proto";
|
|
6
|
+
import "logistics/asset_location.proto";
|
|
7
|
+
import "logistics/carrier.proto";
|
|
8
|
+
import "logistics/data_consent.proto";
|
|
9
|
+
import "logistics/driver.proto";
|
|
10
|
+
import "logistics/dvir.proto";
|
|
11
|
+
import "logistics/gps_location.proto";
|
|
12
|
+
import "logistics/hos_daily_summary.proto";
|
|
13
|
+
import "logistics/hos_event.proto";
|
|
14
|
+
import "logistics/ifta_trip.proto";
|
|
15
|
+
import "logistics/safety_event.proto";
|
|
16
|
+
import "logistics/vehicle.proto";
|
|
17
|
+
import "logistics/vehicle_assignment.proto";
|
|
18
|
+
import "providers/eld/geotab/contracts.proto";
|
|
19
|
+
import "providers/eld/keeptruckin/contracts.proto";
|
|
20
|
+
import "providers/eld/motive/contracts.proto";
|
|
21
|
+
import "providers/eld/samsara/contracts.proto";
|
|
22
|
+
import "providers/telematics/fleet_complete/contracts.proto";
|
|
23
|
+
import "providers/telematics/fourkites/contracts.proto";
|
|
24
|
+
import "providers/telematics/project44/contracts.proto";
|
|
25
|
+
import "providers/telematics/verizon_connect/contracts.proto";
|
|
26
|
+
|
|
27
|
+
// * Accepts provider-native payloads for normalization into canonical messages.
|
|
28
|
+
message NormalizeProviderPayloadRequest {
|
|
29
|
+
optional string tenant_id = 1;
|
|
30
|
+
oneof provider_payload {
|
|
31
|
+
openeld.providers.eld.samsara.v1.SamsaraPayload samsara = 10;
|
|
32
|
+
openeld.providers.eld.motive.v1.MotivePayload motive = 11;
|
|
33
|
+
openeld.providers.eld.geotab.v1.GeotabPayload geotab = 12;
|
|
34
|
+
openeld.providers.eld.keeptruckin.v1.KeeptruckinPayload keeptruckin = 13;
|
|
35
|
+
openeld.providers.telematics.project44.v1.Project44Payload project44 = 14;
|
|
36
|
+
openeld.providers.telematics.fourkites.v1.FourKitesPayload four_kites = 15;
|
|
37
|
+
openeld.providers.telematics.verizon_connect.v1.VerizonConnectPayload verizon_connect = 16;
|
|
38
|
+
openeld.providers.telematics.fleet_complete.v1.FleetCompletePayload fleet_complete = 17;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// * Returns the normalized logistics entities derived from a provider payload.
|
|
43
|
+
message NormalizeProviderPayloadResponse {
|
|
44
|
+
repeated openeld.logistics.v1.Carrier carriers = 1;
|
|
45
|
+
repeated openeld.logistics.v1.Driver drivers = 2;
|
|
46
|
+
repeated openeld.logistics.v1.Vehicle vehicles = 3;
|
|
47
|
+
repeated openeld.logistics.v1.VehicleAssignment vehicle_assignments = 4;
|
|
48
|
+
repeated openeld.logistics.v1.HosEvent hos_events = 5;
|
|
49
|
+
repeated openeld.logistics.v1.HosDailySummary hos_daily_summaries = 6;
|
|
50
|
+
repeated openeld.logistics.v1.GpsLocation gps_locations = 7;
|
|
51
|
+
repeated openeld.logistics.v1.Dvir dvirs = 8;
|
|
52
|
+
repeated openeld.logistics.v1.SafetyEvent safety_events = 9;
|
|
53
|
+
repeated openeld.logistics.v1.IftaTrip ifta_trips = 10;
|
|
54
|
+
repeated openeld.logistics.v1.Asset assets = 11;
|
|
55
|
+
repeated openeld.logistics.v1.AssetLocation asset_locations = 12;
|
|
56
|
+
repeated openeld.logistics.v1.DataConsent data_consents = 13;
|
|
57
|
+
repeated string warnings = 14;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
service NormalizationService {
|
|
61
|
+
rpc NormalizeProviderPayload(NormalizeProviderPayloadRequest) returns (NormalizeProviderPayloadResponse);
|
|
62
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.services.query.v1;
|
|
4
|
+
|
|
5
|
+
import "common/metadata/source.proto";
|
|
6
|
+
import "logistics/asset.proto";
|
|
7
|
+
import "logistics/asset_location.proto";
|
|
8
|
+
import "logistics/carrier.proto";
|
|
9
|
+
import "logistics/data_consent.proto";
|
|
10
|
+
import "logistics/driver.proto";
|
|
11
|
+
import "logistics/dvir.proto";
|
|
12
|
+
import "logistics/gps_location.proto";
|
|
13
|
+
import "logistics/hos_daily_summary.proto";
|
|
14
|
+
import "logistics/hos_event.proto";
|
|
15
|
+
import "logistics/ifta_trip.proto";
|
|
16
|
+
import "logistics/safety_event.proto";
|
|
17
|
+
import "logistics/vehicle.proto";
|
|
18
|
+
import "logistics/vehicle_assignment.proto";
|
|
19
|
+
import "google/protobuf/timestamp.proto";
|
|
20
|
+
|
|
21
|
+
message CursorPageRequest {
|
|
22
|
+
optional uint32 page_size = 1;
|
|
23
|
+
optional string cursor = 2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CursorPageResponse {
|
|
27
|
+
optional string next_cursor = 1;
|
|
28
|
+
bool has_more = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message EntityScope {
|
|
32
|
+
optional string tenant_id = 1;
|
|
33
|
+
optional string carrier_id = 2;
|
|
34
|
+
optional openeld.common.metadata.v1.SourceProvider provider = 3;
|
|
35
|
+
optional string provider_account_id = 4;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message TimeRangeFilter {
|
|
39
|
+
optional google.protobuf.Timestamp start_time = 1;
|
|
40
|
+
optional google.protobuf.Timestamp end_time = 2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message LatestViewOptions {
|
|
44
|
+
bool latest_only = 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message GetCarrierRequest {
|
|
48
|
+
string carrier_id = 1;
|
|
49
|
+
optional EntityScope scope = 2;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message GetCarrierResponse {
|
|
53
|
+
optional openeld.logistics.v1.Carrier carrier = 1;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message GetDataConsentRequest {
|
|
57
|
+
string consent_id = 1;
|
|
58
|
+
optional EntityScope scope = 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message GetDataConsentResponse {
|
|
62
|
+
optional openeld.logistics.v1.DataConsent data_consent = 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
message ListDataConsentsRequest {
|
|
66
|
+
optional EntityScope scope = 1;
|
|
67
|
+
optional string platform_id = 2;
|
|
68
|
+
optional CursorPageRequest page = 3;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message ListDataConsentsResponse {
|
|
72
|
+
repeated openeld.logistics.v1.DataConsent data_consents = 1;
|
|
73
|
+
optional CursorPageResponse page = 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message ListDriversRequest {
|
|
77
|
+
optional EntityScope scope = 1;
|
|
78
|
+
optional CursorPageRequest page = 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
message ListDriversResponse {
|
|
82
|
+
repeated openeld.logistics.v1.Driver drivers = 1;
|
|
83
|
+
optional CursorPageResponse page = 2;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message ListVehiclesRequest {
|
|
87
|
+
optional EntityScope scope = 1;
|
|
88
|
+
optional CursorPageRequest page = 2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
message ListVehiclesResponse {
|
|
92
|
+
repeated openeld.logistics.v1.Vehicle vehicles = 1;
|
|
93
|
+
optional CursorPageResponse page = 2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
message ListVehicleAssignmentsRequest {
|
|
97
|
+
optional string driver_id = 1;
|
|
98
|
+
optional string vehicle_id = 2;
|
|
99
|
+
optional EntityScope scope = 3;
|
|
100
|
+
optional TimeRangeFilter time_range = 4;
|
|
101
|
+
optional CursorPageRequest page = 5;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
message ListVehicleAssignmentsResponse {
|
|
105
|
+
repeated openeld.logistics.v1.VehicleAssignment vehicle_assignments = 1;
|
|
106
|
+
optional CursorPageResponse page = 2;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message ListHosEventsRequest {
|
|
110
|
+
optional string driver_id = 1;
|
|
111
|
+
optional string vehicle_id = 2;
|
|
112
|
+
optional EntityScope scope = 3;
|
|
113
|
+
optional TimeRangeFilter time_range = 4;
|
|
114
|
+
optional LatestViewOptions view = 5;
|
|
115
|
+
optional CursorPageRequest page = 6;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
message ListHosEventsResponse {
|
|
119
|
+
repeated openeld.logistics.v1.HosEvent hos_events = 1;
|
|
120
|
+
optional CursorPageResponse page = 2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
message ListHosDailySummariesRequest {
|
|
124
|
+
optional string driver_id = 1;
|
|
125
|
+
optional EntityScope scope = 2;
|
|
126
|
+
optional TimeRangeFilter time_range = 3;
|
|
127
|
+
optional CursorPageRequest page = 4;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
message ListHosDailySummariesResponse {
|
|
131
|
+
repeated openeld.logistics.v1.HosDailySummary hos_daily_summaries = 1;
|
|
132
|
+
optional CursorPageResponse page = 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
message ListGpsLocationsRequest {
|
|
136
|
+
optional string vehicle_id = 1;
|
|
137
|
+
optional string driver_id = 2;
|
|
138
|
+
optional EntityScope scope = 3;
|
|
139
|
+
optional TimeRangeFilter time_range = 4;
|
|
140
|
+
optional LatestViewOptions view = 5;
|
|
141
|
+
optional CursorPageRequest page = 6;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message ListGpsLocationsResponse {
|
|
145
|
+
repeated openeld.logistics.v1.GpsLocation gps_locations = 1;
|
|
146
|
+
optional CursorPageResponse page = 2;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
message ListSafetyEventsRequest {
|
|
150
|
+
optional string vehicle_id = 1;
|
|
151
|
+
optional string driver_id = 2;
|
|
152
|
+
optional EntityScope scope = 3;
|
|
153
|
+
optional TimeRangeFilter time_range = 4;
|
|
154
|
+
optional CursorPageRequest page = 5;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
message ListSafetyEventsResponse {
|
|
158
|
+
repeated openeld.logistics.v1.SafetyEvent safety_events = 1;
|
|
159
|
+
optional CursorPageResponse page = 2;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message ListIftaTripsRequest {
|
|
163
|
+
optional string vehicle_id = 1;
|
|
164
|
+
optional string driver_id = 2;
|
|
165
|
+
optional string jurisdiction = 3;
|
|
166
|
+
optional EntityScope scope = 4;
|
|
167
|
+
optional TimeRangeFilter time_range = 5;
|
|
168
|
+
optional CursorPageRequest page = 6;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
message ListIftaTripsResponse {
|
|
172
|
+
repeated openeld.logistics.v1.IftaTrip ifta_trips = 1;
|
|
173
|
+
optional CursorPageResponse page = 2;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
message GetAssetRequest {
|
|
177
|
+
string asset_id = 1;
|
|
178
|
+
optional EntityScope scope = 2;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
message GetAssetResponse {
|
|
182
|
+
optional openeld.logistics.v1.Asset asset = 1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
message ListAssetsRequest {
|
|
186
|
+
optional EntityScope scope = 1;
|
|
187
|
+
optional CursorPageRequest page = 2;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
message ListAssetsResponse {
|
|
191
|
+
repeated openeld.logistics.v1.Asset assets = 1;
|
|
192
|
+
optional CursorPageResponse page = 2;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
message ListAssetLocationsRequest {
|
|
196
|
+
optional string asset_id = 1;
|
|
197
|
+
optional string linked_vehicle_id = 2;
|
|
198
|
+
optional EntityScope scope = 3;
|
|
199
|
+
optional TimeRangeFilter time_range = 4;
|
|
200
|
+
optional LatestViewOptions view = 5;
|
|
201
|
+
optional CursorPageRequest page = 6;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
message ListAssetLocationsResponse {
|
|
205
|
+
repeated openeld.logistics.v1.AssetLocation asset_locations = 1;
|
|
206
|
+
optional CursorPageResponse page = 2;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
message ListDvirsRequest {
|
|
210
|
+
optional string vehicle_id = 1;
|
|
211
|
+
optional string driver_id = 2;
|
|
212
|
+
optional EntityScope scope = 3;
|
|
213
|
+
optional TimeRangeFilter time_range = 4;
|
|
214
|
+
optional CursorPageRequest page = 5;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
message ListDvirsResponse {
|
|
218
|
+
repeated openeld.logistics.v1.Dvir dvirs = 1;
|
|
219
|
+
optional CursorPageResponse page = 2;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
service QueryService {
|
|
223
|
+
rpc GetCarrier(GetCarrierRequest) returns (GetCarrierResponse);
|
|
224
|
+
rpc GetDataConsent(GetDataConsentRequest) returns (GetDataConsentResponse);
|
|
225
|
+
rpc ListDataConsents(ListDataConsentsRequest) returns (ListDataConsentsResponse);
|
|
226
|
+
rpc ListDrivers(ListDriversRequest) returns (ListDriversResponse);
|
|
227
|
+
rpc ListVehicles(ListVehiclesRequest) returns (ListVehiclesResponse);
|
|
228
|
+
rpc ListVehicleAssignments(ListVehicleAssignmentsRequest) returns (ListVehicleAssignmentsResponse);
|
|
229
|
+
rpc ListHosEvents(ListHosEventsRequest) returns (ListHosEventsResponse);
|
|
230
|
+
rpc ListHosDailySummaries(ListHosDailySummariesRequest) returns (ListHosDailySummariesResponse);
|
|
231
|
+
rpc ListGpsLocations(ListGpsLocationsRequest) returns (ListGpsLocationsResponse);
|
|
232
|
+
rpc ListSafetyEvents(ListSafetyEventsRequest) returns (ListSafetyEventsResponse);
|
|
233
|
+
rpc ListIftaTrips(ListIftaTripsRequest) returns (ListIftaTripsResponse);
|
|
234
|
+
rpc GetAsset(GetAssetRequest) returns (GetAssetResponse);
|
|
235
|
+
rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse);
|
|
236
|
+
rpc ListAssetLocations(ListAssetLocationsRequest) returns (ListAssetLocationsResponse);
|
|
237
|
+
rpc ListDvirs(ListDvirsRequest) returns (ListDvirsResponse);
|
|
238
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.services.sync.v1;
|
|
4
|
+
|
|
5
|
+
import "common/metadata/source.proto";
|
|
6
|
+
import "google/protobuf/timestamp.proto";
|
|
7
|
+
|
|
8
|
+
// * Represents the resource family being synchronized.
|
|
9
|
+
enum SyncResourceType {
|
|
10
|
+
SYNC_RESOURCE_TYPE_UNSPECIFIED = 0;
|
|
11
|
+
SYNC_RESOURCE_TYPE_DRIVERS = 1;
|
|
12
|
+
SYNC_RESOURCE_TYPE_VEHICLES = 2;
|
|
13
|
+
SYNC_RESOURCE_TYPE_ASSIGNMENTS = 3;
|
|
14
|
+
SYNC_RESOURCE_TYPE_HOS_EVENTS = 4;
|
|
15
|
+
SYNC_RESOURCE_TYPE_HOS_CLOCKS = 5;
|
|
16
|
+
SYNC_RESOURCE_TYPE_GPS_LOCATIONS = 6;
|
|
17
|
+
SYNC_RESOURCE_TYPE_DVIRS = 7;
|
|
18
|
+
SYNC_RESOURCE_TYPE_SAFETY_EVENTS = 8;
|
|
19
|
+
SYNC_RESOURCE_TYPE_IFTA_TRIPS = 9;
|
|
20
|
+
SYNC_RESOURCE_TYPE_ASSETS = 10;
|
|
21
|
+
SYNC_RESOURCE_TYPE_ASSET_LOCATIONS = 11;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// * Represents the checkpoint style used by a provider resource.
|
|
25
|
+
enum CheckpointKind {
|
|
26
|
+
CHECKPOINT_KIND_UNSPECIFIED = 0;
|
|
27
|
+
CHECKPOINT_KIND_CURSOR = 1;
|
|
28
|
+
CHECKPOINT_KIND_PAGE_TOKEN = 2;
|
|
29
|
+
CHECKPOINT_KIND_VERSION_TOKEN = 3;
|
|
30
|
+
CHECKPOINT_KIND_TIME_WINDOW = 4;
|
|
31
|
+
CHECKPOINT_KIND_COMPOSITE = 5;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// * Defines the sync boundary for a provider account and resource.
|
|
35
|
+
message SyncResourceScope {
|
|
36
|
+
string tenant_id = 1;
|
|
37
|
+
optional string carrier_id = 2;
|
|
38
|
+
optional string provider_account_id = 3;
|
|
39
|
+
SyncResourceType resource_type = 4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// * Stores checkpoint values for a provider resource.
|
|
43
|
+
message SyncCheckpoint {
|
|
44
|
+
CheckpointKind kind = 1;
|
|
45
|
+
optional string cursor = 2;
|
|
46
|
+
optional string page_token = 3;
|
|
47
|
+
optional string version_token = 4;
|
|
48
|
+
optional google.protobuf.Timestamp window_start = 5;
|
|
49
|
+
optional google.protobuf.Timestamp window_end = 6;
|
|
50
|
+
optional google.protobuf.Timestamp last_synced_at = 7;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// * Captures health and retry state for a provider sync process.
|
|
54
|
+
message SyncHealth {
|
|
55
|
+
optional google.protobuf.Timestamp last_attempt_at = 1;
|
|
56
|
+
optional google.protobuf.Timestamp last_success_at = 2;
|
|
57
|
+
uint32 consecutive_failures = 3;
|
|
58
|
+
optional string last_error = 4;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// * Requests the stored sync checkpoint for a provider and resource boundary.
|
|
62
|
+
message GetSyncCheckpointRequest {
|
|
63
|
+
openeld.common.metadata.v1.SourceProvider provider = 1;
|
|
64
|
+
SyncResourceScope scope = 2;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// * Returns the checkpoint used to resume provider polling.
|
|
68
|
+
message GetSyncCheckpointResponse {
|
|
69
|
+
optional SyncCheckpoint checkpoint = 1;
|
|
70
|
+
optional SyncHealth health = 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// * Updates the stored sync checkpoint after a provider sync attempt.
|
|
74
|
+
message UpdateSyncCheckpointRequest {
|
|
75
|
+
openeld.common.metadata.v1.SourceProvider provider = 1;
|
|
76
|
+
SyncResourceScope scope = 2;
|
|
77
|
+
SyncCheckpoint checkpoint = 3;
|
|
78
|
+
optional SyncHealth health = 4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// * Acknowledges that a sync checkpoint update was accepted.
|
|
82
|
+
message UpdateSyncCheckpointResponse {
|
|
83
|
+
bool acknowledged = 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
service SyncService {
|
|
87
|
+
rpc GetSyncCheckpoint(GetSyncCheckpointRequest) returns (GetSyncCheckpointResponse);
|
|
88
|
+
rpc UpdateSyncCheckpoint(UpdateSyncCheckpointRequest) returns (UpdateSyncCheckpointResponse);
|
|
89
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package openeld.v1;
|
|
4
|
+
|
|
5
|
+
import public "common/metadata/audit.proto";
|
|
6
|
+
import public "common/metadata/source.proto";
|
|
7
|
+
import public "common/primitives/ids.proto";
|
|
8
|
+
import public "common/primitives/location.proto";
|
|
9
|
+
import public "common/primitives/time.proto";
|
|
10
|
+
import public "common/units/measurements.proto";
|
|
11
|
+
import public "logistics/asset.proto";
|
|
12
|
+
import public "logistics/asset_location.proto";
|
|
13
|
+
import public "logistics/carrier.proto";
|
|
14
|
+
import public "logistics/data_consent.proto";
|
|
15
|
+
import public "logistics/driver.proto";
|
|
16
|
+
import public "logistics/dvir.proto";
|
|
17
|
+
import public "logistics/enums.proto";
|
|
18
|
+
import public "logistics/gps_location.proto";
|
|
19
|
+
import public "logistics/hos_daily_summary.proto";
|
|
20
|
+
import public "logistics/hos_event.proto";
|
|
21
|
+
import public "logistics/ifta_trip.proto";
|
|
22
|
+
import public "logistics/safety_event.proto";
|
|
23
|
+
import public "logistics/vehicle.proto";
|
|
24
|
+
import public "logistics/vehicle_assignment.proto";
|
|
25
|
+
import public "providers/eld/geotab/contracts.proto";
|
|
26
|
+
import public "providers/eld/keeptruckin/contracts.proto";
|
|
27
|
+
import public "providers/eld/motive/contracts.proto";
|
|
28
|
+
import public "providers/eld/samsara/contracts.proto";
|
|
29
|
+
import public "providers/eld/shared/common.proto";
|
|
30
|
+
import public "providers/telematics/fleet_complete/contracts.proto";
|
|
31
|
+
import public "providers/telematics/fourkites/contracts.proto";
|
|
32
|
+
import public "providers/telematics/project44/contracts.proto";
|
|
33
|
+
import public "providers/telematics/shared/common.proto";
|
|
34
|
+
import public "providers/telematics/verizon_connect/contracts.proto";
|
|
35
|
+
import public "services/ingestion/service.proto";
|
|
36
|
+
import public "services/normalization/service.proto";
|
|
37
|
+
import public "services/query/service.proto";
|
|
38
|
+
import public "services/sync/service.proto";
|
|
39
|
+
|
|
File without changes
|
|
File without changes
|