@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.
Files changed (108) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.d.ts +102 -1
  3. package/dist/cjs/api/resources/shipping/resources/drivers/client/Client.js +439 -1
  4. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.d.ts +18 -0
  5. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.d.ts +13 -0
  6. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.d.ts +21 -0
  7. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.js +5 -0
  8. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.d.ts +25 -0
  9. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.js +5 -0
  10. package/dist/cjs/api/resources/shipping/resources/drivers/client/requests/index.d.ts +4 -0
  11. package/dist/cjs/api/resources/shipping/resources/drivers/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/shipping/resources/drivers/index.js +1 -0
  13. package/dist/cjs/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.d.ts +8 -0
  14. package/dist/cjs/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.js +10 -0
  15. package/dist/cjs/api/resources/shipping/resources/drivers/types/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/shipping/resources/drivers/types/index.js +17 -0
  17. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.d.ts +1 -1
  18. package/dist/cjs/api/resources/shipping/resources/flights/client/Client.js +1 -1
  19. package/dist/cjs/api/resources/shipping/resources/index.d.ts +2 -1
  20. package/dist/cjs/api/resources/shipping/resources/index.js +3 -2
  21. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +2 -1
  22. package/dist/cjs/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.js +2 -1
  23. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.d.ts +2 -1
  24. package/dist/cjs/api/resources/shipping/resources/taskGroups/client/Client.js +2 -1
  25. package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +26 -0
  26. package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +75 -0
  27. package/dist/cjs/api/resources/tracking/resources/driver/client/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/tracking/resources/driver/client/index.js +15 -0
  29. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.d.ts +26 -0
  30. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.js +5 -0
  31. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.d.ts +1 -0
  32. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.js +2 -0
  33. package/dist/cjs/api/resources/tracking/resources/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/tracking/resources/index.js +1 -0
  35. package/dist/cjs/api/types/DriverSelfReportedHoursAndMileage1.d.ts +17 -0
  36. package/dist/cjs/api/types/DriverSelfReportedHoursAndMileage1.js +5 -0
  37. package/dist/cjs/api/types/DriverSelfReportedHoursAndMileageListRes.d.ts +8 -0
  38. package/dist/cjs/api/types/DriverSelfReportedHoursAndMileageListRes.js +5 -0
  39. package/dist/cjs/api/types/DriverStatsRes.d.ts +8 -3
  40. package/dist/cjs/api/types/DriverUpdateRes.d.ts +1 -0
  41. package/dist/cjs/api/types/FlightLeg1.d.ts +1 -1
  42. package/dist/cjs/api/types/FlightLegClientCreate1.d.ts +1 -1
  43. package/dist/cjs/api/types/{FlightTrackPosition.d.ts → FlightTrackPosition1.d.ts} +1 -4
  44. package/dist/cjs/api/types/FlightTrackPosition1.js +5 -0
  45. package/dist/cjs/api/types/FlightTrackRes.d.ts +2 -2
  46. package/dist/{esm/api/types/FlightTrackWaypoint.d.mts → cjs/api/types/FlightTrackWaypoint1.d.ts} +1 -4
  47. package/dist/cjs/api/types/FlightTrackWaypoint1.js +5 -0
  48. package/dist/cjs/api/types/index.d.ts +4 -2
  49. package/dist/cjs/api/types/index.js +4 -2
  50. package/dist/cjs/version.d.ts +1 -1
  51. package/dist/cjs/version.js +1 -1
  52. package/dist/esm/Client.mjs +2 -2
  53. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.d.mts +102 -1
  54. package/dist/esm/api/resources/shipping/resources/drivers/client/Client.mjs +439 -1
  55. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.d.mts +18 -0
  56. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.d.mts +13 -0
  57. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.d.mts +21 -0
  58. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversListSelfReportedHoursAndMileageV1Request.mjs +4 -0
  59. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.d.mts +25 -0
  60. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/DriversOrgListSelfReportedHoursAndMileageV1Request.mjs +4 -0
  61. package/dist/esm/api/resources/shipping/resources/drivers/client/requests/index.d.mts +4 -0
  62. package/dist/esm/api/resources/shipping/resources/drivers/index.d.mts +1 -0
  63. package/dist/esm/api/resources/shipping/resources/drivers/index.mjs +1 -0
  64. package/dist/esm/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.d.mts +8 -0
  65. package/dist/esm/api/resources/shipping/resources/drivers/types/DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.mjs +7 -0
  66. package/dist/esm/api/resources/shipping/resources/drivers/types/index.d.mts +1 -0
  67. package/dist/esm/api/resources/shipping/resources/drivers/types/index.mjs +1 -0
  68. package/dist/esm/api/resources/shipping/resources/flights/client/Client.d.mts +1 -1
  69. package/dist/esm/api/resources/shipping/resources/flights/client/Client.mjs +1 -1
  70. package/dist/esm/api/resources/shipping/resources/index.d.mts +2 -1
  71. package/dist/esm/api/resources/shipping/resources/index.mjs +2 -1
  72. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +2 -1
  73. package/dist/esm/api/resources/shipping/resources/orderDrafts/resources/taskGroup/client/Client.mjs +2 -1
  74. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.d.mts +2 -1
  75. package/dist/esm/api/resources/shipping/resources/taskGroups/client/Client.mjs +2 -1
  76. package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +26 -0
  77. package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +75 -0
  78. package/dist/esm/api/resources/tracking/resources/driver/client/index.d.mts +1 -0
  79. package/dist/esm/api/resources/tracking/resources/driver/client/index.mjs +1 -1
  80. package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.d.mts +26 -0
  81. package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverByDriverDataPointClientCreate1.mjs +4 -0
  82. package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.d.mts +1 -0
  83. package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.mjs +1 -0
  84. package/dist/esm/api/resources/tracking/resources/index.d.mts +1 -0
  85. package/dist/esm/api/resources/tracking/resources/index.mjs +1 -0
  86. package/dist/esm/api/types/DriverSelfReportedHoursAndMileage1.d.mts +17 -0
  87. package/dist/esm/api/types/DriverSelfReportedHoursAndMileage1.mjs +4 -0
  88. package/dist/esm/api/types/DriverSelfReportedHoursAndMileageListRes.d.mts +8 -0
  89. package/dist/esm/api/types/DriverSelfReportedHoursAndMileageListRes.mjs +4 -0
  90. package/dist/esm/api/types/DriverStatsRes.d.mts +8 -3
  91. package/dist/esm/api/types/DriverUpdateRes.d.mts +1 -0
  92. package/dist/esm/api/types/FlightLeg1.d.mts +1 -1
  93. package/dist/esm/api/types/FlightLegClientCreate1.d.mts +1 -1
  94. package/dist/esm/api/types/{FlightTrackPosition.d.mts → FlightTrackPosition1.d.mts} +1 -4
  95. package/dist/esm/api/types/FlightTrackPosition1.mjs +4 -0
  96. package/dist/esm/api/types/FlightTrackRes.d.mts +2 -2
  97. package/dist/{cjs/api/types/FlightTrackWaypoint.d.ts → esm/api/types/FlightTrackWaypoint1.d.mts} +1 -4
  98. package/dist/esm/api/types/FlightTrackWaypoint1.mjs +4 -0
  99. package/dist/esm/api/types/index.d.mts +4 -2
  100. package/dist/esm/api/types/index.mjs +4 -2
  101. package/dist/esm/version.d.mts +1 -1
  102. package/dist/esm/version.mjs +1 -1
  103. package/package.json +1 -1
  104. package/reference.md +518 -2
  105. /package/dist/cjs/api/{types/FlightTrackPosition.js → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.js} +0 -0
  106. /package/dist/cjs/api/{types/FlightTrackWaypoint.js → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.js} +0 -0
  107. /package/dist/esm/api/{types/FlightTrackPosition.mjs → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientCreate1.mjs} +0 -0
  108. /package/dist/esm/api/{types/FlightTrackWaypoint.mjs → resources/shipping/resources/drivers/client/requests/DriverSelfReportedHoursAndMileageClientUpdate1.mjs} +0 -0
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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";
@@ -1,2 +1,3 @@
1
+ export * from "./types/index.mjs";
1
2
  export * from "./client/index.mjs";
