@chrt-inc/typescript-sdk 1.756.0 → 1.760.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/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +102 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +439 -1
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.d.ts +18 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.d.ts +13 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.d.ts +21 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.d.ts +25 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.js +5 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/index.js +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.d.ts +8 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.js +10 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/shipping/resources/drivers/types/index.js +17 -0
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +1 -1
- package/dist/cjs/api/resources/shipping/resources/index.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/index.js +3 -2
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +2 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +2 -1
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +75 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/index.js +15 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.d.ts +26 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.js +5 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/tracking/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/tracking/resources/index.js +1 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileage1.d.ts +17 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileage1.js +5 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileageListRes.d.ts +8 -0
- package/dist/cjs/api/types/DriverSelfReportedHoursAndMileageListRes.js +5 -0
- package/dist/cjs/api/types/DriverStatsRes.d.ts +8 -3
- package/dist/cjs/api/types/DriverUpdateRes.d.ts +1 -0
- package/dist/cjs/api/types/FlightLeg1.d.ts +1 -1
- package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +1 -1
- package/dist/cjs/api/types/{FlightTrackPosition.d.ts → FlightTrackPosition1.d.ts} +1 -4
- package/dist/cjs/api/types/FlightTrackPosition1.js +5 -0
- package/dist/cjs/api/types/FlightTrackRes.d.ts +2 -2
- package/dist/{esm/api/types/FlightTrackWaypoint.d.mts → cjs/api/types/FlightTrackWaypoint1.d.ts} +1 -4
- package/dist/cjs/api/types/FlightTrackWaypoint1.js +5 -0
- package/dist/cjs/api/types/index.d.ts +4 -2
- package/dist/cjs/api/types/index.js +4 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +102 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +439 -1
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.d.mts +18 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.d.mts +13 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.d.mts +21 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.d.mts +25 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.mjs +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/shipping/resources/drivers/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.d.mts +8 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.mjs +7 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/index.d.mts +1 -0
- package/dist/esm/api/resources/shipping/resources/drivers/types/index.mjs +1 -0
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +1 -1
- package/dist/esm/api/resources/shipping/resources/index.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/index.mjs +2 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +2 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +2 -1
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +75 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/index.mjs +1 -1
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.d.mts +26 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.mjs +4 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/tracking/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/tracking/resources/index.mjs +1 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileage1.d.mts +17 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileage1.mjs +4 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileageListRes.d.mts +8 -0
- package/dist/esm/api/types/DriverSelfReportedHoursAndMileageListRes.mjs +4 -0
- package/dist/esm/api/types/DriverStatsRes.d.mts +8 -3
- package/dist/esm/api/types/DriverUpdateRes.d.mts +1 -0
- package/dist/esm/api/types/FlightLeg1.d.mts +1 -1
- package/dist/esm/api/types/FlightLegClientCreate1.d.mts +1 -1
- package/dist/esm/api/types/{FlightTrackPosition.d.mts → FlightTrackPosition1.d.mts} +1 -4
- package/dist/esm/api/types/FlightTrackPosition1.mjs +4 -0
- package/dist/esm/api/types/FlightTrackRes.d.mts +2 -2
- package/dist/{cjs/api/types/FlightTrackWaypoint.d.ts → esm/api/types/FlightTrackWaypoint1.d.mts} +1 -4
- package/dist/esm/api/types/FlightTrackWaypoint1.mjs +4 -0
- package/dist/esm/api/types/index.d.mts +4 -2
- package/dist/esm/api/types/index.mjs +4 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +518 -2
- /package/dist/cjs/api/{types/FlightTrackPosition.js → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.js} +0 -0
- /package/dist/cjs/api/{types/FlightTrackWaypoint.js → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.js} +0 -0
- /package/dist/esm/api/{types/FlightTrackPosition.mjs → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.mjs} +0 -0
- /package/dist/esm/api/{types/FlightTrackWaypoint.mjs → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.mjs} +0 -0
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export { type DriverStatsReq } from "./DriverStatsReq.mjs";
|
|
2
|
+
export { type DriversListSelfReportedHoursAndMileageV1Request } from "./DriversListSelfReportedHoursAndMileageV1Request.mjs";
|
|
3
|
+
export { type DriversOrgListSelfReportedHoursAndMileageV1Request } from "./DriversOrgListSelfReportedHoursAndMileageV1Request.mjs";
|
|
4
|
+
export { type DriverSelfReportedHoursAndMileageClientCreate1 } from "./DriverSelfReportedHoursAndMileageClientCreate1.mjs";
|
|
5
|
+
export { type DriverSelfReportedHoursAndMileageClientUpdate1 } from "./DriverSelfReportedHoursAndMileageClientUpdate1.mjs";
|
|
2
6
|
export { type DriversListOrgMembersAndDriversV1Request } from "./DriversListOrgMembersAndDriversV1Request.mjs";
|
|
3
7
|
export { type DriversListV1Request } from "./DriversListV1Request.mjs";
|
|
4
8
|
export { type DriverClientCreate1 } from "./DriverClientCreate1.mjs";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export type DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy = "date" | "driver_id";
|
|
5
|
+
export declare const DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy: {
|
|
6
|
+
readonly Date: "date";
|
|
7
|
+
readonly DriverId: "driver_id";
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.mjs";
|
|
@@ -70,7 +70,7 @@ export declare class Flights {
|
|
|
70
70
|
getFlightStatusForFlightLegV1(flightLegId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightLeg1>;
|
|
71
71
|
private __getFlightStatusForFlightLegV1;
|
|
72
72
|
/**
|
|
73
|
-
* Returns the Cirium-sourced positional track for a flight leg — the live breadcrumb trail plus the planned path (waypoints + legacy route) in one read-through call. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
|
|
73
|
+
* Returns the Cirium-sourced positional track for a flight leg — the live breadcrumb trail plus the planned path (waypoints + legacy route) in one read-through call, cached on read. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
|
|
74
74
|
*
|
|
75
75
|
* @param {string} flightLegId
|
|
76
76
|
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -197,7 +197,7 @@ export class Flights {
|
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
|
-
* Returns the Cirium-sourced positional track for a flight leg — the live breadcrumb trail plus the planned path (waypoints + legacy route) in one read-through call. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
|
|
200
|
+
* Returns the Cirium-sourced positional track for a flight leg — the live breadcrumb trail plus the planned path (waypoints + legacy route) in one read-through call, cached on read. | authz_personas=[driver_for_executor, coordinator_org_operators, executor_org_operators, shipper_org_operators] | () -> (FlightTrackRes)
|
|
201
201
|
*
|
|
202
202
|
* @param {string} flightLegId
|
|
203
203
|
* @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
2
1
|
export * as drivers from "./drivers/index.mjs";
|
|
2
|
+
export * from "./drivers/types/index.mjs";
|
|
3
|
+
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
3
4
|
export * as cargos from "./cargos/index.mjs";
|
|
4
5
|
export * as flights from "./flights/index.mjs";
|
|
5
6
|
export * as taskArtifacts from "./taskArtifacts/index.mjs";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
2
1
|
export * as drivers from "./drivers/index.mjs";
|
|
2
|
+
export * from "./drivers/types/index.mjs";
|
|
3
|
+
export * as orderDrafts from "./orderDrafts/index.mjs";
|
|
3
4
|
export * as cargos from "./cargos/index.mjs";
|
|
4
5
|
export * as flights from "./flights/index.mjs";
|
|
5
6
|
export * as taskArtifacts from "./taskArtifacts/index.mjs";
|
|
@@ -63,7 +63,8 @@ export declare class TaskGroup {
|
|
|
63
63
|
* provenance: "manual",
|
|
64
64
|
* origin_iata: "origin_iata",
|
|
65
65
|
* destination_iata: "destination_iata",
|
|
66
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
66
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
67
|
+
* carrier_iata: "carrier_iata"
|
|
67
68
|
* }]
|
|
68
69
|
* })
|
|
69
70
|
*/
|
package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs
CHANGED
|
@@ -101,7 +101,8 @@ export class TaskGroup {
|
|
|
101
101
|
* provenance: "manual",
|
|
102
102
|
* origin_iata: "origin_iata",
|
|
103
103
|
* destination_iata: "destination_iata",
|
|
104
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
104
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
105
|
+
* carrier_iata: "carrier_iata"
|
|
105
106
|
* }]
|
|
106
107
|
* })
|
|
107
108
|
*/
|
|
@@ -157,7 +157,8 @@ export declare class TaskGroups {
|
|
|
157
157
|
* provenance: "manual",
|
|
158
158
|
* origin_iata: "origin_iata",
|
|
159
159
|
* destination_iata: "destination_iata",
|
|
160
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
160
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
161
|
+
* carrier_iata: "carrier_iata"
|
|
161
162
|
* }]
|
|
162
163
|
* })
|
|
163
164
|
*/
|
|
@@ -489,7 +489,8 @@ export class TaskGroups {
|
|
|
489
489
|
* provenance: "manual",
|
|
490
490
|
* origin_iata: "origin_iata",
|
|
491
491
|
* destination_iata: "destination_iata",
|
|
492
|
-
* scheduled_departure_utc: "2024-01-15T09:30:00Z"
|
|
492
|
+
* scheduled_departure_utc: "2024-01-15T09:30:00Z",
|
|
493
|
+
* carrier_iata: "carrier_iata"
|
|
493
494
|
* }]
|
|
494
495
|
* })
|
|
495
496
|
*/
|
|
@@ -52,5 +52,31 @@ export declare class Driver {
|
|
|
52
52
|
*/
|
|
53
53
|
updateV1(request: Chrt.LocationFeature, requestOptions?: Driver.RequestOptions): core.HttpResponsePromise<Chrt.DriverUpdateRes>;
|
|
54
54
|
private __updateV1;
|
|
55
|
+
/**
|
|
56
|
+
* Records driver location updates with a client-supplied capture timestamp. Writes a driver_by_driver ping on every call, updates the driver's last seen, and records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. | auth: api_key | (DriverByDriverDataPointClientCreate1) -> (DriverUpdateRes)
|
|
57
|
+
*
|
|
58
|
+
* @param {Chrt.tracking.DriverByDriverDataPointClientCreate1} request
|
|
59
|
+
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.tracking.driver.updateV2({
|
|
65
|
+
* schema_version: 1,
|
|
66
|
+
* location: {
|
|
67
|
+
* type: "Feature",
|
|
68
|
+
* geometry: {
|
|
69
|
+
* type: "GeometryCollection",
|
|
70
|
+
* geometries: [{
|
|
71
|
+
* type: "LineString",
|
|
72
|
+
* coordinates: [[]]
|
|
73
|
+
* }]
|
|
74
|
+
* }
|
|
75
|
+
* },
|
|
76
|
+
* timestamp: "2024-01-15T09:30:00Z"
|
|
77
|
+
* })
|
|
78
|
+
*/
|
|
79
|
+
updateV2(request: Chrt.tracking.DriverByDriverDataPointClientCreate1, requestOptions?: Driver.RequestOptions): core.HttpResponsePromise<Chrt.DriverUpdateRes>;
|
|
80
|
+
private __updateV2;
|
|
55
81
|
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
56
82
|
}
|
|
@@ -90,6 +90,81 @@ export class Driver {
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Records driver location updates with a client-supplied capture timestamp. Writes a driver_by_driver ping on every call, updates the driver's last seen, and records tracking data for all IN_PROGRESS task groups and their associated IN_TRANSIT cargos. | auth: api_key | (DriverByDriverDataPointClientCreate1) -> (DriverUpdateRes)
|
|
95
|
+
*
|
|
96
|
+
* @param {Chrt.tracking.DriverByDriverDataPointClientCreate1} request
|
|
97
|
+
* @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
|
|
98
|
+
*
|
|
99
|
+
* @throws {@link Chrt.UnprocessableEntityError}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* await client.tracking.driver.updateV2({
|
|
103
|
+
* schema_version: 1,
|
|
104
|
+
* location: {
|
|
105
|
+
* type: "Feature",
|
|
106
|
+
* geometry: {
|
|
107
|
+
* type: "GeometryCollection",
|
|
108
|
+
* geometries: [{
|
|
109
|
+
* type: "LineString",
|
|
110
|
+
* coordinates: [[]]
|
|
111
|
+
* }]
|
|
112
|
+
* }
|
|
113
|
+
* },
|
|
114
|
+
* timestamp: "2024-01-15T09:30:00Z"
|
|
115
|
+
* })
|
|
116
|
+
*/
|
|
117
|
+
updateV2(request, requestOptions) {
|
|
118
|
+
return core.HttpResponsePromise.fromPromise(this.__updateV2(request, requestOptions));
|
|
119
|
+
}
|
|
120
|
+
__updateV2(request, requestOptions) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
var _a, _b, _c, _d;
|
|
123
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
124
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
125
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ChrtEnvironment.Local, "tracking/driver/update/v2"),
|
|
126
|
+
method: "POST",
|
|
127
|
+
headers: _headers,
|
|
128
|
+
contentType: "application/json",
|
|
129
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
130
|
+
requestType: "json",
|
|
131
|
+
body: request,
|
|
132
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
133
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
134
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
135
|
+
});
|
|
136
|
+
if (_response.ok) {
|
|
137
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
138
|
+
}
|
|
139
|
+
if (_response.error.reason === "status-code") {
|
|
140
|
+
switch (_response.error.statusCode) {
|
|
141
|
+
case 422:
|
|
142
|
+
throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
143
|
+
default:
|
|
144
|
+
throw new errors.ChrtError({
|
|
145
|
+
statusCode: _response.error.statusCode,
|
|
146
|
+
body: _response.error.body,
|
|
147
|
+
rawResponse: _response.rawResponse,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
switch (_response.error.reason) {
|
|
152
|
+
case "non-json":
|
|
153
|
+
throw new errors.ChrtError({
|
|
154
|
+
statusCode: _response.error.statusCode,
|
|
155
|
+
body: _response.error.rawBody,
|
|
156
|
+
rawResponse: _response.rawResponse,
|
|
157
|
+
});
|
|
158
|
+
case "timeout":
|
|
159
|
+
throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/driver/update/v2.");
|
|
160
|
+
case "unknown":
|
|
161
|
+
throw new errors.ChrtError({
|
|
162
|
+
message: _response.error.errorMessage,
|
|
163
|
+
rawResponse: _response.rawResponse,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
93
168
|
_getAuthorizationHeader() {
|
|
94
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
170
|
const bearer = yield core.Supplier.get(this._options.token);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Chrt from "../../../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* schema_version: 1,
|
|
9
|
+
* location: {
|
|
10
|
+
* type: "Feature",
|
|
11
|
+
* geometry: {
|
|
12
|
+
* type: "GeometryCollection",
|
|
13
|
+
* geometries: [{
|
|
14
|
+
* type: "LineString",
|
|
15
|
+
* coordinates: [[]]
|
|
16
|
+
* }]
|
|
17
|
+
* }
|
|
18
|
+
* },
|
|
19
|
+
* timestamp: "2024-01-15T09:30:00Z"
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
export interface DriverByDriverDataPointClientCreate1 {
|
|
23
|
+
schema_version: number;
|
|
24
|
+
location: Chrt.LocationFeature;
|
|
25
|
+
timestamp: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type DriverByDriverDataPointClientCreate1 } from "./DriverByDriverDataPointClientCreate1.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,5 +4,6 @@ export * as sessions from "./sessions/index.mjs";
|
|
|
4
4
|
export * as sharingSettings from "./sharingSettings/index.mjs";
|
|
5
5
|
export * as timeseries from "./timeseries/index.mjs";
|
|
6
6
|
export * from "./devices/client/requests/index.mjs";
|
|
7
|
+
export * from "./driver/client/requests/index.mjs";
|
|
7
8
|
export * from "./sessions/client/requests/index.mjs";
|
|
8
9
|
export * from "./sharingSettings/client/requests/index.mjs";
|
|
@@ -4,5 +4,6 @@ export * as sessions from "./sessions/index.mjs";
|
|
|
4
4
|
export * as sharingSettings from "./sharingSettings/index.mjs";
|
|
5
5
|
export * as timeseries from "./timeseries/index.mjs";
|
|
6
6
|
export * from "./devices/client/requests/index.mjs";
|
|
7
|
+
export * from "./driver/client/requests/index.mjs";
|
|
7
8
|
export * from "./sessions/client/requests/index.mjs";
|
|
8
9
|
export * from "./sharingSettings/client/requests/index.mjs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface DriverSelfReportedHoursAndMileage1 {
|
|
5
|
+
schema_version: number;
|
|
6
|
+
driver_id: string;
|
|
7
|
+
date: string;
|
|
8
|
+
hours_worked?: number | null;
|
|
9
|
+
miles_driven?: number | null;
|
|
10
|
+
/** Must be a string starting with `org_` */
|
|
11
|
+
org_id: string;
|
|
12
|
+
created_at_timestamp: string;
|
|
13
|
+
/** Must be a string starting with `user_` */
|
|
14
|
+
created_by_user_id: string;
|
|
15
|
+
updated_at: string;
|
|
16
|
+
_id: string;
|
|
17
|
+
}
|
|
@@ -5,7 +5,12 @@ import * as Chrt from "../index.mjs";
|
|
|
5
5
|
export interface DriverStatsRes {
|
|
6
6
|
task_groups: Chrt.TaskGroup1[];
|
|
7
7
|
excluded_task_groups: Chrt.TaskGroup1[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
/** Summed from task group in-progress intervals merged to eliminate double-counting of overlapping task groups. */
|
|
9
|
+
deduped_task_group_driver_hours: number;
|
|
10
|
+
overlapping_task_groups_detected: boolean;
|
|
11
|
+
/** Total mileage recorded for this driver across all tracked pings that fall within the requested query window. Independent of task group filtering or deduplication. i.e. includes pings inside and outside of task group time windows */
|
|
12
|
+
total_driver_mileage_tracked?: number | null;
|
|
13
|
+
/** Total mileage from pings that fall within task group in-progress merged intervals. i.e. excludes pings outside of merged task group time windows */
|
|
14
|
+
deduped_task_group_driver_mileage_tracked?: number | null;
|
|
15
|
+
self_reported_hours_and_mileage?: Chrt.DriverSelfReportedHoursAndMileage1[];
|
|
11
16
|
}
|
|
@@ -12,7 +12,7 @@ export interface FlightLeg1 {
|
|
|
12
12
|
origin_iata: string;
|
|
13
13
|
destination_iata: string;
|
|
14
14
|
scheduled_departure_utc: string;
|
|
15
|
-
carrier_iata
|
|
15
|
+
carrier_iata: string;
|
|
16
16
|
carrier_icao?: string | null;
|
|
17
17
|
scheduled_arrival_utc?: string | null;
|
|
18
18
|
cirium_flight_id?: number | null;
|
|
@@ -9,7 +9,7 @@ export interface FlightLegClientCreate1 {
|
|
|
9
9
|
origin_iata: string;
|
|
10
10
|
destination_iata: string;
|
|
11
11
|
scheduled_departure_utc: string;
|
|
12
|
-
carrier_iata
|
|
12
|
+
carrier_iata: string;
|
|
13
13
|
carrier_icao?: string | null;
|
|
14
14
|
scheduled_arrival_utc?: string | null;
|
|
15
15
|
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
* A single reported (or derived) aircraft position along the flown trail.
|
|
6
|
-
*/
|
|
7
|
-
export interface FlightTrackPosition {
|
|
4
|
+
export interface FlightTrackPosition1 {
|
|
8
5
|
lat?: number | null;
|
|
9
6
|
lon?: number | null;
|
|
10
7
|
altitude_ft?: number | null;
|
|
@@ -13,8 +13,8 @@ import * as Chrt from "../index.mjs";
|
|
|
13
13
|
*/
|
|
14
14
|
export interface FlightTrackRes {
|
|
15
15
|
cirium_flight_id?: number | null;
|
|
16
|
-
positions?: Chrt.
|
|
17
|
-
waypoints?: Chrt.
|
|
16
|
+
positions?: Chrt.FlightTrackPosition1[];
|
|
17
|
+
waypoints?: Chrt.FlightTrackWaypoint1[];
|
|
18
18
|
legacy_route?: string | null;
|
|
19
19
|
bearing?: number | null;
|
|
20
20
|
heading?: number | null;
|
package/dist/{cjs/api/types/FlightTrackWaypoint.d.ts → esm/api/types/FlightTrackWaypoint1.d.mts}
RENAMED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
* A lat/lon point on the published flight plan (the planned path).
|
|
6
|
-
*/
|
|
7
|
-
export interface FlightTrackWaypoint {
|
|
4
|
+
export interface FlightTrackWaypoint1 {
|
|
8
5
|
lat?: number | null;
|
|
9
6
|
lon?: number | null;
|
|
10
7
|
}
|
|
@@ -139,6 +139,8 @@ export * from "./DriverComplianceDocument1.mjs";
|
|
|
139
139
|
export * from "./DriverComplianceDocumentS3ObjectMetadata1.mjs";
|
|
140
140
|
export * from "./DriverComplianceDocumentTypeEnum1.mjs";
|
|
141
141
|
export * from "./DriverListRes.mjs";
|
|
142
|
+
export * from "./DriverSelfReportedHoursAndMileage1.mjs";
|
|
143
|
+
export * from "./DriverSelfReportedHoursAndMileageListRes.mjs";
|
|
142
144
|
export * from "./DriverStatsRes.mjs";
|
|
143
145
|
export * from "./DriverStatusEnum.mjs";
|
|
144
146
|
export * from "./DriverUpdateAvailabilityReq.mjs";
|
|
@@ -155,9 +157,9 @@ export * from "./FlightLegStatusEnum1.mjs";
|
|
|
155
157
|
export * from "./FlightLegStatusSourceEnum1.mjs";
|
|
156
158
|
export * from "./FlightLegWebhookInfo.mjs";
|
|
157
159
|
export * from "./FlightStatusEnum.mjs";
|
|
158
|
-
export * from "./
|
|
160
|
+
export * from "./FlightTrackPosition1.mjs";
|
|
159
161
|
export * from "./FlightTrackRes.mjs";
|
|
160
|
-
export * from "./
|
|
162
|
+
export * from "./FlightTrackWaypoint1.mjs";
|
|
161
163
|
export * from "./GeometryCollectionGeometriesItem.mjs";
|
|
162
164
|
export * from "./GeometryCollection.mjs";
|
|
163
165
|
export * from "./HttpValidationError.mjs";
|
|
@@ -139,6 +139,8 @@ export * from "./DriverComplianceDocument1.mjs";
|
|
|
139
139
|
export * from "./DriverComplianceDocumentS3ObjectMetadata1.mjs";
|
|
140
140
|
export * from "./DriverComplianceDocumentTypeEnum1.mjs";
|
|
141
141
|
export * from "./DriverListRes.mjs";
|
|
142
|
+
export * from "./DriverSelfReportedHoursAndMileage1.mjs";
|
|
143
|
+
export * from "./DriverSelfReportedHoursAndMileageListRes.mjs";
|
|
142
144
|
export * from "./DriverStatsRes.mjs";
|
|
143
145
|
export * from "./DriverStatusEnum.mjs";
|
|
144
146
|
export * from "./DriverUpdateAvailabilityReq.mjs";
|
|
@@ -155,9 +157,9 @@ export * from "./FlightLegStatusEnum1.mjs";
|
|
|
155
157
|
export * from "./FlightLegStatusSourceEnum1.mjs";
|
|
156
158
|
export * from "./FlightLegWebhookInfo.mjs";
|
|
157
159
|
export * from "./FlightStatusEnum.mjs";
|
|
158
|
-
export * from "./
|
|
160
|
+
export * from "./FlightTrackPosition1.mjs";
|
|
159
161
|
export * from "./FlightTrackRes.mjs";
|
|
160
|
-
export * from "./
|
|
162
|
+
export * from "./FlightTrackWaypoint1.mjs";
|
|
161
163
|
export * from "./GeometryCollectionGeometriesItem.mjs";
|
|
162
164
|
export * from "./GeometryCollection.mjs";
|
|
163
165
|
export * from "./HttpValidationError.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.760.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.760.0";
|