@chrt-inc/typescript-sdk 1.331.0 → 1.334.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 (130) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +41 -36
  3. package/dist/cjs/api/resources/drivers/client/Client.d.ts +0 -24
  4. package/dist/cjs/api/resources/drivers/client/Client.js +0 -73
  5. package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +0 -1
  6. package/dist/cjs/api/resources/flights/client/Client.d.ts +47 -0
  7. package/dist/cjs/api/resources/flights/client/Client.js +127 -0
  8. package/dist/cjs/api/resources/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/index.js +2 -1
  10. package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.d.ts +5 -7
  11. package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/Client.js +8 -10
  12. package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.ts +0 -1
  13. package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +5 -7
  14. package/dist/cjs/api/resources/taskGroups/client/Client.js +8 -10
  15. package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +0 -1
  16. package/dist/cjs/api/resources/tracking/client/Client.d.ts +3 -3
  17. package/dist/cjs/api/resources/tracking/client/Client.js +3 -3
  18. package/dist/cjs/api/resources/tracking/resources/driver/client/Client.d.ts +10 -13
  19. package/dist/cjs/api/resources/tracking/resources/driver/client/Client.js +9 -12
  20. package/dist/cjs/api/resources/tracking/resources/driver/client/index.d.ts +0 -1
  21. package/dist/cjs/api/resources/tracking/resources/driver/client/index.js +0 -15
  22. package/dist/cjs/api/resources/tracking/resources/index.d.ts +2 -3
  23. package/dist/cjs/api/resources/tracking/resources/index.js +3 -4
  24. package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.d.ts +16 -16
  25. package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.js +17 -17
  26. package/dist/cjs/api/resources/tracking/resources/sharingSettings/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/tracking/resources/sharingSettings/index.js +17 -0
  28. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.js +10 -10
  29. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.js +8 -8
  30. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.js +10 -10
  31. package/dist/cjs/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.js +8 -8
  32. package/dist/cjs/api/types/FlightInfoForTaskRes.d.ts +10 -0
  33. package/dist/cjs/api/types/SetFlightInfoReq.d.ts +9 -0
  34. package/dist/cjs/api/types/Task1.d.ts +0 -1
  35. package/dist/cjs/api/types/TaskClientCreate1.d.ts +0 -1
  36. package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
  37. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  38. package/dist/cjs/api/types/index.d.ts +2 -0
  39. package/dist/cjs/api/types/index.js +2 -0
  40. package/dist/cjs/version.d.ts +1 -1
  41. package/dist/cjs/version.js +1 -1
  42. package/dist/esm/Client.d.mts +3 -0
  43. package/dist/esm/Client.mjs +7 -2
  44. package/dist/esm/api/resources/drivers/client/Client.d.mts +0 -24
  45. package/dist/esm/api/resources/drivers/client/Client.mjs +0 -73
  46. package/dist/esm/api/resources/drivers/client/requests/index.d.mts +0 -1
  47. package/dist/esm/api/resources/flights/client/Client.d.mts +47 -0
  48. package/dist/esm/api/resources/flights/client/Client.mjs +90 -0
  49. package/dist/esm/api/resources/flights/client/index.mjs +1 -0
  50. package/dist/esm/api/resources/index.d.mts +1 -0
  51. package/dist/esm/api/resources/index.mjs +1 -0
  52. package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.d.mts +5 -7
  53. package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/Client.mjs +8 -10
  54. package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/index.d.mts +0 -1
  55. package/dist/esm/api/resources/taskGroups/client/Client.d.mts +5 -7
  56. package/dist/esm/api/resources/taskGroups/client/Client.mjs +8 -10
  57. package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +0 -1
  58. package/dist/esm/api/resources/tracking/client/Client.d.mts +3 -3
  59. package/dist/esm/api/resources/tracking/client/Client.mjs +3 -3
  60. package/dist/esm/api/resources/tracking/resources/driver/client/Client.d.mts +10 -13
  61. package/dist/esm/api/resources/tracking/resources/driver/client/Client.mjs +9 -12
  62. package/dist/esm/api/resources/tracking/resources/driver/client/index.d.mts +0 -1
  63. package/dist/esm/api/resources/tracking/resources/driver/client/index.mjs +1 -1
  64. package/dist/esm/api/resources/tracking/resources/index.d.mts +2 -3
  65. package/dist/esm/api/resources/tracking/resources/index.mjs +2 -3
  66. package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.d.mts +16 -16
  67. package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/Client.mjs +15 -15
  68. package/dist/esm/api/resources/tracking/resources/sharingSettings/client/requests/index.mjs +1 -0
  69. package/dist/esm/api/resources/tracking/resources/sharingSettings/index.d.mts +1 -0
  70. package/dist/esm/api/resources/tracking/resources/sharingSettings/index.mjs +1 -0
  71. package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDevice/client/Client.mjs +10 -10
  72. package/dist/esm/api/resources/tracking/resources/timeseries/resources/cargoByDriver/client/Client.mjs +8 -8
  73. package/dist/esm/api/resources/tracking/resources/timeseries/resources/sessionByDevice/client/Client.mjs +10 -10
  74. package/dist/esm/api/resources/tracking/resources/timeseries/resources/taskGroupByDriver/client/Client.mjs +8 -8
  75. package/dist/esm/api/types/FlightInfoForTaskRes.d.mts +10 -0
  76. package/dist/esm/api/types/SetFlightInfoReq.d.mts +9 -0
  77. package/dist/esm/api/types/Task1.d.mts +0 -1
  78. package/dist/esm/api/types/TaskClientCreate1.d.mts +0 -1
  79. package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
  80. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  81. package/dist/esm/api/types/index.d.mts +2 -0
  82. package/dist/esm/api/types/index.mjs +2 -0
  83. package/dist/esm/version.d.mts +1 -1
  84. package/dist/esm/version.mjs +1 -1
  85. package/package.json +1 -1
  86. package/reference.md +97 -115
  87. package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +0 -23
  88. package/dist/cjs/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.d.ts +0 -13
  89. package/dist/cjs/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.ts +0 -13
  90. package/dist/cjs/api/resources/taskGroups/client/requests/SetFlightNumberReq.js +0 -5
  91. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.d.ts +0 -24
  92. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.js +0 -5
  93. package/dist/cjs/api/resources/tracking/resources/driver/client/requests/index.d.ts +0 -1
  94. package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +0 -23
  95. package/dist/esm/api/resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.d.mts +0 -13
  96. package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.mts +0 -13
  97. package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.mjs +0 -4
  98. package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.d.mts +0 -24
  99. package/dist/esm/api/resources/tracking/resources/driver/client/requests/DriverUpdateReq.mjs +0 -4
  100. package/dist/esm/api/resources/tracking/resources/driver/client/requests/index.d.mts +0 -1
  101. /package/dist/{esm/api/resources/tracking/resources/driver/client/requests/index.mjs → cjs/api/resources/flights/client/index.d.ts} +0 -0
  102. /package/dist/cjs/api/resources/{tracking/resources/driver/client/requests → flights/client}/index.js +0 -0
  103. /package/dist/cjs/api/resources/{tracking/resources/sharing → flights}/index.d.ts +0 -0
  104. /package/dist/cjs/api/resources/{tracking/resources/sharing → flights}/index.js +0 -0
  105. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.d.ts +0 -0
  106. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.js +0 -0
  107. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.d.ts +0 -0
  108. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.js +0 -0
  109. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.d.ts +0 -0
  110. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.js +0 -0
  111. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.d.ts +0 -0
  112. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.js +0 -0
  113. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/index.d.ts +0 -0
  114. /package/dist/cjs/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/index.js +0 -0
  115. /package/dist/cjs/api/{resources/drivers/client/requests/DriverLastSeenReq.js → types/FlightInfoForTaskRes.js} +0 -0
  116. /package/dist/cjs/api/{resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.js → types/SetFlightInfoReq.js} +0 -0
  117. /package/dist/esm/api/resources/{tracking/resources/sharing/client/requests/index.mjs → flights/client/index.d.mts} +0 -0
  118. /package/dist/esm/api/resources/{tracking/resources/sharing → flights}/index.d.mts +0 -0
  119. /package/dist/esm/api/resources/{tracking/resources/sharing → flights}/index.mjs +0 -0
  120. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.d.mts +0 -0
  121. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/index.mjs +0 -0
  122. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.d.mts +0 -0
  123. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDeviceSharingSettingsUpdateReq.mjs +0 -0
  124. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.d.mts +0 -0
  125. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/CargoByDriverSharingSettingsUpdateReq.mjs +0 -0
  126. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.d.mts +0 -0
  127. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/TaskGroupByDriverSharingSettingsUpdateReq.mjs +0 -0
  128. /package/dist/esm/api/resources/tracking/resources/{sharing → sharingSettings}/client/requests/index.d.mts +0 -0
  129. /package/dist/esm/api/{resources/drivers/client/requests/DriverLastSeenReq.mjs → types/FlightInfoForTaskRes.mjs} +0 -0
  130. /package/dist/esm/api/{resources/orderDrafts/resources/taskGroup/client/requests/SetFlightNumberDraftReq.mjs → types/SetFlightInfoReq.mjs} +0 -0