2
3
  export * from "./resources/index.mjs";
@@ -1,2 +1,3 @@
1
+ export * from "./types/index.mjs";
1
2
  export * from "./client/index.mjs";
2
3
  export * from "./resources/index.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,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export const DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy = {
5
+ Date: "date",
6
+ DriverId: "driver_id",
7
+ };
@@ -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
  */
@@ -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,2 @@
1
1
  export {};
2
+ export * from "./requests/index.mjs";
@@ -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,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1 @@
1
+ export { type DriverByDriverDataPointClientCreate1 } from "./DriverByDriverDataPointClientCreate1.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";
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.mjs";
5
+ export interface DriverSelfReportedHoursAndMileageListRes {
6
+ items: Chrt.DriverSelfReportedHoursAndMileage1[];
7
+ total_count: number;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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
- cleaned_task_group_duration_hours: number;
9
- overlap_detected: boolean;
10
- total_mileage_observed?: number | null;
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
  }
@@ -5,6 +5,7 @@
5
5
  * Response showing what was updated.
6
6
  */
7
7
  export interface DriverUpdateRes {
8
+ driver_by_driver_ping_recorded: boolean;
8
9
  driver_updated: boolean;
9
10
  task_group_tracking_count: number;
10
11
  cargo_tracking_count: number;
@@ -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?: string | null;
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?: string | null;
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;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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.FlightTrackPosition[];
17
- waypoints?: Chrt.FlightTrackWaypoint[];
16
+ positions?: Chrt.FlightTrackPosition1[];
17
+ waypoints?: Chrt.FlightTrackWaypoint1[];
18
18
  legacy_route?: string | null;
19
19
  bearing?: number | null;
20
20
  heading?: number | null;
@@ -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
  }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -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 "./FlightTrackPosition.mjs";
160
+ export * from "./FlightTrackPosition1.mjs";
159
161
  export * from "./FlightTrackRes.mjs";
160
- export * from "./FlightTrackWaypoint.mjs";
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 "./FlightTrackPosition.mjs";
160
+ export * from "./FlightTrackPosition1.mjs";
159
161
  export * from "./FlightTrackRes.mjs";
160
- export * from "./FlightTrackWaypoint.mjs";
162
+ export * from "./FlightTrackWaypoint1.mjs";
161
163
  export * from "./GeometryCollectionGeometriesItem.mjs";
162
164
  export * from "./GeometryCollection.mjs";
163
165
  export * from "./HttpValidationError.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.756.0";
1
+ export declare const SDK_VERSION = "1.760.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.756.0";
1
+ export const SDK_VERSION = "1.760.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrt-inc/typescript-sdk",
3
- "version": "1.756.0",
3
+ "version": "1.760.0",
4
4
  "private": false,
5
5
  "repository": "github:chrt-inc/typescript-sdk",
6
6
  "type": "commonjs",