@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,25 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.js";
5
+ /**
6
+ * @example
7
+ * {
8
+ * filter_driver_id: "filter_driver_id",
9
+ * filter_start_date: "filter_start_date",
10
+ * filter_end_date: "filter_end_date",
11
+ * sort_by: "date",
12
+ * sort_order: "asc",
13
+ * page: 1,
14
+ * page_size: 1
15
+ * }
16
+ */
17
+ export interface DriversOrgListSelfReportedHoursAndMileageV1Request {
18
+ filter_driver_id?: string | null;
19
+ filter_start_date?: string | null;
20
+ filter_end_date?: string | null;
21
+ sort_by?: Chrt.shipping.DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy | null;
22
+ sort_order?: Chrt.SortOrderEnum | null;
23
+ page?: number | null;
24
+ page_size?: number | null;
25
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,8 @@
1
1
  export { type DriverStatsReq } from "./DriverStatsReq.js";
2
+ export { type DriversListSelfReportedHoursAndMileageV1Request } from "./DriversListSelfReportedHoursAndMileageV1Request.js";
3
+ export { type DriversOrgListSelfReportedHoursAndMileageV1Request } from "./DriversOrgListSelfReportedHoursAndMileageV1Request.js";
4
+ export { type DriverSelfReportedHoursAndMileageClientCreate1 } from "./DriverSelfReportedHoursAndMileageClientCreate1.js";
5
+ export { type DriverSelfReportedHoursAndMileageClientUpdate1 } from "./DriverSelfReportedHoursAndMileageClientUpdate1.js";
2
6
  export { type DriversListOrgMembersAndDriversV1Request } from "./DriversListOrgMembersAndDriversV1Request.js";
3
7
  export { type DriversListV1Request } from "./DriversListV1Request.js";
4
8
  export { type DriverClientCreate1 } from "./DriverClientCreate1.js";
@@ -1,2 +1,3 @@
1
+ export * from "./types/index.js";
1
2
  export * from "./client/index.js";
2
3
  export * from "./resources/index.js";
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/index.js"), exports);
17
18
  __exportStar(require("./client/index.js"), exports);
18
19
  __exportStar(require("./resources/index.js"), exports);
@@ -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,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy = void 0;
7
+ exports.DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy = {
8
+ Date: "date",
9
+ DriverId: "driver_id",
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./DriversOrgListSelfReportedHoursAndMileageV1RequestSortBy.js"), exports);
@@ -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.
@@ -233,7 +233,7 @@ class Flights {
233
233
  });
234
234
  }
235
235
  /**
236
- * 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)
236
+ * 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)
237
237
  *
238
238
  * @param {string} flightLegId
239
239
  * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,5 +1,6 @@
1
- export * as orderDrafts from "./orderDrafts/index.js";
2
1
  export * as drivers from "./drivers/index.js";
2
+ export * from "./drivers/types/index.js";
3
+ export * as orderDrafts from "./orderDrafts/index.js";
3
4
  export * as cargos from "./cargos/index.js";
4
5
  export * as flights from "./flights/index.js";
5
6
  export * as taskArtifacts from "./taskArtifacts/index.js";
@@ -36,9 +36,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tasks = exports.taskGroups = exports.orderTemplates = exports.orderSchedules = exports.orders = exports.taskArtifacts = exports.flights = exports.cargos = exports.drivers = exports.orderDrafts = void 0;
40
- exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
39
+ exports.tasks = exports.taskGroups = exports.orderTemplates = exports.orderSchedules = exports.orders = exports.taskArtifacts = exports.flights = exports.cargos = exports.orderDrafts = exports.drivers = void 0;
41
40
  exports.drivers = __importStar(require("./drivers/index.js"));
41
+ __exportStar(require("./drivers/types/index.js"), exports);
42
+ exports.orderDrafts = __importStar(require("./orderDrafts/index.js"));
42
43
  exports.cargos = __importStar(require("./cargos/index.js"));
43
44
  exports.flights = __importStar(require("./flights/index.js"));
44
45
  exports.taskArtifacts = __importStar(require("./taskArtifacts/index.js"));
@@ -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
  */
@@ -137,7 +137,8 @@ class TaskGroup {
137
137
  * provenance: "manual",
138
138
  * origin_iata: "origin_iata",
139
139
  * destination_iata: "destination_iata",
140
- * scheduled_departure_utc: "2024-01-15T09:30:00Z"
140
+ * scheduled_departure_utc: "2024-01-15T09:30:00Z",
141
+ * carrier_iata: "carrier_iata"
141
142
  * }]