@@ -81,7 +81,7 @@ class CargoByDriver {
81
81
  _queryParams["task_group_id"] = taskGroupId;
82
82
  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);
83
83
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
84
- 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/cargo_by_driver_timeseries/last_seen/v1"),
84
+ 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/timeseries/cargo_by_driver/last_seen/v1"),
85
85
  method: "GET",
86
86
  headers: _headers,
87
87
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -115,7 +115,7 @@ class CargoByDriver {
115
115
  rawResponse: _response.rawResponse,
116
116
  });
117
117
  case "timeout":
118
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/cargo_by_driver_timeseries/last_seen/v1.");
118
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/cargo_by_driver/last_seen/v1.");
119
119
  case "unknown":
120
120
  throw new errors.ChrtError({
121
121
  message: _response.error.errorMessage,
@@ -154,7 +154,7 @@ class CargoByDriver {
154
154
  }
155
155
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
156
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
157
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/cargo_by_driver_timeseries/data_points/v1"),
157
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/timeseries/cargo_by_driver/data_points/v1"),
158
158
  method: "GET",
159
159
  headers: _headers,
160
160
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -185,7 +185,7 @@ class CargoByDriver {
185
185
  rawResponse: _response.rawResponse,
186
186
  });
187
187
  case "timeout":
188
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/cargo_by_driver_timeseries/data_points/v1.");
188
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/cargo_by_driver/data_points/v1.");
189
189
  case "unknown":
190
190
  throw new errors.ChrtError({
191
191
  message: _response.error.errorMessage,
@@ -220,7 +220,7 @@ class CargoByDriver {
220
220
  _queryParams["task_group_id"] = taskGroupId;
221
221
  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);
222
222
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
223
- 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/cargo_by_driver_timeseries/last_seen_public/v1"),
223
+ 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/timeseries/cargo_by_driver/last_seen_public/v1"),
224
224
  method: "GET",
225
225
  headers: _headers,
226
226
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -254,7 +254,7 @@ class CargoByDriver {
254
254
  rawResponse: _response.rawResponse,
255
255
  });
256
256
  case "timeout":
257
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/cargo_by_driver_timeseries/last_seen_public/v1.");
257
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/cargo_by_driver/last_seen_public/v1.");
258
258
  case "unknown":
259
259
  throw new errors.ChrtError({
260
260
  message: _response.error.errorMessage,
@@ -293,7 +293,7 @@ class CargoByDriver {
293
293
  }
294
294
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
295
295
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
296
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/cargo_by_driver_timeseries/data_points_public/v1"),
296
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/timeseries/cargo_by_driver/data_points_public/v1"),
297
297
  method: "GET",
298
298
  headers: _headers,
299
299
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -324,7 +324,7 @@ class CargoByDriver {
324
324
  rawResponse: _response.rawResponse,
325
325
  });
326
326
  case "timeout":
327
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/cargo_by_driver_timeseries/data_points_public/v1.");
327
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/cargo_by_driver/data_points_public/v1.");
328
328
  case "unknown":
329
329
  throw new errors.ChrtError({
330
330
  message: _response.error.errorMessage,
@@ -79,7 +79,7 @@ class SessionByDevice {
79
79
  _queryParams["session_id"] = sessionId;
80
80
  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);
81
81
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
82
- 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/session_by_device_timeseries/last_seen/v1"),
82
+ 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/timeseries/session_by_device/last_seen/v1"),
83
83
  method: "GET",
84
84
  headers: _headers,
85
85
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -113,7 +113,7 @@ class SessionByDevice {
113
113
  rawResponse: _response.rawResponse,
114
114
  });
115
115
  case "timeout":
116
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device_timeseries/last_seen/v1.");
116
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/session_by_device/last_seen/v1.");
117
117
  case "unknown":
118
118
  throw new errors.ChrtError({
119
119
  message: _response.error.errorMessage,
@@ -150,7 +150,7 @@ class SessionByDevice {
150
150
  }
151
151
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
152
152
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
153
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/session_by_device_timeseries/data_points/v1"),
153
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/timeseries/session_by_device/data_points/v1"),
154
154
  method: "GET",
155
155
  headers: _headers,
156
156
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -181,7 +181,7 @@ class SessionByDevice {
181
181
  rawResponse: _response.rawResponse,
182
182
  });
183
183
  case "timeout":
184
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device_timeseries/data_points/v1.");
184
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/session_by_device/data_points/v1.");
185
185
  case "unknown":
186
186
  throw new errors.ChrtError({
187
187
  message: _response.error.errorMessage,
@@ -212,7 +212,7 @@ class SessionByDevice {
212
212
  var _a, _b, _c, _d;
213
213
  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);
214
214
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
215
- 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/session_by_device_timeseries/outlier/v1"),
215
+ 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/timeseries/session_by_device/outlier/v1"),
216
216
  method: "POST",
217
217
  headers: _headers,
218
218
  contentType: "application/json",
@@ -249,7 +249,7 @@ class SessionByDevice {
249
249
  rawResponse: _response.rawResponse,
250
250
  });
251
251
  case "timeout":
252
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/session_by_device_timeseries/outlier/v1.");
252
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /tracking/timeseries/session_by_device/outlier/v1.");
253
253
  case "unknown":
254
254
  throw new errors.ChrtError({
255
255
  message: _response.error.errorMessage,
@@ -282,7 +282,7 @@ class SessionByDevice {
282
282
  _queryParams["session_id"] = sessionId;
283
283
  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);
284
284
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
285
- 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/session_by_device_timeseries/last_seen_public/v1"),
285
+ 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/timeseries/session_by_device/last_seen_public/v1"),
286
286
  method: "GET",
287
287
  headers: _headers,
288
288
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -316,7 +316,7 @@ class SessionByDevice {
316
316
  rawResponse: _response.rawResponse,
317
317
  });
318
318
  case "timeout":
319
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device_timeseries/last_seen_public/v1.");
319
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/session_by_device/last_seen_public/v1.");
320
320
  case "unknown":
321
321
  throw new errors.ChrtError({
322
322
  message: _response.error.errorMessage,
@@ -353,7 +353,7 @@ class SessionByDevice {
353
353
  }
354
354
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
355
355
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
356
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/session_by_device_timeseries/data_points_public/v1"),
356
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/timeseries/session_by_device/data_points_public/v1"),
357
357
  method: "GET",
358
358
  headers: _headers,
359
359
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -384,7 +384,7 @@ class SessionByDevice {
384
384
  rawResponse: _response.rawResponse,
385
385
  });
386
386
  case "timeout":
387
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/session_by_device_timeseries/data_points_public/v1.");
387
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/session_by_device/data_points_public/v1.");
388
388
  case "unknown":
389
389
  throw new errors.ChrtError({
390
390
  message: _response.error.errorMessage,
@@ -79,7 +79,7 @@ class TaskGroupByDriver {
79
79
  _queryParams["task_group_id"] = taskGroupId;
80
80
  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);
81
81
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
82
- 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/task_group_by_driver_timeseries/last_seen/v1"),
82
+ 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/timeseries/task_group_by_driver/last_seen/v1"),
83
83
  method: "GET",
84
84
  headers: _headers,
85
85
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -113,7 +113,7 @@ class TaskGroupByDriver {
113
113
  rawResponse: _response.rawResponse,
114
114
  });
115
115
  case "timeout":
116
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/task_group_by_driver_timeseries/last_seen/v1.");
116
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/task_group_by_driver/last_seen/v1.");
117
117
  case "unknown":
118
118
  throw new errors.ChrtError({
119
119
  message: _response.error.errorMessage,
@@ -150,7 +150,7 @@ class TaskGroupByDriver {
150
150
  }
151
151
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
152
152
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
153
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/task_group_by_driver_timeseries/data_points/v1"),
153
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/timeseries/task_group_by_driver/data_points/v1"),
154
154
  method: "GET",
155
155
  headers: _headers,
156
156
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -181,7 +181,7 @@ class TaskGroupByDriver {
181
181
  rawResponse: _response.rawResponse,
182
182
  });
183
183
  case "timeout":
184
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/task_group_by_driver_timeseries/data_points/v1.");
184
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/task_group_by_driver/data_points/v1.");
185
185
  case "unknown":
186
186
  throw new errors.ChrtError({
187
187
  message: _response.error.errorMessage,
@@ -214,7 +214,7 @@ class TaskGroupByDriver {
214
214
  _queryParams["task_group_id"] = taskGroupId;
215
215
  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);
216
216
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
217
- 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/task_group_by_driver_timeseries/last_seen_public/v1"),
217
+ 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/timeseries/task_group_by_driver/last_seen_public/v1"),
218
218
  method: "GET",
219
219
  headers: _headers,
220
220
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -248,7 +248,7 @@ class TaskGroupByDriver {
248
248
  rawResponse: _response.rawResponse,
249
249
  });
250
250
  case "timeout":
251
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/task_group_by_driver_timeseries/last_seen_public/v1.");
251
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/task_group_by_driver/last_seen_public/v1.");
252
252
  case "unknown":
253
253
  throw new errors.ChrtError({
254
254
  message: _response.error.errorMessage,
@@ -285,7 +285,7 @@ class TaskGroupByDriver {
285
285
  }
286
286
  let _headers = (0, headers_js_1.mergeHeaders)((_b = this._options) === null || _b === void 0 ? void 0 : _b.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
287
287
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
288
- url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/task_group_by_driver_timeseries/data_points_public/v1"),
288
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ChrtEnvironment.Local, "tracking/timeseries/task_group_by_driver/data_points_public/v1"),
289
289
  method: "GET",
290
290
  headers: _headers,
291
291
  queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
@@ -316,7 +316,7 @@ class TaskGroupByDriver {
316
316
  rawResponse: _response.rawResponse,
317
317
  });
318
318
  case "timeout":
319
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/task_group_by_driver_timeseries/data_points_public/v1.");
319
+ throw new errors.ChrtTimeoutError("Timeout exceeded when calling GET /tracking/timeseries/task_group_by_driver/data_points_public/v1.");
320
320
  case "unknown":
321
321
  throw new errors.ChrtError({
322
322
  message: _response.error.errorMessage,
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Response model for flight info lookup by task.
6
+ */
7
+ export interface FlightInfoForTaskRes {
8
+ flight_number?: string | null;
9
+ fa_flight_id?: string | null;
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SetFlightInfoReq {
5
+ /** Flight number to set on the task group */
6
+ flight_number?: string | null;
7
+ /** Flight Aware's uuid for flights */
8
+ fa_flight_id?: string | null;
9
+ }
@@ -9,7 +9,6 @@ export interface Task1 {
9
9
  time_windows?: Chrt.TimeWindow1[];
10
10
  order_placer_comments?: string | null;
11
11
  shipper_contact_ids?: string[];
12
- flight_number?: string | null;
13
12
  _id: string;
14
13
  order_id: string;
15
14
  order_short_id: string;
@@ -9,7 +9,6 @@ export interface TaskClientCreate1 {
9
9
  time_windows?: Chrt.TimeWindow1[];
10
10
  order_placer_comments?: string | null;
11
11
  shipper_contact_ids?: string[];
12
- flight_number?: string | null;
13
12
  }
14
13
  export declare namespace TaskClientCreate1 {
15
14
  type Action = Chrt.ChrtGroundCourierTaskActionEnum1 | Chrt.FlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
@@ -7,7 +7,6 @@ export interface TaskClientUpdate1 {
7
7
  action?: TaskClientUpdate1.Action | null;
8
8
  time_windows?: Chrt.TimeWindow1[];
9
9
  shipper_contact_ids?: string[];
10
- flight_number?: string | null;
11
10
  }
12
11
  export declare namespace TaskClientUpdate1 {
13
12
  type Action = Chrt.ChrtGroundCourierTaskActionEnum1 | Chrt.FlightTaskActionEnum1 | Chrt.OnboardCourierTaskActionEnum1;
@@ -27,5 +27,6 @@ export interface TaskGroup1 {
27
27
  task_group_type: Chrt.TaskGroupTypeEnum1;
28
28
  task_group_mileage?: Chrt.TaskGroupMileage1 | null;
29
29
  flight_number?: string | null;
30
+ fa_flight_id?: string | null;
30
31
  messages?: Chrt.TaskGroupMessage1[];
31
32
  }
@@ -37,6 +37,7 @@ export * from "./Driver1.js";
37
37
  export * from "./DriverStatusEnum.js";
38
38
  export * from "./DriverUpdateAvailabilityReq.js";
39
39
  export * from "./DriverUpdateRes.js";
40
+ export * from "./FlightInfoForTaskRes.js";
40
41
  export * from "./FlightTaskActionEnum1.js";
41
42
  export * from "./ForwarderConnectionRes.js";
42
43
  export * from "./ForwarderCourierConnection1.js";
@@ -92,6 +93,7 @@ export * from "./SessionByDeviceDataPoint1.js";
92
93
  export * from "./SessionByDeviceDataPointMetadata1.js";
93
94
  export * from "./SessionByDeviceMarkOutliersResponse1.js";
94
95
  export * from "./SessionDeleteResponse1.js";
96
+ export * from "./SetFlightInfoReq.js";
95
97
  export * from "./ShipperConnectionRes.js";
96
98
  export * from "./ShipperContact1.js";
97
99
  export * from "./ShipperContactClientCreate1.js";
@@ -53,6 +53,7 @@ __exportStar(require("./Driver1.js"), exports);
53
53
  __exportStar(require("./DriverStatusEnum.js"), exports);
54
54
  __exportStar(require("./DriverUpdateAvailabilityReq.js"), exports);
55
55
  __exportStar(require("./DriverUpdateRes.js"), exports);
56
+ __exportStar(require("./FlightInfoForTaskRes.js"), exports);
56
57
  __exportStar(require("./FlightTaskActionEnum1.js"), exports);
57
58
  __exportStar(require("./ForwarderConnectionRes.js"), exports);
58
59
  __exportStar(require("./ForwarderCourierConnection1.js"), exports);
@@ -108,6 +109,7 @@ __exportStar(require("./SessionByDeviceDataPoint1.js"), exports);
108
109
  __exportStar(require("./SessionByDeviceDataPointMetadata1.js"), exports);
109
110
  __exportStar(require("./SessionByDeviceMarkOutliersResponse1.js"), exports);
110
111
  __exportStar(require("./SessionDeleteResponse1.js"), exports);
112
+ __exportStar(require("./SetFlightInfoReq.js"), exports);
111
113
  __exportStar(require("./ShipperConnectionRes.js"), exports);
112
114
  __exportStar(require("./ShipperContact1.js"), exports);
113
115
  __exportStar(require("./ShipperContactClientCreate1.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.331.0";
1
+ export declare const SDK_VERSION = "1.334.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.331.0";
4
+ exports.SDK_VERSION = "1.334.0";
@@ -15,6 +15,7 @@ import { ShipperPayCourierStatements } from "./api/resources/shipperPayCourierSt
15
15
  import { Connections } from "./api/resources/connections/client/Client.mjs";
16
16
  import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.mjs";
17
17
  import { Dev } from "./api/resources/dev/client/Client.mjs";
18
+ import { Flights } from "./api/resources/flights/client/Client.mjs";
18
19
  import { TaskArtifactNotifications } from "./api/resources/taskArtifactNotifications/client/Client.mjs";
19
20
  import { Drivers } from "./api/resources/drivers/client/Client.mjs";
20
21
  import { Cargos } from "./api/resources/cargos/client/Client.mjs";
@@ -69,6 +70,7 @@ export declare class ChrtClient {
69
70
  protected _connections: Connections | undefined;
70
71
  protected _orgProfiles: OrgProfiles | undefined;
71
72
  protected _dev: Dev | undefined;
73
+ protected _flights: Flights | undefined;
72
74
  protected _taskArtifactNotifications: TaskArtifactNotifications | undefined;
73
75
  protected _drivers: Drivers | undefined;
74
76
  protected _cargos: Cargos | undefined;
@@ -99,6 +101,7 @@ export declare class ChrtClient {
99
101
  get connections(): Connections;
100
102
  get orgProfiles(): OrgProfiles;
101
103
  get dev(): Dev;
104
+ get flights(): Flights;
102
105
  get taskArtifactNotifications(): TaskArtifactNotifications;
103
106
  get drivers(): Drivers;
104
107
  get cargos(): Cargos;
@@ -15,6 +15,7 @@ import { ShipperPayCourierStatements } from "./api/resources/shipperPayCourierSt
15
15
  import { Connections } from "./api/resources/connections/client/Client.mjs";
16
16
  import { OrgProfiles } from "./api/resources/orgProfiles/client/Client.mjs";
17
17
  import { Dev } from "./api/resources/dev/client/Client.mjs";
18
+ import { Flights } from "./api/resources/flights/client/Client.mjs";
18
19
  import { TaskArtifactNotifications } from "./api/resources/taskArtifactNotifications/client/Client.mjs";
19
20
  import { Drivers } from "./api/resources/drivers/client/Client.mjs";
20
21
  import { Cargos } from "./api/resources/cargos/client/Client.mjs";
@@ -37,8 +38,8 @@ export class ChrtClient {
37
38
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
38
39
  "X-Fern-Language": "JavaScript",
39
40
  "X-Fern-SDK-Name": "@chrt-inc/typescript-sdk",
40
- "X-Fern-SDK-Version": "1.331.0",
41
- "User-Agent": "@chrt-inc/typescript-sdk/1.331.0",
41
+ "X-Fern-SDK-Version": "1.334.0",
42
+ "User-Agent": "@chrt-inc/typescript-sdk/1.334.0",
42
43
  "X-Fern-Runtime": core.RUNTIME.type,
43
44
  "X-Fern-Runtime-Version": core.RUNTIME.version,
44
45
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -91,6 +92,10 @@ export class ChrtClient {
91
92
  var _a;
92
93
  return ((_a = this._dev) !== null && _a !== void 0 ? _a : (this._dev = new Dev(this._options)));
93
94
  }
95
+ get flights() {
96
+ var _a;
97
+ return ((_a = this._flights) !== null && _a !== void 0 ? _a : (this._flights = new Flights(this._options)));
98
+ }
94
99
  get taskArtifactNotifications() {
95
100
  var _a;
96
101
  return ((_a = this._taskArtifactNotifications) !== null && _a !== void 0 ? _a : (this._taskArtifactNotifications = new TaskArtifactNotifications(this._options)));
@@ -115,30 +115,6 @@ export declare class Drivers {
115
115
  */
116
116
  updateV1(driverId: string, request?: Chrt.DriverClientUpdate1, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
117
117
  private __updateV1;
118
- /**
119
- * Updates the caller's driver last known location and timestamp for tracking. Only updates if timestamp is newer than existing (DB-side validation). Returns False if driver not found or timestamp is stale. | (DriverLastSeenReq) -> (bool)
120
- *
121
- * @param {Chrt.DriverLastSeenReq} request
122
- * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
123
- *
124
- * @throws {@link Chrt.UnprocessableEntityError}
125
- *
126
- * @example
127
- * await client.drivers.updateLastSeenV1({
128
- * location: {
129
- * type: "Feature",
130
- * geometry: {
131
- * type: "GeometryCollection",
132
- * geometries: [{
133
- * type: "LineString",
134
- * coordinates: [[]]
135
- * }]
136
- * }
137
- * }
138
- * })
139
- */
140
- updateLastSeenV1(request: Chrt.DriverLastSeenReq, requestOptions?: Drivers.RequestOptions): core.HttpResponsePromise<boolean>;
141
- private __updateLastSeenV1;
142
118
  /**
143
119
  * Clears the driver's last known location and timestamp. | () -> (bool)
144
120
  *
@@ -413,79 +413,6 @@ export class Drivers {
413
413
  }
414
414
  });
415
415
  }
416
- /**
417
- * Updates the caller's driver last known location and timestamp for tracking. Only updates if timestamp is newer than existing (DB-side validation). Returns False if driver not found or timestamp is stale. | (DriverLastSeenReq) -> (bool)
418
- *
419
- * @param {Chrt.DriverLastSeenReq} request
420
- * @param {Drivers.RequestOptions} requestOptions - Request-specific configuration.
421
- *
422
- * @throws {@link Chrt.UnprocessableEntityError}
423
- *
424
- * @example
425
- * await client.drivers.updateLastSeenV1({
426
- * location: {
427
- * type: "Feature",
428
- * geometry: {
429
- * type: "GeometryCollection",
430
- * geometries: [{
431
- * type: "LineString",
432
- * coordinates: [[]]
433
- * }]
434
- * }
435
- * }
436
- * })
437
- */
438
- updateLastSeenV1(request, requestOptions) {
439
- return core.HttpResponsePromise.fromPromise(this.__updateLastSeenV1(request, requestOptions));
440
- }
441
- __updateLastSeenV1(request, requestOptions) {
442
- return __awaiter(this, void 0, void 0, function* () {
443
- var _a, _b, _c, _d;
444
- 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);
445
- const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
446
- 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, "oort/drivers/last_seen/update/v1"),
447
- method: "POST",
448
- headers: _headers,
449
- contentType: "application/json",
450
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
451
- requestType: "json",
452
- body: request,
453
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
454
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
455
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
456
- });
457
- if (_response.ok) {
458
- return { data: _response.body, rawResponse: _response.rawResponse };
459
- }
460
- if (_response.error.reason === "status-code") {
461
- switch (_response.error.statusCode) {
462
- case 422:
463
- throw new Chrt.UnprocessableEntityError(_response.error.body, _response.rawResponse);
464
- default:
465
- throw new errors.ChrtError({
466
- statusCode: _response.error.statusCode,
467
- body: _response.error.body,
468
- rawResponse: _response.rawResponse,
469
- });
470
- }
471
- }
472
- switch (_response.error.reason) {
473
- case "non-json":
474
- throw new errors.ChrtError({
475
- statusCode: _response.error.statusCode,
476
- body: _response.error.rawBody,
477
- rawResponse: _response.rawResponse,
478
- });
479
- case "timeout":
480
- throw new errors.ChrtTimeoutError("Timeout exceeded when calling POST /oort/drivers/last_seen/update/v1.");
481
- case "unknown":
482
- throw new errors.ChrtError({
483
- message: _response.error.errorMessage,
484
- rawResponse: _response.rawResponse,
485
- });
486
- }
487
- });
488
- }
489
416
  /**
490
417
  * Clears the driver's last known location and timestamp. | () -> (bool)
491
418
  *
@@ -2,4 +2,3 @@ export { type DriversListOrgMembersAndDriversV1Request } from "./DriversListOrgM
2
2
  export { type DriversListV1Request } from "./DriversListV1Request.mjs";
3
3
  export { type DriverClientCreate1 } from "./DriverClientCreate1.mjs";
4
4
  export { type DriverClientUpdate1 } from "./DriverClientUpdate1.mjs";
5
- export { type DriverLastSeenReq } from "./DriverLastSeenReq.mjs";
@@ -0,0 +1,47 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments.mjs";
5
+ import * as core from "../../../../core/index.mjs";
6
+ import * as Chrt from "../../../index.mjs";
7
+ export declare namespace Flights {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.ChrtEnvironment | string>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ token?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ fetcher?: core.FetchFunction;
16
+ }
17
+ interface RequestOptions {
18
+ /** The maximum time to wait for a response in seconds. */
19
+ timeoutInSeconds?: number;
20
+ /** The number of times to retry the request. Defaults to 2. */
21
+ maxRetries?: number;
22
+ /** A hook to abort the request. */
23
+ abortSignal?: AbortSignal;
24
+ /** Additional query string parameters to include in the request. */
25
+ queryParams?: Record<string, unknown>;
26
+ /** Additional headers to include in the request. */
27
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
28
+ }
29
+ }
30
+ export declare class Flights {
31
+ protected readonly _options: Flights.Options;
32
+ constructor(_options?: Flights.Options);
33
+ /**
34
+ * Returns flight info from an adjacent FLIGHT task group for TENDER_TO_AIRLINE or RECOVER_FROM_AIRLINE tasks. | authz_personas=[courier_driver, forwarder_org_operators, courier_org_operators, shipper_org_operators] | () -> (FlightInfoForTaskRes)
35
+ *
36
+ * @param {string} taskId
37
+ * @param {Flights.RequestOptions} requestOptions - Request-specific configuration.
38
+ *
39
+ * @throws {@link Chrt.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.flights.getFlightInfoForTaskV1("task_id")
43
+ */
44
+ getFlightInfoForTaskV1(taskId: string, requestOptions?: Flights.RequestOptions): core.HttpResponsePromise<Chrt.FlightInfoForTaskRes>;
45
+ private __getFlightInfoForTaskV1;
46
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
47
+ }