142
143
  * })
143
144
  */
@@ -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
  */
@@ -525,7 +525,8 @@ class TaskGroups {
525
525
  * provenance: "manual",
526
526
  * origin_iata: "origin_iata",
527
527
  * destination_iata: "destination_iata",
528
- * scheduled_departure_utc: "2024-01-15T09:30:00Z"
528
+ * scheduled_departure_utc: "2024-01-15T09:30:00Z",
529
+ * carrier_iata: "carrier_iata"
529
530
  * }]
530
531
  * })
531
532
  */
@@ -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
  }
@@ -126,6 +126,81 @@ class Driver {
126
126
  }
127
127
  });
128
128
  }
129
+ /**
130
+ * 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)
131
+ *
132
+ * @param {Chrt.tracking.DriverByDriverDataPointClientCreate1} request
133
+ * @param {Driver.RequestOptions} requestOptions - Request-specific configuration.
134
+ *
135
+ * @throws {@link Chrt.UnprocessableEntityError}
136
+ *
137
+ * @example
138
+ * await client.tracking.driver.updateV2({
139
+ * schema_version: 1,
140
+ * location: {
141
+ * type: "Feature",
142
+ * geometry: {
143
+ * type: "GeometryCollection",
144
+ * geometries: [{
145
+ * type: "LineString",
146
+ * coordinates: [[]]
147
+ * }]
148
+ * }
149
+ * },
150
+ * timestamp: "2024-01-15T09:30:00Z"
151
+ * })
152
+ */
153
+ updateV2(request, requestOptions) {
154
+ return core.HttpResponsePromise.fromPromise(this.__updateV2(request, requestOptions));
155
+ }
156
+ __updateV2(request, requestOptions) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ var _a, _b, _c, _d;
159
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
160
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
161
+ 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"),
162
+ method: "POST",
163
+ headers: _headers,
164
+ contentType: "application/json",
165
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
166
+ requestType: "json",
167
+ body: request,
168
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
169
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
170
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
171
+ });
172
+ if (_response.ok) {
173
+ return { data: _response.body, rawResponse: _response.rawResponse };
174
+ }
175
+ if (_response.error.reason === "status-code") {
176
+ switch (_response.error.statusCode) {
177
+ case 422:
178
+ throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
179
+ default:
180
+ throw new errors.ChrtError({
181
+ statusCode: _response.error.statusCode,
182
+ body: _response.error.body,
183
+ rawResponse: _response.rawResponse,
184
+ });
185
+ }
186
+ }
187
+ switch (_response.error.reason) {
188
+ case "non-json":
189
+ throw new errors.ChrtError({
190
+ statusCode: _response.error.statusCode,
191
+ body: _response.error.rawBody,
192
+ rawResponse: _response.rawResponse,
193
+ });
194
+ case "timeout":
195
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/driver/update/v2.");
196
+ case "unknown":
197
+ throw new errors.ChrtError({
198
+ message: _response.error.errorMessage,
199
+ rawResponse: _response.rawResponse,
200
+ });
201
+ }
202
+ });
203
+ }
129
204
  _getAuthorizationHeader() {
130
205
  return __awaiter(this, void 0, void 0, function* () {
131
206
  const bearer = yield core.Supplier.get(this._options.token);
@@ -1 +1,2 @@
1
1
  export {};
2
+ export * from "./requests/index.js";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,26 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../../../../../../index.js";
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,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export { type DriverByDriverDataPointClientCreate1 } from "./DriverByDriverDataPointClientCreate1.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,5 +4,6 @@ export * as sessions from "./sessions/index.js";
4
4
  export * as sharingSettings from "./sharingSettings/index.js";
5
5
  export * as timeseries from "./timeseries/index.js";
6
6
  export * from "./devices/client/requests/index.js";
7
+ export * from "./driver/client/requests/index.js";
7
8
  export * from "./sessions/client/requests/index.js";
8
9
  export * from "./sharingSettings/client/requests/index.js";
@@ -43,5 +43,6 @@ exports.sessions = __importStar(require("./sessions/index.js"));
43
43
  exports.sharingSettings = __importStar(require("./sharingSettings/index.js"));
44
44
  exports.timeseries = __importStar(require("./timeseries/index.js"));
45
45
  __exportStar(require("./devices/client/requests/index.js"), exports);
46
+ __exportStar(require("./driver/client/requests/index.js"), exports);
46
47
  __exportStar(require("./sessions/client/requests/index.js"), exports);
47
48
  __exportStar(require("./sharingSettings/client/requests/index.js"), exports);
@@ -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,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Chrt from "../index.js";
5
+ export interface DriverSelfReportedHoursAndMileageListRes {
6
+ items: Chrt.DriverSelfReportedHoursAndMileage1[];
7
+ total_count: number;
8
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,7 +5,12 @@ import * as Chrt from "../index.js";
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,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -13,8 +13,8 @@ import * as Chrt from "../index.js";
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,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -139,6 +139,8 @@ export * from "./DriverComplianceDocument1.js";
139
139
  export * from "./DriverComplianceDocumentS3ObjectMetadata1.js";
140
140
  export * from "./DriverComplianceDocumentTypeEnum1.js";
141
141
  export * from "./DriverListRes.js";
142
+ export * from "./DriverSelfReportedHoursAndMileage1.js";
143
+ export * from "./DriverSelfReportedHoursAndMileageListRes.js";
142
144
  export * from "./DriverStatsRes.js";
143
145
  export * from "./DriverStatusEnum.js";
144
146
  export * from "./DriverUpdateAvailabilityReq.js";
@@ -155,9 +157,9 @@ export * from "./FlightLegStatusEnum1.js";
155
157
  export * from "./FlightLegStatusSourceEnum1.js";
156
158
  export * from "./FlightLegWebhookInfo.js";
157
159
  export * from "./FlightStatusEnum.js";
158
- export * from "./FlightTrackPosition.js";
160
+ export * from "./FlightTrackPosition1.js";
159
161
  export * from "./FlightTrackRes.js";
160
- export * from "./FlightTrackWaypoint.js";
162
+ export * from "./FlightTrackWaypoint1.js";
161
163
  export * from "./GeometryCollectionGeometriesItem.js";
162
164
  export * from "./GeometryCollection.js";
163
165
  export * from "./HttpValidationError.js";
@@ -155,6 +155,8 @@ __exportStar(require("./DriverComplianceDocument1.js"), exports);
155
155
  __exportStar(require("./DriverComplianceDocumentS3ObjectMetadata1.js"), exports);
156
156
  __exportStar(require("./DriverComplianceDocumentTypeEnum1.js"), exports);
157
157
  __exportStar(require("./DriverListRes.js"), exports);
158
+ __exportStar(require("./DriverSelfReportedHoursAndMileage1.js"), exports);
159
+ __exportStar(require("./DriverSelfReportedHoursAndMileageListRes.js"), exports);
158
160
  __exportStar(require("./DriverStatsRes.js"), exports);
159
161
  __exportStar(require("./DriverStatusEnum.js"), exports);
160
162
  __exportStar(require("./DriverUpdateAvailabilityReq.js"), exports);
@@ -171,9 +173,9 @@ __exportStar(require("./FlightLegStatusEnum1.js"), exports);
171
173
  __exportStar(require("./FlightLegStatusSourceEnum1.js"), exports);
172
174
  __exportStar(require("./FlightLegWebhookInfo.js"), exports);
173
175
  __exportStar(require("./FlightStatusEnum.js"), exports);
174
- __exportStar(require("./FlightTrackPosition.js"), exports);
176
+ __exportStar(require("./FlightTrackPosition1.js"), exports);
175
177
  __exportStar(require("./FlightTrackRes.js"), exports);
176
- __exportStar(require("./FlightTrackWaypoint.js"), exports);
178
+ __exportStar(require("./FlightTrackWaypoint1.js"), exports);
177
179
  __exportStar(require("./GeometryCollectionGeometriesItem.js"), exports);
178
180
  __exportStar(require("./GeometryCollection.js"), exports);
179
181
  __exportStar(require("./HttpValidationError.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.756.0";
1
+ export declare const SDK_VERSION = "1.760.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.756.0";
4
+ exports.SDK_VERSION = "1.760.0";
@@ -20,8 +20,8 @@ export class ChrtClient {
20
20
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
21
21
  "X-Fern-Language": "JavaScript",
22
22
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
23
- "X-Fern-SDK-Version": "1.756.0",
24
- "User-Agent": "@chrt-inc/typescript-sdk/1.756.0",
23
+ "X-Fern-SDK-Version": "1.760.0",
24
+ "User-Agent": "@chrt-inc/typescript-sdk/1.760.0",
25
25
  "X-Fern-Runtime": core.RUNTIME.type,
26
26
  "X-Fern-Runtime-Version": core.RUNTIME.version,
27
27
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });